PageSourceSearch

https://www.audacy.com/assets-a2/index-BgcUcd2q.js

js audacy.com collected 2026-10-09 22:39:42 UTC 3,132,257 bytes, 1,150 lines download raw bytes

vendor: 7,707 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets-a2/index-t2WuuVb2.js","assets-a2/EntityHeaderLarge-DWLtSszd.js","assets-a2/index-Cy35M18U.js","assets-a2/utils-Dxssi3Y4.js","assets-a2/index-DDaBYrL5.js","assets-a2/index-CoA4dACl.js","assets-a2/index-CFjuB9At.js","assets-a2/index-Bwi3Hb6I.js","assets-a2/index-DuDjacTp.js","assets-a2/index-Cv8vmYLN.js","assets-a2/index-De6biPFp.js","assets-a2/index-BwSDX7rr.js","assets-a2/index-CRdMnSkl.js","assets-a2/index-DYB93Zbq.js","assets-a2/index-CGk-ltrF.js","assets-a2/index-Dwt6XRjT.js","assets-a2/index-BKIq0KbQ.js","assets-a2/index-8vlDA2lM.js","assets-a2/index-BSQQz_h3.js","assets-a2/index-h3zCa9a3.js","assets-a2/index-hgx_D8hr.js","assets-a2/index-DA_DkvA0.js","assets-a2/index-CrxkcTB-.js","assets-a2/index-mpKAeCKW.js","assets-a2/videojs-contrib-ads.es-AyIxpok4.js","assets-a2/video.es-BjAfamXU.js","assets-a2/videojs.ima.es-BBTmRBOo.js","assets-a2/video-js-Cp4d_clu.css","assets-a2/videojs-DRfyC-Ac.css","assets-a2/videojs-Ddv6c8bl.css","assets-a2/index-Cp9MNSi-.js","assets-a2/index-C2oE_RTB.js","assets-a2/index-BYZVucKB.js","assets-a2/index-CU0eqiNB.js","assets-a2/index-w-NOGtXi.js","assets-a2/index-lzPHz2H3.js","assets-a2/index-CJ1NJ9gh.js"])))=>i.map(i=>d[i]);
2var CTe=Object.defineProperty;var Iz=t=>{throw TypeError(t)};var xTe=(t,e,n)=>e in t?CTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var et=(t,e,n)=>xTe(t,typeof e!="symbol"?e+"":e,n),BM=(t,e,n)=>e.has(t)||Iz("Cannot "+n);var Ne=(t,e,n)=>(BM(t,e,"read from private field"),n?n.call(t):e.get(t)),Mn=(t,e,n)=>e.has(t)?Iz("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),hn=(t,e,n,r)=>(BM(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Jr=(t,e,n)=>(BM(t,e,"access private method"),n);var SI=(t,e,n,r)=>({set _(i){hn(t,e,i,n)},get _(){return Ne(t,e,r)}});function ITe(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xte(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Jte={exports:{}},YD={},ene={exports:{}},Vr={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var LC=Symbol.for("react.element"),OTe=Symbol.for("react.portal"),PTe=Symbol.for("react.fragment"),RTe=Symbol.for("react.strict_mode"),LTe=Symbol.for("react.profiler"),DTe=Symbol.for("react.provider"),kTe=Symbol.for("react.context"),NTe=Symbol.for("react.forward_ref"),MTe=Symbol.for("react.suspense"),FTe=Symbol.for("react.memo"),$Te=Symbol.for("react.lazy"),Oz=Symbol.iterator;function BTe(t){return t===null||typeof t!="object"?null:(t=Oz&&t[Oz]||t["@@iterator"],typeof t=="function"?t:null)}var tne={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nne=Object.assign,rne={};function W1(t,e,n){this.props=t,this.context=e,this.refs=rne,this.updater=n||tne}W1.prototype.isReactComponent={};W1.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};W1.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ine(){}ine.prototype=W1.prototype;function D6(t,e,n){this.props=t,this.context=e,this.refs=rne,this.updater=n||tne}var k6=D6.prototype=new ine;k6.constructor=D6;nne(k6,W1.prototype);k6.isPureReactComponent=!0;var Pz=Array.isArray,sne=Object.prototype.hasOwnProperty,N6={current:null},ane={key:!0,ref:!0,__self:!0,__source:!0};function one(t,e,n){var r,i={},s=null,a=null;if(e!=null)for(r in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(s=""+e.key),e)sne.call(e,r)&&!ane.hasOwnProperty(r)&&(i[r]=e[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var l=Array(o),u=0;u<o;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in o=t.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:LC,type:t,key:s,ref:a,props:i,_owner:N6.current}}function UTe(t,e){return{$$typeof:LC,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function M6(t){return typeof t=="object"&&t!==null&&t.$$typeof===LC}function VTe(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Rz=/\/+/g;function UM(t,e){return typeof t=="object"&&t!==null&&t.key!=null?VTe(""+t.key):e.toString(36)}function rP(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case LC:case OTe:a=!0}}if(a)return a=t,i=i(a),t=r===""?"."+UM(a,0):r,Pz(i)?(n="",t!=null&&(n=t.replace(Rz,"$&/")+"/"),rP(i,e,n,"",function(u){return u})):i!=null&&(M6(i)&&(i=UTe(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Rz,"$&/")+"/")+t)),e.push(i)),1;if(a=0,r=r===""?".":r+":",Pz(t))for(var o=0;o<t.length;o++){s=t[o];var l=r+UM(s,o);a+=rP(s,e,n,l,i)}else if(l=BTe(t),typeof l=="function")for(t=l.call(t),o=0;!(s=t.next()).done;)s=s.value,l=r+UM(s,o++),a+=rP(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function EI(t,e,n){if(t==null)return t;var r=[],i=0;return rP(t,r,"","",function(s){return e.call(n,s,i++)}),r}function HTe(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var fu={current:null},iP={transition:null},jTe={ReactCurrentDispatcher:fu,ReactCurrentBatchConfig:iP,ReactCurrentOwner:N6};function lne(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 4,847 bytes, lines 10-18
10Vr.Children={map:EI,forEach:function(t,e,n){EI(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return EI(t,function(){e++}),e},toArray:function(t){return EI(t,function(e){return e})||[]},only:function(t){if(!M6(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Vr.Component=W1;Vr.Fragment=PTe;Vr.Profiler=LTe;Vr.PureComponent=D6;Vr.StrictMode=RTe;Vr.Suspense=MTe;Vr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jTe;Vr.act=lne;Vr.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=nne({},t.props),i=t.key,s=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,a=N6.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(l in e)sne.call(e,l)&&!ane.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&o!==void 0?o[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){o=Array(l);for(var u=0;u<l;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:LC,type:t.type,key:i,ref:s,props:r,_owner:a}};Vr.createContext=function(t){return t={$$typeof:kTe,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:DTe,_context:t},t.Consumer=t};Vr.createElement=one;Vr.createFactory=function(t){var e=one.bind(null,t);return e.type=t,e};Vr.createRef=function(){return{current:null}};Vr.forwardRef=function(t){return{$$typeof:NTe,render:t}};Vr.isValidElement=M6;Vr.lazy=function(t){return{$$typeof:$Te,_payload:{_status:-1,_result:t},_init:HTe}};Vr.memo=function(t,e){return{$$typeof:FTe,type:t,compare:e===void 0?null:e}};Vr.startTransition=function(t){var e=iP.transition;iP.transition={};try{t()}finally{iP.transition=e}};Vr.unstable_act=lne;Vr.useCallback=function(t,e){return fu.current.useCallback(t,e)};Vr.useContext=function(t){return fu.current.useContext(t)};Vr.useDebugValue=function(){};Vr.useDeferredValue=function(t){return fu.current.useDeferredValue(t)};Vr.useEffect=function(t,e){return fu.current.useEffect(t,e)};Vr.useId=function(){return fu.current.useId()};Vr.useImperativeHandle=function(t,e,n){return fu.current.useImperativeHandle(t,e,n)};Vr.useInsertionEffect=function(t,e){return fu.current.useInsertionEffect(t,e)};Vr.useLayoutEffect=function(t,e){return fu.current.useLayoutEffect(t,e)};Vr.useMemo=function(t,e){return fu.current.useMemo(t,e)};Vr.useReducer=function(t,e,n){return fu.current.useReducer(t,e,n)};Vr.useRef=function(t){return fu.current.useRef(t)};Vr.useState=function(t){return fu.current.useState(t)};Vr.useSyncExternalStore=function(t,e,n){return fu.current.useSyncExternalStore(t,e,n)};Vr.useTransition=function(){return fu.current.useTransition()};Vr.version="18.3.1";ene.exports=Vr;var $=ene.exports;const mt=pi($),o$=ITe({__proto__:null,default:mt},[$]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var zTe=$,GTe=Symbol.for("react.element"),WTe=Symbol.for("react.fragment"),qTe=Object.prototype.hasOwnProperty,KTe=zTe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,YTe={key:!0,ref:!0,__self:!0,__source:!0};function une(t,e,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)qTe.call(e,r)&&!YTe.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:GTe,type:t,key:s,ref:a,props:i,_owner:KTe.current}}YD.Fragment=WTe;YD.jsx=une;YD.jsxs=une;Jte.exports=YD;var t1=Jte.exports;function ZTe(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function QTe(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var XTe=function(){function t(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(QTe(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=ZTe(i);
vendor: 14,477 bytes, lines 18-25
18try{s.insertRule(r,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},t}(),Sl="-ms-",JP="-moz-",xi="-webkit-",cne="comm",F6="rule",$6="decl",JTe="@import",dne="@keyframes",eAe="@layer",tAe=Math.abs,ZD=String.fromCharCode,nAe=Object.assign;function rAe(t,e){return tl(t,0)^45?(((e<<2^tl(t,0))<<2^tl(t,1))<<2^tl(t,2))<<2^tl(t,3):0}function fne(t){return t.trim()}function iAe(t,e){return(t=e.exec(t))?t[0]:t}function Ii(t,e,n){return t.replace(e,n)}function l$(t,e){return t.indexOf(e)}function tl(t,e){return t.charCodeAt(e)|0}function d_(t,e,n){return t.slice(e,n)}function xh(t){return t.length}function B6(t){return t.length}function TI(t,e){return e.push(t),t}function sAe(t,e){return t.map(e).join("")}var QD=1,n1=1,hne=0,ju=0,Qa=0,q1="";function XD(t,e,n,r,i,s,a){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:QD,column:n1,length:a,return:""}}function JT(t,e){return nAe(XD("",null,null,"",null,null,0),t,{length:-t.length},e)}function aAe(){return Qa}function oAe(){return Qa=ju>0?tl(q1,--ju):0,n1--,Qa===10&&(n1=1,QD--),Qa}function Rc(){return Qa=ju<hne?tl(q1,ju++):0,n1++,Qa===10&&(n1=1,QD++),Qa}function Hh(){return tl(q1,ju)}function sP(){return ju}function DC(t,e){return d_(q1,t,e)}function f_(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pne(t){return QD=n1=1,hne=xh(q1=t),ju=0,[]}function gne(t){return q1="",t}function aP(t){return fne(DC(ju-1,u$(t===91?t+2:t===40?t+1:t)))}function lAe(t){for(;(Qa=Hh())&&Qa<33;)Rc();return f_(t)>2||f_(Qa)>3?"":" "}function uAe(t,e){for(;--e&&Rc()&&!(Qa<48||Qa>102||Qa>57&&Qa<65||Qa>70&&Qa<97););return DC(t,sP()+(e<6&&Hh()==32&&Rc()==32))}function u$(t){for(;Rc();)switch(Qa){case t:return ju;case 34:case 39:t!==34&&t!==39&&u$(Qa);break;case 40:t===41&&u$(t);break;case 92:Rc();break}return ju}function cAe(t,e){for(;Rc()&&t+Qa!==57;)if(t+Qa===84&&Hh()===47)break;return"/*"+DC(e,ju-1)+"*"+ZD(t===47?t:Rc())}function dAe(t){for(;!f_(Hh());)Rc();return DC(t,ju)}function fAe(t){return gne(oP("",null,null,null,[""],t=pne(t),0,[0],t))}function oP(t,e,n,r,i,s,a,o,l){for(var u=0,c=0,d=a,f=0,h=0,g=0,v=1,b=1,S=1,A=0,w="",x=i,P=s,N=r,k=w;b;)switch(g=A,A=Rc()){case 40:if(g!=108&&tl(k,d-1)==58){l$(k+=Ii(aP(A),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:k+=aP(A);break;case 9:case 10:case 13:case 32:k+=lAe(g);break;case 92:k+=uAe(sP()-1,7);continue;case 47:switch(Hh()){case 42:case 47:TI(hAe(cAe(Rc(),sP()),e,n),l);break;default:k+="/"}break;case 123*v:o[u++]=xh(k)*S;case 125*v:case 59:case 0:switch(A){case 0:case 125:b=0;case 59+c:S==-1&&(k=Ii(k,/\f/g,"")),h>0&&xh(k)-d&&TI(h>32?Dz(k+";",r,n,d-1):Dz(Ii(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(TI(N=Lz(k,e,n,u,c,i,o,w,x=[],P=[],d),s),A===123)if(c===0)oP(k,e,N,N,x,s,d,o,P);else switch(f===99&&tl(k,3)===110?100:f){case 100:case 108:case 109:case 115:oP(t,N,N,r&&TI(Lz(t,N,N,0,0,i,o,w,i,x=[],d),P),i,P,d,o,r?x:P);break;default:oP(k,N,N,N,[""],P,0,o,P)}}u=c=h=0,v=S=1,w=k="",d=a;break;case 58:d=1+xh(k),h=g;default:if(v<1){if(A==123)--v;else if(A==125&&v++==0&&oAe()==125)continue}switch(k+=ZD(A),A*v){case 38:S=c>0?1:(k+="\f",-1);break;case 44:o[u++]=(xh(k)-1)*S,S=1;break;case 64:Hh()===45&&(k+=aP(Rc())),f=Hh(),c=d=xh(w=k+=dAe(sP())),A++;break;case 45:g===45&&xh(k)==2&&(v=0)}}return s}function Lz(t,e,n,r,i,s,a,o,l,u,c){for(var d=i-1,f=i===0?s:[""],h=B6(f),g=0,v=0,b=0;g<r;++g)for(var S=0,A=d_(t,d+1,d=tAe(v=a[g])),w=t;S<h;++S)(w=fne(v>0?f[S]+" "+A:Ii(A,/&\f/g,f[S])))&&(l[b++]=w);return XD(t,e,n,i===0?F6:o,l,u,c)}function hAe(t,e,n){return XD(t,e,n,cne,ZD(aAe()),d_(t,2,-2),0)}function Dz(t,e,n,r){return XD(t,e,n,$6,d_(t,0,r),d_(t,r+1,-1),r)}function bE(t,e){for(var n="",r=B6(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function pAe(t,e,n,r){switch(t.type){case eAe:if(t.children.length)break;case JTe:case $6:return t.return=t.return||t.value;case cne:return"";case dne:return t.return=t.value+"{"+bE(t.children,r)+"}";case F6:t.value=t.props.join(",")}return xh(n=bE(t.children,r))?t.return=t.value+"{"+n+"}":""}function gAe(t){var e=B6(t);return function(n,r,i,s){for(var a="",o=0;o<e;o++)a+=t[o](n,r,i,s)||"";return a}}function mAe(t){return function(e){e.root||(e=e.return)&&t(e)}}function mne(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var vAe=function(e,n,r){for(var i=0,s=0;i=s,s=Hh(),i===38&&s===12&&(n[r]=1),!f_(s);)Rc();return DC(e,ju)},yAe=function(e,n){var r=-1,i=44;do switch(f_(i)){case 0:i===38&&Hh()===12&&(n[r]=1),e[r]+=vAe(ju-1,n,r);break;case 2:e[r]+=aP(i);break;case 4:if(i===44){e[++r]=Hh()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=ZD(i)}while(i=Rc());return e},bAe=function(e,n){return gne(yAe(pne(e),n))},kz=new WeakMap,SAe=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!kz.get(r))&&!i){kz.set(e,!0);for(var s=[],a=bAe(n,s),o=r.props,l=0,u=0;l<a.length;l++)for(var c=0;c<o.length;c++,u++)e.props[u]=s[l]?a[l].replace(/&\f/g,o[c]):o[c]+" "+a[l]}}},EAe=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function vne(t,e){switch(rAe(t,e)){case 5103:return xi+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return xi+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return xi+t+JP+t+Sl+t+t;case 6828:case 4268:return xi+t+Sl+t+t;case 6165:return xi+t+Sl+"flex-"+t+t;case 5187:return xi+t+Ii(t,/(\w+).+(:[^]+)/,xi+"box-$1$2"+Sl+"flex-$1$2")+t;case 5443:return xi+t+Sl+"flex-item-"+Ii(t,/flex-|-self/,"")+t;case 4675:return xi+t+Sl+"flex-line-pack"+Ii(t,/align-content|flex-|-self/,"")+t;case 5548:return xi+t+Sl+Ii(t,"shrink","negative")+t;case 5292:return xi+t+Sl+Ii(t,"basis","preferred-size")+t;case 6060:return xi+"box-"+Ii(t,"-grow","")+xi+t+Sl+Ii(t,"grow","positive")+t;case 4554:return xi+Ii(t,/([^-])(transform)/g,"$1"+xi+"$2")+t;case 6187:return Ii(Ii(Ii(t,/(zoom-|grab)/,xi+"$1"),/(image-set)/,xi+"$1"),t,"")+t;case 5495:case 3959:return Ii(t,/(image-set\([^]*)/,xi+"$1$`$1");case 4968:return Ii(Ii(t,/(.+:)(flex-)?(.*)/,xi+"box-pack:$3"+Sl+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+xi+t+t;case 4095:case 3583:case 4068:case 2532:return Ii(t,/(.+)-inline(.+)/,xi+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xh(t)-1-e>6)switch(tl(t,e+1)){case 109:if(tl(t,e+4)!==45)break;case 102:return Ii(t,/(.+:)(.+)-([^]+)/,"$1"+xi+"$2-$3$1"+JP+(tl(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~l$(t,"stretch")?vne(Ii(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(tl(t,e+1)!==115)break;case 6444:switch(tl(t,xh(t)-3-(~l$(t,"!important")&&10))){case 107:return Ii(t,":",":"+xi)+t;case 101:return Ii(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+xi+(tl(t,14)===45?"inline-":"")+"box$3$1"+xi+"$2$3$1"+Sl+"$2box$3")+t}break;case 5936:switch(tl(t,e+11)){case 114:return xi+t+Sl+Ii(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return xi+t+Sl+Ii(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return xi+t+Sl+Ii(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return xi+t+Sl+t+t}return t}var TAe=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case $6:e.return=vne(e.value,e.length);break;case dne:return bE([JT(e,{value:Ii(e.value,"@","@"+xi)})],i);case F6:if(e.length)return sAe(e.props,function(s){switch(iAe(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bE([JT(e,{props:[Ii(s,/:(read-\w+)/,":"+JP+"$1")]})],i);case"::placeholder":return bE([JT(e,{props:[Ii(s,/:(plac\w+)/,":"+xi+"input-$1")]}),JT(e,{props:[Ii(s,/:(plac\w+)/,":"+JP+"$1")]}),JT(e,{props:[Ii(s,/:(plac\w+)/,Sl+"input-$1")]})],i)}return""})}},AAe=[TAe],wAe=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||AAe,s={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),S=1;S<b.length;S++)s[b[S]]=!0;o.push(v)});var l,u=[SAe,EAe];{var c,d=[pAe,mAe(function(v){c.insert(v)})],f=gAe(u.concat(i,d)),h=function(b){return bE(fAe(b),f)};l=function(b,S,A,w){c=A,h(b?b+"{"+S.styles+"}":S.styles),w&&(g.inserted[S.name]=!0)}}var g={key:n,sheet:new XTe({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:l};return g.sheet.hydrate(o),g};function lu(){return lu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lu.apply(null,arguments)}const ENt=Object.freeze(Object.defineProperty({__proto__:null,get default(){return lu}},Symbol.toStringTag,{value:"Module"}));var yne={exports:{}},Wi={};/** @license React v16.13.1
19 * react-is.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Bo=typeof Symbol=="function"&&Symbol.for,U6=Bo?Symbol.for("react.element"):60103,V6=Bo?Symbol.for("react.portal"):60106,JD=Bo?Symbol.for("react.fragment"):60107,ek=Bo?Symbol.for("react.strict_mode"):60108,tk=Bo?Symbol.for("react.profiler"):60114,nk=Bo?Symbol.for("react.provider"):60109,rk=Bo?Symbol.for("react.context"):60110,H6=Bo?Symbol.for("react.async_mode"):60111,ik=Bo?Symbol.for("react.concurrent_mode"):60111,sk=Bo?Symbol.for("react.forward_ref"):60112,ak=Bo?Symbol.for("react.suspense"):60113,_Ae=Bo?Symbol.for("react.suspense_list"):60120,ok=Bo?Symbol.for("react.memo"):60115,lk=Bo?Symbol.for("react.lazy"):60116,CAe=Bo?Symbol.for("react.block"):60121,xAe=Bo?Symbol.for("react.fundamental"):60117,IAe=Bo?Symbol.for("react.responder"):60118,OAe=Bo?Symbol.for("react.scope"):60119;function Fc(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case U6:switch(t=t.type,t){case H6:case ik:case JD:case tk:case ek:case ak:return t;default:switch(t=t&&t.$$typeof,t){case rk:case sk:case lk:case ok:case nk:return t;default:return e}}case V6:return e}}}function bne(t){return Fc(t)===ik}Wi.AsyncMode=H6;Wi.ConcurrentMode=ik;Wi.ContextConsumer=rk;Wi.ContextProvider=nk;Wi.Element=U6;Wi.ForwardRef=sk;Wi.Fragment=JD;Wi.Lazy=lk;Wi.Memo=ok;Wi.Portal=V6;Wi.Profiler=tk;Wi.StrictMode=ek;Wi.Suspense=ak;Wi.isAsyncMode=function(t){return bne(t)||Fc(t)===H6};Wi.isConcurrentMode=bne;Wi.isContextConsumer=function(t){return Fc(t)===rk};Wi.isContextProvider=function(t){return Fc(t)===nk};Wi.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===U6};Wi.isForwardRef=function(t){return Fc(t)===sk};Wi.isFragment=function(t){return Fc(t)===JD};Wi.isLazy=function(t){return Fc(t)===lk};Wi.isMemo=function(t){return Fc(t)===ok};Wi.isPortal=function(t){return Fc(t)===V6};Wi.isProfiler=function(t){return Fc(t)===tk};Wi.isStrictMode=function(t){return Fc(t)===ek};Wi.isSuspense=function(t){return Fc(t)===ak};Wi.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===JD||t===ik||t===tk||t===ek||t===ak||t===_Ae||typeof t=="object"&&t!==null&&(t.$$typeof===lk||t.$$typeof===ok||t.$$typeof===nk||t.$$typeof===rk||t.$$typeof===sk||t.$$typeof===xAe||t.$$typeof===IAe||t.$$typeof===OAe||t.$$typeof===CAe)};Wi.typeOf=Fc;yne.exports=Wi;var PAe=yne.exports,j6=PAe,RAe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},LAe={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},DAe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sne={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z6={};z6[j6.ForwardRef]=DAe;z6[j6.Memo]=Sne;function Nz(t){return j6.isMemo(t)?Sne:z6[t.$$typeof]||RAe}var kAe=Object.defineProperty,NAe=Object.getOwnPropertyNames,Mz=Object.getOwnPropertySymbols,MAe=Object.getOwnPropertyDescriptor,FAe=Object.getPrototypeOf,Fz=Object.prototype;function Ene(t,e,n){if(typeof e!="string"){if(Fz){var r=FAe(e);r&&r!==Fz&&Ene(t,r,n)}var i=NAe(e);Mz&&(i=i.concat(Mz(e)));for(var s=Nz(t),a=Nz(e),o=0;o<i.length;++o){var l=i[o];if(!LAe[l]&&!(n&&n[l])&&!(a&&a[l])&&!(s&&s[l])){var u=MAe(e,l);try{kAe(t,l,u)}catch{}}}}return t}var $Ae=Ene;const BAe=pi($Ae);var UAe=!0;function VAe(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var Tne=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||UAe===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},Ane=function(e,n,r){Tne(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+i:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function HAe(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var jAe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
25idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},zAe=/[A-Z]|^ms/g,GAe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wne=function(e){return e.charCodeAt(1)===45},$z=function(e){return e!=null&&typeof e!="boolean"},VM=mne(function(t){return wne(t)?t:t.replace(zAe,"-$&").toLowerCase()}),Bz=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(GAe,function(r,i,s){return Ih={name:i,styles:s,next:Ih},i})}return jAe[e]!==1&&!wne(e)&&typeof n=="number"&&n!==0?n+"px":n};function h_(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Ih={name:i.name,styles:i.styles,next:Ih},i.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Ih={name:a.name,styles:a.styles,next:Ih},a=a.next;var o=s.styles+";";return o}return WAe(t,e,n)}case"function":{if(t!==void 0){var l=Ih,u=n(t);return Ih=l,h_(t,e,u)}break}}var c=n;return c}function WAe(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h_(t,e,n[i])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var o=a;$z(o)&&(r+=VM(s)+":"+Bz(s,o)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&e==null)for(var l=0;l<a.length;l++)$z(a[l])&&(r+=VM(s)+":"+Bz(s,a[l])+";");else{var u=h_(t,e,a);switch(s){case"animation":case"animationName":{r+=VM(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var Uz=/label:\s*([^\s;{]+)\s*(;|$)/g,Ih;function G6(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,i="";Ih=void 0;var s=t[0];if(s==null||s.raw===void 0)r=!1,i+=h_(n,e,s);else{var a=s;i+=a[0]}for(var o=1;o<t.length;o++)if(i+=h_(n,e,t[o]),r){var l=s;i+=l[o]}Uz.lastIndex=0;for(var u="",c;(c=Uz.exec(i))!==null;)u+="-"+c[1];var d=HAe(i)+u;return{name:d,styles:i,next:Ih}}var qAe=function(e){return e()},_ne=o$.useInsertionEffect?o$.useInsertionEffect:!1,KAe=_ne||qAe,Vz=_ne||$.useLayoutEffect,Cne=$.createContext(typeof HTMLElement<"u"?wAe({key:"css"}):null);Cne.Provider;var xne=function(e){return $.forwardRef(function(n,r){var i=$.useContext(Cne);return e(n,i,r)})},Ine=$.createContext({}),kC={}.hasOwnProperty,c$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",W6=function(e,n){var r={};for(var i in n)kC.call(n,i)&&(r[i]=n[i]);return r[c$]=e,r},YAe=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return Tne(n,r,i),KAe(function(){return Ane(n,r,i)}),null},ZAe=xne(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[c$],s=[r],a="";typeof t.className=="string"?a=VAe(e.registered,s,t.className):t.className!=null&&(a=t.className+" ");var o=G6(s,void 0,$.useContext(Ine));a+=e.key+"-"+o.name;var l={};for(var u in t)kC.call(t,u)&&u!=="css"&&u!==c$&&(l[u]=t[u]);return l.className=a,n&&(l.ref=n),$.createElement($.Fragment,null,$.createElement(YAe,{cache:e,serialized:o,isStringTag:typeof i=="string"}),$.createElement(i,l))}),q6=ZAe,Dn=t1.Fragment,I=function(e,n,r){return kC.call(n,"css")?t1.jsx(q6,W6(e,n),r):t1.jsx(e,n,r)},be=function(e,n,r){return kC.call(n,"css")?t1.jsxs(q6,W6(e,n),r):t1.jsxs(e,n,r)};function Bu(t){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bu(t)}function qf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function QAe(t,e){if(Bu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function One(t){var e=QAe(t,"string");return Bu(e)=="symbol"?e:e+""}function Hz(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,One(r.key),r)}}function Kf(t,e,n){return e&&Hz(t.prototype,e),n&&Hz(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function hg(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}
25function r1(t,e){return r1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},r1(t,e)}function uk(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r1(t,e)}function NC(t,e){if(e&&(Bu(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hg(t)}function $f(t){return $f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$f(t)}function ip(t,e,n){return(e=One(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pne(t){if(Array.isArray(t))return t}function XAe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jz(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Rne(t,e){if(t){if(typeof t=="string")return jz(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jz(t,e):void 0}}function Lne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JAe(t){return Pne(t)||XAe(t)||Rne(t)||Lne()}function zz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zz(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ewe={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,n){console&&console[e]&&console[e].apply(console,n)}},twe=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};qf(this,t),this.init(e,n)}return Kf(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||ewe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,s){return s&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new t(this.logger,Gz(Gz({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new t(this.logger,n)}}]),t}(),Nh=new twe,Tv=function(){function t(){qf(this,t),this.observers={}}return Kf(t,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(s){i.observers[s]=i.observers[s]||[],i.observers[s].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),t}();function eA(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function Wz(t){return t==null?"":""+t}function nwe(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function K6(t,e,n){function r(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!t||typeof t=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var a=r(s.shift());!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return i()?{}:{obj:t,k:r(s.shift())}}function qz(t,e,n){var r=K6(t,e,Object),i=r.obj,s=r.k;i[s]=n}function rwe(t,e,n,r){var i=K6(t,e,Object),s=i.obj,a=i.k;s[a]=s[a]||[],s[a].push(n)}function eR(t,e){var n=K6(t,e),r=n.obj,i=n.k;if(r)return r[i]}function Kz(t,e,n){var r=eR(t,n);return r!==void 0?r:eR(e,n)}function Dne(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="str
26ing"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Dne(t[r],e[r],n):t[r]=e[r]);return t}function Xb(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var iwe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function swe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return iwe[e]}):t}var ck=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,awe=[" ",",","?","!",";"];function owe(t,e,n){e=e||"",n=n||"";var r=awe.filter(function(o){return e.indexOf(o)<0&&n.indexOf(o)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(o){return o==="?"?"\\?":o}).join("|"),")")),s=!i.test(t);if(!s){var a=t.indexOf(n);a>0&&!i.test(t.substring(0,a))&&(s=!0)}return s}function Yz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function AI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yz(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lwe(t){var e=uwe();return function(){var r=$f(t),i;if(e){var s=$f(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return NC(this,i)}}function uwe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kne(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),i=t,s=0;s<r.length;++s){if(!i||typeof i[r[s]]=="string"&&s+1<r.length)return;if(i[r[s]]===void 0){for(var a=2,o=r.slice(s,s+a).join(n),l=i[o];l===void 0&&r.length>s+a;)a++,o=r.slice(s,s+a).join(n),l=i[o];if(l===void 0)return;if(l===null)return null;if(e.endsWith(o)){if(typeof l=="string")return l;if(o&&typeof l[o]=="string")return l[o]}var u=r.slice(s+a).join(n);return u?kne(l,u,n):void 0}i=i[r[s]]}return i}}var cwe=function(t){uk(n,t);var e=lwe(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return qf(this,n),i=e.call(this),ck&&Tv.call(hg(i)),i.data=r||{},i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Kf(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var s=this.options.ns.indexOf(i);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,s];a&&typeof a!="string"&&(c=c.concat(a)),a&&typeof a=="string"&&(c=c.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(c=i.split("."));var d=eR(this.data,c);return d||!u||typeof a!="string"?d:kne(this.data&&this.data[i]&&this.data[i][s],a,l)}},{key:"addResource",value:function(i,s,a,o){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var c=[i,s];a&&(c=c.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(c=i.split("."),o=s,s=c[1]),this.addNamespaces(s),qz(this.data,c,o),l.silent||this.emit("added",i,s,a,o)}},{key:"addResources",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,s,l,a[l],{silent:!0});
26o.silent||this.emit("added",i,s,a)}},{key:"addResourceBundle",value:function(i,s,a,o,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,s];i.indexOf(".")>-1&&(c=i.split("."),o=a,a=s,s=c[1]),this.addNamespaces(s);var d=eR(this.data,c)||{};o?Dne(d,a,l):d=AI(AI({},d),a),qz(this.data,c,d),u.silent||this.emit("added",i,s,a)}},{key:"removeResourceBundle",value:function(i,s){this.hasResourceBundle(i,s)&&delete this.data[i][s],this.removeNamespaces(s),this.emit("removed",i,s)}},{key:"hasResourceBundle",value:function(i,s){return this.getResource(i,s)!==void 0}},{key:"getResourceBundle",value:function(i,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?AI(AI({},{}),this.getResource(i,s)):this.getResource(i,s)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var s=this.getDataByLanguage(i),a=s&&Object.keys(s)||[];return!!a.find(function(o){return s[o]&&Object.keys(s[o]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Tv),Nne={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,s){var a=this;return e.forEach(function(o){a.processors[o]&&(n=a.processors[o].process(n,r,i,s))}),n}};function Zz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zz(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dwe(t){var e=fwe();return function(){var r=$f(t),i;if(e){var s=$f(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return NC(this,i)}}function fwe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Qz={},Xz=function(t){uk(n,t);var e=dwe(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return qf(this,n),i=e.call(this),ck&&Tv.call(hg(i)),nwe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
26i18nFormat","utils"],r,hg(i)),i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Nh.create("translator"),i}return Kf(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,s);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,s){var a=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,c=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!owe(i,a,o);if(u&&!c){var d=i.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:i,namespaces:l};var f=i.split(a);(a!==o||a===o&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),i=f.join(o)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,s,a){var o=this;if(Bu(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],s),d=c.key,f=c.namespaces,h=f[f.length-1],g=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(v){var b=s.nsSeparator||this.options.nsSeparator;return l?(S.res="".concat(h).concat(b).concat(d),S):"".concat(h).concat(b).concat(d)}return l?(S.res=d,S):d}var S=this.resolve(i,s),A=S&&S.res,w=S&&S.usedKey||d,x=S&&S.exactUsedKey||d,P=Object.prototype.toString.apply(A),N=["[object Number]","[object Function]","[object RegExp]"],k=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,U=!this.i18nFormat||this.i18nFormat.handleAsObject,H=typeof A!="string"&&typeof A!="boolean"&&typeof A!="number";if(U&&A&&H&&N.indexOf(P)<0&&!(typeof k=="string"&&P==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,A,zl(zl({},s),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(S.res=B,S):B}if(u){var q=P==="[object Array]",Z=q?[]:{},C=q?x:w;for(var L in A)if(Object.prototype.hasOwnProperty.call(A,L)){var V="".concat(C).concat(u).concat(L);Z[L]=this.translate(V,zl(zl({},s),{joinArrays:!1,ns:f})),Z[L]===V&&(Z[L]=A[L])}A=Z}}else if(U&&typeof k=="string"&&P==="[object Array]")A=A.join(k),A&&(A=this.extendTranslation(A,i,s,a));else{var j=!1,X=!1,G=s.count!==void 0&&typeof s.count!="string",ie=n.hasDefaultValue(s),ae=G?this.pluralResolver.getSuffix(g,s.count,s):"",ue=s["defaultValue".concat(ae)]||s.defaultValue;!this.isValidLookup(A)&&ie&&(j=!0,A=ue),this.isValidLookup(A)||(X=!0,A=d);var Q=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,de=Q&&X?void 0:A,le=ie&&ue!==A&&this.options.updateMissing;if(X||j||le){if(this.logger.log(le?"updateKey":"missingKey",g,h,d,le?ue:A),u){var ye=this.resolve(d,zl(zl({},s),{},{keySeparator:!1}));ye&&ye.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var fe=[],We=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&We&&We[0])for(var Le=0;Le<We.length;Le++)fe.push(We[Le]);else this.options.saveMissingTo==="all"?fe=this.languageUtils.toResolveHierarchy(s.lng||this.language):fe.push(s.lng||this.language);var Ve=function(Et,ne,Ze){var lt=ie&&Ze!==A?Ze:de;o.options.missingKeyHandler?o.options.missingKeyHandler(Et,h,ne,lt,le,s):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(Et,h,ne,lt,le,s),o.emit("missingKey",Et,h,ne,A)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?fe.forEach(function(at){o.pluralResolver.getSuffixes(at,s).forEac
26h(function(Et){Ve([at],d+Et,s["defaultValue".concat(Et)]||ue)})}):Ve(fe,d,ue))}A=this.extendTranslation(A,i,s,S,a),X&&A===d&&this.options.appendNamespaceToMissingKey&&(A="".concat(h,":").concat(d)),(X||j)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?A=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,j?A:void 0):A=this.options.parseMissingKeyHandler(A))}return l?(S.res=A,S):A}},{key:"extendTranslation",value:function(i,s,a,o,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,zl(zl({},this.options.interpolation.defaultVariables),a),o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(zl(zl({},a),{interpolation:zl(zl({},this.options.interpolation),a.interpolation)}));var c=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(c){var f=i.match(this.interpolator.nestingRegexp);d=f&&f.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=zl(zl({},this.options.interpolation.defaultVariables),h)),i=this.interpolator.interpolate(i,h,a.lng||this.language,a),c){var g=i.match(this.interpolator.nestingRegexp),v=g&&g.length;d<v&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var A=arguments.length,w=new Array(A),x=0;x<A;x++)w[x]=arguments[x];return l&&l[0]===w[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(w[0]," in key: ").concat(s[0])),null):u.translate.apply(u,w.concat([s]))},a)),a.interpolation&&this.interpolator.reset()}var b=a.postProcess||this.options.postProcess,S=typeof b=="string"?[b]:b;return i!=null&&S&&S.length&&a.applyPostProcessor!==!1&&(i=Nne.handle(S,i,s,this.options&&this.options.postProcessPassResolved?zl({i18nResolved:o},a):a,this)),i}},{key:"resolve",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,l,u,c,d;
26return typeof i=="string"&&(i=[i]),i.forEach(function(f){if(!s.isValidLookup(o)){var h=s.extractFromKey(f,a),g=h.key;l=g;var v=h.namespaces;s.options.fallbackNS&&(v=v.concat(s.options.fallbackNS));var b=a.count!==void 0&&typeof a.count!="string",S=b&&!a.ordinal&&a.count===0&&s.pluralResolver.shouldUseIntlApi(),A=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",w=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);v.forEach(function(x){s.isValidLookup(o)||(d=x,!Qz["".concat(w[0],"-").concat(x)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(d)&&(Qz["".concat(w[0],"-").concat(x)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(w.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(function(P){if(!s.isValidLookup(o)){c=P;var N=[g];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(N,g,P,x,a);else{var k;b&&(k=s.pluralResolver.getSuffix(P,a.count,a));var U="".concat(s.options.pluralSeparator,"zero");if(b&&(N.push(g+k),S&&N.push(g+U)),A){var H="".concat(g).concat(s.options.contextSeparator).concat(a.context);N.push(H),b&&(N.push(H+k),S&&N.push(H+U))}}for(var B;B=N.pop();)s.isValidLookup(o)||(u=B,o=s.getResource(P,x,B,a))}}))})}}),{res:o,usedKey:l,exactUsedKey:u,usedLng:c,usedNS:d}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,s,a,o):this.resourceStore.getResource(i,s,a,o)}}],[{key:"hasDefaultValue",value:function(i){var s="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s===a.substring(0,s.length)&&i[a]!==void 0)return!0;return!1}}]),n}(Tv);function HM(t){return t.charAt(0).toUpperCase()+t.slice(1)}var hwe=function(){function t(e){qf(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Nh.create("languageUtils")}return Kf(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=HM(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=HM(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=HM(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(s){if(!i){var a=r.formatLanguageCode(s);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(s){if(!i){var a=r.getLanguagePartFromCode(s);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(o){if(o.indexOf(a)===0)return o}
26)}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,s=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],o=function(u){u&&(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(n))):typeof n=="string"&&o(this.formatLanguageCode(n)),s.forEach(function(l){a.indexOf(l)<0&&o(i.formatLanguageCode(l))}),a}}]),t}(),pwe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],gwe={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},mwe=["v1","v2","v3"],Jz={zero:0,one:1,two:2,few:3,many:4,other:5};function vwe(){var t={};return pwe.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:gwe[e.fc]}})}),t}var ywe=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};qf(this,t),this.languageUtils=e,this.options=n,this.logger=Nh.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=v
26we()}return Kf(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(s){return"".concat(r).concat(s)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,i);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(a,o){return Jz[a]-Jz[o]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):s.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(n,i);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(r)):this.getSuffixRetroCompatible(s,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,s=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[s];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var o=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?o():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!mwe.includes(this.options.compatibilityJSON)}}]),t}();function eG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eG(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eG(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var bwe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qf(this,t),this.logger=Nh.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return Kf(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:swe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Xb(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Xb(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Xb(r.nestingPrefix):r.nestingPrefixEscaped||Xb("$t("),this.nestingSuffix=r.nestingSuffix?Xb(r.nestingSuffix):r.nestingSuffixEscaped||Xb(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix
26);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,s){var a=this,o,l,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(b){return b.replace(/\$/g,"$$$$")}var f=function(S){if(S.indexOf(a.formatSeparator)<0){var A=Kz(r,c,S);return a.alwaysFormat?a.format(A,void 0,i,Zd(Zd(Zd({},s),r),{},{interpolationkey:S})):A}var w=S.split(a.formatSeparator),x=w.shift().trim(),P=w.join(a.formatSeparator).trim();return a.format(Kz(r,c,x),P,i,Zd(Zd(Zd({},s),r),{},{interpolationkey:x}))};this.resetRegExp();var h=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(S){return d(S)}},{regex:this.regexp,safeValue:function(S){return a.escapeValue?d(a.escape(S)):d(S)}}];return v.forEach(function(b){for(u=0;o=b.regex.exec(n);){var S=o[1].trim();if(l=f(S),l===void 0)if(typeof h=="function"){var A=h(n,o,s);l=typeof A=="string"?A:""}else if(s&&s.hasOwnProperty(S))l="";else if(g){l=o[0];continue}else a.logger.warn("missed to pass in variable ".concat(S," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=Wz(l));var w=b.safeValue(l);if(n=n.replace(o[0],w),g?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=o[0].length):b.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,l=Zd({},s);l.applyPostProcessor=!1,delete l.defaultValue;function u(h,g){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var b=h.split(new RegExp("".concat(v,"[ ]*{"))),S="{".concat(b[1]);h=b[0],S=this.interpolate(S,l);var A=S.match(/'/g),w=S.match(/"/g);(A&&A.length%2===0&&!w||w.length%2!==0)&&(S=S.replace(/'/g,'"'));try{l=JSON.parse(S),g&&(l=Zd(Zd({},g),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),x),"".concat(h).concat(v).concat(S)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(n);){var c=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var f=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=f.shift(),c=f,d=!0}if(o=r(u.call(this,a[1].trim(),l),l),o&&a[0]===n&&typeof o!="string")return o;typeof o!="string"&&(o=Wz(o)),o||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),o=""),d&&(o=c.reduce(function(h,g){return i.format(h,g,s.lng,Zd(Zd({},s),{},{interpolationkey:a[1].trim()}))},o.trim())),n=n.replace(a[0],o),this.regexp.lastIndex=0}return n}}]),t}();function tG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function om(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tG(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tG(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Swe(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var s=i.split(";");s.forEach(function(a){if(a){var o=a.split(":"),l=JAe(o),u=l[0],c=l.slice(1),d=c.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=d),d==="false"&&(n[u.trim()]=!1),d==="true"&&(n[u.trim()]=!0),isNaN(d)||(n[u.trim()]=parseInt(d,10))}})}}return{formatName:e,formatOptions:n}}function Jb(t){var e={};return function(r,i,s){var a=i+JSON.stringify(s),o=e[a];return o||(o=t(i,s),e[a]=o),o(r)}}var Ewe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qf(this,t),this.logger=Nh.create("formatter"),this.options=e,this.formats={number:Jb(function(n,r){var i=new Intl.NumberFormat(n,r);return function(s){return i.format(s)}}),currency:Jb(function(n,r){var i=new Intl.NumberFormat(n,om(om({},r),{},{style:"currency"}));return function(s){return i.format(s)}}),datetime:Jb(function(n,r){var i=new Intl.DateTimeFormat(n,om({},r));return function(s){return i.format(s)}}),relativetime:Jb(function(n,r){var i=new Intl.RelativeTimeFormat(n,om({},r));return function(s){return i.format(s,r.range||"day")}}),list:Jb(function(n,r){var i=new Intl.ListFormat(n,om({},r));return function(s){return i.format(s)}})},this.init(e)}return Kf(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Jb(r)}},{key:"format",value:function(n,r,i,s){var a=this,o=r.split(this.formatSeparator),l=o.reduce(function(u,c){var d=Swe(c),f=d.formatName,h=d.formatOptions;if(a.formats[f]){var g=u;try{var v=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},b=v.locale||v.lng||s.locale||s.lng||i;g=a.formats[f](u,b,om(om(om({},h),s),v))}catch(S){a.logger.warn(S)}return g}else a.logger.warn("there was no format function for ".concat(f));return u},n);return l}}]),t}();function nG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rG(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
26e%2?nG(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nG(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Twe(t){var e=Awe();return function(){var r=$f(t),i;if(e){var s=$f(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return NC(this,i)}}function Awe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wwe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var _we=function(t){uk(n,t);var e=Twe(n);function n(r,i,s){var a,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return qf(this,n),a=e.call(this),ck&&Tv.call(hg(a)),a.backend=r,a.store=i,a.services=s,a.languageUtils=s.languageUtils,a.options=o,a.logger=Nh.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=o.maxParallelReads||10,a.readingCalls=0,a.maxRetries=o.maxRetries>=0?o.maxRetries:5,a.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(s,o.backend,o),a}return Kf(n,[{key:"queueLoad",value:function(i,s,a,o){var l=this,u={},c={},d={},f={};return i.forEach(function(h){var g=!0;s.forEach(function(v){var b="".concat(h,"|").concat(v);!a.reload&&l.store.hasResourceBundle(h,v)?l.state[b]=2:l.state[b]<0||(l.state[b]===1?c[b]===void 0&&(c[b]=!0):(l.state[b]=1,g=!1,c[b]===void 0&&(c[b]=!0),u[b]===void 0&&(u[b]=!0),f[v]===void 0&&(f[v]=!0)))}),g||(d[h]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(i,s,a){var o=i.split("|"),l=o[0],u=o[1];s&&this.emit("failedLoading",l,u,s),a&&this.store.addResourceBundle(l,u,a),this.state[i]=s?-1:2;var c={};this.queue.forEach(function(d){rwe(d.loaded,[l],u),wwe(d,i),s&&d.errors.push(s),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){c[f]||(c[f]={});var h=d.loaded[f];h.length&&h.forEach(function(g){c[f][g]===void 0&&(c[f][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,s,a){var o=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:s,fcName:a,tried:l,wait:u,callback:c});return}return this.readingCalls++,this.backend[a](i,s,function(d,f){if(o.readingCalls--,o.waitingReads.length>0){var h=o.waitingReads.shift();o.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&f&&l<o.maxRetries){setTimeout(function(){o.read.call(o,i,s,a,l+1,u*2,c)},u);return}c(d,f)})}},{key:"prepareLoading",value:function(i,s){var a=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof s=="string"&&(s=[s]);var u=this.queueLoad(i,s,o,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(c){a.loadOne(c)})}},{key:"load",value:function(i,s,a){this.prepareLoading(i,s,{},a)}},{key:"reload",value:function(i,s,a){this.prepareLoading(i,s,{reload:!0},a)}},{key:"loadOne",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=i.split("|"),l=o[0],u=o[1];this.read(l,u,"read",void 0,void 0,function(c,d){c&&s.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),c),!c&&d&&s.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),d),s.loaded(i,c,d)})}},{key:"saveMissing",value:function(i,s,a,o,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(i,s,a,o,null,rG(rG({},u),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],s,a,o))}}]),n}(Tv);function Cwe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if(Bu(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="str
26ing"&&(n.tDescription=e[2]),Bu(e[2])==="object"||Bu(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function iG(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function sG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sG(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sG(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function xwe(t){var e=Iwe();return function(){var r=$f(t),i;if(e){var s=$f(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return NC(this,i)}}function Iwe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wI(){}function Owe(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var tR=function(t){uk(n,t);var e=xwe(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(qf(this,n),r=e.call(this),ck&&Tv.call(hg(r)),r.options=iG(i),r.services={},r.logger=Nh,r.modules={external:[]},Owe(hg(r)),s&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,s),NC(r,hg(r));setTimeout(function(){r.init(i,s)},0)}return r}return Kf(n,[{key:"init",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(a=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var o=Cwe();this.options=rh(rh(rh({},o),this.options),iG(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=rh(rh({},o.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(S){return S?typeof S=="function"?new S:S:null}if(!this.options.isClone){this.modules.logger?Nh.init(l(this.modules.logger),this.options):Nh.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Ewe);var c=new hwe(this.options);this.store=new cwe(this.options.resources,this.options);var d=this.services;d.logger=Nh,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new ywe(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new bwe(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new _we(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(S){for(var A=arguments.length,w=new Array(A>1?A-1:0),x=1;x<A;x++)w[x-1]=arguments[x];
26i.emit.apply(i,[S].concat(w))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Xz(this.services,this.options),this.translator.on("*",function(S){for(var A=arguments.length,w=new Array(A>1?A-1:0),x=1;x<A;x++)w[x-1]=arguments[x];i.emit.apply(i,[S].concat(w))}),this.modules.external.forEach(function(S){S.init&&S.init(i)})}if(this.format=this.options.interpolation.format,a||(a=wI),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(S){i[S]=function(){var A;return(A=i.store)[S].apply(A,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(S){i[S]=function(){var A;return(A=i.store)[S].apply(A,arguments),i}});var v=eA(),b=function(){var A=function(x,P){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(P),a(x,P)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return A(null,i.t.bind(i));i.changeLanguage(i.options.lng,A)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),v}},{key:"loadResources",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wI,o=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(o=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return o();var u=[],c=function(h){if(h){var g=s.services.languageUtils.toResolveHierarchy(h);g.forEach(function(v){u.indexOf(v)<0&&u.push(v)})}};if(l)c(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return c(f)})}this.options.preload&&this.options.preload.forEach(function(f){return c(f)}),this.services.backendConnector.load(u,this.options.ns,function(f){!f&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),o(f)})}else o(null)}},{key:"reloadResources",value:function(i,s,a){var o=eA();return i||(i=this.languages),s||(s=this.options.ns),a||(a=wI),this.services.backendConnector.reload(i,s,function(l){o.resolve(),a(l)}),o}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Nne.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var s=0;s<this.languages.length;s++){var a=this.languages[s];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,s){var a=this;this.isLanguageChangingTo=i;var o=eA();this.emit("languageChanging",i);var l=function(f){a.language=f,a.languages=a.services.languageUtils.toResolveHierarchy(f),a.resolvedLanguage=void 0,a.setResolvedLanguage(f)},u=function(f,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,o.resolve(function(){return a.t.apply(a,arguments)}),s&&s(f,function(){return a.t.apply(a,arguments)})},c=function(f){!i&&!f&&a.services.languageDetector&&(f=[]);var h=typeof f=="string"?f:a.services.languageUtils.getBestMatchFromCodes(f);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(g){u(g,h)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(i),o}},{key:"getFixedT",value:function(i,s,a){var o=this,l=function u(c,d){var f;if(Bu(d)!=="object"){for(var h=arguments.length,g=new Array(h>2?h-2:0),v=2;v<h;v++)g[v-2]=arguments[v];f=o.options.overloadTranslationOptionHandler([c,d].concat(g))}else f=rh({},d);f.lng=f.lng||u.lng,f.lngs=f.lngs||u.lngs,f.ns=f.ns||u.ns,f.keyPrefix=f.keyPrefix||a||u.keyPrefix;var b=o.options.keySeparator||".",S=f.keyPrefix?"".concat(f.keyPrefix).concat(b).concat(c):c;return o.t(S,f)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=s,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
26if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var c=function(h,g){var v=s.services.backendConnector.state["".concat(h,"|").concat(g)];return v===-1||v===2};if(a.precheck){var d=a.precheck(this,c);if(d!==void 0)return d}return!!(this.hasResourceBundle(o,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(o,i)&&(!l||c(u,i)))}},{key:"loadNamespaces",value:function(i,s){var a=this,o=eA();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){o.resolve(),s&&s(l)}),o):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(i,s){var a=eA();typeof i=="string"&&(i=[i]);var o=this.options.preload||[],l=i.filter(function(u){return o.indexOf(u)<0});return l.length?(this.options.preload=o.concat(l),this.loadResources(function(u){a.resolve(),s&&s(u)}),a):(s&&s(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wI,o=rh(rh(rh({},this.options),s),{isClone:!0}),l=new n(o);(s.debug!==void 0||s.prefix!==void 0)&&(l.logger=l.logger.clone(s));var u=["store","services","language"];return u.forEach(function(c){l[c]=i[c]}),l.services=rh({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Xz(l.services,l.options),l.translator.on("*",function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),h=1;h<d;h++)f[h-1]=arguments[h];l.emit.apply(l,[c].concat(f))}),l.init(o,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Tv);ip(tR,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new tR(t,e)});var si=tR.createInstance();si.createInstance=tR.createInstance;si.createInstance;si.init;si.loadResources;si.reloadResources;var Pwe=si.use;si.changeLanguage;si.getFixedT;var Qp=si.t;si.exists;si.setDefaultNamespace;si.hasLoadedNamespace;si.loadNamespaces;si.loadLanguages;var Rwe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Lwe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Dwe=function(e){return Lwe[e]},kwe=function(e){return e.replace(Rwe,Dwe)};function aG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oG(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aG(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aG(Object(n)).forEac
26h(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var d$={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:kwe},Mne,Nwe=$.createContext();function Mwe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};d$=oG(oG({},d$),t)}function Fwe(){return d$}var $we=function(){function t(){qf(this,t),this.usedNamespaces={}}return Kf(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function Bwe(t){Mne=t}function Uwe(){return Mne}var Vwe={type:"3rdParty",init:function(e){Mwe(e.options.react),Bwe(e)}};function Hwe(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(t=console).warn.apply(t,n)}}var lG={};function f$(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&lG[e[0]]||(typeof e[0]=="string"&&(lG[e[0]]=new Date),Hwe.apply(void 0,e))}function uG(t,e,n){t.loadNamespaces(e,function(){if(t.isInitialized)n();else{var r=function i(){setTimeout(function(){t.off("initialized",i)},0),n()};t.on("initialized",r)}})}function jwe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var c=e.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(r,t)&&(!i||a(s,t)))}function zwe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return f$("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(s,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,t))return!1}}):jwe(t,e,n)}function Gwe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Wwe(t,e){return Pne(t)||Gwe(t,e)||Rne(t,e)||Lne()}function cG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jM(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cG(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cG(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var qwe=function(e,n){var r=$.useRef();return $.useEffect(function(){r.current=e},[e,n]),r.current};function dn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=$.useContext(Nwe)||{},i=r.i18n,s=r.defaultNS,a=n||i||Uwe();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new $we),!a){f$("You will need to pass in an i18next instance by using initReactI18next");var o=function(H){return Array.isArray(H)?H[H.length-1]:H},l=[o,{},!1];return l.t=o,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&f$("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=jM(jM(jM({},Fwe()),a.options.react),e),c=u.useSuspense,d=u.keyPrefix,f=s||a.options&&a.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(f);var h=(a.isInitialized||a.initializedStoreOnce)&&f.every(function(U){return zwe(U,a,u)});function g(){return a.getFixedT(null,u.nsMode==="fallback"?f:f[0],d)}var v=$.useState(g),b=Wwe(v,2),S=b[0],A=b[1],w=f.join(),x=qwe(w),P=$.useRef(!0);$.useEffect(function(){var U=u.bindI18n,H=u.bindI18nStore;P.current=!0,!h&&!c&&uG(a,f,function(){P.current&&A(g)}),h&&x&&x!==w&&P.current&&A(g);function B(){P.current&&A(g)}return U&&a&&a.on(U,B),H&&a&&a.store.on(H,B),function(){P.current=!1,U&&a&&U.split(" ").forEach(function(q){return a.off(q,B)}),H&&a&&H.split(" ").forEach(function(q){return a.store.off(q,B)})}},[a,w]);var N=$.useRef(!0);$.useEffect(function(){P.current&&!N.current&&A(g),N.current=!1},[a,d]);var k=[S,a,h];if(k.t=S,k.i18n=a,k.ready=h,h||!h&&!c)return k;throw new Promise(function(U){uG(a,f,function(){U()})})}const Kwe={accessibilityLabels:{countLabel:"{{index}} of {{total}}",duration:"Begins at {{from}}, ends at {{to}}"},accountScreen:{changePassword:"Change password",delete:"Delete account",deleteAccount:{body:"You will lose your preferences, your favorites, and downloads. Are you sure that you want to delete your account?",continue:"Yes, continue to delete",keep:"No, keep my account",title:"Delete account"},deleteAccountConfirmation:{body:"You still have 30 days to reactivate your account and recover your preferences.",confirm:"Ok, got it",reactivate:"Reactivate my account",title:"Sorry to see you go"},reactivateAccountConfirmation:{body:"Would you like to reactivate your account and recover your preferences?",confirm:"Reactivate my account",cancel:"Cancel",title:"It looks like your account is no longer active.",reactivated:"Your account has been reactivated"},emailInput:"Email",emailInputHint:"Edits user email",emailInputLabel:"User name",nameInput:"Name",nameInputHint:"Edits user name",nameInputLabel:"User email",password:"Password"},adPreferencesScreen:{title:"Preferences",personalizedAds:"Personalized Ads",manage:"Manage",body1:"Audacy will show you personalized ads based on your activity, liked content, and listening habits.",body2:"If you opt out of personalized ads you will c
26ontinue to see or hear ads, but they may not be relevant to your interests."},authState:{logInAgain:"Please log in again",sessionExpired:"Your session has expired",resetPassword:{success:"Password changed successfully. Please log in."}},"bottomTabBarButton.accessibilityHint":"Navigate to this section",carousel:{ariaLabels:{nextSlides:"Next slides",prevSlides:"Previous slides"}},"chapters.accessibilityPrefix":"Chapter","chapters.chapterTitle":"Part {{index}} {{separator}} {{fromToString}}","chapters.collapsible.seeAll":"See all chapters","chapters.collapsible.seeLess":"See less chapters","chapters.disabledDuringAd":"Selecting a chapter is disabled during an ad.","chapters.title":"Chapters","chapters.next":"Next Chapter","chapters.previous":"Previous Chapter","collapsible.readMore":"Read more","collapsible.readLess":"Read less","collapsible.visuallyExpand":"Visually expand description","collapsible.visuallyShrink":"Visually shrink description",entityHeader:{mainCtaText:"Listen",mainCtaPlayLabel:"Listen to {{title}}",mainCtaPauseLabel:"Pause",follow:"Follow",followSuccess:"Following {{title}}",followError:"Failed to follow {{title}}",goToStation:"Go to station website",unfollow:"Following",undoError:"Failed to undo action",unFollowError:"Failed to unfollow {{title}}",unfollowSuccess:"Unfollowed {{title}}"},"daysOfWeek.abbr.fri":"Fri","daysOfWeek.abbr.mon":"Mon","daysOfWeek.abbr.sat":"Sat","daysOfWeek.abbr.sun":"Sun","daysOfWeek.abbr.thu":"Thu","daysOfWeek.abbr.tue":"Tue","daysOfWeek.abbr.wed":"Wed","directoryScreen.podcasts.title":"All podcasts","directoryScreen.shows.title":"All shows","directoryScreen.stations.title":"All stations",drawer:{close:"Close"},durationSummary:{accessibility:{duration:"Duration: {{time}}.",hour:"{{count}} hour",hour_plural:"{{count}} hours",left:"left",minute:"{{count}} minute",minute_plural:"{{count}} minutes",progress:"Progress: {{time}} left.",published:"Published: {{time}}.",underMin:"Less than one minute"},chapter:"Chapter",downloaded:"Downloaded",episode:"Episode",partiallyPlayed:"{{time}} left",played:"Played",playing:"Playing ({{time}} left)",playingLive:"Playing",duration:"{{time}}",underMin:"<1m",unplayed:"Listen",playListPlaying:"Playing",playListItems:"{{items}} items",playlistDuration:"{{hours}}h {{minutes}}m"},featuredCard:{expiredError:"Content unavailable",goToShowPage:"Go to show page",goToEpisodePage:"Go to episode page",goToPodcastPage:"Go to podcast page",goToStationPage:"Go to station page",goToTeamPage:"Go to team page",goToLeaguePage:"Go to league page",goToGenrePage:"Go to genre page",goToPage:"Go to {{text}} page"},"episodeDetailScreen.overview.cta":"Listen",footer:{ariaLabels:{downloadApp:"Download App",external:"External Links",footer:"Footer",legal:"Legal",socialMedia:"Social Media"},copyright:"© {{year}} Audacy, Inc. All rights reserved."},global:{404:{title:"Oops!",errorText:"We can't seem to find the page you're looking for.",home:"Back to home"},ad:"Advertisement",contentUnavailable:"Content unavailable",back:"Back",cancel:"Cancel",close:"Close",discard:"Discard",done:"Done",edit:"Edit",error:"Something went wrong",follow:{followLabel:"Follow {{title}}",unfollowLabel:"Unfollow {{title}}"},getTheApp:"Get the app",hamburger:{close:"Close main navigation",open:"Open main navigation"},justNow:"Just Now",live:"Live",liveOnAudacy:"Live on Audacy",logIn:"Log in",logOut:"Log out",ok:"OK",onNow:"On now",pause:"Pause",remove:"Remove",removeAll:"Remove all",removeX:"Remove ({{quantity}})",unfollowX:"Unfollow ({{quantity}})",retry:"Retry",rewind:"Rewind",rewindSpeedControlsMessage:"Temporarily disabled while we improve performance. We’ll notify you when it has been re-enabled.",search:{close:"Close search",open:"Open search"},selectAll:"Select all",timeAgo:"{{time}} ago",expiresToday:"Expires today",expires:"Expires in {{days}}d",today:"Today",undo:"Undo",unsavedChanges:{message:"Are you sure you want to leave without saving it?",title:"Unsaved changes"},unselectAll:"Unselect all",yesterday:"Yesterday",askSpeakerToPlay:"Ask your smart speaker to play",onAudacy:"on Audacy"},"gridHelper.cta":"Toggle Grid Helper",helloWorld:"Hello world!",horizontalEntityCard:{eyebrow:{league:"League",topic:"Topic",station:"Station",podcast:"Podcast",team:"Team",show:"Show"},ariaLabel:{link:"View {{title}}",play:"Play {{title}}",resume:"Resume playing {{title}}"}
26,entityImage:{accessibilityHint:"Navigate to {{title}} detail page",optionsCta:{accessibilityHint:"Open options menu",accessibilityLabel:"Options"}}},legalScreen:{title:"Legal",termsOfUse:"Terms of Use",privacyPolicy:"Privacy Policy"},location:{cta:"Go to Settings",description:"Go to your phone's Settings, find the Audacy app and allow location to get content recommendations based on where you are.",header:`Listen to the best
27stations near you. No matter
28where you are.`},entity:{entitySummary:{live:{listen:"Listen",playingUntil:"Listen until {{time}}",resume:"Resume"}},liveNow:{header:"Live now",schedule:"See full schedule"},breadcrumb:{ariaLabel:"Navigate to {{text}}"},entityLabel:{collection:{playlist:{capitalized:"Playlist",lowercase:"playlist"}},podcast:{capitalized:"Podcast",lowercase:"podcast"},show:{capitalized:"Show",lowercase:"show"},station:{capitalized:"Station",lowercase:"station",connect:"Connect",callUs:"Call us"},topic:{capitalized:"Topic",lowercase:"topic"}},"entitySummary.live.playingUntil":"Listen until {{time}}",genreAndEntityLabel:"{{genre}} {{entityLabel}}"},optionsMenu:{addToQueue:"Add to queue",callStation:"Call Station",episodeDetails:"Episode details",follow:"Follow this {{parentEntityLabel}}",followStation:"Follow this station",followLabel:"Follow",unfollowLabel:"Unfollow",goToEpisode:"Go to episode page",goToLeague:"Go to league page",goToPodcast:"Go to podcast page",goToShow:"Go to show page",goToStationWebsite:"Go to station page",goToTeam:"Go to team page",goToTopic:"Go to {{text}} page",goToWebsite:"Go to station website",markAsPlayed:"Mark as played",removeFromQueue:"Remove from queue",share:"Share this...",shareClip:"Share this clip",shareEpisode:"Share this episode",shareLeague:"Share league",shareLive:"Share this live",sharePodcast:"Share this podcast",shareSegment:"Share this segment",shareShow:"Share this show",shareStation:"Share this station",shareGenre:"Share this genre",shareTeam:"Share this team",shareTopic:"Share this topic",subscribeToNewsletter:"Subscribe to newsletter",subscribeToStationNewsletter:"Subscribe to station newsletter",unfollow:"Unfollow this {{parentEntityLabel}}"},menuTooltip:{moreOptions:"More options"},modal:{close:"Close modal"},moduleRenderer:{renderError:"Could not load modules"},myAudioScreen:{dynamicHeader:{followed_one:"{{count}} followed",followed_other:"{{count}} followed",myQueue_one:"{{count}} item",myQueue_other:"{{count}} items",onDemands_one:"{{count}} item",onDemands_other:"{{count}} items",recents_one:"Last {{count}} day",recents_other:"Last {{count}} days",stations_one:"{{count}} station",stations_other:"{{count}} stations",topics_one:"{{count}} topic",topics_other:"{{count}} topics",playlists_one:"{{count}} playlist",playlists_other:"{{count}} playlists"},emptyState:{onDemands:"Your Podcasts & Shows will appear here",followed:"Your followed items will appear here",recents:"Your recently played items will appear here",stations:"Your Stations will appear here",topics:"Topics you follow will appear here",playlists:"Playlists you follow will appear here"},removedFromTab:"Removed from {{tab}}",removedFromTabError:"Failed to remove from {{tab}}",screenTitle:"My audio",tabs:{all:"All",myQueue:"My queue",followed:"Followed",onDemands:"Podcasts & Shows",recents:"Recent",stations:"Stations",topics:"Topics",playlists:"Playlists"},undoError:"Failed to undo action"},navigation:{addFreeButton:"Listen ad-free",ariaLabels:{main:"Main",logo:"Close menu and go to home page"},join:{button:"Join for free",buttonSm:"Start listening for free",description:"Listen to your favorite stations, shows and podcasts on all your devices. "},signIn:"Sign in",skipToMainContent:"Skip to main content"},notificationsScreen:{audacyUpdates:"Audacy updates & promotions",email:"Email",newEpisodes:{details:"Receive notifications for new episodes or live events for your podcasts and shows",title:"New episodes"},productNews:{details:"Receive notifications about news features and updates from Audacy",title:"Product news"},settings:"Notification Settings"},playerControls:{accessibilityLabels:{audioOutput:{connect:"Connect to a device",connected:"Connected to {{device}}"},forward:"Forward {{seconds}} seconds",openFullPlayer:"Open full-screen player",closeFullPlayer:"Close full-screen player",closeQueue:"Close queue",openQueue:"Open queue panel",fullPlayer:"Open full player",muteLabel:"Mute",options:"More options",pause:"Pause",play:"Play",queue:"Queue",rewind:"Rewind {{seconds}} seconds",skip:"Skip",skipToLive:"Back to live",liveLabel:"Live",stop:"Stop",thumbs:"Like",unmuteLabel:"Unmute",volumeMuted:"Volume muted",volumeUnmuted:"Volume unmuted",volumeSliderLabel:"Change volume",next:"Next",previous:"Previous"},labels:{scrubber:{live:"Live",changeProgress:"Change progress",ad:"Advertisement"},volumeSlider:{volume:"volume"}},toast:{errorPlaying:"Unable to load audio stream",skipMessage:"{{skips}}
28 skips remaining",skipReachedLimitMessage:"You can skip songs again in an hour.",thumbsUp:"We will recommend more like this."}},"player.regionLabel":"Audio player",playlistScreen:{featuredPlayable:"Listen",playlistCount:"{{count}} items",playlistDuration:"{{hours}}h {{minutes}}m"},playlistBar:{sectionTitle:"Playing from",upNext:"Up next:"},"podcastAllEpisodesScreen.loadMore.cta":"Load more episodes","podcastScreen.about.header":"About","podcastScreen.allEpisodes.header":"All episodes","podcastScreen.episodeList.header":"Episodes","podcastScreen.allEpisodes.numberOfEpisodes":"{{numberOfEpisodes}} episode","podcastScreen.allEpisodes.numberOfEpisodes_plural":"{{numberOfEpisodes}} episodes","podcastScreen.episodeList.episode.cta":"Episode detail","podcastScreen.episodeList.episode.cta.accessibilityHint":"Navigate to episode detail page","podcastScreen.episodeList.seeAll.cta":"See all episodes","podcastScreen.allEpisodes.newest":"Newest","podcastScreen.allEpisodes.oldest":"Oldest","podcastScreen.latestEpisode.cta":"Latest Episode","queueActions.addToQueue.toast.cta.title":"Undo","queueActions.addToQueue.toast.title":"Added to queue","queueActions.removeFromQueue.toast.cta.title":"Undo","queueActions.removeFromQueue.toast.title":"Removed from queue","queueActions.removeFromQueue.error.title":"Failed to remove from queue","queueOverlay.emptyQueue.subtitle":"Click the three dots near any content and add it to your queue to appear here later.","queueOverlay.emptyQueue.title":"Your queue is empty","queueOverlay.expired.button":"Ok, got it","queueOverlay.expired.text":"Some items were removed from your queue because they're no longer available.","queueOverlay.myQueue.title":"My queue","queueOverlay.myQueue.selectAll":"Select All","queueOverlay.myQueue.unselectAll":"Unselect All","queueOverlay.myQueue.selectAllPlayed":"Select All Played",registrationScreen:{terms:"By continuing, you agree to Audacy's <termsAndConditions /> and <privacyPolicy />. Please review carefully and check the box to continue.",privacyPolicy:"Privacy Policy",termsAndConditions:"Terms & Conditions",errorMessage:"An error occurred while logging in. Please try again.",errorTitle:"Error",formErrors:{invalidDate:"Date format must be MM/DD/YYYY",invalidName:"Invalid name format",invalidZipcode:"Valid zip codes must be exactly 5 or 10 characters",required:"This field is required",under13YearsOld:"We are unable to process your registration at this time."},getStartedButton:"Let's get started",stepOne:{firstName:{accessibilityHint:"Type your first name in this field",accessibilityLabel:"First name text input",label:"First name"},lastName:{accessibilityHint:"Type your last name in this field",accessibilityLabel:"Last name text input",label:"Last name"},title:"Please tell us your name"},stepTwo:{agreement:{and:"and ",intro:"By clicking on Join, you agree to Audacy's",optOut:"You agree updates about the app and promotions from Audacy. You can opt out any time. ",privacyPolicy:"Privacy Policy",termsAndConditions:"Terms & Conditions"},birthday:{accessibilityHint:"Type your date of birth in this field in the format MM/DD/YYYY",accessibilityLabel:"Date of birth text input",label:"Date of birth (MM/DD/YYYY)"},disclaimer:"This info allows us to provide more tailored recommendations and content.",gender:{accessibilityHint:"Select your gender from the dropdown",accessibilityLabel:"Gender dropdown input",label:"Gender",options:{female:"Female",male:"Male",nonBinary:"Non-binary",preferNotToSay:"Prefer not to say"}},title:"We're almost done",zipcode:{accessibilityHint:"Type your zip code in this field",accessibilityLabel:"Zipcode text input",label:"Zipcode"}},title:"Welcome to your own audio universe",welcomeContent:"All the music, news, sports and podcasts that matter to you. It's all here.",success:"Your account has been created"},"searchNavLandingScreen.filters":{all:"All",clips:"Clips",podcasts:"Podcasts",shows:"Shows",stations:"Stations",episodes:"Episodes",playlists:"Playlists",topics:"Topics"},"searchNavLandingScreen.header":"Browse suggestions","searchNavLandingScreen.header.button.back":"Back","searchNavLandingScreen.moreResults":"See more","searchNavLandingScreen.noResults":"No results. Try a new search.","searchNavLandingScreen.noTabResults":"Sorry, we couldn't find any {{type}} based on your search.","searchNavLandingScreen.overview.searchInput.accessibilityLabel":"Find stations, shows, podcasts, topics and more ","searchNavLandingScreen.overview.searchInput.button.clear":"Clear text","searchNavLandingScreen.overview.searchInput.placeholder":"Find stations, shows, topics","searchNavLandingScreen.results.header":"Browse suggestions","searchNavLandingScreen.screenTitle":"Search","searchNavLandingScreen.searchResultItem.accessibilityLabel":"{{title}}, {{subtitle}}, {{index}} of {{total}}",settingsScreen:{account:"Account",contact:"Contact Audacy",developer:"Developer",general:"General",location:{currentLocation:"Current Location",off:"Off",on:"On",settings:"In order to modify locations preferences you need to go to your phone's settings.",settingsCta:"Open Settings",subtitle:"We'll use your current location to show you content from the closest Audacy Market.",title:"Location"},logOutConfirmation:"Are you sure you want to log out of Audacy?",notifications:"Notifications",password:"Change password",privacy:"Privacy",security:"Security",source:"Open source items in app"},showScreen:{about:{header:"About"},latestEpisode:{cta:"Latest Episode"},liveNow:{footer:"See all segments",header:"Live now"},previousEpisode:{cta:{accessibilityHint:"Navigate to previous episode",title:"Episode detail"},header:{latest:"Latest episode",previous:"Previous episode"}}}
28,chapterScreen:{playingFrom:{header:"Playing from episode"}},"socialShare.errorMessage":"Cannot open share","sortable.list.itemDropped":"{{title}} dropped","sortable.list.itemGrabbed":"{{title}} grabbed","sortable.list.orderUpdated":"Order updated. {{title}} is now at position {{position}} of {{length}}","sortable.list.reorderHelpText":"To reorder items, activate item using the reorder button and use the arrow keys to reorder the list. Press escape to cancel the reordering.","sortable.listItem.reorder.label":"Reorder","sortable.list.announcements":{onDragStart:"Picked up draggable item {{title}}.",onDragOver:{success:"{{activeTitle}} was moved to position {{overIndex}}.",error:"{{activeTitle}} is no longer over a droppable area."},onDragEnd:{success:"{{activeTitle}} was dropped at position {{overIndex}}.",error:"{{activeTitle}} was dropped."},onDragCancel:"Dragging was cancelled. Draggable item {{activeTitle}} was dropped."},"sportsLeaguePage.header.cta":"Latest Coverage","sportsTeamPage.header.cta":"Latest Coverage","topicPage.header.cta":"Latest Coverage",stationScreen:{liveNow:{ctaSchedules:"See full schedule",currentLive:"Now",header:"Live now"},overview:{cta:"Listen Live",exclusive:{cta:"Listen"}},recentlyPlayed:{header:"Recently played",latest:"Latest",time:"{{timeString}} ago"},schedule:{header:"Schedule",empty:"No shows are scheduled.",labels:{continuesUntil:"Continues next day until {{endTime}}",endsAt:"Ends at {{endTime}}",onAirOnly:"Available via on-air broadcast only",startsAt:"Starts the day before at {{startTime}}"}},section:{featuredShows:{header:"Featured Shows"}}},"steps.accessibilityLabel":"Step {{currentStep}} of {{totalSteps}}","steps.continue":"Continue","steps.back.accessibilityLabel":"Navigate back","steps.label":"{{currentStep}} of {{totalSteps}}","steps.skip":"Skip","steps.skip.accessibilityLabel":"Skip step {{currentStep}}","tagScreen.overview.cta":"Latest Coverage","textBlock.readLess":"Read Less","textBlock.readMore":"Read More",toast:{ariaLabels:{close:"Close notification"},linkCopied:"Link copied to clipboard!"},"verticalEntityCard.entityImage.accessibilityHint":"Navigate to {{title}} detail page",songHistory:{playingNow:"Playing now",seeMore:"See recent song history",title:"Song History"},transcript:{adBlockTitle:"Advertisement in progress",adBlockSubTitle:"Transcripts will resume once advertisement concludes",openTranscript:"Open Transcript",processing:"Processing transcript..."}},Ywe={translation:Kwe};Pwe(Vwe).init({debug:!1,defaultNS:"translation",fallbackLng:"en",interpolation:{escapeValue:!1},lng:"en",ns:["translations"],resources:{en:Ywe}});var Fne={exports:{}},$c={},$ne={exports:{}},Bne={};/**
29 * @license React
30 * scheduler.production.min.js
31 *
32 * Copyright (c) Facebook, Inc. and its affiliates.
33 *
34 * This source code is licensed under the MIT license found in the
35 * LICENSE file in the root directory of this source tree.
36 */(function(t){function e(G,ie){var ae=G.length;G.push(ie);e:for(;0<ae;){var ue=ae-1>>>1,Q=G[ue];if(0<i(Q,ie))G[ue]=ie,G[ae]=Q,ae=ue;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var ie=G[0],ae=G.pop();if(ae!==ie){G[0]=ae;e:for(var ue=0,Q=G.length,de=Q>>>1;ue<de;){var le=2*(ue+1)-1,ye=G[le],fe=le+1,We=G[fe];if(0>i(ye,ae))fe<Q&&0>i(We,ye)?(G[ue]=We,G[fe]=ae,ue=fe):(G[ue]=ye,G[le]=ae,ue=le);else if(fe<Q&&0>i(We,ae))G[ue]=We,G[fe]=ae,ue=fe;else break e}}return ie}function i(G,ie){var ae=G.sortIndex-ie.sortIndex;
vendor: 10,207 bytes, lines 36-45
36return ae!==0?ae:G.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(G){for(var ie=n(u);ie!==null;){if(ie.callback===null)r(u);else if(ie.startTime<=G)r(u),ie.sortIndex=ie.expirationTime,e(l,ie);else break;ie=n(u)}}function x(G){if(v=!1,w(G),!g)if(n(l)!==null)g=!0,j(P);else{var ie=n(u);ie!==null&&X(x,ie.startTime-G)}}function P(G,ie){g=!1,v&&(v=!1,S(U),U=-1),h=!0;var ae=f;try{for(w(ie),d=n(l);d!==null&&(!(d.expirationTime>ie)||G&&!q());){var ue=d.callback;if(typeof ue=="function"){d.callback=null,f=d.priorityLevel;var Q=ue(d.expirationTime<=ie);ie=t.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(l)&&r(l),w(ie)}else r(l);d=n(l)}if(d!==null)var de=!0;else{var le=n(u);le!==null&&X(x,le.startTime-ie),de=!1}return de}finally{d=null,f=ae,h=!1}}var N=!1,k=null,U=-1,H=5,B=-1;function q(){return!(t.unstable_now()-B<H)}function Z(){if(k!==null){var G=t.unstable_now();B=G;var ie=!0;try{ie=k(!0,G)}finally{ie?C():(N=!1,k=null)}}else N=!1}var C;if(typeof A=="function")C=function(){A(Z)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,V=L.port2;L.port1.onmessage=Z,C=function(){V.postMessage(null)}}else C=function(){b(Z,0)};function j(G){k=G,N||(N=!0,C())}function X(G,ie){U=b(function(){G(t.unstable_now())},ie)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_continueExecution=function(){g||h||(g=!0,j(P))},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(G){switch(f){case 1:case 2:case 3:var ie=3;break;default:ie=f}var ae=f;f=ie;try{return G()}finally{f=ae}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(G,ie){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ae=f;f=G;try{return ie()}finally{f=ae}},t.unstable_scheduleCallback=function(G,ie,ae){var ue=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?ue+ae:ue):ae=ue,G){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ae+Q,G={id:c++,callback:ie,priorityLevel:G,startTime:ae,expirationTime:Q,sortIndex:-1},ae>ue?(G.sortIndex=ae,e(u,G),n(l)===null&&G===n(u)&&(v?(S(U),U=-1):v=!0,X(x,ae-ue))):(G.sortIndex=Q,e(l,G),g||h||(g=!0,j(P))),G},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(G){var ie=f;return function(){var ae=f;f=ie;try{return G.apply(this,arguments)}finally{f=ae}}}})(Bne);$ne.exports=Bne;var Zwe=$ne.exports;/**
37 * @license React
38 * react-dom.production.min.js
39 *
40 * Copyright (c) Facebook, Inc. and its affiliates.
41 *
42 * This source code is licensed under the MIT license found in the
43 * LICENSE file in the root directory of this source tree.
44 */var Qwe=$,kc=Zwe;function Gt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Une=new Set,p_={};function lb(t,e){i1(t,e),i1(t+"Capture",e)}function i1(t,e){for(p_[t]=e,t=0;t<e.length;t++)Une.add(e[t])}var bg=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h$=Object.prototype.hasOwnProperty,Xwe=/^[: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]*$/,dG={},fG={};function Jwe(t){return h$.call(fG,t)?!0:h$.call(dG,t)?!1:Xwe.test(t)?fG[t]=!0:(dG[t]=!0,!1)}function e_e(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function t_e(t,e,n,r){if(e===null||typeof e>"u"||e_e(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function hu(t,e,n,r,i,s,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}var ll={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ll[t]=new hu(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ll[e]=new hu(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ll[t]=new hu(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ll[t]=new hu(t,2,!1,t,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(t){ll[t]=new hu(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ll[t]=new hu(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ll[t]=new hu(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ll[t]=new hu(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ll[t]=new hu(t,5,!1,t.toLowerCase(),null,!1,!1)});var Y6=/[\-:]([a-z])/g;function Z6(t){return t[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(t){var e=t.replace(Y6,Z6);ll[e]=new hu(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Y6,Z6);ll[e]=new hu(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Y6,Z6);ll[e]=new hu(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ll[t]=new hu(t,1,!1,t.toLowerCase(),null,!1,!1)});ll.xlinkHref=new hu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ll[t]=new hu(t,1,!1,t.toLowerCase(),null,!0,!0)});function Q6(t,e,n,r){var i=ll.hasOwnProperty(e)?ll[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(t_e(e,n,i,r)&&(n=null),r||i===null?Jwe(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Lg=Qwe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_I=Symbol.for("react.element"),VS=Symbol.for("react.portal"),HS=Symbol.for("react.fragment"),X6=Symbol.for("react.strict_mode"),p$=Symbol.for("react.profiler"),Vne=Symbol.for("react.provider"),Hne=Symbol.for("react.context"),J6=Symbol.for("react.forward_ref"),g$=Symbol.for("react.suspense"),m$=Symbol.for("react.suspense_list"),e8=Symbol.for("react.memo"),wm=Symbol.for("react.lazy"),jne=Symbol.for("react.offscreen"),hG=Symbol.iterator;function tA(t){return t===null||typeof t!="object"?null:(t=hG&&t[hG]||t["@@iterator"],typeof t=="function"?t:null)}var la=Object.assign,zM;function WA(t){if(zM===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);zM=e&&e[1]||""}return`
45`+zM+t}var GM=!1;function WM(t,e){if(!t||GM)return"";GM=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}
vendor: 5,511 bytes, lines 45-48
45catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
46`),s=r.stack.split(`
47`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=`
48`+i[a].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=a&&0<=o);break}}}finally{GM=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?WA(t):""}function n_e(t){switch(t.tag){case 5:return WA(t.type);case 16:return WA("Lazy");case 13:return WA("Suspense");case 19:return WA("SuspenseList");case 0:case 2:case 15:return t=WM(t.type,!1),t;case 11:return t=WM(t.type.render,!1),t;case 1:return t=WM(t.type,!0),t;default:return""}}function v$(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case HS:return"Fragment";case VS:return"Portal";case p$:return"Profiler";case X6:return"StrictMode";case g$:return"Suspense";case m$:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Hne:return(t.displayName||"Context")+".Consumer";case Vne:return(t._context.displayName||"Context")+".Provider";case J6:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case e8:return e=t.displayName||null,e!==null?e:v$(t.type)||"Memo";case wm:e=t._payload,t=t._init;try{return v$(t(e))}catch{}}return null}function r_e(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return v$(e);case 8:return e===X6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Av(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function zne(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function i_e(t){var e=zne(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function CI(t){t._valueTracker||(t._valueTracker=i_e(t))}function Gne(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=zne(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function nR(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function y$(t,e){var n=e.checked;return la({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function pG(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Av(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Wne(t,e){e=e.checked,e!=null&&Q6(t,"checked",e,!1)}function b$(t,e){Wne(t,e);var n=Av(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?S$(t,e.type,n):e.hasOwnProperty("defaultValue")&&S$(t,e.type,Av(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function gG(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function S$(t,e,n){(e!=="number"||nR(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var qA=Array.isArray;function SE(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Av(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function E$(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Gt(91));return la({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function mG(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Gt(92));
vendor: 12,766 bytes, line 48
48if(qA(n)){if(1<n.length)throw Error(Gt(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Av(n)}}function qne(t,e){var n=Av(e.value),r=Av(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function vG(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Kne(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function T$(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Kne(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var xI,Yne=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(xI=xI||document.createElement("div"),xI.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=xI.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function g_(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Sw={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},s_e=["Webkit","ms","Moz","O"];Object.keys(Sw).forEach(function(t){s_e.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Sw[e]=Sw[t]})});function Zne(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Sw.hasOwnProperty(t)&&Sw[t]?(""+e).trim():e+"px"}function Qne(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Zne(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var a_e=la({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function A$(t,e){if(e){if(a_e[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Gt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Gt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Gt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Gt(62))}}function w$(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _$=null;function t8(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var C$=null,EE=null,TE=null;function yG(t){if(t=$C(t)){if(typeof C$!="function")throw Error(Gt(280));var e=t.stateNode;e&&(e=gk(e),C$(t.stateNode,t.type,e))}}function Xne(t){EE?TE?TE.push(t):TE=[t]:EE=t}function Jne(){if(EE){var t=EE,e=TE;if(TE=EE=null,yG(t),e)for(t=0;t<e.length;t++)yG(e[t])}}function ere(t,e){return t(e)}function tre(){}var qM=!1;function nre(t,e,n){if(qM)return t(e,n);qM=!0;try{return ere(t,e,n)}finally{qM=!1,(EE!==null||TE!==null)&&(tre(),Jne())}}function m_(t,e){var n=t.stateNode;if(n===null)return null;var r=gk(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Gt(231,e,typeof n));return n}var x$=!1;if(bg)try{var nA={};Object.defineProperty(nA,"passive",{get:function(){x$=!0}}),window.addEventListener("test",nA,nA),window.removeEventListener("test",nA,nA)}catch{x$=!1}function o_e(t,e,n,r,i,s,a,o,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var Ew=!1,rR=null,iR=!1,I$=null,l_e={onError:function(t){Ew=!0,rR=t}};function u_e(t,e,n,r,i,s,a,o,l){Ew=!1,rR=null,o_e.apply(l_e,arguments)}function c_e(t,e,n,r,i,s,a,o,l){if(u_e.apply(this,arguments),Ew){if(Ew){var u=rR;Ew=!1,rR=null}else throw Error(Gt(198));iR||(iR=!0,I$=u)}}function ub(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function rre(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function bG(t){if(ub(t)!==t)throw Error(Gt(188))}function d_e(t){var e=t.alternate;if(!e){if(e=ub(t),e===null)throw Error(Gt(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return bG(i),t;if(s===r)return bG(i),e;s=s.sibling}throw Error(Gt(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(Gt(189))}}if(n.alternate!==r)throw Error(Gt(190))}if(n.tag!==3)throw Error(Gt(188));return n.stateNode.current===n?t:e}function ire(t){return t=d_e(t),t!==null?sre(t):null}function sre(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=sre(t);if(e!==null)return e;t=t.sibling}return null}var are=kc.unstable_scheduleCallback,SG=kc.unstable_cancelCallback,f_e=kc.unstable_shouldYield,h_e=kc.unstable_requestPaint,La=kc.unstable_now,p_e=kc.unstable_getCurrentPriorityLevel,n8=kc.unstable_ImmediatePriority,ore=kc.unstable_UserBlockingPriority,sR=kc.unstable_NormalPriority,g_e=kc.unstable_LowPriority,lre=kc.unstable_IdlePriority,dk=null,jh=null;function m_e(t){if(jh&&typeof jh.onCommitFiberRoot=="function")try{jh.onCommitFiberRoot(dk,t,void 0,(t.current.flags&128)===128)}catch{}}var Rf=Math.clz32?Math.clz32:b_e,v_e=Math.log,y_e=Math.LN2;function b_e(t){return t>>>=0,t===0?32:31-(v_e(t)/y_e|0)|0}var II=64,OI=4194304;function KA(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function aR(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,a=n&268435455;if(a!==0){var o=a&~i;o!==0?r=KA(o):(s&=a,s!==0&&(r=KA(s)))}else a=n&~i,a!==0?r=KA(a):s!==0&&(r=KA(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Rf(e),i=1<<n,r|=t[n],e&=~i;return r}function S_e(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function E_e(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var a=31-Rf(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=S_e(o,e)):l<=e&&(t.expiredLanes|=o),s&=~o}}function O$(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function ure(){var t=II;return II<<=1,!(II&4194240)&&(II=64),t}function KM(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function MC(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Rf(e),t[e]=n}function T_e(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Rf(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function r8(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Rf(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var Gi=0;function cre(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var dre,i8,fre,hre,pre,P$=!1,PI=[],sv=null,av=null,ov=null,v_=new Map,y_=new Map,km=[],A_e="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function EG(t,e){switch(t){case"focusin":case"focusout":sv=null;break;case"dragenter":case"dragleave":av=null;break;case"mouseover":case"mouseout":ov=null;break;case"pointerover":case"pointerout":v_.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":y_.delete(e.pointerId)}}function rA(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=$C(e),e!==null&&i8(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function w_e(t,e,n,r,i){switch(e){case"focusin":return sv=rA(sv,t,e,n,r,i),!0;case"dragenter":return av=rA(av,t,e,n,r,i),!0;case"mouseover":return ov=rA(ov,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return v_.set(s,rA(v_.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,y_.set(s,rA(y_.get(s)||null,t,e,n,r,i)),!0}return!1}function gre(t){var e=Qy(t.target);if(e!==null){var n=ub(e);if(n!==null){if(e=n.tag,e===13){if(e=rre(n),e!==null){t.blockedOn=e,pre(t.priority,function(){fre(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function lP(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=R$(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);_$=r,n.target.dispatchEvent(r),_$=null}else return e=$C(n),e!==null&&i8(e),t.blockedOn=n,!1;e.shift()}return!0}function TG(t,e,n){lP(t)&&n.delete(e)}function __e(){P$=!1,sv!==null&&lP(sv)&&(sv=null),av!==null&&lP(av)&&(av=null),ov!==null&&lP(ov)&&(ov=null),v_.forEach(TG),y_.forEach(TG)}function iA(t,e){t.blockedOn===e&&(t.blockedOn=null,P$||(P$=!0,kc.unstable_scheduleCallback(kc.unstable_NormalPriority,__e)))}function b_(t){function e(i){return iA(i,t)}if(0<PI.length){iA(PI[0],t);for(var n=1;n<PI.length;n++){var r=PI[n];r.blockedOn===t&&(r.blockedOn=null)}}for(sv!==null&&iA(sv,t),av!==null&&iA(av,t),ov!==null&&iA(ov,t),v_.forEach(e),y_.forEach(e),n=0;n<km.length;n++)r=km[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<km.length&&(n=km[0],n.blockedOn===null);)gre(n),n.blockedOn===null&&km.shift()}var AE=Lg.ReactCurrentBatchConfig,oR=!0;function C_e(t,e,n,r){var i=Gi,s=AE.transition;AE.transition=null;try{Gi=1,s8(t,e,n,r)}finally{Gi=i,AE.transition=s}}function x_e(t,e,n,r){var i=Gi,s=AE.transition;AE.transition=null;try{Gi=4,s8(t,e,n,r)}finally{Gi=i,AE.transition=s}}function s8(t,e,n,r){if(oR){var i=R$(t,e,n,r);if(i===null)i3(t,e,r,lR,n),EG(t,r);else if(w_e(i,t,e,n,r))r.stopPropagation();else if(EG(t,r),e&4&&-1<A_e.indexOf(t)){for(;i!==null;){var s=$C(i);if(s!==null&&dre(s),s=R$(t,e,n,r),s===null&&i3(t,e,r,lR,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else i3(t,e,r,null,n)}}var lR=null;function R$(t,e,n,r){if(lR=null,t=t8(r),t=Qy(t),t!==null)if(e=ub(t),e===null)t=null;else if(n=e.tag,n===13){if(t=rre(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return lR=t,null}
vendor: 10,484 bytes, line 48
48function mre(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(p_e()){case n8:return 1;case ore:return 4;case sR:case g_e:return 16;case lre:return 536870912;default:return 16}default:return 16}}var Zm=null,a8=null,uP=null;function vre(){if(uP)return uP;var t,e=a8,n=e.length,r,i="value"in Zm?Zm.value:Zm.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var a=n-t;for(r=1;r<=a&&e[n-r]===i[s-r];r++);return uP=i.slice(t,1<r?1-r:void 0)}function cP(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function RI(){return!0}function AG(){return!1}function Bc(t){function e(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?RI:AG,this.isPropagationStopped=AG,this}return la(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=RI)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=RI)},persist:function(){},isPersistent:RI}),e}var K1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},o8=Bc(K1),FC=la({},K1,{view:0,detail:0}),I_e=Bc(FC),YM,ZM,sA,fk=la({},FC,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:l8,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==sA&&(sA&&t.type==="mousemove"?(YM=t.screenX-sA.screenX,ZM=t.screenY-sA.screenY):ZM=YM=0,sA=t),YM)},movementY:function(t){return"movementY"in t?t.movementY:ZM}}),wG=Bc(fk),O_e=la({},fk,{dataTransfer:0}),P_e=Bc(O_e),R_e=la({},FC,{relatedTarget:0}),QM=Bc(R_e),L_e=la({},K1,{animationName:0,elapsedTime:0,pseudoElement:0}),D_e=Bc(L_e),k_e=la({},K1,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),N_e=Bc(k_e),M_e=la({},K1,{data:0}),_G=Bc(M_e),F_e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$_e={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},B_e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function U_e(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=B_e[t])?!!e[t]:!1}function l8(){return U_e}var V_e=la({},FC,{key:function(t){if(t.key){var e=F_e[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=cP(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?$_e[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:l8,charCode:function(t){return t.type==="keypress"?cP(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?cP(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),H_e=Bc(V_e),j_e=la({},fk,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),CG=Bc(j_e),z_e=la({},FC,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:l8}),G_e=Bc(z_e),W_e=la({},K1,{propertyName:0,elapsedTime:0,pseudoElement:0}),q_e=Bc(W_e),K_e=la({},fk,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Y_e=Bc(K_e),Z_e=[9,13,27,32],u8=bg&&"CompositionEvent"in window,Tw=null;bg&&"documentMode"in document&&(Tw=document.documentMode);var Q_e=bg&&"TextEvent"in window&&!Tw,yre=bg&&(!u8||Tw&&8<Tw&&11>=Tw),xG=" ",IG=!1;function bre(t,e){switch(t){case"keyup":return Z_e.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sre(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var jS=!1;function X_e(t,e){switch(t){case"compositionend":return Sre(e);case"keypress":return e.which!==32?null:(IG=!0,xG);case"textInput":return t=e.data,t===xG&&IG?null:t;default:return null}}function J_e(t,e){if(jS)return t==="compositionend"||!u8&&bre(t,e)?(t=vre(),uP=a8=Zm=null,jS=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return yre&&e.locale!=="ko"?null:e.data;default:return null}}var eCe={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function OG(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!eCe[t.type]:e==="textarea"}function Ere(t,e,n,r){Xne(r),e=uR(e,"onChange"),0<e.length&&(n=new o8("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Aw=null,S_=null;function tCe(t){Lre(t,0)}function hk(t){var e=WS(t);if(Gne(e))return t}function nCe(t,e){if(t==="change")return e}var Tre=!1;if(bg){var XM;if(bg){var JM="oninput"in document;if(!JM){var PG=document.createElement("div");PG.setAttribute("oninput","return;"),JM=typeof PG.oninput=="function"}XM=JM}else XM=!1;Tre=XM&&(!document.documentMode||9<document.documentMode)}function RG(){Aw&&(Aw.detachEvent("onpropertychange",Are),S_=Aw=null)}function Are(t){if(t.propertyName==="value"&&hk(S_)){var e=[];Ere(e,S_,t,t8(t)),nre(tCe,e)}}function rCe(t,e,n){t==="focusin"?(RG(),Aw=e,S_=n,Aw.attachEvent("onpropertychange",Are)):t==="focusout"&&RG()}function iCe(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return hk(S_)}function sCe(t,e){if(t==="click")return hk(e)}function aCe(t,e){if(t==="input"||t==="change")return hk(e)}function oCe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Bf=typeof Object.is=="function"?Object.is:oCe;function E_(t,e){if(Bf(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!h$.call(e,i)||!Bf(t[i],e[i]))return!1}return!0}function LG(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function DG(t,e){var n=LG(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=LG(n)}}function wre(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?wre(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function _re(){for(var t=window,e=nR();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=nR(t.document)}return e}function c8(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function lCe(t){var e=_re(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&wre(n.ownerDocument.documentElement,n)){if(r!==null&&c8(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=DG(n,s);var a=DG(n,r);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var uCe=bg&&"documentMode"in document&&11>=document.documentMode,zS=null,L$=null,ww=null,D$=!1;function kG(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;D$||zS==null||zS!==nR(r)||(r=zS,"selectionStart"in r&&c8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,529 bytes, line 48
48sNode:r.focusNode,focusOffset:r.focusOffset}),ww&&E_(ww,r)||(ww=r,r=uR(L$,"onSelect"),0<r.length&&(e=new o8("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=zS)))}function LI(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var GS={animationend:LI("Animation","AnimationEnd"),animationiteration:LI("Animation","AnimationIteration"),animationstart:LI("Animation","AnimationStart"),transitionend:LI("Transition","TransitionEnd")},e3={},Cre={};bg&&(Cre=document.createElement("div").style,"AnimationEvent"in window||(delete GS.animationend.animation,delete GS.animationiteration.animation,delete GS.animationstart.animation),"TransitionEvent"in window||delete GS.transitionend.transition);function pk(t){if(e3[t])return e3[t];if(!GS[t])return t;var e=GS[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Cre)return e3[t]=e[n];return t}var xre=pk("animationend"),Ire=pk("animationiteration"),Ore=pk("animationstart"),Pre=pk("transitionend"),Rre=new Map,NG="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lv(t,e){Rre.set(t,e),lb(e,[t])}for(var t3=0;t3<NG.length;t3++){var n3=NG[t3],cCe=n3.toLowerCase(),dCe=n3[0].toUpperCase()+n3.slice(1);Lv(cCe,"on"+dCe)}Lv(xre,"onAnimationEnd");Lv(Ire,"onAnimationIteration");Lv(Ore,"onAnimationStart");Lv("dblclick","onDoubleClick");Lv("focusin","onFocus");Lv("focusout","onBlur");Lv(Pre,"onTransitionEnd");i1("onMouseEnter",["mouseout","mouseover"]);i1("onMouseLeave",["mouseout","mouseover"]);i1("onPointerEnter",["pointerout","pointerover"]);i1("onPointerLeave",["pointerout","pointerover"]);lb("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));lb("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));lb("onBeforeInput",["compositionend","keypress","textInput","paste"]);lb("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));lb("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));lb("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var YA="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fCe=new Set("cancel close invalid load scroll toggle".split(" ").concat(YA));function MG(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,c_e(r,e,void 0,t),t.currentTarget=null}function Lre(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;MG(i,o,u),s=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,u=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;MG(i,o,u),s=l}}}if(iR)throw t=I$,iR=!1,I$=null,t}function Os(t,e){var n=e[$$];n===void 0&&(n=e[$$]=new Set);var r=t+"__bubble";n.has(r)||(Dre(e,t,2,!1),n.add(r))}function r3(t,e,n){var r=0;e&&(r|=4),Dre(n,t,r,e)}var DI="_reactListening"+Math.random().toString(36).slice(2);function T_(t){if(!t[DI]){t[DI]=!0,Une.forEach(function(n){n!=="selectionchange"&&(fCe.has(n)||r3(n,!1,t),r3(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[DI]||(e[DI]=!0,r3("selectionchange",!1,e))}}function Dre(t,e,n,r){switch(mre(e)){case 1:var i=C_e;break;case 4:i=x_e;break;default:i=s8}n=i.bind(null,e,n,t),i=void 0,!x$||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function i3(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;
vendor: 5,240 bytes, lines 48-49
48if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=Qy(o),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}o=o.parentNode}}r=r.return}nre(function(){var u=s,c=t8(n),d=[];e:{var f=Rre.get(t);if(f!==void 0){var h=o8,g=t;switch(t){case"keypress":if(cP(n)===0)break e;case"keydown":case"keyup":h=H_e;break;case"focusin":g="focus",h=QM;break;case"focusout":g="blur",h=QM;break;case"beforeblur":case"afterblur":h=QM;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=wG;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=P_e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=G_e;break;case xre:case Ire:case Ore:h=D_e;break;case Pre:h=q_e;break;case"scroll":h=I_e;break;case"wheel":h=Y_e;break;case"copy":case"cut":case"paste":h=N_e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=CG}var v=(e&4)!==0,b=!v&&t==="scroll",S=v?f!==null?f+"Capture":null:f;v=[];for(var A=u,w;A!==null;){w=A;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,S!==null&&(x=m_(A,S),x!=null&&v.push(A_(A,x,w)))),b)break;A=A.return}0<v.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:v}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==_$&&(g=n.relatedTarget||n.fromElement)&&(Qy(g)||g[Sg]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?Qy(g):null,g!==null&&(b=ub(g),g!==b||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(v=wG,x="onMouseLeave",S="onMouseEnter",A="mouse",(t==="pointerout"||t==="pointerover")&&(v=CG,x="onPointerLeave",S="onPointerEnter",A="pointer"),b=h==null?f:WS(h),w=g==null?f:WS(g),f=new v(x,A+"leave",h,n,c),f.target=b,f.relatedTarget=w,x=null,Qy(c)===u&&(v=new v(S,A+"enter",g,n,c),v.target=w,v.relatedTarget=b,x=v),b=x,h&&g)t:{for(v=h,S=g,A=0,w=v;w;w=eS(w))A++;for(w=0,x=S;x;x=eS(x))w++;for(;0<A-w;)v=eS(v),A--;for(;0<w-A;)S=eS(S),w--;for(;A--;){if(v===S||S!==null&&v===S.alternate)break t;v=eS(v),S=eS(S)}v=null}else v=null;h!==null&&FG(d,f,h,v,!1),g!==null&&b!==null&&FG(d,b,g,v,!0)}}e:{if(f=u?WS(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var P=nCe;else if(OG(f))if(Tre)P=aCe;else{P=iCe;var N=rCe}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(P=sCe);if(P&&(P=P(t,u))){Ere(d,P,n,c);break e}N&&N(t,f,u),t==="focusout"&&(N=f._wrapperState)&&N.controlled&&f.type==="number"&&S$(f,"number",f.value)}switch(N=u?WS(u):window,t){case"focusin":(OG(N)||N.contentEditable==="true")&&(zS=N,L$=u,ww=null);break;case"focusout":ww=L$=zS=null;break;case"mousedown":D$=!0;break;case"contextmenu":case"mouseup":case"dragend":D$=!1,kG(d,n,c);break;case"selectionchange":if(uCe)break;case"keydown":case"keyup":kG(d,n,c)}var k;if(u8)e:{switch(t){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else jS?bre(t,n)&&(U="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(U="onCompositionStart");U&&(yre&&n.locale!=="ko"&&(jS||U!=="onCompositionStart"?U==="onCompositionEnd"&&jS&&(k=vre()):(Zm=c,a8="value"in Zm?Zm.value:Zm.textContent,jS=!0)),N=uR(u,U),0<N.length&&(U=new _G(U,t,null,n,c),d.push({event:U,listeners:N}),k?U.data=k:(k=Sre(n),k!==null&&(U.data=k)))),(k=Q_e?X_e(t,n):J_e(t,n))&&(u=uR(u,"onBeforeInput"),0<u.length&&(c=new _G("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=k))}Lre(d,e)})}function A_(t,e,n){return{instance:t,listener:e,currentTarget:n}}function uR(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=m_(t,n),s!=null&&r.unshift(A_(t,s,i)),s=m_(t,e),s!=null&&r.push(A_(t,s,i))),t=t.return}return r}function eS(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function FG(t,e,n,r,i){for(var s=e._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,u=o.stateNode;if(l!==null&&l===r)break;o.tag===5&&u!==null&&(o=u,i?(l=m_(n,s),l!=null&&a.unshift(A_(n,l,o))):i||(l=m_(n,s),l!=null&&a.push(A_(n,l,o)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var hCe=/\r\n?/g,pCe=/\u0000|\uFFFD/g;function $G(t){return(typeof t=="string"?t:""+t).replace(hCe,`
49`).replace(pCe,"")}function kI(t,e,n){if(e=$G(e),$G(t)!==e&&n)throw Error(Gt(425))}function cR(){}var k$=null,N$=null;function M$(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var F$=typeof setTimeout=="function"?setTimeout:void 0,gCe=typeof clearTimeout=="function"?clearTimeout:void 0,BG=typeof Promise=="function"?Promise:void 0,m
vendor: 4,962 bytes, line 49
49Ce=typeof queueMicrotask=="function"?queueMicrotask:typeof BG<"u"?function(t){return BG.resolve(null).then(t).catch(vCe)}:F$;function vCe(t){setTimeout(function(){throw t})}function s3(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),b_(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);b_(e)}function lv(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function UG(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Y1=Math.random().toString(36).slice(2),Dh="__reactFiber$"+Y1,w_="__reactProps$"+Y1,Sg="__reactContainer$"+Y1,$$="__reactEvents$"+Y1,yCe="__reactListeners$"+Y1,bCe="__reactHandles$"+Y1;function Qy(t){var e=t[Dh];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Sg]||n[Dh]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=UG(t);t!==null;){if(n=t[Dh])return n;t=UG(t)}return e}t=n,n=t.parentNode}return null}function $C(t){return t=t[Dh]||t[Sg],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function WS(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Gt(33))}function gk(t){return t[w_]||null}var B$=[],qS=-1;function Dv(t){return{current:t}}function Ms(t){0>qS||(t.current=B$[qS],B$[qS]=null,qS--)}function Es(t,e){qS++,B$[qS]=t.current,t.current=e}var wv={},Pl=Dv(wv),Uu=Dv(!1),L0=wv;function s1(t,e){var n=t.type.contextTypes;if(!n)return wv;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Vu(t){return t=t.childContextTypes,t!=null}function dR(){Ms(Uu),Ms(Pl)}function VG(t,e,n){if(Pl.current!==wv)throw Error(Gt(168));Es(Pl,e),Es(Uu,n)}function kre(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Gt(108,r_e(t)||"Unknown",i));return la({},n,r)}function fR(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||wv,L0=Pl.current,Es(Pl,t),Es(Uu,Uu.current),!0}function HG(t,e,n){var r=t.stateNode;if(!r)throw Error(Gt(169));n?(t=kre(t,e,L0),r.__reactInternalMemoizedMergedChildContext=t,Ms(Uu),Ms(Pl),Es(Pl,t)):Ms(Uu),Es(Uu,n)}var Xp=null,mk=!1,a3=!1;function Nre(t){Xp===null?Xp=[t]:Xp.push(t)}function SCe(t){mk=!0,Nre(t)}function kv(){if(!a3&&Xp!==null){a3=!0;var t=0,e=Gi;try{var n=Xp;for(Gi=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Xp=null,mk=!1}catch(i){throw Xp!==null&&(Xp=Xp.slice(t+1)),are(n8,kv),i}finally{Gi=e,a3=!1}}return null}var KS=[],YS=0,hR=null,pR=0,pd=[],gd=0,D0=null,sg=1,ag="";function My(t,e){KS[YS++]=pR,KS[YS++]=hR,hR=t,pR=e}function Mre(t,e,n){pd[gd++]=sg,pd[gd++]=ag,pd[gd++]=D0,D0=t;var r=sg;t=ag;var i=32-Rf(r)-1;r&=~(1<<i),n+=1;var s=32-Rf(e)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,sg=1<<32-Rf(e)+i|n<<i|r,ag=s+t}else sg=1<<s|n<<i|r,ag=t}function d8(t){t.return!==null&&(My(t,1),Mre(t,1,0))}function f8(t){for(;t===hR;)hR=KS[--YS],KS[YS]=null,pR=KS[--YS],KS[YS]=null;for(;t===D0;)D0=pd[--gd],pd[gd]=null,ag=pd[--gd],pd[gd]=null,sg=pd[--gd],pd[gd]=null}var Lc=null,Pc=null,qs=!1,Af=null;function Fre(t,e){var n=yd(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function jG(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Lc=t,Pc=lv(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Lc=t,Pc=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=D0!==null?{id:sg,overflow:ag}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=yd(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Lc=t,Pc=null,!0):!1;default:return!1}}function U$(t){return(t.mode&1)!==0&&(t.flags&128)===0}function V$(t){if(qs){var e=Pc;if(e){var n=e;if(!jG(t,e)){if(U$(t))throw Error(Gt(418));e=lv(n.nextSibling);var r=Lc;e&&jG(t,e)?Fre(r,n):(t.flags=t.flags&-4097|2,qs=!1,Lc=t)}}else{if(U$(t))throw Error(Gt(418));t.flags=t.flags&-4097|2,qs=!1,Lc=t}}}function zG(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Lc=t}function NI(t){if(t!==Lc)return!1;if(!qs)return zG(t),qs=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!M$(t.type,t.memoizedProps)),e&&(e=Pc)){if(U$(t))throw $re(),Error(Gt(418));for(;e;)Fre(t,e),e=lv(e.nextSibling)}if(zG(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Gt(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 23,325 bytes, lines 49-51
49){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Pc=lv(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Pc=null}}else Pc=Lc?lv(t.stateNode.nextSibling):null;return!0}function $re(){for(var t=Pc;t;)t=lv(t.nextSibling)}function a1(){Pc=Lc=null,qs=!1}function h8(t){Af===null?Af=[t]:Af.push(t)}var ECe=Lg.ReactCurrentBatchConfig;function aA(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Gt(309));var r=n.stateNode}if(!r)throw Error(Gt(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},e._stringRef=s,e)}if(typeof t!="string")throw Error(Gt(284));if(!n._owner)throw Error(Gt(290,t))}return t}function MI(t,e){throw t=Object.prototype.toString.call(e),Error(Gt(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function GG(t){var e=t._init;return e(t._payload)}function Bre(t){function e(S,A){if(t){var w=S.deletions;w===null?(S.deletions=[A],S.flags|=16):w.push(A)}}function n(S,A){if(!t)return null;for(;A!==null;)e(S,A),A=A.sibling;return null}function r(S,A){for(S=new Map;A!==null;)A.key!==null?S.set(A.key,A):S.set(A.index,A),A=A.sibling;return S}function i(S,A){return S=fv(S,A),S.index=0,S.sibling=null,S}function s(S,A,w){return S.index=w,t?(w=S.alternate,w!==null?(w=w.index,w<A?(S.flags|=2,A):w):(S.flags|=2,A)):(S.flags|=1048576,A)}function a(S){return t&&S.alternate===null&&(S.flags|=2),S}function o(S,A,w,x){return A===null||A.tag!==6?(A=h3(w,S.mode,x),A.return=S,A):(A=i(A,w),A.return=S,A)}function l(S,A,w,x){var P=w.type;return P===HS?c(S,A,w.props.children,x,w.key):A!==null&&(A.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===wm&&GG(P)===A.type)?(x=i(A,w.props),x.ref=aA(S,A,w),x.return=S,x):(x=vP(w.type,w.key,w.props,null,S.mode,x),x.ref=aA(S,A,w),x.return=S,x)}function u(S,A,w,x){return A===null||A.tag!==4||A.stateNode.containerInfo!==w.containerInfo||A.stateNode.implementation!==w.implementation?(A=p3(w,S.mode,x),A.return=S,A):(A=i(A,w.children||[]),A.return=S,A)}function c(S,A,w,x,P){return A===null||A.tag!==7?(A=E0(w,S.mode,x,P),A.return=S,A):(A=i(A,w),A.return=S,A)}function d(S,A,w){if(typeof A=="string"&&A!==""||typeof A=="number")return A=h3(""+A,S.mode,w),A.return=S,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case _I:return w=vP(A.type,A.key,A.props,null,S.mode,w),w.ref=aA(S,null,A),w.return=S,w;case VS:return A=p3(A,S.mode,w),A.return=S,A;case wm:var x=A._init;return d(S,x(A._payload),w)}if(qA(A)||tA(A))return A=E0(A,S.mode,w,null),A.return=S,A;MI(S,A)}return null}function f(S,A,w,x){var P=A!==null?A.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return P!==null?null:o(S,A,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _I:return w.key===P?l(S,A,w,x):null;case VS:return w.key===P?u(S,A,w,x):null;case wm:return P=w._init,f(S,A,P(w._payload),x)}if(qA(w)||tA(w))return P!==null?null:c(S,A,w,x,null);MI(S,w)}return null}function h(S,A,w,x,P){if(typeof x=="string"&&x!==""||typeof x=="number")return S=S.get(w)||null,o(A,S,""+x,P);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _I:return S=S.get(x.key===null?w:x.key)||null,l(A,S,x,P);case VS:return S=S.get(x.key===null?w:x.key)||null,u(A,S,x,P);case wm:var N=x._init;return h(S,A,w,N(x._payload),P)}if(qA(x)||tA(x))return S=S.get(w)||null,c(A,S,x,P,null);MI(A,x)}return null}function g(S,A,w,x){for(var P=null,N=null,k=A,U=A=0,H=null;k!==null&&U<w.length;U++){k.index>U?(H=k,k=null):H=k.sibling;var B=f(S,k,w[U],x);if(B===null){k===null&&(k=H);break}t&&k&&B.alternate===null&&e(S,k),A=s(B,A,U),N===null?P=B:N.sibling=B,N=B,k=H}if(U===w.length)return n(S,k),qs&&My(S,U),P;if(k===null){for(;U<w.length;U++)k=d(S,w[U],x),k!==null&&(A=s(k,A,U),N===null?P=k:N.sibling=k,N=k);return qs&&My(S,U),P}for(k=r(S,k);U<w.length;U++)H=h(k,S,U,w[U],x),H!==null&&(t&&H.alternate!==null&&k.delete(H.key===null?U:H.key),A=s(H,A,U),N===null?P=H:N.sibling=H,N=H);return t&&k.forEach(function(q){return e(S,q)}),qs&&My(S,U),P}function v(S,A,w,x){var P=tA(w);if(typeof P!="function")throw Error(Gt(150));if(w=P.call(w),w==null)throw Error(Gt(151));for(var N=P=null,k=A,U=A=0,H=null,B=w.next();k!==null&&!B.done;U++,B=w.next()){k.index>U?(H=k,k=null):H=k.sibling;var q=f(S,k,B.value,x);if(q===null){k===null&&(k=H);break}t&&k&&q.alternate===null&&e(S,k),A=s(q,A,U),N===null?P=q:N.sibling=q,N=q,k=H}if(B.done)return n(S,k),qs&&My(S,U),P;if(k===null){for(;!B.done;U++,B=w.next())B=d(S,B.value,x),B!==null&&(A=s(B,A,U),N===null?P=B:N.sibling=B,N=B);return qs&&My(S,U),P}for(k=r(S,k);!B.done;U++,B=w.next())B=h(k,S,U,B.value,x),B!==null&&(t&&B.alternate!==null&&k.delete(B.key===null?U:B.key),A=s(B,A,U),N===null?P=B:N.sibling=B,N=B);return t&&k.forEach(function(Z){return e(S,Z)}),qs&&My(S,U),P}function b(S,A,w,x){if(typeof w=="object"&&w!==null&&w.type===HS&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case _I:e:{for(var P=w.key,N=A;N!==null;){if(N.key===P){if(P=w.type,P===HS){if(N.tag===7){n(S,N.sibling),A=i(N,w.props.children),A.return=S,S=A;break e}}else if(N.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===wm&&GG(P)===N.type){n(S,N.sibling),A=i(N,w.props),A.ref=aA(S,N,w),A.return=S,S=A;break e}n(S,N);break}else e(S,N);N=N.sibling}w.type===HS?(A=E0(w.props.children,S.mode,x,w.key),A.return=S,S=A):(x=vP(w.type,w.key,w.props,null,S.mode,x),x.ref=aA(S,A,w),x.return=S,S=x)}return a(S);case VS:e:{for(N=w.key;A!==null;){if(A.key===N)if(A.tag===4&&A.stateNode.containerInfo===w.containerInfo&&A.stateNode.implementation===w.implementation){n(S,A.sibling),A=i(A,w.children||[]),A.return=S,S=A;break e}else{n(S,A);break}else e(S,A);A=A.sibling}A=p3(w,S.mode,x),A.return=S,S=A}return a(S);case wm:return N=w._init,b(S,A,N(w._payload),x)}if(qA(w))return g(S,A,w,x);if(tA(w))return v(S,A,w,x);MI(S,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,A!==null&&A.tag===6?(n(S,A.sibling),A=i(A,w),A.return=S,S=A):(n(S,A),A=h3(w,S.mode,x),A.return=S,S=A),a(S)):n(S,A)}return b}var o1=Bre(!0),Ure=Bre(!1),gR=Dv(null),mR=null,ZS=null,p8=null;function g8(){p8=ZS=mR=null}function m8(t){var e=gR.current;Ms(gR),t._currentValue=e}function H$(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function wE(t,e){mR=t,p8=ZS=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Mu=!0),t.firstContext=null)}function wd(t){var e=t._currentValue;if(p8!==t)if(t={context:t,memoizedValue:e,next:null},ZS===null){if(mR===null)throw Error(Gt(308));ZS=t,mR.dependencies={lanes:0,firstContext:t}}else ZS=ZS.next=t;return e}var Xy=null;function v8(t){Xy===null?Xy=[t]:Xy.push(t)}function Vre(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,v8(e)):(n.next=i.next,i.next=n),e.interleaved=n,Eg(t,r)}function Eg(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var _m=!1;function y8(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hre(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function pg(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function uv(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,hi&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Eg(t,n)}return i=r.interleaved,i===null?(e.next=e,v8(r)):(e.next=i.next,i.next=e),r.interleaved=e,Eg(t,n)}function dP(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,r8(t,n)}}function WG(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function vR(t,e,n,r){var i=t.updateQueue;_m=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?s=u:a.next=u,a=l;var c=t.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==a&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;a=0,c=u=l=null,o=s;do{var f=o.lane,h=o.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=t,v=o;switch(f=e,h=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=la({},d,f);break e;case 2:_m=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else h={eventTime:h,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,a|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do a|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);N0|=a,t.lanes=a,t.memoizedState=d}}function qG(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Gt(191,i));i.call(r)}}}var BC={},zh=Dv(BC),__=Dv(BC),C_=Dv(BC);function Jy(t){if(t===BC)throw Error(Gt(174));return t}function b8(t,e){switch(Es(C_,e),Es(__,t),Es(zh,BC),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:T$(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=T$(e,t)}Ms(zh),Es(zh,e)}function l1(){Ms(zh),Ms(__),Ms(C_)}function jre(t){Jy(C_.current);var e=Jy(zh.current),n=T$(e,t.type);e!==n&&(Es(__,t),Es(zh,n))}function S8(t){__.current===t&&(Ms(zh),Ms(__))}var ia=Dv(0);function yR(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var o3=[];function E8(){for(var t=0;t<o3.length;t++)o3[t]._workInProgressVersionPrimary=null;o3.length=0}var fP=Lg.ReactCurrentDispatcher,l3=Lg.ReactCurrentBatchConfig,k0=0,oa=null,uo=null,Lo=null,bR=!1,_w=!1,x_=0,TCe=0;function yl(){throw Error(Gt(321))}function T8(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Bf(t[n],e[n]))return!1;return!0}function A8(t,e,n,r,i,s){if(k0=s,oa=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,fP.current=t===null||t.memoizedState===null?CCe:xCe,t=n(r,i),_w){s=0;do{if(_w=!1,x_=0,25<=s)throw Error(Gt(301));s+=1,Lo=uo=null,e.updateQueue=null,fP.current=ICe,t=n(r,i)}while(_w)}if(fP.current=SR,e=uo!==null&&uo.next!==null,k0=0,Lo=uo=oa=null,bR=!1,e)throw Error(Gt(300));return t}function w8(){var t=x_!==0;return x_=0,t}function gh(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lo===null?oa.memoizedState=Lo=t:Lo=Lo.next=t,Lo}function _d(){if(uo===null){var t=oa.alternate;t=t!==null?t.memoizedState:null}else t=uo.next;var e=Lo===null?oa.memoizedState:Lo.next;if(e!==null)Lo=e,uo=t;else{if(t===null)throw Error(Gt(310));uo=t,t={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},Lo===null?oa.memoizedState=Lo=t:Lo=Lo.next=t}return Lo}function I_(t,e){return typeof e=="function"?e(t):e}function u3(t){var e=_d(),n=e.queue;if(n===null)throw Error(Gt(311));n.lastRenderedReducer=t;var r=uo,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=a=null,l=null,u=s;do{var c=u.lane;if((k0&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(o=l=d,a=r):l=l.next=d,oa.lanes|=c,N0|=c}u=u.next}while(u!==null&&u!==s);l===null?a=r:l.next=o,Bf(r,e.memoizedState)||(Mu=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,oa.lanes|=s,N0|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function c3(t){var e=_d(),n=e.queue;if(n===null)throw Error(Gt(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=t(s,a.action),a=a.next;while(a!==i);Bf(s,e.memoizedState)||(Mu=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function zre(){}function Gre(t,e){var n=oa,r=_d(),i=e(),s=!Bf(r.memoizedState,i);if(s&&(r.memoizedState=i,Mu=!0),r=r.queue,_8(Kre.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Lo!==null&&Lo.memoizedState.tag&1){if(n.flags|=2048,O_(9,qre.bind(null,n,r,i,e),void 0,null),No===null)throw Error(Gt(349));k0&30||Wre(n,e,i)}return i}function Wre(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=oa.updateQueue,e===null?(e={lastEffect:null,stores:null},oa.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function qre(t,e,n,r){e.value=n,e.getSnapshot=r,Yre(e)&&Zre(t)}function Kre(t,e,n){return n(function(){Yre(e)&&Zre(t)})}function Yre(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Bf(t,n)}catch{return!0}}function Zre(t){var e=Eg(t,1);e!==null&&Lf(e,t,1,-1)}function KG(t){var e=gh();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:I_,lastRenderedState:t},e.queue=t,t=t.dispatch=_Ce.bind(null,oa,t),[e.memoizedState,t]}function O_(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=oa.updateQueue,e===null?(e={lastEffect:null,stores:null},oa.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Qre(){return _d().memoizedState}function hP(t,e,n,r){var i=gh();oa.flags|=t,i.memoizedState=O_(1|e,n,void 0,r===void 0?null:r)}function vk(t,e,n,r){var i=_d();r=r===void 0?null:r;var s=void 0;if(uo!==null){var a=uo.memoizedState;if(s=a.destroy,r!==null&&T8(r,a.deps)){i.memoizedState=O_(e,n,s,r);return}}oa.flags|=t,i.memoizedState=O_(1|e,n,s,r)}function YG(t,e){return hP(8390656,8,t,e)}function _8(t,e){return vk(2048,8,t,e)}function Xre(t,e){return vk(4,2,t,e)}function Jre(t,e){return vk(4,4,t,e)}function eie(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function tie(t,e,n){return n=n!=null?n.concat([t]):null,vk(4,4,eie.bind(null,e,t),n)}function C8(){}function nie(t,e){var n=_d();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&T8(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function rie(t,e){var n=_d();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&T8(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function iie(t,e,n){return k0&21?(Bf(n,e)||(n=ure(),oa.lanes|=n,N0|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Mu=!0),t.memoizedState=n)}function ACe(t,e){var n=Gi;Gi=n!==0&&4>n?n:4,t(!0);var r=l3.transition;l3.transition={};try{t(!1),e()}finally{Gi=n,l3.transition=r}}function sie(){return _d().memoizedState}function wCe(t,e,n){var r=dv(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},aie(t))oie(e,n);else if(n=Vre(t,e,n,r),n!==null){var i=su();Lf(n,t,r,i),lie(n,e,r)}}function _Ce(t,e,n){var r=dv(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aie(t))oie(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var a=e.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,Bf(o,a)){var l=e.interleaved;l===null?(i.next=i,v8(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=Vre(t,e,i,r),n!==null&&(i=su(),Lf(n,t,r,i),lie(n,e,r))}}function aie(t){var e=t.alternate;return t===oa||e!==null&&e===oa}function oie(t,e){_w=bR=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function lie(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,r8(t,n)}}var SR={readContext:wd,useCallback:yl,useContext:yl,useEffect:yl,useImperativeHandle:yl,useInsertionEffect:yl,useLayoutEffect:yl,useMemo:yl,useReducer:yl,useRef:yl,useState:yl,useDebugValue:yl,useDeferredValue:yl,useTransition:yl,useMutableSource:yl,useSyncExternalStore:yl,useId:yl,unstable_isNewReconciler:!1},CCe={readContext:wd,useCallback:function(t,e){return gh().memoizedState=[t,e===void 0?null:e],t},useContext:wd,useEffect:YG,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,hP(4194308,4,eie.bind(null,e,t),n)},useLayoutEffect:function(t,e){return hP(4194308,4,t,e)},useInsertionEffect:function(t,e){return hP(4,2,t,e)},useMemo:function(t,e){var n=gh();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=gh();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=wCe.bind(null,oa,t),[r.memoizedState,t]},useRef:function(t){var e=gh();return t={current:t},e.memoizedState=t},useState:KG,useDebugValue:C8,useDeferredValue:function(t){return gh().memoizedState=t},useTransition:function(){var t=KG(!1),e=t[0];return t=ACe.bind(null,t[1]),gh().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=oa,i=gh();if(qs){if(n===void 0)throw Error(Gt(407));n=n()}else{if(n=e(),No===null)throw Error(Gt(349));k0&30||Wre(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,YG(Kre.bind(null,r,s,t),[t]),r.flags|=2048,O_(9,qre.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=gh(),e=No.identifierPrefix;if(qs){var n=ag,r=sg;n=(r&~(1<<32-Rf(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=x_++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=TCe++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},xCe={readContext:wd,useCallback:nie,useContext:wd,useEffect:_8,useImperativeHandle:tie,useInsertionEffect:Xre,useLayoutEffect:Jre,useMemo:rie,useReducer:u3,useRef:Qre,useState:function(){return u3(I_)},useDebugValue:C8,useDeferredValue:function(t){var e=_d();return iie(e,uo.memoizedState,t)},useTransition:function(){var t=u3(I_)[0],e=_d().memoizedState;return[t,e]},useMutableSource:zre,useSyncExternalStore:Gre,useId:sie,unstable_isNewReconciler:!1},ICe={readContext:wd,useCallback:nie,useContext:wd,useEffect:_8,useImperativeHandle:tie,useInsertionEffect:Xre,useLayoutEffect:Jre,useMemo:rie,useReducer:c3,useRef:Qre,useState:function(){return c3(I_)},useDebugValue:C8,useDeferredValue:function(t){var e=_d();return uo===null?e.memoizedState=t:iie(e,uo.memoizedState,t)},useTransition:function(){var t=c3(I_)[0],e=_d().memoizedState;return[t,e]},useMutableSource:zre,useSyncExternalStore:Gre,useId:sie,unstable_isNewReconciler:!1};function hf(t,e){if(t&&t.defaultProps){e=la({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function j$(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:la({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var yk={isMounted:function(t){return(t=t._reactInternals)?ub(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=su(),i=dv(t),s=pg(r,i);s.payload=e,n!=null&&(s.callback=n),e=uv(t,s,i),e!==null&&(Lf(e,t,i,r),dP(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=su(),i=dv(t),s=pg(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=uv(t,s,i),e!==null&&(Lf(e,t,i,r),dP(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=su(),r=dv(t),i=pg(n,r);i.tag=2,e!=null&&(i.callback=e),e=uv(t,i,r),e!==null&&(Lf(e,t,r,n),dP(e,t,r))}};function ZG(t,e,n,r,i,s,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,a):e.prototype&&e.prototype.isPureReactComponent?!E_(n,r)||!E_(i,s):!0}function uie(t,e,n){var r=!1,i=wv,s=e.contextType;return typeof s=="object"&&s!==null?s=wd(s):(i=Vu(e)?L0:Pl.current,r=e.contextTypes,s=(r=r!=null)?s1(t,i):wv),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=yk,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function QG(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&yk.enqueueReplaceState(e,e.state,null)}function z$(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},y8(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=wd(s):(s=Vu(e)?L0:Pl.current,i.context=s1(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(j$(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&yk.enqueueReplaceState(i,i.state,null),vR(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function u1(t,e){try{var n="",r=e;do n+=n_e(r),r=r.return;while(r);var i=n}catch(s){i=`
50Error generating stack: `+s.message+`
51`+s.stack}return{value:t,source:e,stack:i,digest:null}}function d3(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function G$(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var OCe=typeof WeakMap=="function"?WeakMap:Map;function cie(t,e,n){n=pg(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){TR||(TR=!0,tB=r),G$(t,e)},n}function die(t,e,n){n=pg(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){G$(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){G$(t,e),t
vendor: 7,637 bytes, line 51
51ypeof r!="function"&&(cv===null?cv=new Set([this]):cv.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),n}function XG(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new OCe;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=jCe.bind(null,t,e,n),e.then(t,t))}function JG(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function eW(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=pg(-1,1),e.tag=2,uv(n,e,1))),n.lanes|=1),t)}var PCe=Lg.ReactCurrentOwner,Mu=!1;function Xl(t,e,n,r){e.child=t===null?Ure(e,null,n,r):o1(e,t.child,n,r)}function tW(t,e,n,r,i){n=n.render;var s=e.ref;return wE(e,i),r=A8(t,e,n,r,s,i),n=w8(),t!==null&&!Mu?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Tg(t,e,i)):(qs&&n&&d8(e),e.flags|=1,Xl(t,e,r,i),e.child)}function nW(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!k8(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,fie(t,e,s,r,i)):(t=vP(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:E_,n(a,r)&&t.ref===e.ref)return Tg(t,e,i)}return e.flags|=1,t=fv(s,r),t.ref=e.ref,t.return=e,e.child=t}function fie(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(E_(s,r)&&t.ref===e.ref)if(Mu=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Mu=!0);else return e.lanes=t.lanes,Tg(t,e,i)}return W$(t,e,n,r,i)}function hie(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Es(XS,pc),pc|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Es(XS,pc),pc|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Es(XS,pc),pc|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Es(XS,pc),pc|=r;return Xl(t,e,i,n),e.child}function pie(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function W$(t,e,n,r,i){var s=Vu(n)?L0:Pl.current;return s=s1(e,s),wE(e,i),n=A8(t,e,n,r,s,i),r=w8(),t!==null&&!Mu?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Tg(t,e,i)):(qs&&r&&d8(e),e.flags|=1,Xl(t,e,n,i),e.child)}function rW(t,e,n,r,i){if(Vu(n)){var s=!0;fR(e)}else s=!1;if(wE(e,i),e.stateNode===null)pP(t,e),uie(e,n,r),z$(e,n,r,i),r=!0;else if(t===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=wd(u):(u=Vu(n)?L0:Pl.current,u=s1(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||l!==u)&&QG(e,a,r,u),_m=!1;var f=e.memoizedState;a.state=f,vR(e,r,a,i),l=e.memoizedState,o!==r||f!==l||Uu.current||_m?(typeof c=="function"&&(j$(e,n,c,r),l=e.memoizedState),(o=_m||ZG(e,n,o,r,f,l,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),a.props=r,a.state=l,a.context=u,r=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,Hre(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:hf(e.type,o),a.props=u,d=e.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=wd(l):(l=Vu(n)?L0:Pl.current,l=s1(e,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||f!==l)&&QG(e,a,r,l),_m=!1,f=e.memoizedState,a.state=f,vR(e,r,a,i);var g=e.memoizedState;o!==d||f!==g||Uu.current||_m?(typeof h=="function"&&(j$(e,n,h,r),g=e.memoizedState),(u=_m||ZG(e,n,u,r,f,g,l)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,l)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),a.props=r,a.state=g,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return q$(t,e,n,r,s,i)}function q$(t,e,n,r,i,s){pie(t,e);var a=(e.flags&128)!==0;if(!r&&!a)return i&&HG(e,n,!1),Tg(t,e,s);r=e.stateNode,PCe.current=e;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&a?(e.child=o1(e,t.child,null,s),e.child=o1(e,null,o,s)):Xl(t,e,o,s),e.memoizedState=r.state,i&&HG(e,n,!0),e.child}function gie(t){var e=t.stateNode;e.pendingContext?VG(t,e.pendingContext,e.pendingContext!==e.context):e.context&&VG(t,e.context,!1),b8(t,e.containerInfo)}function iW(t,e,n,r,i){return a1(),h8(i),e.flags|=256,Xl(t,e,n,r),e.child}var K$={dehydrated:null,treeContext:null,retryLane:0};function Y$(t){return{baseLanes:t,cachePool:null,transitions:null}}function mie(t,e,n){var r=e.pendingProps,i=ia.current,s=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=t!==null&&t.memoizedState===null?!1:(i&2)!==0),o?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Es(ia,i&1),t===null)return V$(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=r.children,t=r.fallback,s?(r=e.mode,s=e.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Ek(a,r,0,null),t=E0(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Y$(n),e.memoizedState=K$,t):x8(e,a));if(i=t.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return RCe(t,e,a,r,o,i,n);if(s){s=r.fallback,a=e.mode,i=t.child,o=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=fv(i,l),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=fv(o,s):(s=E0(s,a,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,a=t.child.memoizedState,a=a===null?Y$(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=t.childLanes&~n,e.memoizedState=K$,r}return s=t.child,t=s.sibling,r=fv(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function x8(t,e){return e=Ek({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function FI(t,e,n,r){return r!==null&&h8(r),o1(e,t.child,null,n),t=x8(e,e.pen
vendor: 4,933 bytes, line 51
51dingProps.children),t.flags|=2,e.memoizedState=null,t}function RCe(t,e,n,r,i,s,a){if(n)return e.flags&256?(e.flags&=-257,r=d3(Error(Gt(422))),FI(t,e,a,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Ek({mode:"visible",children:r.children},i,0,null),s=E0(s,i,a,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&o1(e,t.child,null,a),e.child.memoizedState=Y$(a),e.memoizedState=K$,s);if(!(e.mode&1))return FI(t,e,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(Gt(419)),r=d3(s,r,void 0),FI(t,e,a,r)}if(o=(a&t.childLanes)!==0,Mu||o){if(r=No,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Eg(t,i),Lf(r,t,i,-1))}return D8(),r=d3(Error(Gt(421))),FI(t,e,a,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=zCe.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Pc=lv(i.nextSibling),Lc=e,qs=!0,Af=null,t!==null&&(pd[gd++]=sg,pd[gd++]=ag,pd[gd++]=D0,sg=t.id,ag=t.overflow,D0=e),e=x8(e,r.children),e.flags|=4096,e)}function sW(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),H$(t.return,e,n)}function f3(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function vie(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Xl(t,e,r.children,n),r=ia.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&sW(t,n,e);else if(t.tag===19)sW(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Es(ia,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&yR(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),f3(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&yR(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}f3(e,!0,n,null,s);break;case"together":f3(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function pP(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Tg(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),N0|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Gt(153));if(e.child!==null){for(t=e.child,n=fv(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=fv(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function LCe(t,e,n){switch(e.tag){case 3:gie(e),a1();break;case 5:jre(e);break;case 1:Vu(e.type)&&fR(e);break;case 4:b8(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Es(gR,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Es(ia,ia.current&1),e.flags|=128,null):n&e.child.childLanes?mie(t,e,n):(Es(ia,ia.current&1),t=Tg(t,e,n),t!==null?t.sibling:null);Es(ia,ia.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return vie(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Es(ia,ia.current),r)break;return null;case 22:case 23:return e.lanes=0,hie(t,e,n)}return Tg(t,e,n)}var yie,Z$,bie,Sie;yie=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Z$=function(){};bie=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Jy(zh.current);var s=null;switch(n){case"input":i=y$(t,i),r=y$(t,r),s=[];break;case"select":i=la({},i,{value:void 0}),r=la({},r,{value:void 0}),s=[];break;case"textarea":i=E$(t,i),r=E$(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=cR)}A$(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(p_.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];
vendor: 5,274 bytes, line 51
51if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(p_.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Os("scroll",t),s||o===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};Sie=function(t,e,n,r){n!==r&&(e.flags|=4)};function oA(t,e){if(!qs)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function bl(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function DCe(t,e,n){var r=e.pendingProps;switch(f8(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bl(e),null;case 1:return Vu(e.type)&&dR(),bl(e),null;case 3:return r=e.stateNode,l1(),Ms(Uu),Ms(Pl),E8(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(NI(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Af!==null&&(iB(Af),Af=null))),Z$(t,e),bl(e),null;case 5:S8(e);var i=Jy(C_.current);if(n=e.type,t!==null&&e.stateNode!=null)bie(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Gt(166));return bl(e),null}if(t=Jy(zh.current),NI(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Dh]=e,r[w_]=s,t=(e.mode&1)!==0,n){case"dialog":Os("cancel",r),Os("close",r);break;case"iframe":case"object":case"embed":Os("load",r);break;case"video":case"audio":for(i=0;i<YA.length;i++)Os(YA[i],r);break;case"source":Os("error",r);break;case"img":case"image":case"link":Os("error",r),Os("load",r);break;case"details":Os("toggle",r);break;case"input":pG(r,s),Os("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Os("invalid",r);break;case"textarea":mG(r,s),Os("invalid",r)}A$(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&kI(r.textContent,o,t),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&kI(r.textContent,o,t),i=["children",""+o]):p_.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Os("scroll",r)}switch(n){case"input":CI(r),gG(r,s,!0);break;case"textarea":CI(r),vG(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=cR)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Kne(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[Dh]=e,t[w_]=r,yie(t,e,!1,!1),e.stateNode=t;e:{switch(a=w$(n,r),n){case"dialog":Os("cancel",t),Os("close",t),i=r;break;case"iframe":case"object":case"embed":Os("load",t),i=r;break;case"video":case"audio":for(i=0;i<YA.length;i++)Os(YA[i],t);i=r;break;case"source":Os("error",t),i=r;break;case"img":case"image":case"link":Os("error",t),Os("load",t),i=r;break;case"details":Os("toggle",t),i=r;break;case"input":pG(t,r),i=y$(t,r),Os("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=la({},r,{value:void 0}),Os("invalid",t);break;case"textarea":mG(t,r),i=E$(t,r),Os("invalid",t);break;default:i=r}A$(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?Qne(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Yne(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&g_(t,l):typeof l=="number"&&g_(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(p_.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Os("scroll",t):l!=null&&Q6(t,s,l,a))}switch(n){case"input":CI(t),gG(t,r,!1);break;case"textarea":CI(t),vG(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Av(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?SE(t,!!r.multiple,s,!1):r.defaultValue!=null&&SE(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=cR)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}
vendor: 27,351 bytes, line 51
51return bl(e),null;case 6:if(t&&e.stateNode!=null)Sie(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Gt(166));if(n=Jy(C_.current),Jy(zh.current),NI(e)){if(r=e.stateNode,n=e.memoizedProps,r[Dh]=e,(s=r.nodeValue!==n)&&(t=Lc,t!==null))switch(t.tag){case 3:kI(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&kI(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Dh]=e,e.stateNode=r}return bl(e),null;case 13:if(Ms(ia),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(qs&&Pc!==null&&e.mode&1&&!(e.flags&128))$re(),a1(),e.flags|=98560,s=!1;else if(s=NI(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(Gt(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Gt(317));s[Dh]=e}else a1(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;bl(e),s=!1}else Af!==null&&(iB(Af),Af=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ia.current&1?go===0&&(go=3):D8())),e.updateQueue!==null&&(e.flags|=4),bl(e),null);case 4:return l1(),Z$(t,e),t===null&&T_(e.stateNode.containerInfo),bl(e),null;case 10:return m8(e.type._context),bl(e),null;case 17:return Vu(e.type)&&dR(),bl(e),null;case 19:if(Ms(ia),s=e.memoizedState,s===null)return bl(e),null;if(r=(e.flags&128)!==0,a=s.rendering,a===null)if(r)oA(s,!1);else{if(go!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=yR(t),a!==null){for(e.flags|=128,oA(s,!1),r=a.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,t=a.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Es(ia,ia.current&1|2),e.child}t=t.sibling}s.tail!==null&&La()>c1&&(e.flags|=128,r=!0,oA(s,!1),e.lanes=4194304)}else{if(!r)if(t=yR(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),oA(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!qs)return bl(e),null}else 2*La()-s.renderingStartTime>c1&&n!==1073741824&&(e.flags|=128,r=!0,oA(s,!1),e.lanes=4194304);s.isBackwards?(a.sibling=e.child,e.child=a):(n=s.last,n!==null?n.sibling=a:e.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=La(),e.sibling=null,n=ia.current,Es(ia,r?n&1|2:n&1),e):(bl(e),null);case 22:case 23:return L8(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?pc&1073741824&&(bl(e),e.subtreeFlags&6&&(e.flags|=8192)):bl(e),null;case 24:return null;case 25:return null}throw Error(Gt(156,e.tag))}function kCe(t,e){switch(f8(e),e.tag){case 1:return Vu(e.type)&&dR(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return l1(),Ms(Uu),Ms(Pl),E8(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return S8(e),null;case 13:if(Ms(ia),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Gt(340));a1()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ms(ia),null;case 4:return l1(),null;case 10:return m8(e.type._context),null;case 22:case 23:return L8(),null;case 24:return null;default:return null}}var $I=!1,xl=!1,NCe=typeof WeakSet=="function"?WeakSet:Set,En=null;function QS(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Sa(t,e,r)}else n.current=null}function Q$(t,e,n){try{n()}catch(r){Sa(t,e,r)}}var aW=!1;function MCe(t,e){if(k$=oR,t=_re(),c8(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(o=a+i),d!==s||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===i&&(o=a),f===s&&++c===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(N$={focusedElem:t,selectionRange:n},oR=!1,En=e;En!==null;)if(e=En,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,En=t;else for(;En!==null;){e=En;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,b=g.memoizedState,S=e.stateNode,A=S.getSnapshotBeforeUpdate(e.elementType===e.type?v:hf(e.type,v),b);S.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Gt(163))}}catch(x){Sa(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,En=t;break}En=e.return}return g=aW,aW=!1,g}function Cw(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Q$(e,n,s)}i=i.next}while(i!==r)}}function bk(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function X$(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Eie(t){var e=t.alternate;e!==null&&(t.alternate=null,Eie(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Dh],delete e[w_],delete e[$$],delete e[yCe],delete e[bCe])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Tie(t){return t.tag===5||t.tag===3||t.tag===4}function oW(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Tie(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function J$(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=cR));else if(r!==4&&(t=t.child,t!==null))for(J$(t,e,n),t=t.sibling;t!==null;)J$(t,e,n),t=t.sibling}function eB(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(eB(t,e,n),t=t.sibling;t!==null;)eB(t,e,n),t=t.sibling}var Qo=null,Sf=!1;function lm(t,e,n){for(n=n.child;n!==null;)Aie(t,e,n),n=n.sibling}function Aie(t,e,n){if(jh&&typeof jh.onCommitFiberUnmount=="function")try{jh.onCommitFiberUnmount(dk,n)}catch{}switch(n.tag){case 5:xl||QS(n,e);case 6:var r=Qo,i=Sf;Qo=null,lm(t,e,n),Qo=r,Sf=i,Qo!==null&&(Sf?(t=Qo,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Qo.removeChild(n.stateNode));break;case 18:Qo!==null&&(Sf?(t=Qo,n=n.stateNode,t.nodeType===8?s3(t.parentNode,n):t.nodeType===1&&s3(t,n),b_(t)):s3(Qo,n.stateNode));break;case 4:r=Qo,i=Sf,Qo=n.stateNode.containerInfo,Sf=!0,lm(t,e,n),Qo=r,Sf=i;break;case 0:case 11:case 14:case 15:if(!xl&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Q$(n,e,a),i=i.next}while(i!==r)}lm(t,e,n);break;case 1:if(!xl&&(QS(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Sa(n,e,o)}lm(t,e,n);break;case 21:lm(t,e,n);break;case 22:n.mode&1?(xl=(r=xl)||n.memoizedState!==null,lm(t,e,n),xl=r):lm(t,e,n);break;default:lm(t,e,n)}}function lW(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new NCe),e.forEach(function(r){var i=GCe.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Qd(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,a=e,o=a;e:for(;o!==null;){switch(o.tag){case 5:Qo=o.stateNode,Sf=!1;break e;case 3:Qo=o.stateNode.containerInfo,Sf=!0;break e;case 4:Qo=o.stateNode.containerInfo,Sf=!0;break e}o=o.return}if(Qo===null)throw Error(Gt(160));Aie(s,a,i),Qo=null,Sf=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Sa(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)wie(e,t),e=e.sibling}function wie(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Qd(e,t),ih(t),r&4){try{Cw(3,t,t.return),bk(3,t)}catch(v){Sa(t,t.return,v)}try{Cw(5,t,t.return)}catch(v){Sa(t,t.return,v)}}break;case 1:Qd(e,t),ih(t),r&512&&n!==null&&QS(n,n.return);break;case 5:if(Qd(e,t),ih(t),r&512&&n!==null&&QS(n,n.return),t.flags&32){var i=t.stateNode;try{g_(i,"")}catch(v){Sa(t,t.return,v)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,a=n!==null?n.memoizedProps:s,o=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&Wne(i,s),w$(o,a);var u=w$(o,s);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];c==="style"?Qne(i,d):c==="dangerouslySetInnerHTML"?Yne(i,d):c==="children"?g_(i,d):Q6(i,c,d,u)}switch(o){case"input":b$(i,s);break;case"textarea":qne(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?SE(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?SE(i,!!s.multiple,s.defaultValue,!0):SE(i,!!s.multiple,s.multiple?[]:"",!1))}i[w_]=s}catch(v){Sa(t,t.return,v)}}break;case 6:if(Qd(e,t),ih(t),r&4){if(t.stateNode===null)throw Error(Gt(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(v){Sa(t,t.return,v)}}break;case 3:if(Qd(e,t),ih(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{b_(e.containerInfo)}catch(v){Sa(t,t.return,v)}break;case 4:Qd(e,t),ih(t);break;case 13:Qd(e,t),ih(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(P8=La())),r&4&&lW(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(xl=(u=xl)||c,Qd(e,t),xl=u):Qd(e,t),ih(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(En=t,c=t.child;c!==null;){for(d=En=c;En!==null;){switch(f=En,h=f.child,f.tag){case 0:case 11:case 14:case 15:Cw(4,f,f.return);break;case 1:QS(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(v){Sa(r,n,v)}}break;case 5:QS(f,f.return);break;case 22:if(f.memoizedState!==null){cW(d);continue}}h!==null?(h.return=f,En=h):cW(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=Zne("display",a))}catch(v){Sa(t,t.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){Sa(t,t.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Qd(e,t),ih(t),r&4&&lW(t);break;case 21:break;default:Qd(e,t),ih(t)}}function ih(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Tie(n)){var r=n;break e}n=n.return}throw Error(Gt(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(g_(i,""),r.flags&=-33);var s=oW(t);eB(t,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,o=oW(t);J$(t,o,a);break;default:throw Error(Gt(161))}}catch(l){Sa(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function FCe(t,e,n){En=t,_ie(t)}function _ie(t,e,n){for(var r=(t.mode&1)!==0;En!==null;){var i=En,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||$I;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||xl;o=$I;var u=xl;if($I=a,(xl=l)&&!u)for(En=i;En!==null;)a=En,l=a.child,a.tag===22&&a.memoizedState!==null?dW(i):l!==null?(l.return=a,En=l):dW(i);for(;s!==null;)En=s,_ie(s),s=s.sibling;En=i,$I=o,xl=u}uW(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,En=s):uW(t)}}function uW(t){for(;En!==null;){var e=En;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:xl||bk(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!xl)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:hf(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&qG(e,s,r);break;case 3:var a=e.updateQueue;if(a!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}qG(e,a,n)}break;case 5:var o=e.stateNode;if(n===null&&e.flags&4){n=o;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&b_(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Gt(163))}xl||e.flags&512&&X$(e)}catch(f){Sa(e,e.return,f)}}if(e===t){En=null;break}if(n=e.sibling,n!==null){n.return=e.return,En=n;break}En=e.return}}function cW(t){for(;En!==null;){var e=En;if(e===t){En=null;break}var n=e.sibling;if(n!==null){n.return=e.return,En=n;break}En=e.return}}function dW(t){for(;En!==null;){var e=En;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{bk(4,e)}catch(l){Sa(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){Sa(e,i,l)}}var s=e.return;try{X$(e)}catch(l){Sa(e,s,l)}break;case 5:var a=e.return;try{X$(e)}catch(l){Sa(e,a,l)}}}catch(l){Sa(e,e.return,l)}if(e===t){En=null;break}var o=e.sibling;if(o!==null){o.return=e.return,En=o;break}En=e.return}}var $Ce=Math.ceil,ER=Lg.ReactCurrentDispatcher,I8=Lg.ReactCurrentOwner,Sd=Lg.ReactCurrentBatchConfig,hi=0,No=null,Xa=null,al=0,pc=0,XS=Dv(0),go=0,P_=null,N0=0,Sk=0,O8=0,xw=null,ku=null,P8=0,c1=1/0,Gp=null,TR=!1,tB=null,cv=null,BI=!1,Qm=null,AR=0,Iw=0,nB=null,gP=-1,mP=0;function su(){return hi&6?La():gP!==-1?gP:gP=La()}function dv(t){return t.mode&1?hi&2&&al!==0?al&-al:ECe.transition!==null?(mP===0&&(mP=ure()),mP):(t=Gi,t!==0||(t=window.event,t=t===void 0?16:mre(t.type)),t):1}function Lf(t,e,n,r){if(50<Iw)throw Iw=0,nB=null,Error(Gt(185));MC(t,n,r),(!(hi&2)||t!==No)&&(t===No&&(!(hi&2)&&(Sk|=n),go===4&&Nm(t,al)),Hu(t,r),n===1&&hi===0&&!(e.mode&1)&&(c1=La()+500,mk&&kv()))}function Hu(t,e){var n=t.callbackNode;E_e(t,e);var r=aR(t,t===No?al:0);if(r===0)n!==null&&SG(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&SG(n),e===1)t.tag===0?SCe(fW.bind(null,t)):Nre(fW.bind(null,t)),mCe(function(){!(hi&6)&&kv()}),n=null;else{switch(cre(r)){case 1:n=n8;break;case 4:n=ore;break;case 16:n=sR;break;case 536870912:n=lre;break;default:n=sR}n=Die(n,Cie.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Cie(t,e){if(gP=-1,mP=0,hi&6)throw Error(Gt(327));var n=t.callbackNode;if(_E()&&t.callbackNode!==n)return null;var r=aR(t,t===No?al:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=wR(t,r);else{e=r;var i=hi;hi|=2;var s=Iie();(No!==t||al!==e)&&(Gp=null,c1=La()+500,S0(t,e));do try{VCe();break}catch(o){xie(t,o)}while(!0);g8(),ER.current=s,hi=i,Xa!==null?e=0:(No=null,al=0,e=go)}if(e!==0){if(e===2&&(i=O$(t),i!==0&&(r=i,e=rB(t,i))),e===1)throw n=P_,S0(t,0),Nm(t,r),Hu(t,La()),n;if(e===6)Nm(t,r);else{if(i=t.current.alternate,!(r&30)&&!BCe(i)&&(e=wR(t,r),e===2&&(s=O$(t),s!==0&&(r=s,e=rB(t,s))),e===1))throw n=P_,S0(t,0),Nm(t,r),Hu(t,La()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(Gt(345));case 2:Fy(t,ku,Gp);break;case 3:if(Nm(t,r),(r&130023424)===r&&(e=P8+500-La(),10<e)){if(aR(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){su(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=F$(Fy.bind(null,t,ku,Gp),e);break}Fy(t,ku,Gp);break;case 4:if(Nm(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var a=31-Rf(r);s=1<<a,a=e[a],a>i&&(i=a),r&=~s}if(r=i,r=La()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*$Ce(r/1960))-r,10<r){t.timeoutHandle=F$(Fy.bind(null,t,ku,Gp),r);break}Fy(t,ku,Gp);break;case 5:Fy(t,ku,Gp);break;default:throw Error(Gt(329))}}}return Hu(t,La()),t.callbackNode===n?Cie.bind(null,t):null}function rB(t,e){var n=xw;return t.current.memoizedState.isDehydrated&&(S0(t,e).flags|=256),t=wR(t,e),t!==2&&(e=ku,ku=n,e!==null&&iB(e)),t}function iB(t){ku===null?ku=t:ku.push.apply(ku,t)}function BCe(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Bf(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Nm(t,e){for(e&=~O8,e&=~Sk,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Rf(e),r=1<<n;t[n]=-1,e&=~r}}function fW(t){if(hi&6)throw Error(Gt(327));_E();var e=aR(t,0);if(!(e&1))return Hu(t,La()),null;var n=wR(t,e);if(t.tag!==0&&n===2){var r=O$(t);r!==0&&(e=r,n=rB(t,r))}if(n===1)throw n=P_,S0(t,0),Nm(t,e),Hu(t,La()),n;if(n===6)throw Error(Gt(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Fy(t,ku,Gp),Hu(t,La()),null}function R8(t,e){var n=hi;hi|=1;try{return t(e)}finally{hi=n,hi===0&&(c1=La()+500,mk&&kv())}}function M0(t){Qm!==null&&Qm.tag===0&&!(hi&6)&&_E();var e=hi;hi|=1;var n=Sd.transition,r=Gi;try{if(Sd.transition=null,Gi=1,t)return t()}finally{Gi=r,Sd.transition=n,hi=e,!(hi&6)&&kv()}}function L8(){pc=XS.current,Ms(XS)}function S0(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,gCe(n)),Xa!==null)for(n=Xa.return;n!==null;){var r=n;switch(f8(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&dR();break;case 3:l1(),Ms(Uu),Ms(Pl),E8();break;case 5:S8(r);break;case 4:l1();break;case 13:Ms(ia);break;case 19:Ms(ia);break;case 10:m8(r.type._context);break;case 22:case 23:L8()}n=n.return}if(No=t,Xa=t=fv(t.current,null),al=pc=e,go=0,P_=null,O8=Sk=N0=0,ku=xw=null,Xy!==null){for(e=0;e<Xy.length;e++)if(n=Xy[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}Xy=null}return t}function xie(t,e){do{var n=Xa;try{if(g8(),fP.current=SR,bR){for(var r=oa.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}bR=!1}if(k0=0,Lo=uo=oa=null,_w=!1,x_=0,I8.current=null,n===null||n.return===null){go=1,P_=e,Xa=null;break}e:{var s=t,a=n.return,o=n,l=e;if(e=al,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=o,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=JG(a);if(h!==null){h.flags&=-257,eW(h,a,o,s,e),h.mode&1&&XG(s,u,e),e=h,l=u;var g=e.updateQueue;if(g===null){var v=new Set;v.add(l),e.updateQueue=v}else g.add(l);break e}else{if(!(e&1)){XG(s,u,e),D8();break e}l=Error(Gt(426))}}else if(qs&&o.mode&1){var b=JG(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),eW(b,a,o,s,e),h8(u1(l,o));break e}}s=l=u1(l,o),go!==4&&(go=2),xw===null?xw=[s]:xw.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var S=cie(s,l,e);WG(s,S);break e;case 1:o=l;var A=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof A.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(cv===null||!cv.has(w)))){s.flags|=65536,e&=-e,s.lanes|=e;var x=die(s,o,e);WG(s,x);break e}}s=s.return}while(s!==null)}Pie(n)}catch(P){e=P,Xa===n&&n!==null&&(Xa=n=n.return);continue}break}while(!0)}function Iie(){var t=ER.current;return ER.current=SR,t===null?SR:t}function D8(){(go===0||go===3||go===2)&&(go=4),No===null||!(N0&268435455)&&!(Sk&268435455)||Nm(No,al)}function wR(t,e){var n=hi;hi|=2;var r=Iie();(No!==t||al!==e)&&(Gp=null,S0(t,e));do try{UCe();break}catch(i){xie(t,i)}while(!0);if(g8(),hi=n,ER.current=r,Xa!==null)throw Error(Gt(261));return No=null,al=0,go}function UCe(){for(;Xa!==null;)Oie(Xa)}function VCe(){for(;Xa!==null&&!f_e();)Oie(Xa)}function Oie(t){var e=Lie(t.alternate,t,pc);t.memoizedProps=t.pendingProps,e===null?Pie(t):Xa=e,I8.current=null}function Pie(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=kCe(n,e),n!==null){n.flags&=32767,Xa=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{go=6,Xa=null;return}}else if(n=DCe(n,e,pc),n!==null){Xa=n;return}if(e=e.sibling,e!==null){Xa=e;return}Xa=e=t}while(e!==null);go===0&&(go=5)}function Fy(t,e,n){var r=Gi,i=Sd.transition;try{Sd.transition=null,Gi=1,HCe(t,e,n,r)}finally{Sd.transition=i,Gi=r}return null}function HCe(t,e,n,r){do _E();while(Qm!==null);if(hi&6)throw Error(Gt(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Gt(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(T_e(t,s),t===No&&(Xa=No=null,al=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||BI||(BI=!0,Die(sR,function(){return _E(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Sd.transition,Sd.transition=null;var a=Gi;Gi=1;var o=hi;hi|=4,I8.current=null,MCe(t,n),wie(n,t),lCe(N$),oR=!!k$,N$=k$=null,t.current=n,FCe(n),h_e(),hi=o,Gi=a,Sd.transition=s}else t.current=n;if(BI&&(BI=!1,Qm=t,AR=i),s=t.pendingLanes,s===0&&(cv=null),m_e(n.stateNode),Hu(t,La()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(TR)throw TR=!1,t=tB,tB=null,t;return AR&1&&t.tag!==0&&_E(),s=t.pendingLanes,s&1?t===nB?Iw++:(Iw=0,nB=t):Iw=0,kv(),null}function _E(){if(Qm!==null){var t=cre(AR),e=Sd.transition,n=Gi;try{if(Sd.transition=null,Gi=16>t?16:t,Qm===null)var r=!1;else{if(t=Qm,Qm=null,AR=0,hi&6)throw Error(Gt(331));var i=hi;for(hi|=4,En=t.current;En!==null;){var s=En,a=s.child;if(En.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var u=o[l];for(En=u;En!==null;){var c=En;switch(c.tag){case 0:case 11:case 15:Cw(8,c,s)}var d=c.child;if(d!==null)d.return=c,En=d;else for(;En!==null;){c=En;var f=c.sibling,h=c.return;if(Eie(c),c===u){En=null;break}if(f!==null){f.return=h,En=f;break}En=h}}}var g=s.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}En=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,En=a;else e:for(;En!==null;){if(s=En,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Cw(9,s,s.return)}var S=s.sibling;if(S!==null){S.return=s.return,En=S;break e}En=s.return}}var A=t.current;for(En=A;En!==null;){a=En;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,En=w;else e:for(a=A;En!==null;){if(o=En,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:bk(9,o)}}catch(P){Sa(o,o.return,P)}if(o===a){En=null;break e}var x=o.sibling;if(x!==null){x.return=o.return,En=x;break e}En=o.return}}if(hi=i,kv(),jh&&typeof jh.onPostCommitFiberRoot=="function")try{jh.onPostCommitFiberRoot(dk,t)}catch{}r=!0}return r}finally{Gi=n,Sd.transition=e}}return!1}function hW(t,e,n){e=u1(n,e),e=cie(t,e,1),t=uv(t,e,1),e=su(),t!==null&&(MC(t,1,e),Hu(t,e))}function Sa(t,e,n){if(t.tag===3)hW(t,t,n);else for(;e!==null;){if(e.tag===3){hW(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(cv===null||!cv.has(r))){t=u1(n,t),t=die(e,t,1),e=uv(e,t,1),t=su(),e!==null&&(MC(e,1,t),Hu(e,t));break}}e=e.return}}function jCe(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=su(),t.pingedLanes|=t.suspendedLanes&n,No===t&&(al&n)===n&&(go===4||go===3&&(al&130023424)===al&&500>La()-P8?S0(t,0):O8|=n),Hu(t,e)}function Rie(t,e){e===0&&(t.mode&1?(e=OI,OI<<=1,!(OI&130023424)&&(OI=4194304)):e=1);var n=su();t=Eg(t,e),t!==null&&(MC(t,e,n),Hu(t,n))}function zCe(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Rie(t,n)}function GCe(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Gt(314))}r!==null&&r.delete(e),Rie(t,n)}var Lie;Lie=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Uu.current)Mu=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Mu=!1,LCe(t,e,n);Mu=!!(t.flags&131072)}else Mu=!1,qs&&e.flags&1048576&&Mre(e,pR,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;pP(t,e),t=e.pendingProps;var i=s1(e,Pl.current);wE(e,n),i=A8(null,e,r,t,i,n);var s=w8();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Vu(r)?(s=!0,fR(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,y8(e),i.updater=yk,e.stateNode=i,i._reactInternals=e,z$(e,r,t,n),e=q$(null,e,r,!0,s,n)):(e.tag=0,qs&&s&&d8(e),Xl(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(pP(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=qCe(r),t=hf(r,t),i){case 0:e=W$(null,e,r,t,n);break e;case 1:e=rW(null,e,r,t,n);break e;case 11:e=tW(null,e,r,t,n);break e;case 14:e=nW(null,e,r,hf(r.type,t),n);break e}throw Error(Gt(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:hf(r,i),W$(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:hf(r,i),rW(t,e,r,i,n);case 3:e:{if(gie(e),t===null)throw Error(Gt(387));r=e.pendingProps,s=e.memoizedState,i=s.element,Hre(t,e),vR(e,r,null,n);var a=e.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=u1(Error(Gt(423)),e),e=iW(t,e,r,n,i);break e}else if(r!==i){i=u1(Error(Gt(424)),e),e=iW(t,e,r,n,i);break e}else for(Pc=lv(e.stateNode.containerInfo.firstChild),Lc=e,qs=!0,Af=null,n=Ure(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(a1(),r===i){e=Tg(t,e,n);break e}Xl(t,e,r,n)}e=e.child}return e;case 5:return jre(e),t===null&&V$(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,a=i.children,M$(r,i)?a=null:s!==null&&M$(r,s)&&
vendor: 9,653 bytes, line 51
51(e.flags|=32),pie(t,e),Xl(t,e,a,n),e.child;case 6:return t===null&&V$(e),null;case 13:return mie(t,e,n);case 4:return b8(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=o1(e,null,r,n):Xl(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:hf(r,i),tW(t,e,r,i,n);case 7:return Xl(t,e,e.pendingProps,n),e.child;case 8:return Xl(t,e,e.pendingProps.children,n),e.child;case 12:return Xl(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value,Es(gR,r._currentValue),r._currentValue=a,s!==null)if(Bf(s.value,a)){if(s.children===i.children&&!Uu.current){e=Tg(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=pg(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),H$(s.return,n,e),o.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===e.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Gt(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),H$(a,n,e),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===e){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Xl(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,wE(e,n),i=wd(i),r=r(i),e.flags|=1,Xl(t,e,r,n),e.child;case 14:return r=e.type,i=hf(r,e.pendingProps),i=hf(r.type,i),nW(t,e,r,i,n);case 15:return fie(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:hf(r,i),pP(t,e),e.tag=1,Vu(r)?(t=!0,fR(e)):t=!1,wE(e,n),uie(e,r,i),z$(e,r,i,n),q$(null,e,r,!0,t,n);case 19:return vie(t,e,n);case 22:return hie(t,e,n)}throw Error(Gt(156,e.tag))};function Die(t,e){return are(t,e)}function WCe(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yd(t,e,n,r){return new WCe(t,e,n,r)}function k8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qCe(t){if(typeof t=="function")return k8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===J6)return 11;if(t===e8)return 14}return 2}function fv(t,e){var n=t.alternate;return n===null?(n=yd(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function vP(t,e,n,r,i,s){var a=2;if(r=t,typeof t=="function")k8(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case HS:return E0(n.children,i,s,e);case X6:a=8,i|=8;break;case p$:return t=yd(12,n,e,i|2),t.elementType=p$,t.lanes=s,t;case g$:return t=yd(13,n,e,i),t.elementType=g$,t.lanes=s,t;case m$:return t=yd(19,n,e,i),t.elementType=m$,t.lanes=s,t;case jne:return Ek(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Vne:a=10;break e;case Hne:a=9;break e;case J6:a=11;break e;case e8:a=14;break e;case wm:a=16,r=null;break e}throw Error(Gt(130,t==null?t:typeof t,""))}return e=yd(a,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function E0(t,e,n,r){return t=yd(7,t,r,e),t.lanes=n,t}function Ek(t,e,n,r){return t=yd(22,t,r,e),t.elementType=jne,t.lanes=n,t.stateNode={isHidden:!1},t}function h3(t,e,n){return t=yd(6,t,null,e),t.lanes=n,t}function p3(t,e,n){return e=yd(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function KCe(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=KM(0),this.expirationTimes=KM(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=KM(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function N8(t,e,n,r,i,s,a,o,l){return t=new KCe(t,e,n,o,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=yd(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},y8(s),t}function YCe(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:VS,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function kie(t){if(!t)return wv;t=t._reactInternals;e:{if(ub(t)!==t||t.tag!==1)throw Error(Gt(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Vu(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Gt(171))}if(t.tag===1){var n=t.type;if(Vu(n))return kre(t,n,e)}return e}function Nie(t,e,n,r,i,s,a,o,l){return t=N8(n,r,!0,t,i,s,a,o,l),t.context=kie(null),n=t.current,r=su(),i=dv(n),s=pg(r,i),s.callback=e??null,uv(n,s,i),t.current.lanes=i,MC(t,i,r),Hu(t,r),t}function Tk(t,e,n,r){var i=e.current,s=su(),a=dv(i);return n=kie(n),e.context===null?e.context=n:e.pendingContext=n,e=pg(s,a),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=uv(i,e,a),t!==null&&(Lf(t,i,a,s),dP(t,i,a)),a}function _R(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function pW(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function M8(t,e){pW(t,e),(t=t.alternate)&&pW(t,e)}function ZCe(){return null}var Mie=typeof reportError=="function"?reportError:function(t){console.error(t)};function F8(t){this._internalRoot=t}Ak.prototype.render=F8.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Gt(409));Tk(t,e,null,null)};Ak.prototype.unmount=F8.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;M0(function(){Tk(null,t,null,null)}),e[Sg]=null}};function Ak(t){this._internalRoot=t}Ak.prototype.unstable_scheduleHydration=function(t){if(t){var e=hre();t={blockedOn:null,target:t,priority:e};for(var n=0;n<km.length&&e!==0&&e<km[n].priority;n++);km.splice(n,0,t),n===0&&gre(t)}};function $8(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function wk(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function gW(){}function QCe(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=_R(a);s.call(u)}}var a=Nie(e,r,t,0,null,!1,!1,"",gW);return t._reactRootContainer=a,t[Sg]=a.current,T_(t.nodeType===8?t.parentNode:t),M0(),a}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=_R(l);o.call(u)}}var l=N8(t,0,!1,null,null,!1,!1,"",gW);return t._reactRootContainer=l,t[Sg]=l.current,T_(t.nodeType===8?t.parentNode:t),M0(function(){Tk(e,l,n,r)}),l}function _k(t,e,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=_R(a);o.call(l)}}Tk(e,a,t,i)}else a=QCe(n,e,t,i,r);return _R(a)}dre=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=KA(e.pendingLanes);n!==0&&(r8(e,n|1),Hu(e,La()),!(hi&6)&&(c1=La()+500,kv()))}break;case 13:M0(function(){var r=Eg(t,1);if(r!==null){var i=su();Lf(r,t,1,i)}}),M8(t,1)}};i8=function(t){if(t.tag===13){var e=Eg(t,134217728);if(e!==null){var n=su();Lf(e,t,134217728,n)}M8(t,134217728)}};fre=function(t){if(t.tag===13){var e=dv(t),n=Eg(t,e);if(n!==null){var r=su();Lf(n,t,e,r)}M8(t,e)}};hre=function(){return Gi};pre=function(t,e){var n=Gi;try{return Gi=t,e()}finally{Gi=n}};C$=function(t,e,n){switch(e){case"input":if(b$(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=gk(r);if(!i)throw Error(Gt(90));Gne(r),b$(r,i)}}}break;case"textarea":qne(t,n);break;case"select":e=n.value,e!=null&&SE(t,!!n.multiple,e,!1)}};ere=R8;tre=M0;var XCe={usingClientEntryPoint:!1,Events:[$C,WS,gk,Xne,Jne,R8]},lA={findFiberByHostInstance:Qy,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},JCe={bundleType:lA.bundleType,version:lA.version,rendererPackageName:lA.rendererPackageName,rendererConfig:lA.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lg.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=ire(t),t===null?null:t.stateNode},findFiberByHostInstance:lA.findFiberByHostInstance||ZCe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
51if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var UI=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!UI.isDisabled&&UI.supportsFiber)try{dk=UI.inject(JCe),jh=UI}catch{}}$c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XCe;$c.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$8(e))throw Error(Gt(200));return YCe(t,e,null,n)};$c.createRoot=function(t,e){if(!$8(t))throw Error(Gt(299));var n=!1,r="",i=Mie;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=N8(t,1,!1,null,null,n,!1,r,i),t[Sg]=e.current,T_(t.nodeType===8?t.parentNode:t),new F8(e)};$c.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Gt(188)):(t=Object.keys(t).join(","),Error(Gt(268,t)));return t=ire(e),t=t===null?null:t.stateNode,t};$c.flushSync=function(t){return M0(t)};$c.hydrate=function(t,e,n){if(!wk(e))throw Error(Gt(200));return _k(null,t,e,!0,n)};$c.hydrateRoot=function(t,e,n){if(!$8(t))throw Error(Gt(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=Mie;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),e=Nie(e,null,t,1,n??null,i,!1,s,a),t[Sg]=e.current,T_(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Ak(e)};$c.render=function(t,e,n){if(!wk(e))throw Error(Gt(200));return _k(null,t,e,!1,n)};$c.unmountComponentAtNode=function(t){if(!wk(t))throw Error(Gt(40));return t._reactRootContainer?(M0(function(){_k(null,null,t,!1,function(){t._reactRootContainer=null,t[Sg]=null})}),!0):!1};$c.unstable_batchedUpdates=R8;$c.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!wk(n))throw Error(Gt(200));if(t==null||t._reactInternals===void 0)throw Error(Gt(38));return _k(t,e,n,!1,r)};$c.version="18.3.1-next-f1338f8080-20240426";function Fie(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fie)}catch(t){console.error(t)}}Fie(),Fne.exports=$c;var og=Fne.exports;const $ie=pi(og);var Bie={NODE_ENV:"production",API_ENV:"PROD",APP_VERSION:"2026.08.01",APP_MODE:"production",BASE_NAME:"/",BRAZE_API_KEY:"7db8fe11-bcd7-4943-995f-8c0238ab9742",BRAZE_SDK_ENDPOINT:"sdk.iad-03.braze.com",BRANCH_API_KEY:"key_live_ll3dzMaGWEEKCTJT94kaYnmlCCo2DVzp",GTM_ID:"GTM-P578B4Z",GTM_AUTH:"IfIvijNBOZKjZ6_PXOzRsQ",GTM_PREVIEW:"env-1",DISABLE_BRAZE:!1,LOG_LEVEL:0,DISABLE_XSTATE_INSPECTOR:!0,ENABLE_DEBUG:!1,USER_COOKIE_SYNC_URL:"https://sync.amperwave.net/sync/sync-cookies-lib.js"};function exe(t){const e=new Error(t);if(e.stack===void 0)try{throw e}catch{}return e}var txe=exe,wr=txe;function nxe(t){return!!t&&typeof t.then=="function"}var Ns=nxe;function rxe(t,e){if(t!=null)return t;throw wr(e??"Got unexpected null or undefined")}var Zs=rxe;function gr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ck{getValue(){throw wr("BaseLoadable")}toPromise(){throw wr("BaseLoadable")}valueMaybe(){throw wr("BaseLoadable")}valueOrThrow(){throw wr(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw wr("BaseLoadable")}promiseOrThrow(){throw wr(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw wr("BaseLoadable")}errorOrThrow(){throw wr(`Loadable expected error, but in "${this.state}" state`)}is(e){return e.state===this.state&&e.contents===this.contents}map(e){throw wr("BaseLoadable")}}class ixe extends Ck{constructor(e){super(),gr(this,"state","hasValue"),gr(this,"contents",void 0),this.contents=e}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(e){try{const n=e(this.contents);return Ns(n)?F0(n):d1(n)?n:UC(n)}catch(n){return Ns(n)?F0(n.next(()=>this.map(e))):xk(n)}}}class sxe extends Ck{constructor(e){super(),gr(this,"state","hasError"),gr(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(e){return this}}class Uie extends Ck{constructor(e){super(),gr(this,"state","loading"),gr(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(e){return F0(this.contents.then(n=>{const r=e(n);if(d1(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(Ns(n))return n.then(()=>this.map(e).contents);throw n}))}}function UC(t){return Object.freeze(new ixe(t))}function xk(t){return Object.freeze(new sxe(t))}function F0(t){return Object.freeze(new Uie(t))}function Vie(){return Object.freeze(new Uie(new Promise(()=>{})))}function axe(t){return t.every(e=>e.state==="hasValue")?UC(t.map(e=>e.contents)):t.some(e=>e.state==="hasError")?xk(Zs(t.find(e=>e.state==="hasError"),"Invalid loadable passed to loadableAll").contents):F0(Promise.all(t.map(e=>e.contents)))}function Hie(t){const n=(Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(i=>t[i])).map(i=>d1(i)?i:Ns(i)?F0(i):UC(i)),r=axe(n);return Array.isArray(t)?r:r.map(i=>Object.getOwnPropertyNames(t).reduce((s,a,o)=>({...s,[a]:i[o]}),{}))}function d1(t){return t instanceof Ck}const oxe={of:t=>Ns(t)?F0(t):d1(t)?t:UC(t),error:t=>xk(t),loading:()=>Vie(),all:Hie,isLoadable:d1};var cb={loadableWithValue:UC,loadableWithError:xk,loadableWithPromise:F0,loadableLoading:Vie,loadableAll:Hie,isLoadable:d1,RecoilLoadable:oxe},lxe=cb.loadableWithValue,uxe=cb.loadableWithError,cxe=cb.loadableWithPromise,dxe=cb.loadableLoading,fxe=cb.loadableAll,hxe=cb.isLoadable,pxe=cb.RecoilLoadable,VC=Object.freeze({__proto__:null,loadableWithValue:lxe,loadableWithError:uxe,loadableWithPromise:cxe,loadableLoading:dxe,loadableAll:fxe,isLoadable:h
vendor: 54,902 bytes, lines 51-53
51xe,RecoilLoadable:pxe});const sB={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function gxe(t,e){var n,r;const i=(n=Bie[t])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw wr(`process.env.${t} value must be 'true', 'false', or empty: ${i}`);e(i==="true")}function mxe(t,e){var n;const r=(n=Bie[t])===null||n===void 0?void 0:n.trim();r==null||r===""||e(r.split(/\s*,\s*|\s+/))}function vxe(){var t;typeof process>"u"||((t=process)===null||t===void 0?void 0:t.env)!=null&&(gxe("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",e=>{sB.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=e}),mxe("RECOIL_GKS_ENABLED",e=>{e.forEach(n=>{sB.RECOIL_GKS_ENABLED.add(n)})}))}vxe();var HC=sB;function Ik(t){return HC.RECOIL_GKS_ENABLED.has(t)}Ik.setPass=t=>{HC.RECOIL_GKS_ENABLED.add(t)};Ik.setFail=t=>{HC.RECOIL_GKS_ENABLED.delete(t)};Ik.clear=()=>{HC.RECOIL_GKS_ENABLED.clear()};var Ts=Ik;function yxe(t,e,{error:n}={}){return null}var bxe=yxe,zu=bxe,g3,m3,v3;const Sxe=(g3=mt.createMutableSource)!==null&&g3!==void 0?g3:mt.unstable_createMutableSource,jie=(m3=mt.useMutableSource)!==null&&m3!==void 0?m3:mt.unstable_useMutableSource,B8=(v3=mt.useSyncExternalStore)!==null&&v3!==void 0?v3:mt.unstable_useSyncExternalStore;let mW=!1;function Exe(){var t;const{ReactCurrentDispatcher:e,ReactCurrentOwner:n}=mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,i=((t=e==null?void 0:e.current)!==null&&t!==void 0?t:n.currentDispatcher).useSyncExternalStore!=null;return B8&&!i&&!mW&&(mW=!0,zu()),i}function Txe(){return Ts("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Ts("recoil_sync_external_store")&&B8!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Ts("recoil_mutable_source")&&jie!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Ts("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Ts("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}var U8={createMutableSource:Sxe,useMutableSource:jie,useSyncExternalStore:B8,currentRendererSupportsUseSyncExternalStore:Exe,reactMode:Txe};class V8{constructor(e){gr(this,"key",void 0),this.key=e}toJSON(){return{key:this.key}}}class zie extends V8{}class Gie extends V8{}function Axe(t){return t instanceof zie||t instanceof Gie}var Ok={AbstractRecoilValue:V8,RecoilState:zie,RecoilValueReadOnly:Gie,isRecoilValue:Axe},wxe=Ok.AbstractRecoilValue,_xe=Ok.RecoilState,Cxe=Ok.RecoilValueReadOnly,xxe=Ok.isRecoilValue,$0=Object.freeze({__proto__:null,AbstractRecoilValue:wxe,RecoilState:_xe,RecoilValueReadOnly:Cxe,isRecoilValue:xxe});function Ixe(t,...e){}var Oxe=Ixe,Wie=Oxe;function Pxe(t,e){return function*(){let n=0;for(const r of t)yield e(r,n++)}()}var Pk=Pxe;class qie{}const Rxe=new qie,f1=new Map,H8=new Map;function Lxe(t){return Pk(t,e=>Zs(H8.get(e)))}function Dxe(t){if(f1.has(t)){const e=`Duplicate atom key "${t}". This is a FATAL ERROR in
52      production. But it is safe to ignore this warning if it occurred because of
53      hot module replacement.`;console.warn(e)}}function kxe(t){HC.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&Dxe(t.key),f1.set(t.key,t);const e=t.set==null?new $0.RecoilValueReadOnly(t.key):new $0.RecoilState(t.key);return H8.set(t.key,e),e}class Nxe extends Error{}function Mxe(t){const e=f1.get(t);if(e==null)throw new Nxe(`Missing definition for RecoilValue: "${t}""`);return e}function Fxe(t){return f1.get(t)}const CR=new Map;function $xe(t){var e;if(!Ts("recoil_memory_managament_2020"))return;const n=f1.get(t);if(n!=null&&(e=n.shouldDeleteConfigOnRelease)!==null&&e!==void 0&&e.call(n)){var r;f1.delete(t),(r=Kie(t))===null||r===void 0||r(),CR.delete(t)}}function Bxe(t,e){Ts("recoil_memory_managament_2020")&&(e===void 0?CR.delete(t):CR.set(t,e))}function Kie(t){return CR.get(t)}var Gu={recoilValues:H8,registerNode:kxe,getNode:Mxe,getNodeMaybe:Fxe,deleteNodeConfigIfPossible:$xe,setConfigDeletionHandler:Bxe,getConfigDeletionHandler:Kie,recoilValuesForKeys:Lxe,DefaultValue:qie,DEFAULT_VALUE:Rxe};function Uxe(t,e){e()}var Vxe={enqueueExecution:Uxe};function Hxe(t,e){return e={exports:{}},t(e,e.exports),e.exports}var jxe=Hxe(function(t){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe},n={},r=5,i=Math.pow(2,r),s=i-1,a=i/2,o=i/4,l={},u=function(Ue){return function(){return Ue}},c=n.hash=function(Qe){var Ue=typeof Qe>"u"?"undefined":e(Qe);if(Ue==="number")return Qe;Ue!=="string"&&(Qe+="");for(var Rt=0,Ut=0,zt=Qe.length;Ut<zt;++Ut){var Yt=Qe.charCodeAt(Ut);Rt=(Rt<<5)-Rt+Yt|0}return Rt},d=function(Ue){return Ue-=Ue>>1&1431655765,Ue=(Ue&858993459)+(Ue>>2&858993459),Ue=Ue+(Ue>>4)&252645135,Ue+=Ue>>8,Ue+=Ue>>16,Ue&127},f=function(Ue,Rt){return Rt>>>Ue&s},h=function(Ue){return 1<<Ue},g=function(Ue,Rt){return d(Ue&Rt-1)},v=function(Ue,Rt,Ut,zt){var Yt=zt;if(!Ue){var vn=zt.length;Yt=new Array(vn);for(var nn=0;nn<vn;++nn)Yt[nn]=zt[nn]}return Yt[Rt]=Ut,Yt},b=function(Ue,Rt,Ut){var zt=Ut.length-1,Yt=0,vn=0,nn=Ut;if(Ue)Yt=vn=Rt;else for(nn=new Array(zt);Yt<Rt;)nn[vn++]=Ut[Yt++];for(++Yt;Yt<=zt;)nn[vn++]=Ut[Yt++];return Ue&&(nn.length=zt),nn},S=function(Ue,Rt,Ut,zt){var Yt=zt.length;if(Ue){for(var vn=Yt;vn>=Rt;)zt[vn--]=zt[vn];return zt[Rt]=Ut,zt}for(var nn=0,fn=0,tn=new Array(Yt+1);nn<Rt;)tn[fn++]=zt[nn++];for(tn[Rt]=Ut;nn<Yt;)tn[++fn]=zt[nn++];return tn},A=1,w=2,x=3,P=4,N={__hamt_isEmpty:!0},k=function(Ue){return Ue===N||Ue&&Ue.__hamt_isEmpty},U=function(Ue,Rt,Ut,zt){return{type:A,edit:Ue,hash:Rt,key:Ut,value:zt,_modify:G}},H=function(Ue,Rt,Ut){return{type:w,edit:Ue,hash:Rt,children:Ut,_modify:ie}},B=function(Ue,Rt,Ut){return{type:x,edit:Ue,mask:Rt,children:Ut,_modify:ae}},q=function(Ue,Rt,Ut){return{type:P,edit:Ue,size:Rt,children:Ut,_modify:ue}},Z=function(Ue){return Ue===N||Ue.type===A||Ue.type===w},C=function(Ue,Rt,Ut,zt,Yt){for(var vn=[],nn=zt,fn=0,tn=0;nn;++tn)nn&1&&(vn[tn]=Yt[fn++]),nn>>>=1;return vn[Rt]=Ut,q(Ue,fn+1,vn)},L=function(Ue,Rt,Ut,zt){for(var Yt=new Array(Rt-1),vn=0,nn=0,fn=0,tn=zt.length;fn<tn;++fn)if(fn!==Ut){var $n=zt[fn];$n&&!k($n)&&(Yt[vn++]=$n,nn|=1<<fn)}return B(Ue,nn,Yt)},V=function Qe(Ue,Rt,Ut,zt,Yt,vn){if(Ut===Yt)return H(Ue,Ut,[vn,zt]);var nn=f(Rt,Ut),fn=f(Rt,Yt);return B(Ue,h(nn)|h(fn),nn===fn?[Qe(Ue,Rt+r,Ut,zt,Yt,vn)]:nn<fn?[zt,vn]:[vn,zt])},j=function(Ue,Rt,Ut,zt,Yt,vn,nn,fn){for(var tn=Yt.length,$n=0;$n<tn;++$n){var Hr=Yt[$n];if(Ut(nn,Hr.key)){var dr=Hr.value,jr=vn(dr);return jr===dr?Yt:jr===l?(--fn.value,b(Ue,$n,Yt)):v(Ue,$n,U(Rt,zt,nn,jr),Yt)}}var as=vn();return as===l?Yt:(++fn.value,v(Ue,tn,U(Rt,zt,nn,as),Yt))},X=function(Ue,Rt){return Ue===Rt.edit},G=function(Ue,Rt,Ut,zt,Yt,vn,nn){if(Rt(vn,this.key)){var fn=zt(this.value);return fn===this.value?this:fn===l?(--nn.value,N):X(Ue,this)?(this.value=fn,this):U(Ue,Yt,vn,fn)}var tn=zt();return tn===l?this:(++nn.value,V(Ue,Ut,this.hash,this,Yt,U(Ue,Yt,vn,tn)))},ie=function(Ue,Rt,Ut,zt,Yt,vn,nn){if(Yt===this.hash){var fn=X(Ue,this),tn=j(fn,Ue,Rt,this.hash,this.children,zt,vn,nn);return tn===this.children?this:tn.length>1?H(Ue,this.hash,tn):tn[0]}var $n=zt();return $n===l?this:(++nn.value,V(Ue,Ut,this.hash,this,Yt,U(Ue,Yt,vn,$n)))},ae=function(Ue,Rt,Ut,zt,Yt,vn,nn){var fn=this.mask,tn=this.children,$n=f(Ut,Yt),Hr=h($n),dr=g(fn,Hr),jr=fn&Hr,as=jr?tn[dr]:N,ci=as._modify(Ue,Rt,Ut+r,zt,Yt,vn,nn);if(as===ci)return this;var yt=X(Ue,this),_i=fn,$i=void 0;if(jr&&k(ci)){if(_i&=~Hr,!_i)return N;if(tn.length<=2&&Z(tn[dr^1]))return tn[dr^1];$i=b(yt,dr,tn)}else if(!jr&&!k(ci)){if(tn.length>=a)return C(Ue,$n,ci,fn,tn);_i|=Hr,$i=S(yt,dr,ci,tn)}else $i=v(yt,dr,ci,tn);return yt?(this.mask=_i,this.children=$i,this):B(Ue,_i,$i)},ue=function(Ue,Rt,Ut,zt,Yt,vn,nn){var fn=this.size,tn=this.children,$n=f(Ut,Yt),Hr=tn[$n],dr=(Hr||N)._modify(Ue,Rt,Ut+r,zt,Yt,vn,nn);if(Hr===dr)return this;var jr=X(Ue,this),as=void 0;if(k(Hr)&&!k(dr))++fn,as=v(jr,$n,dr,tn);else if(!k(Hr)&&k(dr)){if(--fn,fn<=o)return L(Ue,fn,$n,tn);as=v(jr,$n,N,tn)}else as=v(jr,$n,dr,tn);return jr?(this.size=fn,this.children=as,this):q(Ue,fn,as)};N._modify=function(Qe,Ue,Rt,Ut,zt,Yt,vn){var nn=Ut();return nn===l?N:(++vn.value,U(Qe,zt,Yt,nn))};function Q(Qe,Ue,Rt,Ut,zt){this._editable=Qe,this._edit=Ue,this._config=Rt,this._root=Ut,this._size=zt}Q.prototype.setTree=function(Qe,Ue){return this._editable?(this._root=Qe,this._size=Ue,this):Qe===this._root?this:new Q(this._editable,this._edit,this._config,Qe,Ue)};var de=n.tryGetHash=function(Qe,Ue,Rt,Ut){for(var zt=Ut._root,Yt=0,vn=Ut._config.keyEq;;)switch(zt.type){case A:return vn(Rt,zt.key)?zt.value:Qe;case w:{if(Ue===zt.hash)for(var nn=zt.children,fn=0,tn=nn.length;fn<tn;++fn){var $n=nn[fn];if(vn(Rt,$n.key))return $n.value}return Qe}case x:{var Hr=f(Yt,Ue),dr=h(Hr);if(zt.mask&dr){zt=zt.children[g(zt.mask,dr)],Yt+=r;break}return Qe}case P:{if(zt=zt.children[f(Yt,Ue)],zt){Yt+=r;break}return Qe}default:return Qe}};Q.prototype.tryGetHash=function(Qe,Ue,Rt){return de(Qe,Ue,Rt,this)};var le=n.tryGet=function(Qe,Ue,Rt){return de(Qe,Rt._config.hash(Ue),Ue,Rt)};Q.prototype.tryGet=function(Qe,Ue){return le(Qe,Ue,this)};var ye=n.getHash=function(Qe,Ue,Rt){return de(void 0,Qe,Ue,Rt)};Q.prototype.getHash=function(Qe,Ue){return ye(Qe,Ue,this)},n.get=function(Qe,Ue){return de(void 0,Ue._config.hash(Qe),Qe,Ue)},Q.prototype.get=function(Qe,Ue){return le(Ue,Qe,this)};var fe=n.has=function(Qe,Ue,Rt){return de(l,Qe,Ue,Rt)!==l};Q.prototype.hasHash=function(Qe,Ue){return fe(Qe,Ue,this)};var We=n.has=function(Qe,Ue){return fe(Ue._config.hash(Qe),Qe,Ue)};Q.prototype.has=function(Qe){return We(Qe,this)};var Le=function(Ue,Rt){return Ue===Rt};n.make=function(Qe){return new Q(0,0,{keyEq:Qe&&Qe.keyEq||Le,hash:Qe&&Qe.hash||c},N,0)},n.empty=n.make();var Ve=n.isEmpty=function(Qe){return Qe&&!!k(Qe._root)};Q.prototype.isEmpty=function(){return Ve(this)};var at=n.modifyHash=function(Qe,Ue,Rt,Ut){var zt={value:Ut._size},Yt=Ut._root._modify(Ut._editable?Ut._edit:NaN,Ut._config.keyEq,0,Qe,Ue,Rt,zt);return Ut.setTree(Yt,zt.value)};Q.prototype.modifyHash=function(Qe,Ue,Rt){return at(Rt,Qe,Ue,this)};var Et=n.modify=function(Qe,Ue,Rt){return at(Qe,Rt._config.hash(Ue),Ue,Rt)};Q.prototype.modify=function(Qe,Ue){return Et(Ue,Qe,this)};var ne=n.setHash=function(Qe,Ue,Rt,Ut){return at(u(Rt),Qe,Ue,Ut)};Q.prototype.setHash=function(Qe,Ue,Rt){return ne(Qe,Ue,Rt,this)};var Ze=n.set=function(Qe,Ue,Rt){return ne(Rt._config.hash(Qe),Qe,Ue,Rt)};Q.prototype.set=function(Qe,Ue){return Ze(Qe,Ue,this)};var lt=u(l),ot=n.removeHash=function(Qe,Ue,Rt){return at(lt,Qe,Ue,Rt)};Q.prototype.removeHash=Q.prototype.deleteHash=function(Qe,Ue){return ot(Qe,Ue,this)};var se=n.remove=function(Qe,Ue){return ot(Ue._config.hash(Qe),Qe,Ue)};Q.prototype.remove=Q.prototype.delete=function(Qe){return se(Qe,this)};var Fe=n.beginMutation=function(Qe){return new Q(Qe._editable+1,Qe._edit+1,Qe._config,Qe._root,Qe._size)};Q.prototype.beginMutation=function(){return Fe(this)};var ht=n.endMutation=function(Qe){return Qe._editable=Qe._editable&&Qe._editable-1,Qe};Q.prototype.endMutation=function(){return ht(this)};var Ct=n.mutate=function(Qe,Ue){var Rt=Fe(Ue);return Qe(Rt),ht(Rt)};Q.prototype.mutate=function(Qe){return Ct(Qe,this)};var pt=function(Ue){return Ue&&me(Ue[0],Ue[1],Ue[2],Ue[3],Ue[4])},me=function(Ue,Rt,Ut,zt,Yt){for(;Ut<Ue;){var vn=Rt[Ut++];if(vn&&!k(vn))return De(vn,zt,[Ue,Rt,Ut,zt,Yt])}return pt(Yt)},De=function(Ue,Rt,Ut){switch(Ue.type){case A:return{value:Rt(Ue),rest:Ut};case w:case P:case x:var zt=Ue.children;return me(zt.length,zt,0,Rt,Ut);default:return pt(Ut)}},Me={done:!0};function qe(Qe){this.v=Qe}qe.prototype.next=function(){if(!this.v)return Me;var Qe=this.v;return this.v=pt(Qe.rest),Qe},qe.prototype[Symbol.iterator]=function(){return this};var ut=function(Ue,Rt){return new qe(De(Ue._root,Rt))},Tt=function(Ue){return[Ue.key,Ue.value]},jt=n.entries=function(Qe){return ut(Qe,Tt)};Q.prototype.entries=Q.prototype[Symbol.iterator]=function(){return jt(this)};var on=function(Ue){return Ue.key},wn=n.keys=function(Qe){return ut(Qe,on)};Q.prototype.keys=function(){return wn(this)};var kr=function(Ue){return Ue.value},Ir=n.values=Q.prototype.values=function(Qe){return ut(Qe,kr)};Q.prototype.values=function(){return Ir(this)};var gi=n.fold=function(Qe,Ue,Rt){var Ut=Rt._root;if(Ut.type===A)return Qe(Ue,Ut.value,Ut.key);for(var zt=[Ut.children],Yt=void 0;Yt=zt.pop();)for(var vn=0,nn=Yt.length;vn<nn;){var fn=Yt[vn++];fn&&fn.type&&(fn.type===A?Ue=Qe(Ue,fn.value,fn.key):zt.push(fn.children))}return Ue};Q.prototype.fold=function(Qe,Ue){return gi(Qe,Ue,this)};var Ln=n.forEach=function(Qe,Ue){return gi(function(Rt,Ut,zt){return Qe(Ut,zt,Ue)},null,Ue)};Q.prototype.forEach=function(Qe){return Ln(Qe,this)};var Ua=n.count=function(Qe){return Qe._size};Q.prototype.count=function(){return Ua(this)},Object.defineProperty(Q.prototype,"size",{get:Q.prototype.count}),t.exports?t.exports=n:(void 0).hamt=n});class zxe{constructor(e){gr(this,"_map",void 0),this._map=new Map(e==null?void 0:e.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(e){return this._map.get(e)}has(e){return this._map.has(e)}set(e,n){return this._map.set(e,n),this}delete(e){return this._map.delete(e),this}clone(){return z8(this)}toMap(){return new Map(this._map)}}class j8{constructor(e){if(gr(this,"_hamt",jxe.empty.beginMutation()),e instanceof j8){const n=e._hamt.endMutation();e._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(e)for(const[n,r]of e.entries())this._hamt.set(n,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(e){return this._hamt.get(e)}has(e){return this._hamt.has(e)}set(e,n){return this._hamt.set(e,n),this}delete(e){return this._hamt.delete(e),this}clone(){return z8(this)}toMap(){return new Map(this._hamt)}}function z8(t){return Ts("recoil_hamt_2020")?new j8(t):new zxe(t)}var Gxe={persistentMap:z8},Wxe=Gxe.persistentMap,qxe=Object.freeze({__proto__:null,persistentMap:Wxe});function Kxe(t,...e){const n=new Set;e:for(const r of t){for(const i of e)if(i.has(r))continue e;n.add(r)}return n}var vW=Kxe;function Yxe(t,e){const n=new Map;return t.forEach((r,i)=>{n.set(i,e(r,i))}),n}var yW=Yxe;function Zxe(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function Qxe(t){return{nodeDeps:yW(t.nodeDeps,e=>new Set(e)),nodeToNodeSubscriptions:yW(t.nodeToNodeSubscriptions,e=>new Set(e))}}function y3(t,e,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:s}=n,a=i.get(t);if(a&&r&&a!==r.nodeDeps.get(t))return;i.set(t,e);const o=a==null?e:vW(e,a);for(const l of o)s.has(l)||s.set(l,new Set),Zs(s.get(l)).add(t);if(a){const l=vW(a,e);for(const u of l){if(!s.has(u))return;const c=Zs(s.get(u));c.delete(t),c.size===0&&s.delete(u)}}}function Xxe(t,e,n,r){var i,s,a,o;const l=n.getState();r===l.currentTree.version||r===((i=l.nextTree)===null||i===void 0?void 0:i.version)||r===((s=l.previousTree)===null||s===void 0?void 0:s.version)||zu();const u=n.getGraph(r);if(y3(t,e,u),r===((a=l.previousTree)===null||a===void 0?void 0:a.version)){const d=n.getGraph(l.currentTree.version);y3(t,e,d,u)}if(r===((o=l.previousTree)===null||o===void 0?void 0:o.version)||r===l.currentTree.version){var c;const d=(c=l.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const f=n.getGraph(d);y3(t,e,f,u)}}}var jC={cloneGraph:Qxe,graph:Zxe,saveDepsToStore:Xxe};let Jxe=0;const eIe=()=>Jxe++;let tIe=0;const nIe=()=>tIe++;let rIe=0;const iIe=()=>rIe++;var Rk={getNextTreeStateVersion:eIe,getNextStoreID:nIe,getNextComponentID:iIe};const{persistentMap:bW}=qxe,{graph:sIe}=jC,{getNextTreeStateVersion:Yie}=Rk;function aIe(){const t=Yie();return{version:t,stateID:t,transactionMetadata:{},dirtyAtoms:new Set,atomValues:bW(),nonvalidatedAtoms:bW()}}function oIe(){const t=aIe();return{currentTree:t,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(t.version,sIe()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var Zie={makeEmptyStoreState:oIe,getNextTreeStateVersion:Yie};class lIe{}var G8={RetentionZone:lIe};function uIe(t,e){const n=new Set(t);return n.add(e),n}var cIe={setByAddingToSet:uIe};function*dIe(t,e){let n=0;for(const r of t)e(r,n++)&&(yield r)}var W8=dIe;function fIe(t,e){return new Proxy(t,{get:(r,i)=>(!(i in r)&&i in e&&(r[i]=e[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var Qie=fIe;const{getNode:zC,getNodeMaybe:hIe,recoilValuesForKeys:SW}=Gu,{RetentionZone:EW}=G8,{setByAddingToSet:pIe}=cIe,gIe=Object.freeze(new Set);class mIe extends Error{}function vIe(t,e,n){if(!Ts("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=t.getState().retention;function i(s){let a=r.get(s);a||r.set(s,a=new Set),a.add(e)}if(n instanceof EW)i(n);else if(Array.isArray(n))for(const s of n)i(s);return()=>{if(!Ts("recoil_memory_managament_2020"))return;const{retention:s}=t.getState();function a(o){const l=s.nodesRetainedByZone.get(o);l==null||l.delete(e),l&&l.size===0&&s.nodesRetainedByZone.delete(o)}if(n instanceof EW)a(n);else if(Array.isArray(n))for(const o of n)a(o)}}function q8(t,e,n,r){const i=t.getState();if(i.nodeCleanupFunctions.has(n))return;const s=zC(n),a=vIe(t,n,s.retainedBy),o=s.init(t,e,r);i.nodeCleanupFunctions.set(n,()=>{o(),a()})}function yIe(t,e,n){q8(t,t.getState().currentTree,e,n)}function bIe(t,e){var n;const r=t.getState();(n=r.nodeCleanupFunctions.get(e))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(e)}function SIe(t,e,n){return q8(t,e,n,"get"),zC(n).get(t,e)}function Xie(t,e,n){return zC(n).peek(t,e)}function EIe(t,e,n){var r;const i=hIe(e);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,t),{...t,atomValues:t.atomValues.clone().delete(e),nonvalidatedAtoms:t.nonvalidatedAtoms.clone().set(e,n),dirtyAtoms:pIe(t.dirtyAtoms,e)}}function TIe(t,e,n,r){const i=zC(n);if(i.set==null)throw new mIe(`Attempt to set read-only RecoilValue: ${n}`);const s=i.set;return q8(t,e,n,"set"),s(t,e,r)}function AIe(t,e,n){const r=t.getState(),i=t.getGraph(e.version),s=zC(n).nodeType;return Qie({type:s},{loadable:()=>Xie(t,e,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>s==="selector"?!1:e.atomValues.has(n),isModified:()=>e.dirtyAtoms.has(n),deps:()=>{var a;return SW((a=i.nodeDeps.get(n))!==null&&a!==void 0?a:[])},subscribers:()=>{var a,o;return{nodes:SW(W8(Jie(t,e,new Set([n])),l=>l!==n)),components:Pk((a=(o=r.nodeToComponentSubscriptions.get(n))===null||o===void 0?void 0:o.values())!==null&&a!==void 0?a:[],([l])=>({name:l}))}}})}function Jie(t,e,n){const r=new Set,i=Array.from(n),s=t.getGraph(e.version);for(let o=i.pop();o;o=i.pop()){var a;r.add(o);const l=(a=s.nodeToNodeSubscriptions.get(o))!==null&&a!==void 0?a:gIe;for(const u of l)r.has(u)||i.push(u)}return r}var db={getNodeLoadable:SIe,peekNodeLoadable:Xie,setNodeValue:TIe,initializeNode:yIe,cleanUpNode:bIe,setUnvalidatedAtomValue_DEPRECATED:EIe,peekNodeInfo:AIe,getDownstreamNodes:Jie};let ese=null;function wIe(t){ese=t}function _Ie(){var t;(t=ese)===null||t===void 0||t()}var tse={setInvalidateMemoizedSnapshot:wIe,invalidateMemoizedSnapshot:_Ie};const{getDownstreamNodes:CIe,getNodeLoadable:nse,setNodeValue:xIe}=db,{getNextComponentID:IIe}=Rk,{getNode:OIe,getNodeMaybe:rse}=Gu,{DefaultValue:K8}=Gu,{reactMode:PIe}=U8,{AbstractRecoilValue:RIe,RecoilState:TNt,RecoilValueReadOnly:ANt,isRecoilValue:wNt}=$0,{invalidateMemoizedSnapshot:LIe}=tse;function DIe(t,{key:e},n=t.getState().currentTree){var r,i;const s=t.getState();n.version===s.currentTree.version||n.version===((r=s.nextTree)===null||r===void 0?void 0:r.version)||n.version===((i=s.previousTree)===null||i===void 0?void 0:i.version)||zu();const a=nse(t,n,e);return a.state==="loading"&&a.contents.catch(()=>{}),a}function kIe(t,e){const n=t.clone();return e.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof K8?n.delete(i):n.set(i,r)}),n}function NIe(t,e,{key:n},r){if(typeof r=="function"){const i=nse(t,e,n);if(i.state==="loading"){const s=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw zu(),wr(s)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function MIe(t,e,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:s}=n,a=NIe(t,e,i,s),o=xIe(t,e,i.key,a);for(const[l,u]of o.entries())aB(e,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:s}=n;aB(e,i,s)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;e.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:s}=n,a=rse(i);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,e),e.atomValues.delete(i),e.nonvalidatedAtoms.set(i,s),e.dirtyAtoms.add(i)}else zu(`Unknown action ${n.type}`)}function aB(t,e,n){n.state==="hasValue"&&n.contents instanceof K8?t.atomValues.delete(e):t.atomValues.set(e,n),t.dirtyAtoms.add(e),t.nonvalidatedAtoms.delete(e)}function ise(t,e){t.replaceState(n=>{const r=sse(n);for(const i of e)MIe(t,r,i);return ase(t,r),LIe(),r})}function Lk(t,e){if(Ow.length){const n=Ow[Ow.length-1];let r=n.get(t);r||n.set(t,r=[]),r.push(e)}else ise(t,[e])}const Ow=[];function FIe(){const t=new Map;return Ow.push(t),()=>{for(const[n,r]of t)ise(n,r);Ow.pop()!==t&&zu()}}function sse(t){return{...t,atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(t.dirtyAtoms)}}function ase(t,e){const n=CIe(t,e,e.dirtyAtoms);for(const s of n){var r,i;(r=rse(s))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,e)}}function ose(t,e,n){Lk(t,{type:"set",recoilValue:e,valueOrUpdater:n})}function $Ie(t,e,n){if(n instanceof K8)return ose(t,e,n);Lk(t,{type:"setLoadable",recoilValue:e,loadable:n})}function BIe(t,e){Lk(t,{type:"markModified",recoilValue:e})}function UIe(t,e,n){Lk(t,{type:"setUnvalidated",recoilValue:e,unvalidatedValue:n})}function VIe(t,{key:e},n,r=null){const i=IIe(),s=t.getState();s.nodeToComponentSubscriptions.has(e)||s.nodeToComponentSubscriptions.set(e,new Map),Zs(s.nodeToComponentSubscriptions.get(e)).set(i,[r??"<not captured>",n]);const a=PIe();if(a.early&&(a.mode==="LEGACY"||a.mode==="MUTABLE_SOURCE")){const o=t.getState().nextTree;o&&o.dirtyAtoms.has(e)&&n(o)}return{release:()=>{const o=t.getState(),l=o.nodeToComponentSubscriptions.get(e);if(l===void 0||!l.has(i)){zu();return}l.delete(i),l.size===0&&o.nodeToComponentSubscriptions.delete(e)}}}function HIe(t,e){var n;const{currentTree:r}=t.getState(),i=OIe(e.key);(n=i.clearCache)===null||n===void 0||n.call(i,t,r)}var sp={AbstractRecoilValue:RIe,getRecoilValueAsLoadable:DIe,setRecoilValue:ose,setRecoilValueLoadable:$Ie,markRecoilValueModified:BIe,setUnvalidatedRecoilValue:UIe,subscribeToRecoilValue:VIe,applyAtomValueWrites:kIe,batchStart:FIe,writeLoadableToTreeState:aB,invalidateDownstreams:ase,copyTreeState:sse,refreshRecoilValue:HIe};function jIe(t,e,n){const r=t.entries();let i=r.next();for(;!i.done;){const s=i.value;if(e.call(n,s[1],s[0],t))return!0;i=r.next()}return!1}var zIe=jIe;const{cleanUpNode:GIe}=db,{deleteNodeConfigIfPossible:WIe,getNode:lse}=Gu,{RetentionZone:use}=G8,qIe=12e4,cse=new Set;function dse(t,e){const n=t.getState(),r=n.currentTree;if(n.nextTree){zu();return}const i=new Set;for(const a of e)if(a instanceof use)for(const o of QIe(n,a))i.add(o);else i.add(a);const s=KIe(t,i);for(const a of s)ZIe(t,r,a)}function KIe(t,e){const n=t.getState(),r=n.currentTree,i=t.getGraph(r.version),s=new Set,a=new Set;return o(e),s;function o(l){const u=new Set,c=YIe(t,r,l,s,a);for(const g of c){var d;if(lse(g).retainedBy==="recoilRoot"){a.add(g);continue}if(((d=n.retention.referenceCounts.get(g))!==null&&d!==void 0?d:0)>0){a.add(g);continue}if(fse(g).some(b=>n.retention.referenceCounts.get(b))){a.add(g);continue}const v=i.nodeToNodeSubscriptions.get(g);if(v&&zIe(v,b=>a.has(b))){a.add(g);continue}s.add(g),u.add(g)}const f=new Set;for(const g of u)for(const v of(h=i.nodeDeps.get(g))!==null&&h!==void 0?h:cse){var h;s.has(v)||f.add(v)}f.size&&o(f)}}function YIe(t,e,n,r,i){const s=t.getGraph(e.version),a=[],o=new Set;for(;n.size>0;)l(Zs(n.values().next().value));return a;function l(u){if(r.has(u)||i.has(u)){n.delete(u);return}if(o.has(u))return;const c=s.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)l(d);o.add(u),n.delete(u),a.push(u)}}function ZIe(t,e,n){if(!Ts("recoil_memory_managament_2020"))return;GIe(t,n);const r=t.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=fse(n);for(const l of i){var s;(s=r.retention.nodesRetainedByZone.get(l))===null||s===void 0||s.delete(n)}e.atomValues.delete(n),e.dirtyAtoms.delete(n),e.nonvalidatedAtoms.delete(n);const a=r.graphsByVersion.get(e.version);if(a){const l=a.nodeDeps.get(n);if(l!==void 0){a.nodeDeps.delete(n);for(const u of l){var o;(o=a.nodeToNodeSubscriptions.get(u))===null||o===void 0||o.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}WIe(n)}function QIe(t,e){var n;return(n=t.retention.nodesRetainedByZone.get(e))!==null&&n!==void 0?n:cse}function fse(t){const e=lse(t).retainedBy;return e===void 0||e==="components"||e==="recoilRoot"?[]:e instanceof use?[e]:e}function XIe(t,e){const n=t.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(e):dse(t,new Set([e]))}function JIe(t,e,n){var r;if(!Ts("recoil_memory_managament_2020"))return;const i=t.getState().retention.referenceCounts,s=((r=i.get(e))!==null&&r!==void 0?r:0)+n;s===0?eOe(t,e):i.set(e,s)}function eOe(t,e){if(!Ts("recoil_memory_managament_2020"))return;t.getState().retention.referenceCounts.delete(e),XIe(t,e)}function tOe(t){if(!Ts("recoil_memory_managament_2020"))return;const e=t.getState();dse(t,e.retention.retainablesToCheckForRelease),e.retention.retainablesToCheckForRelease.clear()}function nOe(t){return t===void 0?"recoilRoot":t}var Z1={SUSPENSE_TIMEOUT_MS:qIe,updateRetainCount:JIe,releaseScheduledRetainablesNow:tOe,retainedByOptionWithDefault:nOe};const{unstable_batchedUpdates:rOe}=$ie;var iOe={unstable_batchedUpdates:rOe};const{unstable_batchedUpdates:sOe}=iOe;var aOe={unstable_batchedUpdates:sOe};const{batchStart:oOe}=sp,{unstable_batchedUpdates:lOe}=aOe;let uOe=lOe||(t=>t());const cOe=t=>{uOe(()=>{let e=()=>{};try{e=oOe(),t()}finally{e()}})};var Y8={batchUpdates:cOe};function*dOe(t){for(const e of t)for(const n of e)yield n}var hse=dOe;const fOe=typeof Window>"u"||typeof window>"u";var Z8={isSSR:fOe};function hOe(t,e){let n,r;return[(...a)=>{const o=e(...a);return n===o||(n=o,r=t(...a)),r},()=>{n=null}]}var pOe={memoizeOneWithArgsHashAndInvalidation:hOe};const{batchUpdates:oB}=Y8,{initializeNode:gOe,peekNodeInfo:mOe}=db,{graph:vOe}=jC,{getNextStoreID:yOe}=Rk,{DEFAULT_VALUE:bOe,recoilValues:TW,recoilValuesForKeys:AW}=Gu,{AbstractRecoilValue:SOe,getRecoilValueAsLoadable:EOe,setRecoilValue:wW,setUnvalidatedRecoilValue:TOe}=sp,{updateRetainCount:yP}=Z1,{setInvalidateMemoizedSnapshot:AOe}=tse,{getNextTreeStateVersion:wOe,makeEmptyStoreState:_Oe}=Zie,{isSSR:COe}=Z8,{memoizeOneWithArgsHashAndInvalidation:xOe}=pOe;class Dk{constructor(e,n){gr(this,"_store",void 0),gr(this,"_refCount",1),gr(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),EOe(this._store,r))),gr(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),gr(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const a=this._store.getState().currentTree;return AW(a.dirtyAtoms)}const i=this._store.getState().knownAtoms,s=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?TW.values():r.isInitialized===!0?AW(hse([i,s])):W8(TW.values(),({key:a})=>!i.has(a)&&!s.has(a))}),gr(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),mOe(this._store,this._store.getState().currentTree,r))),gr(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new lB(this,oB);return r(i),i}),gr(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new lB(this,oB);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:yOe(),parentStoreID:n,getState:()=>e,replaceState:r=>{e.currentTree=r(e.currentTree)},getGraph:r=>{const i=e.graphsByVersion;if(i.has(r))return Zs(i.get(r));const s=vOe();return i.set(r,s),s},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw wr("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)gOe(this._store,r,"get"),yP(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0&&zu(),this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){COe||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(e=>e()),this._store.getState().nodeCleanupFunctions.clear(),!Ts("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Ts("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function pse(t,e,n=!1){const r=t.getState(),i=n?wOe():e.version;return{currentTree:{version:n?i:e.version,stateID:n?i:e.stateID,transactionMetadata:{...e.transactionMetadata},dirtyAtoms:new Set(e.dirtyAtoms),atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,t.getGraph(e.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Pk(r.nodeCleanupFunctions.entries(),([s])=>[s,()=>{}]))}}function IOe(t){const e=new Dk(_Oe());return t!=null?e.map(t):e}const[_W,gse]=xOe((t,e)=>{var n;const r=t.getState(),i=e==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Zs(r.previousTree);return new Dk(pse(t,i),t.storeID)},(t,e)=>{var n,r;return String(e)+String(t.storeID)+String((n=t.getState().nextTree)===null||n===void 0?void 0:n.version)+String(t.getState().currentTree.version)+String((r=t.getState().previousTree)===null||r===void 0?void 0:r.version)});AOe(gse);function OOe(t,e="latest"){const n=_W(t,e);return n.isRetained()?n:(gse(),_W(t,e))}class lB extends Dk{constructor(e,n){super(pse(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID()),gr(this,"_batch",void 0),gr(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const s=this.getStore_INTERNAL();this._batch(()=>{yP(s,r.key,1),wW(this.getStore_INTERNAL(),r,i)})}),gr(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{yP(i,r.key,1),wW(this.getStore_INTERNAL(),r,bOe)})}),gr(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();oB(()=>{for(const[s,a]of r.entries())yP(i,s,1),TOe(i,new SOe(s),a)})}),this._batch=n}}var kk={Snapshot:Dk,MutableSnapshot:lB,freshSnapshot:IOe,cloneSnapshot:OOe},POe=kk.Snapshot,ROe=kk.MutableSnapshot,LOe=kk.freshSnapshot,DOe=kk.cloneSnapshot,Nk=Object.freeze({__proto__:null,Snapshot:POe,MutableSnapshot:ROe,freshSnapshot:LOe,cloneSnapshot:DOe});function kOe(...t){const e=new Set;for(const n of t)for(const r of n)e.add(r);return e}var NOe=kOe;const{useRef:MOe}=mt;function FOe(t){const e=MOe(t);return e.current===t&&typeof t=="function"&&(e.current=t()),e}var CW=FOe;const{getNextTreeStateVersion:$Oe,makeEmptyStoreState:mse}=Zie,{cleanUpNode:BOe,getDownstreamNodes:UOe,initializeNode:VOe,setNodeValue:HOe,setUnvalidatedAtomValue_DEPRECATED:jOe}=db,{graph:zOe}=jC,{cloneGraph:GOe}=jC,{getNextStoreID:vse}=Rk,{createMutableSource:b3,reactMode:yse}=U8,{applyAtomValueWrites:WOe}=sp,{releaseScheduledRetainablesNow:bse}=Z1,{freshSnapshot:qOe}=Nk,{useCallback:KOe,useContext:Sse,useEffect:uB,useMemo:YOe,useRef:ZOe,useState:QOe}=mt;function uA(){throw wr("This component must be used inside a <RecoilRoot> component.")}const Ese=Object.freeze({storeID:vse(),getState:uA,replaceState:uA,getGraph:uA,subscribeToTransactions:uA,addTransactionMetadata:uA});let cB=!1;function xW(t){if(cB)throw wr("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const e=t.getState();if(e.nextTree===null){Ts("recoil_memory_managament_2020")&&Ts("recoil_release_on_cascading_update_killswitch_2021")&&e.commitDepth>0&&bse(t);const n=e.currentTree.version,r=$Oe();e.nextTree={...e.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},e.graphsByVersion.set(r,GOe(Zs(e.graphsByVersion.get(n))))}}const Tse=mt.createContext({current:Ese}),Q8=()=>Sse(Tse),Ase=mt.createContext(null);function XOe(){const t=Sse(Ase);return t==null&&Wie(),t}function wse(t,e,n){const r=UOe(t,n,n.dirtyAtoms);for(const i of r){const s=e.nodeToComponentSubscriptions.get(i);if(s)for(const[a,[o,l]]of s)l(n)}}function JOe(t){const e=t.getState(),n=e.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,s]of e.nodeTransactionSubscriptions)if(r.has(i))for(const[a,o]of s)o(t);for(const[i,s]of e.transactionSubscriptions)s(t);(!yse().early||e.suspendedComponentResolvers.size>0)&&(wse(t,e,n),e.suspendedComponentResolvers.forEach(i=>i()),e.suspendedComponentResolvers.clear())}e.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),e.queuedComponentCallbacks_DEPRECATED.splice(0,e.queuedComponentCallbacks_DEPRECATED.length)}function ePe(t){const e=t.getState();e.commitDepth++;try{const{nextTree:n}=e;if(n==null)return;e.previousTree=e.currentTree,e.currentTree=n,e.nextTree=null,JOe(t),e.previousTree!=null?e.graphsByVersion.delete(e.previousTree.version):zu("Ended batch with no previous state, which is unexpected","recoil"),e.previousTree=null,Ts("recoil_memory_managament_2020")&&n==null&&bse(t)}finally{e.commitDepth--}}function tPe({setNotifyBatcherOfChange:t}){const e=Q8(),[,n]=QOe([]);return t(()=>n({})),uB(()=>(t(()=>n({})),()=>{t(()=>{})}),[t]),uB(()=>{Vxe.enqueueExecution("Batcher",()=>{ePe(e.current)})}),null}function nPe(t,e){const n=mse();return e({set:(r,i)=>{const s=n.currentTree,a=HOe(t,s,r.key,i),o=new Set(a.keys()),l=s.nonvalidatedAtoms.clone();for(const u of o)l.delete(u);n.currentTree={...s,dirtyAtoms:NOe(s.dirtyAtoms,o),atomValues:WOe(s.atomValues,a),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((i,s)=>{n.currentTree=jOe(n.currentTree,s,i)})}}),n}function rPe(t){const e=qOe(t),n=e.getStore_INTERNAL().getState();return e.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let IW=0;function iPe({initializeState_DEPRECATED:t,initializeState:e,store_INTERNAL:n,children:r}){let i;const s=h=>{const g=i.current.graphsByVersion;if(g.has(h))return Zs(g.get(h));const v=zOe();return g.set(h,v),v},a=(h,g)=>{if(g==null){const{transactionSubscriptions:v}=d.current.getState(),b=IW++;return v.set(b,h),{release:()=>{v.delete(b)}}}else{const{nodeTransactionSubscriptions:v}=d.current.getState();v.has(g)||v.set(g,new Map);const b=IW++;return Zs(v.get(g)).set(b,h),{release:()=>{const S=v.get(g);S&&(S.delete(b),S.size===0&&v.delete(g))}}}},o=h=>{xW(d.current);for(const g of Object.keys(h))Zs(d.current.getState().nextTree).transactionMetadata[g]=h[g]},l=h=>{xW(d.current);const g=Zs(i.current.nextTree);let v;try{cB=!0,v=h(g)}finally{cB=!1}v!==g&&(i.current.nextTree=v,yse().early&&wse(d.current,i.current,v),Zs(u.current)())},u=ZOe(null),c=KOe(h=>{u.current=h},[u]),d=CW(()=>n??{storeID:vse(),getState:()=>i.current,replaceState:l,getGraph:s,subscribeToTransactions:a,addTransactionMetadata:o});n!=null&&(d.current=n),i=CW(()=>t!=null?nPe(d.current,t):e!=null?rPe(e):mse());const f=YOe(()=>b3==null?void 0:b3(i,()=>i.current.currentTree.version),[i]);return uB(()=>{const h=d.current;for(const g of new Set(h.getState().knownAtoms))VOe(h,g,"get");return()=>{for(const g of h.getState().knownAtoms)BOe(h,g)}},[d]),mt.createElement(Tse.Provider,{value:d},mt.createElement(Ase.Provider,{value:f},mt.createElement(tPe,{setNotifyBatcherOfChange:c}),r))}function sPe(t){const{override:e,...n}=t,r=Q8();return e===!1&&r.current!==Ese?t.children:mt.createElement(iPe,n)}var Q1={RecoilRoot:sPe,useStoreRef:Q8,useRecoilMutableSource:XOe};function aPe(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}var oPe=aPe;const{useEffect:lPe,useRef:uPe}=mt;function cPe(t){const e=uPe();return lPe(()=>{e.current=t}),e.current}var dPe=cPe;const{useStoreRef:fPe}=Q1,{SUSPENSE_TIMEOUT_MS:hPe}=Z1,{updateRetainCount:cA}=Z1,{RetentionZone:pPe}=G8,{useEffect:gPe,useRef:mPe}=mt,{isSSR:OW}=Z8;function vPe(t){if(Ts("recoil_memory_managament_2020"))return yPe(t)}function yPe(t){const n=(Array.isArray(t)?t:[t]).map(a=>a instanceof pPe?a:a.key),r=fPe();gPe(()=>{if(!Ts("recoil_memory_managament_2020"))return;const a=r.current;if(i.current&&!OW)window.clearTimeout(i.current),i.current=null;else for(const o of n)cA(a,o,1);return()=>{for(const o of n)cA(a,o,-1)}},[r,...n]);const i=mPe(),s=dPe(n);if(!OW&&(s===void 0||!oPe(s,n))){const a=r.current;for(const o of n)cA(a,o,1);if(s)for(const o of s)cA(a,o,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const o of n)cA(a,o,-1)},hPe)}}var bPe=vPe;function SPe(){return"<component name not available>"}var Mk=SPe;const{DEFAULT_VALUE:EPe}=Gu,{currentRendererSupportsUseSyncExternalStore:TPe,reactMode:GC,useMutableSource:APe,useSyncExternalStore:wPe}=U8,{useRecoilMutableSource:_Pe,useStoreRef:fb}=Q1,{isRecoilValue:_Nt}=$0,{getRecoilValueAsLoadable:Fk,setRecoilValue:_se,subscribeToRecoilValue:$k}=sp,{useCallback:Ed,useEffect:xR,useMemo:CPe,useRef:Cse,useState:xse}=mt,{isSSR:xPe}=Z8;function IPe(t,e,n){if(t.state==="hasValue")return t.contents;throw t.state==="loading"?new Promise(i=>{const s=n.current.getState().suspendedComponentResolvers;s.add(i),xPe&&Ns(t.contents)&&t.contents.finally(()=>{s.delete(i)})}):t.state==="hasError"?t.contents:wr(`Invalid value of loadable atom "${e.key}"`)}function OPe(t){const e=fb(),n=Mk(),r=Ed(()=>{var o;const l=e.current,u=l.getState(),c=GC().early&&(o=u.nextTree)!==null&&o!==void 0?o:u.currentTree;return{loadable:Fk(l,t,c),key:t.key}},[e,t]),i=Ed(o=>{let l;return()=>{var u,c;const d=o();return(u=l)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=l)===null||c===void 0?void 0:c.key)===d.key?l:(l=d,d)}},[]),s=CPe(()=>i(r),[r,i]),a=Ed(o=>{const l=e.current;return $k(l,t,o,n).release},[e,t,n]);return wPe(a,s,s).loadable}function PPe(t){const e=fb(),n=Ed(()=>{var u;const c=e.current,d=c.getState(),f=GC().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return Fk(c,t,f)},[e,t]),r=Ed(()=>n(),[n]),i=Mk(),s=Ed((u,c)=>{const d=e.current;return $k(d,t,()=>{if(!Ts("recoil_suppress_rerender_in_callback"))return c();const h=n();l.current.is(h)||c(),l.current=h},i).release},[e,t,i,n]),a=_Pe();if(a==null)throw wr("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const o=APe(a,r,s),l=Cse(o);return xR(()=>{l.current=o}),o}function PW(t){const e=fb(),n=Mk(),r=Ed(()=>{var l;const u=e.current,c=u.getState(),d=GC().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return Fk(u,t,d)},[e,t]),i=Ed(()=>({loadable:r(),key:t.key}),[r,t.key]),s=Ed(l=>{const u=i();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[i]);xR(()=>{const l=$k(e.current,t,u=>{o(s)},n);return o(s),l.release},[n,t,e,s]);const[a,o]=xse(i);return a.key!==t.key?i().loadable:a.loadable}function RPe(t){const e=fb(),[,n]=xse([]),r=Mk(),i=Ed(()=>{var o;const l=e.current,u=l.getState(),c=GC().early&&(o=u.nextTree)!==null&&o!==void 0?o:u.currentTree;return Fk(l,t,c)},[e,t]),s=i(),a=Cse(s);return xR(()=>{a.current=s}),xR(()=>{const o=e.current,l=o.getState(),u=$k(o,t,d=>{var f;if(!Ts("recoil_suppress_rerender_in_callback"))return n([]);const h=i();(f=a.current)!==null&&f!==void 0&&f.is(h)||n(h),a.current=h},r);if(l.nextTree)o.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!Ts("recoil_suppress_rerender_in_callback"))return n([]);const d=i();(c=a.current)!==null&&c!==void 0&&c.is(d)||n(d),a.current=d}return u.release},[r,i,t,e]),s}function Ise(t){return Ts("recoil_memory_managament_2020")&&bPe(t),{TRANSITION_SUPPORT:PW,SYNC_EXTERNAL_STORE:TPe()?OPe:PW,MUTABLE_SOURCE:PPe,LEGACY:RPe}[GC().mode](t)}function Ose(t){const e=fb(),n=Ise(t);return IPe(n,t,e)}function Pse(t){const e=fb();return Ed(n=>{_se(e.current,t,n)},[e,t])}function LPe(t){const e=fb();return Ed(()=>{_se(e.current,t,EPe)},[e,t])}function DPe(t){return[Ose(t),Pse(t)]}var kPe={useRecoilState:DPe,useRecoilValue:Ose,useRecoilValueLoadable:Ise,useResetRecoilState:LPe,useSetRecoilState:Pse};const{batchUpdates:NPe}=Y8,{DEFAULT_VALUE:MPe,getNode:FPe}=Gu,{AbstractRecoilValue:$Pe,setRecoilValueLoadable:BPe}=sp,{cloneSnapshot:CNt}=Nk,{useCallback:xNt,useEffect:INt,useRef:ONt,useState:PNt}=mt;function UPe(t,e){var n;const r=t.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,s=e.getStore_INTERNAL().getState().currentTree;NPe(()=>{const a=new Set;for(const u of[i.atomValues.keys(),s.atomValues.keys()])for(const c of u){var o,l;((o=i.atomValues.get(c))===null||o===void 0?void 0:o.contents)!==((l=s.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&FPe(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{BPe(t,new $Pe(u),s.atomValues.has(u)?Zs(s.atomValues.get(u)):MPe)}),t.replaceState(u=>({...u,stateID:e.getID()}))})}var VPe={gotoSnapshot:UPe};const{useMemo:RNt}=mt,{loadableWithValue:HPe}=VC,{initializeNode:jPe}=db,{DEFAULT_VALUE:zPe,getNode:GPe}=Gu,{copyTreeState:WPe,getRecoilValueAsLoadable:qPe,invalidateDownstreams:KPe,writeLoadableToTreeState:YPe}=sp;function RW(t){return GPe(t.key).nodeType==="atom"}class ZPe{constructor(e,n){gr(this,"_store",void 0),gr(this,"_treeState",void 0),gr(this,"_changes",void 0),gr(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!RW(r))throw wr("Reading selectors within atomicUpdate is not supported");const i=qPe(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:wr(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),gr(this,"set",(r,i)=>{if(!RW(r))throw wr("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const s=this.get(r);this._changes.set(r.key,i(s))}else jPe(this._store,r.key,"set"),this._changes.set(r.key,i)}),gr(this,"reset",r=>{this.set(r,zPe)}),this._store=e,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const e=WPe(this._treeState);for(const[n,r]of this._changes)YPe(e,n,HPe(r));return KPe(this._store,e),e}}function QPe(t){return e=>{t.replaceState(n=>{const r=new ZPe(t,n);return e(r),r.newTreeState_INTERNAL()})}}var XPe={atomicUpdater:QPe},JPe=XPe.atomicUpdater,Rse=Object.freeze({__proto__:null,atomicUpdater:JPe});function eRe(t,e){if(!t)throw new Error(e)}var tRe=eRe,ZA=tRe;const{atomicUpdater:nRe}=Rse,{batchUpdates:rRe}=Y8,{DEFAULT_VALUE:iRe}=Gu,{useStoreRef:sRe}=Q1,{refreshRecoilValue:aRe,setRecoilValue:LW}=sp,{cloneSnapshot:oRe}=Nk,{gotoSnapshot:lRe}=VPe,{useCallback:uRe}=mt;class Lse{}const cRe=new Lse;function Dse(t,e,n,r){let i=cRe,s;if(rRe(()=>{const o="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create.  Please see the docs at recoiljs.org for details.";if(typeof e!="function")throw wr(o);const l=Qie({...r??{},set:(c,d)=>LW(t,c,d),reset:c=>LW(t,c,iRe),refresh:c=>aRe(t,c),gotoSnapshot:c=>lRe(t,c),transact_UNSTABLE:c=>nRe(t)(c)},{snapshot:()=>{const c=oRe(t);return s=c.retain(),c}}),u=e(l);if(typeof u!="function")throw wr(o);i=u(...n)}),i instanceof Lse&&ZA(!1),Ns(i))i=i.finally(()=>{var o;(o=s)===null||o===void 0||o()});else{var a;(a=s)===null||a===void 0||a()}return i}function dRe(t,e){const n=sRe();return uRe((...r)=>Dse(n.current,t,r),e!=null?[...e,n]:void 0)}var kse={recoilCallback:Dse,useRecoilCallback:dRe};const{useStoreRef:fRe}=Q1,{refreshRecoilValue:hRe}=sp,{useCallback:pRe}=mt;function gRe(t){const e=fRe();return pRe(()=>{const n=e.current;hRe(n,t)},[t,e])}var mRe=gRe;const{atomicUpdater:vRe}=Rse,{useStoreRef:yRe}=Q1,{useMemo:bRe}=mt;function SRe(t,e){const n=yRe();return bRe(()=>(...r)=>{vRe(n.current)(s=>{t(s)(...r)})},e!=null?[...e,n]:void 0)}var ERe=SRe;class TRe{constructor(e){gr(this,"value",void 0),this.value=e}}var ARe={WrappedValue:TRe},wRe=ARe.WrappedValue,Nse=Object.freeze({__proto__:null,WrappedValue:wRe});class DW extends Error{}class _Re{constructor(e){var n,r,i;gr(this,"_name",void 0),gr(this,"_numLeafs",void 0),gr(this,"_root",void 0),gr(this,"_onHit",void 0),gr(this,"_onSet",void 0),gr(this,"_mapNodeValue",void 0),this._name=e==null?void 0:e.name,this._numLeafs=0,this._root=null,this._onHit=(n=e==null?void 0:e.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=e==null?void 0:e.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(i=e==null?void 0:e.mapNodeValue)!==null&&i!==void 0?i:s=>s}size(){return this._numLeafs}root(){return this._root}get(e,n){var r;return(r=this.getLeafNode(e,n))===null||r===void 0?void 0:r.value}getLeafNode(e,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const i=this._mapNodeValue(e(r.nodeKey));r=r.branches.get(i)}}set(e,n,r){const i=()=>{var s,a,o,l;let u,c;for(const[b,S]of e){var d,f,h;const A=this._root;if((A==null?void 0:A.type)==="leaf")throw this.invalidCacheError();const w=u;if(u=w?w.branches.get(c):A,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:b,parent:w,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==b)throw this.invalidCacheError();w==null||w.branches.set(c,u),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,u),c=this._mapNodeValue(S),this._root=(h=this._root)!==null&&h!==void 0?h:u}const g=u?(s=u)===null||s===void 0?void 0:s.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.branchKey!==c))throw this.invalidCacheError();const v={type:"leaf",value:n,parent:u,branchKey:c};(a=u)===null||a===void 0||a.branches.set(c,v),this._root=(o=this._root)!==null&&o!==void 0?o:v,this._numLeafs++,this._onSet(v),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,v)};try{i()}catch(s){if(s instanceof DW)this.clear(),i();else throw s}}delete(e){const n=this.root();if(!n)return!1;if(e===n)return this._root=null,this._numLeafs=0,!0;let r=e.parent,i=e.branchKey;for(;r;){var s;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(s=r)===null||s===void 0?void 0:s.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){throw zu("Invalid cache values.  This happens when selectors do not return consistent values for the same input dependency values.  That may also be caused when using Fast Refresh to change a selector implementation.  Resetting cache."+(this._name!=null?` - ${this._name}`:"")),new DW}}var CRe={TreeCache:_Re},xRe=CRe.TreeCache,Mse=Object.freeze({__proto__:null,TreeCache:xRe});class IRe{constructor(e){var n;gr(this,"_maxSize",void 0),gr(this,"_size",void 0),gr(this,"_head",void 0),gr(this,"_tail",void 0),gr(this,"_map",void 0),gr(this,"_keyMapper",void 0),this._maxSize=e.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=e.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(e){return this._map.has(this._keyMapper(e))}get(e){const n=this._keyMapper(e),r=this._map.get(n);if(r)return this.set(e,r.value),r.value}set(e,n){const r=this._keyMapper(e);this._map.get(r)&&this.delete(e);const s=this.head(),a={key:e,right:s,left:null,value:n};s?s.left=a:this._tail=a,this._map.set(r,a),this._head=a,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const e=this.tail();e&&this.delete(e.key)}delete(e){const n=this._keyMapper(e);if(!this._size||!this._map.has(n))return;const r=Zs(this._map.get(n)),i=r.right,s=r.left;i&&(i.left=r.left),s&&(s.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=s),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var ORe={LRUCache:IRe},PRe=ORe.LRUCache,Fse=Object.freeze({__proto__:null,LRUCache:PRe});const{LRUCache:RRe}=Fse,{TreeCache:LRe}=Mse;function DRe({name:t,maxSize:e,mapNodeValue:n=r=>r}){const r=new RRe({maxSize:e}),i=new LRe({name:t,mapNodeValue:n,onHit:s=>{r.set(s,!0)},onSet:s=>{const a=r.tail();r.set(s,!0),a&&i.size()>e&&i.delete(a.key)}});return i}var kW=DRe;function af(t,e,n){if(typeof t=="string"&&!t.includes('"')&&!t.includes("\\"))return`"${t}"`;switch(typeof t){case"undefined":return"";case"boolean":return t?"true":"false";case"number":case"symbol":return String(t);case"string":return JSON.stringify(t);case"function":if((e==null?void 0:e.allowFunctions)!==!0)throw wr("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${t.name})__`}if(t===null)return"null";if(typeof t!="object"){var r;return(r=JSON.stringify(t))!==null&&r!==void 0?r:""}if(Ns(t))return"__PROMISE__";if(Array.isArray(t))return`[${t.map((i,s)=>af(i,e,s.toString()))}]`;if(typeof t.toJSON=="function")return af(t.toJSON(n),e,n);if(t instanceof Map){const i={};for(const[s,a]of t)i[typeof s=="string"?s:af(s,e)]=a;return af(i,e,n)}return t instanceof Set?af(Array.from(t).sort((i,s)=>af(i,e).localeCompare(af(s,e))),e,n):Symbol!==void 0&&t[Symbol.iterator]!=null&&typeof t[Symbol.iterator]=="function"?af(Array.from(t),e,n):`{${Object.keys(t).filter(i=>t[i]!==void 0).sort().map(i=>`${af(i,e)}:${af(t[i],e,i)}`).join(",")}}`}function kRe(t,e={allowFunctions:!1}){return af(t,e)}var Bk=kRe;const{TreeCache:NRe}=Mse,VI={equality:"reference",eviction:"keep-all",maxSize:1/0};function MRe({equality:t=VI.equality,eviction:e=VI.eviction,maxSize:n=VI.maxSize}=VI,r){const i=FRe(t);return $Re(e,n,i,r)}function FRe(t){switch(t){case"reference":return e=>e;case"value":return e=>Bk(e)}throw wr(`Unrecognized equality policy ${t}`)}function $Re(t,e,n,r){switch(t){case"keep-all":return new NRe({name:r,mapNodeValue:n});case"lru":return kW({name:r,maxSize:Zs(e),mapNodeValue:n});case"most-recent":return kW({name:r,maxSize:1,mapNodeValue:n})}throw wr(`Unrecognized eviction policy ${t}`)}var BRe=MRe;const{isLoadable:URe,loadableWithError:HI,loadableWithPromise:VRe,loadableWithValue:S3}=VC,{WrappedValue:$se}=Nse,{getNodeLoadable:jI,peekNodeLoadable:HRe,setNodeValue:jRe}=db,{saveDepsToStore:zRe}=jC,{DEFAULT_VALUE:GRe,getConfigDeletionHandler:WRe,getNode:qRe,registerNode:NW}=Gu,{isRecoilValue:KRe}=$0,{markRecoilValueModified:MW}=sp,{retainedByOptionWithDefault:YRe}=Z1,{recoilCallback:ZRe}=kse;class Bse{}const dA=new Bse,fA=[],zI=new Map,QRe=(()=>{let t=0;return()=>t++})();function Use(t){let e=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=t,s=t.set!=null?t.set:void 0,a=new Set,o=BRe(i??{equality:"reference",eviction:"keep-all"},n),l=YRe(t.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!Ts("recoil_memory_managament_2020")||c>0}function f(Q){return Q.getState().knownSelectors.add(n),c++,()=>{c--}}function h(){return WRe(n)!==void 0&&!d()}function g(Q,de,le,ye,fe){j(de,ye,fe),v(Q,le)}function v(Q,de){L(Q,de)&&C(Q),S(de,!0)}function b(Q,de){L(Q,de)&&(Zs(B(Q)).stateVersions.clear(),S(de,!1))}function S(Q,de){const le=zI.get(Q);if(le!=null){for(const ye of le)MW(ye,Zs(e));de&&zI.delete(Q)}}function A(Q,de){let le=zI.get(de);le==null&&zI.set(de,le=new Set),le.add(Q)}function w(Q,de,le,ye,fe,We){return de.then(Le=>{if(!d())throw C(Q),dA;const Ve=S3(Le);return g(Q,le,fe,Ve,ye),Le}).catch(Le=>{if(!d())throw C(Q),dA;if(Ns(Le))return x(Q,Le,le,ye,fe,We);const Ve=HI(Le);throw g(Q,le,fe,Ve,ye),Le})}function x(Q,de,le,ye,fe,We){return de.then(Le=>{if(!d())throw C(Q),dA;We.loadingDepKey!=null&&We.loadingDepPromise===de?le.atomValues.set(We.loadingDepKey,S3(Le)):Q.getState().knownSelectors.forEach(ne=>{le.atomValues.delete(ne)});const Ve=k(Q,le);if(Ve&&Ve.state!=="loading"){if((L(Q,fe)||B(Q)==null)&&v(Q,fe),Ve.state==="hasValue")return Ve.contents;throw Ve.contents}if(!L(Q,fe)){const ne=H(Q,le);if(ne!=null)return ne.loadingLoadable.contents}const[at,Et]=N(Q,le,fe);if(at.state!=="loading"&&g(Q,le,fe,at,Et),at.state==="hasError")throw at.contents;return at.contents}).catch(Le=>{if(Le instanceof Bse)throw dA;if(!d())throw C(Q),dA;const Ve=HI(Le);throw g(Q,le,fe,Ve,ye),Le})}function P(Q,de,le,ye){var fe,We,Le,Ve;if(L(Q,ye)||de.version===((fe=Q.getState())===null||fe===void 0||(We=fe.currentTree)===null||We===void 0?void 0:We.version)||de.version===((Le=Q.getState())===null||Le===void 0||(Ve=Le.nextTree)===null||Ve===void 0?void 0:Ve.version)){var at,Et,ne;zRe(n,le,Q,(at=(Et=Q.getState())===null||Et===void 0||(ne=Et.nextTree)===null||ne===void 0?void 0:ne.version)!==null&&at!==void 0?at:Q.getState().currentTree.version)}for(const Ze of le)a.add(Ze)}function N(Q,de,le){let ye=!0,fe=!0;const We=()=>{fe=!1};let Le,Ve=!1,at;const Et={loadingDepKey:null,loadingDepPromise:null},ne=new Map;function Ze({key:ot}){const se=jI(Q,de,ot);switch(ne.set(ot,se),ye||(P(Q,de,new Set(ne.keys()),le),b(Q,le)),se.state){case"hasValue":return se.contents;case"hasError":throw se.contents;case"loading":throw Et.loadingDepKey=ot,Et.loadingDepPromise=se.contents,se.contents}throw wr("Invalid Loadable state")}const lt=ot=>(...se)=>{if(fe)throw wr("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated.  It c
53an be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return e==null&&ZA(!1),ZRe(Q,ot,se,{node:e})};try{Le=r({get:Ze,getCallback:lt}),Le=KRe(Le)?Ze(Le):Le,URe(Le)&&(Le.state==="hasError"&&(Ve=!0),Le=Le.contents),Ns(Le)?Le=w(Q,Le,de,ne,le,Et).finally(We):We(),Le=Le instanceof $se?Le.value:Le}catch(ot){Le=ot,Ns(Le)?Le=x(Q,Le,de,ne,le,Et).finally(We):(Ve=!0,We())}return Ve?at=HI(Le):Ns(Le)?at=VRe(Le):at=S3(Le),ye=!1,Z(Q,le,ne),P(Q,de,new Set(ne.keys()),le),[at,ne]}function k(Q,de){let le=de.atomValues.get(n);if(le!=null)return le;const ye=new Set;try{le=o.get(We=>(typeof We!="string"&&ZA(!1),jI(Q,de,We).contents),{onNodeVisit:We=>{We.type==="branch"&&We.nodeKey!==n&&ye.add(We.nodeKey)}})}catch(We){throw wr(`Problem with cache lookup for selector "${n}": ${We.message}`)}if(le){var fe;de.atomValues.set(n,le),P(Q,de,ye,(fe=B(Q))===null||fe===void 0?void 0:fe.executionID)}return le}function U(Q,de){const le=k(Q,de);if(le!=null)return C(Q),le;const ye=H(Q,de);if(ye!=null){var fe;return((fe=ye.loadingLoadable)===null||fe===void 0?void 0:fe.state)==="loading"&&A(Q,ye.executionID),ye.loadingLoadable}const We=QRe(),[Le,Ve]=N(Q,de,We);return Le.state==="loading"?(q(Q,We,Le,Ve,de),A(Q,We)):(C(Q),j(de,Le,Ve)),Le}function H(Q,de){const le=hse([u.has(Q)?[Zs(u.get(Q))]:[],Pk(W8(u,([fe])=>fe!==Q),([,fe])=>fe)]);function ye(fe){for(const[We,Le]of fe)if(!jI(Q,de,We).is(Le))return!0;return!1}for(const fe of le){if(fe.stateVersions.get(de.version)||!ye(fe.depValuesDiscoveredSoFarDuringAsyncWork))return fe.stateVersions.set(de.version,!0),fe;fe.stateVersions.set(de.version,!1)}}function B(Q){return u.get(Q)}function q(Q,de,le,ye,fe){u.set(Q,{depValuesDiscoveredSoFarDuringAsyncWork:ye,executionID:de,loadingLoadable:le,stateVersions:new Map([[fe.version,!0]])})}function Z(Q,de,le){if(L(Q,de)){const ye=B(Q);ye!=null&&(ye.depValuesDiscoveredSoFarDuringAsyncWork=le)}}function C(Q){u.delete(Q)}function L(Q,de){var le;return de===((le=B(Q))===null||le===void 0?void 0:le.executionID)}function V(Q){return Array.from(Q.entries()).map(([de,le])=>[de,le.contents])}function j(Q,de,le){Q.atomValues.set(n,de);try{o.set(V(le),de)}catch(ye){throw wr(`Problem with setting cache for selector "${n}": ${ye.message}`)}}function X(Q){if(fA.includes(n)){const de=`Recoil selector has circular dependencies: ${fA.slice(fA.indexOf(n)).join(" → ")}`;return HI(wr(de))}fA.push(n);try{return Q()}finally{fA.pop()}}function G(Q,de){const le=de.atomValues.get(n);return le??o.get(ye=>{var fe;return typeof ye!="string"&&ZA(!1),(fe=HRe(Q,de,ye))===null||fe===void 0?void 0:fe.contents})}function ie(Q,de){return X(()=>U(Q,de))}function ae(Q){Q.atomValues.delete(n)}function ue(Q,de){e==null&&ZA(!1);for(const ye of a){var le;const fe=qRe(ye);(le=fe.clearCache)===null||le===void 0||le.call(fe,Q,de)}a.clear(),ae(de),o.clear(),MW(Q,e)}return s!=null?e=NW({key:n,nodeType:"selector",peek:G,get:ie,set:(de,le,ye)=>{let fe=!1;const We=new Map;function Le({key:ne}){if(fe)throw wr("Recoil: Async selector sets are not currently supported.");const Ze=jI(de,le,ne);if(Ze.state==="hasValue")return Ze.contents;if(Ze.state==="loading"){const lt=`Getting value of asynchronous atom or selector "${ne}" in a pending state while setting selector "${n}" is not yet supported.`;throw zu(),wr(lt)}else throw Ze.contents}function Ve(ne,Ze){if(fe){const se="Recoil: Async selector sets are not currently supported.";throw zu(),wr(se)}const lt=typeof Ze=="function"?Ze(Le(ne)):Ze;jRe(de,le,ne.key,lt).forEach((se,Fe)=>We.set(Fe,se))}function at(ne){Ve(ne,GRe)}const Et=s({set:Ve,get:Le,reset:at},ye);if(Et!==void 0)throw Ns(Et)?wr("Recoil: Async selector sets are not currently supported."):wr("Recoil: selector set should be a void function.");return fe=!0,We},init:f,invalidate:ae,clearCache:ue,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):e=NW({key:n,nodeType:"selector",peek:G,get:ie,init:f,invalidate:ae,clearCache:ue,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}Use.value=t=>new $se(t);var h1=Use;const{isLoadable:XRe,loadableWithError:E3,loadableWithPromise:T3,loadableWithValue:tS}=VC,{WrappedValue:Vse}=Nse,{peekNodeInfo:JRe}
vendor: 10,196 bytes, line 53
53=db,{DEFAULT_VALUE:Gy,DefaultValue:Cm,getConfigDeletionHandler:Hse,registerNode:eLe,setConfigDeletionHandler:tLe}=Gu,{isRecoilValue:nLe}=$0,{getRecoilValueAsLoadable:rLe,markRecoilValueModified:iLe,setRecoilValue:FW,setRecoilValueLoadable:sLe}=sp,{retainedByOptionWithDefault:aLe}=Z1,hA=t=>t instanceof Vse?t.value:t;function oLe(t){const{key:e,persistence_UNSTABLE:n}=t,r=aLe(t.retainedBy_UNSTABLE);let i=0;function s(A){return T3(A.then(w=>(a=tS(w),w)).catch(w=>{throw a=E3(w),w}))}let a=Ns(t.default)?s(t.default):XRe(t.default)?t.default.state==="loading"?s(t.default.contents):t.default:tS(hA(t.default));a.contents;let o;const l=new Map;function u(A){return A}function c(A,w){const x=w.then(P=>{var N,k;return((k=((N=A.getState().nextTree)!==null&&N!==void 0?N:A.getState().currentTree).atomValues.get(e))===null||k===void 0?void 0:k.contents)===x&&FW(A,S,P),P}).catch(P=>{var N,k;throw((k=((N=A.getState().nextTree)!==null&&N!==void 0?N:A.getState().currentTree).atomValues.get(e))===null||k===void 0?void 0:k.contents)===x&&sLe(A,S,E3(P)),P});return x}function d(A,w,x){var P;i++;const N=()=>{var B;i--,(B=l.get(A))===null||B===void 0||B.forEach(q=>q()),l.delete(A)};if(A.getState().knownAtoms.add(e),a.state==="loading"){const B=()=>{var q;((q=A.getState().nextTree)!==null&&q!==void 0?q:A.getState().currentTree).atomValues.has(e)||iLe(A,S)};a.contents.finally(B)}const k=(P=t.effects)!==null&&P!==void 0?P:t.effects_UNSTABLE;if(k!=null){let B=function(ae){if(L&&ae.key===e){const ue=C;return ue instanceof Cm?f(A,w):Ns(ue)?T3(ue.then(Q=>Q instanceof Cm?a.toPromise():Q)):tS(ue)}return rLe(A,ae)},q=function(ae){return B(ae).toPromise()},Z=function(ae){var ue;const Q=JRe(A,(ue=A.getState().nextTree)!==null&&ue!==void 0?ue:A.getState().currentTree,ae.key);return L&&ae.key===e&&!(C instanceof Cm)?{...Q,isSet:!0,loadable:B(ae)}:Q},C=Gy,L=!0,V=!1,j=null;const X=ae=>ue=>{if(L){const Q=B(S),de=Q.state==="hasValue"?Q.contents:Gy;C=typeof ue=="function"?ue(de):ue,Ns(C)&&(C=C.then(le=>(j={effect:ae,value:le},le)))}else{if(Ns(ue))throw wr("Setting atoms to async values is not implemented.");typeof ue!="function"&&(j={effect:ae,value:hA(ue)}),FW(A,S,typeof ue=="function"?Q=>{const de=hA(ue(Q));return j={effect:ae,value:de},de}:hA(ue))}},G=ae=>()=>X(ae)(Gy),ie=ae=>ue=>{var Q;const{release:de}=A.subscribeToTransactions(le=>{var ye;let{currentTree:fe,previousTree:We}=le.getState();We||(zu(),We=fe);const Le=(ye=fe.atomValues.get(e))!==null&&ye!==void 0?ye:a;if(Le.state==="hasValue"){var Ve,at,Et,ne;const Ze=Le.contents,lt=(Ve=We.atomValues.get(e))!==null&&Ve!==void 0?Ve:a,ot=lt.state==="hasValue"?lt.contents:Gy;((at=j)===null||at===void 0?void 0:at.effect)!==ae||((Et=j)===null||Et===void 0?void 0:Et.value)!==Ze?ue(Ze,ot,!fe.atomValues.has(e)):((ne=j)===null||ne===void 0?void 0:ne.effect)===ae&&(j=null)}},e);l.set(A,[...(Q=l.get(A))!==null&&Q!==void 0?Q:[],de])};for(const ae of k)try{const ue=ae({node:S,storeID:A.storeID,parentStoreID_UNSTABLE:A.parentStoreID,trigger:x,setSelf:X(ae),resetSelf:G(ae),onSet:ie(ae),getPromise:q,getLoadable:B,getInfo_UNSTABLE:Z});if(ue!=null){var U;l.set(A,[...(U=l.get(A))!==null&&U!==void 0?U:[],ue])}}catch(ue){C=ue,V=!0}if(L=!1,!(C instanceof Cm)){var H;const ae=V?E3(C):Ns(C)?T3(c(A,C)):tS(hA(C));ae.contents,w.atomValues.set(e,ae),(H=A.getState().nextTree)===null||H===void 0||H.atomValues.set(e,ae)}}return N}function f(A,w){var x,P;return(x=(P=w.atomValues.get(e))!==null&&P!==void 0?P:o)!==null&&x!==void 0?x:a}function h(A,w){if(w.atomValues.has(e))return Zs(w.atomValues.get(e));if(w.nonvalidatedAtoms.has(e)){if(o!=null)return o;if(n==null)return Wie(),a;const x=w.nonvalidatedAtoms.get(e),P=n.validator(x,Gy);return o=P instanceof Cm?a:tS(P),o}else return a}function g(){o=void 0}function v(A,w,x){if(w.atomValues.has(e)){const P=Zs(w.atomValues.get(e));if(P.state==="hasValue"&&x===P.contents)return new Map}else if(!w.nonvalidatedAtoms.has(e)&&x instanceof Cm)return new Map;return o=void 0,new Map().set(e,tS(x))}function b(){return Hse(e)!==void 0&&i<=0}const S=eLe({key:e,nodeType:"atom",peek:f,get:h,set:v,init:d,invalidate:g,shouldDeleteConfigOnRelease:b,dangerouslyAllowMutability:t.dangerouslyAllowMutability,persistence_UNSTABLE:t.persistence_UNSTABLE?{type:t.persistence_UNSTABLE.type,backButton:t.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return S}function X8(t){const{...e}=t,n="default"in t?t.default:new Promise(()=>{});return nLe(n)?lLe({...e,default:n}):oLe({...e,default:n})}function lLe(t){const e=X8({...t,default:Gy,persistence_UNSTABLE:t.persistence_UNSTABLE===void 0?void 0:{...t.persistence_UNSTABLE,validator:r=>r instanceof Cm?r:Zs(t.persistence_UNSTABLE).validator(r,Gy)},effects:t.effects,effects_UNSTABLE:t.effects_UNSTABLE}),n=h1({key:`${t.key}__withFallback`,get:({get:r})=>{const i=r(e);return i instanceof Cm?t.default:i},set:({set:r},i)=>r(e,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:t.dangerouslyAllowMutability});return tLe(n.key,Hse(t.key)),n}X8.value=t=>new Vse(t);var jse=X8;let uLe=class{constructor(e){var n;gr(this,"_map",void 0),gr(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=e==null?void 0:e.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(e){return this._map.has(this._keyMapper(e))}get(e){return this._map.get(this._keyMapper(e))}set(e,n){this._map.set(this._keyMapper(e),n)}delete(e){this._map.delete(this._keyMapper(e))}clear(){this._map.clear()}};var cLe={MapCache:uLe},dLe=cLe.MapCache,fLe=Object.freeze({__proto__:null,MapCache:dLe});const{LRUCache:$W}=Fse,{MapCache:hLe}=fLe,GI={equality:"reference",eviction:"none",maxSize:1/0};function pLe({equality:t=GI.equality,eviction:e=GI.eviction,maxSize:n=GI.maxSize}=GI){const r=gLe(t);return mLe(e,n,r)}function gLe(t){switch(t){case"reference":return e=>e;case"value":return e=>Bk(e)}throw wr(`Unrecognized equality policy ${t}`)}function mLe(t,e,n){switch(t){case"keep-all":return new hLe({mapKey:n});case"lru":return new $W({mapKey:n,maxSize:Zs(e)});case"most-recent":return new $W({mapKey:n,maxSize:1})}throw wr(`Unrecognized eviction policy ${t}`)}var zse=pLe;const{setConfigDeletionHandler:vLe}=Gu;function yLe(t){var e,n;const r=zse({equality:(e=(n=t.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&e!==void 0?e:"value",eviction:"keep-all"});return i=>{var s,a;const o=r.get(i);if(o!=null)return o;const{cachePolicyForParams_UNSTABLE:l,...u}=t,c="default"in t?t.default:new Promise(()=>{}),d=jse({...u,key:`${t.key}__${(s=Bk(i))!==null&&s!==void 0?s:"void"}`,default:typeof c=="function"?c(i):c,retainedBy_UNSTABLE:typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(i):t.retainedBy_UNSTABLE,effects:typeof t.effects=="function"?t.effects(i):typeof t.effects_UNSTABLE=="function"?t.effects_UNSTABLE(i):(a=t.effects)!==null&&a!==void 0?a:t.effects_UNSTABLE});return r.set(i,d),vLe(d.key,()=>{r.delete(i)}),d}}var bLe=yLe;const{setConfigDeletionHandler:SLe}=Gu;let ELe=0;function TLe(t){var e,n;const r=zse({equality:(e=(n=t.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&e!==void 0?e:"value",eviction:"keep-all"});return i=>{var s;let a;try{a=r.get(i)}catch(f){throw wr(`Problem with cache lookup for selector ${t.key}: ${f.message}`)}if(a!=null)return a;const o=`${t.key}__selectorFamily/${(s=Bk(i,{allowFunctions:!0}))!==null&&s!==void 0?s:"void"}/${ELe++}`,l=f=>t.get(i)(f),u=t.cachePolicy_UNSTABLE,c=typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(i):t.retainedBy_UNSTABLE;let d;if(t.set!=null){const f=t.set;d=h1({key:o,get:l,set:(g,v)=>f(i)(g,v),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=h1({key:o,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(i,d),SLe(d.key,()=>{r.delete(i)}),d}}var Nv=TLe;Nv({key:"__constant",get:t=>()=>t,cachePolicyForParams_UNSTABLE:{equality:"reference"}});Nv({key:"__error",get:t=>()=>{throw wr(t)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function ALe(t){return t}var wLe=ALe;const{loadableWithError:Gse,loadableWithPromise:Wse,loadableWithValue:qse}=VC;function Uk(t,e){const n=Array(e.length).fill(void 0),r=Array(e.length).fill(void 0);for(const[i,s]of e.entries())try{n[i]=t(s)}catch(a){r[i]=a}return[n,r]}function _Le(t){return t!=null&&!Ns(t)}function Vk(t){return Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(e=>t[e])}function dB(t,e){return Array.isArray(t)?e:Object.getOwnPropertyNames(t).reduce((n,r,i)=>({...n,[r]:e[i]}),{})}function CE(t,e,n){const r=n.map((i,s)=>i==null?qse(e[s]):Ns(i)?Wse(i):Gse(i));return dB(t,r)}function CLe(t,e){return e.map((n,r)=>n===void 0?t[r]:n)}Nv({key:"__waitForNone",get:t=>({get:e})=>{const n=Vk(t),[r,i]=Uk(e,n);return CE(t,r,i)},dangerouslyAllowMutability:!0});Nv({key:"__waitForAny",get:t=>({get:e})=>{const n=Vk(t),[r,i]=Uk(e,n);return i.some(s=>!Ns(s))?CE(t,r,i):new Promise(s=>{for(const[a,o]of i.entries())Ns(o)&&o.then(l=>{r[a]=l,i[a]=void 0,s(CE(t,r,i))}).catch(l=>{i[a]=l,s(CE(t,r,i))})})},dangerouslyAllowMutability:!0});Nv({key:"__waitForAll",get:t=>({get:e})=>{const n=Vk(t),[r,i]=Uk(e,n);if(i.every(a=>a==null))return dB(t,r);const s=i.find(_Le);if(s!=null)throw s;return Promise.all(i).then(a=>dB(t,CLe(r,a)))},dangerouslyAllowMutability:!0});Nv({key:"__waitForAllSettled",get:t=>({get:e})=>{const n=Vk(t),[r,i]=Uk(e,n);return i.every(s=>!Ns(s))?CE(t,r,i):Promise.all(i.map((s,a)=>Ns(s)?s.then(o=>{r[a]=o,i[a]=void 0}).catch(o=>{r[a]=void 0,i[a]=o}):null)).then(()=>CE(t,r,i))},dangerouslyAllowMutability:!0});Nv({key:"__noWait",get:t=>({get:e})=>{try{return h1.value(qse(e(t)))}catch(n){return h1.value(Ns(n)?Wse(n):Gse(n))}},dangerouslyAllowMutability:!0});const{RecoilLoadable:DNt}=VC,{DefaultValue:xLe}=Gu,{RecoilRoot:ILe}=Q1,{isRecoilValue:kNt}=$0,{freshSnapshot:NNt}=Nk,{useRecoilState:OLe,useRecoilValue:PLe,useRecoilValueLoadable:RLe,useResetRecoilState:LLe,useSetRecoilState:DLe}=kPe,{useRecoilCallback:kLe}=kse;var pu={DefaultValue:xLe,RecoilRoot:ILe,atom:jse,selector:h1,atomFamily:bLe,selectorFamily:Nv,readOnlySelector:wLe,useRecoilValue:PLe,useRecoilValueLo
53adable:RLe,useRecoilState:OLe,useSetRecoilState:DLe,useResetRecoilState:LLe,useRecoilRefresher_UNSTABLE:mRe,useRecoilCallback:kLe,useRecoilTransaction_UNSTABLE:ERe},Kse=pu.DefaultValue,NLe=pu.RecoilRoot,Yn=pu.atom,hb=pu.selector,X1=pu.atomFamily,Mv=pu.selectorFamily,Yse=pu.readOnlySelector,Ht=pu.useRecoilValue,pb=pu.useRecoilValueLoadable,Fo=pu.useRecoilState,Qs=pu.useSetRecoilState,IR=pu.useResetRecoilState,BW=pu.useRecoilRefresher_UNSTABLE,Cc=pu.useRecoilCallback,Hk=pu.useRecoilTransaction_UNSTABLE;const Mm={};function MLe(){return Mm.get=Cc(({snapshot:t})=>function(e){return t.getLoadable(e).contents},[]),Mm.getPromise=Cc(({snapshot:t})=>function(e){return t.getPromise(e)},[]),Mm.set=Cc(({set:t})=>function(e,n){t(e,n)},[]),Mm.reset=Cc(({reset:t})=>t,[]),Mm.refresh=Cc(({refresh:t})=>t,[]),null}function _f(t){return Mm.get(t)}function xc(t,e){Mm.set(t,e)}function FLe(t){Mm.refresh(t)}var UW=function(e,n){var r=arguments;if(n==null||!kC.call(n,"css"))return $.createElement.apply(void 0,r);var i=r.length,s=new Array(i);s[0]=q6,s[1]=W6(e,n);for(var a=2;a<i;a++)s[a]=r[a];return $.createElement.apply(null,s)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(UW||(UW={}));var $Le=xne(function(t,e){var n=t.styles,r=G6([n],void 0,$.useContext(Ine)),i=$.useRef();return Vz(function(){var s=e.key+"-global",a=new e.sheet.constructor({key:s,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),o=!1,l=document.querySelector('style[data-emotion="'+s+" "+r.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),l!==null&&(o=!0,l.setAttribute("data-emotion",s),a.hydrate([l])),i.current=[a,o],function(){a.flush()}},[e]),Vz(function(){var s=i.current,a=s[0],o=s[1];if(o){s[1]=!1;return}if(r.next!==void 0&&Ane(e,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}e.insert("",r,a,!1)},[e,r.name]),null});function OR(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G6(e)}function J8(){var t=OR.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var WC=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},BLe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Hm,L6,Hte,ULe=(Hte=class{constructor(){Mn(this,Hm,BLe);Mn(this,L6,!1)}setTimeoutProvider(t){hn(this,Hm,t)}setTimeout(t,e){return Ne(this,Hm).setTimeout(t,e)}clearTimeout(t){Ne(this,Hm).clearTimeout(t)}setInterval(t,e){return Ne(this,Hm).setInterval(t,e)}clearInterval(t){Ne(this,Hm).clearInterval(t)}},Hm=new WeakMap,L6=new WeakMap,Hte),e0=new ULe;function VLe(t){setTimeout(t,0)}var B0=typeof window>"u"||"Deno"in globalThis;function Ru(){}function HLe(t,e){return typeof t=="function"?t(e):t}function fB(t){return typeof t=="number"&&t>=0&&t!==1/0}function Zse(t,e){return Math.max(t+(e||0)-Date.now(),0)}function hv(t,e){return typeof t=="function"?t(e):t}function dd(t,e){return typeof t=="function"?t(e):t}function VW(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=t;if(a){if(r){if(e.queryHash!==e9(a,e.options))return!1}else if(!L_(e.queryKey,a))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||i&&i!==e.state.fetchStatus||s&&!s(e))}function HW(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(R_(e.options.mutationKey)!==R_(s))return!1}else if(!L_(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function e9(t,e){return((e==null?void 0:e.queryKeyHashFn)||R_)(t)}function R_(t){return JSON.stringify(t,(e,n)=>pB(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function L_(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>L_(t[n],e[n])):!1}var jLe=Object.prototype.hasOwnProperty;function Qse(t,e){if(t===e)return t;const n=jW(t)&&jW(e);
53if(!n&&!(pB(t)&&pB(e)))return e;const i=(n?t:Object.keys(t)).length,s=n?e:Object.keys(e),a=s.length,o=n?new Array(a):{};let l=0;for(let u=0;u<a;u++){const c=n?u:s[u],d=t[c],f=e[c];if(d===f){o[c]=d,(n?u<i:jLe.call(t,c))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){o[c]=f;continue}const h=Qse(d,f);o[c]=h,h===d&&l++}return i===a&&l===i?t:o}function hB(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function jW(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function pB(t){if(!zW(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!zW(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function zW(t){return Object.prototype.toString.call(t)==="[object Object]"}function zLe(t){return new Promise(e=>{e0.setTimeout(e,t)})}function gB(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Qse(t,e):e}function GLe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function WLe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var t9=Symbol();function Xse(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===t9?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Jse(t,e){return typeof t=="function"?t(...e):!!t}function qLe(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var u0,jm,jE,jte,KLe=(jte=class extends WC{constructor(){super();Mn(this,u0);Mn(this,jm);Mn(this,jE);hn(this,jE,e=>{if(!B0&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Ne(this,jm)||this.setEventListener(Ne(this,jE))}onUnsubscribe(){var e;this.hasListeners()||((e=Ne(this,jm))==null||e.call(this),hn(this,jm,void 0))}setEventListener(e){var n;hn(this,jE,e),(n=Ne(this,jm))==null||n.call(this),hn(this,jm,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){Ne(this,u0)!==e&&(hn(this,u0,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof Ne(this,u0)=="boolean"?Ne(this,u0):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},u0=new WeakMap,jm=new WeakMap,jE=new WeakMap,jte),n9=new KLe;function mB(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var YLe=VLe;function ZLe(){let t=[],e=0,n=o=>{o()},r=o=>{o()},i=YLe;const s=o=>{e?t.push(o):i(()=>{n(o)})},a=()=>{const o=t;t=[],o.length&&i(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;e++;try{l=o()}finally{e--,e||a()}return l},batchCalls:o=>(...l)=>{s(()=>{o(...l)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var nl=ZLe(),zE,zm,GE,zte,QLe=(zte=class extends WC{constructor(){super();Mn(this,zE,!0);Mn(this,zm);Mn(this,GE);hn(this,GE,e=>{if(!B0&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Ne(this,zm)||this.setEventListener(Ne(this,GE))}onUnsubscribe(){var e;this.hasListeners()||((e=Ne(this,zm))==null||e.call(this),hn(this,zm,void 0))}setEventListener(e){var n;hn(this,GE,e),(n=Ne(this,zm))==null||n.call(this),hn(this,zm,e(this.setOnline.bind(this)))}setOnline(e){Ne(this,zE)!==e&&(hn(this,zE,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return Ne(this,zE)}},zE=new WeakMap,zm=new WeakMap,GE=new WeakMap,zte),PR=new QLe;function XLe(t){return Math.min(1e3*2**t,3e4)}function eae(t){return(t??"online")==="online"?PR.isOnline():!0}
vendor: 4,522 bytes, line 53
53var vB=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function tae(t){let e=!1,n=0,r;const i=mB(),s=()=>i.status!=="pending",a=v=>{var b;if(!s()){const S=new vB(v);f(S),(b=t.onCancel)==null||b.call(t,S)}},o=()=>{e=!0},l=()=>{e=!1},u=()=>n9.isFocused()&&(t.networkMode==="always"||PR.isOnline())&&t.canRun(),c=()=>eae(t.networkMode)&&t.canRun(),d=v=>{s()||(r==null||r(),i.resolve(v))},f=v=>{s()||(r==null||r(),i.reject(v))},h=()=>new Promise(v=>{var b;r=S=>{(s()||u())&&v(S)},(b=t.onPause)==null||b.call(t)}).then(()=>{var v;r=void 0,s()||(v=t.onContinue)==null||v.call(t)}),g=()=>{if(s())return;let v;const b=n===0?t.initialPromise:void 0;try{v=b??t.fn()}catch(S){v=Promise.reject(S)}Promise.resolve(v).then(d).catch(S=>{var N;if(s())return;const A=t.retry??(B0?0:3),w=t.retryDelay??XLe,x=typeof w=="function"?w(n,S):w,P=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,S);if(e||!P){f(S);return}n++,(N=t.onFail)==null||N.call(t,n,S),zLe(x).then(()=>u()?void 0:h()).then(()=>{e?f(S):g()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:o,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),i)}}var c0,Gte,nae=(Gte=class{constructor(){Mn(this,c0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fB(this.gcTime)&&hn(this,c0,e0.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(B0?1/0:5*60*1e3))}clearGcTimeout(){Ne(this,c0)&&(e0.clearTimeout(Ne(this,c0)),hn(this,c0,void 0))}},c0=new WeakMap,Gte),d0,WE,cd,f0,Io,CC,h0,yf,Hp,Wte,JLe=(Wte=class extends nae{constructor(e){super();Mn(this,yf);Mn(this,d0);Mn(this,WE);Mn(this,cd);Mn(this,f0);Mn(this,Io);Mn(this,CC);Mn(this,h0);hn(this,h0,!1),hn(this,CC,e.defaultOptions),this.setOptions(e.options),this.observers=[],hn(this,f0,e.client),hn(this,cd,Ne(this,f0).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,hn(this,d0,WW(this.options)),this.state=e.state??Ne(this,d0),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Ne(this,Io))==null?void 0:e.promise}setOptions(e){if(this.options={...Ne(this,CC),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=WW(this.options);n.data!==void 0&&(this.setState(GW(n.data,n.dataUpdatedAt)),hn(this,d0,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Ne(this,cd).remove(this)}setData(e,n){const r=gB(this.state.data,e,this.options);return Jr(this,yf,Hp).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Jr(this,yf,Hp).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=Ne(this,Io))==null?void 0:r.promise;return(i=Ne(this,Io))==null||i.cancel(e),n?n.then(Ru).catch(Ru):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ne(this,d0))}isActive(){return this.observers.some(e=>dd(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t9||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>hv(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Zse(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=Ne(this,Io))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=Ne(this,Io))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Ne(this,cd).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(Ne(this,Io)&&(Ne(this,h0)?Ne(this,Io).cancel({revert:!0}):Ne(this,Io).cancelRetry()),this.scheduleGc()),Ne(this,cd).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Jr(this,yf,Hp).call(this,{type:"invalidate"})}
53async fetch(e,n){var l,u,c,d,f,h,g,v,b,S,A,w;if(this.state.fetchStatus!=="idle"&&((l=Ne(this,Io))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Ne(this,Io))return Ne(this,Io).continueRetry(),Ne(this,Io).promise}if(e&&this.setOptions(e),!this.options.queryFn){const x=this.observers.find(P=>P.options.queryFn);x&&this.setOptions(x.options)}const r=new AbortController,i=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(hn(this,h0,!0),r.signal)})},s=()=>{const x=Xse(this.options,n),N=(()=>{const k={client:Ne(this,f0),queryKey:this.queryKey,meta:this.meta};return i(k),k})();return hn(this,h0,!1),this.options.persister?this.options.persister(x,N,this):x(N)},o=(()=>{const x={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Ne(this,f0),state:this.state,fetchFn:s};return i(x),x})();(u=this.options.behavior)==null||u.onFetch(o,this),hn(this,WE,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&Jr(this,yf,Hp).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),hn(this,Io,tae({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:x=>{x instanceof vB&&x.revert&&this.setState({...Ne(this,WE),fetchStatus:"idle"}),r.abort()},onFail:(x,P)=>{Jr(this,yf,Hp).call(this,{type:"failed",failureCount:x,error:P})},onPause:()=>{Jr(this,yf,Hp).call(this,{type:"pause"})},onContinue:()=>{Jr(this,yf,Hp).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const x=await Ne(this,Io).start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),(h=(f=Ne(this,cd).config).onSuccess)==null||h.call(f,x,this),(v=(g=Ne(this,cd).config).onSettled)==null||v.call(g,x,this.state.error,this),x}catch(x){if(x instanceof vB){if(x.silent)return Ne(this,Io).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw Jr(this,yf,Hp).call(this,{type:"error",error:x}),(S=(b=Ne(this,cd).config).onError)==null||S.call(b,x,this),(w=(A=Ne(this,cd).config).onSettled)==null||w.call(A,this.state.data,x,this),x}finally{this.scheduleGc()}}},d0=new WeakMap,WE=new WeakMap,cd=new WeakMap,f0=new WeakMap,Io=new WeakMap,CC=new WeakMap,h0=new WeakMap,yf=new WeakSet,Hp=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rae(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...GW(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return hn(this,WE,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),nl.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Ne(this,cd).notify({query:this,type:"updated",action:e})})},Wte);function rae(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eae(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function GW(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function WW(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ou,ei,xC,ql,p0,qE,tg,Gm,IC,KE,YE,g0,m0,Wm,ZE,Ni,QA,yB,bB,SB,EB,TB,AB,wB,iae,qte,eDe=(qte=class extends WC{constructor(e,n){super();Mn(this,Ni);Mn(this,Ou);Mn(this,ei);Mn(this,xC);Mn(this,ql);Mn(this,p0);Mn(this,qE);Mn(this,tg);Mn(this,Gm);Mn(this,IC);Mn(this,KE);Mn(this,YE);Mn(this,g0);Mn(this,m0);Mn(this,Wm);Mn(this,ZE,new Set);this.options=n,hn(this,Ou,e),hn(this,Gm,null),hn(this,tg,mB()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Ne(this,ei).addObserver(this),qW(Ne(this,ei),this.options)?Jr(this,Ni,QA).call(this):this.updateResult(),Jr(this,Ni,EB).c
53all(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _B(Ne(this,ei),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _B(Ne(this,ei),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Jr(this,Ni,TB).call(this),Jr(this,Ni,AB).call(this),Ne(this,ei).removeObserver(this)}setOptions(e){const n=this.options,r=Ne(this,ei);if(this.options=Ne(this,Ou).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dd(this.options.enabled,Ne(this,ei))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Jr(this,Ni,wB).call(this),Ne(this,ei).setOptions(this.options),n._defaulted&&!hB(this.options,n)&&Ne(this,Ou).getQueryCache().notify({type:"observerOptionsUpdated",query:Ne(this,ei),observer:this});const i=this.hasListeners();i&&KW(Ne(this,ei),r,this.options,n)&&Jr(this,Ni,QA).call(this),this.updateResult(),i&&(Ne(this,ei)!==r||dd(this.options.enabled,Ne(this,ei))!==dd(n.enabled,Ne(this,ei))||hv(this.options.staleTime,Ne(this,ei))!==hv(n.staleTime,Ne(this,ei)))&&Jr(this,Ni,yB).call(this);const s=Jr(this,Ni,bB).call(this);i&&(Ne(this,ei)!==r||dd(this.options.enabled,Ne(this,ei))!==dd(n.enabled,Ne(this,ei))||s!==Ne(this,Wm))&&Jr(this,Ni,SB).call(this,s)}getOptimisticResult(e){const n=Ne(this,Ou).getQueryCache().build(Ne(this,Ou),e),r=this.createResult(n,e);return nDe(this,r)&&(hn(this,ql,r),hn(this,qE,this.options),hn(this,p0,Ne(this,ei).state)),r}getCurrentResult(){return Ne(this,ql)}trackResult(e,n){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Ne(this,tg).status==="pending"&&Ne(this,tg).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){Ne(this,ZE).add(e)}getCurrentQuery(){return Ne(this,ei)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=Ne(this,Ou).defaultQueryOptions(e),r=Ne(this,Ou).getQueryCache().build(Ne(this,Ou),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Jr(this,Ni,QA).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Ne(this,ql)))}createResult(e,n){var H;const r=Ne(this,ei),i=this.options,s=Ne(this,ql),a=Ne(this,p0),o=Ne(this,qE),u=e!==r?e.state:Ne(this,xC),{state:c}=e;let d={...c},f=!1,h;if(n._optimisticResults){const B=this.hasListeners(),q=!B&&qW(e,n),Z=B&&KW(e,r,n,i);(q||Z)&&(d={...d,...rae(c.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:b}=d;h=d.data;let S=!1;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let B;s!=null&&s.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(B=s.data,S=!0):B=typeof n.placeholderData=="function"?n.placeholderData((H=Ne(this,YE))==null?void 0:H.state.data,Ne(this,YE)):n.placeholderData,B!==void 0&&(b="success",h=gB(s==null?void 0:s.data,B,n),f=!0)}if(n.select&&h!==void 0&&!S)if(s&&h===(a==null?void 0:a.data)&&n.select===Ne(this,IC))h=Ne(this,KE);else try{hn(this,IC,n.select),h=n.select(h),h=gB(s==null?void 0:s.data,h,n),hn(this,KE,h),hn(this,Gm,null)}catch(B){hn(this,Gm,B)}Ne(this,Gm)&&(g=Ne(this,Gm),h=Ne(this,KE),v=Date.now(),b="error");const A=d.fetchStatus==="fetching",w=b==="pending",x=b==="error",P=w&&A,N=h!==void 0,U={status:b,fetchStatus:d.fetchStatus,isPending:w,isSuccess:b==="success",isError:x,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:A,isRefetching:A&&!w,isLoadingError:x&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&N,isStale:r9(e,n),refetch:this.refetch,promise:Ne(this,tg),isEnabled:dd(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const B=C=>{U.status==="error"?C.reject(U.error):U.data!==void 0&&C.resolve(U.data)},q=()=>{const C=hn(this,tg,U.promise=mB());B(C)},Z=Ne(this,tg);
vendor: 7,918 bytes, line 53
53switch(Z.status){case"pending":e.queryHash===r.queryHash&&B(Z);break;case"fulfilled":(U.status==="error"||U.data!==Z.value)&&q();break;case"rejected":(U.status!=="error"||U.error!==Z.reason)&&q();break}}return U}updateResult(){const e=Ne(this,ql),n=this.createResult(Ne(this,ei),this.options);if(hn(this,p0,Ne(this,ei).state),hn(this,qE,this.options),Ne(this,p0).data!==void 0&&hn(this,YE,Ne(this,ei)),hB(n,e))return;hn(this,ql,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!Ne(this,ZE).size)return!0;const a=new Set(s??Ne(this,ZE));return this.options.throwOnError&&a.add("error"),Object.keys(Ne(this,ql)).some(o=>{const l=o;return Ne(this,ql)[l]!==e[l]&&a.has(l)})};Jr(this,Ni,iae).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Jr(this,Ni,EB).call(this)}},Ou=new WeakMap,ei=new WeakMap,xC=new WeakMap,ql=new WeakMap,p0=new WeakMap,qE=new WeakMap,tg=new WeakMap,Gm=new WeakMap,IC=new WeakMap,KE=new WeakMap,YE=new WeakMap,g0=new WeakMap,m0=new WeakMap,Wm=new WeakMap,ZE=new WeakMap,Ni=new WeakSet,QA=function(e){Jr(this,Ni,wB).call(this);let n=Ne(this,ei).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ru)),n},yB=function(){Jr(this,Ni,TB).call(this);const e=hv(this.options.staleTime,Ne(this,ei));if(B0||Ne(this,ql).isStale||!fB(e))return;const r=Zse(Ne(this,ql).dataUpdatedAt,e)+1;hn(this,g0,e0.setTimeout(()=>{Ne(this,ql).isStale||this.updateResult()},r))},bB=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Ne(this,ei)):this.options.refetchInterval)??!1},SB=function(e){Jr(this,Ni,AB).call(this),hn(this,Wm,e),!(B0||dd(this.options.enabled,Ne(this,ei))===!1||!fB(Ne(this,Wm))||Ne(this,Wm)===0)&&hn(this,m0,e0.setInterval(()=>{(this.options.refetchIntervalInBackground||n9.isFocused())&&Jr(this,Ni,QA).call(this)},Ne(this,Wm)))},EB=function(){Jr(this,Ni,yB).call(this),Jr(this,Ni,SB).call(this,Jr(this,Ni,bB).call(this))},TB=function(){Ne(this,g0)&&(e0.clearTimeout(Ne(this,g0)),hn(this,g0,void 0))},AB=function(){Ne(this,m0)&&(e0.clearInterval(Ne(this,m0)),hn(this,m0,void 0))},wB=function(){const e=Ne(this,Ou).getQueryCache().build(Ne(this,Ou),this.options);if(e===Ne(this,ei))return;const n=Ne(this,ei);hn(this,ei,e),hn(this,xC,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},iae=function(e){nl.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(Ne(this,ql))}),Ne(this,Ou).getQueryCache().notify({query:Ne(this,ei),type:"observerResultsUpdated"})})},qte);function tDe(t,e){return dd(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function qW(t,e){return tDe(t,e)||t.state.data!==void 0&&_B(t,e,e.refetchOnMount)}function _B(t,e,n){if(dd(e.enabled,t)!==!1&&hv(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&r9(t,e)}return!1}function KW(t,e,n,r){return(t!==e||dd(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&r9(t,n)}function r9(t,e){return dd(e.enabled,t)!==!1&&t.isStaleByTime(hv(e.staleTime,t))}function nDe(t,e){return!hB(t.getCurrentResult(),e)}function YW(t){return{onFetch:(e,n)=>{var c,d,f,h,g;const r=e.options,i=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=e.state.data)==null?void 0:h.pages)||[],a=((g=e.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const b=w=>{qLe(w,()=>e.signal,()=>v=!0)},S=Xse(e.options,e.fetchOptions),A=async(w,x,P)=>{if(v)return Promise.reject();if(x==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const q={client:e.client,queryKey:e.queryKey,pageParam:x,direction:P?"backward":"forward",meta:e.options.meta};return b(q),q})(),U=await S(k),{maxPages:H}=e.options,B=P?WLe:GLe;return{pages:B(w.pages,U,H),pageParams:B(w.pageParams,x,H)}};if(i&&s.length){const w=i==="backward",x=w?rDe:ZW,P={pages:s,pageParams:a},N=x(r,P);o=await A(P,N,w)}else{const w=t??s.length;do{const x=l===0?a[0]??r.initialPageParam:ZW(r,o);if(l>0&&x==null)break;o=await A(o,x),l++}while(l<w)}return o};e.options.persister?e.fetchFn=()=>{var v,b;return(b=(v=e.options).persister)==null?void 0:b.call(v,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function ZW(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function rDe(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var OC,wh,Kl,v0,_h,ym,Kte,iDe=(Kte=class extends nae{constructor(e){super();Mn(this,_h);Mn(this,OC);Mn(this,wh);Mn(this,Kl);Mn(this,v0);hn(this,OC,e.client),this.mutationId=e.mutationId,hn(this,Kl,e.mutationCache),hn(this,wh,[]),this.state=e.state||sDe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Ne(this,wh).includes(e)||(Ne(this,wh).push(e),this.clearGcTimeout(),Ne(this,Kl).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){hn(this,wh,Ne(this,wh).filter(n=>n!==e)),this.scheduleGc(),Ne(this,Kl).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Ne(this,wh).length||(this.state.status==="pending"?this.scheduleGc():Ne(this,Kl).remove(this))}continue(){var e;return((e=Ne(this,v0))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H;const n=()=>{Jr(this,_h,ym).call(this,{type:"continue"})},r={client:Ne(this,OC),meta:this.options.meta,mutationKey:this.options.mutationKey};hn(this,v0,tae({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(B,q)=>{Jr(this,_h,ym).call(this,{type:"failed",failureCount:B,error:q})},onPause:()=>{Jr(this,_h,ym).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Ne(this,Kl).canRun(this)}));const i=this.state.status==="pending",s=!Ne(this,v0).canStart();try{if(i)n();else{Jr(this,_h,ym).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(a=Ne(this,Kl).config).onMutate)==null?void 0:o.call(a,e,this,r));const q=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,e,r));q!==this.state.context&&Jr(this,_h,ym).call(this,{type:"pending",context:q,variables:e,isPaused:s})}const B=await Ne(this,v0).start();return await((d=(c=Ne(this,Kl).config).onSuccess)==null?void 0:d.call(c,B,e,this.state.context,this,r)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,B,e,this.state.context,r)),await((v=(g=Ne(this,Kl).config).onSettled)==null?void 0:v.call(g,B,null,this.state.variables,this.state.context,this,r)),await((S=(b=this.options).onSettled)==null?void 0:S.call(b,B,null,e,this.state.context,r)),Jr(this,_h,ym).call(this,{type:"success",data:B}),B}catch(B){try{await((w=(A=Ne(this,Kl).config).onError)==null?void 0:w.call(A,B,e,this.state.context,this,r))}catch(q){Promise.reject(q)}try{await((P=(x=this.options).onError)==null?void 0:P.call(x,B,e,this.state.context,r))}catch(q){Promise.reject(q)}try{await((k=(N=Ne(this,Kl).config).onSettled)==null?void 0:k.call(N,void 0,B,this.state.variables,this.state.context,this,r))}catch(q){Promise.reject(q)}try{await((H=(U=this.options).onSettled)==null?void 0:H.call(U,void 0,B,e,this.state.context,r))}catch(q){Promise.reject(q)}throw Jr(this,_h,ym).call(this,{type:"error",error:B}),B}finally{Ne(this,Kl).runNext(this)}}},OC=new WeakMap,wh=new WeakMap,Kl=new WeakMap,v0=new WeakMap,_h=new WeakSet,ym=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};
53case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),nl.batch(()=>{Ne(this,wh).forEach(r=>{r.onMutationUpdate(e)}),Ne(this,Kl).notify({mutation:this,type:"updated",action:e})})},Kte);function sDe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ng,bf,PC,Yte,aDe=(Yte=class extends WC{constructor(e={}){super();Mn(this,ng);Mn(this,bf);Mn(this,PC);this.config=e,hn(this,ng,new Set),hn(this,bf,new Map),hn(this,PC,0)}build(e,n,r){const i=new iDe({client:e,mutationCache:this,mutationId:++SI(this,PC)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){Ne(this,ng).add(e);const n=WI(e);if(typeof n=="string"){const r=Ne(this,bf).get(n);r?r.push(e):Ne(this,bf).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Ne(this,ng).delete(e)){const n=WI(e);if(typeof n=="string"){const r=Ne(this,bf).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&Ne(this,bf).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=WI(e);if(typeof n=="string"){const r=Ne(this,bf).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=WI(e);if(typeof n=="string"){const i=(r=Ne(this,bf).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nl.batch(()=>{Ne(this,ng).forEach(e=>{this.notify({type:"removed",mutation:e})}),Ne(this,ng).clear(),Ne(this,bf).clear()})}getAll(){return Array.from(Ne(this,ng))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>HW(n,r))}findAll(e={}){return this.getAll().filter(n=>HW(e,n))}notify(e){nl.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return nl.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ru))))}},ng=new WeakMap,bf=new WeakMap,PC=new WeakMap,Yte);function WI(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Ch,Zte,oDe=(Zte=class extends WC{constructor(e={}){super();Mn(this,Ch);this.config=e,hn(this,Ch,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??e9(i,n);let a=this.get(s);return a||(a=new JLe({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){Ne(this,Ch).has(e.queryHash)||(Ne(this,Ch).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=Ne(this,Ch).get(e.queryHash);n&&(e.destroy(),n===e&&Ne(this,Ch).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){nl.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Ne(this,Ch).get(e)}getAll(){return[...Ne(this,Ch).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>VW(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>VW(e,r)):n}notify(e){nl.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){nl.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){nl.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ch=new WeakMap,Zte),ba,qm,Km,QE,XE,Ym,JE,e1,Qte,lDe=(Qte=class{constructor(t={}){Mn(this,ba);Mn(this,qm);Mn(this,Km);Mn(this,QE);Mn(this,XE);Mn(this,Ym);Mn(this,JE);Mn(this,e1);hn(this,ba,t.queryCache||new oDe),hn(this,qm,t.mutationCache||new aDe),hn(this,Km,t.defaultOptions||{}),hn(this,QE,new Map),hn(this,XE,new Map),hn(this,Ym,0)}mount(){SI(this,Ym)._++,Ne(this,Ym)===1&&(hn(this,JE,n9.subscribe(async t=>{t&&(await this.resumePausedMutations(),Ne(this,ba).onFocus())})),hn(this,e1,PR.subscribe(async t=>{t&&(await this.resumePausedMutations(),Ne(this,ba).onOnline())})))}unmount(){var t,e;SI(this,Ym)._--,Ne(this,Ym)===0&&((t=Ne(this,JE))==null||t.call(this),hn(this,JE,void 0),(e=Ne(this,e1))==null||e.call(this),hn(this,e1,void 0))}isFetching(t){return Ne(this,ba).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return Ne(this,qm).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Ne(this,ba).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=Ne(this,ba).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(hv(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return Ne(this,ba).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=Ne(this,ba).get(r.queryHash),s=i==null?void 0:i.state.data,a=HLe(e,s);if(a!==void 0)return Ne(this,ba).build(this,r).setData(a,{...n,manual:!0})}
53setQueriesData(t,e,n){return nl.batch(()=>Ne(this,ba).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Ne(this,ba).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=Ne(this,ba);nl.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=Ne(this,ba);return nl.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=nl.batch(()=>Ne(this,ba).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ru).catch(Ru)}invalidateQueries(t,e={}){return nl.batch(()=>(Ne(this,ba).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=nl.batch(()=>Ne(this,ba).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ru)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ru)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=Ne(this,ba).build(this,e);return n.isStaleByTime(hv(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ru).catch(Ru)}fetchInfiniteQuery(t){return t.behavior=YW(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ru).catch(Ru)}ensureInfiniteQueryData(t){return t.behavior=YW(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return PR.isOnline()?Ne(this,qm).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ne(this,ba)}getMutationCache(){return Ne(this,qm)}getDefaultOptions(){return Ne(this,Km)}setDefaultOptions(t){hn(this,Km,t)}setQueryDefaults(t,e){Ne(this,QE).set(R_(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...Ne(this,QE).values()],n={};return e.forEach(r=>{L_(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){Ne(this,XE).set(R_(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...Ne(this,XE).values()],n={};return e.forEach(r=>{L_(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...Ne(this,Km).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=e9(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===t9&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...Ne(this,Km).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){Ne(this,ba).clear(),Ne(this,qm).clear()}},ba=new WeakMap,qm=new WeakMap,Km=new WeakMap,QE=new WeakMap,XE=new WeakMap,Ym=new WeakMap,JE=new WeakMap,e1=new WeakMap,Qte),sae=$.createContext(void 0),aae=t=>{const e=$.useContext(sae);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},uDe=({client:t,children:e})=>($.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),t1.jsx(sae.Provider,{value:t,children:e})),oae=$.createContext(!1),cDe=()=>$.useContext(oae);oae.Provider;function dDe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var fDe=$.createContext(dDe()),hDe=()=>$.useContext(fDe),pDe=(t,e,n)=>{const r=n!=null&&n.state.error&&typeof t.throwOnError=="function"?Jse(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},gDe=t=>{$.useEffect(()=>{t.clearReset()},[t])},mDe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||Jse(n,[t.error,r])),vDe=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},yDe=(t,e)=>t.isLoading&&t.isFetching&&!e,bDe=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,QW=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function SDe(t,e,n){var f,h,g,v;const r=cDe(),i=hDe(),s=aae(),a=s.defaultQueryOptions(t);(h=(f=s.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,a);const o=s.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",vDe(a),pDe(a,i,o),gDe(i);const l=!s.getQueryCache().get(a.queryHash),[u]=$.useState(()=>new e(s,a)),c=u.getOptimisticResult(a),d=!r&&t.subscribed!==!1;if($.useSyncExternalStore($.useCallback(b=>{const S=d?u.subscribe(nl.batchCalls(b)):Ru;return u.updateResult(),S},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),$.useEffect(()=>{u.setOptions(a)},[a,u]),bDe(a,c))throw QW(a,u,i);if(mDe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw c.error;if((v=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||v.call(g,a,c),a.experimental_prefetchInRender&&!B0&&yDe(c,r)){const b=l?QW(a,u,i):o==null?void 0:o.promise;b==null||b.catch(Ru).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function EDe(t,e){return SDe(t,eDe)}
53var CB=function(t,e){return CB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},CB(t,e)};function lae(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");CB(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Wt=function(){return Wt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Wt.apply(this,arguments)};function Uc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function TDe(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xs(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function Df(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var kp=function(t){return{isEnabled:function(e){return t.some(function(n){return!!e[n]})}}},D_={measureLayout:kp(["layout","layoutId","drag"]),animation:kp(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:kp(["exit"]),drag:kp(["drag","dragControls"]),focus:kp(["whileFocus"]),hover:kp(["whileHover","onHoverStart","onHoverEnd"]),tap:kp(["whileTap","onTap","onTapStart","onTapCancel"]),pan:kp(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:kp(["whileInView","onViewportEnter","onViewportLeave"])};function ADe(t){for(var e in t)t[e]!==null&&(e==="projectionNodeConstructor"?D_.projectionNodeConstructor=t[e]:D_[e].Component=t[e])}var RR=function(){},uae=$.createContext({strict:!1}),cae=Object.keys(D_),wDe=cae.length;function _De(t,e,n){var r=[];if($.useContext(uae),!e)return null;for(var i=0;i<wDe;i++){var s=cae[i],a=D_[s],o=a.isEnabled,l=a.Component;o(t)&&l&&r.push($.createElement(l,Wt({key:s},t,{visualElement:e})))}return r}var p1=$.createContext({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),jk=$.createContext({});function CDe(){return $.useContext(jk).visualElement}var qC=$.createContext(null),J1=typeof document<"u",k_=J1?$.useLayoutEffect:$.useEffect,xB={current:null},dae=!1;function xDe(){if(dae=!0,!!J1)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return xB.current=t.matches};t.addListener(e),e()}else xB.current=!1}function eT(){!dae&&xDe();var t=Xs($.useState(xB.current),1),e=t[0];return e}function IDe(){var t=eT(),e=$.useContext(p1).reducedMotion;return e==="never"?!1:e==="always"?!0:t}function ODe(t,e,n,r){var i=$.useContext(uae),s=CDe(),a=$.useContext(qC),o=IDe(),l=$.useRef(void 0);r||(r=i.renderer),!l.current&&r&&(l.current=r(t,{visualState:e,parent:s,props:n,presenceId:a==null?void 0:a.id,blockInitialAnimation:(a==null?void 0:a.initial)===!1,shouldReduceMotion:o}));var u=l.current;return k_(function(){u==null||u.syncRender()}),$.useEffect(function(){var c;(c=u==null?void 0:u.animationState)===null||c===void 0||c.animateChanges()}),k_(function(){return function(){return u==null?void 0:u.notifyUnmount()}},[]),u}function JS(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function PDe(t,e,n){return $.useCallback(function(r){var i;r&&((i=t.mount)===null||i===void 0||i.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):JS(n)&&(n.current=r))},[e])}function fae(t){return Array.isArray(t)}function Ef(t){return typeof t=="string"||fae(t)}function RDe(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.get()}),e}function LDe(t){var e={};return t.forEachValue(function(n,r){return e[r]=n.getVelocity()}),e}function hae(t,e,n,r,i){var s;return r===void 0&&(r={}),i===void 0&&(i={}
53),typeof e=="function"&&(e=e(n??t.custom,r,i)),typeof e=="string"&&(e=(s=t.variants)===null||s===void 0?void 0:s[e]),typeof e=="function"&&(e=e(n??t.custom,r,i)),e}function zk(t,e,n){var r=t.getProps();return hae(r,e,n??r.custom,RDe(t),LDe(t))}function Gk(t){var e;return typeof((e=t.animate)===null||e===void 0?void 0:e.start)=="function"||Ef(t.initial)||Ef(t.animate)||Ef(t.whileHover)||Ef(t.whileDrag)||Ef(t.whileTap)||Ef(t.whileFocus)||Ef(t.exit)}function pae(t){return!!(Gk(t)||t.variants)}function DDe(t,e){if(Gk(t)){var n=t.initial,r=t.animate;return{initial:n===!1||Ef(n)?n:void 0,animate:Ef(r)?r:void 0}}return t.inherit!==!1?e:{}}function kDe(t){var e=DDe(t,$.useContext(jk)),n=e.initial,r=e.animate;return $.useMemo(function(){return{initial:n,animate:r}},[XW(n),XW(r)])}function XW(t){return Array.isArray(t)?t.join(" "):t}function Fv(t){var e=$.useRef(null);return e.current===null&&(e.current=t()),e.current}var Pw={hasAnimatedSinceResize:!0,hasEverUpdated:!1},NDe=1;function MDe(){return Fv(function(){if(Pw.hasEverUpdated)return NDe++})}var i9=$.createContext({}),gae=$.createContext({});function FDe(t,e,n,r){var i,s=e.layoutId,a=e.layout,o=e.drag,l=e.dragConstraints,u=e.layoutScroll,c=$.useContext(gae);!r||!n||n!=null&&n.projection||(n.projection=new r(t,n.getLatestValues(),(i=n.parent)===null||i===void 0?void 0:i.projection),n.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||l&&JS(l),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof a=="string"?a:"both",initialPromotionConfig:c,layoutScroll:u}))}var $De=function(t){lae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},e.prototype.componentDidUpdate=function(){},e.prototype.updateProps=function(){var n=this.props,r=n.visualElement,i=n.props;r&&r.setProps(i)},e.prototype.render=function(){return this.props.children},e}(mt.Component);function BDe(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.projectionNodeConstructor,i=t.useRender,s=t.useVisualState,a=t.Component;e&&ADe(e);function o(l,u){var c=UDe(l);l=Wt(Wt({},l),{layoutId:c});var d=$.useContext(p1),f=null,h=kDe(l),g=d.isStatic?void 0:MDe(),v=s(l,d.isStatic);return!d.isStatic&&J1&&(h.visualElement=ODe(a,v,Wt(Wt({},d),l),n),FDe(g,l,h.visualElement,r||D_.projectionNodeConstructor),f=_De(l,h.visualElement)),$.createElement($De,{visualElement:h.visualElement,props:Wt(Wt({},d),l)},f,$.createElement(jk.Provider,{value:h},i(a,l,g,PDe(v,h.visualElement,u),v,d.isStatic,h.visualElement)))}return $.forwardRef(o)}function UDe(t){var e,n=t.layoutId,r=(e=$.useContext(i9))===null||e===void 0?void 0:e.id;return r&&n!==void 0?r+"-"+n:n}function VDe(t){function e(r,i){return i===void 0&&(i={}),BDe(t(r,i))}if(typeof Proxy>"u")return e;var n=new Map;return new Proxy(e,{get:function(r,i){return n.has(i)||n.set(i,e(i)),n.get(i)}})}var HDe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function s9(t){return typeof t!="string"||t.includes("-")?!1:!!(HDe.indexOf(t)>-1||/[A-Z]/.test(t))}var LR={};function jDe(t){Object.assign(LR,t)}var IB=["","X","Y","Z"],zDe=["translate","scale","rotate","skew"],N_=["transformPerspective","x","y","z"];zDe.forEach(function(t){return IB.forEach(function(e){return N_.push(t+e)})});function GDe(t,e){return N_.indexOf(t)-N_.indexOf(e)}var WDe=new Set(N_);function KC(t){return WDe.has(t)}var qDe=new Set(["originX","originY","originZ"]);function mae(t){return qDe.has(t)}function vae(t,e){var n=e.layout,r=e.layoutId;return KC(t)||mae(t)||(n||r!==void 0)&&(!!LR[t]||t==="opacity")}var Ag=function(t){return!!(t!==null&&typeof t=="object"&&t.getVelocity)},KDe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function YDe(t,e,n,r){var i=t.transform,s=t.transformKeys,a=e.enableHardwareAcceleration,o=a===void 0?!0:a,l=e.allowTransformNone,u=l===void 0?!0:l,c="";s.sort(GDe);for(var d=!1,f=s.length,h=0;h<f;h++){var g=s[h];c+="".concat(KDe[g]||g,"(").concat(i[g],") "),g==="z"&&(d=!0)}return!d&&o?c+="translateZ(0)":c=c.trim(),r?c=r(i,n?"":c):u&&n&&(c="none"),c}function ZDe(t){var e=t.originX,n=e===void 0?"50%":e,r=t.originY,i=r===void 0?"50%":r,s=t.originZ,a=s===void 0?0:s;return"".concat(n," ").concat(i," ").concat(a)}function yae(t){return t.startsWith("--")}var QDe=function(t,e){return e&&typeof t=="number"?e.transform(t):t};const bae=(t,e)=>n=>Math.max(Math.min(n,e),t),Rw=t=>
53t%1?Number(t.toFixed(5)):t,M_=/(-)?([\d]*\.?[\d])+/g,OB=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,XDe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function YC(t){return typeof t=="string"}const gb={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Lw=Object.assign(Object.assign({},gb),{transform:bae(0,1)}),qI=Object.assign(Object.assign({},gb),{default:1}),ZC=t=>({test:e=>YC(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bm=ZC("deg"),Gh=ZC("%"),Qn=ZC("px"),JDe=ZC("vh"),eke=ZC("vw"),JW=Object.assign(Object.assign({},Gh),{parse:t=>Gh.parse(t)/100,transform:t=>Gh.transform(t*100)}),a9=(t,e)=>n=>!!(YC(n)&&XDe.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Sae=(t,e,n)=>r=>{if(!YC(r))return r;const[i,s,a,o]=r.match(M_);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},t0={test:a9("hsl","hue"),parse:Sae("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Gh.transform(Rw(e))+", "+Gh.transform(Rw(n))+", "+Rw(Lw.transform(r))+")"},tke=bae(0,255),A3=Object.assign(Object.assign({},gb),{transform:t=>Math.round(tke(t))}),Xm={test:a9("rgb","red"),parse:Sae("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+A3.transform(t)+", "+A3.transform(e)+", "+A3.transform(n)+", "+Rw(Lw.transform(r))+")"};function nke(t){let e="",n="",r="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const PB={test:a9("#"),parse:nke,transform:Xm.transform},Zl={test:t=>Xm.test(t)||PB.test(t)||t0.test(t),parse:t=>Xm.test(t)?Xm.parse(t):t0.test(t)?t0.parse(t):PB.parse(t),transform:t=>YC(t)?t:t.hasOwnProperty("red")?Xm.transform(t):t0.transform(t)},Eae="${c}",Tae="${n}";function rke(t){var e,n,r,i;return isNaN(t)&&YC(t)&&((n=(e=t.match(M_))===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)+((i=(r=t.match(OB))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function Aae(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0;const r=t.match(OB);r&&(n=r.length,t=t.replace(OB,Eae),e.push(...r.map(Zl.parse)));const i=t.match(M_);return i&&(t=t.replace(M_,Tae),e.push(...i.map(gb.parse))),{values:e,numColors:n,tokenised:t}}function wae(t){return Aae(t).values}function _ae(t){const{values:e,numColors:n,tokenised:r}=Aae(t),i=e.length;return s=>{let a=r;for(let o=0;o<i;o++)a=a.replace(o<n?Eae:Tae,o<n?Zl.transform(s[o]):Rw(s[o]));return a}}const ike=t=>typeof t=="number"?0:t;function ske(t){const e=wae(t);return _ae(t)(e.map(ike))}const wg={test:rke,parse:wae,createTransformer:_ae,getAnimatableNone:ske},ake=new Set(["brightness","contrast","saturate","opacity"]);function oke(t){let[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(M_)||[];if(!r)return t;const i=n.replace(r,"");let s=ake.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const lke=/([a-z-]*)\(.*?\)/g,RB=Object.assign(Object.assign({},wg),{getAnimatableNone:t=>{const e=t.match(lke);return e?e.map(oke).join(" "):t}});var eq=Wt(Wt({},gb),{transform:Math.round}),Cae={borderWidth:Qn,borderTopWidth:Qn,borderRightWidth:Qn,borderBottomWidth:Qn,borderLeftWidth:Qn,borderRadius:Qn,radius:Qn,borderTopLeftRadius:Qn,borderTopRightRadius:Qn,borderBottomRightRadius:Qn,borderBottomLeftRadius:Qn,width:Qn,maxWidth:Qn,height:Qn,maxHeight:Qn,size:Qn,top:Qn,right:Qn,bottom:Qn,left:Qn,padding:Qn,paddingTop:Qn,paddingRight:Qn,paddingBottom:Qn,paddingLeft:Qn,margin:Qn,marginTop:Qn,marginRight:Qn,marginBottom:Qn,marginLeft:Qn,rotate:bm,rotateX:bm,rotateY:bm,rotateZ:bm,scale:qI,scaleX:qI,scaleY:qI,scaleZ:qI,skew:bm,skewX:bm,skewY:bm,distance:Qn,translateX:Qn,translateY:Qn,translateZ:Qn,x:Qn,y:Qn,z:Qn,perspective:Qn,transformPerspective:Qn,opacity:Lw,originX:JW,originY:JW,originZ:Qn,zIndex:eq,fillOpacity:Lw,strokeOpacity:Lw,numOctaves:eq};function o9(t,e,n,r){var i,s=t.style,a=t.vars,o=t.transform,l=t.transformKeys,u=t.transformOrigin;l.length=0;var c=!1,d=!1,f=!0;for(var h in e){var g=e[h];if(yae(h)){a[h]=g;continue}var v=Cae[h],b=QDe(g,v);if(KC(h)){if(c=!0,o[h]=b,l.push(h),!f)continue;g!==((i=v.default)!==null&&i!==void 0?i:0)&&(f=!1)}else mae(h)?(u[h]=b,d=!0):s[h]=b}c?s.transform=YDe(t,n,f,r):r?s.transform=r({},""):!e.transform&&s.transform&&(s.transform="none"),d&&(s.transformOrigin=ZDe(u))}var l9=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function xae(t,e,n){for(var r in e)!Ag(e[r])&&!vae(r,n)&&(t[r]=e[r])}function uke(t,e,n){var r=t.transformTemplate;return $.useMemo(function(){var i=l9();o9(i,e,{enableHardwareAcceleration:!n},r);var s=i.vars,a=i.style;return Wt(Wt({},s),a)},[e])}function cke(t,e,n){var r=t.style||{},i={};return xae(i,r,t),Object.assign(i,uke(t,e,n)),t.transformValues&&(i=t.transformValues(i)),i}function dke(t,e,n){var r={},i=cke(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":"pan-".concat(t.drag==="x"?"y":"x")),r.style=i,r}var fke=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function DR(t){return fke.has(t)}var Iae=function(t){return!DR(t)};function Oae(t){t&&(Iae=function(e){return e.startsWith("on")?!DR(e):t(e)})}try{Oae(require("@emotion/is-prop-valid").default)}catch{}function hke(t,e,n){var r={};for(var i in t)(Iae(i)||n===!0&&DR(i)||!e&&!DR(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function tq(t,e,n){return typeof t=="string"?t:Qn.transform(e+n*t)}function pke(t,e,n){var r=tq(e,t.x,t.width),i=tq(n,t.y,t.height);return"".concat(r," ").concat(i)}var gke={offset:"strokeDashoffset",array:"strokeDasharray"};function mke(t,e,n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),t.pathLength=1;var s=gke;t[s.offset]=Qn.transform(-r);var a=Qn.transform(e),o=Qn.transform(n);t[s.array]="".concat(a," ").concat(o)}function u9(t,e,n,r){var i=e.attrX,s=e.attrY,a=e.originX,o=e.originY,l=e.pathLength,u=e.pathSpacing,c=u===void 0?1:u,d=e.pathOffset,f=d===void 0?0:d,h=Uc(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);o9(t,h,n,r),t.attrs=t.style,t.style={};var g=t.attrs,v=t.style,b=t.dimensions;g.transform&&(b&&(v.transform=g.transform),delete g.transform),b&&(a!==void 0||o!==void 0||v.transform)&&(v.transformOrigin=pke(b,a!==void 0?a:.5,o!==void 0?o:.5)),i!==void 0&&(g.x=i),s!==void 0&&(g.y=s),l!==void 0&&mke(g,l,c,f)}var Pae=function(){return Wt(Wt({},l9()),{attrs:{}})};function vke(t,e){var n=$.useMemo(function(){var i=Pae();return u9(i,e,{enableHardwareAcceleration:!1},t.transformTemplate),Wt(Wt({},i.attrs),{style:Wt({},i.style)})},[e]);if(t.style){var r={};xae(r,t.style,t),n.style=Wt(Wt({},r),n.style)}return n}function yke(t){t===void 0&&(t=!1);var e=function(n,r,i,s,a,o){var l=a.latestValues,u=s9(n)?vke:dke,c=u(r,l,o),d=hke(r,typeof n=="string",t),f=Wt(Wt(Wt({}
53,d),c),{ref:s});return i&&(f["data-projection-id"]=i),$.createElement(n,f)};return e}var bke=/([a-z])([A-Z])/g,Ske="$1-$2",Rae=function(t){return t.replace(bke,Ske).toLowerCase()};function Lae(t,e,n,r){var i=e.style,s=e.vars;Object.assign(t.style,i,r&&r.getProjectionStyles(n));for(var a in s)t.style.setProperty(a,s[a])}var Dae=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function kae(t,e,n,r){Lae(t,e,void 0,r);for(var i in e.attrs)t.setAttribute(Dae.has(i)?i:Rae(i),e.attrs[i])}function c9(t){var e=t.style,n={};for(var r in e)(Ag(e[r])||vae(r,t))&&(n[r]=e[r]);return n}function Nae(t){var e=c9(t);for(var n in t)if(Ag(t[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;e[r]=t[n]}return e}function d9(t){return typeof t=="object"&&typeof t.start=="function"}var F_=function(t){return Array.isArray(t)},Eke=function(t){return!!(t&&typeof t=="object"&&t.mix&&t.toValue)},Mae=function(t){return F_(t)?t[t.length-1]||0:t};function bP(t){var e=Ag(t)?t.get():t;return Eke(e)?e.toValue():e}function nq(t,e,n,r){var i=t.scrapeMotionValuesFromProps,s=t.createRenderState,a=t.onMount,o={latestValues:Tke(e,n,r,i),renderState:s()};return a&&(o.mount=function(l){return a(e,l,o)}),o}var Fae=function(t){return function(e,n){var r=$.useContext(jk),i=$.useContext(qC);return n?nq(t,e,r,i):Fv(function(){return nq(t,e,r,i)})}};function Tke(t,e,n,r){var i={},s=(n==null?void 0:n.initial)===!1,a=r(t);for(var o in a)i[o]=bP(a[o]);var l=t.initial,u=t.animate,c=Gk(t),d=pae(t);e&&d&&!c&&t.inherit!==!1&&(l??(l=e.initial),u??(u=e.animate));var f=s||l===!1,h=f?u:l;if(h&&typeof h!="boolean"&&!d9(h)){var g=Array.isArray(h)?h:[h];g.forEach(function(v){var b=hae(t,v);if(b){var S=b.transitionEnd;b.transition;var A=Uc(b,["transitionEnd","transition"]);for(var w in A){var x=A[w];if(Array.isArray(x)){var P=f?x.length-1:0;x=x[P]}x!==null&&(i[w]=x)}for(var w in S)i[w]=S[w]}})}return i}var Ake={useVisualState:Fae({scrapeMotionValuesFromProps:Nae,createRenderState:Pae,onMount:function(t,e,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}u9(r,i,{enableHardwareAcceleration:!1},t.transformTemplate),kae(e,r)}})},wke={useVisualState:Fae({scrapeMotionValuesFromProps:c9,createRenderState:l9})};function _ke(t,e,n,r,i){var s=e.forwardMotionProps,a=s===void 0?!1:s,o=s9(t)?Ake:wke;return Wt(Wt({},o),{preloadedFeatures:n,useRender:yke(a),createVisualElement:r,projectionNodeConstructor:i,Component:t})}var vs;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(vs||(vs={}));function Wk(t,e,n,r){return r===void 0&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function LB(t,e,n,r){$.useEffect(function(){var i=t.current;if(n&&i)return Wk(i,e,n,r)},[t,e,n,r])}function Cke(t){var e=t.whileFocus,n=t.visualElement,r=function(){var s;(s=n.animationState)===null||s===void 0||s.setActive(vs.Focus,!0)},i=function(){var s;(s=n.animationState)===null||s===void 0||s.setActive(vs.Focus,!1)};LB(n,"focus",e?r:void 0),LB(n,"blur",e?i:void 0)}function $ae(t){return typeof PointerEvent<"u"&&t instanceof PointerEvent?t.pointerType==="mouse":t instanceof MouseEvent}function Bae(t){var e=!!t.touches;return e}function xke(t){return function(e){var n=e instanceof MouseEvent,r=!n||n&&e.button===0;r&&t(e)}}var Ike={pageX:0,pageY:0};function Oke(t,e){e===void 0&&(e="page");var n=t.touches[0]||t.changedTouches[0],r=n||Ike;return{x:r[e+"X"],y:r[e+"Y"]}}function Pke(t,e){return e===void 0&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function f9(t,e){return e===void 0&&(e="page"),{point:Bae(t)?Oke(t,e):Pke(t,e)}}var Uae=function(t,e){e===void 0&&(e=!1);var n=function(r){return t(r,f9(r))};return e?xke(n):n},Rke=function(){return J1&&window.onpointerdown===null},Lke=function(){return J1&&window.ontouchstart===null},Dke=function(){return J1&&window.onmousedown===null}
53,kke={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Nke={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Vae(t){return Rke()?t:Lke()?Nke[t]:Dke()?kke[t]:t}function xE(t,e,n,r){return Wk(t,Vae(e),Uae(n,e==="pointerdown"),r)}function kR(t,e,n,r){return LB(t,Vae(e),n&&Uae(n,e==="pointerdown"),r)}function Hae(t){var e=null;return function(){var n=function(){e=null};return e===null?(e=t,n):!1}}var rq=Hae("dragHorizontal"),iq=Hae("dragVertical");function jae(t){var e=!1;if(t==="y")e=iq();else if(t==="x")e=rq();else{var n=rq(),r=iq();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function zae(){var t=jae(!0);return t?(t(),!1):!0}function sq(t,e,n){return function(r,i){var s;!$ae(r)||zae()||((s=t.animationState)===null||s===void 0||s.setActive(vs.Hover,e),n==null||n(r,i))}}function Mke(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,i=t.visualElement;kR(i,"pointerenter",e||r?sq(i,!0,e):void 0,{passive:!e}),kR(i,"pointerleave",n||r?sq(i,!1,n):void 0,{passive:!n})}var Gae=function(t,e){return e?t===e?!0:Gae(t,e.parentElement):!1};function h9(t){return $.useEffect(function(){return function(){return t()}},[])}const NR=(t,e,n)=>Math.min(Math.max(n,t),e),w3=.001,Fke=.01,$ke=10,Bke=.05,Uke=1;function Vke({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,s,a=1-e;a=NR(Bke,Uke,a),t=NR(Fke,$ke,t/1e3),a<1?(i=u=>{const c=u*a,d=c*t,f=c-n,h=DB(u,a),g=Math.exp(-d);return w3-f/h*g},s=u=>{const d=u*a*t,f=d*n+n,h=Math.pow(a,2)*Math.pow(u,2)*t,g=Math.exp(-d),v=DB(Math.pow(u,2),a);return(-i(u)+w3>0?-1:1)*((f-h)*g)/v}):(i=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-w3+c*d},s=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const o=5/t,l=jke(i,s,o);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:t}}}const Hke=12;function jke(t,e,n){let r=n;for(let i=1;i<Hke;i++)r=r-t(r)/e(r);return r}function DB(t,e){return t*Math.sqrt(1-e*e)}const zke=["duration","bounce"],Gke=["stiffness","damping","mass"];function aq(t,e){return e.some(n=>t[n]!==void 0)}function Wke(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!aq(t,Gke)&&aq(t,zke)){const n=Vke(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function p9(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:i}=t,s=Uc(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:o,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=Wke(s),h=oq,g=oq;function v(){const b=c?-(c/1e3):0,S=n-e,A=l/(2*Math.sqrt(o*u)),w=Math.sqrt(o/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-e)/100,.4)),A<1){const x=DB(w,A);h=P=>{const N=Math.exp(-A*w*P);return n-N*((b+A*w*S)/x*Math.sin(x*P)+S*Math.cos(x*P))},g=P=>{const N=Math.exp(-A*w*P);return A*w*N*(Math.sin(x*P)*(b+A*w*S)/x+S*Math.cos(x*P))-N*(Math.cos(x*P)*(b+A*w*S)-x*S*Math.sin(x*P))}}else if(A===1)h=x=>n-Math.exp(-w*x)*(S+(b+w*S)*x);else{const x=w*Math.sqrt(A*A-1);h=P=>{const N=Math.exp(-A*w*P),k=Math.min(x*P,300);return n-N*((b+A*w*S)*Math.sinh(k)+x*S*Math.cosh(k))/x}}}return v(),{next:b=>{const S=h(b);if(f)a.done=b>=d;else{const A=g(b)*1e3,w=Math.abs(A)<=r,x=Math.abs(n-S)<=i;a.done=w&&x}return a.value=a.done?n:S,a},flipTarget:()=>{c=-c,[e,n]=[n,e],v()}}}p9.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const oq=t=>0,$_=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Ta=(t,e,n)=>-n*t+n*e+t;function _3(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function lq({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,a=0;if(!e)i=s=a=n;else{const o=n<.5?n*(1+e):n+e-n*e,l=2*n-o;i=_3(l,o,t+1/3),s=_3(l,o,t),a=_3(l,o,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}const qke=(t,e,n)=>{const r=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-r)+r))},Kke=[PB,Xm,t0],uq=t=>Kke.find(e=>e.test(t)),Wae=(t,e)=>{let n=uq(t),r=uq(e),i=n.parse(t),s=r.parse(e);n===t0&&(i=lq(i),n=Xm),r===t0&&(s=lq(s),r=Xm);const a=Object.assign({},i);return o=>
53{for(const l in a)l!=="alpha"&&(a[l]=qke(i[l],s[l],o));return a.alpha=Ta(i.alpha,s.alpha,o),n.transform(a)}},kB=t=>typeof t=="number",Yke=(t,e)=>n=>e(t(n)),qk=(...t)=>t.reduce(Yke);function qae(t,e){return kB(t)?n=>Ta(t,e,n):Zl.test(t)?Wae(t,e):Yae(t,e)}const Kae=(t,e)=>{const n=[...t],r=n.length,i=t.map((s,a)=>qae(s,e[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}},Zke=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=qae(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}};function cq(t){const e=wg.parse(t),n=e.length;let r=0,i=0,s=0;for(let a=0;a<n;a++)r||typeof e[a]=="number"?r++:e[a].hue!==void 0?s++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:s}}const Yae=(t,e)=>{const n=wg.createTransformer(e),r=cq(t),i=cq(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?qk(Kae(r.parsed,i.parsed),n):a=>`${a>0?e:t}`},Qke=(t,e)=>n=>Ta(t,e,n);function Xke(t){if(typeof t=="number")return Qke;if(typeof t=="string")return Zl.test(t)?Wae:Yae;if(Array.isArray(t))return Kae;if(typeof t=="object")return Zke}function Jke(t,e,n){const r=[],i=n||Xke(t[0]),s=t.length-1;for(let a=0;a<s;a++){let o=i(t[a],t[a+1]);if(e){const l=Array.isArray(e)?e[a]:e;o=qk(l,o)}r.push(o)}return r}function e2e([t,e],[n]){return r=>n($_(t,e,r))}function t2e(t,e){const n=t.length,r=n-1;return i=>{let s=0,a=!1;if(i<=t[0]?a=!0:i>=t[r]&&(s=r-1,a=!0),!a){let l=1;for(;l<n&&!(t[l]>i||l===r);l++);s=l-1}const o=$_(t[s],t[s+1],i);return e[s](o)}}function g9(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;RR(s===e.length),RR(!r||!Array.isArray(r)||r.length===s-1),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=Jke(e,r,i),o=s===2?e2e(t,a):t2e(t,a);return n?l=>o(NR(t[0],t[s-1],l)):o}const Kk=t=>e=>1-t(1-e),m9=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,n2e=t=>e=>Math.pow(e,t),Zae=t=>e=>e*e*((t+1)*e-t),r2e=t=>{const e=Zae(t);return n=>(n*=2)<1?.5*e(n):.5*(2-Math.pow(2,-10*(n-1)))},Qae=1.525,i2e=4/11,s2e=8/11,a2e=9/10,v9=t=>t,y9=n2e(2),o2e=Kk(y9),Xae=m9(y9),Jae=t=>1-Math.sin(Math.acos(t)),b9=Kk(Jae),l2e=m9(b9),S9=Zae(Qae),u2e=Kk(S9),c2e=m9(S9),d2e=r2e(Qae),f2e=4356/361,h2e=35442/1805,p2e=16061/1805,MR=t=>{if(t===1||t===0)return t;const e=t*t;return t<i2e?7.5625*e:t<s2e?9.075*e-9.9*t+3.4:t<a2e?f2e*e-h2e*t+p2e:10.8*t*t-20.52*t+10.72},g2e=Kk(MR),m2e=t=>t<.5?.5*(1-MR(1-t*2)):.5*MR(t*2-1)+.5;function v2e(t,e){return t.map(()=>e||Xae).splice(0,t.length-1)}function y2e(t){const e=t.length;return t.map((n,r)=>r!==0?r/(e-1):0)}function b2e(t,e){return t.map(n=>n*e)}function SP({from:t=0,to:e=1,ease:n,offset:r,duration:i=300}){const s={done:!1,value:t},a=Array.isArray(e)?e:[t,e],o=b2e(r&&r.length===a.length?r:y2e(a),i);function l(){return g9(o,a,{ease:Array.isArray(n)?n:v2e(a,n)})}let u=l();return{next:c=>(s.value=u(c),s.done=c>=i,s),flipTarget:()=>{a.reverse(),u=l()}}}function S2e({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:s}){const a={done:!1,value:e};let o=n*t;const l=e+o,u=s===void 0?l:s(l);return u!==l&&(o=u-e),{next:c=>{const d=-o*Math.exp(-c/r);return a.done=!(d>i||d<-i),a.value=a.done?u:u+d,a},flipTarget:()=>{}}}const dq={keyframes:SP,spring:p9,decay:S2e};function E2e(t){if(Array.isArray(t.to))return SP;if(dq[t.type])return dq[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?SP:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?p9:SP}const eoe=1/60*1e3,T2e=typeof performance<"u"?()=>performance.now():()=>Date.now(),toe=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(T2e()),eoe);function A2e(t){let e=[],n=[],r=0,i=!1,s=!1;const a=new WeakSet,o={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?e:n;return u&&a.add(l),f.indexOf(l)===-1&&(f.push(l),d&&i&&(r=e.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let u=0;u<r;u++){const c=e[u];c(l),a.has(c)&&(o.schedule(c),t())}i=!1,s&&(s=!1,o.process(l))}};return o}const w2e=40;let NB=!0,B_=!1,MB=!1;const IE={delta:0,timestamp:0},QC=["read","update","preRender","render","postRender"],Yk=QC.reduce((t,e)=>(t[e]=A2e(()=>B_=!0),t),{}),Td=QC.reduce((t,e)=>{const n=Yk[e];return t[e]=(r,i=!1,s=!1)=>(B_||C2e(),n.schedule(r,i,s)),t},{}),g1=QC.reduce((t,e)=>(t[e]=Yk[e].cancel,t),{}),C3=QC.reduce((t,e)=>(t[e]=()=>Yk[e].process(IE),t),{}),_2e=t=>Yk[t].process(IE),noe=t=>{B_=!1,IE.delta=NB?eoe:Math.max(Math.min(t-IE.timestamp,w2e),1),IE.timestamp=t,MB=!0,QC.forEach(_2e),MB=!1,B_&&(NB=!1,toe(noe))},C2e=()=>{B_=!0,NB=!0,MB||toe(noe)},FR=()=>IE;function roe(t,e,n=0){return t-e-n}function x2e(t,e,n=0,r=!0){return r?roe(e+-t,e,n):e-(t-e)+n}function I2e(t,e,n,r){return r?t>=e+n:t<=-n}const O2e=t=>{const e=({delta:n})=>t(n);return{start:()=>Td.update(e,!0),stop:()=>g1.update(e)}};function ioe(t){var e,n,{from:r,autoplay:i=!0,driver:s=O2e,elapsed:a=0,repeat:o=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:f,onRepeat:h,onUpdate:g}=t,v=Uc(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:b}=v,S,A=0,w=v.duration,x,P=!1,N=!0,k;const U=E2e(v);!((n=(e=U).needsInterpolation)===null||n===void 0)&&n.call(e,r,b)&&(k=g9([0,100],[r,b],{clamp:!1}),r=0,b=100);const H=U(Object.assign(Object.assign({},v),{from:r,to:b}));function B(){A++,l==="reverse"?(N=A%2===0,a=x2e(a,w,u,N)):(a=roe(a,w,u),l==="mirror"&&H.flipTarget()),P=!1,h&&h()}function q(){S.stop(),f&&f()}
53function Z(L){if(N||(L=-L),a+=L,!P){const V=H.next(Math.max(0,a));x=V.value,k&&(x=k(x)),P=N?V.done:a<=0}g==null||g(x),P&&(A===0&&(w??(w=a)),A<o?I2e(a,w,u,N)&&B():q())}function C(){c==null||c(),S=s(Z),S.start()}return i&&C(),{stop:()=>{d==null||d(),S.stop()}}}function soe(t,e){return e?t*(1e3/e):0}function P2e({from:t=0,velocity:e=0,min:n,max:r,power:i=.8,timeConstant:s=750,bounceStiffness:a=500,bounceDamping:o=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:h}){let g;function v(w){return n!==void 0&&w<n||r!==void 0&&w>r}function b(w){return n===void 0?r:r===void 0||Math.abs(n-w)<Math.abs(r-w)?n:r}function S(w){g==null||g.stop(),g=ioe(Object.assign(Object.assign({},w),{driver:c,onUpdate:x=>{var P;d==null||d(x),(P=w.onUpdate)===null||P===void 0||P.call(w,x)},onComplete:f,onStop:h}))}function A(w){S(Object.assign({type:"spring",stiffness:a,damping:o,restDelta:l},w))}if(v(t))A({from:t,velocity:e,to:b(t)});else{let w=i*e+t;typeof u<"u"&&(w=u(w));const x=b(w),P=x===n?-1:1;let N,k;const U=H=>{N=k,k=H,e=soe(H-N,FR().delta),(P===1&&H>x||P===-1&&H<x)&&A({from:H,to:x,velocity:e})};S({type:"decay",from:t,velocity:e,timeConstant:s,power:i,restDelta:l,modifyTarget:u,onUpdate:v(w)?U:void 0})}return{stop:()=>g==null?void 0:g.stop()}}const FB=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),fq=t=>FB(t)&&t.hasOwnProperty("z"),KI=(t,e)=>Math.abs(t-e);function aoe(t,e){if(kB(t)&&kB(e))return KI(t,e);if(FB(t)&&FB(e)){const n=KI(t.x,e.x),r=KI(t.y,e.y),i=fq(t)&&fq(e)?KI(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ooe=(t,e)=>1-3*e+3*t,loe=(t,e)=>3*e-6*t,uoe=t=>3*t,$R=(t,e,n)=>((ooe(e,n)*t+loe(e,n))*t+uoe(e))*t,coe=(t,e,n)=>3*ooe(e,n)*t*t+2*loe(e,n)*t+uoe(e),R2e=1e-7,L2e=10;function D2e(t,e,n,r,i){let s,a,o=0;do a=e+(n-e)/2,s=$R(a,r,i)-t,s>0?n=a:e=a;while(Math.abs(s)>R2e&&++o<L2e);return a}const k2e=8,N2e=.001;function M2e(t,e,n,r){for(let i=0;i<k2e;++i){const s=coe(e,n,r);if(s===0)return e;const a=$R(e,n,r)-t;e-=a/s}return e}const EP=11,YI=1/(EP-1);function F2e(t,e,n,r){if(t===e&&n===r)return v9;const i=new Float32Array(EP);for(let a=0;a<EP;++a)i[a]=$R(a*YI,t,n);function s(a){let o=0,l=1;const u=EP-1;for(;l!==u&&i[l]<=a;++l)o+=YI;--l;const c=(a-i[l])/(i[l+1]-i[l]),d=o+c*YI,f=coe(d,t,n);return f>=N2e?M2e(a,d,t,n):f===0?d:D2e(a,o,o+YI,t,n)}return a=>a===0||a===1?a:$R(s(a),e,r)}function $2e(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,i=t.whileTap,s=t.visualElement,a=e||n||r||i,o=$.useRef(!1),l=$.useRef(null),u={passive:!(n||e||r||g)};function c(){var v;(v=l.current)===null||v===void 0||v.call(l),l.current=null}function d(){var v;return c(),o.current=!1,(v=s.animationState)===null||v===void 0||v.setActive(vs.Tap,!1),!zae()}function f(v,b){d()&&(Gae(s.getInstance(),v.target)?e==null||e(v,b):r==null||r(v,b))}function h(v,b){d()&&(r==null||r(v,b))}function g(v,b){var S;c(),!o.current&&(o.current=!0,l.current=qk(xE(window,"pointerup",f,u),xE(window,"pointercancel",h,u)),(S=s.animationState)===null||S===void 0||S.setActive(vs.Tap,!0),n==null||n(v,b))}kR(s,"pointerdown",a?g:void 0,u),h9(c)}var $B=new WeakMap,x3=new WeakMap,B2e=function(t){var e;(e=$B.get(t.target))===null||e===void 0||e(t)},U2e=function(t){t.forEach(B2e)};function V2e(t){var e=t.root,n=Uc(t,["root"]),r=e||document;x3.has(r)||x3.set(r,{});var i=x3.get(r),s=JSON.stringify(n);return i[s]||(i[s]=new IntersectionObserver(U2e,Wt({root:e},n))),i[s]}function H2e(t,e,n){var r=V2e(e);return $B.set(t,n),r.observe(t),function(){$B.delete(t),r.unobserve(t)}}function j2e(t){var e=t.visualElement,n=t.whileInView,r=t.onViewportEnter,i=t.onViewportLeave,s=t.viewport,a=s===void 0?{}:s,o=$.useRef({hasEnteredView:!1,isInView:!1}),l=!!(n||r||i);a.once&&o.current.hasEnteredView&&(l=!1);var u=typeof IntersectionObserver>"u"?W2e:G2e;u(l,o.current,e,a)}var z2e={some:0,all:1};function G2e(t,e,n,r){var i=r.root,s=r.margin,a=r.amount,o=a===void 0?"some":a,l=r.once;$.useEffect(function(){if(t){var u={root:i==null?void 0:i.current,rootMargin:s,threshold:typeof o=="number"?o:z2e[o]},c=function(d){var f,h=d.isIntersecting;if(e.isInView!==h&&(e.isInView=h,!(l&&!h&&e.hasEnteredView))){h&&(e.hasEnteredView=!0),(f=n.animationState)===null||f===void 0||f.setActive(vs.InView,h);var g=n.getProps(),v=h?g.onViewportEnter:g.onViewportLeave;v==null||v(d)}};return H2e(n.getInstance(),u,c)}}
53,[t,i,s,o])}function W2e(t,e,n,r){var i=r.fallback,s=i===void 0?!0:i;$.useEffect(function(){!t||!s||requestAnimationFrame(function(){var a;e.hasEnteredView=!0;var o=n.getProps().onViewportEnter;o==null||o(null),(a=n.animationState)===null||a===void 0||a.setActive(vs.InView,!0)})},[t])}var Jm=function(t){return function(e){return t(e),null}},q2e={inView:Jm(j2e),tap:Jm($2e),focus:Jm(Cke),hover:Jm(Mke)},K2e=0,Y2e=function(){return K2e++},doe=function(){return Fv(Y2e)};function foe(){var t=$.useContext(qC);if(t===null)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,i=doe();$.useEffect(function(){return r(i)},[]);var s=function(){return n==null?void 0:n(i)};return!e&&n?[!1,s]:[!0]}function hoe(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var BR=function(t){return t*1e3},Z2e={linear:v9,easeIn:y9,easeInOut:Xae,easeOut:o2e,circIn:Jae,circInOut:l2e,circOut:b9,backIn:S9,backInOut:c2e,backOut:u2e,anticipate:d2e,bounceIn:g2e,bounceInOut:m2e,bounceOut:MR},hq=function(t){if(Array.isArray(t)){RR(t.length===4);var e=Xs(t,4),n=e[0],r=e[1],i=e[2],s=e[3];return F2e(n,r,i,s)}else if(typeof t=="string")return Z2e[t];return t},Q2e=function(t){return Array.isArray(t)&&typeof t[0]!="number"},pq=function(t,e){return t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&wg.test(e)&&!e.startsWith("url("))},_y=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},ZI=function(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}},I3=function(){return{type:"keyframes",ease:"linear",duration:.3}},X2e=function(t){return{type:"keyframes",duration:.8,values:t}},gq={x:_y,y:_y,z:_y,rotate:_y,rotateX:_y,rotateY:_y,rotateZ:_y,scaleX:ZI,scaleY:ZI,scale:ZI,opacity:I3,backgroundColor:I3,color:I3,default:ZI},J2e=function(t,e){var n;return F_(e)?n=X2e:n=gq[t]||gq.default,Wt({to:e},n(e))},eNe=Wt(Wt({},Cae),{color:Zl,backgroundColor:Zl,outlineColor:Zl,fill:Zl,stroke:Zl,borderColor:Zl,borderTopColor:Zl,borderRightColor:Zl,borderBottomColor:Zl,borderLeftColor:Zl,filter:RB,WebkitFilter:RB}),E9=function(t){return eNe[t]};function T9(t,e){var n,r=E9(t);return r!==RB&&(r=wg),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,e)}function tNe(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Uc(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}function nNe(t){var e=t.ease,n=t.times,r=t.yoyo,i=t.flip,s=t.loop,a=Uc(t,["ease","times","yoyo","flip","loop"]),o=Wt({},a);return n&&(o.offset=n),a.duration&&(o.duration=BR(a.duration)),a.repeatDelay&&(o.repeatDelay=BR(a.repeatDelay)),e&&(o.ease=Q2e(e)?e.map(hq):hq(e)),a.type==="tween"&&(o.type="keyframes"),(r||s||i)&&(r?o.repeatType="reverse":s?o.repeatType="loop":i&&(o.repeatType="mirror"),o.repeat=s||r||i||a.repeat),a.type!=="spring"&&(o.type="keyframes"),o}function rNe(t,e){var n,r,i=A9(t,e)||{};return(r=(n=i.delay)!==null&&n!==void 0?n:t.delay)!==null&&r!==void 0?r:0}function iNe(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=Df([],Xs(t.to),!1),t.to[0]=t.from),t}function sNe(t,e,n){var r;return Array.isArray(e.to)&&((r=t.duration)!==null&&r!==void 0||(t.duration=.8)),iNe(e),tNe(t)||(t=Wt(Wt({},t),J2e(n,e.to))),Wt(Wt({},e),nNe(t))}function aNe(t,e,n,r,i){var s,a=A9(r,t),o=(s=a.from)!==null&&s!==void 0?s:e.get(),l=pq(t,n);o==="none"&&l&&typeof n=="string"?o=T9(t,n):mq(o)&&typeof n=="string"?o=vq(n):!Array.isArray(n)&&mq(n)&&typeof o=="string"&&(n=vq(o));var u=pq(t,o);function c(){var f={from:o,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(h){return e.set(h)}};return a.type==="inertia"||a.type==="decay"?P2e(Wt(Wt({},f),a)):ioe(Wt(Wt({},sNe(a,f,t)),{onUpdate:function(h){var g;f.onUpdate(h),(g=a.onUpdate)===null||g===void 0||g.call(a,h)},onComplete:function(){var h;f.onComplete(),(h=a.onComplete)===null||h===void 0||h.call(a)}}))}function d(){var f,h,g=Mae(n);
53return e.set(g),i(),(f=a==null?void 0:a.onUpdate)===null||f===void 0||f.call(a,g),(h=a==null?void 0:a.onComplete)===null||h===void 0||h.call(a),{stop:function(){}}}return!u||!l||a.type===!1?d:c}function mq(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function vq(t){return typeof t=="number"?0:T9("",t)}function A9(t,e){return t[e]||t.default||t}function w9(t,e,n,r){return r===void 0&&(r={}),e.start(function(i){var s,a,o=aNe(t,e,n,r,i),l=rNe(r,t),u=function(){return a=o()};return l?s=window.setTimeout(u,BR(l)):u(),function(){clearTimeout(s),a==null||a.stop()}})}var oNe=function(t){return/^\-?\d*\.?\d+$/.test(t)},lNe=function(t){return/^0[^.\s]+$/.test(t)};function _9(t,e){t.indexOf(e)===-1&&t.push(e)}function C9(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Dw=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(e){var n=this;return _9(this.subscriptions,e),function(){return C9(n.subscriptions,e)}},t.prototype.notify=function(e,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(var s=0;s<i;s++){var a=this.subscriptions[s];a&&a(e,n,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),uNe=function(t){return!isNaN(parseFloat(t))},cNe=function(){function t(e){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Dw,this.velocityUpdateSubscribers=new Dw,this.renderSubscribers=new Dw,this.canTrackVelocity=!1,this.updateAndNotify=function(r,i){i===void 0&&(i=!0),n.prev=n.current,n.current=r;var s=FR(),a=s.delta,o=s.timestamp;n.lastUpdated!==o&&(n.timeDelta=a,n.lastUpdated=o,Td.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),i&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return Td.postRender(n.velocityCheck)},this.velocityCheck=function(r){var i=r.timestamp;i!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=uNe(this.current)}return t.prototype.onChange=function(e){return this.updateSubscribers.add(e)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},t.prototype.attach=function(e){this.passiveEffect=e}
53,t.prototype.set=function(e,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?soe(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(e){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=e(r)}).then(function(){return n.clearAnimation()})},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function U0(t){return new cNe(t)}var poe=function(t){return function(e){return e.test(t)}},dNe={test:function(t){return t==="auto"},parse:function(t){return t}},goe=[gb,Qn,Gh,bm,eke,JDe,dNe],pA=function(t){return goe.find(poe(t))},fNe=Df(Df([],Xs(goe),!1),[Zl,wg],!1),hNe=function(t){return fNe.find(poe(t))};function pNe(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,U0(n))}function gNe(t,e){var n=zk(t,e),r=n?t.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,s=i===void 0?{}:i;r.transition;var a=Uc(r,["transitionEnd","transition"]);a=Wt(Wt({},a),s);for(var o in a){var l=Mae(a[o]);pNe(t,o,l)}}function mNe(t,e,n){var r,i,s,a,o=Object.keys(e).filter(function(h){return!t.hasValue(h)}),l=o.length;if(l)for(var u=0;u<l;u++){var c=o[u],d=e[c],f=null;Array.isArray(d)&&(f=d[0]),f===null&&(f=(i=(r=n[c])!==null&&r!==void 0?r:t.readValue(c))!==null&&i!==void 0?i:e[c]),f!=null&&(typeof f=="string"&&(oNe(f)||lNe(f))?f=parseFloat(f):!hNe(f)&&wg.test(d)&&(f=T9(c,d)),t.addValue(c,U0(f)),(s=(a=n)[c])!==null&&s!==void 0||(a[c]=f),t.setBaseTarget(c,f))}}function vNe(t,e){if(e){var n=e[t]||e.default||e;return n.from}}function yNe(t,e,n){var r,i,s={};for(var a in t)s[a]=(r=vNe(a,e))!==null&&r!==void 0?r:(i=n.getValue(a))===null||i===void 0?void 0:i.get();return s}function bNe(t,e,n){n===void 0&&(n={}),t.notifyAnimationStart(e);var r;if(Array.isArray(e)){var i=e.map(function(a){return BB(t,a,n)});r=Promise.all(i)}else if(typeof e=="string")r=BB(t,e,n);else{var s=typeof e=="function"?zk(t,e,n.custom):e;r=moe(t,s,n)}return r.then(function(){return t.notifyAnimationComplete(e)})}function BB(t,e,n){var r;n===void 0&&(n={});var i=zk(t,e,n.custom),s=(i||{}).transition,a=s===void 0?t.getDefaultTransition()||{}:s;n.transitionOverride&&(a=n.transitionOverride);var o=i?function(){return moe(t,i,n)}:function(){return Promise.resolve()},l=!((r=t.variantChildren)===null||r===void 0)&&r.size?function(h){h===void 0&&(h=0);var g=a.delayChildren,v=g===void 0?0:g,b=a.staggerChildren,S=a.staggerDirection;return SNe(t,e,v+h,b,S,n)}:function(){return Promise.resolve()},u=a.when;if(u){var c=Xs(u==="beforeChildren"?[o,l]:[l,o],2),d=c[0],f=c[1];return d().then(f)}else return Promise.all([o(),l(n.delay)])}function moe(t,e,n){var r,i=n===void 0?{}:n,s=i.delay,a=s===void 0?0:s,o=i.transitionOverride,l=i.type,u=t.makeTargetAnimatable(e),c=u.transition,d=c===void 0?t.getDefaultTransition():c,f=u.transitionEnd,h=Uc(u,["transition","transitionEnd"]);o&&(d=o);var g=[],v=l&&((r=t.animationState)===null||r===void 0?void 0:r.getState()[l]);for(var b in h){var S=t.getValue(b),A=h[b];if(!(!S||A===void 0||v&&TNe(v,b))){var w=Wt({delay:a},d);t.shouldReduceMotion&&KC(b)&&(w=Wt(Wt({},w),{type:!1,delay:0}));var x=w9(b,S,A,w);g.push(x)}}return Promise.all(g).then(function(){f&&gNe(t,f)})}function SNe(t,e,n,r,i,s){n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1);var a=[],o=(t.variantChildren.size-1)*r,l=i===1?function(u){return u===void 0&&(u=0),u*r}:function(u){return u===void 0&&(u=0),o-u*r};return Array.from(t.variantChildren).sort(ENe).forEach(function(u,c){a.push(BB(u,e,Wt(Wt({},s),{delay:n+l(c)})).then(function(){return u.notifyAnimationComplete(e)}))}),Promise.all(a)}function ENe(t,e){return t.sortNodePosition(e)}function TNe(t,e){var n=t.protectedKeys,r=t.needsAnimating,i=n.hasOwnProperty(e)&&r[e]!==!0;return r[e]=!1,i}var x9=[vs.Animate,vs.InView,vs.Focus,vs.Hover,vs.Tap,vs.Drag,vs.Exit],ANe=Df([],Xs(x9),!1).reverse(),wNe=x9.length;function _Ne(t){return function(e){return Promise.all(e.map(function(n){var r=n.animation,i=n.options;return bNe(t,r,i)}))}}function CNe(t){var e=_Ne(t),n=INe(),r={},i=!0,s=function(c,d){var f=zk(t,d);if(f){f.transition;var h=f.transitionEnd,g=Uc(f,["transition","transitionEnd"]);c=Wt(Wt(Wt({},c),g),h)}return c};function a(c){return r[c]!==void 0}function o(c){e=c(t)}function l(c,d){for(var f,h=t.getProps(),g=t.getVariantContext(!0)||{},v=[],b=new Set,S={},A=1/0,w=function(k){var U=ANe[k],H=n[U],B=(f=h[U])!==null&&f!==void 0?f:g[U],q=Ef(B),Z=U===d?H.isActive:null;Z===!1&&(A=k);
53var C=B===g[U]&&B!==h[U]&&q;if(C&&i&&t.manuallyAnimateOnMount&&(C=!1),H.protectedKeys=Wt({},S),!H.isActive&&Z===null||!B&&!H.prevProp||d9(B)||typeof B=="boolean")return"continue";var L=xNe(H.prevProp,B),V=L||U===d&&H.isActive&&!C&&q||k>A&&q,j=Array.isArray(B)?B:[B],X=j.reduce(s,{});Z===!1&&(X={});var G=H.prevResolvedValues,ie=G===void 0?{}:G,ae=Wt(Wt({},ie),X),ue=function(ye){V=!0,b.delete(ye),H.needsAnimating[ye]=!0};for(var Q in ae){var de=X[Q],le=ie[Q];S.hasOwnProperty(Q)||(de!==le?F_(de)&&F_(le)?!hoe(de,le)||L?ue(Q):H.protectedKeys[Q]=!0:de!==void 0?ue(Q):b.add(Q):de!==void 0&&b.has(Q)?ue(Q):H.protectedKeys[Q]=!0)}H.prevProp=B,H.prevResolvedValues=X,H.isActive&&(S=Wt(Wt({},S),X)),i&&t.blockInitialAnimation&&(V=!1),V&&!C&&v.push.apply(v,Df([],Xs(j.map(function(ye){return{animation:ye,options:Wt({type:U},c)}})),!1))},x=0;x<wNe;x++)w(x);if(r=Wt({},S),b.size){var P={};b.forEach(function(k){var U=t.getBaseTarget(k);U!==void 0&&(P[k]=U)}),v.push({animation:P})}var N=!!v.length;return i&&h.initial===!1&&!t.manuallyAnimateOnMount&&(N=!1),i=!1,N?e(v):Promise.resolve()}function u(c,d,f){var h;if(n[c].isActive===d)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(function(b){var S;return(S=b.animationState)===null||S===void 0?void 0:S.setActive(c,d)}),n[c].isActive=d;var g=l(f,c);for(var v in n)n[v].protectedKeys={};return g}return{isAnimated:a,animateChanges:l,setActive:u,setAnimateFunction:o,getState:function(){return n}}}function xNe(t,e){return typeof e=="string"?e!==t:fae(e)?!hoe(e,t):!1}function Cy(t){return t===void 0&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function INe(){var t;return t={},t[vs.Animate]=Cy(!0),t[vs.InView]=Cy(),t[vs.Hover]=Cy(),t[vs.Tap]=Cy(),t[vs.Drag]=Cy(),t[vs.Focus]=Cy(),t[vs.Exit]=Cy(),t}var ONe={animation:Jm(function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=CNe(e)),d9(n)&&$.useEffect(function(){return n.subscribe(e)},[n])}),exit:Jm(function(t){var e=t.custom,n=t.visualElement,r=Xs(foe(),2),i=r[0],s=r[1],a=$.useContext(qC);$.useEffect(function(){var o,l;n.isPresent=i;var u=(o=n.animationState)===null||o===void 0?void 0:o.setActive(vs.Exit,!i,{custom:(l=a==null?void 0:a.custom)!==null&&l!==void 0?l:e});!i&&(u==null||u.then(s))},[i])})},voe=function(){function t(e,n,r){var i=this,s=r===void 0?{}:r,a=s.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var f=P3(i.lastMoveEventInfo,i.history),h=i.startEvent!==null,g=aoe(f.offset,{x:0,y:0})>=3;if(!(!h&&!g)){var v=f.point,b=FR().timestamp;i.history.push(Wt(Wt({},v),{timestamp:b}));var S=i.handlers,A=S.onStart,w=S.onMove;h||(A&&A(i.lastMoveEvent,f),i.startEvent=i.lastMoveEvent),w&&w(i.lastMoveEvent,f)}}},this.handlePointerMove=function(f,h){if(i.lastMoveEvent=f,i.lastMoveEventInfo=O3(h,i.transformPagePoint),$ae(f)&&f.buttons===0){i.handlePointerUp(f,h);return}Td.update(i.updatePoint,!0)},this.handlePointerUp=function(f,h){i.end();var g=i.handlers,v=g.onEnd,b=g.onSessionEnd,S=P3(O3(h,i.transformPagePoint),i.history);i.startEvent&&v&&v(f,S),b&&b(f,S)},!(Bae(e)&&e.touches.length>1)){this.handlers=n,this.transformPagePoint=a;var o=f9(e),l=O3(o,this.transformPagePoint),u=l.point,c=FR().timestamp;this.history=[Wt(Wt({},u),{timestamp:c})];var d=n.onSessionStart;d&&d(e,P3(l,this.history)),this.removeListeners=qk(xE(window,"pointermove",this.handlePointerMove),xE(window,"pointerup",this.handlePointerUp),xE(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(e){this.handlers=e},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),g1.update(this.updatePoint)},t}();function O3(t,e){return e?{point:e(t.point)}:t}function yq(t,e){return{x:t.x-e.x,y:t.y-e.y}}function P3(t,e){var n=t.point;return{point:n,delta:yq(n,yoe(e)),offset:yq(n,PNe(e)),velocity:RNe(e,.1)}}function PNe(t){return t[0]}function yoe(t){return t[t.length-1]}function RNe(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=yoe(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>BR(e)));)n--;if(!r)return{x:0,y:0};var s=(i.timestamp-r.timestamp)/1e3;if(s===0)return{x:0,y:0};var a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function _g(t){return t.max-t.min}function bq(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=.01),aoe(t,e)<n}function Sq(t,e,n,r){r===void 0&&(r=.5),t.origin=r,t.originPoint=Ta(e.min,e.max,t.origin),t.scale=_g(n)/_g(e),(bq(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ta(n.min,n.max,t.origin)-t.originPoint,(bq(t.translate)||isNaN(t.translate))&&(t.translate=0)}function kw(t,e,n,r){Sq(t.x,e.x,n.x,r==null?void 0:r.originX),Sq(t.y,e.y,n.y,r==null?void 0:r.originY)}function Eq(t,e,n){t.min=n.min+e.min,t.max=t.min+_g(e)}function LNe(t,e,n){Eq(t.x,e.x,n.x),Eq(t.y,e.y,n.y)}function Tq(t,e,n){t.min=e.min-n.min,t.max=t.min+_g(e)}function Nw(t,e,n){Tq(t.x,e.x,n.x),Tq(t.y,e.y,n.y)}function DNe(t,e,n){var r=e.min,i=e.max;return r!==void 0&&t<r?t=n?Ta(r,t,n.min):Math.max(t,r):i!==void 0&&t>i&&(t=n?Ta(i,t,n.max):Math.min(t,i)),t}function Aq(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function kNe(t,e){var n=e.top,r=e.left,i=e.bottom,s=e.right;return{x:Aq(t.x,r,s),y:Aq(t.y,n,i)}}function wq(t,e){var n,r=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&(n=Xs([i,r],2),r=n[0],i=n[1]),{min:r,max:i}}function NNe(t,e){return{x:wq(t.x,e.x),y:wq(t.y,e.y)}}function MNe(t,e){var n=.5,r=_g(t),i=_g(e);return i>r?n=$_(e.min,e.max-r,t.min):r>i&&(n=$_(t.min,t.max-i,e.min)),NR(0,1,n)}function FNe(t,e){var n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}var UB=.35;function $Ne(t){return t===void 0&&(t=UB),t===!1?t=0:t===!0&&(t=UB),{x:_q(t,"left","right"),y:_q(t,"top","bottom")}}function _q(t,e,n){return{min:Cq(t,e),max:Cq(t,n)}}function Cq(t,e){var n;return typeof t=="number"?t:(n=t[e])!==null&&n!==void 0?n:0}var xq=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Mw=function(){return{x:xq(),y:xq()}},Iq=function(){return{min:0,max:0}},Tl=function(){return{x:Iq(),y:Iq()}};function mh(t){return[t("x"),t("y")]}function boe(t){var e=t.top,n=t.left,r=t.right,i=t.bottom;return{x:{min:n,max:r},y:{min:e,max:i}}}function BNe(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function UNe(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function R3(t){return t===void 0||t===1}function Soe(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!R3(e)||!R3(n)||!R3(r)}function Sm(t){return Soe(t)||Oq(t.x)||Oq(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function Oq(t){return t&&t!=="0%"}function UR(t,e,n){var r=t-n,i=e*r;return n+i}function Pq(t,e,n,r,i){return i!==void 0&&(t=UR(t,i,r)),UR(t,n,r)+e}function VB(t,e,n,r,i){e===void 0&&(e=0),n===void 0&&(n=1),t.min=Pq(t.min,e,n,r,i),t.max=Pq(t.max,e,n,r,i)}function Eoe(t,e){var n=e.x,r=e.y;VB(t.x,n.translate,n.scale,n.originPoint),VB(t.y,r.translate,r.scale,r.originPoint)}function VNe(t,e,n,r){var i,s;r===void 0&&(r=!1);var a=n.length;if(a){e.x=e.y=1;for(var o,l,u=0;u<a;u++)o=n[u],l=o.projectionDelta,((s=(i=o.instance)===null||i===void 0?void 0:i.style)===null||s===void 0?void 0:s.display)!=="contents"&&(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&eE(t,{x:-o.scroll.x,y:-o.scroll.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,Eoe(t,l)),r&&Sm(o.latestValues)&&eE(t,o.latestValues))}}function xm(t,e){t.min=t.min+e,t.max=t.max+e}function Rq(t,e,n){var r=Xs(n,3),i=r[0],s=r[1],a=r[2],o=e[a]!==void 0?e[a]:.5,l=Ta(t.min,t.max,o);VB(t,e[i],e[s],l,e.scale)}var HNe=["x","scaleX","originX"],jNe=["y","scaleY","originY"];function eE(t,e){Rq(t.x,e,HNe),Rq(t.y,e,jNe)}function Toe(t,e){return boe(UNe(t.getBoundingClientRect(),e))}function zNe(t,e,n){var r=Toe(t,n),i=e.scroll;return i&&(xm(r.x,i.x),xm(r.y,i.y)),r}var GNe=new WeakMap,WNe=function(){function t(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Tl(),this.visualElement=e}return t.prototype.start=function(e,n){var r=this,i=n===void 0?{}:n,s=i.snapToCursor,a=s===void 0?!1:s;if(this.visualElement.isPresent!==!1){var o=function(d){r.stopAnimation(),a&&r.snapToCursor(f9(
53d,"page").point)},l=function(d,f){var h,g=r.getProps(),v=g.drag,b=g.dragPropagation,S=g.onDragStart;v&&!b&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=jae(v),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),mh(function(A){var w,x,P=r.getAxisMotionValue(A).get()||0;if(Gh.test(P)){var N=(x=(w=r.visualElement.projection)===null||w===void 0?void 0:w.layout)===null||x===void 0?void 0:x.actual[A];if(N){var k=_g(N);P=k*(parseFloat(P)/100)}}r.originPoint[A]=P}),S==null||S(d,f),(h=r.visualElement.animationState)===null||h===void 0||h.setActive(vs.Drag,!0))},u=function(d,f){var h=r.getProps(),g=h.dragPropagation,v=h.dragDirectionLock,b=h.onDirectionLock,S=h.onDrag;if(!(!g&&!r.openGlobalLock)){var A=f.offset;if(v&&r.currentDirection===null){r.currentDirection=qNe(A),r.currentDirection!==null&&(b==null||b(r.currentDirection));return}r.updateAxis("x",f.point,A),r.updateAxis("y",f.point,A),r.visualElement.syncRender(),S==null||S(d,f)}},c=function(d,f){return r.stop(d,f)};this.panSession=new voe(e,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(e,n){var r=this.isDragging;if(this.cancel(),!!r){var i=n.velocity;this.startAnimation(i);var s=this.getProps().onDragEnd;s==null||s(e,n)}},t.prototype.cancel=function(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(vs.Drag,!1)},t.prototype.updateAxis=function(e,n,r){var i=this.getProps().drag;if(!(!r||!QI(e,i,this.currentDirection))){var s=this.getAxisMotionValue(e),a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=DNe(a,this.constraints[e],this.elastic[e])),s.set(a)}},t.prototype.resolveConstraints=function(){var e=this,n=this.getProps(),r=n.dragConstraints,i=n.dragElastic,s=(this.visualElement.projection||{}).layout,a=this.constraints;r&&JS(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&s?this.constraints=kNe(s.actual,r):this.constraints=!1,this.elastic=$Ne(i),a!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&mh(function(o){e.getAxisMotionValue(o)&&(e.constraints[o]=FNe(s.actual[o],e.constraints[o]))})},t.prototype.resolveRefConstraints=function(){var e=this.getProps(),n=e.dragConstraints,r=e.onMeasureDragConstraints;if(!n||!JS(n))return!1;var i=n.current,s=this.visualElement.projection;if(!s||!s.layout)return!1;var a=zNe(i,s.root,this.visualElement.getTransformPagePoint()),o=NNe(s.layout.actual,a);if(r){var l=r(BNe(o));this.hasMutatedConstraints=!!l,l&&(o=boe(l))}return o},t.prototype.startAnimation=function(e){var n=this,r=this.getProps(),i=r.drag,s=r.dragMomentum,a=r.dragElastic,o=r.dragTransition,l=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},d=mh(function(f){var h;if(QI(f,i,n.currentDirection)){var g=(h=c==null?void 0:c[f])!==null&&h!==void 0?h:{};l&&(g={min:0,max:0});var v=a?200:1e6,b=a?40:1e7,S=Wt(Wt({type:"inertia",velocity:s?e[f]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10},o),g);return n.startAxisValueAnimation(f,S)}});return Promise.all(d).then(u)},t.prototype.startAxisValueAnimation=function(e,n){var r=this.getAxisMotionValue(e);return w9(e,r,0,n)},t.prototype.stopAnimation=function(){var e=this;mh(function(n){return e.getAxisMotionValue(n).stop()})},t.prototype.getAxisMotionValue=function(e){var n,r,i="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[i];return s||this.visualElement.getValue(e,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])!==null&&r!==void 0?r:0)},t.prototype.snapToCursor=function(e){var n=this;mh(function(r){var i=n.getProps().drag;if(QI(r,i,n.currentDirection)){var s=n.visualElement.projection,a=n.getAxisMotionValue(r);if(s&&s.layout){var o=s.layout.actual[r],l=o.min,u=o.max;a.set(e[r]-Ta(l,u,.5))}}})},t.prototype.scalePositionWithinConstraints=function(){var e=this,n,r=this.getProps(),i=r.drag,s=r.dragConstraints,a=this.visualElement.projection;if(!(!JS(s)||!a||!this.constraints)){this.stopAnimation();var o={x:0,y:0};mh(function(u){var c=e.getAxisMotionValue(u);if(c){var d=c.get();o[u]=MNe({min:d,max:d},e.constraints[u])}});var l=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=l?l({},""):"none",(n=a.root)===null||n===void 0||n.updateScroll(),a.updateLayout(),this.resolveConstraints(),mh(function(u){if(QI(u,i,null)){var c=e.getAxisMotionValue(u),d=e.constraints[u],f=d.min,h=d.max;c.set(Ta(f,h,o[u]))}})}},t.prototype.addListeners=function(){var e=this,n;GNe.set(this.visualElement,this);var r=this.visualElement.getInstance(),i=xE(r,"pointerdown",function(u){var c=e.getProps(),d=c.drag,f=c.dragListener,h=f===void 0?!0:f;d&&h&&e.start(u)}),s=function(){var u=e.getProps().dragConstraints;JS(u)&&(e.constraints=e.resolveRefConstraints())},a=this.visualElement.projection,o=a.addEventListener("measure",s);a&&!a.layout&&((n=a.root)===null||n===void 0||n.updateScroll(),a.updateLayout()),s();var l=Wk(window,"resize",function(){return e.scalePositionWithinConstraints()});return a.addEventListener("didUpdate",function(u){var c=u.delta,d=u.hasLayoutChanged;e.isDragging&&d&&(mh(function(f){var h=e.getAxisMotionValue(f);h&&(e.originPoint[f]+=c[f].translate,h.set(h.get()+c[f].translate))}),e.visualElement.syncRender())}),function(){l(),i(),o()}},t.prototype.getProps=function(){var e=this.visualElement.getProps(),n=e.drag,r=n===void 0?!1:n,i=e.dragDirectionLock,s=i===void 0?!1:i,a=e.dragPropagation,o=a===void 0?!1:a,l=e.dragConstraints,u=l===void 0?!1:l,c=e.dragElastic,d=c===void 0?UB:c,f=e.dragMomentum,h=f===void 0?!0:f;return Wt(Wt({},e),{drag:r,dragDirectionLock:s,dragPropagation:o,dragConstraints:u,dragElastic:d,dragMomentum:h})},t}();function QI(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function qNe(t,e){e===void 0&&(e=10);var n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}function KNe(t){var e=t.dragControls,n=t.visualElement,r=Fv(function(){return new WNe(n)});$.useEffect(function(){return e&&e.subscribe(r)},[r,e]),$.useEffect(function(){return r.addListeners()},[r])}function YNe(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,i=t.onPanSessionStart,s=t.visualElement,a=e||n||r||i,o=$.useRef(null),l=$.useContext(p1).transformPagePoint,u={onSessionStart:i,onStart:n,onMove:e,onEnd:function(d,f){o.current=null,r&&r(d,f)}};$.useEffect(function(){o.current!==null&&o.current.updateHandlers(u)});
53function c(d){o.current=new voe(d,u,{transformPagePoint:l})}kR(s,"pointerdown",a&&c),h9(function(){return o.current&&o.current.end()})}var ZNe={pan:Jm(YNe),drag:Jm(KNe)},XI=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function QNe(){var t=XI.map(function(){return new Dw}),e={},n={clearAllListeners:function(){return t.forEach(function(r){return r.clear()})},updatePropListeners:function(r){XI.forEach(function(i){var s,a="on"+i,o=r[a];(s=e[i])===null||s===void 0||s.call(e),o&&(e[i]=n[a](o))})}};return t.forEach(function(r,i){n["on"+XI[i]]=function(s){return r.add(s)},n["notify"+XI[i]]=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.notify.apply(r,Df([],Xs(s),!1))}}),n}function XNe(t,e,n){var r;for(var i in e){var s=e[i],a=n[i];if(Ag(s))t.addValue(i,s);else if(Ag(a))t.addValue(i,U0(s));else if(a!==s)if(t.hasValue(i)){var o=t.getValue(i);!o.hasAnimated&&o.set(s)}else t.addValue(i,U0((r=t.getStaticValue(i))!==null&&r!==void 0?r:s))}for(var i in n)e[i]===void 0&&t.removeValue(i);return e}var Aoe=function(t){var e=t.treeType,n=e===void 0?"":e,r=t.build,i=t.getBaseTarget,s=t.makeTargetAnimatable,a=t.measureViewportBox,o=t.render,l=t.readValueFromInstance,u=t.removeValueFromRenderState,c=t.sortNodePosition,d=t.scrapeMotionValuesFromProps;return function(f,h){var g=f.parent,v=f.props,b=f.presenceId,S=f.blockInitialAnimation,A=f.visualState,w=f.shouldReduceMotion;h===void 0&&(h={});var x=!1,P=A.latestValues,N=A.renderState,k,U=QNe(),H=new Map,B=new Map,q={},Z=Wt({},P),C;function L(){!k||!x||(V(),o(k,N,v.style,de.projection))}function V(){r(de,N,P,h,v)}function j(){U.notifyUpdate(P)}function X(le,ye){var fe=ye.onChange(function(Le){P[le]=Le,v.onUpdate&&Td.update(j,!1,!0)}),We=ye.onRenderRequest(de.scheduleRender);B.set(le,function(){fe(),We()})}var G=d(v);for(var ie in G){var ae=G[ie];P[ie]!==void 0&&Ag(ae)&&ae.set(P[ie],!1)}var ue=Gk(v),Q=pae(v),de=Wt(Wt({treeType:n,current:null,depth:g?g.depth+1:0,parent:g,children:new Set,presenceId:b,shouldReduceMotion:w,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(g!=null&&g.isMounted()),blockInitialAnimation:S,isMounted:function(){return!!k},mount:function(le){x=!0,k=de.current=le,de.projection&&de.projection.mount(le),Q&&g&&!ue&&(C=g==null?void 0:g.addVariantChild(de)),H.forEach(function(ye,fe){return X(fe,ye)}),g==null||g.children.add(de),de.setProps(v)},unmount:function(){var le;(le=de.projection)===null||le===void 0||le.unmount(),g1.update(j),g1.render(L),B.forEach(function(ye){return ye()}),C==null||C(),g==null||g.children.delete(de),U.clearAllListeners(),k=void 0,x=!1},addVariantChild:function(le){var ye,fe=de.getClosestVariantNode();if(fe)return(ye=fe.variantChildren)===null||ye===void 0||ye.add(le),function(){return fe.variantChildren.delete(le)}},sortNodePosition:function(le){return!c||n!==le.treeType?0:c(de.getInstance(),le.getInstance())},getClosestVariantNode:function(){return Q?de:g==null?void 0:g.getClosestVariantNode()},getLayoutId:function(){return v.layoutId},getInstance:function(){return k},getStaticValue:function(le){return P[le]},setStaticValue:function(le,ye){return P[le]=ye},getLatestValues:function(){return P},setVisibility:function(le){de.isVisible!==le&&(de.isVisible=le,de.scheduleRender())},makeTargetAnimatable:function(le,ye){return ye===void 0&&(ye=!0),s(de,le,v,ye)},measureViewportBox:function(){return a(k,v)},addValue:function(le,ye){de.hasValue(le)&&de.removeValue(le),H.set(le,ye),P[le]=ye.get(),X(le,ye)},removeValue:function(le){var ye;H.delete(le),(ye=B.get(le))===null||ye===void 0||ye(),B.delete(le),delete P[le],u(le,N)},hasValue:function(le){return H.has(le)},getValue:function(le,ye){var fe=H.get(le);return fe===void 0&&ye!==void 0&&(fe=U0(ye),de.addValue(le,fe)),fe},forEachValue:function(le){return H.forEach(le)},readValue:function(le){var ye;return(ye=P[le])!==null&&ye!==void 0?ye:l(k,le,h)},setBaseTarget:function(le,ye){Z[le]=ye},getBaseTarget:function(le){if(i){var ye=i(v,le);if(ye!==void 0&&!Ag(ye))return ye}return Z[le]}},U),{build:function(){return V(),N},scheduleRender:function(){Td.render(L,!1,!0)},syncRender:L,setProps:function(le){(le.transformTemplate||v.transformTemplate)&&de.scheduleRender(),v=le,U.updatePropListeners(le),q=XNe(de,d(v),q)},getProps:function(){return v},getVariant:function(le){var ye;return(ye=v.variants)===null||ye===void 0?void 0:ye[le]},getDefaultTransition:function(){return v.transition},getTransformPagePoint:function(){return v.transformPagePoint},getVariantContext:function(le){if(le===void 0&&(le=!1),le)return g==null?void 0:g.getVariantContext();if(!ue){var ye=(g==null?void 0:g.getVariantContext())||{};return v.initial!==void 0&&(ye.initial=v.initial),ye}for(var fe={},We=0;We<JNe;
53We++){var Le=woe[We],Ve=v[Le];(Ef(Ve)||Ve===!1)&&(fe[Le]=Ve)}return fe}});return de}},woe=Df(["initial"],Xs(x9),!1),JNe=woe.length;function HB(t){return typeof t=="string"&&t.startsWith("var(--")}var _oe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function eMe(t){var e=_oe.exec(t);if(!e)return[,];var n=Xs(e,3),r=n[1],i=n[2];return[r,i]}function jB(t,e,n){var r=Xs(eMe(t),2),i=r[0],s=r[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a?a.trim():HB(s)?jB(s,e):s}}function tMe(t,e,n){var r,i=Uc(e,[]),s=t.getInstance();if(!(s instanceof Element))return{target:i,transitionEnd:n};n&&(n=Wt({},n)),t.forEachValue(function(u){var c=u.get();if(HB(c)){var d=jB(c,s);d&&u.set(d)}});for(var a in i){var o=i[a];if(HB(o)){var l=jB(o,s);l&&(i[a]=l,n&&((r=n[a])!==null&&r!==void 0||(n[a]=o)))}}return{target:i,transitionEnd:n}}var nMe=new Set(["width","height","top","left","right","bottom","x","y"]),Coe=function(t){return nMe.has(t)},rMe=function(t){return Object.keys(t).some(Coe)},xoe=function(t,e){t.set(e,!1),t.set(e)},Lq=function(t){return t===gb||t===Qn},Dq;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(Dq||(Dq={}));var kq=function(t,e){return parseFloat(t.split(", ")[e])},Nq=function(t,e){return function(n,r){var i=r.transform;if(i==="none"||!i)return 0;var s=i.match(/^matrix3d\((.+)\)$/);if(s)return kq(s[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?kq(a[1],t):0}},iMe=new Set(["x","y","z"]),sMe=N_.filter(function(t){return!iMe.has(t)});function aMe(t){var e=[];return sMe.forEach(function(n){var r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}var Mq={width:function(t,e){var n=t.x,r=e.paddingLeft,i=r===void 0?"0":r,s=e.paddingRight,a=s===void 0?"0":s;return n.max-n.min-parseFloat(i)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,i=r===void 0?"0":r,s=e.paddingBottom,a=s===void 0?"0":s;return n.max-n.min-parseFloat(i)-parseFloat(a)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:Nq(4,13),y:Nq(5,14)},oMe=function(t,e,n){var r=e.measureViewportBox(),i=e.getInstance(),s=getComputedStyle(i),a=s.display,o={};a==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(function(u){o[u]=Mq[u](r,s)}),e.syncRender();var l=e.measureViewportBox();return n.forEach(function(u){var c=e.getValue(u);xoe(c,o[u]),t[u]=Mq[u](l,s)}),t},lMe=function(t,e,n,r){n===void 0&&(n={}),r===void 0&&(r={}),e=Wt({},e),r=Wt({},r);var i=Object.keys(e).filter(Coe),s=[],a=!1,o=[];if(i.forEach(function(c){var d=t.getValue(c);if(t.hasValue(c)){var f=n[c],h=pA(f),g=e[c],v;if(F_(g)){var b=g.length,S=g[0]===null?1:0;f=g[S],h=pA(f);for(var A=S;A<b;A++)v?RR(pA(g[A])===v):v=pA(g[A])}else v=pA(g);if(h!==v)if(Lq(h)&&Lq(v)){var w=d.get();typeof w=="string"&&d.set(parseFloat(w)),typeof g=="string"?e[c]=parseFloat(g):Array.isArray(g)&&v===Qn&&(e[c]=g.map(parseFloat))}else h!=null&&h.transform&&(v!=null&&v.transform)&&(f===0||g===0)?f===0?d.set(v.transform(f)):e[c]=h.transform(g):(a||(s=aMe(t),a=!0),o.push(c),r[c]=r[c]!==void 0?r[c]:e[c],xoe(d,g))}}),o.length){var l=o.indexOf("height")>=0?window.pageYOffset:null,u=oMe(e,t,o);return s.length&&s.forEach(function(c){var d=Xs(c,2),f=d[0],h=d[1];t.getValue(f).set(h)}),t.syncRender(),l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:e,transitionEnd:r}};function uMe(t,e,n,r){return rMe(e)?lMe(t,e,n,r):{target:e,transitionEnd:r}}var cMe=function(t,e,n,r){var i=tMe(t,e,r);return e=i.target,r=i.transitionEnd,uMe(t,e,n,r)};function dMe(t){return window.getComputedStyle(t)}var Ioe={treeType:"dom",readValueFromInstance:function(t,e){if(KC(e)){var n=E9(e);return n&&n.default||0}else{var r=dMe(t);return(yae(e)?r.getPropertyValue(e):r[e])||0}},sortNodePosition:function(t,e){return t.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(t,e){var n;return(n=t.style)===null||n===void 0?void 0:n[e]},measureViewportBox:function(t,e){var n=e.transformPagePoint;return Toe(t,n)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var i=n.transformValues;r===void 0&&(r=!0);var s=e.transition,a=e.transitionEnd,o=Uc(e,["transition","transitionEnd"]),l=yNe(o,s||{},t);if(i&&(a&&(a=i(a)),o&&(o=i(o)),l&&(l=i(l))),r){mNe(t,o,l);var u=cMe(t,o,l,a);a=u.transitionEnd,o=u.target}return Wt({transition:s,transitionEnd:a},o)},scrapeMotionValuesFromProps:c9,build:function(t,e,n,r,i){t.isVisible!==void 0&&(e.style.visibility=t.isVisible?"visible":"hidden"),o9(e,n,r,i.transformTemplate)},render:Lae},fMe=Aoe(Ioe),hMe=Aoe(Wt(Wt({},Ioe),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return KC(e)?((n=E9(e))===null||n===void 0?void 0:n.default)||0:(e=Dae.has(e)?e:Rae(e),t.getAttribute(e))},scrapeMotionValuesFromProps:Nae,build:function(t,e,n,r,i){u9(e,n,r,i.transformTemplate)},render:kae})),pMe=function(t,e){return s9(t)?hMe(e,{enableHardwareAcceleration:!1}):fMe(e,{enableHardwareAcceleration:!0})};function Fq(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var gA={correct:function(t,e){if(!e.target)return t;if(typeof t=="string")if(Qn.test(t))t=parseFloat(t);else return t;var n=Fq(t,e.target.x),r=Fq(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}},$q="_$css",gMe={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,i=t,s=t.
53includes("var("),a=[];s&&(t=t.replace(_oe,function(v){return a.push(v),$q}));var o=wg.parse(t);if(o.length>5)return i;var l=wg.createTransformer(t),u=typeof o[0]!="number"?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;o[0+u]/=c,o[1+u]/=d;var f=Ta(c,d,.5);typeof o[2+u]=="number"&&(o[2+u]/=f),typeof o[3+u]=="number"&&(o[3+u]/=f);var h=l(o);if(s){var g=0;h=h.replace($q,function(){var v=a[g];return g++,v})}return h}},mMe=function(t){lae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.visualElement,s=r.layoutGroup,a=r.switchLayoutGroup,o=r.layoutId,l=i.projection;jDe(yMe),l&&(s!=null&&s.group&&s.group.add(l),a!=null&&a.register&&o&&a.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",function(){n.safeToRemove()}),l.setOptions(Wt(Wt({},l.options),{onExitComplete:function(){return n.safeToRemove()}}))),Pw.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(n){var r=this,i=this.props,s=i.layoutDependency,a=i.visualElement,o=i.drag,l=i.isPresent,u=a.projection;return u&&(u.isPresent=l,o||n.layoutDependency!==s||s===void 0?u.willUpdate():this.safeToRemove(),n.isPresent!==l&&(l?u.promote():u.relegate()||Td.postRender(function(){var c;!((c=u.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,i=n.layoutGroup,s=n.switchLayoutGroup,a=r.projection;a&&(a.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(a),s!=null&&s.deregister&&s.deregister(a))},e.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},e.prototype.render=function(){return null},e}(mt.Component);function vMe(t){var e=Xs(foe(),2),n=e[0],r=e[1],i=$.useContext(i9);return mt.createElement(mMe,Wt({},t,{layoutGroup:i,switchLayoutGroup:$.useContext(gae),isPresent:n,safeToRemove:r}))}var yMe={borderRadius:Wt(Wt({},gA),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:gA,borderTopRightRadius:gA,borderBottomLeftRadius:gA,borderBottomRightRadius:gA,boxShadow:gMe},bMe={measureLayout:vMe};function SMe(t,e,n){n===void 0&&(n={});var r=Ag(t)?t:U0(t);return w9("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var Ooe=["TopLeft","TopRight","BottomLeft","BottomRight"],EMe=Ooe.length,Bq=function(t){return typeof t=="string"?parseFloat(t):t},Uq=function(t){return typeof t=="number"||Qn.test(t)};function TMe(t,e,n,r,i,s){var a,o,l,u;i?(t.opacity=Ta(0,(a=n.opacity)!==null&&a!==void 0?a:1,AMe(r)),t.opacityExit=Ta((o=e.opacity)!==null&&o!==void 0?o:1,0,wMe(r))):s&&(t.opacity=Ta((l=e.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(var c=0;c<EMe;c++){var d="border".concat(Ooe[c],"Radius"),f=Vq(e,d),h=Vq(n,d);if(!(f===void 0&&h===void 0)){f||(f=0),h||(h=0);var g=f===0||h===0||Uq(f)===Uq(h);g?(t[d]=Math.max(Ta(Bq(f),Bq(h),r),0),(Gh.test(h)||Gh.test(f))&&(t[d]+="%")):t[d]=h}}(e.rotate||n.rotate)&&(t.rotate=Ta(e.rotate||0,n.rotate||0,r))}function Vq(t,e){var n;return(n=t[e])!==null&&n!==void 0?n:t.borderRadius}var AMe=Poe(0,.5,b9),wMe=Poe(.5,.95,v9);function Poe(t,e,n){return function(r){return r<t?0:r>e?1:n($_(t,e,r))}}function Hq(t,e){t.min=e.min,t.max=e.max}function Xd(t,e){Hq(t.x,e.x),Hq(t.y,e.y)}function jq(t,e,n,r,i){return t-=e,t=UR(t,1/n,r),i!==void 0&&(t=UR(t,1/i,r)),t}function _Me(t,e,n,r,i,s,a){if(e===void 0&&(e=0),n===void 0&&(n=1),r===void 0&&(r=.5),s===void 0&&(s=t),a===void 0&&(a=t),Gh.test(e)){e=parseFloat(e);var o=Ta(a.min,a.max,e/100);e=o-a.min}if(typeof e=="number"){var l=Ta(s.min,s.max,r);t===s&&(l-=e),t.min=jq(t.min,e,n,l,i),t.max=jq(t.max,e,n,l,i)}}function zq(t,e,n,r,i){var s=Xs(n,3),a=s[0],o=s[1],l=s[2];_Me(t,e[a],e[o],e[l],e.scale,r,i)}var CMe=["x","scaleX","originX"],xMe=["y","scaleY","originY"];function Gq(t,e,n,r){zq(t.x,e,CMe,n==null?void 0:n.x,r==null?void 0:r.x),zq(t.y,e,xMe,n==null?void 0:n.y,r==null?void 0:r.y
53)}function Wq(t){return t.translate===0&&t.scale===1}function Roe(t){return Wq(t.x)&&Wq(t.y)}function Loe(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var IMe=function(){function t(){this.members=[]}return t.prototype.add=function(e){_9(this.members,e),e.scheduleRender()},t.prototype.remove=function(e){if(C9(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},t.prototype.relegate=function(e){var n=this.members.findIndex(function(a){return e===a});if(n===0)return!1;for(var r,i=n;i>=0;i--){var s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1},t.prototype.promote=function(e,n){var r,i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues,e.snapshot.isShared=!0),!((r=e.root)===null||r===void 0)&&r.isUpdating&&(e.isLayoutDirty=!0);var s=e.options.crossfade;s===!1&&i.hide()}},t.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var n,r,i,s,a;(r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||a===void 0||a.call(s)})},t.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),OMe="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function qq(t,e,n){var r=t.x.translate/e.x,i=t.y.translate/e.y,s="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(s+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var a=n.rotate,o=n.rotateX,l=n.rotateY;a&&(s+="rotate(".concat(a,"deg) ")),o&&(s+="rotateX(".concat(o,"deg) ")),l&&(s+="rotateY(".concat(l,"deg) "))}var u=t.x.scale*e.x,c=t.y.scale*e.y;return s+="scale(".concat(u,", ").concat(c,")"),s===OMe?"none":s}var PMe=function(t,e){return t.depth-e.depth},RMe=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(e){_9(this.children,e),this.isDirty=!0},t.prototype.remove=function(e){C9(this.children,e),this.isDirty=!0},t.prototype.forEach=function(e){this.isDirty&&this.children.sort(PMe),this.isDirty=!1,this.children.forEach(e)},t}(),Kq=1e3;function Doe(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,i=t.checkIsScrollRoot,s=t.resetTransform;return function(){function a(o,l,u){var c=this;l===void 0&&(l={}),u===void 0&&(u=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(FMe),c.nodes.forEach($Me)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=o,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?Df(Df([],Xs(u.path),!1),[u],!1):[],this.parent=u,this.depth=u?u.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(var d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new RMe)}return a.prototype.addEventListener=function(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Dw),this.eventHandlers.get(o).add(l)},a.prototype.notifyListeners=function(o){for(var l=[],u=1;u<arguments.length;u++)l[u-1]=arguments[u];var c=this.eventHandlers.get(o);c==null||c.notify.apply(c,Df([],Xs(l),!1))},a.prototype.hasListeners=function(o){return this.eventHandlers.has(o)},a.prototype.registerPotentialNode=function(o,l){this.potentialNodes.set(o,l)},a.prototype.mount=function(o,l){var u=this,c;if(l===void 0&&(l=!1),!this.instance){this.isSVG=o instanceof SVGElement&&o.tagName!=="svg",this.instance=o;var d=this.options,f=d.layoutId,h=d.layout,g=d.visualElement;if(g&&!g.getInstance()&&g.mount(o),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id
53),l&&(h||f)&&(this.isLayoutDirty=!0),e){var v,b=function(){return u.root.updateBlockedByResize=!1};e(o,function(){u.root.updateBlockedByResize=!0,clearTimeout(v),v=window.setTimeout(b,250),Pw.hasAnimatedSinceResize&&(Pw.hasAnimatedSinceResize=!1,u.nodes.forEach(MMe))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&g&&(f||h)&&this.addEventListener("didUpdate",function(S){var A,w,x,P,N,k=S.delta,U=S.hasLayoutChanged,H=S.hasRelativeTargetChanged,B=S.layout;if(u.isTreeAnimationBlocked()){u.target=void 0,u.relativeTarget=void 0;return}var q=(w=(A=u.options.transition)!==null&&A!==void 0?A:g.getDefaultTransition())!==null&&w!==void 0?w:jMe,Z=g.getProps(),C=Z.onLayoutAnimationStart,L=Z.onLayoutAnimationComplete,V=!u.targetLayout||!Loe(u.targetLayout,B)||H,j=!U&&H;if(!((x=u.resumeFrom)===null||x===void 0)&&x.instance||j||U&&(V||!u.currentAnimation)){u.resumeFrom&&(u.resumingFrom=u.resumeFrom,u.resumingFrom.resumingFrom=void 0),u.setAnimationOrigin(k,j);var X=Wt(Wt({},A9(q,"layout")),{onPlay:C,onComplete:L});g.shouldReduceMotion&&(X.delay=0,X.type=!1),u.startAnimation(X)}else!U&&u.animationProgress===0&&u.finishAnimation(),u.isLead()&&((N=(P=u.options).onExitComplete)===null||N===void 0||N.call(P));u.targetLayout=B})}},a.prototype.unmount=function(){var o,l;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(l=this.parent)===null||l===void 0||l.children.delete(this),this.instance=void 0,g1.preRender(this.updateProjection)},a.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},a.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},a.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},a.prototype.isTreeAnimationBlocked=function(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1},a.prototype.startUpdate=function(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(BMe))},a.prototype.willUpdate=function(o){var l,u,c;if(o===void 0&&(o=!0),this.root.isUpdateBlocked()){(u=(l=this.options).onExitComplete)===null||u===void 0||u.call(l);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var d=0;d<this.path.length;d++){var f=this.path[d];f.shouldResetTransform=!0,f.updateScroll()}var h=this.options,g=h.layoutId,v=h.layout;if(!(g===void 0&&!v)){var b=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=b==null?void 0:b(this.latestValues,""),this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}}},a.prototype.didUpdate=function(){var o=this.isUpdateBlocked();if(o){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yq);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(zMe),this.potentialNodes.clear()),this.nodes.forEach(NMe),this.nodes.forEach(LMe),this.nodes.forEach(DMe),this.clearAllSnapshots(),C3.update(),C3.preRender(),C3.render())},a.prototype.clearAllSnapshots=function(){this.nodes.forEach(kMe),this.sharedNodes.forEach(UMe)},a.prototype.scheduleUpdateProjection=function(){Td.preRender(this.updateProjection,!1,!0)},a.prototype.scheduleCheckAfterUnmount=function(){var o=this;Td.postRender(function(){o.isLayoutDirty?o.root.didUpdate():o.root.checkUpdateFailed()})},a.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var o=this.measure(),l=this.removeTransform(this.removeElementScroll(o));Jq(l),this.snapshot={measured:o,layout:l,latestValues:{}}}},a.prototype.updateLayout=function(){var o;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var l=0;l<this.path.length;l++){var u=this.path[l];u.updateScroll()}var c=this.measure();Jq(c);var d=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=Tl(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(o=this.options.visualElement)===null||o===void 0||o.notifyLayoutMeasure(this.layout.actual,d==null?void 0:d.actual)}},a.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=r(this.instance))},a.prototype.resetTransform=function(){var o;if(s){var l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!Roe(this.projectionDelta),c=(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate,d=c==null?void 0:c(this.latestValues,""),f=d!==this.prevTransformTemplateValue;l&&(u||Sm(this.latestValues)||f)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}},a.prototype.measure=function(){var o=this.options.visualElement;if(!o)return Tl();var l=o.measureViewportBox(),u=this.root.scroll;return u&&(xm(l.x,u.x),xm(l.y,u.y)),l},a.prototype.removeElementScroll=function(o){var l=Tl();Xd(l,o);for(var u=0;u<this.path.length;u++){var c=this.path[u],d=c.scroll,f=c.options,h=c.isScrollRoot;if(c!==this.root&&d&&f.layoutScroll){if(h){Xd(l,o);var g=this.root.scroll;
53g&&(xm(l.x,-g.x),xm(l.y,-g.y))}xm(l.x,d.x),xm(l.y,d.y)}}return l},a.prototype.applyTransform=function(o,l){l===void 0&&(l=!1);var u=Tl();Xd(u,o);for(var c=0;c<this.path.length;c++){var d=this.path[c];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&eE(u,{x:-d.scroll.x,y:-d.scroll.y}),Sm(d.latestValues)&&eE(u,d.latestValues)}return Sm(this.latestValues)&&eE(u,this.latestValues),u},a.prototype.removeTransform=function(o){var l,u=Tl();Xd(u,o);for(var c=0;c<this.path.length;c++){var d=this.path[c];if(d.instance&&Sm(d.latestValues)){Soe(d.latestValues)&&d.updateSnapshot();var f=Tl(),h=d.measure();Xd(f,h),Gq(u,d.latestValues,(l=d.snapshot)===null||l===void 0?void 0:l.layout,f)}}return Sm(this.latestValues)&&Gq(u,this.latestValues),u},a.prototype.setTargetDelta=function(o){this.targetDelta=o,this.root.scheduleUpdateProjection()},a.prototype.setOptions=function(o){var l;this.options=Wt(Wt(Wt({},this.options),o),{crossfade:(l=o.crossfade)!==null&&l!==void 0?l:!0})},a.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},a.prototype.resolveTargetDelta=function(){var o,l=this.options,u=l.layout,c=l.layoutId;!this.layout||!(u||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=Tl(),this.relativeTargetOrigin=Tl(),Nw(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Xd(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Tl(),this.targetWithTransforms=Tl()),this.relativeTarget&&this.relativeTargetOrigin&&(!((o=this.relativeParent)===null||o===void 0)&&o.target)?LNe(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):Xd(this.target,this.layout.actual),Eoe(this.target,this.targetDelta)):Xd(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=Tl(),this.relativeTargetOrigin=Tl(),Nw(this.relativeTargetOrigin,this.target,this.relativeParent.target),Xd(this.relativeTarget,this.relativeTargetOrigin)))))},a.prototype.getClosestProjectingParent=function(){if(!(!this.parent||Sm(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},a.prototype.calcProjection=function(){var o,l=this.options,u=l.layout,c=l.layoutId;if(this.isTreeAnimating=!!(!((o=this.parent)===null||o===void 0)&&o.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(u||c))){var d=this.getLead();Xd(this.layoutCorrected,this.layout.actual),VNe(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==d);var f=d.target;if(f){this.projectionDelta||(this.projectionDelta=Mw(),this.projectionDeltaWithTransform=Mw());var h=this.treeScale.x,g=this.treeScale.y,v=this.projectionTransform;kw(this.projectionDelta,this.layoutCorrected,f,this.latestValues),this.projectionTransform=qq(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==h||this.treeScale.y!==g)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}}},a.prototype.hide=function(){this.isVisible=!1},a.prototype.show=function(){this.isVisible=!0},a.prototype.scheduleRender=function(o){var l,u,c;o===void 0&&(o=!0),(u=(l=this.options).scheduleRender)===null||u===void 0||u.call(l),o&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},a.prototype.setAnimationOrigin=function(o,l){var u=this,c;l===void 0&&(l=!1);var d=this.snapshot,f=(d==null?void 0:d.latestValues)||{},h=Wt({},this.latestValues),g=Mw();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!l;var v=Tl(),b=d==null?void 0:d.isShared,S=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,A=!!(b&&!S&&this.options.crossfade===!0&&!this.path.some(HMe));this.animationProgress=0,this.mixTargetDelta=function(w){var x,P=w/1e3;Zq(g.x,o.x,P),Zq(g.y,o.y,P),u.setTargetDelta(g),u.relativeTarget&&u.relativeTargetOrigin&&u.layout&&(!((x=u.relativeParent)===null||x===void 0)&&x.layout)&&(Nw(v,u.layout.actual,u.relativeParent.layout.actual),VMe(u.relativeTarget,u.relativeTargetOrigin,v,P)),b&&(u.animationValues=h,TMe(h,f,u.latestValues,P,A,S)),u.root.scheduleUpdateProjection(),u.scheduleRender(),u.animationProgress=P},this.mixTargetDelta(0)},a.prototype.startAnimation=function(o){var l=this,u,c;this.notifyListeners("animationStart"),(u=this.currentAnimation)===null||u===void 0||u.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(g1.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Td.update(function(){Pw.hasAnimatedSinceResize=!0,l.currentAnimation=SMe(0,Kq,Wt(Wt({},o),{onUpdate:function(d){var f;l.mixTargetDelta(d),(f=o.onUpdate)===null||f===void 0||f.call(o,d)},onComplete:function(){var d;(d=o.onComplete)===null||d===void 0||d.call(o),l.completeAnimation()}})),l.resumingFrom&&(l.resumingFrom.currentAnimation=l.currentAnimation),l.pendingAnimation=void 0})},a.prototype.completeAnimation=function(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},a.prototype.finishAnimation=function(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,Kq),this.currentAnimation.stop()),this.completeAnimation()},a.prototype.applyTransformsToTarget=function(){var o=this.getLead(),l=o.targetWithTransforms,u=o.target,c=o.layout,d=o.latestValues;!l||!u||!c||(Xd(l,u),eE(l,d),kw(this.projectionDeltaWithTransform,this.layoutCorrected,l,d))},a.prototype.registerSharedNode=function(o,l){var u,c,d;this.sharedNodes.has(o)||this.sharedNodes.set(o,new IMe);var f=this.sharedNodes.get(o);f.add(l),l.promote({transition:(u=l.options.initialPromotionConfig)===null||u===void 0?void 0:u.transition,preserveFollowOpacity:(d=(c=l.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||d===void 0?void 0:d.call(c,l)})},a.prototype.isLead=function(){var o=this.getStack();return o?o.lead===this:!0},a.prototype.getLead=function(){var o,l=this.options.layoutId;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this},a.prototype.getPrevLead=function(){var o,l=this.options.layoutId;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0},a.prototype.getStack=function(){var o=this.options.layoutId;if(o)return this.root.sharedNodes.get(o)},a.prototype.promote=function(o){var l=o===void 0?{}:o,u=l.needsReset,c=l.transition,d=l.preserveFollowOpacity,f=this.getStack();f&&f.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},a.prototype.relegate=function(){var o=this.getStack();return o?o.relegate(this):!1},a.prototype.resetRotation=function(){var o=this.options.visualElement;if(o){for(var l=!1,u={},c=0;c<IB.length;c++){var d=IB[c],f="rotate"+d;o.getStaticValue(f)&&(l=!0,u[f]=o.getStaticValue(f),o.setStaticValue(f,0))}if(l){o==null||o.syncRender();for(var f in u)o.setStaticValue(f,u[f]);o.scheduleRender()}}},a.prototype.getProjectionStyles=function(o){var l,u,c,d,f,h;o===void 0&&(o={});var g={};if(!this.instance||this.isSVG)return g;if(this.isVisible)g.visibility="";else return{visibility:"hidden"};var v=(l=this.options.visualElement)===null||l===void 0?void 0:l.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=bP(o.pointerEvents)||"",g.transform=v?v(this.latestValues,""):"none",g;var b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){var S={};return this.options.layoutId&&(S.opacity=(u=this.latestValues.opacity)!==null&&u!==void 0?u:1,S.pointerEvents=bP(o.pointerEvents)||""),this.hasProjected&&!Sm(this.latestValues)&&(S.transform=v?v({},""):"none",this.hasProjected=!1),S}var A=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=qq(this.projectionDeltaWithTransform,this.treeScale,A),v&&(g.transform=v(A,g.transform));var w=this.projectionDelta,x=w.x,P=w.y;g.transformOrigin="".concat(x.origin*100,"% ").concat(P.origin*100,"% 0"),b.animationValues?g.opacity=b===this?(d=(c=A.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:A.opacityExit:g.opacity=b===this?(f=A.opacity)!==null&&f!==void 0?f:"":(h=A.opacityExit)!==null&&h!==void 0?h:0;for(var N in LR)if(A[N]!==void 0){var k=LR[N],U=k.correct,H=k.applyTo,B=U(A[N],b);if(H)for(var q=H.length,Z=0;Z<q;Z++)g[H[Z]]=B;else g[N]=B}return this.options.layoutId&&(g.pointerEvents=b===this?bP(o.pointerEvents)||"":"none"),g},a.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0}
53,a.prototype.resetTree=function(){this.root.nodes.forEach(function(o){var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Yq),this.root.sharedNodes.clear()},a}()}function LMe(t){t.updateLayout()}function DMe(t){var e,n,r,i,s=(n=(e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)!==null&&n!==void 0?n:t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){var a=t.layout,o=a.actual,l=a.measured;t.options.animationType==="size"?mh(function(A){var w=s.isShared?s.measured[A]:s.layout[A],x=_g(w);w.min=o[A].min,w.max=w.min+x}):t.options.animationType==="position"&&mh(function(A){var w=s.isShared?s.measured[A]:s.layout[A],x=_g(o[A]);w.max=w.min+x});var u=Mw();kw(u,o,s.layout);var c=Mw();s.isShared?kw(c,t.applyTransform(l,!0),s.measured):kw(c,o,s.layout);var d=!Roe(u),f=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var h=t.relativeParent,g=h.snapshot,v=h.layout;if(g&&v){var b=Tl();Nw(b,s.layout,g.layout);var S=Tl();Nw(S,o,v.actual),Loe(b,S)||(f=!0)}}t.notifyListeners("didUpdate",{layout:o,snapshot:s,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else t.isLead()&&((i=(r=t.options).onExitComplete)===null||i===void 0||i.call(r));t.options.transition=void 0}function kMe(t){t.clearSnapshot()}function Yq(t){t.clearMeasurements()}function NMe(t){var e=t.options.visualElement;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function MMe(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function FMe(t){t.resolveTargetDelta()}function $Me(t){t.calcProjection()}function BMe(t){t.resetRotation()}function UMe(t){t.removeLeadSnapshot()}function Zq(t,e,n){t.translate=Ta(e.translate,0,n),t.scale=Ta(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Qq(t,e,n,r){t.min=Ta(e.min,n.min,r),t.max=Ta(e.max,n.max,r)}function VMe(t,e,n,r){Qq(t.x,e.x,n.x,r),Qq(t.y,e.y,n.y,r)}function HMe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var jMe={duration:.45,ease:[.4,0,.1,1]};function zMe(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(t.path[r].instance){n=t.path[r];break}var i=n&&n!==t.root?n.instance:document,s=i.querySelector('[data-projection-id="'.concat(e,'"]'));s&&t.mount(s,!0)}function Xq(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Jq(t){Xq(t.x),Xq(t.y)}var GMe=Doe({attachResizeListener:function(t,e){return Wk(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),L3={current:void 0},WMe=Doe({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!L3.current){var t=new GMe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),L3.current=t}return L3.current},resetTransform:function(t,e){t.style.transform=e??"none"},checkIsScrollRoot:function(t){return window.getComputedStyle(t).position==="fixed"}}),qMe=Wt(Wt(Wt(Wt({},ONe),q2e),ZNe),bMe),Il=VDe(function(t,e){return _ke(t,e,qMe,pMe,WMe)});function koe(){var t=$.useRef(!1);return k_(function(){return t.current=!0,function(){t.current=!1}},[]),t}function KMe(){var t=koe(),e=Xs($.useState(0),2),n=e[0],r=e[1],i=$.useCallback(function(){t.current&&r(n+1)},[n]),s=$.useCallback(function(){return Td.postRender(i)},[i]);return[s,n]}var D3=function(t){var e=t.children,n=t.initial,r=t.isPresent,i=t.onExitComplete,s=t.custom,a=t.presenceAffectsLayout,o=Fv(YMe),l=doe(),u=$.useMemo(function(){return{id:l,initial:n,isPresent:r,custom:s,onExitComplete:function(c){var d,f;o.set(c,!0);try{for(var h=TDe(o.values()),g=h.next();!g.done;g=h.next()){var v=g.value;if(!v)return}}catch(b){d={error:b}}finally{try{g&&!g.done&&(f=h.return)&&f.call(h)}finally{if(d)throw d.error}}i==null||i()},register:function(c){return o.set(c,!1),function(){return o.delete(c)}}}},a?void 0:[r]);return $.useMemo(function(){o.forEach(function(c,d){return o.set(d,!1)})},[r]),$.useEffect(function(){!r&&!o.size&&(i==null||i())},[r]),$.createElement(qC.Provider,{value:u},e)};function YMe(){return new Map}var LS=function(t){return t.key||""};function ZMe(t,e){t.forEach(function(n){var r=LS(n);e.set(r,n)})}function QMe(t){var e=[];
53return $.Children.forEach(t,function(n){$.isValidElement(n)&&e.push(n)}),e}var Yh=function(t){var e=t.children,n=t.custom,r=t.initial,i=r===void 0?!0:r,s=t.onExitComplete,a=t.exitBeforeEnter,o=t.presenceAffectsLayout,l=o===void 0?!0:o,u=Xs(KMe(),1),c=u[0],d=$.useContext(i9).forceRender;d&&(c=d);var f=koe(),h=QMe(e),g=h,v=new Set,b=$.useRef(g),S=$.useRef(new Map).current,A=$.useRef(!0);if(k_(function(){A.current=!1,ZMe(h,S),b.current=g}),h9(function(){A.current=!0,S.clear(),v.clear()}),A.current)return $.createElement($.Fragment,null,g.map(function(U){return $.createElement(D3,{key:LS(U),isPresent:!0,initial:i?void 0:!1,presenceAffectsLayout:l},U)}));g=Df([],Xs(g),!1);for(var w=b.current.map(LS),x=h.map(LS),P=w.length,N=0;N<P;N++){var k=w[N];x.indexOf(k)===-1&&v.add(k)}return a&&v.size&&(g=[]),v.forEach(function(U){if(x.indexOf(U)===-1){var H=S.get(U);if(H){var B=w.indexOf(U),q=function(){S.delete(U),v.delete(U);var Z=b.current.findIndex(function(C){return C.key===U});if(b.current.splice(Z,1),!v.size){if(b.current=h,f.current===!1)return;c(),s&&s()}};g.splice(B,0,$.createElement(D3,{key:LS(H),isPresent:!1,onExitComplete:q,custom:n,presenceAffectsLayout:l},H))}}}),g=g.map(function(U){var H=U.key;return v.has(H)?U:$.createElement(D3,{key:LS(U),isPresent:!0,presenceAffectsLayout:l},U)}),$.createElement($.Fragment,null,v.size?g:g.map(function(U){return $.cloneElement(U)}))};function XMe(t){var e=t.children,n=t.isValidProp,r=Uc(t,["children","isValidProp"]);n&&Oae(n),r=Wt(Wt({},$.useContext(p1)),r),r.isStatic=Fv(function(){return r.isStatic});var i=$.useMemo(function(){return r},[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return $.createElement(p1.Provider,{value:i},e)}function Noe(t){var e=Fv(function(){return U0(t)}),n=$.useContext(p1).isStatic;if(n){var r=Xs($.useState(t),2),i=r[1];$.useEffect(function(){return e.onChange(i)},[])}return e}var JMe=function(t){return typeof t=="object"&&t.mix},e3e=function(t){return JMe(t)?t.mix:void 0};function t3e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!Array.isArray(t[0]),r=n?0:-1,i=t[0+r],s=t[1+r],a=t[2+r],o=t[3+r],l=g9(s,a,Wt({mixer:e3e(a[0])},o));return n?l(i):l}function n3e(t,e){k_(function(){var n=t.map(function(r){return r.onChange(e)});return function(){return n.forEach(function(r){return r()})}})}function r3e(t,e){var n=Noe(e()),r=function(){return n.set(e())};return r(),n3e(t,function(){return Td.update(r,!1,!0)}),n}function i3e(t,e,n,r){var i=typeof e=="function"?e:t3e(e,n,r);return Array.isArray(t)?eK(t,i):eK([t],function(s){var a=Xs(s,1),o=a[0];return i(o)})}function eK(t,e){var n=Fv(function(){return[]});return r3e(t,function(){n.length=0;for(var r=t.length,i=0;i<r;i++)n[i]=t[i].get();return e(n)})}function Moe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r1(t,e)}var s3e=function(e,n){return e===void 0&&(e=[]),n===void 0&&(n=[]),e.length!==n.length||e.some(function(r,i){return!Object.is(r,n[i])})},tK={error:null},Zk=function(t){Moe(e,t);function e(){for(var r,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=t.call.apply(t,[this].concat(s))||this,r.state=tK,r.resetErrorBoundary=function(){for(var o,l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];r.props.onReset==null||(o=r.props).onReset.apply(o,u),r.reset()},r}e.getDerivedStateFromError=function(i){return{error:i}};var n=e.prototype;return n.reset=function(){this.setState(tK)},n.componentDidCatch=function(i,s){var a,o;(a=(o=this.props).onError)==null||a.call(o,i,s)},n.componentDidUpdate=function(i,s){var a=this.state.error,o=this.props.resetKeys;if(a!==null&&s.error!==null&&s3e(i.resetKeys,o)){var l,u;(l=(u=this.props).onResetKeysChange)==null||l.call(u,i.resetKeys,o),this.reset()}},n.render=function(){var i=this.state.error,s=this.props,a=s.fallbackRender,o=s.FallbackComponent,l=s.fallback;if(i!==null){var u={error:i,resetErrorBoundary:this.resetErrorBoundary};if($.isValidElement(l))return l;if(typeof a=="function")return a(u);if(o)return $.createElement(o,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}($.Component);function a3e(t){var e=$.useState(null),n=e[0],r=e[1];if(n!=null)throw n;return r}var Foe={exports:{}},o3e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",l3e=o3e,u3e=l3e;function $oe(){}function Boe(){}Boe.resetWarningCache=$oe;var c3e=function(){function t(r,i,s,a,o,l){if(l!==u3e){var u=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 u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Boe,resetWarningCache:$oe};return n.PropTypes=n,n};Foe.exports=c3e();var Uoe=Foe.exports;const ti=pi(Uoe);var d3e=typeof Element<"u",f3e=typeof Map=="function",h3e=typeof Set=="function",p3e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function TP(t,e){if(t===e)return!0;
53if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!TP(t[r],e[r]))return!1;return!0}var s;if(f3e&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s=t.entries();!(r=s.next()).done;)if(!e.has(r.value[0]))return!1;for(s=t.entries();!(r=s.next()).done;)if(!TP(r.value[1],e.get(r.value[0])))return!1;return!0}if(h3e&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s=t.entries();!(r=s.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(p3e&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(d3e&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&t.$$typeof)&&!TP(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}var g3e=function(e,n){try{return TP(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const m3e=pi(g3e);var v3e=function(t,e,n,r,i,s,a,o){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,s,a,o],c=0;l=new Error(e.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},y3e=v3e;const nK=pi(y3e);var b3e=function(e,n,r,i){var s=r?r.call(i,e,n):void 0;if(s!==void 0)return!!s;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),u=0;u<a.length;u++){var c=a[u];if(!l(c))return!1;var d=e[c],f=n[c];if(s=r?r.call(i,d,f,c):void 0,s===!1||s===void 0&&d!==f)return!1}return!0};const S3e=pi(b3e);function xa(){return xa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xa.apply(this,arguments)}function I9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zB(t,e)}function zB(t,e){return zB=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zB(t,e)}function rK(t,e){if(t==null)return{};var n,r,i={},s=Object.keys(t);for(r=0;r<s.length;r++)e.indexOf(n=s[r])>=0||(i[n]=t[n]);return i}var Kn={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},E3e={rel:["amphtml","canonical","alternate"]},T3e={type:["application/ld+json"]},A3e={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},iK=Object.keys(Kn).map(function(t){return Kn[t]}),VR={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},w3e=Object.keys(VR).reduce(function(t,e){return t[VR[e]]=e,t},{}),OE=function(t,e){for(var n=t.length-1;n>=0;n-=1){var r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},_3e=function(t){var e=OE(t,Kn.TITLE),n=OE(t,"titleTemplate");if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,function(){return e});var r=OE(t,"defaultTitle");return e||r||void 0},C3e=function(t){return OE(t,"onChangeClientState")||function(){}},k3=function(t,e){return e.filter(function(n){return n[t]!==void 0}).map(function(n){return n[t]}).reduce(function(n,r){return xa({},n,r)},{})},x3e=function(t,e){return e.filter(function(n){return n[Kn.BASE]!==void 0}).map(function(n){return n[Kn.BASE]}).reverse().reduce(function(n,r){if(!n.length)for(var i=Object.keys(r),s=0;s<i.length;s+=1){var a=i[s].toLowerCase();if(t.indexOf(a)!==-1&&r[a])return n.concat(r)}return n},[])},mA=function(t,e,n){var r={};return n.filter(function(i){return!!Array.isArray(i[t])||(i[t]!==void 0&&console&&typeof console.warn=="function"&&console.warn("Helmet: "+t+' should be of type "Array". Instead found type "'+typeof i[t]+'"'),!1)}).map(function(i){return i[t]}).reverse().reduce(function(i,s){var a={};s.filter(function(d){for(var f,h=Object.keys(d),g=0;g<h.length;g+=1){var v=h[g],b=v.toLowerCase();e.indexOf(b)===-1||f==="rel"&&d[f].toLowerCase()==="canonical"||b==="rel"&&d[b].toLowerCase()==="stylesheet"||(f=b),e.indexOf(v)===-1||v!=="innerHTML"&&v!=="cssText"&&v!=="itemprop"||(f=v)}if(!f||!d[f])return!1;var S=d[f].toLowerCase();return r[f]||(r[f]={}),a[f]||(a[f]={}),!r[f][S]&&(a[f][S]=!0,!0)}
53).reverse().forEach(function(d){return i.push(d)});for(var o=Object.keys(a),l=0;l<o.length;l+=1){var u=o[l],c=xa({},r[u],a[u]);r[u]=c}return i},[]).reverse()},I3e=function(t,e){if(Array.isArray(t)&&t.length){for(var n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},Voe=function(t){return Array.isArray(t)?t.join(""):t},N3=function(t,e){return Array.isArray(t)?t.reduce(function(n,r){return function(i,s){for(var a=Object.keys(i),o=0;o<a.length;o+=1)if(s[a[o]]&&s[a[o]].includes(i[a[o]]))return!0;return!1}(r,e)?n.priority.push(r):n.default.push(r),n},{priority:[],default:[]}):{default:t}},sK=function(t,e){var n;return xa({},t,((n={})[e]=void 0,n))},O3e=[Kn.NOSCRIPT,Kn.SCRIPT,Kn.STYLE],M3=function(t,e){return e===void 0&&(e=!0),e===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},aK=function(t){return Object.keys(t).reduce(function(e,n){var r=t[n]!==void 0?n+'="'+t[n]+'"':""+n;return e?e+" "+r:r},"")},oK=function(t,e){return e===void 0&&(e={}),Object.keys(t).reduce(function(n,r){return n[VR[r]||r]=t[r],n},e)},AP=function(t,e){return e.map(function(n,r){var i,s=((i={key:r})["data-rh"]=!0,i);return Object.keys(n).forEach(function(a){var o=VR[a]||a;o==="innerHTML"||o==="cssText"?s.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:s[o]=n[a]}),mt.createElement(t,s)})},nd=function(t,e,n){switch(t){case Kn.TITLE:return{toComponent:function(){return i=e.titleAttributes,(s={key:r=e.title})["data-rh"]=!0,a=oK(i,s),[mt.createElement(Kn.TITLE,a,r)];var r,i,s,a},toString:function(){return function(r,i,s,a){var o=aK(s),l=Voe(i);return o?"<"+r+' data-rh="true" '+o+">"+M3(l,a)+"</"+r+">":"<"+r+' data-rh="true">'+M3(l,a)+"</"+r+">"}(t,e.title,e.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return oK(e)},toString:function(){return aK(e)}};default:return{toComponent:function(){return AP(t,e)},toString:function(){return function(r,i,s){return i.reduce(function(a,o){var l=Object.keys(o).filter(function(d){return!(d==="innerHTML"||d==="cssText")}).reduce(function(d,f){var h=o[f]===void 0?f:f+'="'+M3(o[f],s)+'"';return d?d+" "+h:h},""),u=o.innerHTML||o.cssText||"",c=O3e.indexOf(r)===-1;return a+"<"+r+' data-rh="true" '+l+(c?"/>":">"+u+"</"+r+">")},"")}(t,e,n)}}}},GB=function(t){var e=t.baseTag,n=t.bodyAttributes,r=t.encode,i=t.htmlAttributes,s=t.noscriptTags,a=t.styleTags,o=t.title,l=o===void 0?"":o,u=t.titleAttributes,c=t.linkTags,d=t.metaTags,f=t.scriptTags,h={toComponent:function(){},toString:function(){return""}};if(t.prioritizeSeoTags){var g=function(v){var b=v.linkTags,S=v.scriptTags,A=v.encode,w=N3(v.metaTags,A3e),x=N3(b,E3e),P=N3(S,T3e);return{priorityMethods:{toComponent:function(){return[].concat(AP(Kn.META,w.priority),AP(Kn.LINK,x.priority),AP(Kn.SCRIPT,P.priority))},toString:function(){return nd(Kn.META,w.priority,A)+" "+nd(Kn.LINK,x.priority,A)+" "+nd(Kn.SCRIPT,P.priority,A)}},metaTags:w.default,linkTags:x.default,scriptTags:P.default}}(t);h=g.priorityMethods,c=g.linkTags,d=g.metaTags,f=g.scriptTags}return{priority:h,base:nd(Kn.BASE,e,r),bodyAttributes:nd("bodyAttributes",n,r),htmlAttributes:nd("htmlAttributes",i,r),link:nd(Kn.LINK,c,r),meta:nd(Kn.META,d,r),noscript:nd(Kn.NOSCRIPT,s,r),script:nd(Kn.SCRIPT,f,r),style:nd(Kn.STYLE,a,r),title:nd(Kn.TITLE,{title:l,titleAttributes:u},r)}},JI=[],WB=function(t,e){var n=this;e===void 0&&(e=typeof document<"u"),this.instances=[],this.value={setHelmet:function(r){n.context.helmet=r},helmetInstances:{get:function(){return n.canUseDOM?JI:n.instances},add:function(r){(n.canUseDOM?JI:n.instances).push(r)},remove:function(r){var i=(n.canUseDOM?JI:n.instances).indexOf(r);(n.canUseDOM?JI:n.instances).splice(i,1)}}},this.context=t,this.canUseDOM=e,e||(t.helmet=GB({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},Hoe=mt.createContext({}),P3e=ti.shape({setHelmet:ti.func,helmetInstances:ti.shape({get:ti.func,add:ti.func,remove:ti.func})}),R3e=typeof document<"u",tE=function(t){function e(n){var r;return(r=t.call(this,n)||this).helmetData=new WB(r.props.context,e.canUseDOM),r}return I9(e,t),e.prototype.render=function(){return mt.createElement(Hoe.Provider,{value:this.helmetData.value},this.props.children)},e}($.Component);tE.canUseDOM=R3e,tE.propTypes={context:ti.shape({helmet:ti.shape()}),children:ti.node.isRequired},tE.defaultProps={context:{}},tE.displayName="HelmetProvider";var nS=function(t,e){var n,r=document.head||document.querySelector(Kn.HEAD),i=r.querySelectorAll(t+"[data-rh]"),s=[].slice.call(i),a=[];return e&&e.length&&e.forEach(function(o){var l=document.createElement(t);for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(u==="innerHTML"?l.innerHTML=o.innerHTML:u==="cssText"?l.styleSheet?l.styleSheet.cssText=o.cssText:l.appendChild(document.createTextNode(o.cssText)):l.setAttribute(u,o[u]===void 0?"":o[u]));l.setAttribute("data-rh","true"),s.some(function(c,d){return n=d,l.isEqualNode(c)})?s.splice(n,1):a.push(l)}
vendor: 4,013 bytes, line 53
53),s.forEach(function(o){return o.parentNode.removeChild(o)}),a.forEach(function(o){return r.appendChild(o)}),{oldTags:s,newTags:a}},F3=function(t,e){var n=document.getElementsByTagName(t)[0];if(n){for(var r=n.getAttribute("data-rh"),i=r?r.split(","):[],s=[].concat(i),a=Object.keys(e),o=0;o<a.length;o+=1){var l=a[o],u=e[l]||"";n.getAttribute(l)!==u&&n.setAttribute(l,u),i.indexOf(l)===-1&&i.push(l);var c=s.indexOf(l);c!==-1&&s.splice(c,1)}for(var d=s.length-1;d>=0;d-=1)n.removeAttribute(s[d]);i.length===s.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute("data-rh",a.join(","))}},lK=function(t,e){var n=t.baseTag,r=t.htmlAttributes,i=t.linkTags,s=t.metaTags,a=t.noscriptTags,o=t.onChangeClientState,l=t.scriptTags,u=t.styleTags,c=t.title,d=t.titleAttributes;F3(Kn.BODY,t.bodyAttributes),F3(Kn.HTML,r),function(v,b){v!==void 0&&document.title!==v&&(document.title=Voe(v)),F3(Kn.TITLE,b)}(c,d);var f={baseTag:nS(Kn.BASE,n),linkTags:nS(Kn.LINK,i),metaTags:nS(Kn.META,s),noscriptTags:nS(Kn.NOSCRIPT,a),scriptTags:nS(Kn.SCRIPT,l),styleTags:nS(Kn.STYLE,u)},h={},g={};Object.keys(f).forEach(function(v){var b=f[v],S=b.newTags,A=b.oldTags;S.length&&(h[v]=S),A.length&&(g[v]=f[v].oldTags)}),e&&e(),o(t,h,g)},vA=null,HR=function(t){function e(){for(var r,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return(r=t.call.apply(t,[this].concat(s))||this).rendered=!1,r}I9(e,t);var n=e.prototype;return n.shouldComponentUpdate=function(r){return!S3e(r,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var r,i,s=this.props.context,a=s.setHelmet,o=null,l=(r=s.helmetInstances.get().map(function(u){var c=xa({},u.props);return delete c.context,c}),{baseTag:x3e(["href"],r),bodyAttributes:k3("bodyAttributes",r),defer:OE(r,"defer"),encode:OE(r,"encodeSpecialCharacters"),htmlAttributes:k3("htmlAttributes",r),linkTags:mA(Kn.LINK,["rel","href"],r),metaTags:mA(Kn.META,["name","charset","http-equiv","property","itemprop"],r),noscriptTags:mA(Kn.NOSCRIPT,["innerHTML"],r),onChangeClientState:C3e(r),scriptTags:mA(Kn.SCRIPT,["src","innerHTML"],r),styleTags:mA(Kn.STYLE,["cssText"],r),title:_3e(r),titleAttributes:k3("titleAttributes",r),prioritizeSeoTags:I3e(r,"prioritizeSeoTags")});tE.canUseDOM?(i=l,vA&&cancelAnimationFrame(vA),i.defer?vA=requestAnimationFrame(function(){lK(i,function(){vA=null})}):(lK(i),vA=null)):GB&&(o=GB(l)),a(o)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},e}($.Component);HR.propTypes={context:P3e.isRequired},HR.displayName="HelmetDispatcher";var L3e=["children"],D3e=["children"],Fw=function(t){function e(){return t.apply(this,arguments)||this}I9(e,t);var n=e.prototype;return n.shouldComponentUpdate=function(r){return!m3e(sK(this.props,"helmetData"),sK(r,"helmetData"))},n.mapNestedChildrenToProps=function(r,i){if(!i)return null;switch(r.type){case Kn.SCRIPT:case Kn.NOSCRIPT:return{innerHTML:i};case Kn.STYLE:return{cssText:i};default:throw new Error("<"+r.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(r){var i,s=r.child,a=r.arrayTypeChildren;return xa({},a,((i={})[s.type]=[].concat(a[s.type]||[],[xa({},r.newChildProps,this.mapNestedChildrenToProps(s,r.nestedChildren))]),i))},n.mapObjectTypeChildren=function(r){var i,s,a=r.child,o=r.newProps,l=r.newChildProps,u=r.nestedChildren;switch(a.type){case Kn.TITLE:return xa({},o,((i={})[a.type]=u,i.titleAttributes=xa({},l),i));case Kn.BODY:return xa({},o,{bodyAttributes:xa({},l)});case Kn.HTML:return xa({},o,{htmlAttributes:xa({},l)});default:return xa({},o,((s={})[a.type]=xa({},l),s))}},n.mapArrayTypeChildrenToProps=function(r,i){var s=xa({},i);return Object.keys(r).forEach(function(a){var o;s=xa({},s,((o={})[a]=r[a],o))}),s}
53,n.warnOnInvalidChildren=function(r,i){return nK(iK.some(function(s){return r.type===s}),typeof r.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+iK.join(", ")+" are allowed. Helmet does not support rendering <"+r.type+"> elements. Refer to our API for more information."),nK(!i||typeof i=="string"||Array.isArray(i)&&!i.some(function(s){return typeof s!="string"}),"Helmet expects a string as a child of <"+r.type+">. Did you forget to wrap your children in braces? ( <"+r.type+">{``}</"+r.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(r,i){var s=this,a={};return mt.Children.forEach(r,function(o){if(o&&o.props){var l=o.props,u=l.children,c=rK(l,L3e),d=Object.keys(c).reduce(function(h,g){return h[w3e[g]||g]=c[g],h},{}),f=o.type;switch(typeof f=="symbol"?f=f.toString():s.warnOnInvalidChildren(o,u),f){case Kn.FRAGMENT:i=s.mapChildrenToProps(u,i);break;case Kn.LINK:case Kn.META:case Kn.NOSCRIPT:case Kn.SCRIPT:case Kn.STYLE:a=s.flattenArrayTypeChildren({child:o,arrayTypeChildren:a,newChildProps:d,nestedChildren:u});break;default:i=s.mapObjectTypeChildren({child:o,newProps:i,newChildProps:d,nestedChildren:u})}}}),this.mapArrayTypeChildrenToProps(a,i)},n.render=function(){var r=this.props,i=r.children,s=rK(r,D3e),a=xa({},s),o=s.helmetData;return i&&(a=this.mapChildrenToProps(i,a)),!o||o instanceof WB||(o=new WB(o.context,o.instances)),o?mt.createElement(HR,xa({},a,{context:o.value,helmetData:void 0})):mt.createElement(Hoe.Consumer,null,function(l){return mt.createElement(HR,xa({},a,{context:l}))})},e}($.Component);Fw.propTypes={base:ti.object,bodyAttributes:ti.object,children:ti.oneOfType([ti.arrayOf(ti.node),ti.node]),defaultTitle:ti.string,defer:ti.bool,encodeSpecialCharacters:ti.bool,htmlAttributes:ti.object,link:ti.arrayOf(ti.object),meta:ti.arrayOf(ti.object),noscript:ti.arrayOf(ti.object),onChangeClientState:ti.func,script:ti.arrayOf(ti.object),style:ti.arrayOf(ti.object),title:ti.string,titleAttributes:ti.object,titleTemplate:ti.string,prioritizeSeoTags:ti.bool,helmetData:ti.object},Fw.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},Fw.displayName="Helmet";/**
54 * @remix-run/router v1.23.2
55 *
56 * Copyright (c) Remix Software Inc.
57 *
58 * This source code is licensed under the MIT license found in the
59 * LICENSE.md file in the root directory of this source tree.
60 *
61 * @license MIT
62 */function U_(){return U_=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},U_.apply(this,arguments)}var ev;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(ev||(ev={}));const uK="popstate";function k3e(t){t===void 0&&(t={});function e(r,i){let{pathname:s,search:a,hash:o}=r.location;return qB("",{pathname:s,search:a,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:jR(i)}return M3e(e,n,null,t)}function Na(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function O9(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function N3e(){return Math.random().toString(36).substr(2,8)}function cK(t,e){return{usr:t.state,key:t.key,idx:e}}function qB(t,e,n,r){return n===void 0&&(n=null),U_({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?tT(e):e,{state:n,key:e&&e.key||r||N3e()})}function jR(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function tT(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function M3e(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,o=ev.Pop,l=null,u=c();u==null&&(u=0,a.replaceState(U_({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){o=ev.Pop;let b=c(),S=b==null?null:b-u;u=b,l&&l({action:o,location:v.location,delta:S})}function f(b,S){o=ev.Push;let A=qB(v.location,b,S);u=c()+1;let w=cK(A,u),x=v.createHref(A);try{a.pushState(w,"",x)}
vendor: 8,714 bytes, lines 62-71
62catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(x)}s&&l&&l({action:o,location:v.location,delta:1})}function h(b,S){o=ev.Replace;let A=qB(v.location,b,S);u=c();let w=cK(A,u),x=v.createHref(A);a.replaceState(w,"",x),s&&l&&l({action:o,location:v.location,delta:0})}function g(b){let S=i.location.origin!=="null"?i.location.origin:i.location.href,A=typeof b=="string"?b:jR(b);return A=A.replace(/ $/,"%20"),Na(S,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,S)}let v={get action(){return o},get location(){return t(i,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(uK,d),l=b,()=>{i.removeEventListener(uK,d),l=null}},createHref(b){return e(i,b)},createURL:g,encodeLocation(b){let S=g(b);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:f,replace:h,go(b){return a.go(b)}};return v}var dK;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(dK||(dK={}));function F3e(t,e,n){return n===void 0&&(n="/"),$3e(t,e,n)}function $3e(t,e,n,r){let i=typeof e=="string"?tT(e):e,s=P9(i.pathname||"/",n);if(s==null)return null;let a=joe(t);B3e(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let u=Woe(s);o=K3e(a[l],u)}return o}function joe(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,a,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(Na(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=pv([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(Na(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),joe(s.children,e,c,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:W3e(u,s.index),routesMeta:c})};return t.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of zoe(s.path))i(s,a,l)}),e}function zoe(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=zoe(r.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function B3e(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:q3e(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const U3e=/^:[\w-]+$/,V3e=3,H3e=2,j3e=1,z3e=10,G3e=-2,fK=t=>t==="*";function W3e(t,e){let n=t.split("/"),r=n.length;return n.some(fK)&&(r+=G3e),e&&(r+=H3e),n.filter(i=>!fK(i)).reduce((i,s)=>i+(U3e.test(s)?V3e:s===""?j3e:z3e),r)}function q3e(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function K3e(t,e,n){let{routesMeta:r}=t,i={},s="/",a=[];for(let o=0;o<r.length;++o){let l=r[o],u=o===r.length-1,c=s==="/"?e:e.slice(s.length)||"/",d=Goe({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:pv([s,d.pathname]),pathnameBase:eFe(pv([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=pv([s,d.pathnameBase]))}return a}function Goe(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=Y3e(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let v=o[d]||"";a=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const g=o[d];return h&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:t}}function Y3e(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),O9(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function Woe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return O9(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function P9(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}const Z3e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q3e=t=>Z3e.test(t);function X3e(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?tT(t):t,s;if(n)if(Q3e(n))s=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),O9(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?s=hK(n.substring(1),"/"):s=hK(n,e)}else s=e;return{pathname:s,search:tFe(r),hash:nFe(i)}}function hK(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function $3(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function J3e(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function qoe(t,e){let n=J3e(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Koe(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=tT(t):(i=U_({},t),Na(!i.pathname||!i.pathname.includes("?"),$3("?","pathname","search",i)),Na(!i.pathname||!i.pathname.includes("#"),$3("#","pathname","hash",i)),Na(!i.search||!i.search.includes("#"),$3("#","search","hash",i)));let s=t===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=n;else{let d=e.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?e[d]:"/"}let l=X3e(i,o),u=a&&a!=="/"&&a.endsWith("/"),c=(s||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const pv=t=>t.join("/").replace(/\/\/+/g,"/"),eFe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),tFe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nFe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function rFe(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Yoe=["post","put","patch","delete"];new Set(Yoe);const iFe=["get",...Yoe];new Set(iFe);/**
63 * React Router v6.30.3
64 *
65 * Copyright (c) Remix Software Inc.
66 *
67 * This source code is licensed under the MIT license found in the
68 * LICENSE.md file in the root directory of this source tree.
69 *
70 * @license MIT
71 */function V_(){return V_=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},V_.apply(this,arguments)}const R9=$.createContext(null),sFe=$.createContext(null),mb=$.createContext(null),Qk=$.createContext(null),$v=$.createContext({outlet:null,matches:[],isDataRoute:!1}),Zoe=$.createContext(null);function aFe(t,e){let{relative:n}=e===void 0?{}:e;nT()||Na(!1);let{basename:r,navigator:i}=$.useContext(mb),{hash:s,pathname:a,search:o}=Joe(t,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:pv([r,a])),i.createHref({pathname:l,search:o,hash:s})}function nT(){return $.useContext(Qk)!=null}function Rd(){return nT()||Na(!1),$.useContext(Qk).location}function Qoe(t){nT()||Na(!1);let{pathname:e}=Rd();return $.useMemo(()=>Goe(t,Woe(e)),[e,t])}function Xoe(t){$.useContext(mb).static||$.useLayoutEffect(t)}function rT(){let{isDataRoute:t}=$.useContext($v);return t?bFe():oFe()}function oFe(){nT()||Na(!1);let t=$.useContext(R9),{basename:e,future:n,navigator:r}=$.useContext(mb),{matches:i}=$.useContext($v),{pathname:s}=Rd(),a=JSON.stringify(qoe(i,n.v7_relativeSplatPath)),o=$.useRef(!1);return Xoe(()=>{o.current=!0}
vendor: 4,216 bytes, line 71
71),$.useCallback(function(u,c){if(c===void 0&&(c={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let d=Koe(u,JSON.parse(a),s,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:pv([e,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[e,r,a,s,t])}function MNt(){let{matches:t}=$.useContext($v),e=t[t.length-1];return e?e.params:{}}function Joe(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=$.useContext(mb),{matches:i}=$.useContext($v),{pathname:s}=Rd(),a=JSON.stringify(qoe(i,r.v7_relativeSplatPath));return $.useMemo(()=>Koe(t,JSON.parse(a),s,n==="path"),[t,a,s,n])}function lFe(t,e){return uFe(t,e)}function uFe(t,e,n,r){nT()||Na(!1);let{navigator:i}=$.useContext(mb),{matches:s}=$.useContext($v),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=Rd(),c;if(e){var d;let b=typeof e=="string"?tT(e):e;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||Na(!1),c=b}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=F3e(t,{pathname:h}),v=pFe(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},o,b.params),pathname:pv([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:pv([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return e&&v?$.createElement(Qk.Provider,{value:{location:V_({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ev.Pop}},v):v}function cFe(){let t=yFe(),e=rFe(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},e),n?$.createElement("pre",{style:i},n):null,null)}const dFe=$.createElement(cFe,null);class fFe extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?$.createElement($v.Provider,{value:this.props.routeContext},$.createElement(Zoe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hFe(t){let{routeContext:e,match:n,children:r}=t,i=$.useContext(R9);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),$.createElement($v.Provider,{value:e},r)}function pFe(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,o=(i=n)==null?void 0:i.errors;if(o!=null){let c=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);c>=0||Na(!1),a=a.slice(0,Math.min(a.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=n,g=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||g){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,f)=>{let h,g=!1,v=null,b=null;n&&(h=o&&d.route.id?o[d.route.id]:void 0,v=d.route.errorElement||dFe,l&&(u<0&&f===0?(SFe("route-fallback"),g=!0,b=null):u===f&&(g=!0,b=d.route.hydrateFallbackElement||null)));let S=e.concat(a.slice(0,f+1)),A=()=>{let w;return h?w=v:g?w=b:d.route.Component?w=$.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,$.createElement(hFe,{match:d,routeC
71ontext:{outlet:c,matches:S,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?$.createElement(fFe,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}var ele=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ele||{}),tle=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(tle||{});function gFe(t){let e=$.useContext(R9);return e||Na(!1),e}function mFe(t){let e=$.useContext(sFe);return e||Na(!1),e}function vFe(t){let e=$.useContext($v);return e||Na(!1),e}function nle(t){let e=vFe(),n=e.matches[e.matches.length-1];return n.route.id||Na(!1),n.route.id}function yFe(){var t;let e=$.useContext(Zoe),n=mFe(),r=nle();return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function bFe(){let{router:t}=gFe(ele.UseNavigateStable),e=nle(tle.UseNavigateStable),n=$.useRef(!1);return Xoe(()=>{n.current=!0}),$.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,V_({fromRouteId:e},s)))},[t,e])}const pK={};function SFe(t,e,n){pK[t]||(pK[t]=!0)}function EFe(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function id(t){Na(!1)}function TFe(t){let{basename:e="/",children:n=null,location:r,navigationType:i=ev.Pop,navigator:s,static:a=!1,future:o}=t;nT()&&Na(!1);let l=e.replace(/^\/*/,"/"),u=$.useMemo(()=>({basename:l,navigator:s,static:a,future:V_({v7_relativeSplatPath:!1},o)}),[l,o,s,a]);typeof r=="string"&&(r=tT(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:g="default"}=r,v=$.useMemo(()=>{let b=P9(c,l);return b==null?null:{location:{pathname:b,search:d,hash:f,state:h,key:g},navigationType:i}},[l,c,d,f,h,g,i]);return v==null?null:$.createElement(mb.Provider,{value:u},$.createElement(Qk.Provider,{children:n,value:v}))}function AFe(t){let{children:e,location:n}=t;return lFe(KB(e),n)}new Promise(()=>{});function KB(t,e){e===void 0&&(e=[]);let n=[];return $.Children.forEach(t,(r,i)=>{if(!$.isValidElement(r))return;let s=[...e,i];if(r.type===$.Fragment){n.push.apply(n,KB(r.props.children,s));return}r.type!==id&&Na(!1),!r.props.index||!r.props.children||Na(!1);let a={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=KB(r.props.children,s)),n.push(a)}),n}/**
72 * React Router DOM v6.30.3
73 *
74 * Copyright (c) Remix Software Inc.
75 *
76 * This source code is licensed under the MIT license found in the
77 * LICENSE.md file in the root directory of this source tree.
78 *
79 * @license MIT
80 */function YB(){return YB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},YB.apply(this,arguments)}function wFe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function _Fe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function CFe(t,e){return t.button===0&&(!e||e==="_self")&&!_Fe(t)}function ZB(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function xFe(t,e){let n=ZB(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>
80{n.append(i,s)})}),n}const IFe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],OFe="6";try{window.__reactRouterVersion=OFe}catch{}const PFe="startTransition",gK=o$[PFe];function RFe(t){let{basename:e,children:n,future:r,window:i}=t,s=$.useRef();s.current==null&&(s.current=k3e({window:i,v5Compat:!0}));let a=s.current,[o,l]=$.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=$.useCallback(d=>{u&&gK?gK(()=>l(d)):l(d)},[l,u]);return $.useLayoutEffect(()=>a.listen(c),[a,c]),$.useEffect(()=>EFe(r),[r]),$.createElement(TFe,{basename:e,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const LFe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DFe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kFe=$.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,f=wFe(e,IFe),{basename:h}=$.useContext(mb),g,v=!1;if(typeof u=="string"&&DFe.test(u)&&(g=u,LFe))try{let w=new URL(window.location.href),x=u.startsWith("//")?new URL(w.protocol+u):new URL(u),P=P9(x.pathname,h);x.origin===w.origin&&P!=null?u=P+x.search+x.hash:v=!0}catch{}let b=aFe(u,{relative:i}),S=NFe(u,{replace:a,state:o,target:l,preventScrollReset:c,relative:i,viewTransition:d});function A(w){r&&r(w),w.defaultPrevented||S(w)}return $.createElement("a",YB({},f,{href:g||b,onClick:v||s?r:A,ref:n,target:l}))});var mK;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(mK||(mK={}));var vK;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(vK||(vK={}));function NFe(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,viewTransition:o}=e===void 0?{}:e,l=rT(),u=Rd(),c=Joe(t,{relative:a});return $.useCallback(d=>{if(CFe(d,n)){d.preventDefault();let f=r!==void 0?r:jR(u)===jR(c);l(t,{replace:f,state:i,preventScrollReset:s,relative:a,viewTransition:o})}},[u,l,c,r,i,n,t,s,a,o])}function Xk(t){let e=$.useRef(ZB(t)),n=$.useRef(!1),r=Rd(),i=$.useMemo(()=>xFe(r.search,n.current?null:e.current),[r.search]),s=rT(),a=$.useCallback((o,l)=>{const u=ZB(typeof o=="function"?o(i):o);n.current=!0,s("?"+u,l)},[s,i]);return[i,a]}function yK(t){return t!==null&&typeof t=="object"&&"constructor"in t&&t.constructor===Object}function L9(t={},e={}){Object.keys(e).forEach(n=>{typeof t[n]>"u"?t[n]=e[n]:yK(e[n])&&yK(t[n])&&Object.keys(e[n]).length>0&&L9(t[n],e[n])})}const rle={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Wu(){const t=typeof document<"u"?document:{};return L9(t,rle),t}const MFe={document:rle,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(t){return typeof setTimeout>"u"?(t(),null):setTimeout(t,0)},cancelAnimationFrame(t){typeof setTimeout>"u"||clearTimeout(t)}};function vo(){const t=typeof window<"u"?window:{};return L9(t,MFe),t}function FFe(t){const e=t.__proto__;Object.defineProperty(t,"__proto__",{get(){return e},set(n){e.__proto__=n}})}class tv extends Array{constructor(e){typeof e=="number"?super(e):(super(...e||[]),FFe(this))}}function XC(t=[]){const e=[];return t.forEach(n=>{Array.isArray(n)?e.push(...XC(n)):e.push(n)}),e}function ile(t,e){return Array.prototype.filter.call(t,e)}function $Fe(t){const e=[];for(let n=0;n<t.length;n+=1)e.indexOf(t[n])===-1&&e.push(t[n]);return e}function BFe(t,e){if(typeof t!="string")return[t];const n=[],r=e.querySelectorAll(t);for(let i=0;i<r.length;i+=1)n.push(r[i]);return n}function an(t,e){const n=vo(),r=Wu();let i=[];if(!e&&t instanceof tv)return t;if(!t)return new tv(i);if(typeof t=="string"){const s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){let a="div";s.indexOf("<li")===0&&(a="ul"),s.indexOf("<tr")===0&&(a="tbody"),(s.indexOf("<td")===0||s.indexOf("<th")===0)&&(a="tr"),s.indexOf("<tbody")===0&&(a="table"),s.indexOf("<option")===0&&(a="select");const o=r.createElement(a);o.innerHTML=s;for(let l=0;l<o.childNodes.length;l+=1)i.push(o.childNodes[l])}else i=BFe(t.trim(),e||r)}else if(t.nodeType||t===n||t===r)i.push(t);else if(Array.isArray(t)){if(t instanceof tv)return t;i=t}return new tv($Fe(i))}an.fn=tv.prototype;function UFe(...t){const e=XC(t.map(n=>n.split(" ")));return this.forEach(n=>
80{n.classList.add(...e)}),this}function VFe(...t){const e=XC(t.map(n=>n.split(" ")));return this.forEach(n=>{n.classList.remove(...e)}),this}function HFe(...t){const e=XC(t.map(n=>n.split(" ")));this.forEach(n=>{e.forEach(r=>{n.classList.toggle(r)})})}function jFe(...t){const e=XC(t.map(n=>n.split(" ")));return ile(this,n=>e.filter(r=>n.classList.contains(r)).length>0).length>0}function zFe(t,e){if(arguments.length===1&&typeof t=="string")return this[0]?this[0].getAttribute(t):void 0;for(let n=0;n<this.length;n+=1)if(arguments.length===2)this[n].setAttribute(t,e);else for(const r in t)this[n][r]=t[r],this[n].setAttribute(r,t[r]);return this}function GFe(t){for(let e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this}function WFe(t){for(let e=0;e<this.length;e+=1)this[e].style.transform=t;return this}function qFe(t){for(let e=0;e<this.length;e+=1)this[e].style.transitionDuration=typeof t!="string"?`${t}ms`:t;return this}function KFe(...t){let[e,n,r,i]=t;typeof t[1]=="function"&&([e,r,i]=t,n=void 0),i||(i=!1);function s(u){const c=u.target;if(!c)return;const d=u.target.dom7EventData||[];if(d.indexOf(u)<0&&d.unshift(u),an(c).is(n))r.apply(c,d);else{const f=an(c).parents();for(let h=0;h<f.length;h+=1)an(f[h]).is(n)&&r.apply(f[h],d)}}function a(u){const c=u&&u.target?u.target.dom7EventData||[]:[];c.indexOf(u)<0&&c.unshift(u),r.apply(this,c)}const o=e.split(" ");let l;for(let u=0;u<this.length;u+=1){const c=this[u];if(n)for(l=0;l<o.length;l+=1){const d=o[l];c.dom7LiveListeners||(c.dom7LiveListeners={}),c.dom7LiveListeners[d]||(c.dom7LiveListeners[d]=[]),c.dom7LiveListeners[d].push({listener:r,proxyListener:s}),c.addEventListener(d,s,i)}else for(l=0;l<o.length;l+=1){const d=o[l];c.dom7Listeners||(c.dom7Listeners={}),c.dom7Listeners[d]||(c.dom7Listeners[d]=[]),c.dom7Listeners[d].push({listener:r,proxyListener:a}),c.addEventListener(d,a,i)}}return this}function YFe(...t){let[e,n,r,i]=t;typeof t[1]=="function"&&([e,r,i]=t,n=void 0),i||(i=!1);const s=e.split(" ");for(let a=0;a<s.length;a+=1){const o=s[a];for(let l=0;l<this.length;l+=1){const u=this[l];let c;if(!n&&u.dom7Listeners?c=u.dom7Listeners[o]:n&&u.dom7LiveListeners&&(c=u.dom7LiveListeners[o]),c&&c.length)for(let d=c.length-1;d>=0;d-=1){const f=c[d];r&&f.listener===r||r&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===r?(u.removeEventListener(o,f.proxyListener,i),c.splice(d,1)):r||(u.removeEventListener(o,f.proxyListener,i),c.splice(d,1))}}}return this}function ZFe(...t){const e=vo(),n=t[0].split(" "),r=t[1];for(let i=0;i<n.length;i+=1){const s=n[i];for(let a=0;a<this.length;a+=1){const o=this[a];if(e.CustomEvent){const l=new e.CustomEvent(s,{detail:r,bubbles:!0,cancelable:!0});o.dom7EventData=t.filter((u,c)=>c>0),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}}}return this}function QFe(t){const e=this;function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))}return t&&e.on("transitionend",n),this}function XFe(t){if(this.length>0){if(t){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function JFe(t){if(this.length>0){if(t){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function e5e(){if(this.length>0){const t=vo(),e=Wu(),n=this[0],r=n.getBoundingClientRect(),i=e.body,s=n.clientTop||i.clientTop||0,a=n.clientLeft||i.clientLeft||0,o=n===t?t.scrollY:n.scrollTop,l=n===t?t.scrollX:n.scrollLeft;return{top:r.top+o-s,left:r.left+l-a}}return null}function t5e(){const t=vo();return this[0]?t.getComputedStyle(this[0],null):{}}function n5e(t,e){const n=vo();let r;if(arguments.length===1)if(typeof t=="string"){if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(t)}else{for(r=0;r<this.length;r+=1)for(const i in t)this[r].style[i]=t[i];return this}if(arguments.length===2&&typeof t=="string"){for(r=0;r<this.length;r+=1)this[r].style[t]=e;return this}return this}function r5e(t){return t?(this.forEach((e,n)=>{t.apply(e,[e,n])}),this):this}function i5e(t){const e=ile(this,t);return an(e)}function s5e(t){if(typeof t>"u")return this[0]?this[0].innerHTML:null;for(let e=0;e<this.length;e+=1)this[e].innerHTML=t;return this}function a5e(t){if(typeof t>"u")return this[0]?this[0].textContent.trim():null;for(let e=0;e<this.length;e+=1)this[e].textContent=t;return this}function o5e(t){const e=vo(),n=Wu(),r=this[0];let i,s;if(!r||typeof t>"u")return!1;if(typeof t=="string"){if(r.matches)return r.matches(t);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(r.msMatchesSelector)return r.msMatchesSelector(t);for(i=an(t),s=0;s<i.length;s+=1)if(i[s]===r)return!0;return!1}if(t===n)return r===n;if(t===e)return r===e;if(t.nodeType||t instanceof tv){for(i=t.nodeType?[t]:t,s=0;s<i.length;s+=1)if(i[s]===r)return!0;return!1}return!1}function l5e(){let t=this[0],e;if(t){for(e=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(e+=1);return e}}function u5e(t){if(typeof t>"u")return this;const e=this.length;if(t>e-1)return an([]);if(t<0){const n=e+t;return n<0?an([]):an([this[n]])}return an([this[t]])}function c5e(...t){let e;const n=Wu();for(let r=0;r<t.length;r+=1){e=t[r];for(let i=0;i<this.length;i+=1)if(typeof e=="string"){const s=n.createElement("div");for(s.innerHTML=e;s.firstChild;)this[i].appendChild(s.firstChild)}else if(e instanceof tv)for(let s=0;s<e.length;s+=1)this[i].appendChild(e[s]);else this[i].appendChild(e)}return this}function d5e(t){const e=Wu();let n,r;for(n=0;n<this.length;n+=1)if(typeof t=="string"){const i=e.createElement("div");for(i.innerHTML=t,r=i.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(t instanceof tv)for(r=0;r<t.length;r+=1)this[n].insertBefore(t[r],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this}function f5e(t){return this.length>0?t?this[0].nextElementSibling&&an(this[0].nextElementSibling).is(t)?an([this[0].nextElementSibling]):an([]):this[0].nextElementSibling?an([this[0].nextElementSibling]):an([]):an([])}function h5e(t){const e=[];let n=this[0];if(!n)return an([]);for(;n.nextElementSibling;){const r=n.nextElementSibling;t?an(r).is(t)&&e.push(r):e.push(r),n=r}return an(e)}function p5e(t){if(this.length>0){const e=this[0];return t?e.previousElementSibling&&an(e.previousElementSibling).is(t)?an([e.previousElementSibling]):an([]):e.previousElementSibling?an([e.previousElementSibling]):an([])}return an([])}function g5e(t){const e=[];let n=this[0];if(!n)return an([]);for(;n.previousElementSibling;){const r=n.previousElementSibling;t?an(r).is(t)&&e.push(r):e.push(r),n=r}return an(e)}function m5e(t){const e=[];for(let n=0;n<this.length;n+=1)this[n].parentNode!==null&&(t?an(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return an(e)}function v5e(t){const e=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)t?an(r).is(t)&&e.push(r):e.push(r),r=r.parentNode}return an(e)}function y5e(t){let e=this;return typeof t>"u"?an([]):(e.is(t)||(e=e.parents(t).eq(0)),e)}function b5e(t){const e=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(t);for(let i=0;i<r.length;
80i+=1)e.push(r[i])}return an(e)}function S5e(t){const e=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let i=0;i<r.length;i+=1)(!t||an(r[i]).is(t))&&e.push(r[i])}return an(e)}function E5e(){for(let t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}const bK={addClass:UFe,removeClass:VFe,hasClass:jFe,toggleClass:HFe,attr:zFe,removeAttr:GFe,transform:WFe,transition:qFe,on:KFe,off:YFe,trigger:ZFe,transitionEnd:QFe,outerWidth:XFe,outerHeight:JFe,styles:t5e,offset:e5e,css:n5e,each:r5e,html:s5e,text:a5e,is:o5e,index:l5e,eq:u5e,append:c5e,prepend:d5e,next:f5e,nextAll:h5e,prev:p5e,prevAll:g5e,parent:m5e,parents:v5e,closest:y5e,find:b5e,children:S5e,filter:i5e,remove:E5e};Object.keys(bK).forEach(t=>{Object.defineProperty(an.fn,t,{value:bK[t],writable:!0})});function T5e(t){const e=t;Object.keys(e).forEach(n=>{try{e[n]=null}catch{}try{delete e[n]}catch{}})}function H_(t,e=0){return setTimeout(t,e)}function Ic(){return Date.now()}function A5e(t){const e=vo();let n;return e.getComputedStyle&&(n=e.getComputedStyle(t,null)),!n&&t.currentStyle&&(n=t.currentStyle),n||(n=t.style),n}function w5e(t,e="x"){const n=vo();let r,i,s;const a=A5e(t);return n.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(o=>o.replace(",",".")).join(", ")),s=new n.WebKitCSSMatrix(i==="none"?"":i)):(s=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=s.toString().split(",")),e==="x"&&(n.WebKitCSSMatrix?i=s.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),e==="y"&&(n.WebKitCSSMatrix?i=s.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function eO(t){return typeof t=="object"&&t!==null&&t.constructor&&Object.prototype.toString.call(t).slice(8,-1)==="Object"}function _5e(t){return typeof window<"u"&&typeof window.HTMLElement<"u"?t instanceof HTMLElement:t&&(t.nodeType===1||t.nodeType===11)}function gc(...t){const e=Object(t[0]),n=["__proto__","constructor","prototype"];for(let r=1;r<t.length;r+=1){const i=t[r];if(i!=null&&!_5e(i)){const s=Object.keys(Object(i)).filter(a=>n.indexOf(a)<0);for(let a=0,o=s.length;a<o;a+=1){const l=s[a],u=Object.getOwnPropertyDescriptor(i,l);u!==void 0&&u.enumerable&&(eO(e[l])&&eO(i[l])?i[l].__swiper__?e[l]=i[l]:gc(e[l],i[l]):!eO(e[l])&&eO(i[l])?(e[l]={},i[l].__swiper__?e[l]=i[l]:gc(e[l],i[l])):e[l]=i[l])}}}return e}function XA(t,e,n){t.style.setProperty(e,n)}function sle({swiper:t,targetPosition:e,side:n}){const r=vo(),i=-t.translate;let s=null,a;const o=t.params.speed;t.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(t.cssModeFrameID);const l=e>i?"next":"prev",u=(d,f)=>l==="next"&&d>=f||l==="prev"&&d<=f,c=()=>{a=new Date().getTime(),s===null&&(s=a);const d=Math.max(Math.min((a-s)/o,1),0),f=.5-Math.cos(d*Math.PI)/2;let h=i+f*(e-i);if(u(h,e)&&(h=e),t.wrapperEl.scrollTo({[n]:h}),u(h,e)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:h})}),r.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=r.requestAnimationFrame(c)};c()}let B3;function C5e(){const t=vo(),e=Wu();return{smoothScroll:e.documentElement&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),passiveListener:function(){let r=!1;try{const i=Object.defineProperty({},"passive",{get(){r=!0}});t.addEventListener("testPassiveListener",null,i)}catch{}return r}(),gestures:function(){return"ongesturestart"in t}()}}function ale(){return B3||(B3=C5e()),B3}let U3;function x5e({userAgent:t}={}){const e=ale(),n=vo(),r=n.navigator.platform,i=t||n.navigator.userAgent,s={ios:!1,android:!1},a=n.screen.width,o=n.screen.height,l=i.match(/(Android);?[\s\/]+([\d.]+)?/);let u=i.match(/(iPad).*OS\s([\d_]+)/);const c=i.match(/(iPod)(.*OS\s([\d_]+))?/),d=!u&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f=r==="Win32";let h=r==="MacIntel";const g=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&h&&e.touch&&g.indexOf(`${a}x${o}`)>=0&&(u=i.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),h=!1),l&&!f&&(s.os="android",s.android=!0),(u||d||c)&&
vendor: 5,613 bytes, line 80
80(s.os="ios",s.ios=!0),s}function I5e(t={}){return U3||(U3=x5e(t)),U3}let V3;function O5e(){const t=vo();function e(){const n=t.navigator.userAgent.toLowerCase();return n.indexOf("safari")>=0&&n.indexOf("chrome")<0&&n.indexOf("android")<0}return{isSafari:e(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}function P5e(){return V3||(V3=O5e()),V3}function R5e({swiper:t,on:e,emit:n}){const r=vo();let i=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(n("beforeResize"),n("resize"))},o=()=>{!t||t.destroyed||!t.initialized||(i=new ResizeObserver(c=>{s=r.requestAnimationFrame(()=>{const{width:d,height:f}=t;let h=d,g=f;c.forEach(({contentBoxSize:v,contentRect:b,target:S})=>{S&&S!==t.el||(h=b?b.width:(v[0]||v).inlineSize,g=b?b.height:(v[0]||v).blockSize)}),(h!==d||g!==f)&&a()})}),i.observe(t.el))},l=()=>{s&&r.cancelAnimationFrame(s),i&&i.unobserve&&t.el&&(i.unobserve(t.el),i=null)},u=()=>{!t||t.destroyed||!t.initialized||n("orientationchange")};e("init",()=>{if(t.params.resizeObserver&&typeof r.ResizeObserver<"u"){o();return}r.addEventListener("resize",a),r.addEventListener("orientationchange",u)}),e("destroy",()=>{l(),r.removeEventListener("resize",a),r.removeEventListener("orientationchange",u)})}function L5e({swiper:t,extendParams:e,on:n,emit:r}){const i=[],s=vo(),a=(u,c={})=>{const d=s.MutationObserver||s.WebkitMutationObserver,f=new d(h=>{if(h.length===1){r("observerUpdate",h[0]);return}const g=function(){r("observerUpdate",h[0])};s.requestAnimationFrame?s.requestAnimationFrame(g):s.setTimeout(g,0)});f.observe(u,{attributes:typeof c.attributes>"u"?!0:c.attributes,childList:typeof c.childList>"u"?!0:c.childList,characterData:typeof c.characterData>"u"?!0:c.characterData}),i.push(f)},o=()=>{if(t.params.observer){if(t.params.observeParents){const u=t.$el.parents();for(let c=0;c<u.length;c+=1)a(u[c])}a(t.$el[0],{childList:t.params.observeSlideChildren}),a(t.$wrapperEl[0],{attributes:!1})}},l=()=>{i.forEach(u=>{u.disconnect()}),i.splice(0,i.length)};e({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",o),n("destroy",l)}const D5e={on(t,e,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof e!="function")return r;const i=n?"unshift":"push";return t.split(" ").forEach(s=>{r.eventsListeners[s]||(r.eventsListeners[s]=[]),r.eventsListeners[s][i](e)}),r},once(t,e,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof e!="function")return r;function i(...s){r.off(t,i),i.__emitterProxy&&delete i.__emitterProxy,e.apply(r,s)}return i.__emitterProxy=e,r.on(t,i,n)},onAny(t,e){const n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;const r=e?"unshift":"push";return n.eventsAnyListeners.indexOf(t)<0&&n.eventsAnyListeners[r](t),n},offAny(t){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const n=e.eventsAnyListeners.indexOf(t);return n>=0&&e.eventsAnyListeners.splice(n,1),e},off(t,e){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||t.split(" ").forEach(r=>{typeof e>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,s)=>{(i===e||i.__emitterProxy&&i.__emitterProxy===e)&&n.eventsListeners[r].splice(s,1)})}),n},emit(...t){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let n,r,i;return typeof t[0]=="string"||Array.isArray(t[0])?(n=t[0],r=t.slice(1,t.length),i=e):(n=t[0].events,r=t[0].data,i=t[0].context||e),r.unshift(i),(Array.isArray(n)?n:n.split(" ")).forEach(a=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(o=>{o.apply(i,[a,...r])}),e.eventsListeners&&e.eventsListeners[a]&&e.eventsListeners[a].forEach(o=>{o.apply(i,r)})}),e}};function k5e(){const t=this;let e,n;const r=t.$el;typeof t.params.width<"u"&&t.params.width!==null?e=t.params.width:e=r[0].clientWidth,typeof t.params.height<"u"&&t.params.height!==null?n=t.params.height:n=r[0].clientHeight,!(e===0&&t.isHorizontal()||n===0&&t.isVertical())&&(e=e-parseInt(r.css("padding-left")||0,10)-parseInt(r.css("padding-right")||0,10),n=n-parseInt(r.css("padding-top")||0,10)-parseInt(r.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(n)&&(n=0),Object.assign(t,{width:e,height:n,size:t.isHorizontal()?e:n}))}function N5e(){const t=this;function e(B){return t.isHorizontal()?B:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[B]}function n(B,q){return parseFloat(B.getPropertyValue(e(q))||0)}const r=t.params,{$wrapperEl:i,size:s,rtlTranslate:a,wrongRTL:o}=t,l=t.virtual&&r.virtual.enabled,u=l?t.virtual.slides.length:t.slides.length,c=i.children(`.${t.params.slideClass}`),d=l?t.virtual.slides.length:c.length;let f=[];const h=[],g=[];let v=r.slidesOffsetBefore;typeof v=="function"&&(v=r.slidesOffsetBefore.call(t));let b=r.slidesOffsetAfter;typeof b=="function"&&(b=r.slidesOffsetAfter.call(t));const S=t.snapGrid.length,A=t.slidesGrid.length;let w=r.spaceBetween,x=-v,P=0,N=0;if(typeof s>"u")return;typeof w=="string"&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*s),t.virtualSize=-w,a?c.css({marginLeft:"",marginBottom:"",marginTop:""}):c.css({marginRight:"",marginBottom:"",marginTop:""}),r.centeredSlides&&r.cssMode&&(XA(t.wrapperEl,"--swiper-centered-offset-before",""),XA(t.wrapperEl,"--swiper-centered-offset-after",""));const k=r.grid&&r.grid.rows>1&&t.grid;k&&t.grid.initSlides(d);let U;const H=r.slidesPerView==="auto"&&r.breakpoints&&Object.keys(r.breakpoints).filter(
80B=>typeof r.breakpoints[B].slidesPerView<"u").length>0;for(let B=0;B<d;B+=1){U=0;const q=c.eq(B);if(k&&t.grid.updateSlide(B,q,d,e),q.css("display")!=="none"){if(r.slidesPerView==="auto"){H&&(c[B].style[e("width")]="");const Z=getComputedStyle(q[0]),C=q[0].style.transform,L=q[0].style.webkitTransform;if(C&&(q[0].style.transform="none"),L&&(q[0].style.webkitTransform="none"),r.roundLengths)U=t.isHorizontal()?q.outerWidth(!0):q.outerHeight(!0);else{const V=n(Z,"width"),j=n(Z,"padding-left"),X=n(Z,"padding-right"),G=n(Z,"margin-left"),ie=n(Z,"margin-right"),ae=Z.getPropertyValue("box-sizing");if(ae&&ae==="border-box")U=V+G+ie;else{const{clientWidth:ue,offsetWidth:Q}=q[0];U=V+j+X+G+ie+(Q-ue)}}C&&(q[0].style.transform=C),L&&(q[0].style.webkitTransform=L),r.roundLengths&&(U=Math.floor(U))}else U=(s-(r.slidesPerView-1)*w)/r.slidesPerView,r.roundLengths&&(U=Math.floor(U)),c[B]&&(c[B].style[e("width")]=`${U}px`);c[B]&&(c[B].swiperSlideSize=U),g.push(U),r.centeredSlides?(x=x+U/2+P/2+w,P===0&&B!==0&&(x=x-s/2-w),B===0&&(x=x-s/2-w),Math.abs(x)<1/1e3&&(x=0),r.roundLengths&&(x=Math.floor(x)),N%r.slidesPerGroup===0&&f.push(x),h.push(x)):(r.roundLengths&&(x=Math.floor(x)),(N-Math.min(t.params.slidesPerGroupSkip,N))%t.params.slidesPerGroup===0&&f.push(x),h.push(x),x=x+U+w),t.virtualSize+=U+w,P=U,N+=1}}if(t.virtualSize=Math.max(t.virtualSize,s)+b,a&&o&&(r.effect==="slide"||r.effect==="coverflow")&&i.css({width:`${t.virtualSize+r.spaceBetween}px`}),r.setWrapperSize&&i.css({[e("width")]:`${t.virtualSize+r.spaceBetween}px`}),k&&t.grid.updateWrapperSize(U,f,e),!r.centeredSlides){const B=[];for(let q=0;q<f.length;q+=1){let Z=f[q];r.roundLengths&&(Z=Math.floor(Z)),f[q]<=t.virtualSize-s&&B.push(Z)}f=B,Math.floor(t.virtualSize-s)-Math.floor(f[f.length-1])>1&&f.push(t.virtualSize-s)}if(f.length===0&&(f=[0]),r.spaceBetween!==0){const B=t.isHorizontal()&&a?"marginLeft":e("marginRight");c.filter((q,Z)=>r.cssMode?Z!==c.length-1:!0).css({[B]:`${w}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let B=0;g.forEach(Z=>{B+=Z+(r.spaceBetween?r.spaceBetween:0)}),B-=r.spaceBetween;const q=B-s;f=f.map(Z=>Z<0?-v:Z>q?q+b:Z)}if(r.centerInsufficientSlides){let B=0;if(g.forEach(q=>{B+=q+(r.spaceBetween?r.spaceBetween:0)}),B-=r.spaceBetween,B<s){const q=(s-B)/2;f.forEach((Z,C)=>{f[C]=Z-q}),h.forEach((Z,C)=>{h[C]=Z+q})}}if(Object.assign(t,{slides:c,snapGrid:f,slidesGrid:h,slidesSizesGrid:g}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){XA(t.wrapperEl,"--swiper-centered-offset-before",`${-f[0]}px`),XA(t.wrapperEl,"--swiper-centered-offset-after",`${t.size/2-g[g.length-1]/2}px`);const B=-t.snapGrid[0],q=-t.slidesGrid[0];t.snapGrid=t.snapGrid.map(Z=>Z+B),t.slidesGrid=t.slidesGrid.map(Z=>Z+q)}if(d!==u&&t.emit("slidesLengthChange"),f.length!==S&&(t.params.watchOverflow&&t.checkOverflow(),t.emit("snapGridLengthChange")),h.length!==A&&t.emit("slidesGridLengthChange"),r.watchSlidesProgress&&t.updateSlidesOffset(),!l&&!r.cssMode&&(r.effect==="slide"||r.effect==="fade")){const B=`${r.containerModifierClass}backface-hidden`,q=t.$el.hasClass(B);d<=r.maxBackfaceHiddenSlides?q||t.$el.addClass(B):q&&t.$el.removeClass(B)}}function M5e(t){const e=this,n=[],r=e.virtual&&e.params.virtual.enabled;let i=0,s;typeof t=="number"?e.setTransition(t):t===!0&&e.setTransition(e.params.speed);const a=o=>r?e.slides.filter(l=>parseInt(l.getAttribute("data-swiper-slide-index"),10)===o)[0]:e.slides.eq(o)[0];if(e.params.slidesPerView!=="auto"&&e.params.slidesPerView>1)if(e.params.centeredSlides)(e.visibleSlides||an([])).each(o=>{n.push(o)});else for(s=0;s<Math.ceil(e.params.slidesPerView);s+=1){const o=e.activeIndex+s;if(o>e.slides.length&&!r)break;n.push(a(o))}else n.push(a(e.activeIndex));for(s=0;s<n.length;s+=1)if(typeof n[s]<"u"){const o=n[s].offsetHeight;i=o>i?o:i}(i||i===0)&&e.$wrapperEl.css("height",`${i}px`)}function F5e(){const t=this,e=t.slides;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=t.isHorizontal()?e[n].offsetLeft:e[n].offsetTop}function $5e(t=this&&this.translate||0){const e=this,n=e.params,{slides:r,rtlTranslate:i,snapGrid:s}=e;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let a=-t;i&&(a=t),r.removeClass(n.slideVisibleClass),e.visibleSlidesIndexes=[],e.visibleSlides=[];for(let o=0;o<r.length;
80o+=1){const l=r[o];let u=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(u-=r[0].swiperSlideOffset);const c=(a+(n.centeredSlides?e.minTranslate():0)-u)/(l.swiperSlideSize+n.spaceBetween),d=(a-s[0]+(n.centeredSlides?e.minTranslate():0)-u)/(l.swiperSlideSize+n.spaceBetween),f=-(a-u),h=f+e.slidesSizesGrid[o];(f>=0&&f<e.size-1||h>1&&h<=e.size||f<=0&&h>=e.size)&&(e.visibleSlides.push(l),e.visibleSlidesIndexes.push(o),r.eq(o).addClass(n.slideVisibleClass)),l.progress=i?-c:c,l.originalProgress=i?-d:d}e.visibleSlides=an(e.visibleSlides)}function B5e(t){const e=this;if(typeof t>"u"){const u=e.rtlTranslate?-1:1;t=e&&e.translate&&e.translate*u||0}const n=e.params,r=e.maxTranslate()-e.minTranslate();let{progress:i,isBeginning:s,isEnd:a}=e;const o=s,l=a;r===0?(i=0,s=!0,a=!0):(i=(t-e.minTranslate())/r,s=i<=0,a=i>=1),Object.assign(e,{progress:i,isBeginning:s,isEnd:a}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&e.updateSlidesProgress(t),s&&!o&&e.emit("reachBeginning toEdge"),a&&!l&&e.emit("reachEnd toEdge"),(o&&!s||l&&!a)&&e.emit("fromEdge"),e.emit("progress",i)}function U5e(){const t=this,{slides:e,params:n,$wrapperEl:r,activeIndex:i,realIndex:s}=t,a=t.virtual&&n.virtual.enabled;e.removeClass(`${n.slideActiveClass} ${n.slideNextClass} ${n.slidePrevClass} ${n.slideDuplicateActiveClass} ${n.slideDuplicateNextClass} ${n.slideDuplicatePrevClass}`);let o;a?o=t.$wrapperEl.find(`.${n.slideClass}[data-swiper-slide-index="${i}"]`):o=e.eq(i),o.addClass(n.slideActiveClass),n.loop&&(o.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${s}"]`).addClass(n.slideDuplicateActiveClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${s}"]`).addClass(n.slideDuplicateActiveClass));let l=o.nextAll(`.${n.slideClass}`).eq(0).addClass(n.slideNextClass);n.loop&&l.length===0&&(l=e.eq(0),l.addClass(n.slideNextClass));let u=o.prevAll(`.${n.slideClass}`).eq(0).addClass(n.slidePrevClass);n.loop&&u.length===0&&(u=e.eq(-1),u.addClass(n.slidePrevClass)),n.loop&&(l.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass),u.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${u.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${u.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass)),t.emitSlidesClasses()}function V5e(t){const e=this,n=e.rtlTranslate?e.translate:-e.translate,{slidesGrid:r,snapGrid:i,params:s,activeIndex:a,realIndex:o,snapIndex:l}=e;let u=t,c;if(typeof u>"u"){for(let f=0;f<r.length;f+=1)typeof r[f+1]<"u"?n>=r[f]&&n<r[f+1]-(r[f+1]-r[f])/2?u=f:n>=r[f]&&n<r[f+1]&&(u=f+1):n>=r[f]&&(u=f);s.normalizeSlideIndex&&(u<0||typeof u>"u")&&(u=0)}if(i.indexOf(n)>=0)c=i.indexOf(n);else{const f=Math.min(s.slidesPerGroupSkip,u);c=f+Math.floor((u-f)/s.slidesPerGroup)}if(c>=i.length&&(c=i.length-1),u===a){c!==l&&(e.snapIndex=c,e.emit("snapIndexChange"));return}const d=parseInt(e.slides.eq(u).attr("data-swiper-slide-index")||u,10);Object.assign(e,{snapIndex:c,realIndex:d,previousIndex:a,activeIndex:u}),e.emit("activeIndexChange"),e.emit("snapIndexChange"),o!==d&&e.emit("realIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&e.emit("slideChange")}function H5e(t){const e=this,n=e.params,r=an(t).closest(`.${n.slideClass}`)[0];let i=!1,s;if(r){for(let a=0;a<e.slides.length;a+=1)if(e.slides[a]===r){i=!0,s=a;break}}if(r&&i)e.clickedSlide=r,e.virtual&&e.params.virtual.enabled?e.clickedIndex=parseInt(an(r).attr("data-swiper-slide-index"),10):e.clickedIndex=s;else{e.clickedSlide=void 0,e.clickedIndex=void 0;return}n.slideToClickedSlide&&e.clickedIndex!==void 0&&e.clickedIndex!==e.activeIndex&&e.slideToClickedSlide()}const j5e={updateSize:k5e,updateSlides:N5e,updateAutoHeight:M5e,updateSlidesOffset:F5e,updateSlidesProgress:$5e,updateProgress:B5e,updateSlidesClasses:U5e,updateActiveIndex:V5e,updateClickedSlide:H5e};function z5e(t=this.isHorizontal()?"x":"y"){const e=this,{params:n,rtlTranslate:r,translate:i,$wrapperEl:s}=e;if(n.virtualTranslate)return r?-i:i;if(n.cssMode)return i;let a=w5e(s[0],t);return r&&(a=-a),a||0}function G5e(t,e){const n=this,{rtlTranslate:r,params:i,$wrapperEl:s,wrapperEl:a,progress:o}=n;let l=0,u=0;const c=0;n.isHorizontal()?l=r?-t:t:u=t,i.roundLengths&&(l=Math.floor(l),u=Math.floor(u)),i.cssMode?a[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-u:i.virtualTranslate||s.transform(`translate3d(${l}px, ${u}px, ${c}px)`),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:u;let d;const f=n.maxTranslate()-n.minTranslate();f===0?d=0:d=(t-n.minTranslate())/f,d!==o&&n.updateProgress(t),n.emit("setTranslate",n.translate,e)}function W5e(){return-this.snapGrid[0]}function q5e(){return-this.snapGrid[this.snapGrid.length-1]}function K5e(t=0,e=this.params.speed,n=!0,r=!0,i){const s=this,{params:a,wrapperEl:o}=s;
80if(s.animating&&a.preventInteractionOnTransition)return!1;const l=s.minTranslate(),u=s.maxTranslate();let c;if(r&&t>l?c=l:r&&t<u?c=u:c=t,s.updateProgress(c),a.cssMode){const d=s.isHorizontal();if(e===0)o[d?"scrollLeft":"scrollTop"]=-c;else{if(!s.support.smoothScroll)return sle({swiper:s,targetPosition:-c,side:d?"left":"top"}),!0;o.scrollTo({[d?"left":"top"]:-c,behavior:"smooth"})}return!0}return e===0?(s.setTransition(0),s.setTranslate(c),n&&(s.emit("beforeTransitionStart",e,i),s.emit("transitionEnd"))):(s.setTransition(e),s.setTranslate(c),n&&(s.emit("beforeTransitionStart",e,i),s.emit("transitionStart")),s.animating||(s.animating=!0,s.onTranslateToWrapperTransitionEnd||(s.onTranslateToWrapperTransitionEnd=function(f){!s||s.destroyed||f.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onTranslateToWrapperTransitionEnd),s.onTranslateToWrapperTransitionEnd=null,delete s.onTranslateToWrapperTransitionEnd,n&&s.emit("transitionEnd"))}),s.$wrapperEl[0].addEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onTranslateToWrapperTransitionEnd))),!0}const Y5e={getTranslate:z5e,setTranslate:G5e,minTranslate:W5e,maxTranslate:q5e,translateTo:K5e};function Z5e(t,e){const n=this;n.params.cssMode||n.$wrapperEl.transition(t),n.emit("setTransition",t,e)}function ole({swiper:t,runCallbacks:e,direction:n,step:r}){const{activeIndex:i,previousIndex:s}=t;let a=n;if(a||(i>s?a="next":i<s?a="prev":a="reset"),t.emit(`transition${r}`),e&&i!==s){if(a==="reset"){t.emit(`slideResetTransition${r}`);return}t.emit(`slideChangeTransition${r}`),a==="next"?t.emit(`slideNextTransition${r}`):t.emit(`slidePrevTransition${r}`)}}function Q5e(t=!0,e){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),ole({swiper:n,runCallbacks:t,direction:e,step:"Start"}))}function X5e(t=!0,e){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),ole({swiper:n,runCallbacks:t,direction:e,step:"End"}))}const J5e={setTransition:Z5e,transitionStart:Q5e,transitionEnd:X5e};function e$e(t=0,e=this.params.speed,n=!0,r,i){if(typeof t!="number"&&typeof t!="string")throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof t}] given.`);if(typeof t=="string"){const w=parseInt(t,10);if(!isFinite(w))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);t=w}const s=this;let a=t;a<0&&(a=0);const{params:o,snapGrid:l,slidesGrid:u,previousIndex:c,activeIndex:d,rtlTranslate:f,wrapperEl:h,enabled:g}=s;if(s.animating&&o.preventInteractionOnTransition||!g&&!r&&!i)return!1;const v=Math.min(s.params.slidesPerGroupSkip,a);let b=v+Math.floor((a-v)/s.params.slidesPerGroup);b>=l.length&&(b=l.length-1);const S=-l[b];if(o.normalizeSlideIndex)for(let w=0;w<u.length;w+=1){const x=-Math.floor(S*100),P=Math.floor(u[w]*100),N=Math.floor(u[w+1]*100);typeof u[w+1]<"u"?x>=P&&x<N-(N-P)/2?a=w:x>=P&&x<N&&(a=w+1):x>=P&&(a=w)}if(s.initialized&&a!==d&&(!s.allowSlideNext&&S<s.translate&&S<s.minTranslate()||!s.allowSlidePrev&&S>s.translate&&S>s.maxTranslate()&&(d||0)!==a))return!1;a!==(c||0)&&n&&s.emit("beforeSlideChangeStart"),s.updateProgress(S);let A;if(a>d?A="next":a<d?A="prev":A="reset",f&&-S===s.translate||!f&&S===s.translate)return s.updateActiveIndex(a),o.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),o.effect!=="slide"&&s.setTranslate(S),A!=="reset"&&(s.transitionStart(n,A),s.transitionEnd(n,A)),!1;if(o.cssMode){const w=s.isHorizontal(),x=f?S:-S;if(e===0){const P=s.virtual&&s.params.virtual.enabled;P&&(s.wrapperEl.style.scrollSnapType="none",s._immediateVirtual=!0),h[w?"scrollLeft":"scrollTop"]=x,P&&requestAnimationFrame(()=>{s.wrapperEl.style.scrollSnapType="",s._swiperImmediateVirtual=!1})}else{if(!s.support.smoothScroll)return sle({swiper:s,targetPosition:x,side:w?"left":"top"}),!0;h.scrollTo({[w?"left":"top"]:x,behavior:"smooth"})}return!0}return s.setTransition(e),s.setTranslate(S),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",e,r),s.transitionStart(n,A),e===0?s.transitionEnd(n,A):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(x){!s||s.destroyed||x.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(n,A))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd)),!0}function t$e(t=0,e=this.params.speed,n=!0,r){if(typeof t=="string"){const a=parseInt(t,10);if(!isFinite(a))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);t=a}const i=this;let s=t;return i.params.loop&&(s+=i.loopedSlides),i.slideTo(s,e,n,r)}function n$e(t=this.params.speed,e=!0,n){const r=this,{animating:i,enabled:s,params:a}=r;if(!s)return r;let o=a.slidesPerGroup;a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto&&(o=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<a.slidesPerGroupSkip?1:o;if(a.loop){if(i&&a.loopPreventsSlide)return!1;
80r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return a.rewind&&r.isEnd?r.slideTo(0,t,e,n):r.slideTo(r.activeIndex+l,t,e,n)}function r$e(t=this.params.speed,e=!0,n){const r=this,{params:i,animating:s,snapGrid:a,slidesGrid:o,rtlTranslate:l,enabled:u}=r;if(!u)return r;if(i.loop){if(s&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}const c=l?r.translate:-r.translate;function d(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const f=d(c),h=a.map(b=>d(b));let g=a[h.indexOf(f)-1];if(typeof g>"u"&&i.cssMode){let b;a.forEach((S,A)=>{f>=S&&(b=A)}),typeof b<"u"&&(g=a[b>0?b-1:b])}let v=0;if(typeof g<"u"&&(v=o.indexOf(g),v<0&&(v=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(v=v-r.slidesPerViewDynamic("previous",!0)+1,v=Math.max(v,0))),i.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,t,e,n)}return r.slideTo(v,t,e,n)}function i$e(t=this.params.speed,e=!0,n){const r=this;return r.slideTo(r.activeIndex,t,e,n)}function s$e(t=this.params.speed,e=!0,n,r=.5){const i=this;let s=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,s),o=a+Math.floor((s-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[o]){const u=i.snapGrid[o],c=i.snapGrid[o+1];l-u>(c-u)*r&&(s+=i.params.slidesPerGroup)}else{const u=i.snapGrid[o-1],c=i.snapGrid[o];l-u<=(c-u)*r&&(s-=i.params.slidesPerGroup)}return s=Math.max(s,0),s=Math.min(s,i.slidesGrid.length-1),i.slideTo(s,t,e,n)}function a$e(){const t=this,{params:e,$wrapperEl:n}=t,r=e.slidesPerView==="auto"?t.slidesPerViewDynamic():e.slidesPerView;let i=t.clickedIndex,s;if(e.loop){if(t.animating)return;s=parseInt(an(t.clickedSlide).attr("data-swiper-slide-index"),10),e.centeredSlides?i<t.loopedSlides-r/2||i>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),i=n.children(`.${e.slideClass}[data-swiper-slide-index="${s}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),H_(()=>{t.slideTo(i)})):t.slideTo(i):i>t.slides.length-r?(t.loopFix(),i=n.children(`.${e.slideClass}[data-swiper-slide-index="${s}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),H_(()=>{t.slideTo(i)})):t.slideTo(i)}else t.slideTo(i)}const o$e={slideTo:e$e,slideToLoop:t$e,slideNext:n$e,slidePrev:r$e,slideReset:i$e,slideToClosest:s$e,slideToClickedSlide:a$e};function l$e(){const t=this,e=Wu(),{params:n,$wrapperEl:r}=t,i=r.children().length>0?an(r.children()[0].parentNode):r;i.children(`.${n.slideClass}.${n.slideDuplicateClass}`).remove();let s=i.children(`.${n.slideClass}`);if(n.loopFillGroupWithBlank){const l=n.slidesPerGroup-s.length%n.slidesPerGroup;if(l!==n.slidesPerGroup){for(let u=0;u<l;u+=1){const c=an(e.createElement("div")).addClass(`${n.slideClass} ${n.slideBlankClass}`);i.append(c)}s=i.children(`.${n.slideClass}`)}}n.slidesPerView==="auto"&&!n.loopedSlides&&(n.loopedSlides=s.length),t.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),t.loopedSlides+=n.loopAdditionalSlides,t.loopedSlides>s.length&&t.params.loopedSlidesLimit&&(t.loopedSlides=s.length);const a=[],o=[];s.each((l,u)=>{an(l).attr("data-swiper-slide-index",u)});for(let l=0;l<t.loopedSlides;l+=1){const u=l-Math.floor(l/s.length)*s.length;o.push(s.eq(u)[0]),a.unshift(s.eq(s.length-u-1)[0])}for(let l=0;l<o.length;l+=1)i.append(an(o[l].cloneNode(!0)).addClass(n.slideDuplicateClass));for(let l=a.length-1;l>=0;l-=1)i.prepend(an(a[l].cloneNode(!0)).addClass(n.slideDuplicateClass))}function u$e(){const t=this;t.emit("beforeLoopFix");const{activeIndex:e,slides:n,loopedSlides:r,allowSlidePrev:i,allowSlideNext:s,snapGrid:a,rtlTranslate:o}=t;let l;t.allowSlidePrev=!0,t.allowSlideNext=!0;const c=-a[e]-t.getTranslate();e<r?(l=n.length-r*3+e,l+=r,t.slideTo(l,0,!1,!0)&&c!==0&&t.setTranslate((o?-t.translate:t.translate)-c)):e>=n.length-r&&(l=-n.length+e+r,l+=r,t.slideTo(l,0,!1,!0)&&c!==0&&t.setTranslate((o?-t.translate:t.translate)-c)),t.allowSlidePrev=i,t.allowSlideNext=s,t.emit("loopFix")}function c$e(){const t=this,{$wrapperEl:e,params:n,slides:r}=t;e.children(`.${n.slideClass}.${n.slideDuplicateClass},.${n.slideClass}.${n.slideBlankClass}`).remove(),r.removeAttr("data-swiper-slide-index")}const d$e={loopCreate:l$e,loopFix:u$e,loopDestroy:c$e};function f$e(t){const e=this;if(e.support.touch||!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const n=e.params.touchEventsTarget==="container"?e.el:e.wrapperEl;n.style.cursor="move",n.style.cursor=t?"grabbing":"grab"}function h$e(){const t=this;t.support.touch||t.params.watchOverflow&&t.isLocked||t.params.cssMode||(t[t.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="")}const p$e={setGrabCursor:f$e,unsetGrabCursor:h$e};function g$e(t,e=this){function n(r){if(!r||r===Wu()||r===vo())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(t);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(e)}function m$e(t){const e=this,n=Wu(),r=vo(),i=e.touchEventsData,{params:s,touches:a,enabled:o}=e;if(!o||e.animating&&s.preventInteractionOnTransition)return;!e.animating&&s.cssMode&&s.loop&&e.loopFix();let l=t;l.originalEvent&&(l=l.originalEvent);let u=an(l.target);if(s.touchEventsTarget==="wrapper"&&!u.closest(e.wrapperEl).length||(i.isTouchEvent=l.type==="touchstart",!i.isTouchEvent&&"which"in l&&l.which===3)||!i.isTouchEvent&&"button"in l&&l.button>0||i.isTouched&&i.isMoved)return;const c=!!s.noSwipingClass&&s.noSwipingClass!=="",d=t.composedPath?t.composedPath():t.path;c&&l.target&&l.target.shadowRoot&&d&&(u=an(d[0]));const f=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,h=!!(l.target&&l.target.shadowRoot);if(s.noSwiping&&(h?g$e(f,u[0]):u.closest(f)[0])){e.allowClick=!0;return}if(s.swipeHandler&&!u.closest(s.swipeHandler)[0])return;a.currentX=l.type==="touchstart"?l.targetTouches[0].pageX:l.pageX,a.currentY=l.type==="touchstart"?l.targetTouches[0].pageY:l.pageY;const g=a.currentX,v=a.currentY,b=s.edgeSwipeDetection||s.iOSEdgeSwipeDetection,S=s.edgeSwipeThreshold||s.iOSEdgeSwipeThreshold;if(b&&(g<=S||g>=r.innerWidth-S))if(b==="prevent")t.preventDefault();else return;if(Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=g,a.startY=v,i.touchStartTime=Ic(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,s.threshold>0&&(i.allowThresholdMove=!1),l.type!=="touchstart"){let A=!0;u.is(i.focusableElements)&&(A=!1,u[0].nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&an(n.activeElement).is(i.focusableElements)&&n.activeElement!==u[0]&&n.activeElement.blur();const w=A&&e.allowTouchMove&&s.touchStartPreventDefault;(s.touchStartForcePreventDefault||w)&&!u[0].isContentEditable&&l.preventDefault()}e.params.freeMode&&e.params.freeMode.enabled&&e.freeMode&&e.animating&&!s.cssMode&&e.freeMode.onTouchStart(),e.emit("touchStart",l)}function v$e(t){const e=Wu(),n=this,r=n.touchEventsData,{params:i,touches:s,rtlTranslate:a,enabled:o}=n;if(!o)return;let l=t;if(l.originalEvent&&(l=l.originalEvent),!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}if(r.isTouchEvent&&l.type!=="touchmove")return;const u=l.type==="touchmove"&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),c=l.type==="touchmove"?u.pageX:l.pageX,d=l.type==="touchmove"?u.pageY:l.pageY;if(l.preventedByNestedSwiper){s.startX=c,s.startY=d;return}if(!n.allowTouchMove){an(l.target).is(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(s,{startX:c,startY:d,currentX:c,currentY:d}),r.touchStartTime=Ic());return}if(r.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(d<s.startY&&n.translate<=n.maxTranslate()||d>s.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(c<s.startX&&n.translate<=n.maxTranslate()||c>s.startX&&n.translate>=n.minTranslate())return}if(r.isTouchEvent&&e.activeElement&&l.target===e.activeElement&&an(l.target).is(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}if(r.allowTouchCallbacks&&n.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;s.currentX=c,s.currentY=d;const f=s.currentX-s.startX,h=s.currentY-s.startY;if(n.params.threshold&&Math.sqrt(f**2+h**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let S;n.isHorizontal()&&s.currentY===s.startY||n.isVertical()&&s.currentX===s.startX?r.isScrolling=!1:f*f+h*h>=25&&(S=Math.atan2(Math.abs(h),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?S>i.touchAngle:90-S>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(s.currentX!==s.startX||s.currentY!==s.startY)&&(r.startMoving=!0),r.isScrolling){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation(),r.isMoved||(i.loop&&!i.cssMode&&n.loopFix(),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),r.allowMomentumBounce
80=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)),n.emit("sliderMove",l),r.isMoved=!0;let g=n.isHorizontal()?f:h;s.diff=g,g*=i.touchRatio,a&&(g=-g),n.swipeDirection=g>0?"prev":"next",r.currentTranslate=g+r.startTranslate;let v=!0,b=i.resistanceRatio;if(i.touchReleaseOnEdges&&(b=0),g>0&&r.currentTranslate>n.minTranslate()?(v=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+g)**b)):g<0&&r.currentTranslate<n.maxTranslate()&&(v=!1,i.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-g)**b)),v&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(g)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,r.currentTranslate=r.startTranslate,s.diff=n.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),n.params.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function y$e(t){const e=this,n=e.touchEventsData,{params:r,touches:i,rtlTranslate:s,slidesGrid:a,enabled:o}=e;if(!o)return;let l=t;if(l.originalEvent&&(l=l.originalEvent),n.allowTouchCallbacks&&e.emit("touchEnd",l),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&r.grabCursor&&e.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}r.grabCursor&&n.isMoved&&n.isTouched&&(e.allowSlideNext===!0||e.allowSlidePrev===!0)&&e.setGrabCursor(!1);const u=Ic(),c=u-n.touchStartTime;if(e.allowClick){const A=l.path||l.composedPath&&l.composedPath();e.updateClickedSlide(A&&A[0]||l.target),e.emit("tap click",l),c<300&&u-n.lastClickTime<300&&e.emit("doubleTap doubleClick",l)}if(n.lastClickTime=Ic(),H_(()=>{e.destroyed||(e.allowClick=!0)}),!n.isTouched||!n.isMoved||!e.swipeDirection||i.diff===0||n.currentTranslate===n.startTranslate){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let d;if(r.followFinger?d=s?e.translate:-e.translate:d=-n.currentTranslate,r.cssMode)return;if(e.params.freeMode&&r.freeMode.enabled){e.freeMode.onTouchEnd({currentPos:d});return}let f=0,h=e.slidesSizesGrid[0];for(let A=0;A<a.length;A+=A<r.slidesPerGroupSkip?1:r.slidesPerGroup){const w=A<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;typeof a[A+w]<"u"?d>=a[A]&&d<a[A+w]&&(f=A,h=a[A+w]-a[A]):d>=a[A]&&(f=A,h=a[a.length-1]-a[a.length-2])}let g=null,v=null;r.rewind&&(e.isBeginning?v=e.params.virtual&&e.params.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(g=0));const b=(d-a[f])/h,S=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(b>=r.longSwipesRatio?e.slideTo(r.rewind&&e.isEnd?g:f+S):e.slideTo(f)),e.swipeDirection==="prev"&&(b>1-r.longSwipesRatio?e.slideTo(f+S):v!==null&&b<0&&Math.abs(b)>r.longSwipesRatio?e.slideTo(v):e.slideTo(f))}else{if(!r.shortSwipes){e.slideTo(e.activeIndex);return}e.navigation&&(l.target===e.navigation.nextEl||l.target===e.navigation.prevEl)?l.target===e.navigation.nextEl?e.slideTo(f+S):e.slideTo(f):(e.swipeDirection==="next"&&e.slideTo(g!==null?g:f+S),e.swipeDirection==="prev"&&e.slideTo(v!==null?v:f))}}function SK(){const t=this,{params:e,el:n}=t;if(n&&n.offsetWidth===0)return;e.breakpoints&&t.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:s}=t;t.allowSlideNext=!0,t.allowSlidePrev=!0,t.updateSize(),t.updateSlides(),t.updateSlidesClasses(),(e.slidesPerView==="auto"||e.slidesPerView>1)&&t.isEnd&&!t.isBeginning&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0),t.autoplay&&t.autoplay.running&&t.autoplay.paused&&t.autoplay.run(),t.allowSlidePrev=i,t.allowSlideNext=r,t.params.watchOverflow&&s!==t.snapGrid&&t.checkOverflow()}function b$e(t){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&t.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(t.stopPropagation(),t.stopImmediatePropagation())))}function S$e(){const t=this,{wrapperEl:e,rtlTranslate:n,enabled:r}=t;if(!r)return;t.previousTranslate=t.translate,t.isHorizontal()?t.translate=-e.scrollLeft:t.translate=-e.scrollTop,t.translate===0&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();let i;const s=t.maxTranslate()-t.minTranslate();s===0?i=0:i=(t.translate-t.minTranslate())/s,i!==t.progress&&t.updateProgress(n?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}let EK=!1;function E$e(){}const lle=(t,e)=>{const n=Wu(),{params:r,touchEvents:i,el:s,wrapperEl:a,device:o,support:l}=t,u=!!r.nested,c=e==="on"?"addEventListener":"removeEventListener",d=e;if(!l.touch)s[c](i.start,t.onTouchStart,!1),n[c](i.move,t.onTouchMove,u),n[c](i.end,t.onTouchEnd,!1);else{const f=i.start==="touchstart"&&l.passiveListener&&r.passiveListeners?{passive:!0,capture:!1}:!1;s[c](i.start,t.onTouchStart,f),s[c](i.move,t.onTouchMove,l.passiveListener?{passive:!1,capture:u}:u),s[c](i.end,t.onTouchEnd,f),i.cancel&&s[c](i.cancel,t.onTouchEnd,f)}(r.preventClicks||r.preventClicksPropagation)&&s[c]("click",t.onClick,!0),r.cssMode&&a[c]("scroll",t.onScroll),r.updateOnWindowResize?t[d](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",SK,!0):t[d]("observerUpdate",SK,!0)};function T$e(){const t=this,e=Wu(),{params:n,support:r}=t;t.onTouchStart=m$e.bind(t),t.onTouchMove=v$e.bind(t),t.onTouchEnd=y$e.bind(t),n.cssMode&&(t.onScroll=S$e.bind(t)),t.onClick=b$e.bind(t),r.touch&&!EK&&(e.addEventListener("touchstart",E$e),EK=!0),lle(t,"on")}function A$e(){lle(this,"off")}const w$e={attachEvents:T$e,detachEvents:A$e},TK=(t,e)=>t.grid&&e.grid&&e.grid.rows>1;function _$e(){const t=this,{activeIndex:e,initialized:n,loopedSlides:r=0,params:i,$el:s}=t,a=i.breakpoints;if(!a||a&&Object.keys(a).length===0)return;
80const o=t.getBreakpoint(a,t.params.breakpointsBase,t.el);if(!o||t.currentBreakpoint===o)return;const u=(o in a?a[o]:void 0)||t.originalParams,c=TK(t,i),d=TK(t,u),f=i.enabled;c&&!d?(s.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`),t.emitContainerClasses()):!c&&d&&(s.addClass(`${i.containerModifierClass}grid`),(u.grid.fill&&u.grid.fill==="column"||!u.grid.fill&&i.grid.fill==="column")&&s.addClass(`${i.containerModifierClass}grid-column`),t.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(b=>{const S=i[b]&&i[b].enabled,A=u[b]&&u[b].enabled;S&&!A&&t[b].disable(),!S&&A&&t[b].enable()});const h=u.direction&&u.direction!==i.direction,g=i.loop&&(u.slidesPerView!==i.slidesPerView||h);h&&n&&t.changeDirection(),gc(t.params,u);const v=t.params.enabled;Object.assign(t,{allowTouchMove:t.params.allowTouchMove,allowSlideNext:t.params.allowSlideNext,allowSlidePrev:t.params.allowSlidePrev}),f&&!v?t.disable():!f&&v&&t.enable(),t.currentBreakpoint=o,t.emit("_beforeBreakpoint",u),g&&n&&(t.loopDestroy(),t.loopCreate(),t.updateSlides(),t.slideTo(e-r+t.loopedSlides,0,!1)),t.emit("breakpoint",u)}function C$e(t,e="window",n){if(!t||e==="container"&&!n)return;let r=!1;const i=vo(),s=e==="window"?i.innerHeight:n.clientHeight,a=Object.keys(t).map(o=>{if(typeof o=="string"&&o.indexOf("@")===0){const l=parseFloat(o.substr(1));return{value:s*l,point:o}}return{value:o,point:o}});a.sort((o,l)=>
80parseInt(o.value,10)-parseInt(l.value,10));for(let o=0;o<a.length;o+=1){const{point:l,value:u}=a[o];e==="window"?i.matchMedia(`(min-width: ${u}px)`).matches&&(r=l):u<=n.clientWidth&&(r=l)}return r||"max"}const x$e={setBreakpoint:_$e,getBreakpoint:C$e};function I$e(t,e){const n=[];return t.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(e+i)}):typeof r=="string"&&n.push(e+r)}),n}function O$e(){const t=this,{classNames:e,params:n,rtl:r,$el:i,device:s,support:a}=t,o=I$e(["initialized",n.direction,{"pointer-events":!a.touch},{"free-mode":t.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:s.android},{ios:s.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);e.push(...o),i.addClass([...e].join(" ")),t.emitContainerClasses()}function P$e(){const t=this,{$el:e,classNames:n}=t;e.removeClass(n.join(" ")),t.emitContainerClasses()}const R$e={addClasses:O$e,removeClasses:P$e};function L$e(t,e,n,r,i,s){const a=vo();let o;function l(){s&&s()}!an(t).parent("picture")[0]&&(!t.complete||!i)&&e?(o=new a.Image,o.onload=l,o.onerror=l,r&&(o.sizes=r),n&&(o.srcset=n),e&&(o.src=e)):l()}function D$e(){const t=this;t.imagesToLoad=t.$el.find("img");function e(){typeof t>"u"||t===null||!t||t.destroyed||(t.imagesLoaded!==void 0&&(t.imagesLoaded+=1),t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("imagesReady")))}for(let n=0;n<t.imagesToLoad.length;n+=1){const r=t.imagesToLoad[n];t.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,e)}}const k$e={loadImage:L$e,preloadImages:D$e};function N$e(){const t=this,{isLocked:e,params:n}=t,{slidesOffsetBefore:r}=n;if(r){const i=t.slides.length-1,s=t.slidesGrid[i]+t.slidesSizesGrid[i]+r*2;t.isLocked=t.size>s}else t.isLocked=t.snapGrid.length===1;n.allowSlideNext===!0&&(t.allowSlideNext=!t.isLocked),n.allowSlidePrev===!0&&(t.allowSlidePrev=!t.isLocked),e&&e!==t.isLocked&&(t.isEnd=!1),e!==t.isLocked&&t.emit(t.isLocked?"lock":"unlock")}const M$e={checkOverflow:N$e},AK={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopedSlidesLimit:!0,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function F$e(t,e){return function(r={}){const i=Object.keys(r)[0],s=r[i];if(typeof s!="object"||s===null){gc(e,r);return}if(["navigation","pagination","scrollbar"].indexOf(i)>=0&&t[i]===!0&&(t[i]={auto:!0}),!(i in t&&"enabled"in s)){gc(e,r);return}t[i]===!0&&(t[i]={enabled:!0}),typeof t[i]=="object"&&!("enabled"in t[i])&&(t[i].enabled=!0),t[i]||(t[i]={enabled:!1}),gc(e,r)}}const H3={eventsEmitter:D5e,update:j5e,translate:Y5e,transition:J5e,slide:o$e,loop:d$e,grabCursor:p$e,events:w$e,breakpoints:x$e,checkOverflow:M$e,classes:R$e,images:k$e},j3={};let V0=class jp{constructor(...e){let n,r;if(e.length===1&&e[0].constructor&&Object.prototype.toString.call(e[0]).slice(8,-1)==="Object"?r=e[0]:[n,r]=e,r||(r={}),r=gc({},r),n&&!r.el&&(r.el=n),r.el&&an(r.el).length>1){const o=[];return an(r.el).each(l=>{const u=gc({},r,{el:l});o.push(new jp(u))}),o}const i=this;i.__swiper__=!0,i.support=ale(),i.device=I5e({userAgent:r.userAgent}),i.browser=P5e(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};
80i.modules.forEach(o=>{o({swiper:i,extendParams:F$e(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const a=gc({},AK,s);return i.params=gc({},a,j3,r),i.originalParams=gc({},i.params),i.passedParams=gc({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(o=>{i.on(o,i.params.on[o])}),i.params&&i.params.onAny&&i.onAny(i.params.onAny),i.$=an,Object.assign(i,{enabled:i.params.enabled,el:n,classNames:[],slides:an(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return i.params.direction==="horizontal"},isVertical(){return i.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEvents:function(){const l=["touchstart","touchmove","touchend","touchcancel"],u=["pointerdown","pointermove","pointerup"];return i.touchEventsTouch={start:l[0],move:l[1],end:l[2],cancel:l[3]},i.touchEventsDesktop={start:u[0],move:u[1],end:u[2]},i.support.touch||!i.params.simulateTouch?i.touchEventsTouch:i.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:i.params.focusableElements,lastClickTime:Ic(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,n){const r=this;e=Math.min(Math.max(e,0),1);const i=r.minTranslate(),a=(r.maxTranslate()-i)*e+i;r.translateTo(a,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const n=e.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(e.params.containerModifierClass)===0);e.emit("_containerClasses",n.join(" "))}getSlideClasses(e){const n=this;return n.destroyed?"":e.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const n=[];e.slides.each(r=>{const i=e.getSlideClasses(r);n.push({slideEl:r,classNames:i}),e.emit("_slideClass",r,i)}),e.emit("_slideClasses",n)}slidesPerViewDynamic(e="current",n=!1){const r=this,{params:i,slides:s,slidesGrid:a,slidesSizesGrid:o,size:l,activeIndex:u}=r;let c=1;if(i.centeredSlides){let d=s[u].swiperSlideSize,f;for(let h=u+1;h<s.length;h+=1)s[h]&&!f&&(d+=s[h].swiperSlideSize,c+=1,d>l&&(f=!0));for(let h=u-1;h>=0;h-=1)s[h]&&!f&&(d+=s[h].swiperSlideSize,c+=1,d>l&&(f=!0))}else if(e==="current")for(let d=u+1;d<s.length;d+=1)(n?a[d]+o[d]-a[u]<l:a[d]-a[u]<l)&&(c+=1);else for(let d=u-1;d>=0;d-=1)a[u]-a[d]<l&&(c+=1);return c}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:n,params:r}=e;r.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function i(){const a=e.rtlTranslate?e.translate*-1:e.translate,o=Math.min(Math.max(a,e.maxTranslate()),e.minTranslate());e.setTranslate(o),e.updateActiveIndex(),e.updateSlidesClasses()}let s;e.params.freeMode&&e.params.freeMode.enabled?(i(),e.params.autoHeight&&e.updateAutoHeight()):((e.params.slidesPerView==="auto"||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?s=e.slideTo(e.slides.length-1,0,!1,!0):s=e.slideTo(e.activeIndex,0,!1,!0),s||i()),r.watchOverflow&&n!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,n=!0){const r=this,i=r.params.direction;return e||(e=i==="horizontal"?"vertical":"horizontal"),e===i||e!=="horizontal"&&e!=="vertical"||(r.$el.removeClass(`${r.params.containerModifierClass}${i}`).addClass(`${r.params.containerModifierClass}${e}`),r.emitContainerClasses(),r.params.direction=e,r.slides.each(s=>{e==="vertical"?s.style.width="":s.style.height=""}
80),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(e){const n=this;n.rtl&&e==="rtl"||!n.rtl&&e==="ltr"||(n.rtl=e==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.$el.addClass(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.$el.removeClass(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(e){const n=this;if(n.mounted)return!0;const r=an(e||n.params.el);if(e=r[0],!e)return!1;e.swiper=n;const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const o=an(e.shadowRoot.querySelector(i()));return o.children=l=>r.children(l),o}return r.children?r.children(i()):an(r).children(i())})();if(a.length===0&&n.params.createElements){const l=Wu().createElement("div");a=an(l),l.className=n.params.wrapperClass,r.append(l),r.children(`.${n.params.slideClass}`).each(u=>{a.append(u)})}return Object.assign(n,{$el:r,el:e,$wrapperEl:a,wrapperEl:a[0],mounted:!0,rtl:e.dir.toLowerCase()==="rtl"||r.css("direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(e.dir.toLowerCase()==="rtl"||r.css("direction")==="rtl"),wrongRTL:a.css("display")==="-webkit-box"}),!0}init(e){const n=this;return n.initialized||n.mount(e)===!1||(n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.params.loop&&n.loopCreate(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.preloadImages&&n.preloadImages(),n.params.loop?n.slideTo(n.params.initialSlide+n.loopedSlides,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.attachEvents(),n.initialized=!0,n.emit("init"),n.emit("afterInit")),n}destroy(e=!0,n=!0){const r=this,{params:i,$el:s,$wrapperEl:a,slides:o}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),s.removeAttr("style"),a.removeAttr("style"),o&&o.length&&o.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),e!==!1&&(r.$el[0].swiper=null,T5e(r)),r.destroyed=!0),null}static extendDefaults(e){gc(j3,e)}static get extendedDefaults(){return j3}static get defaults(){return AK}static installModule(e){jp.prototype.__modules__||(jp.prototype.__modules__=[]);const n=jp.prototype.__modules__;typeof e=="function"&&n.indexOf(e)<0&&n.push(e)}static use(e){return Array.isArray(e)?(e.forEach(n=>jp.installModule(n)),jp):(jp.installModule(e),jp)}};Object.keys(H3).forEach(t=>{Object.keys(H3[t]).forEach(e=>{V0.prototype[e]=H3[t][e]})});V0.use([R5e,L5e]);function $$e({swiper:t,extendParams:e,on:n,emit:r}){e({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let i;t.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};function s(d,f){const h=t.params.virtual;if(h.cache&&t.virtual.cache[f])return t.virtual.cache[f];const g=h.renderSlide?an(h.renderSlide.call(t,d,f)):an(`<div class="${t.params.slideClass}" data-swiper-slide-index="${f}">${d}</div>`);return g.attr("data-swiper-slide-index")||g.attr("data-swiper-slide-index",f),h.cache&&(t.virtual.cache[f]=g),g}function a(d){const{slidesPerView:f,slidesPerGroup:h,centeredSlides:g}=t.params,{addSlidesBefore:v,addSlidesAfter:b}=t.params.virtual,{from:S,to:A,slides:w,slidesGrid:x,offset:P}=t.virtual;t.params.cssMode||t.updateActiveIndex();const N=t.activeIndex||0;let k;t.rtlTranslate?k="right":k=t.isHorizontal()?"left":"top";let U,H;g?(U=Math.floor(f/2)+h+b,H=Math.floor(f/2)+h+v):(U=f+(h-1)+b,H=h+v);const B=Math.max((N||0)-H,0),q=Math.min((N||0)+U,w.length-1),Z=(t.slidesGrid[B]||0)-(t.slidesGrid[0]||0);Object.assign(t.virtual,{from:B,to:q,offset:Z,slidesGrid:t.slidesGrid});function C(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load(),r("virtualUpdate")}if(S===B&&A===q&&!d){t.slidesGrid!==x&&Z!==P&&t.slides.css(k,`${Z}px`),t.updateProgress(),r("virtualUpdate");return}if(t.params.virtual.renderExternal){t.params.virtual.renderExternal.call(t,{offset:Z,from:B,to:q,slides:function(){const X=[];for(let G=B;G<=q;G+=1)X.push(w[G]);return X}()}),t.params.virtual.renderExternalUpdate?C():r("virtualUpdate");return}const L=[],V=[];if(d)t.$wrapperEl.find(`.${t.params.slideClass}`).remove();else for(let j=S;j<=A;j+=1)(j<B||j>q)&&t.$wrapperEl.find(`.${t.params.slideClass}[data-swiper-slide-index="${j}"]`).remove();for(let j=0;j<w.length;j+=1)j>=B&&j<=q&&(typeof A>"u"||d?V.push(j):(j>A&&V.push(j),j<S&&L.push(j)));
80V.forEach(j=>{t.$wrapperEl.append(s(w[j],j))}),L.sort((j,X)=>X-j).forEach(j=>{t.$wrapperEl.prepend(s(w[j],j))}),t.$wrapperEl.children(".swiper-slide").css(k,`${Z}px`),C()}function o(d){if(typeof d=="object"&&"length"in d)for(let f=0;f<d.length;f+=1)d[f]&&t.virtual.slides.push(d[f]);else t.virtual.slides.push(d);a(!0)}function l(d){const f=t.activeIndex;let h=f+1,g=1;if(Array.isArray(d)){for(let v=0;v<d.length;v+=1)d[v]&&t.virtual.slides.unshift(d[v]);h=f+d.length,g=d.length}else t.virtual.slides.unshift(d);if(t.params.virtual.cache){const v=t.virtual.cache,b={};Object.keys(v).forEach(S=>{const A=v[S],w=A.attr("data-swiper-slide-index");w&&A.attr("data-swiper-slide-index",parseInt(w,10)+g),b[parseInt(S,10)+g]=A}),t.virtual.cache=b}a(!0),t.slideTo(h,0)}function u(d){if(typeof d>"u"||d===null)return;let f=t.activeIndex;if(Array.isArray(d))for(let h=d.length-1;h>=0;h-=1)t.virtual.slides.splice(d[h],1),t.params.virtual.cache&&delete t.virtual.cache[d[h]],d[h]<f&&(f-=1),f=Math.max(f,0);else t.virtual.slides.splice(d,1),t.params.virtual.cache&&delete t.virtual.cache[d],d<f&&(f-=1),f=Math.max(f,0);a(!0),t.slideTo(f,0)}function c(){t.virtual.slides=[],t.params.virtual.cache&&(t.virtual.cache={}),a(!0),t.slideTo(0,0)}n("beforeInit",()=>{t.params.virtual.enabled&&(t.virtual.slides=t.params.virtual.slides,t.classNames.push(`${t.params.containerModifierClass}virtual`),t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0,t.params.initialSlide||a())}),n("setTranslate",()=>{t.params.virtual.enabled&&(t.params.cssMode&&!t._immediateVirtual?(clearTimeout(i),i=setTimeout(()=>{a()},100)):a())}),n("init update resize",()=>{t.params.virtual.enabled&&t.params.cssMode&&XA(t.wrapperEl,"--swiper-virtual-size",`${t.virtualSize}px`)}),Object.assign(t.virtual,{appendSlide:o,prependSlide:l,removeSlide:u,removeAllSlides:c,update:a})}function B$e({swiper:t,extendParams:e,on:n,emit:r}){const i=vo();e({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),t.mousewheel={enabled:!1};let s,a=Ic(),o;const l=[];function u(A){let N=0,k=0,U=0,H=0;return"detail"in A&&(k=A.detail),"wheelDelta"in A&&(k=-A.wheelDelta/120),"wheelDeltaY"in A&&(k=-A.wheelDeltaY/120),"wheelDeltaX"in A&&(N=-A.wheelDeltaX/120),"axis"in A&&A.axis===A.HORIZONTAL_AXIS&&(N=k,k=0),U=N*10,H=k*10,"deltaY"in A&&(H=A.deltaY),"deltaX"in A&&(U=A.deltaX),A.shiftKey&&!U&&(U=H,H=0),(U||H)&&A.deltaMode&&(A.deltaMode===1?(U*=40,H*=40):(U*=800,H*=800)),U&&!N&&(N=U<1?-1:1),H&&!k&&(k=H<1?-1:1),{spinX:N,spinY:k,pixelX:U,pixelY:H}}function c(){t.enabled&&(t.mouseEntered=!0)}function d(){t.enabled&&(t.mouseEntered=!1)}function f(A){return t.params.mousewheel.thresholdDelta&&A.delta<t.params.mousewheel.thresholdDelta||t.params.mousewheel.thresholdTime&&Ic()-a<t.params.mousewheel.thresholdTime?!1:A.delta>=6&&Ic()-a<60?!0:(A.direction<0?(!t.isEnd||t.params.loop)&&!t.animating&&(t.slideNext(),r("scroll",A.raw)):(!t.isBeginning||t.params.loop)&&!t.animating&&(t.slidePrev(),r("scroll",A.raw)),a=new i.Date().getTime(),!1)}function h(A){const w=t.params.mousewheel;if(A.direction<0){if(t.isEnd&&!t.params.loop&&w.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&w.releaseOnEdges)return!0;return!1}function g(A){let w=A,x=!0;if(!t.enabled)return;const P=t.params.mousewheel;t.params.cssMode&&w.preventDefault();let N=t.$el;if(t.params.mousewheel.eventsTarget!=="container"&&(N=an(t.params.mousewheel.eventsTarget)),!t.mouseEntered&&!N[0].contains(w.target)&&!P.releaseOnEdges)return!0;w.originalEvent&&(w=w.originalEvent);let k=0;const U=t.rtlTranslate?-1:1,H=u(w);if(P.forceToAxis)if(t.isHorizontal())if(Math.abs(H.pixelX)>Math.abs(H.pixelY))k=-H.pixelX*U;else return!0;else if(Math.abs(H.pixelY)>Math.abs(H.pixelX))k=-H.pixelY;else return!0;else k=Math.abs(H.pixelX)>Math.abs(H.pixelY)?-H.pixelX*U:-H.pixelY;if(k===0)return!0;P.invert&&(k=-k);let B=t.getTranslate()+k*P.sensitivity;if(B>=t.minTranslate()&&(B=t.minTranslate()),B<=t.maxTranslate()&&(B=t.maxTranslate()),x=t.params.loop?!0:!(B===t.minTranslate()||B===t.maxTranslate()),x&&t.params.nested&&w.stopPropagation(),!t.params.freeMode||!t.params.freeMode.enabled){const q={time:Ic(),delta:Math.abs(k),direction:Math.sign(k),raw:A};l.length>=2&&l.shift();const Z=l.length?l[l.length-1]:void 0;if(l.push(q),Z?(q.direction!==Z.direction||q.delta>Z.delta||q.time>Z.time+150)&&f(q):f(q),h(q))return!0}else{const q={time:Ic(),delta:Math.abs(k),direction:Math.sign(k)},Z=o&&q.time<o.time+500&&q.delta<=o.delta&&q.direction===o.direction;if(!Z){o=void 0,t.params.loop&&t.loopFix();let C=t.getTranslate()+k*P.sensitivity;const L=t.isBeginning,V=t.isEnd;if(C>=t.minTranslate()&&(C=t.minTranslate()),C<=t.maxTranslate()&&(C=t.maxTranslate()),t.setTransition(0),t.setTranslate(C),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!L&&t.isBeginning||!V&&t.isEnd)&&t.updateSlidesClasses(),t.params.freeMode.sticky){clearTimeout(s),s=void 0,l.length>=15&&l.shift();const j=l.length?l[l.length-1]:void 0,X=l[0];if(l.push(q),j&&(q.delta>j.delta||q.direction!==j.direction))l.splice(0);else if(l.length>=15&&q.time-X.time<500&&X.delta-q.delta>=1&&q.delta<=6){const G=k>0?.8:.2;o=q,l.splice(0),s=H_(()=>{t.slideToClosest(t.params.speed,!0,void 0,G)},0)}s||(s=H_(()=>{o=q,l.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(Z||r("scroll",w),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),C===t.minTranslate()||C===t.maxTranslate())return!0}}return w.preventDefault?w.preventDefault():w.returnValue=!1,!1}function v(A){let w=t.$el;t.params.mousewheel.eventsTarget!=="container"&&(w=an(t.params.mousewheel.eventsTarget)),w[A]("mouseenter",c),w[A]("mouseleave",d),w[A]("wheel",g)}function b(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",g),!0):t.mousewheel.enabled?!1:(v("on"),t.mousewheel.enabled=!0,!0)}function S(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,g),!0):t.mousewheel.enabled?(v("off"),t.mousewheel.enabled=!1,!0):!1}n("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&S(),t.params.mousewheel.enabled&&b()}),n("destroy",()=>{t.params.cssMode&&b(),t.mousewheel.enabled&&S()}),Object.assign(t.mousewheel,{enable:b,disable:S})}function U$e(t,e,n,r){const i=Wu();return t.params.createElements&&Object.keys(r).forEach(s=>{if(!n[s]&&n.auto===!0){let a=t.$el.children(`.${r[s]}`)[0];a||(a=i.createElement("div"),a.className=r[s],t.$el.append(a)),n[s]=a,e[s]=a}}),n}function V$e({swiper:t,extendParams:e,on:n,emit:r}){e({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null};function i(h){let g;return h&&(g=an(h),t.params.uniqueNavElements&&typeof h=="string"&&g.length>1&&t.$el.find(h).length===1&&(g=t.$el.find(h))),g}function s(h,g){const v=t.params.navigation;h&&h.length>0&&(h[g?"addClass":"removeClass"](v.disabledClass),h[0]&&h[0].tagName==="BUTTON"&&(h[0].disabled=g),t.params.watchOverflow&&t.enabled&&h[t.isLocked?"addClass":"removeClass"](v.lockClass))}function a(){if(t.params.loop)return;const{$nextEl:h,$prevEl:g}=t.navigation;s(g,t.isBeginning&&!t.params.rewind),s(h,t.isEnd&&!t.params.rewind)}function o(h){h.preventDefault(),!(t.isBeginning&&!t.params.loop&&!t.params.rewind)&&(t.slidePrev(),r("navigationPrev"))}function l(h){h.preventDefault(),!(t.isEnd&&!t.params.loop&&!t.params.rewind)&&(t.slideNext(),r("navigationNext"))}function u(){const h=t.params.navigation;if(t.params.navigation=U$e(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(h.nextEl||h.prevEl))return;const g=i(h.nextEl),v=i(h.prevEl);g&&g.length>0&&g.on("click",l),v&&v.length>0&&v.on("click",o),Object.assign(t.navigation,{$nextEl:g,nextEl:g&&g[0],$prevEl:v,prevEl:v&&v[0]}),t.enabled||(g&&g.addClass(h.lockClass),v&&v.addClass(h.lockClass))}function c(){const{$nextEl:h,$prevEl:g}=t.navigation;h&&h.length&&(h.off("click",l),h.removeClass(t.params.navigation.disabledClass)),g&&g.length&&(g.off("click",o),g.removeClass(t.params.navigation.disabledClass))}n("init",()=>{t.params.navigation.enabled===!1?f():(u(),a())}),n("toEdge fromEdge lock unlock",()=>{a()}),n("destroy",()=>{c()}),n("enable disable",()=>{const{$nextEl:h,$prevEl:g}=t.navigation;h&&h[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass),g&&g[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass)}),n("click",(h,g)=>{const{$nextEl:v,$prevEl:b}=t.navigation,S=g.target;if(t.params.navigation.hideOnClick&&!an(S).is(b)&&!an(S).is(v)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===S||t.pagination.el.contains(S)))return;let A;v?A=v.hasClass(t.params.navigation.hiddenClass):b&&(A=b.hasClass(t.params.navigation.hiddenClass)),r(A===!0?"navigationShow":"navigationHide"),v&&v.toggleClass(t.params.navigation.hiddenClass),b&&b.toggleClass(t.params.navigation.hiddenClass)}});const d=()=>{t.$el.removeClass(t.params.navigation.navigationDisabledClass),u(),a()},f=()=>{t.$el.addClass(t.params.navigation.navigationDisabledClass),c()};Object.assign(t.navigation,{enable:d,disable:f,update:a,init:u,destroy:c})}function z3(t=""){return`.${t.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function H$e({swiper:t,extendParams:e,on:n}
80){e({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let r=null;function i(Z){const C=r;C.length!==0&&(C.html(""),C.html(Z))}function s(Z=16){const C=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(Z).replace(/x/g,C)}function a(Z){Z.attr("tabIndex","0")}function o(Z){Z.attr("tabIndex","-1")}function l(Z,C){Z.attr("role",C)}function u(Z,C){Z.attr("aria-roledescription",C)}function c(Z,C){Z.attr("aria-controls",C)}function d(Z,C){Z.attr("aria-label",C)}function f(Z,C){Z.attr("id",C)}function h(Z,C){Z.attr("aria-live",C)}function g(Z){Z.attr("aria-disabled",!0)}function v(Z){Z.attr("aria-disabled",!1)}function b(Z){if(Z.keyCode!==13&&Z.keyCode!==32)return;const C=t.params.a11y,L=an(Z.target);t.navigation&&t.navigation.$nextEl&&L.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?i(C.lastSlideMessage):i(C.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&L.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?i(C.firstSlideMessage):i(C.prevSlideMessage)),t.pagination&&L.is(z3(t.params.pagination.bulletClass))&&L[0].click()}function S(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{$nextEl:Z,$prevEl:C}=t.navigation;C&&C.length>0&&(t.isBeginning?(g(C),o(C)):(v(C),a(C))),Z&&Z.length>0&&(t.isEnd?(g(Z),o(Z)):(v(Z),a(Z)))}function A(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function w(){return A()&&t.params.pagination.clickable}function x(){const Z=t.params.a11y;A()&&t.pagination.bullets.each(C=>{const L=an(C);t.params.pagination.clickable&&(a(L),t.params.pagination.renderBullet||(l(L,"button"),d(L,Z.paginationBulletMessage.replace(/\{\{index\}\}/,L.index()+1)))),L.is(`.${t.params.pagination.bulletActiveClass}`)?L.attr("aria-current","true"):L.removeAttr("aria-current")})}const P=(Z,C,L)=>{a(Z),Z[0].tagName!=="BUTTON"&&(l(Z,"button"),Z.on("keydown",b)),d(Z,L),c(Z,C)},N=()=>{t.a11y.clicked=!0},k=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.destroyed||(t.a11y.clicked=!1)})})},U=Z=>{if(t.a11y.clicked)return;const C=Z.target.closest(`.${t.params.slideClass}`);if(!C||!t.slides.includes(C))return;const L=t.slides.indexOf(C)===t.activeIndex,V=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(C);L||V||Z.sourceCapabilities&&Z.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(C),0))},H=()=>{const Z=t.params.a11y;Z.itemRoleDescriptionMessage&&u(an(t.slides),Z.itemRoleDescriptionMessage),Z.slideRole&&l(an(t.slides),Z.slideRole);const C=t.params.loop?t.slides.filter(L=>!L.classList.contains(t.params.slideDuplicateClass)).length:t.slides.length;Z.slideLabelMessage&&t.slides.each((L,V)=>{const j=an(L),X=t.params.loop?parseInt(j.attr("data-swiper-slide-index"),10):V,G=Z.slideLabelMessage.replace(/\{\{index\}\}/,X+1).replace(/\{\{slidesLength\}\}/,C);d(j,G)})},B=()=>{const Z=t.params.a11y;t.$el.append(r);const C=t.$el;Z.containerRoleDescriptionMessage&&u(C,Z.containerRoleDescriptionMessage),Z.containerMessage&&d(C,Z.containerMessage);const L=t.$wrapperEl,V=Z.id||L.attr("id")||`swiper-wrapper-${s(16)}`,j=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";f(L,V),h(L,j),H();let X,G;t.navigation&&t.navigation.$nextEl&&(X=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(G=t.navigation.$prevEl),X&&X.length&&P(X,V,Z.nextSlideMessage),G&&G.length&&P(G,V,Z.prevSlideMessage),w()&&t.pagination.$el.on("keydown",z3(t.params.pagination.bulletClass),b),t.$el.on("focus",U,!0),t.$el.on("pointerdown",N,!0),t.$el.on("pointerup",k,!0)};function q(){r&&r.length>0&&r.remove();let Z,C;t.navigation&&t.navigation.$nextEl&&(Z=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(C=t.navigation.$prevEl),Z&&Z.off("keydown",b),C&&C.off("keydown",b),w()&&t.pagination.$el.off("keydown",z3(t.params.pagination.bulletClass),b),t.$el.off("focus",U,!0),t.$el.off("pointerdown",N,!0),t.$el.off("pointerup",k,!0)}n("beforeInit",()=>
vendor: 1,746 bytes, line 80
80{r=an(`<span class="${t.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}),n("afterInit",()=>{t.params.a11y.enabled&&B()}),n("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{t.params.a11y.enabled&&H()}),n("fromEdge toEdge afterInit lock unlock",()=>{t.params.a11y.enabled&&S()}),n("paginationUpdate",()=>{t.params.a11y.enabled&&x()}),n("destroy",()=>{t.params.a11y.enabled&&q()})}function j$e({swiper:t,extendParams:e,emit:n,once:r}){e({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function i(){const o=t.getTranslate();t.setTranslate(o),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})}function s(){const{touchEventsData:o,touches:l}=t;o.velocities.length===0&&o.velocities.push({position:l[t.isHorizontal()?"startX":"startY"],time:o.touchStartTime}),o.velocities.push({position:l[t.isHorizontal()?"currentX":"currentY"],time:Ic()})}function a({currentPos:o}){const{params:l,$wrapperEl:u,rtlTranslate:c,snapGrid:d,touchEventsData:f}=t,g=Ic()-f.touchStartTime;if(o<-t.minTranslate()){t.slideTo(t.activeIndex);return}if(o>-t.maxTranslate()){t.slides.length<d.length?t.slideTo(d.length-1):t.slideTo(t.slides.length-1);return}if(l.freeMode.momentum){if(f.velocities.length>1){const N=f.velocities.pop(),k=f.velocities.pop(),U=N.position-k.position,H=N.time-k.time;t.velocity=U/H,t.velocity/=2,Math.abs(t.velocity)<l.freeMode.minimumVelocity&&(t.velocity=0),(H>150||Ic()-N.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=l.freeMode.momentumVelocityRatio,f.velocities.length=0;let v=1e3*l.freeMode.momentumRatio;
80const b=t.velocity*v;let S=t.translate+b;c&&(S=-S);let A=!1,w;const x=Math.abs(t.velocity)*20*l.freeMode.momentumBounceRatio;let P;if(S<t.maxTranslate())l.freeMode.momentumBounce?(S+t.maxTranslate()<-x&&(S=t.maxTranslate()-x),w=t.maxTranslate(),A=!0,f.allowMomentumBounce=!0):S=t.maxTranslate(),l.loop&&l.centeredSlides&&(P=!0);else if(S>t.minTranslate())l.freeMode.momentumBounce?(S-t.minTranslate()>x&&(S=t.minTranslate()+x),w=t.minTranslate(),A=!0,f.allowMomentumBounce=!0):S=t.minTranslate(),l.loop&&l.centeredSlides&&(P=!0);else if(l.freeMode.sticky){let N;for(let k=0;k<d.length;k+=1)if(d[k]>-S){N=k;break}Math.abs(d[N]-S)<Math.abs(d[N-1]-S)||t.swipeDirection==="next"?S=d[N]:S=d[N-1],S=-S}if(P&&r("transitionEnd",()=>{t.loopFix()}),t.velocity!==0){if(c?v=Math.abs((-S-t.translate)/t.velocity):v=Math.abs((S-t.translate)/t.velocity),l.freeMode.sticky){const N=Math.abs((c?-S:S)-t.translate),k=t.slidesSizesGrid[t.activeIndex];N<k?v=l.speed:N<2*k?v=l.speed*1.5:v=l.speed*2.5}}else if(l.freeMode.sticky){t.slideToClosest();return}l.freeMode.momentumBounce&&A?(t.updateProgress(w),t.setTransition(v),t.setTranslate(S),t.transitionStart(!0,t.swipeDirection),t.animating=!0,u.transitionEnd(()=>{!t||t.destroyed||!f.allowMomentumBounce||(n("momentumBounce"),t.setTransition(l.speed),setTimeout(()=>{t.setTranslate(w),u.transitionEnd(()=>{!t||t.destroyed||t.transitionEnd()})},0))})):t.velocity?(n("_freeModeNoMomentumRelease"),t.updateProgress(S),t.setTransition(v),t.setTranslate(S),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,u.transitionEnd(()=>{!t||t.destroyed||t.transitionEnd()}))):t.updateProgress(S),t.updateActiveIndex(),t.updateSlidesClasses()}else if(l.freeMode.sticky){t.slideToClosest();return}else l.freeMode&&n("_freeModeNoMomentumRelease");(!l.freeMode.momentum||g>=l.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}Object.assign(t,{freeMode:{onTouchStart:i,onTouchMove:s,onTouchEnd:a}})}const z$e="modulepreload",G$e=function(t){return"/"+t},wK={},Cr=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=G$e(l),l in wK)return;wK[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":z$e,u||(d.as="script"),d.crossOrigin="",d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})},yA=()=>{const t=new Date,e=String(t.getHours()).padStart(2,"0"),n=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0");return`${e}:${n}:${r}`};var Rn=(t=>(t.Streaming="Streaming",t.Analytics="Analytics",t.DataStore="DataStore",t.LocalDataStore="LocalDataStore",t.Onboarding="Onboarding",t.Auth="Auth",t.DeepLinking="DeepLinking",t.Native="Native",t.Navigation="Navigation",t))(Rn||{});const _K=[],tO=t=>!!_K&&_K.some(e=>t.includes(e)),nO={error:4,warn:3,info:2,debug:1};class W$e{constructor(){et(this,"level");et(this,"transports");et(this,"overlayMessages");et(this,"overlayListeners");this.transports=[],this.level=0,this.overlayMessages=[],this.overlayListeners=[]}addOverlayListener(e){this.overlayListeners.push(e),e(this.overlayMessages)}removeOverlayListener(e){this.overlayListeners=this.overlayListeners.filter(n=>n!==e)}notifyOverlayListeners(){this.overlayListeners.forEach(e=>e([...this.overlayMessages]))}overlayMsg(e){const n=`${yA()} ${e}`;this.overlayMessages=[...this.overlayMessages,n].slice(-100),this.notifyOverlayListeners()}clearOverlayMessages(){this.overlayMessages=[],this.notifyOverlayListeners()}setLogLevel(e){this.level=e}addTransport(e){this.transports.push(e)}
80log(e){console.log(e),this.transports.forEach(n=>{n.debug(e)})}error(e){this.level>nO.error||(tO(e)&&console.error(`${yA()} `+e),this.transports.forEach(n=>{n.error(e)}))}warn(e){this.level>nO.warn||(tO(e)&&console.warn(`${yA()} `+e),this.transports.forEach(n=>{n.warn(e)}))}info(e){this.level>nO.info||(tO(e)&&console.info(`${yA()} `+e),this.transports.forEach(n=>{n.info(e)}))}debug(e){this.level>nO.debug||(tO(e)&&console.log(`${yA()} `+e),this.transports.forEach(n=>{n.debug(e)}))}}const Pn=new W$e,CK={currentId:"",items:[]};var D9=(t=>(t.REMOTE_NAVIGATION="remoteNavigation",t.REMOTE_SUB_NAVIGATION="remoteSubNavigation",t))(D9||{}),tr=(t=>(t.BEARER_HEADER="bearerHeader",t.COLLECTION_ID="collectionId",t.IS_SOFT_DELETED="isSoftDeleted",t.REFRESH_TOKEN="refreshToken",t.UNAUTHENTICATED_PLAYBACK_TIME="unauthenticatedPlaybackTime",t.UNAUTHENTICATED_PLAYBACK_MAX_DURATION="unauthenticatedPlaybackMaxDuration",t.UNAUTHENTICATED_PLAYBACK_LAST_RESET_DATE="unauthenticatedPlaybackLastResetDate",t.USER_TOKEN="userToken",t.HISTORY="history",t.PLAYBACKS="playbacks",t.ACTIVE_PLAYLIST_ITEMS="activePlaylistItems",t.BRAZE_DEVICE_ID="brazeDeviceId",t.DOWNLOADED_EPISODES="downloadedEpisodes",t.PREFERENCES="preferences",t))(tr||{});const bA={imageRow:"imageRow",list:"list"};var nE=(t=>(t.V1="v1",t.V2="v2",t.V3="v3",t))(nE||{}),Bn=(t=>(t[t.ANON=0]="ANON",t[t.AUTH=1]="AUTH",t[t.NONE=2]="NONE",t))(Bn||{});const q$e="(H)";var Ei=(t=>(t.ANDROID_AUTO="ANDROID_AUTO",t.AUDACY_ASSISTANT="AUDACY_ASSISTANT",t.CARPLAY="CARPLAY",t.CHAPTER="CHAPTER",t.CTA_BUTTON="CTA_BUTTON",t.LIST_ITEM="LIST_ITEM",t.FULL_PLAYER="FULL_PLAYER",t.MINI_PLAYER="MINI_PLAYER",t.EXTERNAL="EXTERNAL",t.MENU="MENU",t.MODULE="MODULE",t.QUEUE="QUEUE",t.QUEUE_NEXT="QUEUE_NEXT",t.QUEUE_PREVIOUS="QUEUE_PREVIOUS",t.TEXT_LINK="TEXT_LINK",t.LOGOUT_BUTTON="LOGOUT_BUTTON",t.PLAYLIST="PLAYLIST",t.PLAYLIST_NEXT="PLAYLIST_NEXT",t.PLAYLIST_PREVIOUS="PLAYLIST_PREVIOUS",t.TRANSCRIPTION="TRANSCRIPTION",t))(Ei||{}),zp=(t=>(t.FULL="FULL",t.SUMMARY="SUMMARY",t))(zp||{}),iT=(t=>(t.PLAYLIST="PLAYLIST",t))(iT||{}),Jp=(t=>(t.DEV="DEV",t.PROD="PROD",t.QA="QA",t.STG="STG",t))(Jp||{});const ule={IMA3_LIBRARY_URL:"https://imasdk.googleapis.com/js/sdkloader/ima3.js",VIDEO_URL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/22278042776,23338666757/audacy/a2/video_a2&description_url=https%3A%2F%2Fwww.audacy.com%2F&tfcd=0&npa=0&sz=640x480&ad_rule=0&cust_params=&max_ad_duration=31000000&gdfp_req=1&unviewed_position_start=1&output=vast&env=vp&impl=s&correlator=",VIDEO_AD_COOLDOWN_MS:5*60*1e3,AD_LOAD_TIMEOUT:4e3};var gn=(t=>(t.BANNER_AD="BANNER_AD",t.CAROUSEL="CAROUSEL",t.CAROUSEL_PERSONALIZED="CAROUSEL_PERSONALIZED",t.CONTENT_ROW="CONTENT_ROW",t.COLLECTION_CARD="COLLECTION_CARD",t.COLLECTION_PLAYLIST_CARD="COLLECTION_PLAYLIST_CARD",t.COLLECTION_TOPIC_CARD="
80COLLECTION_TOPIC_CARD",t.CONTINUE_LISTENING="CONTINUE_LISTENING",t.EARLIER_TODAY="EARLIER_TODAY",t.ENTITY_CARD_IMAGE_GROUP="ENTITY_CARD_IMAGE_GROUP",t.ENTITY_CARD_FEATURED="ENTITY_CARD_FEATURED",t.ENTITY_CARD_HORIZONTAL="ENTITY_CARD_HORIZONTAL",t.ENTITY_CARD_VERTICAL="ENTITY_CARD_VERTICAL",t.ENTITY_CARD_COLLECTION="ENTITY_CARD_COLLECTION",t.LIST="LIST",t.ONBOARDING_LEGACY_FOLLOWS="ONBOARDING_LEGACY_FOLLOWS",t.PRIMARY_ACTION="PRIMARY_ACTION",t.SAFE_SECTION_WRAPPER="SAFE_SECTION_WRAPPER",t.SEARCH_PILL="SEARCH_PILL",t.SECTION_WRAPPER="SECTION_WRAPPER",t.SHOW_LIVE_NOW_AND_PREV="SHOW_LIVE_NOW_AND_PREV",t.SQUARE_AD="SQUARE_AD",t.STATION_LIVE_NOW="STATION_LIVE_NOW",t.SUB_NAVIGATION="SUB_NAVIGATION",t.VIEW_TITLE="VIEW_TITLE",t.TEXT_BLOCK="TEXT_BLOCK",t.RECENTLY_PLAYED="RECENTLY_PLAYED",t.RECENTLY_PLAYED_STATIONS="RECENTLY_PLAYED_STATIONS",t.RECENTLY_PLAYED_STATIONS_LIVE="RECENTLY_PLAYED_STATIONS_LIVE",t.SEARCH_FIELD="SEARCH_FIELD",t.SONG_HISTORY="SONG_HISTORY",t.PREVIEW_SONG_HISTORY="PREVIEW_SONG_HISTORY",t.PLAYLIST_ITEM_LIST="PLAYLIST_ITEM_LIST",t.PICKUP_LEFT_OFF="PICKUP_LEFT_OFF",t))(gn||{}),gt=(t=>(t.ARTICLE="ARTICLE",t.CLIP="CLIP",t.COLLECTION="COLLECTION",t.EPISODE="EPISODE",t.GEOGRAPHY="GEOGRAPHY",t.ORGANIZATION="ORGANIZATION",t.PERSON="PERSON",t.STATION="STATION",t.SHOW="SHOW",t.TAG="TAG",t.PLAYLIST="PLAYLIST",t.STANDALONE_CHAPTER="CHAPTER",t.TOPIC="TOPIC",t))(gt||{});const rE=Object.freeze({DEV:"https://api.dev.audacy.com",PROD:"https://api.audacy.com",QA:"https://api.qa.audacy.com",STG:"https://stageapi.audacy.com"});var QB=(t=>(t.ARTICLE="ARTICLE",t.CLIP="CLIP",t.COLLECTION="COLLECTION",t.EPISODE="EPISODE",t.GEOGRAPHY="GEOGRAPHY",t.ORGANIZATION="ORGANIZATION",t.PERSON="PERSON",t.STATION="STATION",t.SHOW="SHOW",t.TAG="TAG",t))(QB||{}),Vn=(t=>(t.BROADCAST_SHOW_EPISODE="BROADCAST_SHOW_EPISODE",t.PODCAST_EPISODE="PODCAST_EPISODE",t.HOST_CREATED_EPISODE="HOST_CREATED_EPISODE",t))(Vn||{}),sT=(t=>(t.BROADCAST_EPISODE_CHAPTER="BROADCAST_EPISODE_CHAPTER",t))(sT||{}),ks=(t=>(t[t.UNKNOWN=-1]="UNKNOWN",t[t.ATL_HOST_LIST=0]="ATL_HOST_LIST",t[t.CHAPTER=1]="CHAPTER",t[t.CLIP=2]="CLIP",t[t.COLLECTION=3]="COLLECTION",t[t.EPISODE=4]="EPISODE",t[t.EPISODE_LIST=5]="EPISODE_LIST",t[t.GENRE_LIST=6]="GENRE_LIST",t[t.MARKET_LIST=7]="MARKET_LIST",t[t.PODCAST=8]="PODCAST",t[t.PODCAST_CATEGORY_LIST=9]="PODCAST_CATEGORY_LIST",t[t.PODCAST_EPISODE=10]="PODCAST_EPISODE",t[t.PODCAST_EPISODE_LIST=11]="PODCAST_EPISODE_LIST",t[t.PODCAST_LIST=12]="PODCAST_LIST",t[t.SEARCH_RESULT_LIST=13]="SEARCH_RESULT_LIST",t[t.SEGMENT_LIST=14]="SEGMENT_LIST",t[t.SHOW=15]="SHOW",t[t.SHOW_EPISODE=16]="SHOW_EPISODE",t[t.SHOW_EPISODE_LIST=17]="SHOW_EPISODE_LIST",t[t.SHOW_LIST=18]="SHOW_LIST",t[t.SHOW_SUMMARY=19]="SHOW_SUMMARY",t[t.SONG=20]="SONG",t[t.SONG_LIST=21]="SONG_LIST",t[t.STANDALONE_CHAPTER=22]="STANDALONE_CHAPTER",t[t.STATION=23]="STATION",t[t.STATION_LIST=24]="STATION_LIST",t[t.STATION_SUMMARY=25]="STATION_SUMMARY",t[t.TAG=26]="TAG",t[t.TOPIC=27]="TOPIC",t))(ks||{}),bs=(t=>(t[t.ANDROID=0]="ANDROID",t[t.ANDROID_CREATOR=1]="ANDROID_CREATOR",t[t.CS_TEST=2]="CS_TEST",t[t.IOS=3]="IOS",t[t.IOS_CREATOR=4]="IOS_CREATOR",t[t.WEB=5]="WEB",t))(bs||{});const XB={0:"androidA2",3:"iosA2",5:"webA2"},DS={CONTINUE_LISTEN_DURATION:6e4,CONTINUE_LISTEN_DURATION_10:6e4*10},cle={RESUME_POINT_INTERVAL_MSEC:6e4};var zR=(t=>(t.DATE_ASC="DATE_ASC",t.DATE_DESC="DATE_DESC",t))(zR||{}),dle=(t=>(t.EPISODIC="episodic",t.SERIAL="serial",t))(dle||{}),JB=(t=>(t.LIKE="like",t.DISLIKE="dislike",t))(JB||{});const K$e=2592e5,GR=432e5,Y$e=864e5,Z$e=6e4,Wy="follows";var wP=(t=>(t.DUMMY_STATION_ID="6974",t.BROKEN_ID="0000",t.CURRENT_CAMPAIGN_ID="9437",t.IMPRESSION_TEMPLATES="ads[0].impressionURLTemplates",t.VAST_URL="https://vader.amperwave.net/api/v1/engine/gateway/audio/",t.QA_VAST_URL="https://qa-vader.amperwave.net/api/v1/engine/instream_preroll/audio/",t.TEST_GOOGLE_AD="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",t))(wP||{}),eU=(t=>(t.AUDIO_PREROLL="AUDIO_PREROLL",t.AUDACY_OWNED_AND_OPERATED_CODE="501-1",t.DO_NOT_PLAY_PREROLL="Do Not Play Preroll",t))(eU||{}),ui=(t=>(t.DIGITAL="DIGITAL_SHOW",t.BROADCAST="BROADCAST_SHOW",t.HOST_CREATED="HOST_CREATED",t.PODCAST="PODCAST",t.PLAYLIST="PLAYLIST",t))(ui||{}),Ol=(t=>(t.TEAM="Team",t.LEAGUE="League",t.GENRE="Genre",t))(Ol||{}),Fr=(t=>(t.BROADCAST="BROADCAST_RADIO",t.INTERNET="INTERNET_RADIO",t.EXCLUSIVE="EXCLUSIVE_STATION",t.TOPIC="TOPIC_BASED",t.PERSONALIZED="PERSONALIZED_RADIO",t.PODCAST="PODCAST_EPISODE",t))(Fr||{}),tU=(t=>(t[t.EXPIRED=0]="EXPIRED",t[t.FORBIDDEN=1]="FORBIDDEN",t[t.NOT_SKIPPABLE=2]="NOT_SKIPPABLE",t[t.PLAYER_ABORT=3]="PLAYER_ABORT",t[t.PROVISIONING_FAILURE=4]="PROVISIONING_FAILURE",t[t.STREAM_NOT_LOADED=5]="STREAM_NOT_LOADED",t[t.SW_STREAM_FAILURE=6]="SW_STREAM_FAILURE",t[t.UNKNOWN_ERROR=7]="UNKNOWN_ERROR",t))(tU||{}),JA=(t=>(t[t.BOTH=0]="BOTH",t[t.NONE=1]="NONE",t[t.ONLY_NEXT=2]="ONLY_NEXT",t[t.ONLY_PREV=3]="ONLY_PREV",t))(JA||{}),Ds=(t=>(t.PLAYER_LOOPING_ERROR="PLAYER_LOOPING_ERROR",t.STREAM_LOAD="STREAM_LOAD",t.STREAM_PLAY="STREAM_PLAY",t.STREAM_PAUSE="STREAM_PAUSE",t.STREAM_BUFFERING="STREAM_BUFFERING",t.STREAM_BUFFERING_COUNT="STREAM_BUFFERING_COUNT",t.STREAM_PLAYBACK_FAILURE="STREAM_PLAYBACK_FAILURE",t.STREAM_RESUME_FROM_BUFFERING="STREAM_RESUME_FROM_BUFFERING",t.STREAM_PLAYBACK_FAILED="STREAM_PLAYBACK_FAILED",t.STREAM_FAILED_TO_LOAD="STREAM_FAILED_TO_LOAD",t.STREAM_RECONNECT_SUCCESSFUL="STREAM_RECONNECT_SUCCESSFUL",t.STREAM_RECONNECT_ATTEMPT="STREAM_RECONNECT_ATTEMPT",t.STREAM_RECONNECT_ABORTED="STREAM_RECONNECT_ABORTED",t.STREAM_SESSION_TRACING_ENABLED="STREAM_SESSION_TRACING_ENABLED",t))(Ds||{}),As=(t=>(t.CONTINUE_LISTEN="CONTINUE_LISTEN",t.CONTINUE_LISTEN_10="CONTINUE_LISTEN_10",t.FAST_FORWARD="FAST_FORWARD",t.JUMP_TO_LIVE="JUMP_TO_LIVE",t.PLAY="PLAY",t.REWIND="REWIND",t.SKIP_SONG="SKIP_SONG",t.PLAYBACK_SPEED="PLAYBACK_SPEED",t.PLAYER_LOOPING_ERROR="PLAYER_LOOPING_ERROR",t.STOP="STOP",t.PLAYBACK_FAILED="PLAYBACK_FAILED",t.PLAYBACK_ERROR="PLAYBACK_ERROR",t.SLEEP_TIMER_CANCELED="SLEEP_TIMER_CANCELED",t.SLEEP_TIMER_SET="SLEEP_TIMER_SET",t.SCRUB="SCRUB",t.SONG_LISTENED="SONG_LISTENED",t))(As||{}),Vi=(t=>(t.ALL_EPISODE="ALL_EPISODE",t.COLLECTION="COLLECTION",t.EPISODE="EPISODE",t.MY_AUDIO="MY_AUDIO",t.MODULES="MODULES",t.ONBOARDING_FOLLOWS="ONBOARDING_FOLLOWS",t.PLAYLIST="PLAYLIST",t.SCHEDULE="SCHEDULE",t.SHOW="SHOW",t.SEARCH="SEARCH",t.STATION="STATION",t.TAG="TAG",t.TOPIC="TOPIC",t.STANDALONE_CHAPTER="CHAPTER",t))(Vi||{}),zn=(t=>(t.ADD_TO_QUEUE="ADD_TO_QUEUE",t.APP_CRASH="APP_CRASH",t.APP_EXIT="APP_EXIT",t.APP_START="APP_START",t.ASK_TO_SPEAK="ASK_TO_SPEAK",t.AUTOMOTIVE_CONNECT="AUTOMOTIVE_CONNECT",t.AUTOMOTIVE_DISCONNECT="AUTOMOTIVE_DISCONNECT",t.CAST_TO_DEVICE="CAST_TO_DEVICE",t.CHAT_COMMENT_POST="CHAT_COMMENT_POST",t.CHAT_COMMENT_LIKE="CHAT_COMMENT_LIKE",t.CHAT_REACTION="CHAT_REACTION",t.CONTENT_SHARE="CONTENT_SHARE",t.FIFTEEN_SECOND_CLICK="15_SECOND_CLICK",t.FOLLOW="FOLLOW",t.JUMP_TO_LIVE="JUMP_TO_LIVE",t.LOGIN="LOGIN",t.LOGOUT="LOGOUT",t.MODULE_VIEW="MODULE_VIEW",t.NAVIGATION_CLICK="NAVIGATION_CLICK",t.NEXT_CHAPTER="NEXT_CHAPTER",t.PLAY_CLICK="PLAY_CLICK",t.STOP_CLICK="STOP_CLICK",t.PREVIOUS_CHAPTER="PREVIOUS_CHAPTER",t.PUSH_NOTIFICATION="PUSH_NOTIFICATION",t.REACTIVATE_ACCOUNT="REACTIVATE_ACCOUNT",t.REGISTRATION_ENTRY="REGISTRATION_ENTRY",t.REGISTRATION_NAME_ENTRY="REGISTRATION_NAME_ENTRY",t.REGISTRATION_NAME_SUCCESSFUL="REGISTRATION_NAME_SUCCESSFUL",t.REGISTRATION_PII_ENTRY="REGISTRATION_PII_ENTRY",t.REGISTRATION_PII_SUCCESSFUL="REGISTRATION_PII_SUCCESSFUL",t.REGISTRATION_SUCCESSFUL="REGISTRATION_SUCCESSFUL",t.REMOVE_FROM_QUEUE="REMOVE_FROM_QUEUE",t.RESTART_EPISODE="RESTART_EPISODE",t.SCREEN_VIEW="SCREEN_VIEW",t.
80SEARCH="SEARCH",t.SEARCH_RESULTS_CLICK="SEARCH_RESULTS_CLICK",t.SONG_LIKE="SONG_LIKE",t.SONG_UNLIKE="SONG_UNLIKE",t.STATION_CALL="STATION_CALL",t.UNFOLLOW="UNFOLLOW",t.TTR_RECORD="TTR_RECORD",t.TTR_SEND="TTR_SEND",t.TTR_RECEIVED="TTR_RECEIVED",t.TTR_FAIL="TTR_FAIL",t.TTR_PREVIEW="TTR_PREVIEW",t.TTR_RERECORD="TTR_RERECORD",t.TTR_CANCEL="TTR_CANCEL",t.TTR_RETRY="TTR_RETRY",t))(zn||{}),Sc=(t=>(t.EPISODE_DETAILS="EPISODE_DETAILS",t.PODCAST="PODCAST",t.STATION="STATION",t.TOPIC="TOPIC",t.EPISODE_GO_TO="EPISODE_GO_TO",t.SHOW_GO_TO="SHOW_GO_TO",t))(Sc||{});const Q$e=Object.freeze({0:"com.radiocom",3:"com.cbsradio.cbsradioplayer"}),X$e=Object.freeze({0:"com.radiocom",3:"323701765"}),J$e=Object.freeze({0:"https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.radiocom",3:"https%3A%2F%2Fapps.apple.com%2Fus%2Fapp%2Faudacy-sports-radio-music%2Fid323701765"}),fle="data:audio/ogg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjQ1LjEwMAAAAAAAAAAAAAAA//tQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAACAAABoADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA//////////////////////////////////////////////////////////////////8AAAAATGF2YzU4LjM1AAAAAAAAAAAAAAAAJAAAAAAAAAAAAaBA/CmTAAAAAAAAAAAAAAAAAAAAAP/7EGQAD/AAAGkAAAAIAAANIAAAAQAAAaQAAAAgAAA0gAAABExBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//sQZCIP8AAAaQAAAAgAAA0gAAABAAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=";var j_=(t=>(t[t.APPLY_AMPERWAVE_GEOLOCATION=0]="APPLY_AMPERWAVE_GEOLOCATION",t[t.FORCE_SIMULCAST_ON=1]="FORCE_SIMULCAST_ON",t[t.FORCE_SIMULCAST_OFF=2]="FORCE_SIMULCAST_OFF",t))(j_||{});const eBe="client side timeout",tBe="_VIEW_TITLE",nBe=/"(~\^~|0)"/g;var El=(t=>(t[t.PENDING=0]="PENDING",t[t.AUTHENTICATED=1]="AUTHENTICATED",t[t.UNAUTHENTICATED=2]="UNAUTHENTICATED",t))(El||{}),k9=(t=>(t.UNFINISHED_EPISODES="UNFINISHED_EPISODES",t))(k9||{});const nU="profile";var rBe=typeof Ys=="object"&&Ys&&Ys.Object===Object&&Ys,hle=rBe,iBe=hle,sBe=typeof self=="object"&&self&&self.Object===Object&&self,aBe=iBe||sBe||Function("return this")(),ap=aBe,oBe=ap,lBe=oBe.Symbol,JC=lBe,xK=JC,ple=Object.prototype,uBe=ple.hasOwnProperty,cBe=ple.toString,SA=xK?xK.toStringTag:void 0;function dBe(t){var e=uBe.call(t,SA),n=t[SA];try{t[SA]=void 0;var r=!0}catch{}var i=cBe.call(t);return r&&(e?t[SA]=n:delete t[SA]),i}var fBe=dBe,hBe=Object.prototype,pBe=hBe.toString;function gBe(t){return pBe.call(t)}var mBe=gBe,IK=JC,vBe=fBe,yBe=mBe,bBe="[object Null]",SBe="[object Undefined]",OK=IK?IK.toStringTag:void 0;function EBe(t){return t==null?t===void 0?SBe:bBe:OK&&OK in Object(t)?vBe(t):yBe(t)}var vb=EBe;function TBe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Dg=TBe,ABe=vb,wBe=Dg,_Be="[object AsyncFunction]",CBe="[object Function]",xBe="[object GeneratorFunction]",IBe="[object Proxy]";function OBe(t){if(!wBe(t))return!1;var e=ABe(t);return e==CBe||e==xBe||e==_Be||e==IBe}var N9=OBe;const PBe=pi(N9);var WR={exports:{}};/**
81 * @license
82 * Lodash <https://lodash.com/>
83 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
84 * Released under MIT license <https://lodash.com/license>
85 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
86 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
87 */WR.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,f=2,h=4,g=1,v=2,b=1,S=2,A=4,w=8,x=16,P=32,N=64,k=128,U=256,H=512,B=30,q="...",Z=800,C=16,L=1,V=2,j=3,X=1/0,G=9007199254740991,ie=17976931348623157e292,ae=NaN,ue=4294967295,Q=ue-1,de=ue>>>1,le=[["ary",k],["bind",b],["bindKey",S],["curry",w],["curryRight",x],["flip",H],["partial",P],["partialRight",N],["rearg",U]],ye="[object Arguments]",fe="[object Array]",We="[object AsyncFunction]",Le="[object Boolean]",Ve="[object Date]",at="[object DOMException]",Et="[object Error]",ne="[object Function]",Ze="[object GeneratorFunction]",lt="[object Map]",ot="[object Number]",
87se="[object Null]",Fe="[object Object]",ht="[object Promise]",Ct="[object Proxy]",pt="[object RegExp]",me="[object Set]",De="[object String]",Me="[object Symbol]",qe="[object Undefined]",ut="[object WeakMap]",Tt="[object WeakSet]",jt="[object ArrayBuffer]",on="[object DataView]",wn="[object Float32Array]",kr="[object Float64Array]",Ir="[object Int8Array]",gi="[object Int16Array]",Ln="[object Int32Array]",Ua="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Ue="[object Uint16Array]",Rt="[object Uint32Array]",Ut=/\b__p \+= '';/g,zt=/\b(__p \+=) '' \+/g,Yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vn=/&(?:amp|lt|gt|quot|#39);/g,nn=/[&<>"']/g,fn=RegExp(vn.source),tn=RegExp(nn.source),$n=/<%-([\s\S]+?)%>/g,Hr=/<%([\s\S]+?)%>/g,dr=/<%=([\s\S]+?)%>/g,jr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,as=/^\w*$/,ci=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yt=/[\\^$.*+?()[\]{}|]/g,_i=RegExp(yt.source),$i=/^\s+/,vu=/\s/,$s=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Va=/\{\n\/\* \[wrapped with (.+)\] \*/,cs=/,? & /,jc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,op=/[()=,{}\[\]\/\s]/,Qu=/\\(\\)?/g,cl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lp=/\w*$/,Fg=/^[-+]0x[0-9a-f]+$/i,zc=/^0b[01]+$/i,yo=/^\[object .+?Constructor\]$/,up=/^0o[0-7]+$/i,An=/^(?:0|[1-9]\d*)$/,$e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 4,134 bytes, line 87
877f]/g,$t=/($^)/,Zt=/['\n\r\u2028\u2029\\]/g,fr="\\ud800-\\udfff",ca="\\u0300-\\u036f",$r="\\ufe20-\\ufe2f",_s="\\u20d0-\\u20ff",kl=ca+$r+_s,Zn="\\u2700-\\u27bf",wa="a-z\\xdf-\\xf6\\xf8-\\xff",dl="\\xac\\xb1\\xd7\\xf7",Yf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",LT="\\u2000-\\u206f",$g=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vo="A-Z\\xc0-\\xd6\\xd8-\\xde",Bg="\\ufe0e\\ufe0f",Ug=dl+Yf+LT+$g,da="['’]",yu="["+fr+"]",cp="["+Ug+"]",Gc="["+kl+"]",Ho="\\d+",Nl="["+Zn+"]",Wv="["+wa+"]",qv="[^"+fr+Ug+Ho+Zn+wa+Vo+"]",Vg="\\ud83c[\\udffb-\\udfff]",Kv="(?:"+Gc+"|"+Vg+")",Bs="[^"+fr+"]",fl="(?:\\ud83c[\\udde6-\\uddff]){2}",Us="[\\ud800-\\udbff][\\udc00-\\udfff]",bo="["+Vo+"]",dp="\\u200d",Zf="(?:"+Wv+"|"+qv+")",$d="(?:"+bo+"|"+qv+")",Bd="(?:"+da+"(?:d|ll|m|re|s|t|ve))?",Xu="(?:"+da+"(?:D|LL|M|RE|S|T|VE))?",Yv=Kv+"?",jo="["+Bg+"]?",hl="(?:"+dp+"(?:"+[Bs,fl,Us].join("|")+")"+jo+Yv+")*",Qf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",So=jo+Yv+hl,fa="(?:"+[Nl,fl,Us].join("|")+")"+So,zo="(?:"+[Bs+Gc+"?",Gc,fl,Us,yu].join("|")+")",Ki=RegExp(da,"g"),Ha=RegExp(Gc,"g"),fp=RegExp(Vg+"(?="+Vg+")|"+zo+So,"g"),Hg=RegExp([bo+"?"+Wv+"+"+Bd+"(?="+[cp,bo,"$"].join("|")+")",$d+"+"+Xu+"(?="+[cp,bo+Zf,"$"].join("|")+")",bo+"?"+Zf+"+"+Bd,bo+"+"+Xu,bu,Qf,Ho,fa].join("|"),"g"),jg=RegExp("["+dp+fr+kl+Bg+"]"),Ud=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Wc=-1,oi={};oi[wn]=oi[kr]=oi[Ir]=oi[gi]=oi[Ln]=oi[Ua]=oi[Qe]=oi[Ue]=oi[Rt]=!0,oi[ye]=oi[fe]=oi[jt]=oi[Le]=oi[on]=oi[Ve]=oi[Et]=oi[ne]=oi[lt]=oi[ot]=oi[Fe]=oi[pt]=oi[me]=oi[De]=oi[ut]=!1;var Nr={};Nr[ye]=Nr[fe]=Nr[jt]=Nr[on]=Nr[Le]=Nr[Ve]=Nr[wn]=Nr[kr]=Nr[Ir]=Nr[gi]=Nr[Ln]=Nr[lt]=Nr[ot]=Nr[Fe]=Nr[pt]=Nr[me]=Nr[De]=Nr[Me]=Nr[Ua]=Nr[Qe]=Nr[Ue]=Nr[Rt]=!0,Nr[Et]=Nr[ne]=Nr[ut]=!1;var zg={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},hp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Gg={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ja={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pp=parseFloat,os=parseInt,Wg=typeof Ys=="object"&&Ys&&Ys.Object===Object&&Ys,Zv=typeof self=="object"&&self&&self.Object===Object&&self,Ri=Wg||Zv||Function("return this")(),Ml=e&&!e.nodeType&&e,pl=Ml&&!0&&t&&!t.nodeType&&t,gl=pl&&pl.exports===Ml,Cs=gl&&Wg.process,ha=function(){try{var ze=pl&&pl.require&&pl.require("util").t
vendor: 11,707 bytes, line 87
87ypes;return ze||Cs&&Cs.binding&&Cs.binding("util")}catch{}}(),xb=ha&&ha.isArrayBuffer,Qv=ha&&ha.isDate,Ib=ha&&ha.isMap,Xv=ha&&ha.isRegExp,qg=ha&&ha.isSet,Xf=ha&&ha.isTypedArray;function za(ze,St,dt){switch(dt.length){case 0:return ze.call(St);case 1:return ze.call(St,dt[0]);case 2:return ze.call(St,dt[0],dt[1]);case 3:return ze.call(St,dt[0],dt[1],dt[2])}return ze.apply(St,dt)}function DT(ze,St,dt,mn){for(var er=-1,Zr=ze==null?0:ze.length;++er<Zr;){var js=ze[er];St(mn,js,dt(js),ze)}return mn}function Go(ze,St){for(var dt=-1,mn=ze==null?0:ze.length;++dt<mn&&St(ze[dt],dt,ze)!==!1;);return ze}function Kg(ze,St){for(var dt=ze==null?0:ze.length;dt--&&St(ze[dt],dt,ze)!==!1;);return ze}function Ob(ze,St){for(var dt=-1,mn=ze==null?0:ze.length;++dt<mn;)if(!St(ze[dt],dt,ze))return!1;return!0}function Fl(ze,St){for(var dt=-1,mn=ze==null?0:ze.length,er=0,Zr=[];++dt<mn;){var js=ze[dt];St(js,dt,ze)&&(Zr[er++]=js)}return Zr}function gp(ze,St){var dt=ze==null?0:ze.length;return!!dt&&ir(ze,St,0)>-1}function Jv(ze,St,dt){for(var mn=-1,er=ze==null?0:ze.length;++mn<er;)if(dt(St,ze[mn]))return!0;return!1}function vi(ze,St){for(var dt=-1,mn=ze==null?0:ze.length,er=Array(mn);++dt<mn;)er[dt]=St(ze[dt],dt,ze);return er}function $l(ze,St){for(var dt=-1,mn=St.length,er=ze.length;++dt<mn;)ze[er+dt]=St[dt];return ze}function ey(ze,St,dt,mn){var er=-1,Zr=ze==null?0:ze.length;for(mn&&Zr&&(dt=ze[++er]);++er<Zr;)dt=St(dt,ze[er],er,ze);return dt}function mp(ze,St,dt,mn){var er=ze==null?0:ze.length;for(mn&&er&&(dt=ze[--er]);er--;)dt=St(dt,ze[er],er,ze);return dt}function vp(ze,St){for(var dt=-1,mn=ze==null?0:ze.length;++dt<mn;)if(St(ze[dt],dt,ze))return!0;return!1}var Vd=Hd("length");function Vs(ze){return ze.split("")}function Pb(ze){return ze.match(jc)||[]}function qc(ze,St,dt){var mn;return dt(ze,function(er,Zr,js){if(St(er,Zr,js))return mn=Zr,!1}),mn}function zr(ze,St,dt,mn){for(var er=ze.length,Zr=dt+(mn?1:-1);mn?Zr--:++Zr<er;)if(St(ze[Zr],Zr,ze))return Zr;return-1}function ir(ze,St,dt){return St===St?Db(ze,St,dt):zr(ze,ds,dt)}function Ju(ze,St,dt,mn){for(var er=dt-1,Zr=ze.length;++er<Zr;)if(mn(ze[er],St))return er;return-1}function ds(ze){return ze!==ze}function yp(ze,St){var dt=ze==null?0:ze.length;return dt?D(ze,St)/dt:ae}function Hd(ze){return function(St){return St==null?n:St[ze]}}function yr(ze){return function(St){return ze==null?n:ze[St]}}function bp(ze,St,dt,mn,er){return er(ze,function(Zr,js,Li){dt=mn?(mn=!1,Zr):St(dt,Zr,js,Li)}),dt}function Rb(ze,St){var dt=ze.length;for(ze.sort(St);dt--;)ze[dt]=ze[dt].value;return ze}function D(ze,St){for(var dt,mn=-1,er=ze.length;++mn<er;){var Zr=St(ze[mn]);Zr!==n&&(dt=dt===n?Zr:dt+Zr)}return dt}function F(ze,St){for(var dt=-1,mn=Array(ze);++dt<ze;)mn[dt]=St(dt);return mn}function K(ze,St){return vi(St,function(dt){return[dt,ze[dt]]})}function pe(ze){return ze&&ze.slice(0,ny(ze)+1).replace($i,"")}function Te(ze){return function(St){return ze(St)}}function tt(ze,St){return vi(St,function(dt){return ze[dt]})}function Qt(ze,St){return ze.has(St)}function Dt(ze,St){for(var dt=-1,mn=ze.length;++dt<mn&&ir(St,ze[dt],0)>-1;);return dt}function ct(ze,St){for(var dt=ze.length;dt--&&ir(St,ze[dt],0)>-1;);return dt}function Jn(ze,St){for(var dt=ze.length,mn=0;dt--;)ze[dt]===St&&++mn;return mn}var qt=yr(zg),Cn=yr(hp);function Hn(ze){return"\\"+ja[ze]}function Kc(ze,St){return ze==null?n:ze[St]}function un(ze){return jg.test(ze)}function kn(ze){return Ud.test(ze)}function Hs(ze){for(var St,dt=[];!(St=ze.next()).done;)dt.push(St.value);return dt}function ea(ze){var St=-1,dt=Array(ze.size);return ze.forEach(function(mn,er){dt[++St]=[er,mn]}),dt}function Ga(ze,St){return function(dt){return ze(St(dt))}}function ec(ze,St){for(var dt=-1,mn=ze.length,er=0,Zr=[];++dt<mn;){var js=ze[dt];(js===St||js===c)&&(ze[dt]=c,Zr[er++]=dt)}return Zr}function ty(ze){var St=-1,dt=Array(ze.size);return ze.forEach(function(mn){dt[++St]=mn}),dt}function Lb(ze){var St=-1,dt=Array(ze.size);return ze.forEach(function(mn){dt[++St]=[mn,mn]}),dt}function Db(ze,St,dt){for(var mn=dt-1,er=ze.length;++mn<er;)if(ze[mn]===St)return mn;return-1}function NN(ze,St,dt){for(var mn=dt+1;mn--;)if(ze[mn]===St)return mn;return mn}function Yg(ze){return un(ze)?FN(ze):Vd(ze)}function Su(ze){return un(ze)?$N(ze):Vs(ze)}function ny(ze){for(var St=ze.length;St--&&vu.test(ze.charAt(St)););return St}var MN=yr(Gg);function FN(ze){for(var St=fp.lastIndex=0;fp.test(ze);)++St;return St}function $N(ze){return ze.match(fp)||[]}function BN(ze){return ze.match(Hg)||[]}var kT=function ze(St){St=St==null?Ri:Sp.defaults(Ri.Object(),St,Sp.pick(Ri,mi));var dt=St.Array,mn=St.Date,er=St.Error,Zr=St.Function,js=St.Math,Li=St.Object,ry=St.RegExp,NT=St.String,Wo=St.TypeError,iy=dt.prototype,sy=Zr.prototype,Yc=Li.prototype,ay=St["__core-js_shared__"],kb=sy.toString,Ci=Yc.hasOwnProperty,UN=0,Nx=function(){var m=/[^.]+$/.exec(ay&&ay.keys&&ay.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),Zg=Yc.toString,Jf=kb.call(Li),VN=Ri._,Mx=ry("^"+kb.call(Ci).replace(yt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oy=gl?St.Buffer:n,jd=St.Symbol,Bl=St.Uint8Array,Fx=oy?oy.allocUnsafe:n,ly=Ga(Li.getPrototypeOf,Li),Nb=Li.create,Mb=Yc.propertyIsEnumerable,Qg=iy.splice,Ep=jd?jd.isConcatSpreadable:n,pa=jd?jd.iterator:n,eh=jd?jd.toStringTag:n,uy=function(){try{var m=Ty(Li,"defineProperty");return m({},"",{}),m}catch{}}(),$x=St.clearTimeout!==Ri.clearTimeout&&St.clearTimeout,MT=mn&&mn.now!==Ri.Date.now&&mn.now,Bx=St.setTimeout!==Ri.setTimeout&&St.setTimeout,cy=js.ceil,dy=js.floor,FT=Li.getOwnPropertySymbols,$T=oy?oy.isBuffer:n,BT=St.isFinite,Ux=iy.join,HN=Ga(Li.keys,Li),Yi=js.max,xs=js.min,Vx=mn.now,Hx=St.parseInt,jx=js.random,fy=iy.reverse,hy=Ty(St,"DataView"),Xg=Ty(St,"Map"),py=Ty(St,"Promise"),zd=Ty(St,"Set"),Tp=Ty(St,"WeakMap"),Zc=Ty(Li,"create"),Fb=Tp&&new Tp,Jg={},$b=Ay(hy),Bb=Ay(Xg),jN=Ay(py),zN=Ay(zd),GN=Ay(Tp),Ub=jd?jd.prototype:n,gy=Ub?Ub.valueOf:n,zx=Ub?Ub.toString:n;function ce(m){if(ga(m)&&!cr(m)&&!(m instanceof Or)){if(m instanceof Eu)return m;if(Ci.call(m,"__wrapped__"))return qj(m)}return new Eu(m)}var em=function(){function m(){}return function(T){if(!ta(T))return{};if(Nb)return Nb(T);m.prototype=T;var O=new m;return m.prototype=n,O}}();function Vb(){}function Eu(m,T){this.__wrapped__=m,this.__actions__=[],this.__chain__=!!T,this.__index__=0,this.__values__=n}ce.templateSettings={escape:$n,evaluate:Hr,interpolate:dr,variable:"",imports:{_:ce}},ce.prototype=Vb.prototype,ce.prototype.constructor=ce,Eu.prototype=em(Vb.prototype),Eu.prototype.constructor=Eu;function Or(m){this.__wrapped__=m,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ue,this.__views__=[]}function WN(){var m=new Or(this.__wrapped__);return m.__actions__=Au(this.__actions__),m.__dir__=this.__dir__,m.__filtered__=this.__filtered__,m.__iteratees__=Au(this.__iteratees__),m.__takeCount__=this.__takeCount__,m.__views__=Au(this.__views__),m}function UT(){if(this.__filtered__){var m=new Or(this);m.__dir__=-1,m.__filtered__=!0}else m=this.clone(),m.__dir__*=-1;return m}function Ap(){var m=this.__wrapped__.value(),T=this.__dir__,O=cr(m),z=T<0,te=O?m.length:0,ge=J0e(0,te,this.__views__),Oe=ge.start,ke=ge.end,Ye=ke-Oe,Ot=z?ke:Oe-1,Lt=this.__iteratees__,Mt=Lt.length,rn=0,In=xs(Ye,this.__takeCount__);if(!O||!z&&te==Ye&&In==Ye)return mj(m,this.__actions__);var Wn=[];e:for(;Ye--&&rn<In;){Ot+=T;for(var br=-1,qn=m[Ot];++br<Mt;){var Br=Lt[br],Xr=Br.iteratee,ic=Br.type,jl=Xr(qn);if(ic==V)qn=jl;else if(!jl){if(ic==L)continue e;break e}}Wn[rn++]=qn}return Wn}Or.prototype=em(Vb.prototype),Or.prototype.constructor=Or;function Eo(m){var T=-1,O=m==null?0:m.length;for(this.clear();++T<O;){var z=m[T];this.set(z[0],z[1])}}function Gx(){this.__data__=Zc?Zc(null):{},this.size=0}function qN(m){var T=this.has(m)&&delete this.__data__[m];return this.size-=T?1:0,T}function Wx(m){var T=this.__data__;if(Zc){var O=T[m];return O===l?n:O}return Ci.call(T,m)?T[m]:n}function Hb(m){var T=this.__data__;return Zc?T[m]!==n:Ci.call(T,m)}function my(m,T){var O=this.__data__;return this.size+=this.has(m)?0:1,O[m]=Zc&&T===n?l:T,this}Eo.prototype.clear=Gx,Eo.prototype.delete=qN,Eo.prototype.get=Wx,Eo.prototype.has=Hb,Eo.prototype.set=my;function Gd(m){var T=-1,O=m==null?0:m.length;for(this.clear();++T<O;){var z=m[T];this.set(z[0],z[1])}}function qx(){this.__data__=[],this.size=0}function Wd(m){var T=this.__data__,O=by(T,m);if(O<0)return!1;var z=T.length-1;return O==z?T.pop():Qg.call(T,O,1),--this.size,!0}function KN(m){var T=this.__data__,O=by(T,m);return O<0?n:T[O][1]}function Kx(m){return by(this.__data__,m)>-1}function YN(m,T){var O=this.__data__,z=by(O,m);return z<0?(++this.size,O.push([m,T])):O[z][1]=T,this}Gd.prototype.clear=qx,Gd.prototype.delete=Wd,Gd.prototype.get=KN,Gd.prototype.has=Kx,Gd.prototype.set=YN;function Qc(m){var T=-1,O=m==null?0:m.length;for(this.clear();++T<O;){var z=m[T];this.set(z[0],z[1])}}function To(){this.size=0,this.__data__={hash:new Eo,map:new(Xg||Gd),string:new Eo}}function VT(m){var T=cI(this,m).delete(m);return this.size-=T?1:0,T}function ZN(m){return cI(this,m).get(m)}function QN(m){return cI(this,m).has(m)}function XN(m,T){var O=cI(this,m),z=O.size;return O.set(m,T),this.size+=O.size==z?0:1,this}Qc.prototype.clear=To,Qc.prototype.delete=VT,Qc.prototype.get=ZN,Qc.prototype.has=QN,Qc.prototype.set=XN;function Ul(m){var T=-1,O=m==null?0:m.length;for(this.__data__=new Qc;++T<O;)this.add(m[T])}function Yx(m){return this.__data__.set(m,l),this}function jb(m){return this.__data__.has(m)}Ul.prototype.add=Ul.prototype.push=Yx,Ul.prototype.has=jb;function qo(m){var T=this.__data__=new Gd(m);this.size=T.size}function JN(){this.__data__=new Gd,this.size=0}function li(m){var T=this.__data__,O=T.delete(m);return this.size=T.size,O}function eM(m){return this.__data__.get(m)}function tM(m){return this.__data__.has(m)}function HT(m,T){var O=this.__data__;if(O instanceof Gd){var z=O.__data__;if(!Xg||z.length<i-1)return z.push([m,T]),this.size=++O.size,this;O=this.__data__=new Qc(z)}return O.set(m,T),this.size=O.size,this}qo.prototype.clear=JN,qo.prototype.delete=li,qo.prototype.get=eM,qo.prototype.has=tM,qo.prototype.set=HT;function Zx(m,T){var O=cr(m),z=!O&&wy(m),te=!O&&!z&&am(m),ge=!O&&!z&&!te&&Zb(m),Oe=O||z||te||ge,ke=Oe?F(m.length,NT):[],Ye=ke.length;for(var Ot in m)(T||Ci.call(m,Ot))&&!(Oe&&(Ot=="length"||te&&(Ot=="offset"||Ot=="parent")||ge&&(Ot=="buffer"||Ot=="byteLength"||Ot=="byteOffset")||Pp(Ot,Ye)))&&ke.push(Ot);return ke}function vy(m){var T=m.length;return T?m[ml(0,T-1)]:n}function nM(m,T){return dI(Au(m),Cp(T,0,m.length))}function Qx(m){return dI(Au(m))}function yy(m,T,O){(O!==n&&!Kd(m[T],O)||O===n&&!(T in m))&&Vl(m,T,O)}function wp(m,T,O){var z=m[T];(!(Ci.call(m,T)&&Kd(z,O))||O===n&&!(T in m))&&Vl(m,T,O)}function by(m,T){for(var O=m.length;O--;)if(Kd(m[O][0],T))return O;return-1}function rM(m,T,O,z){return io(m,function(te,ge,Oe){T(z,te,O(te),Oe)}),z}function _p(m,T){return m&&th(T,Ao(T),m)}function iM(m,T){return m&&th(T,_u(T),m)}function Vl(m,T,O){T=="__proto__"&&uy?uy(m,T,{configurable:!0,enumerable:!0,value:O,writable:!0}):m[T]=O}function jT(m,T){for(var O=-1,z=T.length,te=dt(z),ge=m==null;++O<z;)te[O]=ge?n:PM(m,T[O]);return te}function Cp(m,T,O){return m===m&&(O!==n&&(m=m<=O?m:O),T!==n&&(m=m>=T?m:T)),m}function Tu(m,T,O,z,te,ge){var Oe,ke=T&d,Ye=T&f,Ot=T&h;if(O&&(Oe=te?O(m,z,te,ge):O(m)),Oe!==n)return Oe;if(!ta(m))return m;var Lt=cr(m);if(Lt){if(Oe=tbe(m),!ke)return Au(m,Oe)}else{var Mt=vl(m),rn=Mt==ne||Mt==Ze;if(am(m))return bj(m,ke);if(Mt==Fe||Mt==ye||rn&&!te){if(Oe=Ye||rn?{}:$j(m),!ke)return Ye?z0e(m,iM(Oe,m)):j0e(m,_p(Oe,m))}else{if(!Nr[Mt])return te?m:{};Oe=nbe(m,Mt,ke)}}ge||(ge=new qo);var In=ge.get(m);
vendor: 7,638 bytes, line 87
87if(In)return In;ge.set(m,Oe),hz(m)?m.forEach(function(qn){Oe.add(Tu(qn,T,O,qn,m,ge))}):dz(m)&&m.forEach(function(qn,Br){Oe.set(Br,Tu(qn,T,O,Br,m,ge))});var Wn=Ot?Ye?mM:gM:Ye?_u:Ao,br=Lt?n:Wn(m);return Go(br||m,function(qn,Br){br&&(Br=qn,qn=m[Br]),wp(Oe,Br,Tu(qn,T,O,Br,m,ge))}),Oe}function sM(m){var T=Ao(m);return function(O){return Xx(O,m,T)}}function Xx(m,T,O){var z=O.length;if(m==null)return!z;for(m=Li(m);z--;){var te=O[z],ge=T[te],Oe=m[te];if(Oe===n&&!(te in m)||!ge(Oe))return!1}return!0}function Jx(m,T,O){if(typeof m!="function")throw new Wo(a);return QT(function(){m.apply(n,O)},T)}function tm(m,T,O,z){var te=-1,ge=gp,Oe=!0,ke=m.length,Ye=[],Ot=T.length;if(!ke)return Ye;O&&(T=vi(T,Te(O))),z?(ge=Jv,Oe=!1):T.length>=i&&(ge=Qt,Oe=!1,T=new Ul(T));e:for(;++te<ke;){var Lt=m[te],Mt=O==null?Lt:O(Lt);if(Lt=z||Lt!==0?Lt:0,Oe&&Mt===Mt){for(var rn=Ot;rn--;)if(T[rn]===Mt)continue e;Ye.push(Lt)}else ge(T,Mt,z)||Ye.push(Lt)}return Ye}var io=wj(Xc),zT=wj(y,!0);function aM(m,T){var O=!0;return io(m,function(z,te,ge){return O=!!T(z,te,ge),O}),O}function nm(m,T,O){for(var z=-1,te=m.length;++z<te;){var ge=m[z],Oe=T(ge);if(Oe!=null&&(ke===n?Oe===Oe&&!rc(Oe):O(Oe,ke)))var ke=Oe,Ye=ge}return Ye}function GT(m,T,O,z){var te=m.length;for(O=mr(O),O<0&&(O=-O>te?0:te+O),z=z===n||z>te?te:mr(z),z<0&&(z+=te),z=O>z?0:gz(z);O<z;)m[O++]=T;return m}function WT(m,T){var O=[];return io(m,function(z,te,ge){T(z,te,ge)&&O.push(z)}),O}function Zi(m,T,O,z,te){var ge=-1,Oe=m.length;for(O||(O=ibe),te||(te=[]);++ge<Oe;){var ke=m[ge];T>0&&O(ke)?T>1?Zi(ke,T-1,O,z,te):$l(te,ke):z||(te[te.length]=ke)}return te}var Sy=_j(),eI=_j(!0);function Xc(m,T){return m&&Sy(m,T,Ao)}function y(m,T){return m&&eI(m,T,Ao)}function p(m,T){return Fl(T,function(O){return Rp(m[O])})}function E(m,T){T=im(T,m);for(var O=0,z=T.length;m!=null&&O<z;)m=m[nh(T[O++])];return O&&O==z?m:n}function _(m,T,O){var z=T(m);return cr(m)?z:$l(z,O(m))}function R(m){return m==null?m===n?qe:se:eh&&eh in Li(m)?X0e(m):dbe(m)}function M(m,T){return m>T}function W(m,T){return m!=null&&Ci.call(m,T)}function J(m,T){return m!=null&&T in Li(m)}function re(m,T,O){return m>=xs(T,O)&&m<Yi(T,O)}function oe(m,T,O){for(var z=O?Jv:gp,te=m[0].length,ge=m.length,Oe=ge,ke=dt(ge),Ye=1/0,Ot=[];Oe--;){var Lt=m[Oe];Oe&&T&&(Lt=vi(Lt,Te(T))),Ye=xs(Lt.length,Ye),ke[Oe]=!O&&(T||te>=120&&Lt.length>=120)?new Ul(Oe&&Lt):n}Lt=m[0];var Mt=-1,rn=ke[0];e:for(;++Mt<te&&Ot.length<Ye;){var In=Lt[Mt],Wn=T?T(In):In;if(In=O||In!==0?In:0,!(rn?Qt(rn,Wn):z(Ot,Wn,O))){for(Oe=ge;--Oe;){var br=ke[Oe];if(!(br?Qt(br,Wn):z(m[Oe],Wn,O)))continue e}rn&&rn.push(Wn),Ot.push(In)}}return Ot}function he(m,T,O,z){return Xc(m,function(te,ge,Oe){T(z,O(te),ge,Oe)}),z}function ee(m,T,O){T=im(T,m),m=Hj(m,T);var z=m==null?m:m[nh(ed(T))];return z==null?n:za(z,m,O)}function Pe(m){return ga(m)&&R(m)==ye}function Se(m){return ga(m)&&R(m)==jt}function Ee(m){return ga(m)&&R(m)==Ve}function Ae(m,T,O,z,te){return m===T?!0:m==null||T==null||!ga(m)&&!ga(T)?m!==m&&T!==T:Ce(m,T,O,z,Ae,te)}function Ce(m,T,O,z,te,ge){var Oe=cr(m),ke=cr(T),Ye=Oe?fe:vl(m),Ot=ke?fe:vl(T);Ye=Ye==ye?Fe:Ye,Ot=Ot==ye?Fe:Ot;var Lt=Ye==Fe,Mt=Ot==Fe,rn=Ye==Ot;if(rn&&am(m)){if(!am(T))return!1;Oe=!0,Lt=!1}if(rn&&!Lt)return ge||(ge=new qo),Oe||Zb(m)?Nj(m,T,O,z,te,ge):Z0e(m,T,Ye,O,z,te,ge);if(!(O&g)){var In=Lt&&Ci.call(m,"__wrapped__"),Wn=Mt&&Ci.call(T,"__wrapped__");if(In||Wn){var br=In?m.value():m,qn=Wn?T.value():T;return ge||(ge=new qo),te(br,qn,O,z,ge)}}return rn?(ge||(ge=new qo),Q0e(m,T,O,z,te,ge)):!1}function Ge(m){return ga(m)&&vl(m)==lt}function vt(m,T,O,z){var te=O.length,ge=te,Oe=!z;if(m==null)return!ge;for(m=Li(m);te--;){var ke=O[te];if(Oe&&ke[2]?ke[1]!==m[ke[0]]:!(ke[0]in m))return!1}for(;++te<ge;){ke=O[te];var Ye=ke[0],Ot=m[Ye],Lt=ke[1];if(Oe&&ke[2]){if(Ot===n&&!(Ye in m))return!1}else{var Mt=new qo;if(z)var rn=z(Ot,Lt,Ye,m,T,Mt);if(!(rn===n?Ae(Lt,Ot,g|v,z,Mt):rn))return!1}}return!0}function Ft(m){if(!ta(m)||abe(m))return!1;var T=Rp(m)?Mx:yo;return T.test(Ay(m))}function kt(m){return ga(m)&&R(m)==pt}function At(m){return ga(m)&&vl(m)==me}function Ie(m){return ga(m)&&vI(m.length)&&!!oi[R(m)]}function Xe(m){return typeof m=="function"?m:m==null?Cu:typeof m=="object"?cr(m)?It(m[0],m[1]):xe(m):Cz(m)}function He(m){if(!ZT(m))return HN(m);var T=[];for(var O in Li(m))Ci.call(m,O)&&O!="constructor"&&T.push(O);return T}function bt(m){if(!ta(m))return cbe(m);var T=ZT(m),O=[];for(var z in m)z=="constructor"&&(T||!Ci.call(m,z))||O.push(z);return O}function Ke(m,T){return m<T}function nt(m,T){var O=-1,z=wu(m)?dt(m.length):[];return io(m,function(te,ge,Oe){z[++O]=T(te,ge,Oe)}),z}function xe(m){var T=yM(m);return T.length==1&&T[0][2]?Uj(T[0][0],T[0][1]):function(O){return O===m||vt(O,m,T)}}function It(m,T){return SM(m)&&Bj(T)?Uj(nh(m),T):function(O){var z=PM(O,m);return z===n&&z===T?RM(O,m):Ae(T,z,g|v)}}function Je(m,T,O,z,te){m!==T&&Sy(T,function(ge,Oe){if(te||(te=new qo),ta(ge))ft(m,T,Oe,O,Je,z,te);else{var ke=z?z(TM(m,Oe),ge,Oe+"",m,T,te):n;ke===n&&(ke=ge),yy(m,Oe,ke)}},_u)}function ft(m,T,O,z,te,ge,Oe){var ke=TM(m,O),Ye=TM(T,O),Ot=Oe.get(Ye);if(Ot){yy(m,O,Ot);return}var Lt=ge?ge(ke,Ye,O+"",m,T,Oe):n,Mt=Lt===n;if(Mt){var rn=cr(Ye),In=!rn&&am(Ye),Wn=!rn&&!In&&Zb(Ye);Lt=Ye,rn||In||Wn?cr(ke)?Lt=ke:_a(ke)?Lt=Au(ke):In?(Mt=!1,Lt=bj(Ye,!0)):Wn?(Mt=!1,Lt=Sj(Ye,!0)):Lt=[]:XT(Ye)||wy(Ye)?(Lt=ke,wy(ke)?Lt=mz(ke):(!ta(ke)||Rp(ke))&&(Lt=$j(Ye))):Mt=!1}Mt&&(Oe.set(Ye,Lt),te(Lt,Ye,z,ge,Oe),Oe.delete(Ye)),yy(m,O,Lt)}function xt(m,T){var O=m.length;if(O)return T+=T<0?O:0,Pp(T,O)?m[T]:n}function Nt(m,T,O){T.length?T=vi(T,function(ge){return cr(ge)?function(Oe){return E(Oe,ge.length===1?ge[0]:ge)}:ge}):T=[Cu];var z=-1;T=vi(T,Te(jn()));var te=nt(m,function(ge,Oe,ke){var Ye=vi(T,function(Ot){return Ot(ge)});return{criteria:Ye,index:++z,value:ge}});return Rb(te,function(ge,Oe){return H0e(ge,Oe,O)})}function Gr(m,T){return fs(m,T,function(O,z){return RM(m,z)})}function fs(m,T,O){for(var z=-1,te=T.length,ge={};++z<te;){var Oe=T[z],ke=E(m,Oe);O(ke,Oe)&&xp(ge,im(Oe,m),ke)}return ge}function Is(m){return function(T){return E(T,m)}}function tc(m,T,O,z){var te=z?Ju:ir,ge=-1,Oe=T.length,ke=m;for(m===T&&(T=Au(T)),O&&(ke=vi(m,Te(O)));++ge<Oe;)for(var Ye=0,Ot=T[ge],Lt=O?O(Ot):Ot;(Ye=te(ke,Lt,Ye,z))>-1;)ke!==m&&Qg.call(ke,Ye,1),Qg.call(m,Ye,1);return m}function qd(m,T){for(var O=m?T.length:0,z=O-1;O--;){var te=T[O];if(O==z||te!==ge){var ge=te;Pp(te)?Qg.call(m,te,1):lM(m,te)}}return m}function ml(m,T){return m+dy(jx()*(T-m+1))}function Jc(m,T,O,z){for(var te=-1,ge=Yi(cy((T-m)/(O||1)),0),Oe=dt(ge);ge--;)Oe[z?ge:++te]=m,m+=O;return Oe}function zb(m,T){var O="";if(!m||T<1||T>G)return O;do T%2&&(O+=m),T=dy(T/2),T&&(m+=m);while(T);return O}function hr(m,T){return AM(Vj(m,T,Cu),m+"")}function Ey(m){return vy(Qb(m))}function tI(m,T){var O=Qb(m);return dI(O,Cp(T,0,O.length))}function xp(m,T,O,z){if(!ta(m))return m;T=im(T,m);for(var te=-1,ge=T.length,Oe=ge-1,ke=m;ke!=null&&++te<ge;){var Ye=nh(T[te]),Ot=O;if(Ye==="__proto__"||Ye==="constructor"||Ye==="prototype")return m;if(te!=Oe){var Lt=ke[Ye];Ot=z?z(Lt,Ye,ke):n,Ot===n&&(Ot=ta(Lt)?Lt:Pp(T[te+1])?[]:{})}wp(ke,Ye,Ot),ke=ke[Ye]}return m}var Gb=Fb?function(m,T){return Fb.set(m,T),m}:Cu,Wb=uy?function(m,T){return uy(m,"toString",{configurable:!0,enumerable:!1,value:DM(T),writable:!0})}:Cu;function qT(m){return dI(Qb(m))}function Qr(m,T,O){var z=-1,te=m.length;T<0&&(T=-T>te?0:te+T),O=O>te?te:O,O<0&&(O+=te),te=T>O?0:O-T>>>0,T>>>=0;for(var ge=dt(te);++z<te;)ge[z]=m[z+T];return ge}function KT(m,T){var O;return io(m,function(z,te,ge){return O=T(z,te,ge),!O}),!!O}function nI(m,T,O){var z=0,te=m==null?z:m.length;if(typeof T=="number"&&T===T&&te<=de){for(;z<te;){var ge=z+te>>>1,Oe=m[ge];
vendor: 6,712 bytes, line 87
87Oe!==null&&!rc(Oe)&&(O?Oe<=T:Oe<T)?z=ge+1:te=ge}return te}return oM(m,T,Cu,O)}function oM(m,T,O,z){var te=0,ge=m==null?0:m.length;if(ge===0)return 0;T=O(T);for(var Oe=T!==T,ke=T===null,Ye=rc(T),Ot=T===n;te<ge;){var Lt=dy((te+ge)/2),Mt=O(m[Lt]),rn=Mt!==n,In=Mt===null,Wn=Mt===Mt,br=rc(Mt);if(Oe)var qn=z||Wn;else Ot?qn=Wn&&(z||rn):ke?qn=Wn&&rn&&(z||!In):Ye?qn=Wn&&rn&&!In&&(z||!br):In||br?qn=!1:qn=z?Mt<=T:Mt<T;qn?te=Lt+1:ge=Lt}return xs(ge,Q)}function hj(m,T){for(var O=-1,z=m.length,te=0,ge=[];++O<z;){var Oe=m[O],ke=T?T(Oe):Oe;if(!O||!Kd(ke,Ye)){var Ye=ke;ge[te++]=Oe===0?0:Oe}}return ge}function pj(m){return typeof m=="number"?m:rc(m)?ae:+m}function nc(m){if(typeof m=="string")return m;if(cr(m))return vi(m,nc)+"";if(rc(m))return zx?zx.call(m):"";var T=m+"";return T=="0"&&1/m==-X?"-0":T}function rm(m,T,O){var z=-1,te=gp,ge=m.length,Oe=!0,ke=[],Ye=ke;if(O)Oe=!1,te=Jv;else if(ge>=i){var Ot=T?null:K0e(m);if(Ot)return ty(Ot);Oe=!1,te=Qt,Ye=new Ul}else Ye=T?[]:ke;e:for(;++z<ge;){var Lt=m[z],Mt=T?T(Lt):Lt;if(Lt=O||Lt!==0?Lt:0,Oe&&Mt===Mt){for(var rn=Ye.length;rn--;)if(Ye[rn]===Mt)continue e;T&&Ye.push(Mt),ke.push(Lt)}else te(Ye,Mt,O)||(Ye!==ke&&Ye.push(Mt),ke.push(Lt))}return ke}function lM(m,T){return T=im(T,m),m=Hj(m,T),m==null||delete m[nh(ed(T))]}function gj(m,T,O,z){return xp(m,T,O(E(m,T)),z)}function rI(m,T,O,z){for(var te=m.length,ge=z?te:-1;(z?ge--:++ge<te)&&T(m[ge],ge,m););return O?Qr(m,z?0:ge,z?ge+1:te):Qr(m,z?ge+1:0,z?te:ge)}function mj(m,T){var O=m;return O instanceof Or&&(O=O.value()),ey(T,function(z,te){return te.func.apply(te.thisArg,$l([z],te.args))},O)}function uM(m,T,O){var z=m.length;if(z<2)return z?rm(m[0]):[];for(var te=-1,ge=dt(z);++te<z;)for(var Oe=m[te],ke=-1;++ke<z;)ke!=te&&(ge[te]=tm(ge[te]||Oe,m[ke],T,O));return rm(Zi(ge,1),T,O)}function vj(m,T,O){for(var z=-1,te=m.length,ge=T.length,Oe={};++z<te;){var ke=z<ge?T[z]:n;O(Oe,m[z],ke)}return Oe}function cM(m){return _a(m)?m:[]}function dM(m){return typeof m=="function"?m:Cu}function im(m,T){return cr(m)?m:SM(m,T)?[m]:Wj(Di(m))}var $0e=hr;function sm(m,T,O){var z=m.length;return O=O===n?z:O,!T&&O>=z?m:Qr(m,T,O)}var yj=$x||function(m){return Ri.clearTimeout(m)};function bj(m,T){if(T)return m.slice();var O=m.length,z=Fx?Fx(O):new m.constructor(O);return m.copy(z),z}function fM(m){var T=new m.constructor(m.byteLength);return new Bl(T).set(new Bl(m)),T}function B0e(m,T){var O=T?fM(m.buffer):m.buffer;return new m.constructor(O,m.byteOffset,m.byteLength)}function U0e(m){var T=new m.constructor(m.source,lp.exec(m));return T.lastIndex=m.lastIndex,T}function V0e(m){return gy?Li(gy.call(m)):{}}function Sj(m,T){var O=T?fM(m.buffer):m.buffer;return new m.constructor(O,m.byteOffset,m.length)}function Ej(m,T){if(m!==T){var O=m!==n,z=m===null,te=m===m,ge=rc(m),Oe=T!==n,ke=T===null,Ye=T===T,Ot=rc(T);if(!ke&&!Ot&&!ge&&m>T||ge&&Oe&&Ye&&!ke&&!Ot||z&&Oe&&Ye||!O&&Ye||!te)return 1;if(!z&&!ge&&!Ot&&m<T||Ot&&O&&te&&!z&&!ge||ke&&O&&te||!Oe&&te||!Ye)return-1}return 0}function H0e(m,T,O){for(var z=-1,te=m.criteria,ge=T.criteria,Oe=te.length,ke=O.length;++z<Oe;){var Ye=Ej(te[z],ge[z]);if(Ye){if(z>=ke)return Ye;var Ot=O[z];return Ye*(Ot=="desc"?-1:1)}}return m.index-T.index}function Tj(m,T,O,z){for(var te=-1,ge=m.length,Oe=O.length,ke=-1,Ye=T.length,Ot=Yi(ge-Oe,0),Lt=dt(Ye+Ot),Mt=!z;++ke<Ye;)Lt[ke]=T[ke];for(;++te<Oe;)(Mt||te<ge)&&(Lt[O[te]]=m[te]);for(;Ot--;)Lt[ke++]=m[te++];return Lt}function Aj(m,T,O,z){for(var te=-1,ge=m.length,Oe=-1,ke=O.length,Ye=-1,Ot=T.length,Lt=Yi(ge-ke,0),Mt=dt(Lt+Ot),rn=!z;++te<Lt;)Mt[te]=m[te];for(var In=te;++Ye<Ot;)Mt[In+Ye]=T[Ye];for(;++Oe<ke;)(rn||te<ge)&&(Mt[In+O[Oe]]=m[te++]);return Mt}function Au(m,T){var O=-1,z=m.length;for(T||(T=dt(z));++O<z;)T[O]=m[O];return T}function th(m,T,O,z){var te=!O;O||(O={});for(var ge=-1,Oe=T.length;++ge<Oe;){var ke=T[ge],Ye=z?z(O[ke],m[ke],ke,O,m):n;Ye===n&&(Ye=m[ke]),te?Vl(O,ke,Ye):wp(O,ke,Ye)}return O}function j0e(m,T){return th(m,bM(m),T)}function z0e(m,T){return th(m,Mj(m),T)}function iI(m,T){return function(O,z){var te=cr(O)?DT:rM,ge=T?T():{};return te(O,m,jn(z,2),ge)}}function qb(m){return hr(function(T,O){var z=-1,te=O.length,ge=te>1?O[te-1]:n,Oe=te>2?O[2]:n;for(ge=m.length>3&&typeof ge=="function"?(te--,ge):n,Oe&&Hl(O[0],O[1],Oe)&&(ge=te<3?n:ge,te=1),T=Li(T);++z<te;){var ke=O[z];ke&&m(T,ke,z,ge)}return T})}function wj(m,T){return function(O,z){if(O==null)return O;if(!wu(O))return m(O,z);for(var te=O.length,ge=T?te:-1,Oe=Li(O);(T?ge--:++ge<te)&&z(Oe[ge],ge,Oe)!==!1;);return O}}function _j(m){return function(T,O,z){for(var te=-1,ge=Li(T),Oe=z(T),ke=Oe.length;ke--;){var Ye=Oe[m?ke:++te];if(O(ge[Ye],Ye,ge)===!1)break}return T}}function G0e(m,T,O){var z=T&b,te=YT(m);function ge(){var Oe=this&&this!==Ri&&this instanceof ge?te:m;return Oe.apply(z?O:this,arguments)}return ge}function Cj(m){return function(T){T=Di(T);var O=un(T)?Su(T):n,z=O?O[0]:T.charAt(0),te=O?sm(O,1).join(""):T.slice(1);return z[m]()+te}}function Kb(m){return function(T){return ey(wz(Az(T).replace(Ki,"")),m,"")}}function YT(m){return function(){var T=arguments;switch(T.length){case 0:return new m;case 1:return new m(T[0]);case 2:return new m(T[0],T[1]);case 3:return new m(T[0],T[1],T[2]);case 4:return new m(T[0],T[1],T[2],T[3]);case 5:return new m(T[0],T[1],T[2],T[3],T[4]);case 6:return new m(T[0],T[1],T[2],T[3],T[4],T[5]);case 7:return new m(T[0],T[1],T[2],T[3],T[4],T[5],T[6])}var O=em(m.prototype),z=m.apply(O,T);return ta(z)?z:O}}function W0e(m,T,O){var z=YT(m);function te(){for(var ge=arguments.length,Oe=dt(ge),ke=ge,Ye=Yb(te);ke--;)Oe[ke]=arguments[ke];var Ot=ge<3&&Oe[0]!==Ye&&Oe[ge-1]!==Ye?[]:ec(Oe,Ye);if(ge-=Ot.length,ge<O)return Rj(m,T,sI,te.placeholder,n,Oe,Ot,n,n,O-ge);var Lt=this&&this!==Ri&&this instanceof te?z:m;return za(Lt,this,Oe)}return te}function xj(m){return function(T,O,z){var te=Li(T);if(!wu(T)){var ge=jn(O,3);T=Ao(T),O=function(ke){return ge(te[ke],ke,te)}}var Oe=m(T,O,z);return Oe>-1?te[ge?T[Oe]:Oe]:n}}function Ij(m){return Op(function(T){var O=T.length,z=O,te=Eu.prototype.thru;for(m&&T.reverse();z--;){var ge=T[z];if(typeof ge!="function")throw new Wo(a);if(te&&!Oe&&uI(ge)=="wrapper")var Oe=new Eu([],!0)}for(z=Oe?z:O;++z<O;){ge=T[z];var ke=uI(ge),Ye=ke=="wrapper"?vM(ge):n;Ye&&EM(Ye[0])&&Ye[1]==(k|w|P|U)&&!Ye[4].length&&Ye[9]==1?Oe=Oe[uI(Ye[0])].apply(Oe,Ye[3]):Oe=ge.length==1&&EM(ge)?Oe[ke]():Oe.thru(ge)}return function(){var Ot=arguments,Lt=Ot[0];if(Oe&&Ot.length==1&&cr(Lt))return Oe.plant(Lt).value();for(var Mt=0,rn=O?T[Mt].apply(this,Ot):Lt;++Mt<O;)rn=T[Mt].call(this,rn);return rn}})}function sI(m,T,O,z,te,ge,Oe,ke,Ye,Ot){var Lt=T&k,Mt=T&b,rn=T&S,In=T&(w|x),Wn=T&H,br=rn?n:YT(m);function qn(){for(var Br=arguments.length,Xr=dt(Br),ic=Br;ic--;)Xr[ic]=arguments[ic];if(In)var jl=Yb(qn),sc=Jn(Xr,jl);
vendor: 4,842 bytes, line 87
87if(z&&(Xr=Tj(Xr,z,te,In)),ge&&(Xr=Aj(Xr,ge,Oe,In)),Br-=sc,In&&Br<Ot){var Ca=ec(Xr,jl);return Rj(m,T,sI,qn.placeholder,O,Xr,Ca,ke,Ye,Ot-Br)}var Yd=Mt?O:this,Dp=rn?Yd[m]:m;return Br=Xr.length,ke?Xr=fbe(Xr,ke):Wn&&Br>1&&Xr.reverse(),Lt&&Ye<Br&&(Xr.length=Ye),this&&this!==Ri&&this instanceof qn&&(Dp=br||YT(Dp)),Dp.apply(Yd,Xr)}return qn}function Oj(m,T){return function(O,z){return he(O,m,T(z),{})}}function aI(m,T){return function(O,z){var te;if(O===n&&z===n)return T;if(O!==n&&(te=O),z!==n){if(te===n)return z;typeof O=="string"||typeof z=="string"?(O=nc(O),z=nc(z)):(O=pj(O),z=pj(z)),te=m(O,z)}return te}}function hM(m){return Op(function(T){return T=vi(T,Te(jn())),hr(function(O){var z=this;return m(T,function(te){return za(te,z,O)})})})}function oI(m,T){T=T===n?" ":nc(T);var O=T.length;if(O<2)return O?zb(T,m):T;var z=zb(T,cy(m/Yg(T)));return un(T)?sm(Su(z),0,m).join(""):z.slice(0,m)}function q0e(m,T,O,z){var te=T&b,ge=YT(m);function Oe(){for(var ke=-1,Ye=arguments.length,Ot=-1,Lt=z.length,Mt=dt(Lt+Ye),rn=this&&this!==Ri&&this instanceof Oe?ge:m;++Ot<Lt;)Mt[Ot]=z[Ot];for(;Ye--;)Mt[Ot++]=arguments[++ke];return za(rn,te?O:this,Mt)}return Oe}function Pj(m){return function(T,O,z){return z&&typeof z!="number"&&Hl(T,O,z)&&(O=z=n),T=Lp(T),O===n?(O=T,T=0):O=Lp(O),z=z===n?T<O?1:-1:Lp(z),Jc(T,O,z,m)}}function lI(m){return function(T,O){return typeof T=="string"&&typeof O=="string"||(T=td(T),O=td(O)),m(T,O)}}function Rj(m,T,O,z,te,ge,Oe,ke,Ye,Ot){var Lt=T&w,Mt=Lt?Oe:n,rn=Lt?n:Oe,In=Lt?ge:n,Wn=Lt?n:ge;T|=Lt?P:N,T&=~(Lt?N:P),T&A||(T&=-4);var br=[m,T,te,In,Mt,Wn,rn,ke,Ye,Ot],qn=O.apply(n,br);return EM(m)&&jj(qn,br),qn.placeholder=z,zj(qn,m,T)}function pM(m){var T=js[m];return function(O,z){if(O=td(O),z=z==null?0:xs(mr(z),292),z&&BT(O)){var te=(Di(O)+"e").split("e"),ge=T(te[0]+"e"+(+te[1]+z));return te=(Di(ge)+"e").split("e"),+(te[0]+"e"+(+te[1]-z))}return T(O)}}var K0e=zd&&1/ty(new zd([,-0]))[1]==X?function(m){return new zd(m)}:MM;function Lj(m){return function(T){var O=vl(T);return O==lt?ea(T):O==me?Lb(T):K(T,m(T))}}function Ip(m,T,O,z,te,ge,Oe,ke){var Ye=T&S;if(!Ye&&typeof m!="function")throw new Wo(a);var Ot=z?z.length:0;if(Ot||(T&=-97,z=te=n),Oe=Oe===n?Oe:Yi(mr(Oe),0),ke=ke===n?ke:mr(ke),Ot-=te?te.length:0,T&N){var Lt=z,Mt=te;z=te=n}var rn=Ye?n:vM(m),In=[m,T,O,z,te,Lt,Mt,ge,Oe,ke];if(rn&&ube(In,rn),m=In[0],T=In[1],O=In[2],z=In[3],te=In[4],ke=In[9]=In[9]===n?Ye?0:m.length:Yi(In[9]-Ot,0),!ke&&T&(w|x)&&(T&=-25),!T||T==b)var Wn=G0e(m,T,O);else T==w||T==x?Wn=W0e(m,T,ke):(T==P||T==(b|P))&&!te.length?Wn=q0e(m,T,O,z):Wn=sI.apply(n,In);var br=rn?Gb:jj;return zj(br(Wn,In),m,T)}function Dj(m,T,O,z){return m===n||Kd(m,Yc[O])&&!Ci.call(z,O)?T:m}function kj(m,T,O,z,te,ge){return ta(m)&&ta(T)&&(ge.set(T,m),Je(m,T,n,kj,ge),ge.delete(T)),m}function Y0e(m){return XT(m)?n:m}function Nj(m,T,O,z,te,ge){var Oe=O&g,ke=m.length,Ye=T.length;if(ke!=Ye&&!(Oe&&Ye>ke))return!1;var Ot=ge.get(m),Lt=ge.get(T);if(Ot&&Lt)return Ot==T&&Lt==m;var Mt=-1,rn=!0,In=O&v?new Ul:n;for(ge.set(m,T),ge.set(T,m);++Mt<ke;){var Wn=m[Mt],br=T[Mt];if(z)var qn=Oe?z(br,Wn,Mt,T,m,ge):z(Wn,br,Mt,m,T,ge);if(qn!==n){if(qn)continue;rn=!1;break}if(In){if(!vp(T,function(Br,Xr){if(!Qt(In,Xr)&&(Wn===Br||te(Wn,Br,O,z,ge)))return In.push(Xr)})){rn=!1;break}}else if(!(Wn===br||te(Wn,br,O,z,ge))){rn=!1;break}}return ge.delete(m),ge.delete(T),rn}function Z0e(m,T,O,z,te,ge,Oe){switch(O){case on:if(m.byteLength!=T.byteLength||m.byteOffset!=T.byteOffset)return!1;m=m.buffer,T=T.buffer;case jt:return!(m.byteLength!=T.byteLength||!ge(new Bl(m),new Bl(T)));case Le:case Ve:case ot:return Kd(+m,+T);case Et:return m.name==T.name&&m.message==T.message;case pt:case De:return m==T+"";case lt:var ke=ea;case me:var Ye=z&g;if(ke||(ke=ty),m.size!=T.size&&!Ye)return!1;var Ot=Oe.get(m);if(Ot)return Ot==T;z|=v,Oe.set(m,T);var Lt=Nj(ke(m),ke(T),z,te,ge,Oe);return Oe.delete(m),Lt;case Me:if(gy)return gy.call(m)==gy.call(T)}return!1}function Q0e(m,T,O,z,te,ge){var Oe=O&g,ke=gM(m),Ye=ke.length,Ot=gM(T),Lt=Ot.length;if(Ye!=Lt&&!Oe)return!1;for(var Mt=Ye;Mt--;){var rn=ke[Mt];if(!(Oe?rn in T:Ci.call(T,rn)))return!1}var In=ge.get(m),Wn=ge.get(T);if(In&&Wn)return In==T&&Wn==m;var br=!0;ge.set(m,T),ge.set(T,m);for(var qn=Oe;++Mt<Ye;){rn=ke[Mt];var Br=m[rn],Xr=T[rn];if(z)var ic=Oe?z(Xr,Br,rn,T,m,ge):z(Br,Xr,rn,m,T,ge);if(!(ic===n?Br===Xr||te(Br,Xr,O,z,ge):ic)){br=!1;break}qn||(qn=rn=="constructor")}if(br&&!qn){var jl=m.constructor,sc=T.constructor;jl!=sc&&"constructor"in m&&"constructor"in T&&!(typeof jl=="function"&&jl instanceof jl&&typeof sc=="function"&&sc instanceof sc)&&(br=!1)}return ge.delete(m),ge.delete(T),br}function Op(m){return AM(Vj(m,n,Zj),m+"")}function gM(m){return _(m,Ao,bM)}function mM(m){return _(m,_u,Mj)}var vM=Fb?function(m){return Fb.get(m)}:MM;function uI(m){for(var T=m.name+"",O=Jg[T],z=Ci.call(Jg,T)?O.length:0;z--;){var te=O[z],ge=te.func;
vendor: 5,811 bytes, lines 87-89
87if(ge==null||ge==m)return te.name}return T}function Yb(m){var T=Ci.call(ce,"placeholder")?ce:m;return T.placeholder}function jn(){var m=ce.iteratee||kM;return m=m===kM?Xe:m,arguments.length?m(arguments[0],arguments[1]):m}function cI(m,T){var O=m.__data__;return sbe(T)?O[typeof T=="string"?"string":"hash"]:O.map}function yM(m){for(var T=Ao(m),O=T.length;O--;){var z=T[O],te=m[z];T[O]=[z,te,Bj(te)]}return T}function Ty(m,T){var O=Kc(m,T);return Ft(O)?O:n}function X0e(m){var T=Ci.call(m,eh),O=m[eh];try{m[eh]=n;var z=!0}catch{}var te=Zg.call(m);return z&&(T?m[eh]=O:delete m[eh]),te}var bM=FT?function(m){return m==null?[]:(m=Li(m),Fl(FT(m),function(T){return Mb.call(m,T)}))}:FM,Mj=FT?function(m){for(var T=[];m;)$l(T,bM(m)),m=ly(m);return T}:FM,vl=R;(hy&&vl(new hy(new ArrayBuffer(1)))!=on||Xg&&vl(new Xg)!=lt||py&&vl(py.resolve())!=ht||zd&&vl(new zd)!=me||Tp&&vl(new Tp)!=ut)&&(vl=function(m){var T=R(m),O=T==Fe?m.constructor:n,z=O?Ay(O):"";if(z)switch(z){case $b:return on;case Bb:return lt;case jN:return ht;case zN:return me;case GN:return ut}return T});function J0e(m,T,O){for(var z=-1,te=O.length;++z<te;){var ge=O[z],Oe=ge.size;switch(ge.type){case"drop":m+=Oe;break;case"dropRight":T-=Oe;break;case"take":T=xs(T,m+Oe);break;case"takeRight":m=Yi(m,T-Oe);break}}return{start:m,end:T}}function ebe(m){var T=m.match(Va);return T?T[1].split(cs):[]}function Fj(m,T,O){T=im(T,m);for(var z=-1,te=T.length,ge=!1;++z<te;){var Oe=nh(T[z]);if(!(ge=m!=null&&O(m,Oe)))break;m=m[Oe]}return ge||++z!=te?ge:(te=m==null?0:m.length,!!te&&vI(te)&&Pp(Oe,te)&&(cr(m)||wy(m)))}function tbe(m){var T=m.length,O=new m.constructor(T);return T&&typeof m[0]=="string"&&Ci.call(m,"index")&&(O.index=m.index,O.input=m.input),O}function $j(m){return typeof m.constructor=="function"&&!ZT(m)?em(ly(m)):{}}function nbe(m,T,O){var z=m.constructor;switch(T){case jt:return fM(m);case Le:case Ve:return new z(+m);case on:return B0e(m,O);case wn:case kr:case Ir:case gi:case Ln:case Ua:case Qe:case Ue:case Rt:return Sj(m,O);case lt:return new z;case ot:case De:return new z(m);case pt:return U0e(m);case me:return new z;case Me:return V0e(m)}}function rbe(m,T){var O=T.length;if(!O)return m;var z=O-1;return T[z]=(O>1?"& ":"")+T[z],T=T.join(O>2?", ":" "),m.replace($s,`{
88/* [wrapped with `+T+`] */
89`)}function ibe(m){return cr(m)||wy(m)||!!(Ep&&m&&m[Ep])}function Pp(m,T){var O=typeof m;return T=T??G,!!T&&(O=="number"||O!="symbol"&&An.test(m))&&m>-1&&m%1==0&&m<T}function Hl(m,T,O){if(!ta(O))return!1;var z=typeof T;return(z=="number"?wu(O)&&Pp(T,O.length):z=="string"&&T in O)?Kd(O[T],m):!1}function SM(m,T){if(cr(m))return!1;var O=typeof m;return O=="number"||O=="symbol"||O=="boolean"||m==null||rc(m)?!0:as.test(m)||!jr.test(m)||T!=null&&m in Li(T)}function sbe(m){var T=typeof m;return T=="string"||T=="number"||T=="symbol"||T=="boolean"?m!=="__proto__":m===null}function EM(m){var T=uI(m),O=ce[T];if(typeof O!="function"||!(T in Or.prototype))return!1;if(m===O)return!0;var z=vM(O);return!!z&&m===z[0]}function abe(m){return!!Nx&&Nx in m}var obe=ay?Rp:$M;function ZT(m){var T=m&&m.constructor,O=typeof T=="function"&&T.prototype||Yc;return m===O}function Bj(m){return m===m&&!ta(m)}function Uj(m,T){return function(O){return O==null?!1:O[m]===T&&(T!==n||m in Li(O))}}function lbe(m){var T=gI(m,function(z){return O.size===u&&O.clear(),z}),O=T.cache;return T}function ube(m,T){var O=m[1],z=T[1],te=O|z,ge=te<(b|S|k),Oe=z==k&&O==w||z==k&&O==U&&m[7].length<=T[8]||z==(k|U)&&T[7].length<=T[8]&&O==w;if(!(ge||Oe))return m;z&b&&(m[2]=T[2],te|=O&b?0:A);var ke=T[3];if(ke){var Ye=m[3];m[3]=Ye?Tj(Ye,ke,T[4]):ke,m[4]=Ye?ec(m[3],c):T[4]}return ke=T[5],ke&&(Ye=m[5],m[5]=Ye?Aj(Ye,ke,T[6]):ke,m[6]=Ye?ec(m[5],c):T[6]),ke=T[7],ke&&(m[7]=ke),z&k&&(m[8]=m[8]==null?T[8]:xs(m[8],T[8])),m[9]==null&&(m[9]=T[9]),m[0]=T[0],m[1]=te,m}function cbe(m){var T=[];if(m!=null)for(var O in Li(m))T.push(O);return T}function dbe(m){return Zg.call(m)}function Vj(m,T,O){return T=Yi(T===n?m.length-1:T,0),function(){for(var z=arguments,te=-1,ge=Yi(z.length-T,0),Oe=dt(ge);++te<ge;)Oe[te]=z[T+te];te=-1;for(var ke=dt(T+1);++te<T;)ke[te]=z[te];return ke[T]=O(Oe),za(m,this,ke)}}function Hj(m,T){return T.length<2?m:E(m,Qr(T,0,-1))}function fbe(m,T){for(var O=m.length,z=xs(T.length,O),te=Au(m);z--;){var ge=T[z];m[z]=Pp(ge,O)?te[ge]:n}return m}function TM(m,T){if(!(T==="constructor"&&typeof m[T]=="function")&&T!="__proto__")return m[T]}var jj=Gj(Gb),QT=Bx||function(m,T){return Ri.setTimeout(m,T)},AM=Gj(Wb);function zj(m,T,O){var z=T+"";return AM(m,rbe(z,hbe(ebe(z),O)))}function Gj(m){var T=0,O=0;return function(){var z=Vx(),te=C-(z-O);if(O=z,te>0){if(++T>=Z)return arguments[0]}else T=0;return m.apply(n,arguments)}}function dI(m,T){var O=-1,z=m.length,te=z-1;for(T=T===n?z:T;++O<T;){var ge=ml(O,te),Oe=m[ge];m[ge]=m[O],m[O]=Oe}return m.length=T,m}var Wj=lbe(function(m){var T=[];return m.charCodeAt(0)===46&&T.push(""),m.replace(ci,function(O,z,te,ge){T.push(te?ge.replace(Qu,"$1"):z||O)}),T});function nh(m){if(typeof m=="string"||rc(m))return m;var T=m+"";return T=="0"&&1/m==-X?"-0":T}function Ay(m){if(m!=null){try{return kb.call(m)}catch{}try{return m+""}catch{}}return""}function hbe(m,T){return Go(le,function(O){var z="_."+O[0];T&O[1]&&!gp(m,z)&&m.push(z)}),m.sort()}function qj(m){if(m instanceof Or)return m.clone();var T=new Eu(m.__wrapped__,m.__chain__);return T.__actions__=Au(m.__actions__),T.__index__=m.__index__,T.__values__=m.__values__,T}function pbe(m,T,O){(O?Hl(m,T,O):T===n)?T=1:T=Yi(mr(T),0);var z=m==null?0:m.length;if(!z||T<1)return[];for(var te=0,ge=0,Oe=dt(cy(z/T));te<z;)Oe[ge++]=Qr(m,te,te+=T);return Oe}function gbe(m){for(var T=-1,O=m==null?0:m.length,z=0,te=[];++T<O;){var ge=m[T];ge&&(te[z++]=ge)}return te}function mbe(){var m=arguments.length;if(!m)return[];for(var T=dt(m-1),O=arguments[0],z=m;z--;)T[z-1]=arguments[z];
vendor: 11,923 bytes, line 89
89return $l(cr(O)?Au(O):[O],Zi(T,1))}var vbe=hr(function(m,T){return _a(m)?tm(m,Zi(T,1,_a,!0)):[]}),ybe=hr(function(m,T){var O=ed(T);return _a(O)&&(O=n),_a(m)?tm(m,Zi(T,1,_a,!0),jn(O,2)):[]}),bbe=hr(function(m,T){var O=ed(T);return _a(O)&&(O=n),_a(m)?tm(m,Zi(T,1,_a,!0),n,O):[]});function Sbe(m,T,O){var z=m==null?0:m.length;return z?(T=O||T===n?1:mr(T),Qr(m,T<0?0:T,z)):[]}function Ebe(m,T,O){var z=m==null?0:m.length;return z?(T=O||T===n?1:mr(T),T=z-T,Qr(m,0,T<0?0:T)):[]}function Tbe(m,T){return m&&m.length?rI(m,jn(T,3),!0,!0):[]}function Abe(m,T){return m&&m.length?rI(m,jn(T,3),!0):[]}function wbe(m,T,O,z){var te=m==null?0:m.length;return te?(O&&typeof O!="number"&&Hl(m,T,O)&&(O=0,z=te),GT(m,T,O,z)):[]}function Kj(m,T,O){var z=m==null?0:m.length;if(!z)return-1;var te=O==null?0:mr(O);return te<0&&(te=Yi(z+te,0)),zr(m,jn(T,3),te)}function Yj(m,T,O){var z=m==null?0:m.length;if(!z)return-1;var te=z-1;return O!==n&&(te=mr(O),te=O<0?Yi(z+te,0):xs(te,z-1)),zr(m,jn(T,3),te,!0)}function Zj(m){var T=m==null?0:m.length;return T?Zi(m,1):[]}function _be(m){var T=m==null?0:m.length;return T?Zi(m,X):[]}function Cbe(m,T){var O=m==null?0:m.length;return O?(T=T===n?1:mr(T),Zi(m,T)):[]}function xbe(m){for(var T=-1,O=m==null?0:m.length,z={};++T<O;){var te=m[T];z[te[0]]=te[1]}return z}function Qj(m){return m&&m.length?m[0]:n}function Ibe(m,T,O){var z=m==null?0:m.length;if(!z)return-1;var te=O==null?0:mr(O);return te<0&&(te=Yi(z+te,0)),ir(m,T,te)}function Obe(m){var T=m==null?0:m.length;return T?Qr(m,0,-1):[]}var Pbe=hr(function(m){var T=vi(m,cM);return T.length&&T[0]===m[0]?oe(T):[]}),Rbe=hr(function(m){var T=ed(m),O=vi(m,cM);return T===ed(O)?T=n:O.pop(),O.length&&O[0]===m[0]?oe(O,jn(T,2)):[]}),Lbe=hr(function(m){var T=ed(m),O=vi(m,cM);return T=typeof T=="function"?T:n,T&&O.pop(),O.length&&O[0]===m[0]?oe(O,n,T):[]});function Dbe(m,T){return m==null?"":Ux.call(m,T)}function ed(m){var T=m==null?0:m.length;return T?m[T-1]:n}function kbe(m,T,O){var z=m==null?0:m.length;if(!z)return-1;var te=z;return O!==n&&(te=mr(O),te=te<0?Yi(z+te,0):xs(te,z-1)),T===T?NN(m,T,te):zr(m,ds,te,!0)}function Nbe(m,T){return m&&m.length?xt(m,mr(T)):n}var Mbe=hr(Xj);function Xj(m,T){return m&&m.length&&T&&T.length?tc(m,T):m}function Fbe(m,T,O){return m&&m.length&&T&&T.length?tc(m,T,jn(O,2)):m}function $be(m,T,O){return m&&m.length&&T&&T.length?tc(m,T,n,O):m}var Bbe=Op(function(m,T){var O=m==null?0:m.length,z=jT(m,T);return qd(m,vi(T,function(te){return Pp(te,O)?+te:te}).sort(Ej)),z});function Ube(m,T){var O=[];if(!(m&&m.length))return O;var z=-1,te=[],ge=m.length;for(T=jn(T,3);++z<ge;){var Oe=m[z];T(Oe,z,m)&&(O.push(Oe),te.push(z))}return qd(m,te),O}function wM(m){return m==null?m:fy.call(m)}function Vbe(m,T,O){var z=m==null?0:m.length;return z?(O&&typeof O!="number"&&Hl(m,T,O)?(T=0,O=z):(T=T==null?0:mr(T),O=O===n?z:mr(O)),Qr(m,T,O)):[]}function Hbe(m,T){return nI(m,T)}function jbe(m,T,O){return oM(m,T,jn(O,2))}function zbe(m,T){var O=m==null?0:m.length;if(O){var z=nI(m,T);if(z<O&&Kd(m[z],T))return z}return-1}function Gbe(m,T){return nI(m,T,!0)}function Wbe(m,T,O){return oM(m,T,jn(O,2),!0)}function qbe(m,T){var O=m==null?0:m.length;if(O){var z=nI(m,T,!0)-1;if(Kd(m[z],T))return z}return-1}function Kbe(m){return m&&m.length?hj(m):[]}function Ybe(m,T){return m&&m.length?hj(m,jn(T,2)):[]}function Zbe(m){var T=m==null?0:m.length;return T?Qr(m,1,T):[]}function Qbe(m,T,O){return m&&m.length?(T=O||T===n?1:mr(T),Qr(m,0,T<0?0:T)):[]}function Xbe(m,T,O){var z=m==null?0:m.length;return z?(T=O||T===n?1:mr(T),T=z-T,Qr(m,T<0?0:T,z)):[]}function Jbe(m,T){return m&&m.length?rI(m,jn(T,3),!1,!0):[]}function eSe(m,T){return m&&m.length?rI(m,jn(T,3)):[]}var tSe=hr(function(m){return rm(Zi(m,1,_a,!0))}),nSe=hr(function(m){var T=ed(m);return _a(T)&&(T=n),rm(Zi(m,1,_a,!0),jn(T,2))}),rSe=hr(function(m){var T=ed(m);return T=typeof T=="function"?T:n,rm(Zi(m,1,_a,!0),n,T)});function iSe(m){return m&&m.length?rm(m):[]}function sSe(m,T){return m&&m.length?rm(m,jn(T,2)):[]}function aSe(m,T){return T=typeof T=="function"?T:n,m&&m.length?rm(m,n,T):[]}function _M(m){if(!(m&&m.length))return[];var T=0;return m=Fl(m,function(O){if(_a(O))return T=Yi(O.length,T),!0}),F(T,function(O){return vi(m,Hd(O))})}function Jj(m,T){if(!(m&&m.length))return[];var O=_M(m);return T==null?O:vi(O,function(z){return za(T,n,z)})}var oSe=hr(function(m,T){return _a(m)?tm(m,T):[]}),lSe=hr(function(m){return uM(Fl(m,_a))}),uSe=hr(function(m){var T=ed(m);return _a(T)&&(T=n),uM(Fl(m,_a),jn(T,2))}),cSe=hr(function(m){var T=ed(m);return T=typeof T=="function"?T:n,uM(Fl(m,_a),n,T)}),dSe=hr(_M);function fSe(m,T){return vj(m||[],T||[],wp)}function hSe(m,T){return vj(m||[],T||[],xp)}var pSe=hr(function(m){var T=m.length,O=T>1?m[T-1]:n;return O=typeof O=="function"?(m.pop(),O):n,Jj(m,O)});function ez(m){var T=ce(m);return T.__chain__=!0,T}function gSe(m,T){return T(m),m}function fI(m,T){return T(m)}var mSe=Op(function(m){var T=m.length,O=T?m[0]:0,z=this.__wrapped__,te=function(ge){return jT(ge,m)};return T>1||this.__actions__.length||!(z instanceof Or)||!Pp(O)?this.thru(te):(z=z.slice(O,+O+(T?1:0)),z.__actions__.push({func:fI,args:[te],thisArg:n}),new Eu(z,this.__chain__).thru(function(ge){return T&&!ge.length&&ge.push(n),ge}))});function vSe(){return ez(this)}function ySe(){return new Eu(this.value(),this.__chain__)}function bSe(){this.__values__===n&&(this.__values__=pz(this.value()));var m=this.__index__>=this.__values__.length,T=m?n:this.__values__[this.__index__++];return{done:m,value:T}}function SSe(){return this}function ESe(m){for(var T,O=this;O instanceof Vb;){var z=qj(O);z.__index__=0,z.__values__=n,T?te.__wrapped__=z:T=z;var te=z;O=O.__wrapped__}return te.__wrapped__=m,T}function TSe(){var m=this.__wrapped__;if(m instanceof Or){var T=m;return this.__actions__.length&&(T=new Or(this)),T=T.reverse(),T.__actions__.push({func:fI,args:[wM],thisArg:n}),new Eu(T,this.__chain__)}return this.thru(wM)}function ASe(){return mj(this.__wrapped__,this.__actions__)}var wSe=iI(function(m,T,O){Ci.call(m,O)?++m[O]:Vl(m,O,1)});function _Se(m,T,O){var z=cr(m)?Ob:aM;return O&&Hl(m,T,O)&&(T=n),z(m,jn(T,3))}function CSe(m,T){var O=cr(m)?Fl:WT;return O(m,jn(T,3))}var xSe=xj(Kj),ISe=xj(Yj);function OSe(m,T){return Zi(hI(m,T),1)}function PSe(m,T){return Zi(hI(m,T),X)}function RSe(m,T,O){return O=O===n?1:mr(O),Zi(hI(m,T),O)}function tz(m,T){var O=cr(m)?Go:io;return O(m,jn(T,3))}function nz(m,T){var O=cr(m)?Kg:zT;return O(m,jn(T,3))}var LSe=iI(function(m,T,O){Ci.call(m,O)?m[O].push(T):Vl(m,O,[T])});function DSe(m,T,O,z){m=wu(m)?m:Qb(m),O=O&&!z?mr(O):0;var te=m.length;return O<0&&(O=Yi(te+O,0)),yI(m)?O<=te&&m.indexOf(T,O)>-1:!!te&&ir(m,T,O)>-1}var kSe=hr(function(m,T,O){var z=-1,te=typeof T=="function",ge=wu(m)?dt(m.length):[];return io(m,function(Oe){ge[++z]=te?za(T,Oe,O):ee(Oe,T,O)}),ge}),NSe=iI(function(m,T,O){Vl(m,O,T)});function hI(m,T){var O=cr(m)?vi:nt;return O(m,jn(T,3))}function MSe(m,T,O,z){return m==null?[]:(cr(T)||(T=T==null?[]:[T]),O=z?n:O,cr(O)||(O=O==null?[]:[O]),Nt(m,T,O))}var FSe=iI(function(m,T,O){m[O?0:1].push(T)},function(){return[[],[]]});function $Se(m,T,O){var z=cr(m)?ey:bp,te=arguments.length<3;return z(m,jn(T,4),O,te,io)}function BSe(m,T,O){var z=cr(m)?mp:bp,te=arguments.length<3;return z(m,jn(T,4),O,te,zT)}function USe(m,T){var O=cr(m)?Fl:WT;return O(m,mI(jn(T,3)))}function VSe(m){var T=cr(m)?vy:Ey;return T(m)}function HSe(m,T,O){(O?Hl(m,T,O):T===n)?T=1:T=mr(T);var z=cr(m)?nM:tI;return z(m,T)}function jSe(m){var T=cr(m)?Qx:qT;return T(m)}function zSe(m){if(m==null)return 0;if(wu(m))return yI(m)?Yg(m):m.length;var T=vl(m);return T==lt||T==me?m.size:He(m).length}function GSe(m,T,O){var z=cr(m)?vp:KT;return O&&Hl(m,T,O)&&(T=n),z(m,jn(T,3))}var WSe=hr(function(m,T){if(m==null)return[];var O=T.length;return O>1&&Hl(m,T[0],T[1])?T=[]:O>2&&Hl(T[0],T[1],T[2])&&(T=[T[0]]),Nt(m,Zi(T,1),[])}),pI=MT||function(){return Ri.Date.now()};function qSe(m,T){if(typeof T!="function")throw new Wo(a);return m=mr(m),function(){if(--m<1)return T.apply(this,arguments)}}function rz(m,T,O){return T=O?n:T,T=m&&T==null?m.length:T,Ip(m,k,n,n,n,n,T)}function iz(m,T){var O;if(typeof T!="function")throw new Wo(a);return m=mr(m),function(){return--m>0&&(O=T.apply(this,arguments)),m<=1&&(T=n),O}}var CM=hr(function(m,T,O){var z=b;if(O.length){var te=ec(O,Yb(CM));z|=P}return Ip(m,z,T,O,te)}),sz=hr(function(m,T,O){var z=b|S;if(O.length){var te=ec(O,Yb(sz));z|=P}return Ip(T,z,m,O,te)});function az(m,T,O){T=O?n:T;var z=Ip(m,w,n,n,n,n,n,T);return z.placeholder=az.placeholder,z}function oz(m,T,O){T=O?n:T;var z=Ip(m,x,n,n,n,n,n,T);return z.placeholder=oz.placeholder,z}function lz(m,T,O){var z,te,ge,Oe,ke,Ye,Ot=0,Lt=!1,Mt=!1,rn=!0;if(typeof m!="function")throw new Wo(a);T=td(T)||0,ta(O)&&(Lt=!!O.leading,Mt="maxWait"in O,ge=Mt?Yi(td(O.maxWait)||0,T):ge,rn="trailing"in O?!!O.trailing:rn);function In(Ca){var Yd=z,Dp=te;return z=te=n,Ot=Ca,Oe=m.apply(Dp,Yd),Oe}function Wn(Ca){return Ot=Ca,ke=QT(Br,T),Lt?In(Ca):Oe}function br(Ca){var Yd=Ca-Ye,Dp=Ca-Ot,xz=T-Yd;return Mt?xs(xz,ge-Dp):xz}function qn(Ca){var Yd=Ca-Ye,Dp=Ca-Ot;return Ye===n||Yd>=T||Yd<0||Mt&&Dp>=ge}function Br(){var Ca=pI();if(qn(Ca))return Xr(Ca);ke=QT(Br,br(Ca))}function Xr(Ca){return ke=n,rn&&z?In(Ca):(z=te=n,Oe)}function ic(){ke!==n&&yj(ke),Ot=0,z=Ye=te=ke=n}function jl(){return ke===n?Oe:Xr(pI())}function sc(){var Ca=pI(),Yd=qn(Ca);if(z=arguments,te=this,Ye=Ca,Yd){if(ke===n)return Wn(Ye);if(Mt)return yj(ke),ke=QT(Br,T),In(Ye)}return ke===n&&(ke=QT(Br,T)),Oe}return sc.cancel=ic,sc.flush=jl,sc}var KSe=hr(function(m,T){return Jx(m,1,T)}),YSe=hr(function(m,T,O){return Jx(m,td(T)||0,O)});function ZSe(m){return Ip(m,H)}function gI(m,T){if(typeof m!="function"||T!=null&&typeof T!="function")throw new Wo(a);var O=function(){var z=arguments,te=T?T.apply(this,z):z[0],ge=O.cache;if(ge.has(te))return ge.get(te);var Oe=m.apply(this,z);return O.cache=ge.set(te,Oe)||ge,Oe};return O.cache=new(gI.Cache||Qc),O}gI.Cache=Qc;function mI(m){if(typeof m!="function")throw new Wo(a);return function(){var T=arguments;switch(T.length){case 0:return!m.call(this);case 1:return!m.call(this,T[0]);case 2:return!m.call(this,T[0],T[1]);case 3:return!m.call(this,T[0],T[1],T[2])}return!m.apply(this,T)}}function QSe(m){return iz(2,m)}var XSe=$0e(function(m,T){T=T.length==1&&cr(T[0])?vi(T[0],Te(jn())):vi(Zi(T,1),Te(jn()));var O=T.length;return hr(function(z){for(var te=-1,ge=xs(z.length,O);++te<ge;)z[te]=T[te].call(this,z[te]);return za(m,this,z)})}),xM=hr(function(m,T){var O=ec(T,Yb(xM));return Ip(m,P,n,T,O)}),uz=hr(function(m,T){var O=ec(T,Yb(uz));return Ip(m,N,n,T,O)}),JSe=Op(function(m,T){return Ip(m,U,n,n,n,T)});function eEe(m,T){if(typeof m!="function")throw new Wo(a);return T=T===n?T:mr(T),hr(m,T)}function tEe(m,T){if(typeof m!="function")throw new Wo(a);return T=T==null?0:Yi(mr(T),0),hr(function(O){var z=O[T],te=sm(O,0,T);return z&&$l(te,z),za(m,this,te)})}function nEe(m,T,O){var z=!0,te=!0;if(typeof m!="function")throw new Wo(a);return ta(O)&&(z="leading"in O?!!O.leading:z,te="trailing"in O?!!O.trailing:te),lz(m,T,{leading:z,maxWait:T,trailing:te})}function rEe(m){return rz(m,1)}function iEe(m,T){return xM(dM(T),m)}function sEe(){if(!arguments.length)return[];var m=arguments[0];return cr(m)?m:[m]}function aEe(m){return Tu(m,h)}function oEe(m,T){return T=typeof T=="function"?T:n,Tu(m,h,T)}function lEe(m){return Tu(m,d|h)}function uEe(m,T){return T=typeof T=="function"?T:n,Tu(m,d|h,T)}function cEe(m,T){return T==null||Xx(m,T,Ao(T))}function Kd(m,T){return m===T||m!==m&&T!==T}var dEe=lI(M),fEe=lI(function(m,T){return m>=T}),wy=Pe(function(){return arguments}())?Pe:function(m){return ga(m)&&Ci.call(m,"callee")&&!Mb.call(m,"callee")},cr=dt.isArray,hEe=xb?Te(xb):Se;function wu(m){return m!=null&&vI(m.length)&&!Rp(m)}function _a(m){return ga(m)&&wu(m)}function pEe(m){return m===!0||m===!1||ga(m)&&R(m)==Le}var am=$T||$M,gEe=Qv?Te(Qv):Ee;function mEe(m){return ga(m)&&m.nodeType===1&&!XT(m)}function vEe(m){if(m==null)return!0;
vendor: 4,121 bytes, line 89
89if(wu(m)&&(cr(m)||typeof m=="string"||typeof m.splice=="function"||am(m)||Zb(m)||wy(m)))return!m.length;var T=vl(m);if(T==lt||T==me)return!m.size;if(ZT(m))return!He(m).length;for(var O in m)if(Ci.call(m,O))return!1;return!0}function yEe(m,T){return Ae(m,T)}function bEe(m,T,O){O=typeof O=="function"?O:n;var z=O?O(m,T):n;return z===n?Ae(m,T,n,O):!!z}function IM(m){if(!ga(m))return!1;var T=R(m);return T==Et||T==at||typeof m.message=="string"&&typeof m.name=="string"&&!XT(m)}function SEe(m){return typeof m=="number"&&BT(m)}function Rp(m){if(!ta(m))return!1;var T=R(m);return T==ne||T==Ze||T==We||T==Ct}function cz(m){return typeof m=="number"&&m==mr(m)}function vI(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=G}function ta(m){var T=typeof m;return m!=null&&(T=="object"||T=="function")}function ga(m){return m!=null&&typeof m=="object"}var dz=Ib?Te(Ib):Ge;function EEe(m,T){return m===T||vt(m,T,yM(T))}function TEe(m,T,O){return O=typeof O=="function"?O:n,vt(m,T,yM(T),O)}function AEe(m){return fz(m)&&m!=+m}function wEe(m){if(obe(m))throw new er(s);return Ft(m)}function _Ee(m){return m===null}function CEe(m){return m==null}function fz(m){return typeof m=="number"||ga(m)&&R(m)==ot}function XT(m){if(!ga(m)||R(m)!=Fe)return!1;var T=ly(m);if(T===null)return!0;var O=Ci.call(T,"constructor")&&T.constructor;return typeof O=="function"&&O instanceof O&&kb.call(O)==Jf}var OM=Xv?Te(Xv):kt;function xEe(m){return cz(m)&&m>=-G&&m<=G}var hz=qg?Te(qg):At;function yI(m){return typeof m=="string"||!cr(m)&&ga(m)&&R(m)==De}function rc(m){return typeof m=="symbol"||ga(m)&&R(m)==Me}var Zb=Xf?Te(Xf):Ie;function IEe(m){return m===n}function OEe(m){return ga(m)&&vl(m)==ut}function PEe(m){return ga(m)&&R(m)==Tt}var REe=lI(Ke),LEe=lI(function(m,T){return m<=T});function pz(m){if(!m)return[];if(wu(m))return yI(m)?Su(m):Au(m);if(pa&&m[pa])return Hs(m[pa]());var T=vl(m),O=T==lt?ea:T==me?ty:Qb;return O(m)}function Lp(m){if(!m)return m===0?m:0;if(m=td(m),m===X||m===-X){var T=m<0?-1:1;return T*ie}return m===m?m:0}function mr(m){var T=Lp(m),O=T%1;return T===T?O?T-O:T:0}function gz(m){return m?Cp(mr(m),0,ue):0}function td(m){if(typeof m=="number")return m;if(rc(m))return ae;if(ta(m)){var T=typeof m.valueOf=="function"?m.valueOf():m;m=ta(T)?T+"":T}if(typeof m!="string")return m===0?m:+m;m=pe(m);var O=zc.test(m);return O||up.test(m)?os(m.slice(2),O?2:8):Fg.test(m)?ae:+m}function mz(m){return th(m,_u(m))}function DEe(m){return m?Cp(mr(m),-G,G):m===0?m:0}function Di(m){return m==null?"":nc(m)}var kEe=qb(function(m,T){if(ZT(T)||wu(T)){th(T,Ao(T),m);return}for(var O in T)Ci.call(T,O)&&wp(m,O,T[O])}),vz=qb(function(m,T){th(T,_u(T),m)}),bI=qb(function(m,T,O,z){th(T,_u(T),m,z)}),NEe=qb(function(m,T,O,z){th(T,Ao(T),m,z)}),MEe=Op(jT);function FEe(m,T){var O=em(m);return T==null?O:_p(O,T)}var $Ee=hr(function(m,T){m=Li(m);var O=-1,z=T.length,te=z>2?T[2]:n;for(te&&Hl(T[0],T[1],te)&&(z=1);++O<z;)for(var ge=T[O],Oe=_u(ge),ke=-1,Ye=Oe.length;++ke<Ye;){var Ot=Oe[ke],Lt=m[Ot];(Lt===n||Kd(Lt,Yc[Ot])&&!Ci.call(m,Ot))&&(m[Ot]=ge[Ot])}return m}),BEe=hr(function(m){return m.push(n,kj),za(yz,n,m)});function UEe(m,T){return qc(m,jn(T,3),Xc)}function VEe(m,T){return qc(m,jn(T,3),y)}function HEe(m,T){return m==null?m:Sy(m,jn(T,3),_u)}function jEe(m,T){return m==null?m:eI(m,jn(T,3),_u)}function zEe(m,T){return m&&Xc(m,jn(T,3))}function GEe(m,T){return m&&y(m,jn(T,3))}function WEe(m){return m==null?[]:p(m,Ao(m))}function qEe(m){return m==null?[]:p(m,_u(m))}function PM(m,T,O){var z=m==null?n:E(m,T);return z===n?O:z}function KEe(m,T){return m!=null&&Fj(m,T,W)}function RM(m,T){return m!=null&&Fj(m,T,J)}var YEe=Oj(function(m,T,O){T!=null&&typeof T.toString!="function"&&(T=Zg.call(T)),m[T]=O},DM(Cu)),ZEe=Oj(function(m,T,O){T!=null&&typeof T.toString!="function"&&(T=Zg.call(T)),Ci.call(m,T)?m[T].push(O):m[T]=[O]},jn),QEe=hr(ee);function Ao(m){return wu(m)?Zx(m):He(m)}function _u(m){return wu(m)?Zx(m,!0):bt(m)}function XEe(m,T){var O={};return T=jn(T,3),Xc(m,function(z,te,ge){Vl(O,T(z,te,ge),z)}),O}function JEe(m,T){var O={};return T=jn(T,3),Xc(m,function(z,te,ge){Vl(O,te,T(z,te,ge))}),O}var e1e=qb(function(m,T,O){Je(m,T,O)}
vendor: 13,885 bytes, lines 89-106
89),yz=qb(function(m,T,O,z){Je(m,T,O,z)}),t1e=Op(function(m,T){var O={};if(m==null)return O;var z=!1;T=vi(T,function(ge){return ge=im(ge,m),z||(z=ge.length>1),ge}),th(m,mM(m),O),z&&(O=Tu(O,d|f|h,Y0e));for(var te=T.length;te--;)lM(O,T[te]);return O});function n1e(m,T){return bz(m,mI(jn(T)))}var r1e=Op(function(m,T){return m==null?{}:Gr(m,T)});function bz(m,T){if(m==null)return{};var O=vi(mM(m),function(z){return[z]});return T=jn(T),fs(m,O,function(z,te){return T(z,te[0])})}function i1e(m,T,O){T=im(T,m);var z=-1,te=T.length;for(te||(te=1,m=n);++z<te;){var ge=m==null?n:m[nh(T[z])];ge===n&&(z=te,ge=O),m=Rp(ge)?ge.call(m):ge}return m}function s1e(m,T,O){return m==null?m:xp(m,T,O)}function a1e(m,T,O,z){return z=typeof z=="function"?z:n,m==null?m:xp(m,T,O,z)}var Sz=Lj(Ao),Ez=Lj(_u);function o1e(m,T,O){var z=cr(m),te=z||am(m)||Zb(m);if(T=jn(T,4),O==null){var ge=m&&m.constructor;te?O=z?new ge:[]:ta(m)?O=Rp(ge)?em(ly(m)):{}:O={}}return(te?Go:Xc)(m,function(Oe,ke,Ye){return T(O,Oe,ke,Ye)}),O}function l1e(m,T){return m==null?!0:lM(m,T)}function u1e(m,T,O){return m==null?m:gj(m,T,dM(O))}function c1e(m,T,O,z){return z=typeof z=="function"?z:n,m==null?m:gj(m,T,dM(O),z)}function Qb(m){return m==null?[]:tt(m,Ao(m))}function d1e(m){return m==null?[]:tt(m,_u(m))}function f1e(m,T,O){return O===n&&(O=T,T=n),O!==n&&(O=td(O),O=O===O?O:0),T!==n&&(T=td(T),T=T===T?T:0),Cp(td(m),T,O)}function h1e(m,T,O){return T=Lp(T),O===n?(O=T,T=0):O=Lp(O),m=td(m),re(m,T,O)}function p1e(m,T,O){if(O&&typeof O!="boolean"&&Hl(m,T,O)&&(T=O=n),O===n&&(typeof T=="boolean"?(O=T,T=n):typeof m=="boolean"&&(O=m,m=n)),m===n&&T===n?(m=0,T=1):(m=Lp(m),T===n?(T=m,m=0):T=Lp(T)),m>T){var z=m;m=T,T=z}if(O||m%1||T%1){var te=jx();return xs(m+te*(T-m+pp("1e-"+((te+"").length-1))),T)}return ml(m,T)}var g1e=Kb(function(m,T,O){return T=T.toLowerCase(),m+(O?Tz(T):T)});function Tz(m){return LM(Di(m).toLowerCase())}function Az(m){return m=Di(m),m&&m.replace($e,qt).replace(Ha,"")}function m1e(m,T,O){m=Di(m),T=nc(T);var z=m.length;O=O===n?z:Cp(mr(O),0,z);var te=O;return O-=T.length,O>=0&&m.slice(O,te)==T}function v1e(m){return m=Di(m),m&&tn.test(m)?m.replace(nn,Cn):m}function y1e(m){return m=Di(m),m&&_i.test(m)?m.replace(yt,"\\$&"):m}var b1e=Kb(function(m,T,O){return m+(O?"-":"")+T.toLowerCase()}),S1e=Kb(function(m,T,O){return m+(O?" ":"")+T.toLowerCase()}),E1e=Cj("toLowerCase");function T1e(m,T,O){m=Di(m),T=mr(T);var z=T?Yg(m):0;if(!T||z>=T)return m;var te=(T-z)/2;return oI(dy(te),O)+m+oI(cy(te),O)}function A1e(m,T,O){m=Di(m),T=mr(T);var z=T?Yg(m):0;return T&&z<T?m+oI(T-z,O):m}function w1e(m,T,O){m=Di(m),T=mr(T);var z=T?Yg(m):0;return T&&z<T?oI(T-z,O)+m:m}function _1e(m,T,O){return O||T==null?T=0:T&&(T=+T),Hx(Di(m).replace($i,""),T||0)}function C1e(m,T,O){return(O?Hl(m,T,O):T===n)?T=1:T=mr(T),zb(Di(m),T)}function x1e(){var m=arguments,T=Di(m[0]);return m.length<3?T:T.replace(m[1],m[2])}var I1e=Kb(function(m,T,O){return m+(O?"_":"")+T.toLowerCase()});function O1e(m,T,O){return O&&typeof O!="number"&&Hl(m,T,O)&&(T=O=n),O=O===n?ue:O>>>0,O?(m=Di(m),m&&(typeof T=="string"||T!=null&&!OM(T))&&(T=nc(T),!T&&un(m))?sm(Su(m),0,O):m.split(T,O)):[]}var P1e=Kb(function(m,T,O){return m+(O?" ":"")+LM(T)});function R1e(m,T,O){return m=Di(m),O=O==null?0:Cp(mr(O),0,m.length),T=nc(T),m.slice(O,O+T.length)==T}function L1e(m,T,O){var z=ce.templateSettings;O&&Hl(m,T,O)&&(T=n),m=Di(m),T=bI({},T,z,Dj);var te=bI({},T.imports,z.imports,Dj),ge=Ao(te),Oe=tt(te,ge),ke,Ye,Ot=0,Lt=T.interpolate||$t,Mt="__p += '",rn=ry((T.escape||$t).source+"|"+Lt.source+"|"+(Lt===dr?cl:$t).source+"|"+(T.evaluate||$t).source+"|$","g"),In="//# sourceURL="+(Ci.call(T,"sourceURL")?(T.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wc+"]")+`
90`;m.replace(rn,function(qn,Br,Xr,ic,jl,sc){return Xr||(Xr=ic),Mt+=m.slice(Ot,sc).replace(Zt,Hn),Br&&(ke=!0,Mt+=`' +
91__e(`+Br+`) +
92'`),jl&&(Ye=!0,Mt+=`';
93`+jl+`;
94__p += '`),Xr&&(Mt+=`' +
95((__t = (`+Xr+`)) == null ? '' : __t) +
96'`),Ot=sc+qn.length,qn}),Mt+=`';
97`;var Wn=Ci.call(T,"variable")&&T.variable;if(!Wn)Mt=`with (obj) {
98`+Mt+`
99}
100`;else if(op.test(Wn))throw new er(o);Mt=(Ye?Mt.replace(Ut,""):Mt).replace(zt,"$1").replace(Yt,"$1;"),Mt="function("+(Wn||"obj")+`) {
101`+(Wn?"":`obj || (obj = {});
102`)+"var __t, __p = ''"+(ke?", __e = _.escape":"")+(Ye?`, __j = Array.prototype.join;
103function print() { __p += __j.call(arguments, '') }
104`:`;
105`)+Mt+`return __p
106}`;var br=_z(function(){return Zr(ge,In+"return "+Mt).apply(n,Oe)});if(br.source=Mt,IM(br))throw br;return br}function D1e(m){return Di(m).toLowerCase()}function k1e(m){return Di(m).toUpperCase()}function N1e(m,T,O){if(m=Di(m),m&&(O||T===n))return pe(m);if(!m||!(T=nc(T)))return m;var z=Su(m),te=Su(T),ge=Dt(z,te),Oe=ct(z,te)+1;return sm(z,ge,Oe).join("")}function M1e(m,T,O){if(m=Di(m),m&&(O||T===n))return m.slice(0,ny(m)+1);if(!m||!(T=nc(T)))return m;var z=Su(m),te=ct(z,Su(T))+1;return sm(z,0,te).join("")}function F1e(m,T,O){if(m=Di(m),m&&(O||T===n))return m.replace($i,"");if(!m||!(T=nc(T)))return m;var z=Su(m),te=Dt(z,Su(T));return sm(z,te).join("")}function $1e(m,T){var O=B,z=q;if(ta(T)){var te="separator"in T?T.separator:te;O="length"in T?mr(T.length):O,z="omission"in T?nc(T.omission):z}m=Di(m);var ge=m.length;if(un(m)){var Oe=Su(m);ge=Oe.length}if(O>=ge)return m;var ke=O-Yg(z);if(ke<1)return z;var Ye=Oe?sm(Oe,0,ke).join(""):m.slice(0,ke);if(te===n)return Ye+z;if(Oe&&(ke+=Ye.length-ke),OM(te)){if(m.slice(ke).search(te)){var Ot,Lt=Ye;for(te.global||(te=ry(te.source,Di(lp.exec(te))+"g")),te.lastIndex=0;Ot=te.exec(Lt);)var Mt=Ot.index;Ye=Ye.slice(0,Mt===n?ke:Mt)}}else if(m.indexOf(nc(te),ke)!=ke){var rn=Ye.lastIndexOf(te);rn>-1&&(Ye=Ye.slice(0,rn))}return Ye+z}function B1e(m){return m=Di(m),m&&fn.test(m)?m.replace(vn,MN):m}var U1e=Kb(function(m,T,O){return m+(O?" ":"")+T.toUpperCase()}),LM=Cj("toUpperCase");function wz(m,T,O){return m=Di(m),T=O?n:T,T===n?kn(m)?BN(m):Pb(m):m.match(T)||[]}var _z=hr(function(m,T){try{return za(m,n,T)}catch(O){return IM(O)?O:new er(O)}}),V1e=Op(function(m,T){return Go(T,function(O){O=nh(O),Vl(m,O,CM(m[O],m))}),m});function H1e(m){var T=m==null?0:m.length,O=jn();return m=T?vi(m,function(z){if(typeof z[1]!="function")throw new Wo(a);return[O(z[0]),z[1]]}):[],hr(function(z){for(var te=-1;++te<T;){var ge=m[te];if(za(ge[0],this,z))return za(ge[1],this,z)}})}function j1e(m){return sM(Tu(m,d))}function DM(m){return function(){return m}}function z1e(m,T){return m==null||m!==m?T:m}var G1e=Ij(),W1e=Ij(!0);function Cu(m){return m}function kM(m){return Xe(typeof m=="function"?m:Tu(m,d))}function q1e(m){return xe(Tu(m,d))}function K1e(m,T){return It(m,Tu(T,d))}var Y1e=hr(function(m,T){return function(O){return ee(O,m,T)}}),Z1e=hr(function(m,T){return function(O){return ee(m,O,T)}});function NM(m,T,O){var z=Ao(T),te=p(T,z);O==null&&!(ta(T)&&(te.length||!z.length))&&(O=T,T=m,m=this,te=p(T,Ao(T)));var ge=!(ta(O)&&"chain"in O)||!!O.chain,Oe=Rp(m);return Go(te,function(ke){var Ye=T[ke];m[ke]=Ye,Oe&&(m.prototype[ke]=function(){var Ot=this.__chain__;if(ge||Ot){var Lt=m(this.__wrapped__),Mt=Lt.__actions__=Au(this.__actions__);return Mt.push({func:Ye,args:arguments,thisArg:m}),Lt.__chain__=Ot,Lt}return Ye.apply(m,$l([this.value()],arguments))})}),m}function Q1e(){return Ri._===this&&(Ri._=VN),this}function MM(){}function X1e(m){return m=mr(m),hr(function(T){return xt(T,m)})}var J1e=hM(vi),eTe=hM(Ob),tTe=hM(vp);function Cz(m){return SM(m)?Hd(nh(m)):Is(m)}function nTe(m){return function(T){return m==null?n:E(m,T)}}var rTe=Pj(),iTe=Pj(!0);function FM(){return[]}function $M(){return!1}function sTe(){return{}}function aTe(){return""}function oTe(){return!0}function lTe(m,T){if(m=mr(m),m<1||m>G)return[];var O=ue,z=xs(m,ue);T=jn(T),m-=ue;for(var te=F(z,T);++O<m;)T(O);return te}function uTe(m){return cr(m)?vi(m,nh):rc(m)?[m]:Au(Wj(Di(m)))}function cTe(m){var T=++UN;return Di(m)+T}var dTe=aI(function(m,T){return m+T},0),fTe=pM("ceil"),hTe=aI(function(m,T){return m/T},1),pTe=pM("floor");function gTe(m){return m&&m.length?nm(m,Cu,M):n}function mTe(m,T){return m&&m.length?nm(m,jn(T,2),M):n}function vTe(m){return yp(m,Cu)}function yTe(m,T){return yp(m,jn(T,2))}function bTe(m){return m&&m.length?nm(m,Cu,Ke):n}function STe(m,T){return m&&m.length?nm(m,jn(T,2),Ke):n}var ETe=aI(function(m,T){return m*T},1),TTe=pM("round"),ATe=aI(function(m,T){return m-T},0);function wTe(m){return m&&m.length?D(m,Cu):0}function _Te(m,T){return m&&m.length?D(m,jn(T,2)):0}return ce.after=qSe,ce.ary=rz,ce.assign=kEe,ce.assignIn=vz,ce.assignInWith=bI,ce.assignWith=NEe,ce.at=MEe,ce.before=iz,ce.bind=CM,ce.bindAll=V1e,ce.bindKey=sz,ce.castArray=sEe,ce.chain=ez,ce.chunk=pbe,ce.compact=gbe,ce.concat=mbe,ce.cond=H1e,ce.conforms=j1e,ce.constant=DM,ce.countBy=wSe,ce.create=FEe,ce.curry=az,ce.curryRight=oz,ce.debounce=lz,ce.defaults=$Ee,ce.defaultsDeep=BEe,ce.defer=KSe,ce.delay=YSe,ce.difference=vbe,ce.differenceBy=ybe,ce.differenceWith=bbe,ce.drop=Sbe,ce.dropRight=Ebe,ce.dropRightWhile=Tbe,ce.dropWhile=Abe,ce.fill=wbe,ce.filter=CSe,ce.flatMap=OSe,ce.flatMapDeep=PSe,ce.flatMapDepth=RSe,ce.flatten=Zj,ce.flattenDeep=_be,ce.flattenDepth=Cbe,ce.flip=ZSe,ce.flow=G1e,ce.flowRight=W1e,ce.fromPairs=xbe,ce.functions=WEe,ce.functionsIn=qEe,ce.groupBy=LSe,ce.initial=Obe,ce.intersection=Pbe,ce.intersectionBy=Rbe,ce.intersectionWith=Lbe,ce.invert=YEe,ce.invertBy=ZEe,ce.invokeMap=kSe,ce.iteratee=kM,ce.keyBy=NSe,ce.keys=Ao,ce.keysIn=_u,ce.map=hI,ce.mapKeys=XEe,ce.mapValues=JEe,ce.matches=q1e,ce.matchesProperty=K1e,ce.memoize=gI,ce.merge=e1e,ce.mergeWith=yz,ce.method=Y1e,ce.methodOf=Z1e,ce.mixin=NM,ce.negate=mI,ce.nthArg=X1e,ce.omit=t1e,ce.omitBy=n1e,ce.once=QSe,ce.orderBy=MSe,ce.over=J1e,ce.overArgs=XSe,ce.overEvery=eTe,ce.overSome=tTe,ce.partial=xM,ce.partialRight=uz,ce.partition=FSe,ce.pick=r1e,ce.pickBy=bz,ce.property=Cz,ce.propertyOf=nTe,ce.pull=Mbe,ce.pullAll=Xj,ce.pullAllBy=Fbe,ce.pullAllWith=$be,ce.pullAt=Bbe,ce.range=rTe,ce.rangeRight=iTe,ce.rearg=JSe,ce.reject=USe,ce.remove=Ube,ce.rest=eEe,ce.reverse=wM,ce.sampleSize=HSe,ce.set=s1e,ce.setWith=a1e,ce.shuffle=jSe,ce.slice=Vbe,ce.sortBy=WSe,ce.sortedUniq=Kbe,ce.sortedUniqBy=Ybe,ce.split=O1e,ce.spread=tEe,ce.tail=Zbe,ce.take=Qbe,ce.takeRight=Xbe,ce.takeRightWhile=Jbe,ce.takeWhile=eSe,ce.tap=gSe,ce.throttle=nEe,ce.thru=fI,ce.toArray=pz,ce.toPairs=Sz,ce.toPairsIn=Ez,ce.toPath=uTe,ce.toPlainObject=mz,ce.transform=o1e,ce.unary=rEe,ce.union=tSe,ce.unionBy=nSe,ce.unionWith=rSe,ce.uniq=iSe,ce.uniqBy=sSe,ce.uniqWith=aSe,ce.unset=l1e,ce.unzip=_M,ce.unzipWith=Jj,ce.update=u1e,ce.updateWith=c1e,ce.values=Qb,ce.valuesIn=d1e,ce.without=oSe,ce.words=wz,ce.wrap=iEe,ce.xor=lSe,ce.xorBy=uSe,ce.xorWith=cSe,ce.zip=dSe,ce.zipObject=fSe,ce.zipObjectDeep=hSe,ce.zipWith=pSe,ce.entries=Sz,ce.entriesIn=Ez,ce.extend=vz,ce.extendWith=bI,NM(ce,ce),ce.add=dTe,ce.attempt=_z,ce.camelCase=g1e,ce.capitalize=Tz,ce.ceil=fTe,ce.clamp=f1e,ce.clone=aEe,ce.cloneDeep=lEe,ce.cloneDeepWith=uEe,ce.cloneWith=oEe,ce.conformsTo=cEe,ce.deburr=Az,ce.defaultTo=z1e,ce.divide=hTe,ce.endsWith=m1e,ce.eq=Kd,ce.escape=v1e,ce.escapeRegExp=y1e,ce.every=_Se,ce.find=xSe,ce.findIndex=Kj,ce.findKey=UEe,ce.findLast=ISe,ce.findLastIndex=Yj,ce.findLastKey=VEe,ce.floor=pTe,ce.forEach=tz,ce.forEachRight=nz,ce.forIn=HEe,ce.forInRight=jEe,ce.forOwn=zEe,ce.forOwnRight=GEe,ce.get=PM,ce.gt=dEe,ce.gte=fEe,ce.has=KEe,ce.hasIn=RM,ce.head=Qj,ce.identity=Cu,ce.includes=DSe,ce.indexOf=Ibe,ce.inRange=h1e,ce.invoke=QEe,ce.isArguments=wy,ce.isArray=cr,ce.isArrayBuffer=hEe,ce.isArrayLike=wu,ce.isArrayLikeObject=_a,ce.isBoolean=pEe,ce.isBuffer=am,ce.isDate=gEe,ce.isElement=mEe,ce.isEmpty=vEe,ce.isEqual=yEe,ce.isEqualWith=bEe,ce.isError=IM,ce.isFinite=SEe,ce.isFunction=Rp,ce.isInteger=cz,ce.isLength=vI,ce.isMap=dz,ce.isMatch=EEe,ce.isMatchWith=TEe,ce.isNaN=AEe,ce.isNative=wEe,ce.isNil=CEe,ce.isNull=_Ee,ce.isNumber=fz,ce.isObject=ta,ce.isObjectLike=ga,ce.isPlainObject=XT,ce.isRegExp=OM,ce.isSafeInteger=xEe,ce.isSet=hz,ce.isString=yI,ce.isSymbol=rc,ce.isTypedArray=Zb,ce.isUndefined=IEe,ce.isWeakMap=OEe,ce.isWeakSet=PEe,ce.join=Dbe,ce.kebabCase=b1e,ce.last=ed,ce.lastIndexOf=kbe,ce.lowerCase=S1e,ce.lowerFirst=E1e,ce.lt=REe,ce.lte=LEe,ce.max=gTe,ce.maxBy=mTe,ce.mean=vTe,ce.meanBy=yTe,ce.min=bTe,ce.minBy=STe,ce.stubArray=FM,ce.stubFalse=$M,ce.stubObject=sTe,ce.stubString=aTe,ce.stubTrue=oTe,ce.multiply=ETe,ce.nth=Nbe,ce.noConflict=Q1e,ce.noop=MM,ce.now=pI,ce.pad=T1e,ce.padEnd=A1e,ce.padStart=w1e,ce.parseInt=_1e,ce.random=p1e,ce.reduce=$Se,ce.reduceRight=BSe,ce.repeat=C1e,ce.replace=x1e,ce.result=i1e,ce.round=TTe,ce.runInContext=ze,ce.sample=VSe,ce.size=zSe,ce.snakeCase=I1e,ce.some=GSe,ce.sortedIndex=Hbe,ce.sortedIndexBy=jbe,ce.sortedIndexOf=zbe,ce.sortedLastIndex=Gbe,ce.sortedLastIndexBy=Wbe,ce.sortedLastIndexOf=qbe,ce.startCase=P1e,ce.startsWith=R1e,ce.subtract=ATe,ce.sum=wTe,ce.sumBy=_Te,ce.template=L1e,ce.times=lTe,ce.toFinite=Lp,ce.toInteger=mr,ce.toLength=gz,ce.toLower=D1e,ce.toNumber=td,ce.toSafeInteger=DEe,ce.toString=Di,ce.toUpper=k1e,ce.trim=N1e,ce.trimEnd=M1e,ce.trimStart=F1e,ce.truncate=$1e,ce.unescape=B1e,ce.uniqueId=cTe,ce.upperCase=U1e,ce.upperFirst=LM,ce.each=tz,ce.eachRight=nz,ce.first=Qj,NM(ce,function(){var m={};return Xc(ce,function(T,O){Ci.call(ce.prototype,O)||(m[O]=T)}),m}(),{chain:!1}),ce.VERSION=r,Go(["bind","bindKey","curry","curryRight","partial","partialRight"],function(m){ce[m].placeholder=ce}),Go(["drop","take"],function(m,T){Or.prototype[m]=function(O){O=O===n?1:Yi(mr(O),0);var z=this.__filtered__&&!T?new Or(this):this.clone();return z.__filtered__?z.__takeCount__=xs(O,z.__takeCount__):z.__views__.push({size:xs(O,ue),type:m+(z.__dir__<0?"Right":"")}),z},Or.prototype[m+"Right"]=function(O){return this.reverse()[m](O).reverse()}}),Go(["filter","map","takeWhile"],function(m,T){var O=T+1,z=O==L||O==j;Or.prototype[m]=function(te){var ge=this.clone();return ge.__iteratees__.push({iteratee:jn(te,3),type:O}),ge.__filtered__=ge.__filtered__||z,ge}}),Go(["head","last"],function(m,T){var O="take"+(T?"Right":"");
vendor: 2,868 bytes, line 106
106Or.prototype[m]=function(){return this[O](1).value()[0]}}),Go(["initial","tail"],function(m,T){var O="drop"+(T?"":"Right");Or.prototype[m]=function(){return this.__filtered__?new Or(this):this[O](1)}}),Or.prototype.compact=function(){return this.filter(Cu)},Or.prototype.find=function(m){return this.filter(m).head()},Or.prototype.findLast=function(m){return this.reverse().find(m)},Or.prototype.invokeMap=hr(function(m,T){return typeof m=="function"?new Or(this):this.map(function(O){return ee(O,m,T)})}),Or.prototype.reject=function(m){return this.filter(mI(jn(m)))},Or.prototype.slice=function(m,T){m=mr(m);var O=this;return O.__filtered__&&(m>0||T<0)?new Or(O):(m<0?O=O.takeRight(-m):m&&(O=O.drop(m)),T!==n&&(T=mr(T),O=T<0?O.dropRight(-T):O.take(T-m)),O)},Or.prototype.takeRightWhile=function(m){return this.reverse().takeWhile(m).reverse()},Or.prototype.toArray=function(){return this.take(ue)},Xc(Or.prototype,function(m,T){var O=/^(?:filter|find|map|reject)|While$/.test(T),z=/^(?:head|last)$/.test(T),te=ce[z?"take"+(T=="last"?"Right":""):T],ge=z||/^find/.test(T);te&&(ce.prototype[T]=function(){var Oe=this.__wrapped__,ke=z?[1]:arguments,Ye=Oe instanceof Or,Ot=ke[0],Lt=Ye||cr(Oe),Mt=function(Br){var Xr=te.apply(ce,$l([Br],ke));return z&&rn?Xr[0]:Xr};Lt&&O&&typeof Ot=="function"&&Ot.length!=1&&(Ye=Lt=!1);var rn=this.__chain__,In=!!this.__actions__.length,Wn=ge&&!rn,br=Ye&&!In;if(!ge&&Lt){Oe=br?Oe:new Or(this);var qn=m.apply(Oe,ke);return qn.__actions__.push({func:fI,args:[Mt],thisArg:n}),new Eu(qn,rn)}return Wn&&br?m.apply(this,ke):(qn=this.thru(Mt),Wn?z?qn.value()[0]:qn.value():qn)})}),Go(["pop","push","shift","sort","splice","unshift"],function(m){var T=iy[m],O=/^(?:push|sort|unshift)$/.test(m)?"tap":"thru",z=/^(?:pop|shift)$/.test(m);ce.prototype[m]=function(){var te=arguments;if(z&&!this.__chain__){var ge=this.value();return T.apply(cr(ge)?ge:[],te)}return this[O](function(Oe){return T.apply(cr(Oe)?Oe:[],te)})}}),Xc(Or.prototype,function(m,T){var O=ce[T];if(O){var z=O.name+"";Ci.call(Jg,z)||(Jg[z]=[]),Jg[z].push({name:T,func:O})}}),Jg[sI(n,S).name]=[{name:"wrapper",func:n}],Or.prototype.clone=WN,Or.prototype.reverse=UT,Or.prototype.value=Ap,ce.prototype.at=mSe,ce.prototype.chain=vSe,ce.prototype.commit=ySe,ce.prototype.next=bSe,ce.prototype.plant=ESe,ce.prototype.reverse=TSe,ce.prototype.toJSON=ce.prototype.valueOf=ce.prototype.value=ASe,ce.prototype.first=ce.prototype.head,pa&&(ce.prototype[pa]=SSe),ce},Sp=kT();pl?((pl.exports=Sp)._=Sp,Ml._=Sp):Ri._=Sp}).call(Ys)})(WR,WR.exports);var Mi=WR.exports;const RBe=pi(Mi);var rU=(t=>(t.VERBOSE_LOGGING="verboseLogging",t.AMPERWAVE_END_TO_END_LOGGING="amperwaveEndToEndLogging",t))(rU||{});class LBe{constructor(){et(this,"settings",{verboseLogging:!1,amperwaveEndToEndLogging:!1});et(this,"listeners",{});this.listeners={},Object.keys(this.settings).forEach(e=>{this.listeners[e]=[]})}
106setPlatformSettings(e,n){this.settings[e]=n,this.listeners[e].forEach(r=>r(n))}addListener(e,n){this.listeners[e].push(n)}removeListener(e,n){this.listeners[e]=this.listeners[e].filter(r=>r!==n)}getPlatformSettings(e){return this.settings[e]}}const PK=new LBe;function DBe(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const kBe={resolvedFunctions:new Map,call:RBe.memoize(async t=>{const e=await t();return kBe.resolvedFunctions.set(t,!0),e})},ys={store:new Map,set:(t,e,n=0)=>{const r=Date.now();ys.store.set(t,{data:e,useExpiration:n>0,expiration:n>0?r+n:r+K$e})},get:t=>{const e=ys.store.get(t),n=e==null?void 0:e.useExpiration,r=(e==null?void 0:e.expiration)>Date.now();return n?n&&r?e==null?void 0:e.data:"":e==null?void 0:e.data},clean:()=>{for(const[t,e]of ys.store.entries()){const n=Date.now();e.expiration<n&&ys.store.delete(t)}},delete:t=>{ys.store.delete(t)}};function NBe(t,e){return Math.floor(Math.random()*(e+1-t)+t)}async function MBe(t){const e=ys.get(t);e&&ys.set(`${t}-quickPause`,e,Z$e)}function FBe(t,e,n,r){if(!e)return!1;if(r)return!0;const i=e.pop(),s=(i==null?void 0:i.data.startOffset)||0,a=(i==null?void 0:i.data.duration)||0,o=s+a;return t>n&&t<o}const Im=(t,e)=>(n,r)=>{var i;console.log(`Error invoking service for ${t} in ${e}: ${(i=r==null?void 0:r.data)==null?void 0:i.message}`)},$Be=(t,e)=>n=>{console.log(`Timeout invoking service for ${t} in ${e}`)},gle=t=>JSON.stringify({name:t.name,message:t.message,code:t.code}),oo={defaultFlags:"defaultFlags",remoteSettings:"remoteSettings",brazeFlags:"brazeFlags",overrideFlags:"overrideFlags",store:new Map,set:(t,e)=>{oo.store.set(t,e)},get:t=>oo.store.get(t),getAll:()=>({...oo.store.get(oo.defaultFlags),...oo.store.get(oo.remoteSettings),...oo.store.get(oo.brazeFlags),...oo.store.get(oo.overrideFlags)})},BBe=()=>oo.getAll().enableTraceSession||PK.getPlatformSettings(rU.VERBOSE_LOGGING)&&PK.getPlatformSettings(rU.AMPERWAVE_END_TO_END_LOGGING);var Un={},M9=function(e){return e=e||window.navigator.userAgent,/Android/i.test(e)},mle=function(e){return e=e||window.navigator.userAgent,/CrOS/i.test(e)},vle=function(e){return e=e||window.navigator.userAgent,e.indexOf("Edge/")!==-1||e.indexOf("Edg/")!==-1},F9=function(e){return e=e||window.navigator.userAgent,/SamsungBrowser/i.test(e)},$9=function(e){return e=e||window.navigator.userAgent,e.indexOf("DuckDuckGo/")!==-1},yle=function(e){return e=e||window.navigator.userAgent,e.indexOf("OPR/")!==-1||e.indexOf("Opera/")!==-1||e.indexOf("OPT/")!==-1},ble=function(e){return e=e||window.navigator.userAgent,e.indexOf("Silk/")!==-1},UBe=vle,VBe=F9,HBe=$9,jBe=yle,zBe=ble,B9=function(e){return e=e||window.navigator.userAgent,(e.indexOf("Chrome")!==-1||e.indexOf("CriOS")!==-1)&&!UBe(e)&&!VBe(e)&&!HBe(e)&&!jBe(e)&&!zBe(e)},Sle=function(e){return e=e||window.navigator.userAgent,e.indexOf("Trident/7")!==-1},GBe=Sle,WBe=function(e){return e=e||window.navigator.userAgent,e.indexOf("MSIE")!==-1||GBe(e)},qBe=function(e){return e=e||window.navigator.userAgent,e.indexOf("MSIE 9")!==-1},KBe=function(e){return e=e||window.navigator.userAgent,e.indexOf("MSIE 10")!==-1},Ele=function(e){return e=e||window.navigator.userAgent,/Firefox/i.test(e)},YBe=function(e){return e=e||window.navigator.userAgent,/^Mozilla\/5\.0.*Safari\//.test(e)&&!/(iPhone|iPad|iPod|Android|SM-)/i.test(e)&&!/Chrome|CriOS|FxiOS|OPiOS|mercury/i.test(e)},Tle=function(e,n){return e=e||window.navigator.userAgent,n=n||window.document,/Mac|iPad/i.test(e)&&"ontouchend"in n},ZBe=Tle,ex=function(e,n,r){n===void 0&&(n=!0),e=e||window.navigator.userAgent;var i=/iPhone|iPod|iPad/i.test(e);return n?i||ZBe(e,r):i},Jk=function(e){return e=e||window.navigator.userAgent,/FxiOS/i.test(e)},QBe=ex;function XBe(t){return/\bGSA\b/.test(t)}var Ale=function(e){return e=e||window.navigator.userAgent,QBe(e)&&XBe(e)},JBe=ex,eUe=Jk,tUe=/webkit/i;function nUe(t){return tUe.test(t)}function rUe(t){return t.indexOf("CriOS")>-1}function iUe(t){return t.indexOf("FBAN")>-1}var sUe=function(e){return e=e||window.navigator.userAgent,JBe(e)&&nUe(e)&&!rUe(e)&&!eUe(e)&&!iUe(e)},aUe=ex,oUe=Ale,e2=function(e){return e=e||window.navigator.userAgent,aUe(e)?oUe(e)?!0:/.+AppleWeb
106Kit(?!.*Safari)/i.test(e):!1},lUe=e2,uUe=function(e,n){return n=typeof n<"u"?n:window.statusbar.visible,lUe(e)&&!n},cUe=e2,dUe=function(e,n){return n=typeof n<"u"?n:window.statusbar.visible,cUe(e)&&n},fUe=Jk,hUe=Ele,pUe=function(e){return e=e||window.navigator.userAgent,fUe(e)||/iPhone|iPod|iPad|Mobile|Tablet/i.test(e)&&hUe(e)},gUe=M9,mUe=mle,vUe=ex,yUe=function(){return gUe()||mUe()||vUe()},bUe=48,SUe=M9,EUe=Jk,TUe=e2,AUe=B9,wUe=F9,_Ue=$9;function CUe(t){t=t||window.navigator.userAgent;var e=t.match(/CriOS\/(\d+)\./);if(!e)return!1;var n=parseInt(e[1],10);return n<bUe}function wle(t){return t=t||window.navigator.userAgent,t.indexOf("Opera Mini")>-1}function xUe(t){var e=/Version\/[\d.]+/i;return t=t||window.navigator.userAgent,SUe(t)?e.test(t)&&!wle(t)&&!_Ue(t):!1}function IUe(t){return!AUe(t)&&!wUe(t)&&/samsung/i.test(t)}var OUe=function(e){return e=e||window.navigator.userAgent,!(TUe(e)||EUe(e)||xUe(e)||wle(e)||CUe(e)||IUe(e))},PUe=B9,RUe=61;function LUe(t){var e=t.match(/Chrome\/(\d+)\./);if(!e)return!1;var n=parseInt(e[1],10);return n>=RUe}var DUe=function(e){return e=e||window.navigator.userAgent,window.PaymentRequest?PUe(e)?LUe(e):!0:!1};Object.defineProperty(Un,"__esModule",{value:!0});Un.supportsPaymentRequestApi=Un.supportsPopups=Un.hasSoftwareKeyboard=Un.isSilk=Un.isSamsungBrowser=Un.isOpera=Un.isMobileFirefox=Un.isIpadOS=Un.isIosWKWebview=Un.isIosWebview=Un.isIosUIWebview=Cle=Un.isIosSafari=_le=Un.isSafari=Un.isIosGoogleSearchApp=Un.isIosFirefox=Un.isIos=Un.isFirefox=Un.isEdge=Un.isIe11=Un.isIe10=Un.isIe9=Un.isIe=Un.isDuckDuckGo=Un.isChrome=Un.isChromeOS=Un.isAndroid=void 0;var kUe=M9;Un.isAndroid=kUe;var NUe=mle;Un.isChromeOS=NUe;var MUe=B9;Un.isChrome=MUe;var FUe=$9;Un.isDuckDuckGo=FUe;var $Ue=WBe;Un.isIe=$Ue;var BUe=qBe;Un.isIe9=BUe;var UUe=KBe;Un.isIe10=UUe;var VUe=Sle;Un.isIe11=VUe;var HUe=vle;Un.isEdge=HUe;var jUe=Ele;Un.isFirefox=jUe;var zUe=YBe,_le=Un.isSafari=zUe,GUe=ex;Un.isIos=GUe;var WUe=Jk;Un.isIosFirefox=WUe;var qUe=Ale;Un.isIosGoogleSearchApp=qUe;var KUe=sUe,Cle=Un.isIosSafari=KUe,YUe=uUe;Un.isIosUIWebview=YUe;var ZUe=e2;Un.isIosWebview=ZUe;var QUe=dUe;Un.isIosWKWebview=QUe;var XUe=Tle;Un.isIpadOS=XUe;var JUe=pUe;Un.isMobileFirefox=JUe;var e4e=yle;Un.isOpera=e4e;var t4e=F9;Un.isSamsungBrowser=t4e;var n4e=ble;Un.isSilk=n4e;var r4e=yUe;Un.hasSoftwareKeyboard=r4e;var i4e=OUe;Un.supportsPopups=i4e;var s4e=DUe;Un.supportsPaymentRequestApi=s4e;const U9=t=>_le(t)||Cle(t),a4e=()=>{var t;return((t=navigator==null?void 0:navigator.connection)==null?void 0:t.effectiveType)??"unknown"};var fc=(t=>(t.ElapsedTime="ElapsedTime",t.Live="Live",t.WallClock="WallClock",t))(fc||{}),qr=(t=>(t.Hidden="Hidden",t.VisibleDisabled="VisibleDisabled",t.VisibleEnabled="VisibleEnabled",t))(qr||{});const Qi={backToLiveButton:qr.Hidden,ff15sButton:qr.Hidden,nextTrackButton:qr.Hidden,pauseButton:qr.Hidden,playButton:qr.Hidden,prevTrackButton:qr.Hidden,replayButton:qr.Hidden,rw15sButton:qr.Hidden,scrubberBarType:fc.ElapsedTime,scrubberIsUserControlled:!1,skipButton:qr.Hidden,skipsRemaining:0,stopButton:qr.Hidden,thumbsUpButton:qr.Hidden,scrubberIsDisabled:!1,shouldDisplayLiveIndicator:!1,restartShowButton:qr.Hidden,previousChapterButton:qr.Hidden,nextChapterButton:qr.Hidden},o4e={skip15:15},l4e="Not Available",RK=1;var lg=(t=>(t.End="End",t.Middle="Middle",t.Start="Start",t))(lg||{}),kh=(t=>(t.End="End",t.Middle="Middle",t.Start="Start",t.StartAndEnd="StartAndEnd",t))(kh||{}),Hi=(t=>(t.Ended="Ended",t.Error="Error",t.Idle="Idle",t.Loading="Loading",t.Paused="Paused",t.Playing="Playing",t))(Hi||{});function u4e(t){return t==null}var c4e=u4e;const xle=pi(c4e);function d4e(){this.__data__=[],this.size=0}var f4e=d4e;function h4e(t,e){return t===e||t!==t&&e!==e}var t2=h4e,p4e=t2;function g4e(t,e){for(var n=t.length;n--;)if(p4e(t[n][0],e))return n;return-1}var n2=g4e,m4e=n2,v4e=Array.prototype,y4e=v4e.splice;function b4e(t){var e=this.__data__,n=m4e(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():y4e.call(e,n,1),--this.size,!0}var S4e=b4e,E4e=n2;function T4e(t){var e=this.__data__,n=E4e(e,t);return n<0?void 0:e[n][1]}var A4e=T4e,w4e=n2;function _4e(t){return w4e(this.__data__,t)>-1}
vendor: 12,017 bytes, line 106
106var C4e=_4e,x4e=n2;function I4e(t,e){var n=this.__data__,r=x4e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var O4e=I4e,P4e=f4e,R4e=S4e,L4e=A4e,D4e=C4e,k4e=O4e;function aT(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}aT.prototype.clear=P4e;aT.prototype.delete=R4e;aT.prototype.get=L4e;aT.prototype.has=D4e;aT.prototype.set=k4e;var r2=aT,N4e=r2;function M4e(){this.__data__=new N4e,this.size=0}var F4e=M4e;function $4e(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var B4e=$4e;function U4e(t){return this.__data__.get(t)}var V4e=U4e;function H4e(t){return this.__data__.has(t)}var j4e=H4e,z4e=ap,G4e=z4e["__core-js_shared__"],W4e=G4e,G3=W4e,LK=function(){var t=/[^.]+$/.exec(G3&&G3.keys&&G3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function q4e(t){return!!LK&&LK in t}var K4e=q4e,Y4e=Function.prototype,Z4e=Y4e.toString;function Q4e(t){if(t!=null){try{return Z4e.call(t)}catch{}try{return t+""}catch{}}return""}var Ile=Q4e,X4e=N9,J4e=K4e,e6e=Dg,t6e=Ile,n6e=/[\\^$.*+?()[\]{}|]/g,r6e=/^\[object .+?Constructor\]$/,i6e=Function.prototype,s6e=Object.prototype,a6e=i6e.toString,o6e=s6e.hasOwnProperty,l6e=RegExp("^"+a6e.call(o6e).replace(n6e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u6e(t){if(!e6e(t)||J4e(t))return!1;var e=X4e(t)?l6e:r6e;return e.test(t6e(t))}var c6e=u6e;function d6e(t,e){return t==null?void 0:t[e]}var f6e=d6e,h6e=c6e,p6e=f6e;function g6e(t,e){var n=p6e(t,e);return h6e(n)?n:void 0}var yb=g6e,m6e=yb,v6e=ap,y6e=m6e(v6e,"Map"),V9=y6e,b6e=yb,S6e=b6e(Object,"create"),i2=S6e,DK=i2;function E6e(){this.__data__=DK?DK(null):{},this.size=0}var T6e=E6e;function A6e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var w6e=A6e,_6e=i2,C6e="__lodash_hash_undefined__",x6e=Object.prototype,I6e=x6e.hasOwnProperty;function O6e(t){var e=this.__data__;if(_6e){var n=e[t];return n===C6e?void 0:n}return I6e.call(e,t)?e[t]:void 0}var P6e=O6e,R6e=i2,L6e=Object.prototype,D6e=L6e.hasOwnProperty;function k6e(t){var e=this.__data__;return R6e?e[t]!==void 0:D6e.call(e,t)}var N6e=k6e,M6e=i2,F6e="__lodash_hash_undefined__";function $6e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=M6e&&e===void 0?F6e:e,this}var B6e=$6e,U6e=T6e,V6e=w6e,H6e=P6e,j6e=N6e,z6e=B6e;function oT(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}oT.prototype.clear=U6e;oT.prototype.delete=V6e;oT.prototype.get=H6e;oT.prototype.has=j6e;oT.prototype.set=z6e;var G6e=oT,kK=G6e,W6e=r2,q6e=V9;function K6e(){this.size=0,this.__data__={hash:new kK,map:new(q6e||W6e),string:new kK}}var Y6e=K6e;function Z6e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Q6e=Z6e,X6e=Q6e;function J6e(t,e){var n=t.__data__;return X6e(e)?n[typeof e=="string"?"string":"hash"]:n.map}var s2=J6e,e8e=s2;function t8e(t){var e=e8e(this,t).delete(t);return this.size-=e?1:0,e}var n8e=t8e,r8e=s2;function i8e(t){return r8e(this,t).get(t)}var s8e=i8e,a8e=s2;function o8e(t){return a8e(this,t).has(t)}var l8e=o8e,u8e=s2;function c8e(t,e){var n=u8e(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var d8e=c8e,f8e=Y6e,h8e=n8e,p8e=s8e,g8e=l8e,m8e=d8e;function lT(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}lT.prototype.clear=f8e;lT.prototype.delete=h8e;lT.prototype.get=p8e;lT.prototype.has=g8e;lT.prototype.set=m8e;var H9=lT,v8e=r2,y8e=V9,b8e=H9,S8e=200;function E8e(t,e){var n=this.__data__;if(n instanceof v8e){var r=n.__data__;if(!y8e||r.length<S8e-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new b8e(r)}return n.set(t,e),this.size=n.size,this}var T8e=E8e,A8e=r2,w8e=F4e,_8e=B4e,C8e=V4e,x8e=j4e,I8e=T8e;function uT(t){var e=this.__data__=new A8e(t);this.size=e.size}uT.prototype.clear=w8e;uT.prototype.delete=_8e;uT.prototype.get=C8e;uT.prototype.has=x8e;uT.prototype.set=I8e;var Ole=uT,O8e="__lodash_hash_undefined__";function P8e(t){return this.__data__.set(t,O8e),this}var R8e=P8e;function L8e(t){return this.__data__.has(t)}var D8e=L8e,k8e=H9,N8e=R8e,M8e=D8e;function qR(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new k8e;++e<n;)this.add(t[e])}qR.prototype.add=qR.prototype.push=N8e;qR.prototype.has=M8e;var F8e=qR;function $8e(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var B8e=$8e;function U8e(t,e){return t.has(e)}var V8e=U8e,H8e=F8e,j8e=B8e,z8e=V8e,G8e=1,W8e=2;function q8e(t,e,n,r,i,s){var a=n&G8e,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,h=n&W8e?new H8e:void 0;for(s.set(t,e),s.set(e,t);++d<o;){var g=t[d],v=e[d];if(r)var b=a?r(v,g,d,e,t,s):r(g,v,d,t,e,s);if(b!==void 0){if(b)continue;f=!1;break}if(h){if(!j8e(e,function(S,A){if(!z8e(h,A)&&(g===S||i(g,S,n,r,s)))return h.push(A)})){f=!1;break}}else if(!(g===v||i(g,v,n,r,s))){f=!1;break}}return s.delete(t),s.delete(e),f}var Ple=q8e,K8e=ap,Y8e=K8e.Uint8Array,Z8e=Y8e;function Q8e(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var X8e=Q8e;function J8e(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var e9e=J8e,NK=JC,MK=Z8e,t9e=t2,n9e=Ple,r9e=X8e,i9e=e9e,s9e=1,a9e=2,o9e="[object Boolean]",l9e="[object Date]",u9e="[object Error]",c9e="[object Map]",d9e="[object Number]",f9e="[object RegExp]",h9e="[object Set]",p9e="[object String]",g9e="[object Symbol]",m9e="[object ArrayBuffer]",v9e="[object DataView]",FK=NK?NK.prototype:void 0,W3=FK?FK.valueOf:void 0;function y9e(t,e,n,r,i,s,a){switch(n){case v9e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case m9e:return!(t.byteLength!=e.byteLength||!s(new MK(t),new MK(e)));case o9e:case l9e:case d9e:return t9e(+t,+e);case u9e:return t.name==e.name&&t.message==e.message;case f9e:case p9e:return t==e+"";case c9e:var o=r9e;case h9e:var l=r&s9e;if(o||(o=i9e),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=a9e,a.set(t,e);var c=n9e(o(t),o(e),r,i,s,a);return a.delete(t),c;case g9e:if(W3)return W3.call(t)==W3.call(e)}return!1}var b9e=y9e;function S9e(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var j9=S9e,E9e=Array.isArray,Ld=E9e;const KR=pi(Ld);var T9e=j9,A9e=Ld;function w9e(t,e,n){var r=e(t);return A9e(t)?r:T9e(r,n(t))}var Rle=w9e;function _9e(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}var C9e=_9e;function x9e(){return[]}var Lle=x9e,I9e=C9e,O9e=Lle,P9e=Object.prototype,R9e=P9e.propertyIsEnumerable,$K=Object.getOwnPropertySymbols,L9e=$K?function(t){return t==null?[]:(t=Object(t),I9e($K(t),function(e){return R9e.call(t,e)}))}:O9e,Dle=L9e;function D9e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var k9e=D9e;function N9e(t){return t!=null&&typeof t=="object"}var bb=N9e,M9e=vb,F9e=bb,$9e="[object Arguments]";function B9e(t){return F9e(t)&&M9e(t)==$9e}var U9e=B9e,BK=U9e,V9e=bb,kle=Object.prototype,H9e=kle.hasOwnProperty,j9e=kle.propertyIsEnumerable,z9e=BK(function(){return arguments}())?BK:function(t){return V9e(t)&&H9e.call(t,"callee")&&!j9e.call(t,"callee")},a2=z9e,YR={exports:{}};function G9e(){return!1}var W9e=G9e;YR.exports;(function(t,e){var n=ap,r=W9e,i=e&&!e.nodeType&&e,s=i&&!0&&t&&!t.nodeType&&t,a=s&&s.exports===i,o=a?n.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||r;t.exports=u})(YR,YR.exports);var z9=YR.exports,q9e=9007199254740991,K9e=/^(?:0|[1-9]\d*)$/;function Y9e(t,e){var n=typeof t;return e=e??q9e,!!e&&(n=="number"||n!="symbol"&&K9e.test(t))&&t>-1&&t%1==0&&t<e}var o2=Y9e,Z9e=9007199254740991;function Q9e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Z9e}var G9=Q9e,X9e=vb,J9e=G9,e7e=bb,t7e="[object Arguments]",n7e="[object Array]",r7e="[object Boolean]",i7e="[object Date]",s7e="[object Error]",a7e="[object Function]",o7e="[object Map]",l7e="[object Number]",u7e="[object Object]",c7e="[object RegExp]",d7e="[object Set]",f7e="[object String]",h7e="[object WeakMap]",p7e="[object ArrayBuffer]",g7e="[object DataView]",m7e="[object Float32Array]",v7e="[object Float64Array]",y7e="[object Int8Array]",b7e="[object Int16Array]",S7e="[object Int32Array]",E7e="[object Uint8Array]",T7e="[object Uint8ClampedArray]",A7e="[object Uint16Array]",w7e="[object Uint32Array]",Rs={};Rs[m7e]=Rs[v7e]=Rs[y7e]=Rs[b7e]=Rs[S7e]=Rs[E7e]=Rs[T7e]=Rs[A7e]=Rs[w7e]=!0;Rs[t7e]=Rs[n7e]=Rs[p7e]=Rs[r7e]=Rs[g7e]=Rs[i7e]=Rs[s7e]=Rs[a7e]=Rs[o7e]=Rs[l7e]=Rs[u7e]=Rs[c7e]=Rs[d7e]=Rs[f7e]=Rs[h7e]=!1;function _7e(t){return e7e(t)&&J9e(t.length)&&!!Rs[X9e(t)]}var C7e=_7e;function x7e(t){return function(e){return t(e)}}var Nle=x7e,ZR={exports:{}};ZR.exports;(function(t,e){var n=hle,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===r,a=s&&n.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=o})(ZR,ZR.exports);var Mle=ZR.exports,I7e=C7e,O7e=Nle,UK=Mle,VK=UK&&UK.isTypedArray,P7e=VK?O7e(VK):I7e,W9=P7e,R7e=k9e,L7e=a2,D7e=Ld,k7e=z9,N7e=o2,M7e=W9,F7e=Object.prototype,$7e=F7e.hasOwnProperty;function B7e(t,e){var n=D7e(t),r=!n&&L7e(t),i=!n&&!r&&k7e(t),s=!n&&!r&&!i&&M7e(t),a=n||r||i||s,o=a?R7e(t.length,String):[],l=o.length;for(var u in t)(e||$7e.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||N7e(u,l)))&&o.push(u);return o}var Fle=B7e,U7e=Object.prototype;function V7e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||U7e;return t===n}var q9=V7e;function H7e(t,e){return function(n){return t(e(n))}}var $le=H7e,j7e=$le,z7e=j7e(Object.keys,Object),G7e=z7e,W7e=q9,q7e=G7e,K7e=Object.prototype,Y7e=K7e.hasOwnProperty;function Z7e(t){if(!W7e(t))return q7e(t);var e=[];for(var n in Object(t))Y7e.call(t,n)&&n!="constructor"&&e.push(n);return e}var Ble=Z7e,Q7e=N9,X7e=G9;function J7e(t){return t!=null&&X7e(t.length)&&!Q7e(t)}var tx=J7e,eVe=Fle,tVe=Ble,nVe=tx;function rVe(t){return nVe(t)?eVe(t):tVe(t)}var l2=rVe,iVe=Rle,sVe=Dle,aVe=l2;function oVe(t){return iVe(t,aVe,sVe)}var lVe=oVe,HK=lVe,uVe=1,cVe=Object.prototype,dVe=cVe.hasOwnProperty;function fVe(t,e,n,r,i,s){var a=n&uVe,o=HK(t),l=o.length,u=HK(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=o[d];if(!(a?f in e:dVe.call(e,f)))return!1}var h=s.get(t),g=s.get(e);if(h&&g)return h==e&&g==t;var v=!0;s.set(t,e),s.set(e,t);for(var b=a;++d<l;){f=o[d];var S=t[f],A=e[f];if(r)var w=a?r(A,S,f,e,t,s):r(S,A,f,t,e,s);if(!(w===void 0?S===A||i(S,A,n,r,s):w)){v=!1;break}b||(b=f=="constructor")}if(v&&!b){var x=t.constructor,P=e.constructor;x!=P&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof P=="function"&&P instanceof P)&&(v=!1)}return s.delete(t),s.delete(e),v}var hVe=fVe,pVe=yb,gVe=ap,mVe=pVe(gVe,"DataView"),vVe=mVe,yVe=yb,bVe=ap,SVe=yVe(bVe,"Promise"),EVe=SVe,TVe=yb,AVe=ap,wVe=TVe(AVe,"Set"),_Ve=wVe,CVe=yb,xVe=ap,IVe=CVe(xVe,"WeakMap"),OVe=IVe,iU=vVe,sU=V9,aU=EVe,oU=_Ve,lU=OVe,Ule=vb,cT=Ile,jK="[object Map]",PVe="[object Object]",zK="[object Promise]",GK="[object Set]",WK="[object WeakMap]",qK="[object DataView]",RVe=cT(iU),LVe=cT(sU),DVe=cT(aU),kVe=cT(oU),NVe=cT(lU),$y=Ule;(iU&&$y(new iU(new ArrayBuffer(1)))!=qK||sU&&$y(new sU)!=jK||aU&&$y(aU.resolve())!=zK||oU&&$y(new oU)!=GK||lU&&$y(new lU)!=WK)&&($y=function(t){var e=Ule(t),n=e==PVe?t.constructor:void 0,r=n?cT(n):"";if(r)switch(r){case RVe:return qK;case LVe:return jK;case DVe:return zK;case kVe:return GK;case NVe:return WK}return e});var Vle=$y,q3=Ole,MVe=Ple,FVe=b9e,$Ve=hVe,KK=Vle,YK=Ld,ZK=z9,BVe=W9,UVe=1,QK="[object Arguments]",XK="[object Array]",rO="[object Object]",VVe=Object.prototype,JK=VVe.hasOwnProperty;function HVe(t,e,n,r,i,s){var a=YK(t),o=YK(e),l=a?XK:KK(t),u=o?XK:KK(e);l=l==QK?rO:l,u=u==QK?rO:u;var c=l==rO,d=u==rO,f=l==u;if(f&&ZK(t)){if(!ZK(e))return!1;a=!0,c=!1}if(f&&!c)return s||(s=new q3),a||BVe(t)?MVe(t,e,n,r,i,s):FVe(t,e,l,n,r,i,s);if(!(n&UVe)){var h=c&&JK.call(t,"__wrapped__"),g=d&&JK.call(e,"__wrapped__");
vendor: 5,509 bytes, line 106
106if(h||g){var v=h?t.value():t,b=g?e.value():e;return s||(s=new q3),i(v,b,n,r,s)}}return f?(s||(s=new q3),$Ve(t,e,n,r,i,s)):!1}var jVe=HVe,zVe=jVe,eY=bb;function Hle(t,e,n,r,i){return t===e?!0:t==null||e==null||!eY(t)&&!eY(e)?t!==t&&e!==e:zVe(t,e,n,r,Hle,i)}var K9=Hle,GVe=Ole,WVe=K9,qVe=1,KVe=2;function YVe(t,e,n,r){var i=n.length,s=i,a=!r;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var l=o[0],u=t[l],c=o[1];if(a&&o[2]){if(u===void 0&&!(l in t))return!1}else{var d=new GVe;if(r)var f=r(u,c,l,t,e,d);if(!(f===void 0?WVe(c,u,qVe|KVe,r,d):f))return!1}}return!0}var ZVe=YVe,QVe=Dg;function XVe(t){return t===t&&!QVe(t)}var jle=XVe,JVe=jle,eHe=l2;function tHe(t){for(var e=eHe(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,JVe(i)]}return e}var nHe=tHe;function rHe(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var zle=rHe,iHe=ZVe,sHe=nHe,aHe=zle;function oHe(t){var e=sHe(t);return e.length==1&&e[0][2]?aHe(e[0][0],e[0][1]):function(n){return n===t||iHe(n,t,e)}}var lHe=oHe,uHe=vb,cHe=bb,dHe="[object Symbol]";function fHe(t){return typeof t=="symbol"||cHe(t)&&uHe(t)==dHe}var u2=fHe,hHe=Ld,pHe=u2,gHe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mHe=/^\w*$/;function vHe(t,e){if(hHe(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||pHe(t)?!0:mHe.test(t)||!gHe.test(t)||e!=null&&t in Object(e)}var Y9=vHe,Gle=H9,yHe="Expected a function";function Z9(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(yHe);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Z9.Cache||Gle),n}Z9.Cache=Gle;var bHe=Z9,SHe=bHe,EHe=500;function THe(t){var e=SHe(t,function(r){return n.size===EHe&&n.clear(),r}),n=e.cache;return e}var AHe=THe,wHe=AHe,_He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,CHe=/\\(\\)?/g,xHe=wHe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(_He,function(n,r,i,s){e.push(i?s.replace(CHe,"$1"):r||n)}),e}),IHe=xHe;function OHe(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Q9=OHe,tY=JC,PHe=Q9,RHe=Ld,LHe=u2,nY=tY?tY.prototype:void 0,rY=nY?nY.toString:void 0;function Wle(t){if(typeof t=="string")return t;if(RHe(t))return PHe(t,Wle)+"";if(LHe(t))return rY?rY.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var DHe=Wle,kHe=DHe;function NHe(t){return t==null?"":kHe(t)}var qle=NHe,MHe=Ld,FHe=Y9,$He=IHe,BHe=qle;function UHe(t,e){return MHe(t)?t:FHe(t,e)?[t]:$He(BHe(t))}var c2=UHe,VHe=u2;function HHe(t){if(typeof t=="string"||VHe(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var nx=HHe,jHe=c2,zHe=nx;function GHe(t,e){e=jHe(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[zHe(e[n++])];return n&&n==r?t:void 0}var X9=GHe,WHe=X9;function qHe(t,e,n){var r=t==null?void 0:WHe(t,e);return r===void 0?n:r}var KHe=qHe;function YHe(t,e){return t!=null&&e in Object(t)}var ZHe=YHe,QHe=c2,XHe=a2,JHe=Ld,eje=o2,tje=G9,nje=nx;function rje(t,e,n){e=QHe(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=nje(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&tje(i)&&eje(a,i)&&(JHe(t)||XHe(t)))}var ije=rje,sje=ZHe,aje=ije;function oje(t,e){return t!=null&&aje(t,e,sje)}var Kle=oje,lje=K9,uje=KHe,cje=Kle,dje=Y9,fje=jle,hje=zle,pje=nx,gje=1,mje=2;function vje(t,e){return dje(t)&&fje(e)?hje(pje(t),e):function(n){var r=uje(n,t);return r===void 0&&r===e?cje(n,t):lje(e,r,gje|mje)}}var yje=vje;function bje(t){return t}var Yle=bje;function Sje(t){return function(e){return e==null?void 0:e[t]}}var Eje=Sje,Tje=X9;function Aje(t){return function(e){return Tje(e,t)}}var wje=Aje,_je=Eje,Cje=wje,xje=Y9,Ije=nx;function Oje(t){return xje(t)?_je(Ije(t)):Cje(t)}var Pje=Oje,Rje=lHe,Lje=yje,Dje=Yle,kje=Ld,Nje=Pje;function Mje(t){return typeof t=="function"?t:t==null?Dje:typeof t=="object"?kje(t)?Lje(t[0],t[1]):Rje(t):Nje(t)}var J9=Mje,Fje="Expected a function";function $je(t){if(typeof t!="function")throw new TypeError(Fje);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var Bje=$je,Uje=yb,Vje=function(){try{var t=Uje(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Zle=Vje,iY=Zle;function Hje(t,e,n){e=="__proto__"&&iY?iY(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Qle=Hje,jje=Qle,zje=t2,Gje=Object.prototype,Wje=Gje.hasOwnProperty;function qje(t,e,n){var r=t[e];(!(Wje.call(t,e)&&zje(r,n))||n===void 0&&!(e in t))&&jje(t,e,n)}var Kje=qje,Yje=Kje,Zje=c2,Qje=o2,sY=Dg,Xje=nx;function Jje(t,e,n,r){if(!sY(t))return t;e=Zje(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i<s;){var l=Xje(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=a){var c=o[l];u=r?r(c,l,o):void 0,u===void 0&&(u=sY(c)?c:Qje(e[i+1])?[]:{})}Yje(o,l,u),o=o[l]}return t}var eze=Jje,tze=X9,nze=eze,rze=c2;function ize(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var a=e[r],o=tze(t,a);n(o,a)&&nze(s,rze(a,t),o)}return s}var Xle=ize,sze=$le,aze=sze(Object.getPrototypeOf,Object),oze=aze,lze=j9,uze=oze,cze=Dle,dze=Lle,fze=Object.getOwnPropertySymbols,hze=fze?function(t){for(var e=[];t;)lze(e,cze(t)),t=uze(t);return e}:dze,pze=hze;function gze(t){var e=[];
106if(t!=null)for(var n in Object(t))e.push(n);return e}var mze=gze,vze=Dg,yze=q9,bze=mze,Sze=Object.prototype,Eze=Sze.hasOwnProperty;function Tze(t){if(!vze(t))return bze(t);var e=yze(t),n=[];for(var r in t)r=="constructor"&&(e||!Eze.call(t,r))||n.push(r);return n}var Aze=Tze,wze=Fle,_ze=Aze,Cze=tx;function xze(t){return Cze(t)?wze(t,!0):_ze(t)}var Ize=xze,Oze=Rle,Pze=pze,Rze=Ize;function Lze(t){return Oze(t,Rze,Pze)}var Dze=Lze,kze=Q9,Nze=J9,Mze=Xle,Fze=Dze;function $ze(t,e){if(t==null)return{};var n=kze(Fze(t),function(r){return[r]});return e=Nze(e),Mze(t,n,function(r,i){return e(r,i[0])})}var Bze=$ze,Uze=J9,Vze=Bje,Hze=Bze;function jze(t,e){return Hze(t,Vze(Uze(e)))}var zze=jze;const Gze=pi(zze);var Jle={exports:{}},ew={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */ew.exports;var aY;function Wze(){return aY||(aY=1,function(t,e){(function(n){var r=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,s=typeof Ys=="object"&&Ys;(s.global===s||s.window===s||s.self===s)&&(n=s);var a,o=2147483647,l=36,u=1,c=26,d=38,f=700,h=72,g=128,v="-",b=/^xn--/,S=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-u,P=Math.floor,N=String.fromCharCode,k;function U(ae){throw new RangeError(w[ae])}function H(ae,ue){for(var Q=ae.length,de=[];Q--;)de[Q]=ue(ae[Q]);return de}function B(ae,ue){var Q=ae.split("@"),de="";Q.length>1&&(de=Q[0]+"@",ae=Q[1]),ae=ae.replace(A,".");var le=ae.split("."),ye=H(le,ue).join(".");return de+ye}function q(ae){for(var ue=[],Q=0,de=ae.length,le,ye;Q<de;)le=ae.charCodeAt(Q++),le>=55296&&le<=56319&&Q<de?(ye=ae.charCodeAt(Q++),(ye&64512)==56320?ue.push(((le&1023)<<10)+(ye&1023)+65536):(ue.push(le),Q--)):ue.push(le);return ue}function Z(ae){return H(ae,function(ue){var Q="";return ue>65535&&(ue-=65536,Q+=N(ue>>>10&1023|55296),ue=56320|ue&1023),Q+=N(ue),Q}).join("")}function C(ae){return ae-48<10?ae-22:ae-65<26?ae-65:ae-97<26?ae-97:l}function L(ae,ue){return ae+22+75*(ae<26)-((ue!=0)<<5)}function V(ae,ue,Q){var de=0;for(ae=Q?P(ae/f):ae>>1,ae+=P(ae/ue);ae>x*c>>1;de+=l)ae=P(ae/x);return P(de+(x+1)*ae/(ae+d))}function j(ae){var ue=[],Q=ae.length,de,le=0,ye=g,fe=h,We,Le,Ve,at,Et,ne,Ze,lt,ot;for(We=ae.lastIndexOf(v),We<0&&(We=0),Le=0;Le<We;++Le)ae.charCodeAt(Le)>=128&&U("not-basic"),ue.push(ae.charCodeAt(Le));for(Ve=We>0?We+1:0;Ve<Q;){for(at=le,Et=1,ne=l;Ve>=Q&&U("invalid-input"),Ze=C(ae.charCodeAt(Ve++)),(Ze>=l||Ze>P((o-le)/Et))&&U("overflow"),le+=Ze*Et,lt=ne<=fe?u:ne>=fe+c?c:ne-fe,!(Ze<lt);ne+=l)ot=l-lt,Et>P(o/ot)&&U("overflow"),Et*=ot;de=ue.length+1,fe=V(le-at,de,at==0),P(le/de)>o-ye&&U("overflow"),ye+=P(le/de),le%=de,ue.splice(le++,0,ye)}return Z(ue)}function X(ae){var ue,Q,de,le,ye,fe,We,Le,Ve,at,Et,ne=[],Ze,lt,ot,se;for(ae=q(ae),Ze=ae.length,ue=g,Q=0,ye=h,fe=0;fe<Ze;++fe)Et=ae[fe],Et<128&&ne.push(N(Et));for(de=le=ne.length,le&&ne.push(v);de<Ze;){for(We=o,fe=0;fe<Ze;++fe)Et=ae[fe],Et>=ue&&Et<We&&(We=Et);for(lt=de+1,We-ue>P((o-Q)/lt)&&U("overflow"),Q+=(We-ue)*lt,ue=We,fe=0;fe<Ze;++fe)if(Et=ae[fe],Et<ue&&++Q>o&&U("overflow"),Et==ue){for(Le=Q,Ve=l;at=Ve<=ye?u:Ve>=ye+c?c:Ve-ye,!(Le<at);Ve+=l)se=Le-at,ot=l-at,ne.push(N(L(at+se%ot,0))),Le=P(se/ot);ne.push(N(L(Le,0))),ye=V(Q,lt,de==le),Q=0,++de}++Q,++ue}return ne.join("")}function G(ae){return B(ae,function(ue){return b.test(ue)?j(ue.slice(4).toLowerCase()):ue})}function ie(ae){return B(ae,function(ue){return S.test(ue)?"xn--"+X(ue):ue})}
106if(a={version:"1.3.2",ucs2:{decode:q,encode:Z},decode:j,encode:X,toASCII:ie,toUnicode:G},r&&i)if(t.exports==r)i.exports=a;else for(k in a)a.hasOwnProperty(k)&&(r[k]=a[k]);else n.punycode=a})(Ys)}(ew,ew.exports)),ew.exports}var K3={exports:{}};/*!
107 * URI.js - Mutating URLs
108 * IPv6 Support
109 *
110 * Version: 1.19.11
111 *
112 * Author: Rodney Rehm
113 * Web: http://medialize.github.io/URI.js/
114 *
115 * Licensed under
116 *   MIT License http://www.opensource.org/licenses/mit-license
117 *
118 */var oY;function qze(){return oY||(oY=1,function(t){(function(e,n){t.exports?t.exports=n():e.IPv6=n(e)})(Ys,function(e){var n=e&&e.IPv6;function r(s){var a=s.toLowerCase(),o=a.split(":"),l=o.length,u=8;o[0]===""&&o[1]===""&&o[2]===""?(o.shift(),o.shift()):o[0]===""&&o[1]===""?o.shift():o[l-1]===""&&o[l-2]===""&&o.pop(),l=o.length,o[l-1].indexOf(".")!==-1&&(u=7);var c;for(c=0;c<l&&o[c]!=="";c++);if(c<u)for(o.splice(c,1,"0000");o.length<u;)o.splice(c,0,"0000");for(var d,f=0;f<u;f++){d=o[f].split("");for(var h=0;h<3&&(d[0]==="0"&&d.length>1);h++)d.splice(0,1);o[f]=d.join("")}var g=-1,v=0,b=0,S=-1,A=!1;for(f=0;f<u;f++)A?o[f]==="0"?b+=1:(A=!1,b>v&&(g=S,v=b)):o[f]==="0"&&(A=!0,S=f,b=1);b>v&&(g=S,v=b),v>1&&o.splice(g,v,""),l=o.length;var w="";for(o[0]===""&&(w=":"),f=0;f<l&&(w+=o[f],f!==l-1);f++)w+=":";return o[l-1]===""&&(w+=":"),w}function i(){return e.IPv6===this&&(e.IPv6=n),this}return{best:r,noConflict:i}})}(K3)),K3.exports}var Y3={exports:{}};/*!
119 * URI.js - Mutating URLs
120 * Second Level Domain (SLD) Support
121 *
122 * Version: 1.19.11
123 *
124 * Author: Rodney Rehm
125 * Web: http://medialize.github.io/URI.js/
126 *
127 * Licensed under
128 *   MIT License http://www.opensource.org/licenses/mit-license
129 *
130 */var lY;function Kze(){return lY||(lY=1,function(t){(function(e,n){t.exports?t.exports=n():e.SecondLevelDomains=n(e)})(Ys,function(e){var n=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" c
130om edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var s=i.lastIndexOf(".");if(s<=0||s>=i.length-1)return!1;var a=i.lastIndexOf(".",s-1);if(a<=0||a>=s-1)return!1;var o=r.list[i.slice(s+1)];return o?o.indexOf(" "+i.slice(a+1,s)+" ")>=0:!1},is:function(i){var s=i.lastIndexOf(".");if(s<=0||s>=i.length-1)return!1;var a=i.lastIndexOf(".",s-1);if(a>=0)return!1;var o=r.list[i.slice(s+1)];return o?o.indexOf(" "+i.slice(0,s)+" ")>=0:!1},get:function(i){var s=i.lastIndexOf(".");if(s<=0||s>=i.length-1)return null;var a=i.lastIndexOf(".",s-1);if(a<=0||a>=s-1)return null;var o=r.list[i.slice(s+1)];return!o||o.indexOf(" "+i.slice(a+1,s)+" ")<0?null:i.slice(a+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=n),this}};return r})}(Y3)),Y3.exports}/*!
131 * URI.js - Mutating URLs
132 *
133 * Version: 1.19.11
134 *
135 * Author: Rodney Rehm
136 * Web: http://medialize.github.io/URI.js/
137 *
138 * Licensed under
139 *   MIT License http://www.opensource.org/licenses/mit-license
140 *
141 */(function(t){(function(e,n){t.exports?t.exports=n(Wze(),qze(),Kze()):e.URI=n(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(Ys,function(e,n,r,i){var s=i&&i.URI;function a(C,L){var V=arguments.length>=1,j=arguments.length>=2;if(!(this instanceof a))return V?j?new a(C,L):new a(C):new a;
141if(C===void 0){if(V)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?C=location.href+"":C=""}if(C===null&&V)throw new TypeError("null is not a valid argument for URI");return this.href(C),L!==void 0?this.absoluteTo(L):this}function o(C){return/^[0-9]+$/.test(C)}a.version="1.19.11";var l=a.prototype,u=Object.prototype.hasOwnProperty;function c(C){return C.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function d(C){return C===void 0?"Undefined":String(Object.prototype.toString.call(C)).slice(8,-1)}function f(C){return d(C)==="Array"}function h(C,L){var V={},j,X;if(d(L)==="RegExp")V=null;else if(f(L))for(j=0,X=L.length;j<X;j++)V[L[j]]=!0;else V[L]=!0;for(j=0,X=C.length;j<X;j++){var G=V&&V[C[j]]!==void 0||!V&&L.test(C[j]);G&&(C.splice(j,1),X--,j--)}return C}function g(C,L){var V,j;if(f(L)){for(V=0,j=L.length;V<j;V++)if(!g(C,L[V]))return!1;return!0}var X=d(L);for(V=0,j=C.length;V<j;V++)if(X==="RegExp"){if(typeof C[V]=="string"&&C[V].match(L))return!0}else if(C[V]===L)return!0;return!1}function v(C,L){if(!f(C)||!f(L)||C.length!==L.length)return!1;C.sort(),L.sort();for(var V=0,j=C.length;V<j;V++)if(C[V]!==L[V])return!1;return!0}function b(C){var L=/^\/+|\/+$/g;return C.replace(L,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(C){if(!(!C||!C.nodeName)){var L=C.nodeName.toLowerCase();if(!(L==="input"&&C.type!=="image"))return a.domAttributes[L]}};function S(C){return escape(C)}function A(C){return encodeURIComponent(C).replace(/[!'()*]/g,S).replace(/\*/g,"%2A")}a.encode=A,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=A,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(C,L){var V=a.encode(C+"");return L===void 0&&(L=a.escapeQuerySpace),L?V.replace(/%20/g,"+"):V},a.decodeQuery=function(C,L){C+="",L===void 0&&(L=a.escapeQuerySpace);try{return a.decode(L?C.replace(/\+/g,"%20"):C)}catch{return C}};var w={encode:"encode",decode:"decode"},x,P=function(C,L){return function(V){try{return a[L](V+"").replace(a.characters[C][L].expression,function(j){return a.characters[C][L].map[j]})}catch{return V}}};for(x in w)a[x+"PathSegment"]=P("pathname",w[x]),a[x+"UrnPathSegment"]=P("urnpath",w[x]);var N=function(C,L,V){return function(j){var X;V?X=function(ue){return a[L](a[V](ue))}:X=a[L];for(var G=(j+"").split(C),ie=0,ae=G.length;ie<ae;ie++)G[ie]=X(G[ie]);return G.join(C)}};a.decodePath=N("/","decodePathSegment"),a.decodeUrnPath=N(":","decode
141UrnPathSegment"),a.recodePath=N("/","encodePathSegment","decode"),a.recodeUrnPath=N(":","encodeUrnPathSegment","decode"),a.encodeReserved=P("reserved","encode"),a.parse=function(C,L){var V;return L||(L={preventInvalidHostname:a.preventInvalidHostname}),C=C.replace(a.leading_whitespace_expression,""),C=C.replace(a.ascii_tab_whitespace,""),V=C.indexOf("#"),V>-1&&(L.fragment=C.substring(V+1)||null,C=C.substring(0,V)),V=C.indexOf("?"),V>-1&&(L.query=C.substring(V+1)||null,C=C.substring(0,V)),C=C.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),C=C.replace(/^[/\\]{2,}/i,"//"),C.substring(0,2)==="//"?(L.protocol=null,C=C.substring(2),C=a.parseAuthority(C,L)):(V=C.indexOf(":"),V>-1&&(L.protocol=C.substring(0,V)||null,L.protocol&&!L.protocol.match(a.protocol_expression)?L.protocol=void 0:C.substring(V+1,V+3).replace(/\\/g,"/")==="//"?(C=C.substring(V+3),C=a.parseAuthority(C,L)):(C=C.substring(V+1),L.urn=!0))),L.path=C,L},a.parseHost=function(C,L){C||(C=""),C=C.replace(/\\/g,"/");var V=C.indexOf("/"),j,X;if(V===-1&&(V=C.length),C.charAt(0)==="[")j=C.indexOf("]"),L.hostname=C.substring(1,j)||null,L.port=C.substring(j+2,V)||null,L.port==="/"&&(L.port=null);else{var G=C.indexOf(":"),ie=C.indexOf("/"),ae=C.indexOf(":",G+1);ae!==-1&&(ie===-1||ae<ie)?(L.hostname=C.substring(0,V)||null,L.port=null):(X=C.substring(0,V).split(":"),L.hostname=X[0]||null,L.port=X[1]||null)}return L.hostname&&C.substring(V).charAt(0)!=="/"&&(V++,C="/"+C),L.preventInvalidHostname&&a.ensureValidHostname(L.hostname,L.protocol),L.port&&a.ensureValidPort(L.port),C.substring(V)||"/"},a.parseAuthority=function(C,L){return C=a.parseUserinfo(C,L),a.parseHost(C,L)},a.parseUserinfo=function(C,L){var V=C,j=C.indexOf("\\");j!==-1&&(C=C.replace(/\\/g,"/"));var X=C.indexOf("/"),G=C.lastIndexOf("@",X>-1?X:C.length-1),ie;return G>-1&&(X===-1||G<X)?(ie=C.substring(0,G).split(":"),L.username=ie[0]?a.decode(ie[0]):null,ie.shift(),L.password=ie[0]?a.decode(ie.join(":")):null,C=V.substring(G+1)):(L.username=null,L.password=null),C},a.parseQuery=function(C,L){if(!C)return{};if(C=C.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!C)return{};for(var V={},j=C.split("&"),X=j.length,G,ie,ae,ue=0;ue<X;ue++)G=j[ue].split("="),ie=a.decodeQuery(G.shift(),L),ae=G.length?a.decodeQuery(G.join("="),L):null,ie!=="__proto__"&&(u.call(V,ie)?((typeof V[ie]=="string"||V[ie]===null)&&(V[ie]=[V[ie]]),V[ie].push(ae)):V[ie]=ae);return V},a.build=function(C){var L="",V=!1;return C.protocol&&(L+=C.protocol+":"),!C.urn&&(L||C.hostname)&&(L+="//",V=!0),L+=a.buildAuthority(C)||"",typeof C.path=="string"&&(C.path.charAt(0)!=="/"&&V&&(L+="/"),L+=C.path),typeof C.query=="string"&&C.query&&(L+="?"+C.query),typeof C.fragment=="string"&&C.fragment&&(L+="#"+C.fragment),L},a.buildHost=function(C){var L="";if(C.hostname)a.ip6_expression.test(C.hostname)?L+="["+C.hostname+"]":L+=C.hostname;else return"";return C.port&&(L+=":"+C.port),L},a.buildAuthority=function(C){return a.buildUserinfo(C)+a.buildHost(C)},a.buildUserinfo=function(C){var L="";return C.username&&(L+=a.encode(C.username)),C.password&&(L+=":"+a.encode(C.password)),L&&(L+="@"),L},a.buildQuery=function(C,L,V){var j="",X,G,ie,ae;for(G in C)if(G!=="__proto__"&&u.call(C,G))if(f(C[G]))for(X={},ie=0,ae=C[G].length;ie<ae;ie++)C[G][ie]!==void 0&&X[C[G][ie]+""]===void 0&&(j+="&"+a.buildQueryParameter(G,C[G][ie],V),L!==!0&&(X[C[G][ie]+""]=!0));else C[G]!==void 0&&(j+="&"+a.buildQueryParameter(G,C[G],V));return j.substring(1)},a.buildQueryParameter=function(C,L,V){return a.encodeQuery(C,V)+(L!==null?"="+a.encodeQuery(L,V):"")},a.addQuery=function(C,L,V){if(typeof L=="object")for(var j in L)u.call(L,j)&&a.addQuery(C,j,L[j]);else if(typeof L=="string"){if(C[L]===void 0){C[L]=V;return}else typeof C[L]=="string"&&(C[L]=[C[L]]);f(V)||(V=[V]),C[L]=(C[L]||[]).concat(V)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(C,L,V){if(typeof L=="object")for(var j in L)u.call(L,j)&&a.setQuery(C,j,L[j]);else if(typeof L=="string")C[L]=V===void 0?null:V;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(C,L,V){var j,X,G;if(f(L))for(j=0,X=L.length;j<X;j++)C[L[j]]=void 0;else if(d(L)==="RegExp")for(G in C)L.test(G)&&(C[G]=void 0);else if(typeof L=="object")for(G in L)u.call(L,G)&&a.removeQuery(C,G,L[G]);else if(typeof L=="string")V!==void 0?d(V)==="RegExp"?!f(C[L])&&
141V.test(C[L])?C[L]=void 0:C[L]=h(C[L],V):C[L]===String(V)&&(!f(V)||V.length===1)?C[L]=void 0:f(C[L])&&(C[L]=h(C[L],V)):C[L]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(C,L,V,j){switch(d(L)){case"String":break;case"RegExp":for(var X in C)if(u.call(C,X)&&L.test(X)&&(V===void 0||a.hasQuery(C,X,V)))return!0;return!1;case"Object":for(var G in L)if(u.call(L,G)&&!a.hasQuery(C,G,L[G]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(d(V)){case"Undefined":return L in C;case"Boolean":var ie=!!(f(C[L])?C[L].length:C[L]);return V===ie;case"Function":return!!V(C[L],L,C);case"Array":if(!f(C[L]))return!1;var ae=j?g:v;return ae(C[L],V);case"RegExp":return f(C[L])?j?g(C[L],V):!1:!!(C[L]&&C[L].match(V));case"Number":V=String(V);case"String":return f(C[L])?j?g(C[L],V):!1:C[L]===V;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var C=[],L=[],V=0,j=0;j<arguments.length;j++){var X=new a(arguments[j]);C.push(X);for(var G=X.segment(),ie=0;ie<G.length;ie++)typeof G[ie]=="string"&&L.push(G[ie]),G[ie]&&V++}if(!L.length||!V)return new a("");var ae=new a("").segment(L);return(C[0].path()===""||C[0].path().slice(0,1)==="/")&&ae.path("/"+ae.path()),ae.normalize()},a.commonPath=function(C,L){var V=Math.min(C.length,L.length),j;for(j=0;j<V;j++)if(C.charAt(j)!==L.charAt(j)){j--;break}return j<1?C.charAt(0)===L.charAt(0)&&C.charAt(0)==="/"?"/":"":((C.charAt(j)!=="/"||L.charAt(j)!=="/")&&(j=C.substring(0,j).lastIndexOf("/")),C.substring(0,j+1))},a.withinString=function(C,L,V){V||(V={});var j=V.start||a.findUri.start,X=V.end||a.findUri.end,G=V.trim||a.findUri.trim,ie=V.parens||a.findUri.parens,ae=/[a-z0-9-]=["']?$/i;for(j.lastIndex=0;;){var ue=j.exec(C);if(!ue)break;var Q=ue.index;if(V.ignoreHtml){var de=C.slice(Math.max(Q-3,0),Q);if(de&&ae.test(de))continue}for(var le=Q+C.slice(Q).search(X),ye=C.slice(Q,le),fe=-1;;){var We=ie.exec(ye);if(!We)break;var Le=We.index+We[0].length;fe=Math.max(fe,Le)}if(fe>-1?ye=ye.slice(0,fe)+ye.slice(fe).replace(G,""):ye=ye.replace(G,""),!(ye.length<=ue[0].length)&&!(V.ignore&&V.ignore.test(ye))){le=Q+ye.length;var Ve=L(ye,Q,le,C);if(Ve===void 0){j.lastIndex=le;continue}Ve=String(Ve),C=C.slice(0,Q)+Ve+C.slice(le),j.lastIndex=Q+Ve.length}}return j.lastIndex=0,C},a.ensureValidHostname=function(C,L){var V=!!C,j=!!L,X=!1;if(j&&(X=g(a.hostProtocols,L)),X&&!V)throw new TypeError("Hostname cannot be empty, if protocol is "+L);if(C&&C.match(a.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(C).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(C){if(C){var L=Number(C);if(!(o(L)&&L>0&&L<65536))throw new TypeError('Port "'+C+'" is not a valid port')}},a.noConflict=function(C){if(C){var L={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(L.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(L.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(L.SecondLevelDomains=i.SecondLevelDomains.noConflict()),L}else i.URI===this&&(i.URI=s);return this},l.build=function(C){return C===!0?this._deferred_build=!0:(C===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new a(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function k(C){return function(L,V){return L===void 0?this._parts[C]||"":(this._parts[C]=L||null,this.build(!V),this)}}function U(C,L){return function(V,j){return V===void 0?this._parts[C]||"":(V!==null&&(V=V+"",V.charAt(0)===L&&(V=V.substring(1))),this._parts[C]=V,this.build(!j),this)}}l.protocol=k("protocol"),l.username=k("username"),l.password=k("password"),l.hostname=k("hostname"),l.port=k("port"),l.query=U("query","?"),l.fragment=U("fragment","#"),l.search=function(C,L){var V=this.query(C,L);return typeof V=="string"&&V.length?"?"+V:V},l.hash=function(C,L){var V=this.fragment(C,L);return typeof V=="string"&&V.length?"#"+V:V}
141,l.pathname=function(C,L){if(C===void 0||C===!0){var V=this._parts.path||(this._parts.hostname?"/":"");return C?(this._parts.urn?a.decodeUrnPath:a.decodePath)(V):V}else return this._parts.urn?this._parts.path=C?a.recodeUrnPath(C):"":this._parts.path=C?a.recodePath(C):"/",this.build(!L),this},l.path=l.pathname,l.href=function(C,L){var V;if(C===void 0)return this.toString();this._string="",this._parts=a._parts();var j=C instanceof a,X=typeof C=="object"&&(C.hostname||C.path||C.pathname);if(C.nodeName){var G=a.getDomAttribute(C);C=C[G]||"",X=!1}if(!j&&X&&C.pathname!==void 0&&(C=C.toString()),typeof C=="string"||C instanceof String)this._parts=a.parse(String(C),this._parts);else if(j||X){var ie=j?C._parts:C;for(V in ie)V!=="query"&&u.call(this._parts,V)&&(this._parts[V]=ie[V]);ie.query&&this.query(ie.query,!1)}else throw new TypeError("invalid input");return this.build(!L),this},l.is=function(C){var L=!1,V=!1,j=!1,X=!1,G=!1,ie=!1,ae=!1,ue=!this._parts.urn;switch(this._parts.hostname&&(ue=!1,V=a.ip4_expression.test(this._parts.hostname),j=a.ip6_expression.test(this._parts.hostname),L=V||j,X=!L,G=X&&r&&r.has(this._parts.hostname),ie=X&&a.idn_expression.test(this._parts.hostname),ae=X&&a.punycode_expression.test(this._parts.hostname)),C.toLowerCase()){case"relative":return ue;case"absolute":return!ue;case"domain":case"name":return X;case"sld":return G;case"ip":return L;case"ip4":case"ipv4":case"inet4":return V;case"ip6":case"ipv6":case"inet6":return j;case"idn":return ie;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return ae}return null};var H=l.protocol,B=l.port,q=l.hostname;l.protocol=function(C,L){if(C&&(C=C.replace(/:(\/\/)?$/,""),!C.match(a.protocol_expression)))throw new TypeError('Protocol "'+C+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return H.call(this,C,L)},l.scheme=l.protocol,l.port=function(C,L){return this._parts.urn?C===void 0?"":this:(C!==void 0&&(C===0&&(C=null),C&&(C+="",C.charAt(0)===":"&&(C=C.substring(1)),a.ensureValidPort(C))),B.call(this,C,L))},l.hostname=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C!==void 0){var V={preventInvalidHostname:this._parts.preventInvalidHostname},j=a.parseHost(C,V);if(j!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');C=V.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(C,this._parts.protocol)}return q.call(this,C,L)},l.origin=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var V=this.protocol(),j=this.authority();return j?(V?V+"://":"")+this.authority():""}else{var X=a(C);return this.protocol(X.protocol()).authority(X.authority()).build(!L),this}},l.host=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var V=a.parseHost(C,this._parts);if(V!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!L),this},l.authority=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var V=a.parseAuthority(C,this._parts);if(V!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!L),this},l.userinfo=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var V=a.buildUserinfo(this._parts);return V&&V.substring(0,V.length-1)}else return C[C.length-1]!=="@"&&(C+="@"),a.parseUserinfo(C,this._parts),this.build(!L),this},l.resource=function(C,L){var V;return C===void 0?this.path()+this.search()+this.hash():(V=a.parse(C),this._parts.path=V.path,this._parts.query=V.query,this._parts.fragment=V.fragment,this.build(!L),this)},l.subdomain=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var V=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,V)||""}else{var j=this._parts.hostname.length-this.domain().length,X=this._parts.hostname.substring(0,j),G=new RegExp("^"+c(X));if(C&&C.charAt(C.length-1)!=="."&&(C+="."),C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return C&&a.ensureValidHostname(C,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(G,C),this.build(!L),this}}
141,l.domain=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(L=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var V=this._parts.hostname.match(/\./g);if(V&&V.length<2)return this._parts.hostname;var j=this._parts.hostname.length-this.tld(L).length-1;return j=this._parts.hostname.lastIndexOf(".",j-1)+1,this._parts.hostname.substring(j)||""}else{if(!C)throw new TypeError("cannot set domain empty");if(C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(C,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=C;else{var X=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(X,C)}return this.build(!L),this}},l.tld=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(L=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var V=this._parts.hostname.lastIndexOf("."),j=this._parts.hostname.substring(V+1);return L!==!0&&r&&r.list[j.toLowerCase()]&&r.get(this._parts.hostname)||j}else{var X;if(C)if(C.match(/[^a-zA-Z0-9-]/))if(r&&r.is(C))X=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(X,C);else throw new TypeError('TLD "'+C+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");X=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(X,C)}else throw new TypeError("cannot set TLD empty");return this.build(!L),this}},l.directory=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var V=this._parts.path.length-this.filename().length-1,j=this._parts.path.substring(0,V)||(this._parts.hostname?"/":"");return C?a.decodePath(j):j}else{var X=this._parts.path.length-this.filename().length,G=this._parts.path.substring(0,X),ie=new RegExp("^"+c(G));return this.is("relative")||(C||(C="/"),C.charAt(0)!=="/"&&(C="/"+C)),C&&C.charAt(C.length-1)!=="/"&&(C+="/"),C=a.recodePath(C),this._parts.path=this._parts.path.replace(ie,C),this.build(!L),this}},l.filename=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(typeof C!="string"){if(!this._parts.path||this._parts.path==="/")return"";var V=this._parts.path.lastIndexOf("/"),j=this._parts.path.substring(V+1);return C?a.decodePathSegment(j):j}else{var X=!1;C.charAt(0)==="/"&&(C=C.substring(1)),C.match(/\.?\//)&&(X=!0);var G=new RegExp(c(this.filename())+"$");return C=a.recodePath(C),this._parts.path=this._parts.path.replace(G,C),X?this.normalizePath(L):this.build(!L),this}},l.suffix=function(C,L){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path||this._parts.path==="/")return"";var V=this.filename(),j=V.lastIndexOf("."),X,G;return j===-1?"":(X=V.substring(j+1),G=/^[a-z0-9%]+$/i.test(X)?X:"",C?a.decodePathSegment(G):G)}else{C.charAt(0)==="."&&(C=C.substring(1));var ie=this.suffix(),ae;if(ie)C?ae=new RegExp(c(ie)+"$"):ae=new RegExp(c("."+ie)+"$");else{if(!C)return this;this._parts.path+="."+a.recodePath(C)}return ae&&(C=a.recodePath(C),this._parts.path=this._parts.path.replace(ae,C)),this.build(!L),this}},l.segment=function(C,L,V){var j=this._parts.urn?":":"/",X=this.path(),G=X.substring(0,1)==="/",ie=X.split(j);if(C!==void 0&&typeof C!="number"&&(V=L,L=C,C=void 0),C!==void 0&&typeof C!="number")throw new Error('Bad segment "'+C+'", must be 0-based integer');if(G&&ie.shift(),C<0&&(C=Math.max(ie.length+C,0)),L===void 0)return C===void 0?ie:ie[C];if(C===null||ie[C]===void 0)if(f(L)){ie=[];for(var ae=0,ue=L.length;ae<ue;ae++)!L[ae].length&&(!ie.length||!ie[ie.length-1].length)||(ie.length&&!ie[ie.length-1].length&&ie.pop(),ie.push(b(L[ae])))}else(L||typeof L=="string")&&(L=b(L),ie[ie.length-1]===""?ie[ie.length-1]=L:ie.push(L));else L?ie[C]=b(L):ie.splice(C,1);return G&&ie.unshift(""),this.path(ie.join(j),V)},l.segmentCoded=function(C,L,V){var j,X,G;if(typeof C!="number"&&(V=L,L=C,C=void 0),L===void 0){if(j=this.segment(C,L,V),!f(j))j=j!==void 0?a.decode(j):void 0;else for(X=0,G=j.length;X<G;X++)j[X]=a.decode(j[X]);return j}if(!f(L))L=typeof L=="string"||L instanceof String?a.encode(L):L;else for(X=0,G=L.length;X<G;X++)L[X]=a.encode(L[X]);return this.segment(C,L,V)};var Z=l.query;
141return l.query=function(C,L){if(C===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="function"){var V=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),j=C.call(this,V);return this._parts.query=a.buildQuery(j||V,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!L),this}else return C!==void 0&&typeof C!="string"?(this._parts.query=a.buildQuery(C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!L),this):Z.call(this,C,L)},l.setQuery=function(C,L,V){var j=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="string"||C instanceof String)j[C]=L!==void 0?L:null;else if(typeof C=="object")for(var X in C)u.call(C,X)&&(j[X]=C[X]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(V=L),this.build(!V),this},l.addQuery=function(C,L,V){var j=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(j,C,L===void 0?null:L),this._parts.query=a.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(V=L),this.build(!V),this},l.removeQuery=function(C,L,V){var j=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(j,C,L),this._parts.query=a.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(V=L),this.build(!V),this},l.hasQuery=function(C,L,V){var j=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(j,C,L,V)},l.setSearch=l.setQuery,l.addSearch=l.addQuery,l.removeSearch=l.removeQuery,l.hasSearch=l.hasQuery,l.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},l.normalizeProtocol=function(C){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!C)),this},l.normalizeHostname=function(C){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&n&&(this._parts.hostname=n.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!C)),this},l.normalizePort=function(C){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!C)),this},l.normalizePath=function(C){var L=this._parts.path;if(!L)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!C),this;if(this._parts.path==="/")return this;L=a.recodePath(L);var V,j="",X,G;for(L.charAt(0)!=="/"&&(V=!0,L="/"+L),(L.slice(-3)==="/.."||L.slice(-2)==="/.")&&(L+="/"),L=L.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),V&&(j=L.substring(1).match(/^(\.\.\/)+/)||"",j&&(j=j[0]));X=L.search(/\/\.\.(\/|$)/),X!==-1;){if(X===0){L=L.substring(3);continue}G=L.substring(0,X).lastIndexOf("/"),G===-1&&(G=X),L=L.substring(0,G)+L.substring(X+3)}return V&&this.is("relative")&&(L=j+L.substring(1)),this._parts.path=L,this.build(!C),this},l.normalizePathname=l.normalizePath,l.normalizeQuery=function(C){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!C)),this},l.normalizeFragment=function(C){return this._parts.fragment||(this._parts.fragment=null,this.build(!C)),this},l.normalizeSearch=l.normalizeQuery,l.normalizeHash=l.normalizeFragment,l.iso8859=function(){var C=a.encode,L=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=C,a.decode=L}return this},l.unicode=function(){var C=a.encode,L=a.decode;a.encode=A,a.decode=unescape;try{this.normalize()}finally{a.encode=C,a.decode=L}return this},l.readable=function(){var C=this.clone();C.username("").password("").normalize();var L="";if(C._parts.protocol&&(L+=C._parts.protocol+"://"),C._parts.hostname&&(C.is("punycode")&&e?(L+=e.toUnicode(C._parts.hostname),C._parts.port&&(L+=":"+C._parts.port)):L+=C.host()),C._parts.hostname&&C._parts.path&&C._parts.path.
141charAt(0)!=="/"&&(L+="/"),L+=C.path(!0),C._parts.query){for(var V="",j=0,X=C._parts.query.split("&"),G=X.length;j<G;j++){var ie=(X[j]||"").split("=");V+="&"+a.decodeQuery(ie[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),ie[1]!==void 0&&(V+="="+a.decodeQuery(ie[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}L+="?"+V.substring(1)}return L+=a.decodeQuery(C.hash(),!0),L},l.absoluteTo=function(C){var L=this.clone(),V=["protocol","username","password","hostname","port"],j,X,G;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C instanceof a||(C=new a(C)),L._parts.protocol||(L._parts.protocol=C._parts.protocol,this._parts.hostname))return L;for(X=0;G=V[X];X++)L._parts[G]=C._parts[G];return L._parts.path?(L._parts.path.substring(-2)===".."&&(L._parts.path+="/"),L.path().charAt(0)!=="/"&&(j=C.directory(),j=j||(C.path().indexOf("/")===0?"/":""),L._parts.path=(j?j+"/":"")+L._parts.path,L.normalizePath())):(L._parts.path=C._parts.path,L._parts.query||(L._parts.query=C._parts.query)),L.build(),L},l.relativeTo=function(C){var L=this.clone().normalize(),V,j,X,G,ie;if(L._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C=new a(C).normalize(),V=L._parts,j=C._parts,G=L.path(),ie=C.path(),G.charAt(0)!=="/")throw new Error("URI is already relative");if(ie.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(V.protocol===j.protocol&&(V.protocol=null),V.username!==j.username||V.password!==j.password||V.protocol!==null||V.username!==null||V.password!==null)return L.build();if(V.hostname===j.hostname&&V.port===j.port)V.hostname=null,V.port=null;else return L.build();if(G===ie)return V.path="",L.build();if(X=a.commonPath(G,ie),!X)return L.build();var ae=j.path.substring(X.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return V.path=ae+V.path.substring(X.length)||"./",L.build()},l.equals=function(C){var L=this.clone(),V=new a(C),j={},X={},G={},ie,ae,ue;if(L.normalize(),V.normalize(),L.toString()===V.toString())return!0;if(ie=L.query(),ae=V.query(),L.query(""),V.query(""),L.toString()!==V.toString()||ie.length!==ae.length)return!1;j=a.parseQuery(ie,this._parts.escapeQuerySpace),X=a.parseQuery(ae,this._parts.escapeQuerySpace);for(ue in j)if(u.call(j,ue)){if(f(j[ue])){if(!v(j[ue],X[ue]))return!1}else if(j[ue]!==X[ue])return!1;G[ue]=!0}for(ue in X)if(u.call(X,ue)&&!G[ue])return!1;return!0},l.preventInvalidHostname=function(C){return this._parts.preventInvalidHostname=!!C,this},l.duplicateQueryParameters=function(C){return this._parts.duplicateQueryParameters=!!C,this},l.escapeQuerySpace=function(C){return this._parts.escapeQuerySpace=!!C,this},a})})(Jle);var Yze=Jle.exports;const H0=pi(Yze);/*! *****************************************************************************
142Copyright (c) Microsoft Corporation.
143
144Permission to use, copy, modify, and/or distribute this software for any
145purpose with or without fee is hereby granted.
146
147THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
148REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
149AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
150INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
151LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
152OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
153PERFORMANCE OF THIS SOFTWARE.
154***************************************************************************** */var Jt=function(){return Jt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Jt.apply(this,arguments)};function e7(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function ri(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function Ps(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var rs;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(rs||(rs={}));var j0;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(j0||(j0={}));var uU=rs.Start,t7=rs.Stop,rx=rs.Raise,d2=rs.Send,eue=rs.Cancel,Zze=rs.NullEvent,n7=rs.Assign;rs.After;rs.DoneState;var tue=rs.Log,Qze=rs.Init,cU=rs.Invoke;rs.ErrorExecution;var uY=rs.ErrorPlatform,Xze=rs.ErrorCustom,nue=rs.Update,Jze=rs.Choose,eGe=rs.Pure,rue=".",cY={},dU="xstate.guard",tGe="",iO;function r7(t,e,n){n===void 0&&(n=rue);
vendor: 20,672 bytes, lines 154-155
154var r=$w(t,n),i=$w(e,n);return ki(i)?ki(r)?i===r:!1:ki(r)?r in i:Object.keys(r).every(function(s){return s in i?r7(r[s],i[s]):!1})}function iue(t){try{return ki(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function fU(t,e){try{return dT(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function nGe(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function $w(t,e){if(nGe(t))return t.value;if(dT(t))return QR(t);if(typeof t!="string")return t;var n=fU(t,e);return QR(n)}function QR(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function tw(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var s=r[i];n[s]=e(t[s],s,t,i)}return n}function dY(t,e,n){var r,i,s={};try{for(var a=ri(Object.keys(t)),o=a.next();!o.done;o=a.next()){var l=o.value,u=t[l];n(u)&&(s[l]=e(u,l,t))}}catch(c){r={error:c}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return s}var rGe=function(t){return function(e){var n,r,i=e;try{for(var s=ri(t),a=s.next();!a.done;a=s.next()){var o=a.value;i=i[o]}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}};function iGe(t,e){return function(n){var r,i,s=n;try{for(var a=ri(t),o=a.next();!o.done;o=a.next()){var l=o.value;s=s[e][l]}}catch(u){r={error:u}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return s}}function _P(t){if(!t)return[[]];if(ki(t))return[[t]];var e=na(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:_P(t[n]).map(function(i){return[n].concat(i)})}));return e}function na(t){var e;return(e=[]).concat.apply(e,Ps([],yi(t),!1))}function sue(t){return dT(t)?t:[t]}function pf(t){return t===void 0?[]:sue(t)}function XR(t,e,n){var r,i;if(Pi(t))return t(e,n.data);var s={};try{for(var a=ri(Object.keys(t)),o=a.next();!o.done;o=a.next()){var l=o.value,u=t[l];Pi(u)?s[l]=u(e,n.data):s[l]=u}}catch(c){r={error:c}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return s}function sGe(t){return/^(done|error)\./.test(t)}function fY(t){return!!(t instanceof Promise||t!==null&&(Pi(t)||typeof t=="object")&&Pi(t.then))}function aGe(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function oGe(t,e){var n,r,i=yi([[],[]],2),s=i[0],a=i[1];try{for(var o=ri(t),l=o.next();!l.done;l=o.next()){var u=l.value;e(u)?s.push(u):a.push(u)}}catch(c){n={error:c}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return[s,a]}function aue(t,e){return tw(t.states,function(n,r){if(n){var i=(ki(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:aue(n,i)}}})}function lGe(t,e){return{current:e,states:aue(t,e)}}function hY(t,e,n,r){var i=t&&n.reduce(function(s,a){var o,l,u=a.assignment,c={state:r,action:a,_event:e},d={};if(Pi(u))d=u(s,e.data,c);else try{for(var f=ri(Object.keys(u)),h=f.next();!h.done;h=f.next()){var g=h.value,v=u[g];d[g]=Pi(v)?v(s,e.data,c):v}}catch(b){o={error:b}}finally{try{h&&!h.done&&(l=f.return)&&l.call(f)}finally{if(o)throw o.error}}return Object.assign({},s,d)},t);return i}var uGe=function(){};function dT(t){return Array.isArray(t)}function Pi(t){return typeof t=="function"}function ki(t){return typeof t=="string"}function oue(t,e){if(t)return ki(t)?{type:dU,name:t,predicate:e?e[t]:void 0}:Pi(t)?{type:dU,name:t.name,predicate:t}:t}function cGe(t){try{return"subscribe"in t&&Pi(t.subscribe)}catch{return!1}}var Fm=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();iO={},iO[Fm]=function(){return this},iO[Symbol.observable]=function(){return this};function m1(t){return!!t&&"__xstatenode"in t}function dGe(t){return!!t&&typeof t.send=="function"}function ix(t,e){return ki(t)||typeof t=="number"?Jt({type:t},e):t}function Oo(t,e){if(!ki(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=ix(t);return Jt({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function rS(t,e){var n=sue(e).map(function(r){return typeof r>"u"||typeof r=="string"||m1(r)?{target:r,event:t}:Jt(Jt({},r),{event:t})});return n}function fGe(t){if(!(t===void 0||t===tGe))return pf(t)}function lue(t,e,n,r,i){var s=t.options.guards,a={state:i,cond:e,_event:r};if(e.type===dU)return((s==null?void 0:s[e.name])||e.predicate)(n,r.data,a);var o=s==null?void 0:s[e.type];if(!o)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return o(n,r.data,a)}function uue(t){return typeof t=="string"?{type:t}:t}function Bw(t,e,n){var r=function(){},i=typeof t=="object",s=i?t:null;return{next:((i?t.next:t)||r).bind(s),error:((i?t.error:e)||r).bind(s),complete:((i?t.complete:n)||r).bind(s)}}function sO(t,e){return"".concat(t,":invocation[").concat(e,"]")}function hU(t){return(t.type===rx||t.type===d2&&t.to===j0.Internal)&&typeof t.delay!="number"}var PE=Oo({type:Qze});function pU(t,e){return e&&e[t]||void 0}function z_(t,e){var n;if(ki(t)||typeof t=="number"){var r=pU(t,e);Pi(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Pi(t))n={type:t.name||t.toString(),exec:t};else{var r=pU(t.type,e);if(Pi(r))n=Jt(Jt({},t),{exec:r});else if(r){var i=r.type||t.type;n=Jt(Jt(Jt({},r),t),{type:i})}else n=t}return n}var $m=function(t,e){if(!t)return[];var n=dT(t)?t:[t];return n.map(function(r){return z_(r,e)})};function i7(t){var e=z_(t);return Jt(Jt({id:ki(t)?t:e.id},e),{type:e.type})}function hGe(t,e){return{type:rx,event:typeof t=="function"?t:ix(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function pGe(t,e,n,r){var i={_event:n},s=Oo(Pi(t.event)?t.event(e,n.data,i):t.event),a;if(ki(t.delay)){var o=r&&r[t.delay];a=Pi(o)?o(e,n.data,i):o}else a=Pi(t.delay)?t.delay(e,n.data,i):t.delay;return Jt(Jt({},t),{type:rx,_event:s,delay:a})}function s7(t,e){return{to:e?e.to:void 0,type:d2,event:Pi(t)?t:ix(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Pi(t)?t.name:iue(t)}}function gGe(t,e,n,r){var i={_event:n},s=Oo(Pi(t.event)?t.event(e,n.data,i):t.event),a;if(ki(t.delay)){var o=r&&r[t.delay];a=Pi(o)?o(e,n.data,i):o}else a=Pi(t.delay)?t.delay(e,n.data,i):t.delay;var l=Pi(t.to)?t.to(e,n.data,i):t.to;return Jt(Jt({},t),{to:l,_event:s,event:s.data,delay:a})}function mGe(t,e){return s7(t,Jt(Jt({},e),{to:j0.Parent}))}var vGe=function(t,e,n){return Jt(Jt({},t),{value:ki(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},yGe=function(t){return{type:eue,sendId:t}};function bGe(t){var e=i7(t);return{type:rs.Start,activity:e,exec:void 0}}function SGe(t){var e=Pi(t)?t:i7(t);return{type:rs.Stop,activity:e,exec:void 0}}function EGe(t,e,n){var r=Pi(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,s={type:rs.Stop,activity:i};return s}var TGe=function(t){return{type:n7,assignment:t}};function AGe(t,e){var n=e?"#".concat(e):"";return"".concat(rs.After,"(").concat(t,")").concat(n)}function aO(t,e){var n="".concat(rs.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function CP(t,e){var n="".concat(rs.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function nw(t,e){var n="".concat(rs.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var wGe=function(t){var e,n,r=[];try{for(var i=ri(t),s=i.next();!s.done;s=i.next())for(var a=s.value,o=0;o<a.actions.length;){if(a.actions[o].type===n7){r.push(a.actions[o]),a.actions.splice(o,1);continue}o++}}catch(l){e={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function JR(t,e,n,r,i,s,a){a===void 0&&(a=!1);var o=a?[]:wGe(i),l=o.length?hY(n,r,o,e):n,u=a?[n]:void 0,c=[];function d(g,v){var b;switch(v.type){case rx:{var S=pGe(v,l,r,t.options.delays);return s&&typeof S.delay=="number"&&s(S,l,r),S}case d2:var A=gGe(v,l,r,t.options.delays);return s&&A.to!==j0.Internal&&(g==="entry"?c.push(A):s(A,l,r)),A;case tue:{var w=vGe(v,l,r);return s==null||s(w,l,r),w}case Jze:{var x=v,P=(b=x.conds.find(function(j){var X=oue(j.cond,t.options.guards);return!X||lue(t,X,l,r,s?void 0:e)}))===null||b===void 0?void 0:b.actions;if(!P)return[];var N=yi(JR(t,e,l,r,[{type:g,actions:$m(pf(P),t.options.actions)}],s,a),2),k=N[0],U=N[1];return l=U,u==null||u.push(l),k}case eGe:{var P=v.get(l,r.data);if(!P)return[];var H=yi(JR(t,e,l,r,[{type:g,actions:$m(pf(P),t.options.actions)}],s,a),2),B=H[0],q=H[1];return l=q,u==null||u.push(l),B}case t7:{var w=EGe(v,l,r);return s==null||s(w,n,r),w}case n7:{l=hY(l,r,[v],s?void 0:e),u==null||u.push(l);break}default:var Z=z_(v,t.options.actions),C=Z.exec;if(s)s(Z,l,r);else if(C&&u){var L=u.length-1,V=Jt(Jt({},Z),{exec:function(j){for(var X=[],G=1;G<arguments.length;G++)X[G-1]=arguments[G];C.apply(void 0,Ps([u[L]],yi(X),!1))}});Z=V}return Z}}function f(g){var v,b,S=[];try{for(var A=ri(g.actions),w=A.next();!w.done;w=A.next()){var x=w.value,P=d(g.type,x);P&&(S=S.concat(P))}}catch(N){v={error:N}}finally{try{w&&!w.done&&(b=A.return)&&b.call(A)}finally{if(v)throw v.error}}return c.forEach(function(N){s(N,l,r)}),c.length=0,S}var h=na(i.map(f));return[h,l]}var kS=function(t,e){var n=e(t);return n};function cue(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[Fm]=function(){return this},e}function _Ge(t,e,n,r){var i,s=uue(t.src),a=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[s.type],o=t.data?XR(t.data,n,r):void 0,l=a?due(a,t.id,o):cue(t.id);return l.meta=t,l}function due(t,e,n){var r=cue(e);if(r.deferred=!0,m1(t)){var i=r.state=kS(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function CGe(t){try{return typeof t.send=="function"}catch{return!1}}function xGe(t){return CGe(t)&&"id"in t}function IGe(t){var e;return Jt((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[Fm]=function(){return this},e),t)}var eL=function(t){return t.type==="atomic"||t.type==="final"};function fue(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function G_(t){return fue(t).filter(function(e){return e.type!=="history"})}function hue(t){var e=[t];return eL(t)?e:e.concat(na(G_(t).map(hue)))}function rw(t,e){var n,r,i,s,a,o,l,u,c=new Set(t),d=gU(c),f=new Set(e);try{for(var h=ri(f),g=h.next();!g.done;g=h.next())for(var v=g.value,b=v.parent;b&&!f.has(b);)f.add(b),b=b.parent}catch(H){n={error:H}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var S=gU(f);try{for(var A=ri(f),w=A.next();!w.done;w=A.next()){var v=w.value;if(v.type==="compound"&&(!S.get(v)||!S.get(v).length))d.get(v)?d.get(v).forEach(function(B){return f.add(B)}):v.initialStateNodes.forEach(function(B){return f.add(B)});else if(v.type==="parallel")try{for(var x=(a=void 0,ri(G_(v))),P=x.next();!P.done;P=x.next()){var N=P.value;f.has(N)||(f.add(N),d.get(N)?d.get(N).forEach(function(B){return f.add(B)}):N.initialStateNodes.forEach(function(B){return f.add(B)}))}}catch(B){a={error:B}}finally{try{P&&!P.done&&(o=x.return)&&o.call(x)}finally{if(a)throw a.error}}}}catch(H){i={error:H}}finally{try{w&&!w.done&&(s=A.return)&&s.call(A)}finally{if(i)throw i.error}}try{for(var k=ri(f),U=k.next();!U.done;U=k.next())for(var v=U.value,b=v.parent;b&&!f.has(b);)f.add(b),b=b.parent}catch(H){l={error:H}}finally{try{U&&!U.done&&(u=k.return)&&u.call(k)}finally{if(l)throw l.error}}return f}function pue(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(eL(r))return r.key}else return{}}var i={};return n.forEach(function(s){i[s.key]=pue(s,e)}),i}function gU(t){var e,n,r=new Map;try{for(var i=ri(t),s=i.next();!s.done;s=i.next()){var a=s.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(o){e={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function OGe(t,e){var n=rw([t],e);return pue(t,gU(n))}function iw(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function PGe(t){return Ps([],yi(new Set(na(Ps([],yi(t.map(function(e){return e.ownEvents})),!1)))),!1)}function xP(t,e){return e.type==="compound"?G_(e).some(function(n){return n.type==="final"&&iw(t,n)}):e.type==="parallel"?G_(e).every(function(n){return xP(t,n)}):!1}function RGe(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function pY(t){return new Set(na(t.map(function(e){return e.tags})))}function gue(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(ki(t)||ki(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return gue(t[i],e[i])})}function LGe(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function DGe(t,e){var n=t.exec,r=Jt(Jt({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var vh=function(){function t(e){var n=this,r;this.actions=[],this.activities=cY,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||cY,this.meta=RGe(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return PGe(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,events:[],configuration:[],transitions:[],children:{}}):e;var r=PE;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=PE;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),ki(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ps([],yi(i.map(function(s){return r.toStrings(e[s],n).map(function(a){return s+n+a})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=e7(e,["configuration","transitions","tags","machine"]);return Jt(Jt({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return r7(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;uGe(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),kGe={deferEvents:!1},gY=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=Jt(Jt({},kGe),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),Z3=new Map,NGe=0,EA={bookId:function(){return"x:".concat(NGe++)},register:function(t,e){return Z3.set(t,e),t},get:function(t){return Z3.get(t)},free:function(t){Z3.delete(t)}};function a7(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function MGe(){var t=a7();if(t&&"__xstate__"in t)return t.__xstate__}function FGe(t){if(a7()){var e=MGe();e&&e.register(t)}}function $Ge(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],s=!1,a=function(){if(!s){for(s=!0;i.length>0;){var u=i.shift();n=t.transition(n,u,l),r.forEach(function(c){return c.next(n)})}s=!1}},o=IGe({id:e.id,send:function(u){i.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,c,d){var f=Bw(u,c,d);return r.add(f),f.next(n),{unsubscribe:function(){r.delete(f)}}}}),l={parent:e.parent,self:o,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,o}var BGe={sync:!1,autoForward:!1},Co;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Co||(Co={}));var UGe=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Co.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(c,d){if(dT(c))return r.batch(c),r.state;var f=Oo(ix(c,d));if(r.status===Co.Stopped)return r.state;if(r.status!==Co.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(f.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
155Event: `).concat(JSON.stringify(f.data)));return r.scheduler.schedule(function(){r.forward(f);var h=r._nextState(f);r.update(h,f)}),r._state},this.sendTo=function(c,d,f){var h=r.parent&&(d===j0.Parent||r.parent.id===d),g=h?r.parent:ki(d)?d===j0.Internal?r:r.children.get(d)||EA.get(d):dGe(d)?d:void 0;if(!g){if(!h)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in g){if(r.status!==Co.Stopped||r.parent!==g||r.state.done){var v=Jt(Jt({},c),{name:c.name===Xze?"".concat(nw(r.id)):c.name,origin:r.sessionId});!f&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([g,v]):g.send(v)}}else!f&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([g,c.data]):g.send(c.data)},this._exec=function(c,d,f,h){h===void 0&&(h=r.machine.options.actions);var g=c.exec||pU(c.type,h),v=Pi(g)?g:g?g.exec:c.exec;if(v)try{return v(d,f.data,r.machine.config.predictableActionArguments?{action:c,_event:f}:{action:c,state:r.state,_event:f})}catch(L){throw r.parent&&r.parent.send({type:"xstate.error",data:L}),L}switch(c.type){case rx:{var b=c;r.defer(b);break}case d2:var S=c;if(typeof S.delay=="number"){r.defer(S);return}else S.to?r.sendTo(S._event,S.to,f===PE):r.send(S._event);break;case eue:r.cancel(c.sendId);break;case uU:{if(r.status!==Co.Running)return;var A=c.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[A.id||A.type])break;if(A.type===rs.Invoke){var w=uue(A.src),x=r.machine.options.services?r.machine.options.services[w.type]:void 0,P=A.id,N=A.data,k="autoForward"in A?A.autoForward:!!A.forward;if(!x)return;var U=N?XR(N,d,f):void 0;if(typeof x=="string")return;var H=Pi(x)?x(d,f.data,{data:U,src:w,meta:A.meta}):x;if(!H)return;var B=void 0;m1(H)&&(H=U?H.withContext(U):H,B={autoForward:k}),r.spawn(H,P,B)}else r.spawnActivity(A);break}case t7:{r.stopChild(c.activity.id);break}case tue:var q=c,Z=q.label,C=q.value;Z?r.logger(Z,C):r.logger(C);break}};var i=Jt(Jt({},t.defaultOptions),n),s=i.clock,a=i.logger,o=i.parent,l=i.id,u=l!==void 0?l:e.id;this.id=u,this.logger=a,this.clock=s,this.parent=o,this.options=i,this.scheduler=new gY({deferEvents:this.options.deferEvents}),this.sessionId=EA.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:kS(this,function(){return e._initialState=e.machine.initialState,e._initialState})}
155,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var s=ri(e.actions),a=s.next();!a.done;a=s.next()){var o=a.value;this.exec(o,e,n)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,s,a,o,l,u,c,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===PE)&&this.options.execute)this.execute(this.state);else for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);if(this.children.forEach(function(H){d.state.children[H.id]=H}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var h=ri(this.eventListeners),g=h.next();!g.done;g=h.next()){var v=g.value;v(e.event)}}catch(H){r={error:H}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var b=ri(this.listeners),S=b.next();!S.done;S=b.next()){var v=S.value;v(e,e.event)}}catch(H){s={error:H}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}try{for(var A=ri(this.contextListeners),w=A.next();!w.done;w=A.next()){var x=w.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(H){o={error:H}}finally{try{w&&!w.done&&(l=A.return)&&l.call(A)}finally{if(o)throw o.error}}if(this.state.done){var P=e.configuration.find(function(H){return H.type==="final"&&H.parent===d.machine}),N=P&&P.doneData?XR(P.doneData,e.context,n):void 0;this._doneEvent=CP(this.id,N);try{for(var k=ri(this.doneListeners),U=k.next();!U.done;U=k.next()){var v=U.value;v(this._doneEvent)}}catch(H){u={error:H}}finally{try{U&&!U.done&&(c=k.return)&&c.call(k)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),EA.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Co.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,s=Bw(e,n,r);this.listeners.add(s.next),this.status!==Co.NotStarted&&s.next(this.state);var a=function(){i.doneListeners.delete(a),i.stopListeners.delete(a),s.complete()};return this.status===Co.Stopped?s.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){i.listeners.delete(s.next),i.doneListeners.delete(a),i.stopListeners.delete(a)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Co.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Co.Running)return this;this.machine._init(),EA.register(this.sessionId,this),this.initialized=!0,this.status=Co.Running;var r=e===void 0?this.initialState:kS(this,function(){return LGe(e)?n.machine.resolveState(e):n.machine.resolveState(vh.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,PE)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Pi(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,s,a,o,l,u,c;try{for(var d=ri(this.listeners),f=d.next();!f.done;f=d.next()){var h=f.value;this.listeners.delete(h)}}catch(k){e={error:k}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var g=ri(this.stopListeners),v=g.next();!v.done;v=g.next()){var h=v.value;h(),this.stopListeners.delete(h)}}catch(k){r={error:k}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}try{for(var b=ri(this.contextListeners),S=b.next();!S.done;S=b.next()){var h=S.value;this.contextListeners.delete(h)}}catch(k){s={error:k}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}try{for(var A=ri(this.doneListeners),w=A.next();!w.done;w=A.next()){var h=w.value;this.doneListeners.delete(h)}}catch(k){o={error:k}}finally{try{w&&!w.done&&(l=A.return)&&l.call(A)}finally{if(o)throw o.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Co.Stopped,this._initialState=void 0;try{for(var x=ri(Object.keys(this.delayedEventsMap)),P=x.next();!P.done;P=x.next()){var N=P.value;this.clock.clearTimeout(this.delayedEventsMap[N])}}catch(k){u={error:k}}finally{try{P&&!P.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}
vendor: 4,465 bytes, line 155
155this.scheduler.clear(),this.scheduler=new gY({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var i=Oo({type:"xstate.stop"}),s=kS(e,function(){var a=na(Ps([],yi(e.state.configuration),!1).sort(function(d,f){return f.order-d.order}).map(function(d){return $m(d.onExit,e.machine.options.actions)})),o=yi(JR(e.machine,e.state,e.state.context,i,[{type:"exit",actions:a}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),l=o[0],u=o[1],c=new vh({value:e.state.value,context:u,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(d){return!hU(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(s,i),e._stopChildren(),EA.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Co.NotStarted&&this.options.deferEvents)){if(this.status!==Co.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,s,a=n.state,o=!1,l=[],u=function(h){var g=Oo(h);n.forward(g),a=kS(n,function(){return n.machine.transition(a,g,void 0,r||void 0)}),l.push.apply(l,Ps([],yi(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return DGe(v,a)})),!1)),o=o||!!a.changed};try{for(var c=ri(e),d=c.next();!d.done;d=c.next()){var f=d.value;u(f)}}catch(h){i={error:h}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}a.changed=o,a.actions=l,n.update(a,Oo(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=Oo(e);if(i.name.indexOf(uY)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(uY)===0}))throw i.data.data;var s=kS(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return s},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=ri(this.forwardTo),s=i.next();!s.done;s=i.next()){var a=s.value,o=this.children.get(a);if(!o)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));o.send(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),Pi(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Co.Running)return due(e,n);if(fY(e))return this.spawnPromise(Promise.resolve(e),n);if(Pi(e))return this.spawnCallback(e,n);if(xGe(e))return this.spawnActor(e,n);if(cGe(e))return this.spawnObservable(e,n);if(m1(e))return this.spawnMachine(e,Jt(Jt({},r),{id:n}));if(aGe(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,Jt(Jt({},this.options),{parent:this,id:n.id||e.id})),s=Jt(Jt({},BGe),n);s.sync&&i.onTransition(function(o){r.send(nue,{state:o,id:i.id})});var a=i;return this.children.set(i.id,a),s.autoForward&&this.forwardTo.add(i.id),i.onDone(function(o){r.removeChild(i.id),r.send(Oo(o,{origin:i.id}))}).start(),a},t.prototype.spawnBehavior=function(e,n){var r=$Ge(e,{id:n,parent:this});return this.children.set(n,r),r}
vendor: 5,253 bytes, line 155
155,t.prototype.spawnPromise=function(e,n){var r,i=this,s=!1,a;e.then(function(l){s||(a=l,i.removeChild(n),i.send(Oo(CP(n,l),{origin:n})))},function(l){if(!s){i.removeChild(n);var u=nw(n,l);try{i.send(Oo(u,{origin:n}))}catch{i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var o=(r={id:n,send:function(){},subscribe:function(l,u,c){var d=Bw(l,u,c),f=!1;return e.then(function(h){f||(d.next(h),!f&&d.complete())},function(h){f||d.error(h)}),{unsubscribe:function(){return f=!0}}},stop:function(){s=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[Fm]=function(){return this},r);return this.children.set(n,o),o},t.prototype.spawnCallback=function(e,n){var r,i=this,s=!1,a=new Set,o=new Set,l,u=function(f){l=f,o.forEach(function(h){return h(f)}),!s&&i.send(Oo(f,{origin:n}))},c;try{c=e(u,function(f){a.add(f)})}catch(f){this.send(nw(n,f))}if(fY(c))return this.spawnPromise(c,n);var d=(r={id:n,send:function(f){return a.forEach(function(h){return h(f)})},subscribe:function(f){var h=Bw(f);return o.add(h.next),{unsubscribe:function(){o.delete(h.next)}}},stop:function(){s=!0,Pi(c)&&c()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[Fm]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,s,a=e.subscribe(function(l){s=l,i.send(Oo(l,{origin:n}))},function(l){i.removeChild(n),i.send(Oo(nw(n,l),{origin:n}))},function(){i.removeChild(n),i.send(Oo(CP(n),{origin:n}))}),o=(r={id:n,send:function(){},subscribe:function(l,u,c){return e.subscribe(l,u,c)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return s},toJSON:function(){return{id:n}}},r[Fm]=function(){return this},r);return this.children.set(n,o),o},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[Fm]=function(){return this},r))},t.prototype.attachDev=function(){var e=a7();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(Jt(Jt({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:Jt({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}FGe(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Fm]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Co.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=o7,t}();function o7(t,e){var n=new UGe(t,e);return n}function VGe(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function oO(t){return Jt(Jt({type:cU},t),{toJSON:function(){t.onDone,t.onError;var e=e7(t,["onDone","onError"]);return Jt(Jt({},e),{type:cU,src:VGe(t.src)})}})}var lO="",mU="#",Q3="*",iS={},sS=function(t){return t[0]===mU},HGe=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},jGe=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var s=this,a;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(HGe(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:rue),this.id=this.config.id||Ps([this.machine.key],yi(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?tw(this.config.states,function(u,c){var d,f=new t(u,{},void 0,{parent:s,key:c});return Object.assign(s.idMap,Jt((d={},d[f.id]=f,d),f.idMap)),f}):iS;var o=0;function l(u){var c,d;u.order=o++;try{for(var f=ri(fue(u)),h=f.next();!h.done;h=f.next()){var g=h.value;l(g)}}catch(v){c={error:v}}finally{try{h&&!h.done&&(d=f.return)&&d.call(f)}finally{if(c)throw c.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||
vendor: 18,742 bytes, lines 155-157
155!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var c=u.event;return c===lO}):lO in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=pf(this.config.entry||this.config.onEntry).map(function(u){return z_(u)}),this.onExit=pf(this.config.exit||this.config.onExit).map(function(u){return z_(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=pf(this.config.invoke).map(function(u,c){var d,f;if(m1(u)){var h=sO(s.id,c);return s.machine.options.services=Jt((d={},d[h]=u,d),s.machine.options.services),oO({src:h,id:h})}else if(ki(u.src)){var h=u.id||sO(s.id,c);return oO(Jt(Jt({},u),{id:h,src:u.src}))}else if(m1(u.src)||Pi(u.src)){var h=u.id||sO(s.id,c);return s.machine.options.services=Jt((f={},f[h]=u.src,f),s.machine.options.services),oO(Jt(Jt({id:h},u),{src:h}))}else{var g=u.src;return oO(Jt(Jt({id:sO(s.id,c)},u),{src:g}))}}),this.activities=pf(this.config.activities).concat(this.invoke).map(function(u){return i7(u)}),this.transition=this.transition.bind(this),this.tags=pf(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||hue(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,s=r.activities,a=r.guards,o=r.services,l=r.delays;return new t(this.config,{actions:Jt(Jt({},i),e.actions),activities:Jt(Jt({},s),e.activities),guards:Jt(Jt({},a),e.guards),services:Jt(Jt({},o),e.services),delays:Jt(Jt({},l),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return Pi(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:tw(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===lO,r=this.transitions.filter(function(i){var s=i.eventType===e;return n?s:s||i.eventType===Q3});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(s,a){var o=Pi(s)?"".concat(e.id,":delay[").concat(a,"]"):s,l=AGe(o,e.id);return e.onEntry.push(s7(l,{delay:s})),e.onExit.push(yGe(l)),l},i=dT(n)?n.map(function(s,a){var o=r(s.delay,a);return Jt(Jt({},s),{event:o})}):na(Object.keys(n).map(function(s,a){var o=n[s],l=ki(o)?{target:o}:o,u=isNaN(+s)?s:+s,c=r(u,a);return pf(l).map(function(d){return Jt(Jt({},d),{event:c,delay:u})})}));return i.map(function(s){var a=s.delay;return Jt(Jt({},e.formatTransition(s)),{delay:a})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof vh?e.value:$w(e,this.delimiter);if(ki(i)){var s=this.getStateNode(i).initial;return s!==void 0?this.getStateNodes((n={},n[i]=s,n)):[this,this.states[i]]}var a=Object.keys(i),o=[this];return o.push.apply(o,Ps([],yi(na(a.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),o},t.prototype.handles=function(e){var n=iue(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof vh?e:vh.create(e),r=Array.from(rw([],this.getStateNodes(n.value)));return new vh(Jt(Jt({},n),{value:this.resolve(n.value),configuration:r,done:xP(r,this),tags:pY(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),s=i.next(n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),s=this.getStateNode(i[0]),a=s._transition(e[i[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},t.prototype.transitionParallelNode=function(e,n,r){var i,s,a={};try{for(var o=ri(Object.keys(e)),l=o.next();!l.done;l=o.next()){var u=l.value,c=e[u];if(c){var d=this.getStateNode(u),f=d._transition(c,n,r);f&&(a[u]=f)}}}catch(S){i={error:S}}finally{try{l&&!l.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}var h=Object.keys(a).map(function(S){return a[S]}),g=na(h.map(function(S){return S.transitions})),v=h.some(function(S){return S.transitions.length>0});if(!v)return this.next(n,r);var b=na(Object.keys(a).map(function(S){return a[S].configuration}));return{transitions:g,exitSet:na(h.map(function(S){return S.exitSet})),configuration:b,source:n,actions:na(Object.keys(a).map(function(S){return a[S].actions}))}},t.prototype._transition=function(e,n,r){return ki(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,Oo(n))},t.prototype.next=function(e,n){var r,i,s=this,a=n.name,o=[],l=[],u;try{for(var c=ri(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var f=d.value,h=f.cond,g=f.in,v=e.context,b=g?ki(g)&&sS(g)?e.matches($w(this.getStateNodeById(g).path,this.delimiter)):r7($w(g,this.delimiter),rGe(this.path.slice(0,-2))(e.value)):!0,S=!1;try{S=!h||lue(this.machine,h,v,n,e)}catch(x){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
156`).concat(x.message))}if(S&&b){f.target!==void 0&&(l=f.target),o.push.apply(o,Ps([],yi(f.actions),!1)),u=f;break}}}catch(x){r={error:x}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:e.value?[this]:[],source:e,actions:o};var A=na(l.map(function(x){return s.getRelativeStateNodes(x,e.historyValue)})),w=!!u.internal;return{transitions:[u],exitSet:w?[]:na(l.map(function(x){return s.getPotentiallyReenteringNodes(x)})),configuration:A,source:e,actions:o}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,s,a,o){var l,u,c,d,f=this,h=a?rw([],this.getStateNodes(a.value)):[],g=new Set;try{for(var v=ri(Array.from(e).sort(function(q,Z){return q.order-Z.order})),b=v.next();!b.done;b=v.next()){var S=b.value;(!iw(h,S)||iw(r.exitSet,S)||S.parent&&g.has(S.parent))&&g.add(S)}}catch(q){l={error:q}}finally{try{b&&!b.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var A=ri(h),w=A.next();!w.done;w=A.next()){var S=w.value;(!iw(e,S)||iw(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(q){c={error:q}}finally{try{w&&!w.done&&(d=A.return)&&d.call(A)}finally{if(c)throw c.error}}r.exitSet.sort(function(q,Z){return Z.order-q.order});var x=Array.from(g).sort(function(q,Z){return q.order-Z.order}),P=new Set(r.exitSet),N=na(x.map(function(q){var Z=[];if(q.type!=="final")return Z;var C=q.parent;if(!C.parent)return Z;Z.push(aO(q.id,q.doneData),aO(C.id,q.doneData?XR(q.doneData,i,s):void 0));var L=C.parent;return L.type==="parallel"&&G_(L).every(function(V){return xP(r.configuration,V)})&&Z.push(aO(L.id)),Z})),k=x.map(function(q){var Z=q.onEntry,C=q.activities.map(function(L){return bGe(L)});return{type:"entry",actions:$m(o?Ps(Ps([],yi(Z),!1),yi(C),!1):Ps(Ps([],yi(C),!1),yi(Z),!1),f.machine.options.actions)}}).concat({type:"state_done",actions:N.map(function(q){return hGe(q)})}),U=Array.from(P).map(function(q){return{type:"exit",actions:$m(Ps(Ps([],yi(q.onExit),!1),yi(q.activities.map(function(Z){return SGe(Z)})),!1),f.machine.options.actions)}}),H=U.concat({type:"transition",actions:$m(r.actions,this.machine.options.actions)}).concat(k);if(n){var B=$m(na(Ps([],yi(e),!1).sort(function(q,Z){return Z.order-q.order}).map(function(q){return q.onExit})),this.machine.options.actions).filter(function(q){return!hU(q)});return H.concat({type:"stop",actions:B})}return H},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var s=Oo(n),a;if(e instanceof vh)a=r===void 0?e:this.resolveState(vh.from(e,r));else{var o=ki(e)?this.resolve(QR(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;a=this.resolveState(vh.from(o,l))}if(this.strict&&!this.events.includes(s.name)&&!sGe(s.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var u=this._transition(a.value,a,s)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},c=rw([],this.getStateNodes(a.value)),d=u.configuration.length?rw(c,u.configuration):c;return u.configuration=Ps([],yi(d),!1),this.resolveTransition(u,a,a.context,i,s)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var s,a=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(s=e.actions).unshift.apply(s,Ps([],yi(a),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,s){var a,o,l,u,c=this;s===void 0&&(s=PE);var d=e.configuration,f=!n||e.transitions.length>0,h=f?e.configuration:n?n.configuration:[],g=xP(h,this),v=f?OGe(this.machine,d):void 0,b=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,S=this.getActions(new Set(h),g,e,r,s,n,i),A=n?Jt({},n.activities):{};try{for(var w=ri(S),x=w.next();!x.done;x=w.next()){var P=x.value;try{for(var N=(l=void 0,ri(P.actions)),k=N.next();!k.done;k=N.next()){var U=k.value;U.type===uU?A[U.activity.id||U.activity.type]=U:U.type===t7&&(A[U.activity.id||U.activity.type]=!1)}}catch(le){l={error:le}}finally{try{k&&!k.done&&(u=N.return)&&u.call(N)}finally{if(l)throw l.error}}}}catch(le){a={error:le}}finally{try{x&&!x.done&&(o=w.return)&&o.call(w)}finally{if(a)throw a.error}}var H=yi(JR(this,n,r,s,S,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),B=H[0],q=H[1],Z=yi(oGe(B,hU),2),C=Z[0],L=Z[1],V=B.filter(function(le){var ye;return le.type===uU&&((ye=le.activity)===null||ye===void 0?void 0:ye.type)===cU}),j=V.reduce(function(le,ye){return le[ye.activity.id]=_Ge(ye.activity,c.machine,q,s),le},n?Jt({},n.children):{}),X=new vh({value:v||n.value,context:q,_event:s,_sessionid:n?n._sessionid:null,historyValue:v?b?lGe(b,v):void 0:n?n.historyValue:void 0,history:!v||e.source?n:void 0,actions:v?L:[],activities:v?A:n?n.activities:{},events:[],configuration:h,transitions:e.transitions,children:j,done:g,tags:pY(h),machine:this}),G=r!==q;X.changed=s.name===nue||G;var ie=X.history;ie&&delete ie.history;var ae=!g&&(this._transient||d.some(function(le){return le._transient}));if(!f&&(!ae||s.name===lO))return X;var ue=X;if(!g)for(ae&&(ue=this.resolveRaisedTransition(ue,{type:Zze},s,i));C.length;){var Q=C.shift();ue=this.resolveRaisedTransition(ue,Q._event,s,i)}var de=ue.changed||(ie?!!ue.actions.length||G||typeof ie.value!=typeof ue.value||!gue(ue.value,ie.value):void 0);return ue.changed=de,ue.history=ie,ue},t.prototype.getStateNode=function(e){if(sS(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=sS(e)?e.slice(mU.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&sS(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=fU(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||iS;switch(this.type){case"parallel":return tw(this.initialStateValue,function(s,a){return s?r.getStateNode(a).resolve(e[a]||s):iS});case"compound":if(ki(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?tw(e,function(s,a){return s?r.getStateNode(a).resolve(s):iS}):this.initialStateValue||{};default:return e||iS}},t.prototype.getResolvedPath=function(e){if(sS(e)){var n=this.machine.idMap[e.slice(mU.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return fU(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=dY(this.states,function(r){return r.initialStateValue||iS},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=eL(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;ki(n.target)?e=sS(n.target)?QR(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(eL(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=_P(this.initialStateValue);return na(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=yi(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var s=this.getStateNode(r);if(s.type==="history")return s.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:dY(this.states,function(n,r){if(!e)return n.historyValue();var i=ki(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?na(_P(i).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var s=iGe(r.path,"states")(e).current;return ki(s)?[r.getStateNode(s)]:na(_P(s).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=na(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var s=this.states,a=new Set(this.ownEvents);if(s)try{for(var o=ri(Object.keys(s)),l=o.next();!l.done;l=o.next()){var u=l.value,c=s[u];if(c.states)try{for(var d=(r=void 0,ri(c.events)),f=d.next();!f.done;f=d.next()){var h=f.value;a.add("".concat(h))}}catch(g){r={error:g}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(g){e={error:g}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!ki(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var s=i?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(s);return a}catch(o){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
157`).concat(o.message))}else return n.getStateNodeByPath(s)})},t.prototype.formatTransition=function(e){var n=this,r=fGe(e.target),i="internal"in e?e.internal:r?r.some(function(l){return ki(l)&&l[0]===n.delimiter}):!0,s=this.machine.options.guards,a=this.resolveTarget(r),o=Jt(Jt({},e),{actions:$m(pf(e.actions)),cond:oue(e.cond,s),target:a,source:this,internal:i,eventType:e.event,toJSON:function(){return Jt(Jt({},o),{target:o.target?o.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return o},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var s=this.config.on,a=Q3,o=s[a],l=o===void 0?[]:o,u=e7(s,[typeof a=="symbol"?a:a+""]);i=na(Object.keys(u).map(function(A){var w=rS(A,u[A]);return w}).concat(rS(Q3,l)))}var c=this.config.always?rS("",this.config.always):[],d=this.config.onDone?rS(String(aO(this.id
157)),this.config.onDone):[],f=na(this.invoke.map(function(A){var w=[];return A.onDone&&w.push.apply(w,Ps([],yi(rS(String(CP(A.id)),A.onDone)),!1)),A.onError&&w.push.apply(w,Ps([],yi(rS(String(nw(A.id)),A.onError)),!1)),w})),h=this.after,g=na(Ps(Ps(Ps(Ps([],yi(d),!1),yi(f),!1),yi(i),!1),yi(c),!1).map(function(A){return pf(A).map(function(w){return r.formatTransition(w)})}));try{for(var v=ri(h),b=v.next();!b.done;b=v.next()){var S=b.value;g.push(S)}}catch(A){e={error:A}}finally{try{b&&!b.done&&(n=v.return)&&n.call(v)}finally{if(e)throw e.error}}return g},t}();function sx(t,e){return new jGe(t,e)}var bn=TGe,vU=s7,yU=mGe,wi={},l7={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});/*! *****************************************************************************
158	Copyright (c) Microsoft Corporation.
159
160	Permission to use, copy, modify, and/or distribute this software for any
161	purpose with or without fee is hereby granted.
162
163	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
164	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
165	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
166	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
167	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
168	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
169	PERFORMANCE OF THIS SOFTWARE.
170	***************************************************************************** */t.__assign=function(){return t.__assign=Object.assign||function(a){for(var o,l=1,u=arguments.length;l<u;l++){o=arguments[l];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(a[c]=o[c])}return a},t.__assign.apply(this,arguments)};function e(s,a){var o={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&a.indexOf(l)<0&&(o[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,l=Object.getOwnPropertySymbols(s);u<l.length;u++)a.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(s,l[u])&&(o[l[u]]=s[l[u]]);return o}function n(s){var a=typeof Symbol=="function"&&Symbol.iterator,o=a&&s[a],l=0;if(o)return o.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&l>=s.length&&(s=void 0),{value:s&&s[l++],done:!s}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(s,a){var o=typeof Symbol=="function"&&s[Symbol.iterator];if(!o)return s;var l=o.call(s),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=l.next()).done;)c.push(u.value)}catch(f){d={error:f}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(d)throw d.error}}return c}function i(s,a,o){if(o||arguments.length===2)for(var l=0,u=a.length,c;l<u;l++)(c||!(l in a))&&(c||(c=Array.prototype.slice.call(a,0,l)),c[l]=a[l]);return s.concat(c||Array.prototype.slice.call(a))}t.__read=r,t.__rest=e,t.__spreadArray=i,t.__values=n})(l7);var f2={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(t.ActionTypes||(t.ActionTypes={})),t.SpecialTargets=void 0,function(e){e.Parent="#_parent",e.Internal="#_internal"}(t.SpecialTargets||(t.SpecialTargets={}))})(f2);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});var Uo=f2,zGe=Uo.ActionTypes.Start,GGe=Uo.ActionTypes.Stop,WGe=Uo.ActionTypes.Raise,qGe=Uo.ActionTypes.Send,KGe=Uo.ActionTypes.Cancel,YGe=Uo.ActionTypes.NullEvent,ZGe=Uo.ActionTypes.Assign,QGe=Uo.ActionTypes.After,XGe=Uo.ActionTypes.DoneState,JGe=Uo.ActionTypes.Log,eWe=Uo.ActionTypes.Init,tWe=Uo.ActionTypes.Invoke,nWe=Uo.ActionTypes.ErrorExecution,rWe=Uo.ActionTypes.ErrorPlatform,iWe=Uo.ActionTypes.ErrorCustom,sWe=Uo.ActionTypes.Update,aWe=Uo.ActionTypes.Choose,oWe=Uo.ActionTypes.Pure;Ma.after=QGe;Ma.assign=ZGe;Ma.cancel=KGe;Ma.choose=aWe;Ma.doneState=XGe;Ma.error=iWe;Ma.errorExecution=nWe;Ma.errorPlatform=rWe;Ma.init=eWe;Ma.invoke=tWe;Ma.log=JGe;Ma.nullEvent=YGe;Ma.pure=oWe;Ma.raise=WGe;Ma.send=qGe;Ma.start=zGe;Ma.stop=GGe;Ma.update=sWe;var mue={},fT={};
170Object.defineProperty(fT,"__esModule",{value:!0});var lWe=".",uWe={},cWe="xstate.guard",dWe="";fT.DEFAULT_GUARD_TYPE=cWe;fT.EMPTY_ACTIVITY_MAP=uWe;fT.STATE_DELIMITER=lWe;fT.TARGETLESS_KEY=dWe;var h2={};Object.defineProperty(h2,"__esModule",{value:!0});var fWe=!0;h2.IS_PRODUCTION=fWe;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=l7,n=f2,r=Ma,i=fT,s=h2,a;function o(se){return Object.keys(se)}function l(se,Fe,ht){ht===void 0&&(ht=i.STATE_DELIMITER);var Ct=h(se,ht),pt=h(Fe,ht);return G(pt)?G(Ct)?pt===Ct:!1:G(Ct)?Ct in pt:Object.keys(Ct).every(function(me){return me in pt?l(Ct[me],pt[me]):!1})}function u(se){try{return G(se)||typeof se=="number"?"".concat(se):se.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function c(se){try{return G(se)||typeof se=="number"?"".concat(se):X(se)?se.name:se.type}catch{throw new Error("Actions must be strings or objects with a string action.type property.")}}function d(se,Fe){try{return j(se)?se:se.toString().split(Fe)}catch{throw new Error("'".concat(se,"' is not a valid state path."))}}function f(se){return typeof se=="object"&&"value"in se&&"context"in se&&"event"in se&&"_event"in se}function h(se,Fe){if(f(se))return se.value;if(j(se))return g(se);if(typeof se!="string")return se;var ht=d(se,Fe);return g(ht)}function g(se){if(se.length===1)return se[0];for(var Fe={},ht=Fe,Ct=0;Ct<se.length-1;Ct++)Ct===se.length-2?ht[se[Ct]]=se[Ct+1]:(ht[se[Ct]]={},ht=ht[se[Ct]]);return Fe}function v(se,Fe){for(var ht={},Ct=Object.keys(se),pt=0;pt<Ct.length;pt++){var me=Ct[pt];ht[me]=Fe(se[me],me,se,pt)}return ht}function b(se,Fe,ht){var Ct,pt,me={};try{for(var De=e.__values(Object.keys(se)),Me=De.next();!Me.done;Me=De.next()){var qe=Me.value,ut=se[qe];ht(ut)&&(me[qe]=Fe(ut,qe,se))}}catch(Tt){Ct={error:Tt}}finally{try{Me&&!Me.done&&(pt=De.return)&&pt.call(De)}finally{if(Ct)throw Ct.error}}return me}var S=function(se){return function(Fe){var ht,Ct,pt=Fe;try{for(var me=e.__values(se),De=me.next();!De.done;De=me.next()){var Me=De.value;pt=pt[Me]}}catch(qe){ht={error:qe}}finally{try{De&&!De.done&&(Ct=me.return)&&Ct.call(me)}finally{if(ht)throw ht.error}}return pt}};function A(se,Fe){return function(ht){var Ct,pt,me=ht;try{for(var De=e.__values(se),Me=De.next();!Me.done;Me=De.next()){var qe=Me.value;me=me[Fe][qe]}}catch(ut){Ct={error:ut}}finally{try{Me&&!Me.done&&(pt=De.return)&&pt.call(De)}finally{if(Ct)throw Ct.error}}return me}}function w(se){if(!se)return[[]];if(G(se))return[[se]];var Fe=P(Object.keys(se).map(function(ht){var Ct=se[ht];return typeof Ct!="string"&&(!Ct||!Object.keys(Ct).length)?[[ht]]:w(se[ht]).map(function(pt){return[ht].concat(pt)})}));return Fe}function x(se){var Fe,ht,Ct={};if(se&&se.length===1&&se[0].length===1)return se[0][0];try{for(var pt=e.__values(se),me=pt.next();!me.done;me=pt.next())for(var De=me.value,Me=Ct,qe=0;qe<De.length;qe++){var ut=De[qe];if(qe===De.length-2){Me[ut]=De[qe+1];break}Me[ut]=Me[ut]||{},Me=Me[ut]}}catch(Tt){Fe={error:Tt}}finally{try{me&&!me.done&&(ht=pt.return)&&ht.call(pt)}finally{if(Fe)throw Fe.error}}return Ct}function P(se){var Fe;return(Fe=[]).concat.apply(Fe,e.__spreadArray([],e.__read(se),!1))}function N(se){return j(se)?se:[se]}function k(se){return se===void 0?[]:N(se)}function U(se,Fe,ht){var Ct,pt;if(X(se))return se(Fe,ht.data);var me={};try{for(var De=e.__values(Object.keys(se)),Me=De.next();!Me.done;Me=De.next()){var qe=Me.value,ut=se[qe];X(ut)?me[qe]=ut(Fe,ht.data):me[qe]=ut}}catch(Tt){Ct={error:Tt}}finally{try{Me&&!Me.done&&(pt=De.return)&&pt.call(De)}finally{if(Ct)throw Ct.error}}return me}function H(se){return/^(done|error)\./.test(se)}function B(se){return!!(se instanceof Promise||se!==null&&(X(se)||typeof se=="object")&&X(se.then))}function q(se){return se!==null&&typeof se=="object"&&"transition"in se&&typeof se.transition=="function"}function Z(se,Fe){var ht,Ct,pt=e.__read([[],[]],2),me=pt[0],De=pt[1];try{for(var Me=e.__values(se),qe=Me.next();!qe.done;qe=Me.next()){var ut=qe.value;Fe(ut)?me.push(ut):De.push(ut)}}catch(Tt){ht={error:Tt}}finally{try{qe&&!qe.done&&(Ct=Me.return)&&Ct.call(Me)}finally{if(ht)throw ht.error}}return[me,De]}function C(se,Fe){return v(se.states,function(ht,Ct){if(ht){var pt=(G(Fe)?void 0:Fe[Ct])||(ht?ht.current:void 0);if(pt)return{current:pt,states:C(ht,pt)}}})}function L(se,Fe){return{current:Fe,states:C(se,Fe)}}function V(se,Fe,ht,Ct){s.IS_PRODUCTION||t.warn(!!se,"Attempting to update undefined context");var pt=se&&ht.reduce(function(me,De){var Me,qe,ut=De.assignment,Tt={state:Ct,action:De,_event:Fe},jt={};if(X(ut))jt=ut(me,Fe.data,Tt);else try{for(var on=e.__values(Object.keys(ut)),wn=on.next();!wn.done;wn=on.next()){var kr=wn.value,Ir=ut[kr];jt[kr]=X(Ir)?Ir(me,Fe.data,Tt):Ir}}catch(gi){Me={error:gi}}finally{try{wn&&!wn.done&&(qe=on.return)&&qe.call(on)}finally{if(Me)throw Me.error}}return Object.assign({},me,jt)},se);return pt}t.warn=function(){},s.IS_PRODUCTION||(t.warn=function(se,Fe){var ht=se instanceof Error?se:void 0;if(!(!ht&&se)&&console!==void 0){var Ct=["Warning: ".concat(Fe)];ht&&Ct.push(ht),console.warn.apply(console,Ct)}});function j(se){return Array.isArray(se)}function X(se){return typeof se=="function"}function G(se){return typeof se=="string"}function ie(se,Fe){if(se)return G(se)?{type:i.DEFAULT_GUARD_TYPE,name:se,predicate:Fe?Fe[se]:void 0}:X(se)?{type:i.DEFAULT_GUARD_TYPE,name:se.name,predicate:se}:se}function ae(se){try{return"subscribe"in se&&X(se.subscribe)}catch{return!1}}var ue=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Q=(a={},a[ue]=function(){return this},a[Symbol.observable]=function(){return this},a);function de(se){return!!se&&"__xstatenode"in se}function le(se){return!!se&&typeof se.send=="function"}var ye=function(){var se=0;return function(){return se++,se.toString(16)}}();function fe(se,Fe){return G(se)||typeof se=="number"?e.__assign({type:se},Fe):se}function We(se,Fe){if(!G(se)&&"$$type"in se&&se.$$type==="scxml")return se;var ht=fe(se);return e.__assign({name:ht.type,data:ht,$$type:"scxml",type:"external"},Fe)}function Le(se,Fe){var ht=N(Fe).map(function(Ct){return typeof Ct>"u"||typeof Ct=="string"||de(Ct)?{target:Ct,event:se}:e.__assign(e.__assign({},Ct),{event:se})});return ht}function Ve(se){if(!(se===void 0||se===i.TARGETLESS_KEY))return k(se)}function at(se,Fe,ht){if(!s.IS_PRODUCTION){var Ct=se.stack?" Stacktrace was '".concat(se.stack,"'"):"";if(se===Fe)console.error("Missing onError handler for invocation '".concat(ht,"', error was '").concat(se,"'.").concat(Ct));else{var pt=Fe.stack?" Stacktrace was '".concat(Fe.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(ht,"'. ")+"Original error: '".concat(se,"'. ").concat(Ct," Current error is '").concat(Fe,"'.").concat(pt))}}}function Et(se,Fe,ht,Ct,pt){var me=se.options.guards,De={state:pt,cond:Fe,_event:Ct};if(Fe.type===i.DEFAULT_GUARD_TYPE)return((me==null?void 0:me[Fe.name])||Fe.predicate)(ht,Ct.data,De);var Me=me==null?void 0:me[Fe.type];if(!Me)throw new Error("Guard '".concat(Fe.type,"' is not implemented on machine '").concat(se.id,"'."));return Me(ht,Ct.data,De)}function ne(se){return typeof se=="string"?{type:se}:se}function Ze(se,Fe,ht){var Ct=function(){},pt=typeof se=="object",me=pt?se:null;return{next:((pt?se.next:se)||Ct).bind(me),error:((pt?se.error:Fe)||Ct).bind(me),complete:((pt?se.complete:ht)||Ct).bind(me)}}function lt(se,Fe){return"".concat(se,":invocation[").concat(Fe,"]")}function ot(se){return(se.type===r.raise||se.type===r.send&&se.to===n.SpecialTargets.Internal)&&typeof se.delay!="number"}t.createInvokeId=lt,t.evaluateGuard=Et,t.flatten=P,t.getActionType=c,t.getEventType=u,t.interopSymbols=Q,t.isActor=le,t.isArray=j,t.isBehavior=q,t.isBuiltInEvent=H,t.isFunction=X,t.isMachine=de,t.isObservable=ae,t.isPromiseLike=B,t.isRaisableAction=ot,t.isStateLike=f,t.isString=G,t.keys=o,t.mapContext=U,t.mapFilterValues=b,t.mapValues=v,t.matchesState=l,t.nestedPath=A,t.normalizeTarget=Ve,t.partition=Z,t.path=S,t.pathToStateValue=g,t.pathsToStateValue=x,t.reportUnhandledExceptionOnInvocation=at,t.symbolObservable=ue,t.toArray=k,t.toArrayStrict=N,t.toEventObject=fe,t.toGuard=ie,t.toInvokeSource=ne,t.toObserver=Ze,t.toSCXMLEvent=We,t.toStatePath=d,t.toStatePaths=w,t.toStateValue=h,t.toTransitionConfigArray=Le,t.uniqueId=ye,t.updateContext=V,t.updateHistoryStates=C,t.updateHistoryValue=L})(mue);Object.defineProperty(wi,"__esModule",{value:!0});var di=l7,Dd=f2,ko=Ma,Kr=mue,vue=h2,hWe=Kr.toSCXMLEvent({type:ko.init});function bU(t,e){return e&&e[t]||void 0}function p2(t,e){var n;if(Kr.isString(t)||typeof t=="number"){var r=bU(t,e);Kr.isFunction(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Kr.isFunction(t))n={type:t.name||t.toString(),exec:t};else{var r=bU(t.type,e);if(Kr.isFunction(r))n=di.__assign(di.__assign({},t),{exec:r});else if(r){var i=r.type||t.type;n=di.__assign(di.__assign(di.__assign({},r),t),{type:i})}else n=t}return n}var SU=function(t,e){if(!t)return[];var n=Kr.isArray(t)?t:[t];return n.map(function(r){return p2(r,e)})};function u7(t){var e=p2(t);return di.__assign(di.__assign({id:Kr.isString(t)?t:e.id},e),{type:e.type})}function pWe(t,e){return{type:ko.raise,event:typeof t=="function"?t:Kr.toEventObject(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function yue(t,e,n,r){var i={_event:n}
170,s=Kr.toSCXMLEvent(Kr.isFunction(t.event)?t.event(e,n.data,i):t.event),a;if(Kr.isString(t.delay)){var o=r&&r[t.delay];a=Kr.isFunction(o)?o(e,n.data,i):o}else a=Kr.isFunction(t.delay)?t.delay(e,n.data,i):t.delay;return di.__assign(di.__assign({},t),{type:ko.raise,_event:s,delay:a})}function ax(t,e){return{to:e?e.to:void 0,type:ko.send,event:Kr.isFunction(t)?t:Kr.toEventObject(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Kr.isFunction(t)?t.name:Kr.getEventType(t)}}function bue(t,e,n,r){var i={_event:n},s=Kr.toSCXMLEvent(Kr.isFunction(t.event)?t.event(e,n.data,i):t.event),a;if(Kr.isString(t.delay)){var o=r&&r[t.delay];a=Kr.isFunction(o)?o(e,n.data,i):o}else a=Kr.isFunction(t.delay)?t.delay(e,n.data,i):t.delay;var l=Kr.isFunction(t.to)?t.to(e,n.data,i):t.to;return di.__assign(di.__assign({},t),{to:l,_event:s,event:s.data,delay:a})}function c7(t,e){return ax(t,di.__assign(di.__assign({},e),{to:Dd.SpecialTargets.Parent}))}function gWe(t,e,n){return ax(e,di.__assign(di.__assign({},n),{to:t}))}function mWe(){return c7(ko.update)}function vWe(t,e){return ax(t,di.__assign(di.__assign({},e),{to:function(n,r,i){var s=i._event;return s.origin}}))}var yWe=function(t,e){return{context:t,event:e}};function bWe(t,e){return t===void 0&&(t=yWe),{type:ko.log,label:e,expr:t}}var Sue=function(t,e,n){return di.__assign(di.__assign({},t),{value:Kr.isString(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},SWe=function(t){return{type:ko.cancel,sendId:t}};function EWe(t){var e=u7(t);return{type:Dd.ActionTypes.Start,activity:e,exec:void 0}}function TWe(t){var e=Kr.isFunction(t)?t:u7(t);return{type:Dd.ActionTypes.Stop,activity:e,exec:void 0}}function Eue(t,e,n){var r=Kr.isFunction(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,s={type:Dd.ActionTypes.Stop,activity:i};return s}var AWe=function(t){return{type:ko.assign,assignment:t}};function wWe(t){return typeof t=="object"&&"type"in t}function _We(t,e){var n=e?"#".concat(e):"";return"".concat(Dd.ActionTypes.After,"(").concat(t,")").concat(n)}function CWe(t,e){var n="".concat(Dd.ActionTypes.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function xWe(t,e){var n="".concat(Dd.ActionTypes.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function IWe(t,e){var n="".concat(Dd.ActionTypes.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function OWe(t){return{type:Dd.ActionTypes.Pure,get:t}}function PWe(t,e){if(!vue.IS_PRODUCTION&&(!t||typeof t=="function")){var n=t;t=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var s=typeof n=="function"?n.apply(void 0,di.__spreadArray([],di.__read(r),!1)):n;if(!s)throw new Error("Attempted to forward event to undefined actor. This risks an infinite loop in the sender.");return s}}return ax(function(r,i){return i},di.__assign(di.__assign({},e),{to:t}))}function RWe(t,e){return c7(function(n,r,i){return{type:ko.error,data:Kr.isFunction(t)?t(n,r,i):t}},di.__assign(di.__assign({},e),{to:Dd.SpecialTargets.Parent}))}function LWe(t){return{type:Dd.ActionTypes.Choose,conds:t}}var DWe=function(t){var e,n,r=[];try{for(var i=di.__values(t),s=i.next();!s.done;s=i.next())for(var a=s.value,o=0;o<a.actions.length;){if(a.actions[o].type===ko.assign){r.push(a.actions[o]),a.actions.splice(o,1);continue}o++}}catch(l){e={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function EU(t,e,n,r,i,s,a){a===void 0&&(a=!1);var o=a?[]:DWe(i),l=o.length?Kr.updateContext(n,r,o,e):n,u=a?[n]:void 0,c=[];function d(g,v){var b;switch(v.type){case ko.raise:{var S=yue(v,l,r,t.options.delays);return s&&typeof S.delay=="number"&&s(S,l,r),S}case ko.send:var A=bue(v,l,r,t.options.delays);if(!vue.IS_PRODUCTION){var w=v.delay;Kr.warn(!Kr.isString(w)||typeof A.delay=="number","No delay reference for delay expression '".concat(w,"' was found on machine '").concat(t.id,"'"))}return s&&A.to!==Dd.SpecialTargets.Internal&&(g==="entry"?c.push(A):s(A,l,r)),A;case ko.log:{var x=Sue(v,l,r);return s==null||s(x,l,r),x}case ko.choose:{var P=v,N=(b=P.conds.find(function(X){var G=Kr.toGuard(X.cond,t.options.guards);return!G||Kr.evaluateGuard(t,G,l,r,s?void 0:e)}))===null||b===void 0?void 0:b.actions;if(!N)return[];var k=di.__read(EU(t,e,l,r,[{type:g,actions:SU(Kr.toArray(N),t.options.actions)}],s,a),2),U=k[0],H=k[1];return l=H,u==null||u.push(l),U}case ko.pure:{var N=v.get(l,r.data);if(!N)return[];var B=di.__read(EU(t,e,l,r,[{type:g,actions:SU(Kr.toArray(N),t.options.actions)}],s,a),2),q=B[0],Z=B[1];return l=Z,u==null||u.push(l),q}case ko.stop:{var x=Eue(v,l,r);return s==null||s(x,n,r),x}case ko.assign:{l=Kr.updateContext(l,r,[v],s?void 0:e),u==null||u.push(l);break}default:var C=p2(v,t.options.actions),L=C.exec;if(s)s(C,l,r);else if(L&&u){var V=u.length-1,j=di.__assign(di.__assign({},C),{exec:function(X){for(var G=[],ie=1;ie<arguments.length;ie++)G[ie-1]=arguments[ie];L.apply(void 0,di.__spreadArray([u[V]],di.__read(G),!1))}});C=j}return C}}function f(g){var v,b,S=[];try{for(var A=di.__values(g.actions),w=A.next();!w.done;w=A.next()){var x=w.value,P=d(g.type,x);P&&(S=S.concat(P))}}catch(N){v={error:N}}finally{try{w&&!w.done&&(b=A.return)&&b.call(A)}finally{if(v)throw v.error}}
170return c.forEach(function(N){s(N,l,r)}),c.length=0,S}var h=Kr.flatten(i.map(f));return[h,l]}wi.actionTypes=ko;wi.after=_We;wi.assign=AWe;wi.cancel=SWe;var g2=wi.choose=LWe;wi.done=CWe;wi.doneInvoke=xWe;wi.error=IWe;wi.escalate=RWe;wi.forwardTo=PWe;wi.getActionFunction=bU;wi.initEvent=hWe;wi.isActionObject=wWe;wi.log=bWe;wi.pure=OWe;wi.raise=pWe;wi.resolveActions=EU;wi.resolveLog=Sue;wi.resolveRaise=yue;wi.resolveSend=bue;wi.resolveStop=Eue;wi.respond=vWe;wi.send=ax;var mY=wi.sendParent=c7;wi.sendTo=gWe;wi.sendUpdate=mWe;wi.start=EWe;wi.stop=TWe;wi.toActionObject=p2;wi.toActionObjects=SU;wi.toActivityDefinition=u7;const Zh={};var TU=(t=>(t.NOT_DETERMINED="0",t.RESTRICTED="1",t.DENIED="2",t.AUTHORIZED="3",t))(TU||{});class kWe{constructor(){this.id=null,this.sequence=null,this.system=null,this.title=null,this.description=null,this.advertiser=null,this.pricing=null,this.survey=null,this.errorURLTemplates=[],this.impressionURLTemplates=[],this.creatives=[],this.extensions=[]}}class NWe{constructor(){this.attributes={},this.children=[]}}class MWe{constructor(){this.name=null,this.value=null,this.attributes={}}}class FWe{constructor(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.altText=null,this.companionClickThroughURLTemplate=null,this.companionClickTrackingURLTemplates=[],this.trackingEvents={}}}class d7{constructor(e={}){this.id=e.id||null,this.adId=e.adId||null,this.sequence=e.sequence||null,this.apiFramework=e.apiFramework||null,this.trackingEvents={}}}class $We extends d7{constructor(e={}){super(e),this.type="companion",this.variations=[]}}function BWe(t,e,n){Tue(t,e,n).forEach(i=>{typeof window<"u"&&window!==null&&fetch(i).catch(s=>{console.log("could not track url: "+i,s)})})}function Tue(t,e={},n={}){const r=[];e.ASSETURI&&(e.ASSETURI=IP(e.ASSETURI)),e.CONTENTPLAYHEAD&&(e.CONTENTPLAYHEAD=IP(e.CONTENTPLAYHEAD)),e.ERRORCODE&&!n.isCustomCode&&!/^[0-9]{3}$/.test(e.ERRORCODE)&&(e.ERRORCODE=900),e.CACHEBUSTING=Aue(Math.round(Math.random()*1e8).toString()),e.TIMESTAMP=IP(new Date().toISOString()),e.RANDOM=e.random=e.CACHEBUSTING;for(const i in t){let s=t[i];if(typeof s=="string"){for(const a in e){const o=e[a],l=`[${a}]`,u=`%%${a}%%`;s=s.replace(l,o),s=s.replace(u,o)}r.push(s)}}return r}function IP(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16)}`)}function Aue(t){return t.length<8?wue(0,8-t.length,!1).map(()=>"0").join("")+t:t}function wue(t,e,n){const r=[],i=t<e,s=n?i?e+1:e-1:e;for(let a=t;i?a<s:a>s;i?a++:a--)r.push(a);return r}function UWe(t){return!isNaN(parseFloat(t))&&isFinite(t)}function _ue(t){return t.reduce((e,n)=>e.concat(Array.isArray(n)?_ue(n):n),[])}const OP={track:BWe,resolveURLTemplates:Tue,encodeURIComponentRFC3986:IP,leftpad:Aue,range:wue,isNumeric:UWe,flatten:_ue};function VWe(t,e){const n=t.childNodes;for(const r in n){const i=n[r];if(i.nodeName===e)return i}}function HWe(t,e){const n=[],r=t.childNodes;for(const i in r){const s=r[i];s.nodeName===e&&n.push(s)}return n}function jWe(t,e){if(!e)return t;if(t.indexOf("//")===0){const{protocol:n}=location;return`${n}${t}`}return t.indexOf("://")===-1?`${e.slice(0,e.lastIndexOf("/"))}/${t}`:t}function zWe(t){return["true","TRUE","1"].indexOf(t)!==-1}function GWe(t){return t&&(t.textContent||t.text||"").trim()}function WWe(t,e,n){const r=e.getAttribute(t);r&&n.setAttribute(t,r)}function qWe(t){if(t===null||typeof t>"u")return-1;if(OP.isNumeric(t))return parseInt(t);const e=t.split(":");if(e.length!==3)return-1;const n=e[2].split(".");let r=parseInt(n[0]);n.length===2&&(r+=parseFloat(`0.${n[1]}`));const i=parseInt(e[1]*60),s=parseInt(e[0]*60*60);return isNaN(s)||isNaN(i)||isNaN(r)||i>60*60||r>60?-1:s+i+r}function KWe(t){const e=[];let n=null;return t.forEach((r,i)=>{if(r.sequence&&(r.sequence=parseInt(r.sequence,10)),r.sequence>1){const s=t[i-1];if(s&&s.sequence===r.sequence-1){n&&n.push(r);return}delete r.sequence}n=[r],e.push(n)}),e}function YWe(t,e){t.errorURLTemplates=e.errorURLTemplates.concat(t.errorURLTemplates),t.impressionURLTemplates=e.impressionURLTemplates.concat(t.impressionURLTemplates),t.extensions=e.extensions.concat(t.extensions),t.creatives.forEac
170h(n=>{if(e.trackingEvents&&e.trackingEvents[n.type])for(const r in e.trackingEvents[n.type]){const i=e.trackingEvents[n.type][r];Array.isArray(n.trackingEvents[r])||(n.trackingEvents[r]=[]),n.trackingEvents[r]=n.trackingEvents[r].concat(i)}}),e.videoClickTrackingURLTemplates&&e.videoClickTrackingURLTemplates.length&&t.creatives.forEach(n=>{n.type==="linear"&&(n.videoClickTrackingURLTemplates=n.videoClickTrackingURLTemplates.concat(e.videoClickTrackingURLTemplates))}),e.videoCustomClickURLTemplates&&e.videoCustomClickURLTemplates.length&&t.creatives.forEach(n=>{n.type==="linear"&&(n.videoCustomClickURLTemplates=n.videoCustomClickURLTemplates.concat(e.videoCustomClickURLTemplates))}),e.videoClickThroughURLTemplate&&t.creatives.forEach(n=>{n.type==="linear"&&(n.videoClickThroughURLTemplate===null||typeof n.videoClickThroughURLTemplate>"u")&&(n.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate)})}const Vt={childByName:VWe,childrenByName:HWe,resolveVastAdTagURI:jWe,parseBoolean:zWe,parseNodeText:GWe,copyNodeAttribute:WWe,parseDuration:qWe,splitVAST:KWe,mergeWrapperAdData:YWe};function ZWe(t,e){const n=new $We(e);return Vt.childrenByName(t,"Companion").forEach(r=>{const i=new FWe;i.id=r.getAttribute("id")||null,i.width=r.getAttribute("width"),i.height=r.getAttribute("height"),i.companionClickTrackingURLTemplates=[],Vt.childrenByName(r,"HTMLResource").forEach(s=>{i.type=s.getAttribute("creativeType")||"text/html",i.htmlResource=Vt.parseNodeText(s)}),Vt.childrenByName(r,"IFrameResource").forEach(s=>{i.type=s.getAttribute("creativeType")||0,i.iframeResource=Vt.parseNodeText(s)}),Vt.childrenByName(r,"StaticResource").forEach(s=>{i.type=s.getAttribute("creativeType")||0,Vt.childrenByName(r,"AltText").forEach(a=>{i.altText=Vt.parseNodeText(a)}),i.staticResource=Vt.parseNodeText(s)}),Vt.childrenByName(r,"TrackingEvents").forEach(s=>{Vt.childrenByName(s,"Tracking").forEach(a=>{const o=a.getAttribute("event"),l=Vt.parseNodeText(a);o&&l&&(Array.isArray(i.trackingEvents[o])||(i.trackingEvents[o]=[]),i.trackingEvents[o].push(l))})}),Vt.childrenByName(r,"CompanionClickTracking").forEach(s=>{i.companionClickTrackingURLTemplates.push(Vt.parseNodeText(s))}),i.companionClickThroughURLTemplate=Vt.parseNodeText(Vt.childByName(r,"CompanionClickThrough")),i.companionClickTrackingURLTemplate=Vt.parseNodeText(Vt.childByName(r,"CompanionClickTracking")),n.variations.push(i)}),n}class QWe extends d7{constructor(e={}){super(e),this.type="linear",this.duration=0,this.skipDelay=null,this.mediaFiles=[],this.videoClickThroughURLTemplate=null,this.videoClickTrackingURLTemplates=[],this.videoCustomClickURLTemplates=[],this.adParameters=null,this.icons=[]}}let XWe=class{constructor(){this.program=null,this.height=0,this.width=0,this.xPosition=0,this.yPosition=0,this.apiFramework=null,this.offset=null,this.duration=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.iconClickThroughURLTemplate=null,this.iconClickTrackingURLTemplates=[],this.iconViewTrackingURLTemplate=null}};class JWe{constructor(){this.id=null,this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.co
170dec=null,this.bitrate=0,this.minBitrate=0,this.maxBitrate=0,this.width=0,this.height=0,this.apiFramework=null,this.scalable=null,this.maintainAspectRatio=null}}function eqe(t,e){let n;const r=new QWe(e);r.duration=Vt.parseDuration(Vt.parseNodeText(Vt.childByName(t,"Duration")));const i=t.getAttribute("skipoffset");if(typeof i>"u"||i===null)r.skipDelay=null;else if(i.charAt(i.length-1)==="%"&&r.duration!==-1){const l=parseInt(i,10);r.skipDelay=r.duration*(l/100)}else r.skipDelay=Vt.parseDuration(i);const s=Vt.childByName(t,"VideoClicks");s&&(r.videoClickThroughURLTemplate=Vt.parseNodeText(Vt.childByName(s,"ClickThrough")),Vt.childrenByName(s,"ClickTracking").forEach(l=>{r.videoClickTrackingURLTemplates.push(Vt.parseNodeText(l))}),Vt.childrenByName(s,"CustomClick").forEach(l=>{r.videoCustomClickURLTemplates.push(Vt.parseNodeText(l))}));const a=Vt.childByName(t,"AdParameters");a&&(r.adParameters=Vt.parseNodeText(a)),Vt.childrenByName(t,"TrackingEvents").forEach(l=>{Vt.childrenByName(l,"Tracking").forEach(u=>{let c=u.getAttribute("event");const d=Vt.parseNodeText(u);if(c&&d){if(c==="progress"){if(n=u.getAttribute("offset"),!n)return;n.charAt(n.length-1)==="%"?c=`progress-${n}`:c=`progress-${Math.round(Vt.parseDuration(n))}`}Array.isArray(r.trackingEvents[c])||(r.trackingEvents[c]=[]),r.trackingEvents[c].push(d)}})}),Vt.childrenByName(t,"MediaFiles").forEach(l=>{Vt.childrenByName(l,"MediaFile").forEach(u=>{const c=new JWe;c.id=u.getAttribute("id"),c.fileURL=Vt.parseNodeText(u),c.deliveryType=u.getAttribute("delivery"),c.codec=u.getAttribute("codec"),c.mimeType=u.getAttribute("type"),c.apiFramework=u.getAttribute("apiFramework"),c.bitrate=parseInt(u.getAttribute("bitrate")||0),c.minBitrate=parseInt(u.getAttribute("minBitrate")||0),c.maxBitrate=parseInt(u.getAttribute("maxBitrate")||0),c.width=parseInt(u.getAttribute("width")||0),c.height=parseInt(u.getAttribute("height")||0);let d=u.getAttribute("scalable");d&&typeof d=="string"&&(d=d.toLowerCase(),d==="true"?c.scalable=!0:d==="false"&&(c.scalable=!1));let f=u.getAttribute("maintainAspectRatio");f&&typeof f=="string"&&(f=f.toLowerCase(),f==="true"?c.maintainAspectRatio=!0:f==="false"&&(c.maintainAspectRatio=!1)),r.mediaFiles.push(c)})});const o=Vt.childByName(t,"Icons");return o&&Vt.childrenByName(o,"Icon").forEach(l=>{const u=new XWe;u.program=l.getAttribute("program"),u.height=parseInt(l.getAttribute("height")||0),u.width=parseInt(l.getAttribute("width")||0),u.xPosition=tqe(l.getAttribute("xPosition")),u.yPosition=nqe(l.getAttribute("yPosition")),u.apiFramework=l.getAttribute("apiFramework"),u.offset=Vt.parseDuration(l.getAttribute("offset")),u.duration=Vt.parseDuration(l.getAttribute("duration")),Vt.childrenByName(l,"HTMLResource").forEach(d=>{u.type=d.getAttribute("creativeType")||"text/html",u.htmlResource=Vt.parseNodeText(d)}),Vt.childrenByName(l,"IFrameResource").forEach(d=>{u.type=d.getAttribute("creativeType")||0,u.iframeResource=Vt.parseNodeText(d)}),Vt.childrenByName(l,"StaticResource").forEach(d=>{u.type=d.getAttribute("creativeType")||0,u.staticResource=Vt.parseNodeText(d)});const c=Vt.childByName(l,"IconClicks");c&&(u.iconClickThroughURLTemplate=Vt.parseNodeText(Vt.childByName(c,"IconClickThrough")),Vt.childrenByName(c,"IconClickTracking").forEach(d=>{u.iconClickTrackingURLTemplates.push(Vt.parseNodeText(d))})),u.iconViewTrackingURLTemplate=Vt.parseNodeText(Vt.childByName(l,"IconViewTracking")),r.icons.push(u)}),r}function tqe(t){return["left","right"].indexOf(t)!==-1?t:parseInt(t||0)}function nqe(t){return["top","bottom"].indexOf(t)!==-1?t:parseInt(t||0)}class rqe extends d7{constructor(e={}){super(e),this.type="nonlinear",this.variations=[]}}class iqe{constructor(){this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}}function sqe(t,e){const n=new rqe(e);return Vt.childrenByName(t,"TrackingEvents").forEach(r=>{let i,s;Vt.childrenByName(r,"Tracking").forEach(a=>{i=a.getAttribute("event"),s=Vt.parseNodeText(a),i&&s&&(Array.isArray(n.trackingEvents[i])||(n.trackingEvents[i]=[]),n.trackingEvents[i].push(s))})}),Vt.childrenByName(t,"NonLinear").forEach(r=>{const i=new iqe;i.id=r.getAttribute("id")||null,i.width=r.getAttribute("width"),i.height=r.getAttribute("height"),i.expandedWidth=r.getAttribute("expandedWidth"),i.expandedHeight=r.getAttribute("expandedHeight"),i.scalable=Vt.parseBoolean(r.getAttribute("scalable")),i.maintainAspectRatio=Vt.parseBoolean(r.getAttribute("maintainAspectRatio")),i.minSuggestedDuration=Vt.parseDuration(r.getAttribute("minSuggestedDuration")),i.apiFramework=r.getAttribute("apiFramework"),Vt.childrenByName(r,"HTMLResource").forEach(a=>{i.type=a.getAttribute("creativeType")||"text/html",i.htmlResource=Vt.parseNodeText(a)}),Vt.childrenByName(r,"IFrameResource").forEach(a=>{i.type=a.getAttribute("creativeType")||0,i.iframeResource=Vt.parseNodeText(a)}),Vt.childrenByName(r,"StaticResource").forEach(a=>{i.type=a.getAttribute("creativeType")||0,i.staticResource=Vt.parseNodeText(a)});const s=Vt.childByName(r,"AdParameters");s&&(i.adParameters=Vt.parseNodeText(s)),i.nonlinearClickThroughURLTemplate=Vt.parseNodeText(Vt.childByName(r,"NonLinearClickThrough")),Vt.childrenByName(r,"NonLinearClickTracking").forEach(a=>{i.nonlinearClickTrackingURLTemplates.push(Vt.parseNodeText(a))}),n.variations.push(i)}),n}function aqe(t){const e=t.childNodes;for(const n in e){const r=e[n];if(["Wrapper","InLine"].indexOf(r.nodeName)!==-1){if(Vt.copyNodeAttribute("id",t,r),Vt.copyNodeAttribute("sequence",t,r),r.nodeName==="Wrapper")return oqe(r);if(r.nodeName==="InLine")return Cue(r)}}}function Cue(t){const e=t.childNodes,n=new kWe;
170n.id=t.getAttribute("id")||null,n.sequence=t.getAttribute("sequence")||null;for(const r in e){const i=e[r];switch(i.nodeName){case"Error":n.errorURLTemplates.push(Vt.parseNodeText(i));break;case"Impression":n.impressionURLTemplates.push(Vt.parseNodeText(i));break;case"Creatives":Vt.childrenByName(i,"Creative").forEach(s=>{const a={id:s.getAttribute("id")||null,adId:uqe(s),sequence:s.getAttribute("sequence")||null,apiFramework:s.getAttribute("apiFramework")||null};for(const o in s.childNodes){const l=s.childNodes[o];let u;switch(l.nodeName){case"Linear":u=eqe(l,a),u&&n.creatives.push(u);break;case"NonLinearAds":u=sqe(l,a),u&&n.creatives.push(u);break;case"CompanionAds":u=ZWe(l,a),u&&n.creatives.push(u);break}}});break;case"Extensions":lqe(n.extensions,Vt.childrenByName(i,"Extension"));break;case"AdSystem":n.system={value:Vt.parseNodeText(i),version:i.getAttribute("version")||null};break;case"AdTitle":n.title=Vt.parseNodeText(i);break;case"Description":n.description=Vt.parseNodeText(i);break;case"Advertiser":n.advertiser=Vt.parseNodeText(i);break;case"Pricing":n.pricing={value:Vt.parseNodeText(i),model:i.getAttribute("model")||null,currency:i.getAttribute("currency")||null};break;case"Survey":n.survey=Vt.parseNodeText(i);break}}return n}function oqe(t){const e=Cue(t);let n=Vt.childByName(t,"VASTAdTagURI");if(n?e.nextWrapperURL=Vt.parseNodeText(n):(n=Vt.childByName(t,"VASTAdTagURL"),n&&(e.nextWrapperURL=Vt.parseNodeText(Vt.childByName(n,"URL")))),e.creatives.forEach(r=>{if(["linear","nonlinear"].indexOf(r.type)!==-1){if(r.trackingEvents){e.trackingEvents||(e.trackingEvents={}),e.trackingEvents[r.type]||(e.trackingEvents[r.type]={});for(const i in r.trackingEvents){const s=r.trackingEvents[i];Array.isArray(e.trackingEvents[r.type][i])||(e.trackingEvents[r.type][i]=[]),s.forEac
vendor: 4,813 bytes, line 170
170h(a=>{e.trackingEvents[r.type][i].push(a)})}}r.videoClickTrackingURLTemplates&&(Array.isArray(e.videoClickTrackingURLTemplates)||(e.videoClickTrackingURLTemplates=[]),r.videoClickTrackingURLTemplates.forEach(i=>{e.videoClickTrackingURLTemplates.push(i)})),r.videoClickThroughURLTemplate&&(e.videoClickThroughURLTemplate=r.videoClickThroughURLTemplate),r.videoCustomClickURLTemplates&&(Array.isArray(e.videoCustomClickURLTemplates)||(e.videoCustomClickURLTemplates=[]),r.videoCustomClickURLTemplates.forEach(i=>{e.videoCustomClickURLTemplates.push(i)}))}}),e.nextWrapperURL)return e}function lqe(t,e){e.forEach(n=>{const r=new NWe,i=n.attributes,s=n.childNodes;if(n.attributes)for(const a in i){const o=i[a];o.nodeName&&o.nodeValue&&(r.attributes[o.nodeName]=o.nodeValue)}for(const a in s){const o=s[a],l=Vt.parseNodeText(o);if(o.nodeName!=="#comment"&&l!==""){const u=new MWe;if(u.name=o.nodeName,u.value=l,o.attributes){const c=o.attributes;for(const d in c){const f=c[d];u.attributes[f.nodeName]=f.nodeValue}}r.children.push(u)}}t.push(r)})}function uqe(t){return t.getAttribute("AdID")||t.getAttribute("adID")||t.getAttribute("adId")||null}var f7={exports:{}},RE=typeof Reflect=="object"?Reflect:null,vY=RE&&typeof RE.apply=="function"?RE.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},PP;RE&&typeof RE.ownKeys=="function"?PP=RE.ownKeys:Object.getOwnPropertySymbols?PP=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:PP=function(e){return Object.getOwnPropertyNames(e)};function cqe(t){console&&console.warn&&console.warn(t)}var xue=Number.isNaN||function(e){return e!==e};function is(){is.init.call(this)}f7.exports=is;f7.exports.once=pqe;is.EventEmitter=is;is.prototype._events=void 0;is.prototype._eventsCount=0;is.prototype._maxListeners=void 0;var yY=10;function m2(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(is,"defaultMaxListeners",{enumerable:!0,get:function(){return yY},set:function(t){if(typeof t!="number"||t<0||xue(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");yY=t}});is.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};is.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||xue(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Iue(t){return t._maxListeners===void 0?is.defaultMaxListeners:t._maxListeners}is.prototype.getMaxListeners=function(){return Iue(this)};is.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(l===void 0)return!1;if(typeof l=="function")vY(l,this,n);else for(var u=l.length,c=Due(l,u),r=0;r<u;++r)vY(c[r],this,n);return!0};function Oue(t,e,n,r){var i,s,a;if(m2(n),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),s=t._events),a=s[e]),a===void 0)a=s[e]=n,++t._eventsCount;else if(typeof a=="function"?a=s[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=Iue(t),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=a.length,cqe(o)}return t}is.prototype.addListener=function(e,n){return Oue(this,e,n,!1)};is.prototype.on=is.prototype.addListener;is.prototype.prependListener=function(e,n){return Oue(this,e,n,!0)};function dqe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Pue(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=dqe.bind(r);return i.listener=n,r.wrapFn=i,i}is.prototype.once=function(e,n){return m2(n),this.on(e,Pue(this,e,n)),this};is.prototype.prependOnceListener=function(e,n){return m2(n),this.prependListener(e,Pue(this,e,n)),this};is.prototype.removeListener=function(e,n){var r,i,s,a,o;if(m2(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit
170("removeListener",e,r.listener||n));else if(typeof r!="function"){for(s=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){o=r[a].listener,s=a;break}if(s<0)return this;s===0?r.shift():fqe(r,s),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||n)}return this};is.prototype.off=is.prototype.removeListener;is.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var s=Object.keys(r),a;for(i=0;i<s.length;++i)a=s[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(e,n[i]);return this};function Rue(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?hqe(i):Due(i,i.length)}is.prototype.listeners=function(e){return Rue(this,e,!0)};is.prototype.rawListeners=function(e){return Rue(this,e,!1)};is.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Lue.call(t,e)};is.prototype.listenerCount=Lue;function Lue(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}is.prototype.eventNames=function(){return this._eventsCount>0?PP(this._events):[]};function Due(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function fqe(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function hqe(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function pqe(t,e){return new Promise(function(n,r){function i(a){t.removeListener(e,s),r(a)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",i),n([].slice.call(arguments))}kue(t,e,s,{once:!0}),e!=="error"&&gqe(t,i,{once:!0})})}function gqe(t,e,n){typeof t.on=="function"&&kue(t,"error",e,n)}function kue(t,e,n,r){if(typeof t.on=="function")r.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(s){r.once&&t.removeEventListener(e,i),n(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var mqe=f7.exports;function Nue(){let t;return window.XDomainRequest&&(t=new XDomainRequest),t}function vqe(){return!!Nue()}function yqe(t,e,n){const r=typeof window.ActiveXObject=="function"?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(r)r.async=!1;else return n(new Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));const i=Nue();i.open("GET",t),i.timeout=e.timeout||0,i.withCredentials=e.withCredentials||!1,i.send(),i.onprogress=function(){},i.onload=function(){r.loadXML(i.responseText),n(null,r)}}const bY={get:yqe,supported:vqe};function bqe(t,e,n){n(new Error("Please bundle the library for node to use the node urlHandler"))}const Sqe={get:bqe};var Mue={};Mue.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub
vendor: 27,816 bytes, lines 170-171
170:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};var h7={},AU=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,SY=new RegExp("[\\-\\.0-9"+AU.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),EY=new RegExp("^"+AU.source+SY.source+"*(?::"+AU.source+SY.source+"*)?$"),TA=0,um=1,aS=2,AA=3,oS=4,lS=5,wA=6,uO=7;function v1(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,v1)}v1.prototype=new Error;v1.prototype.name=v1.name;function Fue(){}Fue.prototype={parse:function(t,e,n){var r=this.domBuilder;r.startDocument(),$ue(e,e={}),Eqe(t,e,n,r,this.errorHandler),r.endDocument()}};function Eqe(t,e,n,r,i){function s(j){if(j>65535){j-=65536;var X=55296+(j>>10),G=56320+(j&1023);return String.fromCharCode(X,G)}else return String.fromCharCode(j)}function a(j){var X=j.slice(1,-1);return X in n?n[X]:X.charAt(0)==="#"?s(parseInt(X.substr(1).replace("x","0x"))):(i.error("entity not found:"+j),j)}function o(j){if(j>v){var X=t.substring(v,j).replace(/&#?\w+;/g,a);f&&l(v),r.characters(X,0,j-v),v=j}}function l(j,X){for(;j>=c&&(X=d.exec(t));)u=X.index,c=u+X[0].length,f.lineNumber++;f.columnNumber=j-u+1}for(var u=0,c=0,d=/.*(?:\r\n?|\n)|.*$/g,f=r.locator,h=[{currentNSMap:e}],g={},v=0;;){try{var b=t.indexOf("<",v);if(b<0){if(!t.substr(v).match(/^\s*$/)){var S=r.doc,A=S.createTextNode(t.substr(v));S.appendChild(A),r.currentElement=A}return}switch(b>v&&o(b),t.charAt(b+1)){case"/":var q=t.indexOf(">",b+3),w=t.substring(b+2,q),x=h.pop();q<0?(w=t.substring(b+2).replace(/[\s<].*/,""),i.error("end tag name: "+w+" is not complete:"+x.tagName),q=b+1+w.length):w.match(/\s</)&&(w=w.replace(/[\s<].*/,""),i.error("end tag name: "+w+" maybe not complete"),q=b+1+w.length);var P=x.localNSMap,N=x.tagName==w,k=N||x.tagName&&x.tagName.toLowerCase()==w.toLowerCase();if(k){if(r.endElement(x.uri,x.localName,w),P)for(var U in P)r.endPrefixMapping(U);N||i.fatalError("end tag name: "+w+" is not match the current start tagName:"+x.tagName)}else h.push(x);q++;break;case"?":f&&l(b),q=Cqe(t,b,r);break;case"!":f&&l(b),q=_qe(t,b,r,i);break;default:f&&l(b);var H=new Bue,B=h[h.length-1].currentNSMap,q=Tqe(t,b,H,B,a,i),Z=H.length;if(!H.closed&&wqe(t,q,H.tagName,g)&&(H.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),f&&Z){for(var C=TY(f,{}),L=0;L<Z;L++){var V=H[L];l(V.offset),V.locator=TY(f,{})}r.locator=C,AY(H,r,B)&&h.push(H),r.locator=f}else AY(H,r,B)&&h.push(H);H.uri==="http://www.w3.org/1999/xhtml"&&!H.closed?q=Aqe(t,q,H.tagName,a,r):q++}}catch(j){if(j instanceof v1)throw j;i.error("element parse error: "+j),q=-1}q>v?v=q:o(Math.max(b,v)+1)}}function TY(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function Tqe(t,e,n,r,i,s){function a(f,h,g){f in n.attributeNames&&s.fatalError("Attribute "+f+" redefined"),n.addValue(f,h,g)}for(var o,l,u=++e,c=TA;;){var d=t.charAt(u);switch(d){case"=":if(c===um)o=t.slice(e,u),c=AA;else if(c===aS)c=AA;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(c===AA||c===um)if(c===um&&(s.warning('attribute value must after "="'),o=t.slice(e,u)),e=u+1,u=t.indexOf(d,e),u>0)l=t.slice(e,u).replace(/&#?\w+;/g,i),a(o,l,e-1),c=lS;else throw new Error("attribute value no end '"+d+"' match");else if(c==oS)l=t.slice(e,u).replace(/&#?\w+;/g,i),a(o,l,e),s.warning('attribute "'+o+'" missed start quot('+d+")!!"),e=u+1,c=lS;else throw new Error('attribute value must after "="');break;case"/":switch(c){case TA:n.setTagName(t.slice(e,u));case lS:case wA:case uO:c=uO,n.closed=!0;case oS:case um:case aS:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),c==TA&&n.setTagName(t.slice(e,u)),u;case">":switch(c){case TA:n.setTagName(t.slice(e,u));case lS:case wA:case uO:break;case oS:case um:l=t.slice(e,u),l.slice(-1)==="/"&&(n.closed=!0,l=l.slice(0,-1));case aS:c===aS&&(l=o),c==oS?(s.warning('attribute "'+l+'" missed quot(")!'),a(o,l.replace(/&#?\w+;/g,i),e)):((r[""]!=="http://www.w3.org/1999/xhtml"||!l.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),a(l,l,e));break;case AA:throw new Error("attribute value missed!!")}return u;case"€":d=" ";default:if(d<=" ")switch(c){case TA:n.setTagName(t.slice(e,u)),c=wA;break;case um:o=t.slice(e,u),c=aS;break;case oS:var l=t.slice(e,u).replace(/&#?\w+;/g,i);s.warning('attribute "'+l+'" missed quot(")!!'),a(o,l,e);case lS:c=wA;break}else switch(c){case aS:n.tagName,(r[""]!=="http://www.w3.org/1999/xhtml"||!o.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,e),e=u,c=um;break;case lS:s.warning('attribute space is required"'+o+'"!!');case wA:c=um,e=u;break;case AA:c=oS,e=u;break;case uO:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function AY(t,e,n){for(var r=t.tagName,i=null,d=t.length;d--;){var s=t[d],a=s.qName,o=s.value,f=a.indexOf(":");if(f>0)var l=s.prefix=a.slice(0,f),u=a.slice(f+1),c=l==="xmlns"&&u;else u=a,l=null,c=a==="xmlns"&&"";s.localName=u,c!==!1&&(i==null&&(i={},$ue(n,n={})),n[c]=i[c]=o,s.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(c,o))}for(var d=t.length;d--;){s=t[d];var l=s.prefix;l&&(l==="xml"&&(s.uri="http://www.w3.org/XML/1998/namespace"),l!=="xmlns"&&(s.uri=n[l||""]))}var f=r.indexOf(":");f>0?(l=t.prefix=r.slice(0,f),u=t.localName=r.slice(f+1)):(l=null,u=t.localName=r);var h=t.uri=n[l||""];if(e.startElement(h,u,r,t),t.closed){if(e.endElement(h,u,r),i)for(l in i)e.endPrefixMapping(l)}else return t.currentNSMap=n,t.localNSMap=i,!0}function Aqe(t,e,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var s=t.indexOf("</"+n+">",e),a=t.substring(e+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),s)}return e+1}function wqe(t,e,n,r){var i=r[n];return i==null&&(i=t.lastIndexOf("</"+n+">"),i<e&&(i=t.lastIndexOf("</"+n)),r[n]=i),i<e}function $ue(t,e){for(var n in t)e[n]=t[n]}function _qe(t,e,n,r){var i=t.charAt(e+2);switch(i){case"-":if(t.charAt(e+3)==="-"){var s=t.indexOf("-->",e+4);return s>e?(n.comment(t,e+4,s-e-4),s+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(t.substr(e+3,6)=="CDATA["){var s=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,s-e-9),n.endCDATA(),s+3}var a=xqe(t,e),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var l=a[1][0],u=!1,c=!1;o>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],c=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(c=a[3][0]));var d=a[o-1];return n.startDTD(l,u,c),n.endDTD(),d.index+d[0].length}}return-1}function Cqe(t,e,n){var r=t.indexOf("?>",e);if(r){var i=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function Bue(){this.attributeNames={}}Bue.prototype={setTagName:function(t){if(!EY.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,n){if(!EY.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};function xqe(t,e){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=e,i.exec(t);n=i.exec(t);)if(r.push(n),n[1])return r}h7.XMLReader=Fue;h7.ParseError=v1;var ox={};function lx(t,e){for(var n in t)e[n]=t[n]}function qu(t,e){var n=t.prototype;if(!(n instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,lx(n,r),t.prototype=n=r}n.constructor!=t&&(typeof t!="function"&&console.error("unknow Class:"+t),n.constructor=t)}var Iqe="http://www.w3.org/1999/xhtml",Ku={},kf=Ku.ELEMENT_NODE=1,y1=Ku.ATTRIBUTE_NODE=2,tL=Ku.TEXT_NODE=3,Uue=Ku.CDATA_SECTION_NODE=4,Vue=Ku.ENTITY_REFERENCE_NODE=5,Oqe=Ku.ENTITY_NODE=6,Hue=Ku.PROCESSING_INSTRUCTION_NODE=7,jue=Ku.COMMENT_NODE=8,zue=Ku.DOCUMENT_NODE=9,Gue=Ku.DOCUMENT_TYPE_NODE=10,Cg=Ku.DOCUMENT_FRAGMENT_NODE=11,Pqe=Ku.NOTATION_NODE=12,Rl={},$o={};Rl.INDEX_SIZE_ERR=($o[1]="Index size error",1);Rl.DOMSTRING_SIZE_ERR=($o[2]="DOMString size error",2);var Rqe=Rl.HIERARCHY_REQUEST_ERR=($o[3]="Hierarchy request error",3);Rl.WRONG_DOCUMENT_ERR=($o[4]="Wrong document",4);Rl.INVALID_CHARACTER_ERR=($o[5]="Invalid character",5);Rl.NO_DATA_ALLOWED_ERR=($o[6]="No data allowed",6);Rl.NO_MODIFICATION_ALLOWED_ERR=($o[7]="No modification allowed",7);var Lqe=Rl.NOT_FOUND_ERR=($o[8]="Not found",8);Rl.NOT_SUPPORTED_ERR=($o[9]="Not supported",9);var wY=Rl.INUSE_ATTRIBUTE_ERR=($o[10]="Attribute in use",10);Rl.INVALID_STATE_ERR=($o[11]="Invalid state",11);Rl.SYNTAX_ERR=($o[12]="Syntax error",12);Rl.INVALID_MODIFICATION_ERR=($o[13]="Invalid modification",13);Rl.NAMESPACE_ERR=($o[14]="Invalid namespace",14);Rl.INVALID_ACCESS_ERR=($o[15]="Invalid access",15);function z0(t,e){if(e instanceof Error)var n=e;else n=this,Error.call(this,$o[t]),this.message=$o[t],Error.captureStackTrace&&Error.captureStackTrace(this,z0);return n.code=t,e&&(this.message=this.message+": "+e),n}z0.prototype=Error.prototype;lx(Rl,z0);function gv(){}gv.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var n=[],r=0;r<this.length;r++)iE(this[r],n,t,e);return n.join("")}};function b1(t,e){this._node=t,this._refresh=e,p7(this)}function p7(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var n=t._refresh(t._node);nce(t,"length",n.length),lx(n,t),t._inc=e}}b1.prototype.item=function(t){return p7(this),this[t]};qu(b1,gv);function nL(){}function Wue(t,e){for(var n=t.length;n--;)if(t[n]===e)return n}function _Y(t,e,n,r){if(r?e[Wue(e,r)]=n:e[e.length++]=n,t){n.ownerElement=t;var i=t.ownerDocument;i&&(r&&Kue(i,t,r),Dqe(i,t,n))}}function CY(t,e,n){var r=Wue(e,n);if(r>=0){for(var i=e.length-1;r<i;)e[r]=e[++r];if(e.length=i,t){var s=t.ownerDocument;s&&(Kue(s,t,n),n.ownerElement=null)}}else throw z0(Lqe,new Error(t.tagName+"@"+n))}nL.prototype={length:0,item:gv.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var n=this[e];if(n.nodeName==t)return n}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new z0(wY);var n=this.getNamedItem(t.nodeName);return _Y(this._ownerElement,this,t,n),n},setNamedItemNS:function(t){var e=t.ownerElement,n;if(e&&e!=this._ownerElement)throw new z0(wY);return n=this.getNamedItemNS(t.namespaceURI,t.localName),_Y(this._ownerElement,this,t,n),n},removeNamedItem:function(t){var e=this.getNamedItem(t);return CY(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var n=this.getNamedItemNS(t,e);return CY(this._ownerElement,this,n),n},getNamedItemNS:function(t,e){for(var n=this.length;n--;){var r=this[n];if(r.localName==e&&r.namespaceURI==t)return r}return null}};function que(t){if(this._features={},t)for(var e in t)this._features=t[e]}que.prototype={hasFeature:function(t,e){var n=this._features[t.toLowerCase()];return!!(n&&(!e||e in n))},createDocument:function(t,e,n){var r=new ux;if(r.implementation=this,r.childNodes=new gv,r.doctype=n,n&&r.appendChild(n),e){var i=r.createElementNS(t,e);r.appendChild(i)}return r},createDocumentType:function(t,e,n){var r=new b7;return r.name=t,r.nodeName=t,r.publicId=e,r.systemId=n,r}};function Ll(){}Ll.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return Zue(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return Yue(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return wU(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==tL&&t.nodeType==tL?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n){for(var r in n)if(n[r]==t)return r}e=e.nodeType==y1?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&t in n)return n[t];e=e.nodeType==y1?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null}};function xY(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}lx(Ku,Ll);lx(Ku,Ll.prototype);function W_(t,e){if(e(t))return!0;if(t=t.firstChild)do if(W_(t,e))return!0;while(t=t.nextSibling)}function ux(){}function Dqe(t,e,n){t&&t._inc++;var r=n.namespaceURI;r=="http://www.w3.org/2000/xmlns/"&&(e._nsMap[n.prefix?n.localName:""]=n.value)}function Kue(t,e,n,r){t&&t._inc++;var i=n.namespaceURI;i=="http://www.w3.org/2000/xmlns/"&&delete e._nsMap[n.prefix?n.localName:""]}function g7(t,e,n){if(t&&t._inc){t._inc++;var r=e.childNodes;if(n)r[r.length++]=n;else{for(var i=e.firstChild,s=0;i;)r[s++]=i,i=i.nextSibling;r.length=s}}}function Yue(t,e){var n=e.previousSibling,r=e.nextSibling;return n?n.nextSibling=r:t.firstChild=r,r?r.previousSibling=n:t.lastChild=n,g7(t.ownerDocument,t),e}function Zue(t,e,n){var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===Cg){var i=e.firstChild;if(i==null)return e;var s=e.lastChild}else i=s=e;var a=n?n.previousSibling:t.lastChild;i.previousSibling=a,s.nextSibling=n,a?a.nextSibling=i:t.firstChild=i,n==null?t.lastChild=s:n.previousSibling=s;do i.parentNode=t;while(i!==s&&(i=i.nextSibling));return g7(t.ownerDocument||t,t),e.nodeType==Cg&&(e.firstChild=e.lastChild=null),e}function kqe(t,e){var n=e.parentNode;if(n){var r=t.lastChild;n.removeChild(e);var r=t.lastChild}var r=t.lastChild;return e.parentNode=t,e.previousSibling=r,e.nextSibling=null,r?r.nextSibling=e:t.firstChild=e,t.lastChild=e,g7(t.ownerDocument,t,e),e}ux.prototype={nodeName:"#document",nodeType:zue,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==Cg){for(var n=t.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,e),n=r}return t}return this.documentElement==null&&t.nodeType==kf&&(this.documentElement=t),Zue(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),Yue(this,t)},importNode:function(t,e){return tce(this,t,e)},getElementById:function(t){var e=null;return W_(this.documentElement,function(n){if(n.nodeType==kf&&n.getAttribute("id")==t)return e=n,!0}),e},getElementsByClassName:function(t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return new b1(this,function(n){var r=[];return W_(n.documentElement,function(i){i!==n&&i.nodeType==kf&&e.test(i.getAttribute("class"))&&r.push(i)}),r})},createElement:function(t){var e=new S1;e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new gv;var n=e.attributes=new nL;return n._ownerElement=e,e},createDocumentFragment:function(){var t=new v2;return t.ownerDocument=this,t.childNodes=new gv,t},createTextNode:function(t){var e=new m7;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new v7;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new y7;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new E7;return n.ownerDocument=this,n.tagName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new rL;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new S7;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new S1,r=e.split(":"),i=n.attributes=new nL;return n.childNodes=new gv,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=e,i._ownerElement=n,n},createAttributeNS:function(t,e){var n=new rL,r=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=e,n}};qu(ux,Ll);function S1(){this._nsMap={}}S1.prototype={nodeType:kf,hasAttribute:function(t){return this.getAttributeNode(t)!=null},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===Cg?this.insertBefore(t,null):kqe(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new b1(this,function(e){var n=[];return W_(e,function(r){r!==e&&r.nodeType==kf&&(t==="*"||r.tagName==t)&&n.push(r)}),n})},getElementsByTagNameNS:function(t,e){return new b1(this,function(n){var r=[];return W_(n,function(i){i!==n&&i.nodeType===kf&&(t==="*"||i.namespaceURI===t)&&(e==="*"||i.localName==e)&&r.push(i)}),r})}};ux.prototype.getElementsByTagName=S1.prototype.getElementsByTagName;ux.prototype.getElementsByTagNameNS=S1.prototype.getElementsByTagNameNS;qu(S1,Ll);function rL(){}rL.prototype.nodeType=y1;qu(rL,Ll);function cx(){}cx.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error($o[Rqe])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){var r=this.data.substring(0,t),i=this.data.substring(t+e);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}};qu(cx,Ll);function m7(){}m7.prototype={nodeName:"#text",nodeType:tL,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};qu(m7,cx);function v7(){}v7.prototype={nodeName:"#comment",nodeType:jue};qu(v7,cx);function y7(){}y7.prototype={nodeName:"#cdata-section",nodeType:Uue};qu(y7,cx);function b7(){}b7.prototype.nodeType=Gue;qu(b7,Ll);function Que(){}Que.prototype.nodeType=Pqe;qu(Que,Ll);function Xue(){}Xue.prototype.nodeType=Oqe;qu(Xue,Ll);function S7(){}S7.prototype.nodeType=Vue;qu(S7,Ll);function v2(){}v2.prototype.nodeName="#document-fragment";v2.prototype.nodeType=Cg;qu(v2,Ll);function E7(){}E7.prototype.nodeType=Hue;qu(E7,Ll);function Jue(){}Jue.prototype.serializeToString=function(t,e,n){return ece.call(t,e,n)};Ll.prototype.toString=ece;function ece(t,e){var n=[],r=this.nodeType==9&&this.documentElement||this,i=r.prefix,s=r.namespaceURI;if(s&&i==null){var i=r.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return iE(this,n,t,e,a),n.join("")}function IY(t,e,n){var r=t.prefix||"",i=t.namespaceURI;if(!r&&!i||r==="xml"&&i==="http://www.w3.org/XML/1998/namespace"||i=="http://www.w3.org/2000/xmlns/")return!1;for(var s=n.length;s--;){var a=n[s];if(a.prefix==r)return a.namespace!=i}return!0}function iE(t,e,n,r,i){if(r)if(t=r(t),t){if(typeof t=="string"){e.push(t);return}}else return;switch(t.nodeType){case kf:i||(i=[]),i.length;var s=t.attributes,a=s.length,h=t.firstChild,o=t.tagName;n=Iqe===t.namespaceURI||n,e.push("<",o);for(var l=0;l<a;l++){var u=s.item(l);u.prefix=="xmlns"?i.push({prefix:u.localName,namespace:u.value}):u.nodeName=="xmlns"&&i.push({prefix:"",namespace:u.value})}for(var l=0;l<a;l++){var u=s.item(l);if(IY(u,n,i)){var c=u.prefix||"",d=u.namespaceURI,f=c?" xmlns:"+c:" xmlns";e.push(f,'="',d,'"'),i.push({prefix:c,namespace:d})}iE(u,e,n,r,i)}if(IY(t,n,i)){var c=t.prefix||"",d=t.namespaceURI;if(d){var f=c?" xmlns:"+c:" xmlns";e.push(f,'="',d,'"'),i.push({prefix:c,namespace:d})}}if(h||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(e.push(">"),n&&/^script$/i.test(o))for(;h;)h.data?e.push(h.data):iE(h,e,n,r,i),h=h.nextSibling;else for(;h;)iE(h,e,n,r,i),h=h.nextSibling;e.push("</",o,">")}else e.push("/>");return;case zue:case Cg:for(var h=t.firstChild;h;)iE(h,e,n,r,i),h=h.nextSibling;return;case y1:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,xY),'"');case tL:return e.push(t.data.replace(/[<&]/g,xY).replace(/]]>/g,"]]&gt;"));case Uue:return e.push("<![CDATA[",t.data,"]]>");case jue:return e.push("<!--",t.data,"-->");case Gue:var g=t.publicId,v=t.systemId;if(e.push("<!DOCTYPE ",t.name),g)e.push(" PUBLIC ",g),v&&v!="."&&e.push(" ",v),e.push(">");else if(v&&v!=".")e.push(" SYSTEM ",v,">");else{var b=t.internalSubset;b&&e.push(" [",b,"]"),e.push(">")}return;case Hue:return e.push("<?",t.target," ",t.data,"?>");case Vue:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function tce(t,e,n){var r;switch(e.nodeType){case kf:r=e.cloneNode(!1),r.ownerDocument=t;case Cg:break;case y1:n=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=t,r.parentNode=null,n)for(var i=e.firstChild;i;)r.appendChild(tce(t,i,n)),i=i.nextSibling;return r}function wU(t,e,n){var r=new e.constructor;for(var i in e){var s=e[i];typeof s!="object"&&s!=r[i]&&(r[i]=s)}switch(e.childNodes&&(r.childNodes=new gv),r.ownerDocument=t,r.nodeType){case kf:var a=e.attributes,o=r.attributes=new nL,l=a.length;o._ownerElement=r;for(var u=0;u<l;u++)r.setAttributeNode(wU(t,a.item(u),!0));break;case y1:n=!0}if(n)for(var c=e.firstChild;c;)r.appendChild(wU(t,c,n)),c=c.nextSibling;return r}function nce(t,e,n){t[e]=n}try{if(Object.defineProperty){let t=function(e){switch(e.nodeType){case kf:case Cg:var n=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&n.push(t(e)),e=e.nextSibling;return n.join("");default:return e.nodeValue}};Object.defineProperty(b1.prototype,"length",{get:function(){return p7(this),this.$$length}}),Object.defineProperty(Ll.prototype,"textContent",{get:function(){return t(this)},set:function(e){switch(this.nodeType){case kf:case Cg:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),nce=function(e,n,r){e["$$"+n]=r}}}catch{}ox.Node=Ll;ox.DOMException=z0;ox.DOMImplementation=que;ox.XMLSerializer=Jue;function rce(t){this.options=t||{locator:{}}}rce.prototype.parseFromString=function(t,e){var n=this.options,r=new Fqe,i=n.domBuilder||new y2,s=n.errorHandler,a=n.locator,o=n.xmlns||{},l=/\/x?html?$/.test(e),u=l?Mqe.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return a&&i.setDocumentLocator(a),r.errorHandler=Nqe(s,i,a),r.domBuilder=n.domBuilder||i,l&&(o[""]="http://www.w3.org/1999/xhtml"),o.xml=o.xml||"http://www.w3.org/XML/1998/namespace",t&&typeof t=="string"?r.parse(t,o,u):r.errorHandler.error("invalid doc source"),i.doc};function Nqe(t,e,n){if(!t){if(e instanceof y2)return e;t=e}var r={},i=t instanceof Function;n=n||{};function s(a){var o=t[a];!o&&i&&(o=t.length==2?function(l){t(a,l)}:t),r[a]=o&&function(l){o("[xmldom "+a+"]	"+l+_U(n))}||function(){}}return s("warning"),s("error"),s("fatalError"),r}function y2(){this.cdata=!1}function uS(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}y2.prototype={startDocument:function(){this.doc=new Bqe().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var i=this.doc,s=i.createElementNS(t,n||e),a=r.length;cO(this,s),this.currentElement=s,this.locator&&uS(this.locator,s);for(var o=0;o<a;o++){var t=r.getURI(o),l=r.getValue(o),n=r.getQName(o),u=i.createAttributeNS(t,n);this.locator&&uS(r.getLocator(o),u),u.value=u.nodeValue=l,s.setAttributeNode(u)}},endElement:function(t,e,n){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var n=this.doc.createProcessingInstruction(t,e);this.locator&&uS(this.locator,n),cO(this,n)},ignorableWhitespace:function(t,e,n){},characters:function(t,e,n){if(t=OY.apply(this,arguments),t){if(this.cdata)var r=this.doc.createCDATASection(t);else var r=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(t)&&this.doc.appendChild(r),this.locator&&uS(this.locator,r)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,n){t=OY.apply(this,arguments);var r=this.doc.createComment(t);this.locator&&uS(this.locator,r),cO(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(t,e,n);this.locator&&uS(this.locator,i),cO(this,i)}},warning:function(t){console.warn("[xmldom warning]	"+t,_U(this.locator))},error:function(t){console.error("[xmldom error]	"+t,_U(this.locator))},fatalError:function(t){throw new $qe(t,this.locator)}};function _U(t){if(t)return`
171@`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function OY(t,e,n){return typeof t=="string"?t.substr(e,n):t.length>=e+n||e?new java.lang.String(t,e,n)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){y2.prototype[t]=function(){return null}});function cO(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}var Mqe=Mue,ice=h7,Fqe=ice.XMLReader,$qe=ice.ParseError,Bqe=ox.DOMImplementation,Uqe=rce,Vqe=new Uqe;function sce(){try{const t=new window.XMLHttpRequest;return"withCredentials"in t?t:null}catch{return null}}function Hqe(){return!!sce()}
171function jqe(t,e,n){try{const r=sce();r.open("GET",t),r.timeout=e.timeout||0,r.withCredentials=e.withCredentials||!1,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.onreadystatechange=function(){if(r.readyState===4)if(r.status===200){const i=Vqe.parseFromString(r.responseText);n(null,i)}else n(new Error(`XHRURLHandler: ${r.statusText}`))},r.send()}catch{n(new Error("XHRURLHandler: Unexpected error"))}}const PY={get:jqe,supported:Hqe};function zqe(t,e,n){return n||(typeof e=="function"&&(n=e),e={}),typeof window>"u"||window===null?Sqe.get(t,e,n):PY.supported()?PY.get(t,e,n):bY.supported()?bY.get(t,e,n):n(new Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))}const Gqe={get:zqe};class Wqe{constructor(){this.ads=[],this.errorURLTemplates=[],this.version=null}}const qqe=10,Kqe={ERRORCODE:900,extensions:[]};class Yqe extends mqe.EventEmitter{constructor(){super(),this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=null,this.URLTemplateFilters=[],this.fetchingOptions={}}addURLTemplateFilter(e){typeof e=="function"&&this.URLTemplateFilters.push(e)}removeURLTemplateFilter(){this.URLTemplateFilters.pop()}countURLTemplateFilters(){return this.URLTemplateFilters.length}clearURLTemplateFilters(){this.URLTemplateFilters=[]}trackVastError(e,n,...r){this.emit("VAST-error",Object.assign({},Kqe,n,...r)),OP.track(e,n)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}fetchVAST(e,n,r){return new Promise((i,s)=>{this.URLTemplateFilters.forEach(a=>{e=a(e)}),this.parentURLs.push(e),this.emit("VAST-resolving",{url:e,wrapperDepth:n,originalUrl:r}),this.urlHandler.get(e,this.fetchingOptions,(a,o)=>{this.emit("VAST-resolved",{url:e,error:a}),a?s(a):i(o)})})}initParsingStatus(e={}){this.rootURL="",this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=e.wrapperLimit||qqe,this.fetchingOptions={timeout:e.timeout,withCredentials:e.withCredentials},this.urlHandler=e.urlHandler||e.urlhandler||Gqe,this.vastVersion=null}getRemainingAds(e){if(this.remainingAds.length===0)return Promise.reject(new Error("No more ads are available for the given VAST"));const n=e?OP.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(n,{wrapperDepth:0,originalUrl:this.rootURL}).then(r=>this.buildVASTResponse(r))}getAndParseVAST(e,n={}){return this.initParsingStatus(n),this.rootURL=e,this.fetchVAST(e).then(r=>(n.originalUrl=e,n.isRootVAST=!0,this.parse(r,n).then(i=>this.buildVASTResponse(i))))}parseVAST(e,n={}){return this.initParsingStatus(n),n.isRootVAST=!0,this.parse(e,n).then(r=>this.buildVASTResponse(r))}buildVASTResponse(e){const n=new Wqe;return n.ads=e,n.errorURLTemplates=this.getErrorURLTemplates(),n.version=this.vastVersion,this.completeWrapperResolving(n),n}parseVastXml(e,{isRootVAST:n=!1}){if(!e||!e.documentElement||e.documentElement.nodeName!=="VAST")throw new Error("Invalid VAST XMLDocument");const r=[],i=e.documentElement.childNodes;if(n){const s=e.documentElement.getAttribute("version");s&&(this.vastVersion=s)}for(const s in i){const a=i[s];if(a.nodeName==="Error"){const o=Vt.parseNodeText(a);n?this.rootErrorURLTemplates.push(o):this.errorURLTemplates.push(o)}if(a.nodeName==="Ad"){const o=aqe(a);o?r.push(o):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return r}parse(e,{resolveAll:n=!0,wrapperSequence:r=null,originalUrl:i=null,wrapperDepth:s=0,isRootVAST:a=!1}){let o=[];try{o=this.parseVastXml(e,{isRootVAST:a})}catch(c){return Promise.reject(c)}const l=o.length,u=o[l-1];return l===1&&r!==void 0&&r!==null&&u&&!u.sequence&&(u.sequence=r),n===!1&&(this.remainingAds=Vt.splitVAST(o),o=this.remainingAds.shift()),this.resolveAds(o,{wrapperDepth:s,originalUrl:i})}resolveAds(e=[],{wrapperDepth:n,originalUrl:r}){const i=[];return e.forEach(s=>{const a=this.resolveWrappers(s,n,r);i.push(a)}),Promise.all(i).then(s=>{const a=OP.flatten(s);if(!a&&this.remainingAds.length>0){const o=this.remainingAds.shift();return this.resolveAds(o,{wrapperDepth:n,originalUrl:r})}return a})}resolveWrappers(e,n,r){return new Promise(i=>{if(n++,!e.nextWrapperURL)return delete e.nextWrapperURL,i(e);if(n>=this.maxWrapperDepth||this.parentURLs.indexOf(e.nextWrapperURL)!==-1)return e.errorCode=302,delete e.nextWrapperURL,i(e);e.nextWrapperURL=Vt.resolveVastAdTagURI(e.nextWrapperURL,r);const s=e.sequence;r=e.nextWrapperURL,this.fetchVAST(e.nextWrapperURL,n,r).then(a=>this.parse(a,{originalUrl:r,wrapperSequence:s,wrapperDepth:n}).then(o=>{if(delete e.nextWrapperURL,o.length===0)return e.creatives=[],i(e);o.forEach(l=>{l&&Vt.mergeWrapperAdData(l,e)}),i(o)})).catch(a=>{e.errorCode=301,e.errorMessage=a.message,i(e)})})}completeWrapperResolving(e){if(e.ads.length===0)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(let n=e.ads.length-1;n>=0;n--){const r=e.ads[n];(r.errorCode||r.creatives.length===0)&&(this.trackVastError(r.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:r.errorCode||303},{ERRORMESSAGE:r.errorMessage||""},{extensions:r.extensions},{system:r.system}),e.ads.splice(n,1))}}}let Np=null;const Zqe={data:{},length:0,getItem(t){return this.data[t]},setItem(t,e){this.data[t]=e,this.length=Object.keys(this.data).length},removeItem(t){delete this.data[t],this.length=Object.keys(this.data).length},clear(){this.data={},this.length=0}};class Qqe{constructor(){this.storage=this.initStorage()}initStorage(){if(Np)return Np;try{Np=typeof window<"u"&&window!==null?window.localStorage||window.sessionStorage:null}catch{Np=null}return(!Np||this.isStorageDisabled(Np))&&(Np=Zqe,Np.clear()),Np}isStorageDisabled(e){const n="__VASTStorage__";try{if(e.setItem(n,n),e.getItem(n)!==n)return e.removeItem(n),!0}catch{return!0}return e.removeItem(n),!1}getItem(e){return this.storage.getItem(e)}setItem(e,n){return this.storage.setItem(e,n)}removeItem(e){return this.storage.removeItem(e)}clear(){return this.storage.clear()}}class Xqe{constructor(e,n,r){this.cappingFreeLunch=e||0,this.cappingMinimumTimeInterval=n||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new Yqe,this.storage=r||new Qqe,this.lastSuccessfulAd===void 0&&(this.lastSuccessfulAd=0),this.totalCalls===void 0&&(this.totalCalls=0),this.totalCallsTimeout===void 0&&(this.totalCallsTimeout=0)}getParser(){return this.vastParser}get lastSuccessfulAd(){return this.storage.getItem("vast-client-last-successful-ad")}set lastSuccessfulAd(e){this.storage.setItem("vast-client-last-successful-ad",e)}get totalCalls(){return this.storage.getItem("vast-client-total-calls")}set totalCalls(e){this.storage.setItem("vast-client-total-calls",e)}get totalCallsTimeout(){return this.storage.getItem("vast-client-total-calls-timeout")}set totalCallsTimeout(e){this.storage.setItem("vast-client-total-calls-timeout",e)}hasRemainingAds(){return this.vastParser.remainingAds.length>0}getNextAds(e){return this.vastParser.getRemainingAds(e)}get(e,n={}){const r=Date.now();return n=Object.assign({},this.defaultOptions,n),n.hasOwnProperty("resolveAll")||(n.resolveAll=!1),this.totalCallsTimeout<r?(this.totalCalls=1,this.totalCallsTimeout=r+60*60*1e3):this.totalCalls++,new Promise((i,s)=>{if(this.cappingFreeLunch>=this.totalCalls)return s(new Error(`VAST call canceled – FreeLunch capping not reached yet ${this.totalCalls}/${this.cappingFreeLunch}`));const a=r-this.lastSuccessfulAd;if(a<0)this.lastSuccessfulAd=0;else if(a<this.cappingMinimumTimeInterval)return s(new Error(`VAST call canceled – (${this.cappingMinimumTimeInterval})ms minimum interval reached`));this.vastParser.getAndParseVAST(e,n).then(o=>i(o)).catch(o=>s(o))})}}
171class sw extends Error{constructor(e){super("User is not logged in. "+e)}}class RP extends Error{constructor(e,n){super(e),this.audacyErrorJson=n}getAudacyError(){return this.audacyErrorJson}}const il={};class ace{constructor(){et(this,"analyticServices");et(this,"audioServices");et(this,"chatServices");et(this,"dataServices");et(this,"personalizationServices")}async postServiceInit(e){this.audioServices=e.audioServices,this.analyticServices=e.analyticServices,this.chatServices=e.chatServices,this.dataServices=e.dataServices,this.personalizationServices=e.personalizationServices}}function Jqe(){var t,e;return!!((t=navigator==null?void 0:navigator.userAgent)!=null&&t.match(/iPhone/i)||(e=navigator==null?void 0:navigator.userAgent)!=null&&e.match(/iPod/i))}function aw(){let t=Date.now();const e=function(n){const r=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n==="x"?r:r&3|8).toString(16)};return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e)}function ug(t){const e=(g,v)=>g>>>v|g<<32-v,n=Math.pow,r=n(2,32),i="length";let s,a,o="";const l=[],u=t[i]*8;let c=ug.h=ug.h||[];const d=ug.k=ug.k||[];let f=d[i];const h={};for(let g=2;f<64;g++)if(!h[g]){for(s=0;s<313;s+=g)h[s]=g;c[f]=n(g,.5)*r|0,d[f++]=n(g,1/3)*r|0}for(t+="€";t[i]%64-56;)t+="\0";for(s=0;s<t[i];s++){if(a=t.charCodeAt(s),a>>8)return"";l[s>>2]|=a<<(3-s)%4*8}for(l[l[i]]=u/r|0,l[l[i]]=u,a=0;a<l[i];){const g=l.slice(a,a+=16),v=c;for(c=c.slice(0,8),s=0;s<64;s++){const b=g[s-15],S=g[s-2],A=c[0],w=c[4],x=c[7]+(e(w,6)^e(w,11)^e(w,25))+(w&c[5]^~w&c[6])+d[s]+(g[s]=s<16?g[s]:g[s-16]+(e(b,7)^e(b,18)^b>>>3)+g[s-7]+(e(S,17)^e(S,19)^S>>>10)|0),P=(e(A,2)^e(A,13)^e(A,22))+(A&c[1]^A&c[2]^c[1]&c[2]);c=[x+P|0].concat(c),c[4]=c[4]+x|0}for(s=0;s<8;s++)c[s]=c[s]+v[s]|0}for(s=0;s<8;s++)for(a=3;a+1;a--){const g=c[s]>>a*8&255;o+=(g<16?0:"")+g.toString(16)}return o}const eKe=t=>/^\d{5}(-\d{4})?$/.test(t),tKe=(t,e)=>JSON.parse(JSON.stringify(e).replace(t,'""'));async function cS(t,e={}){const{timeout:n=3e4}=e;let r;typeof AbortController<"u"&&(r=new AbortController);const i=setTimeout(()=>r==null?void 0:r.abort(new RP(eBe)),n),s=await fetch(t,{...e,signal:r==null?void 0:r.signal});return clearTimeout(i),s}class b2{constructor(e){this.dataObjectType=e}getObjectType(){return this.dataObjectType}}class Mo extends b2{constructor(e,n){super(e),this.data=n}static cleanJsonObject(e){switch(e.entityType){case gt.EPISODE:delete e.image,delete e.imageAlt,delete e.streamUrls;break;case gt.SHOW:delete e.bband,delete e.image,delete e.imageAlt;break;case gt.STATION:delete e.image,delete e.imageAlt,delete e.streamUrls;break;case gt.STANDALONE_CHAPTER:delete e.image,delete e.imageAlt,delete e.streamUrls;break}}getEntitySubtype(){return this.data.entitySubtype}getEntityType(){return this.data.entityType}getId(){return this.data.id}getJson(){return this.data}getUrl(){return this.data.url}getDescription(){return this.data.description||this.description}getResumePoint(){return this.resumePoint}getTitle(){return this.data.title||this.name||this.title}isFavorite(){return this.isFav}isFollowable(){return this.data.followable}markAsFavorite(e){this.isFav=e}setEntitySubtype(e){this.entitySubtype=e}setResume(e){this.resumePoint=e}getGenres(){return this.data.genres}getMarketTitle(){return this.data.marketTitle}getImages(){return this.data.images}getPublisher(){return this.data.publisher}}class S2 extends Mo{constructor(e){super(ks.STATION_SUMMARY,e)}getGenres(){return this.data.genres}getIsFav(){return this.data.isFav}getMarketTitle(){return this.data.marketTitle}getTitle(){return this.data.title}}const nKe=il;class au extends Mo{constructor(e){super(ks.EPISODE,e),e.entitySubtype===Vn.BROADCAST_SHOW_EPISODE&&(e.startDateTimeSeconds===void 0&&(e.startDateTimeSeconds=new Date(e.startDateTime).getTime()/1e3),e.endDateTimeSeconds===void 0&&(e.endDateTime===void 0?(e.endDateTimeSeconds=e.startDateTimeSeconds+e.durationSeconds,e.endDateTime=new Date(e.endDateTimeSeconds*1e3).toISOString()):e.endDateTimeSeconds=new Date(e.endDateTime).getTime()/1e3)),Mo.cleanJsonObject(this.data)}getAudioStream(){return this.data.streamUrl&&(this.data.streamUrl.default||this.data.streamUrl.m3u8)}
171async getChapters(e={}){const n=this.getId(),r=this.getStartTimeSeconds(),i=this.isRewindable(),{playback:s=0,broadcastChapters:a}=e;if(!i||!n)return Promise.resolve([]);let o=ys.get(n)||[],l=ys.get(`${n}-quickPause`);if(l)return ys.delete(`${n}-quickPause`),l;const u=this.getEndTimeMillis()<Date.now();return FBe(s,o,r,u)&&o.length>0?o:(o=await nKe.dataServices.getChapters(n,a),ys.set(n,o),ys.clean(),o||[])}getChatChannel(){var e;return(e=this.data.chatChannels)==null?void 0:e.public}getDescription(){return this.data.description}getDuration(){var e;return((e=this==null?void 0:this.data)==null?void 0:e.durationSeconds)||0}getEndTime(){return this.data.endDateTime}getEndTimeMillis(){return this.data.endDateTimeSeconds*1e3}getEndTimeSeconds(){return this.data.endDateTimeSeconds}getImageAlt(){return this.data.images&&this.data.images.alt}getImageSquare(){return this.data.images&&this.data.images.square}getIsOnAirOnly(){return this.data.isOnAirOnly}getMetaDescription(){return this.data.metaDescription}getMetaTitle(){return this.data.metaTitle}getParentId(){return this.data.showContentId}getParentImageAlt(){return this.data.parentImage&&this.data.parentImage.alt}getParentImageSquare(){return this.data.parentImage&&this.data.parentImage.square}getParentStationIds(){return this.data.parentStationIds}getParentShow(){return this.data.parentShow}getParentShowId(){var e,n;return(n=(e=this.data)==null?void 0:e.parentShow)==null?void 0:n.id}getParentStation(){return this.data.parentStation&&new S2(this.data.parentStation)}getParentTitle(){return this.data.parentTitle}getPublishDate(){return this.data.publishDate}getPublishDateMillis(){return this.data.publishDateSeconds*1e3}getQuestionsChannel(){var e;return(e=this.data.chatChannels)==null?void 0:e.questions}getReplayableUntil(){return this.data.replayableUntilDateTime}getReplayableUntilMillis(){return this.data.replayableUntilDateTimeSeconds*1e3}getStartTime(){return this.data.startDateTime}getStartTimeMillis(){return this.data.startDateTimeSeconds*1e3}getStartTimeSeconds(){return this.data.startDateTimeSeconds}getTranscript(){return this.data.transcript}isRewindable(){return au.isRewindable(this.data)}isLiveOnAir(){const e=new Date().getTime();return this.getEndTimeMillis()>e}static isRewindable(e){if(!e.replayableUntilDateTimeSeconds&&!e.startDateTimeSeconds)return!0;const n=e.replayableUntilDateTimeSeconds*1e3,r=e.startDateTimeSeconds*1e3,i=Date.now();return n>r&&i>r&&i<n}}const rKe=il;class E1 extends Mo{constructor(e){super(ks.SHOW,e),Mo.cleanJsonObject(this.data)}getAuthor(){return this.data.author}getDescription(){return this.data.description}getEpisodeList(e,n){return rKe.dataServices.getEpisodes(this.getId(),0,e,n)}getImageAlt(){return this.data.images&&this.data.images.alt}getImageSquare(){return this.data.images&&this.data.images.square}getMetaDescription(){return this.data.metaDescription}getMetaTitle(){return this.data.metaTitle}getParentStation(){return this.data.parentStation&&new S2(this.data.parentStation)}getPodcastType(){return this.data.podcastType}getSubtitle(){return this.data.subtitle}getAllowShowImageOverride(){return this.data.allowShowImageOverride}isFollowable(){return this.data.followable}}const iKe=il;class Ec extends Mo{constructor(e){super(ks.STATION,e),Mo.cleanJsonObject(this.data)}getAacStream(){return this.data.streamUrl&&this.data.streamUrl.aac}getAmperWaveId(){return this.data.amperwaveStationId}getCallsign(){return this.data.callsign}getCategory(){return this.data.category}getColors(){return this.data.colors}getCoreId(){return this.data.identifiers&&this.data.identifiers.coreId}getDescription(){return this.data.description}getGenres(){return this.data.genres}getHlsStream(){return this.data.streamUrl&&this.data.streamUrl.m3u8}getImageAlt(){return this.data.images&&this.data.images.alt}getImageSquare(){return this.data.images&&this.data.images.square}getMetaDescription(){return this.data.metaDescription}getMetaTitle(){return this.data.metaTitle}getMp3Stream(){return this.data.streamUrl&&this.data.streamUrl.mp3}getPhoneNumber(){return this.data.phoneNumber}async getSchedules(){const e=this.getId();if(!(this.getEntitySubtype()===Fr.BROADCAST))return new Promise(s=>s());const i=await iKe.dataServices.getSchedules(e);return i||null}getSiteSlug(){return this.data.siteSlug}getStreamProvider(){return this.data.streamProviderName}getTritonName(){return this.data.identifiers&&this.data.identifiers.tritonName}isFollowable(){return this.data.followable}isRewindable(){return this.data.rewindable}getIsTTREnabled(){return this.data.identifiers&&this.data.identifiers.isTtrEnabled}getDefaultUtterancePhrase(){return this.data.defaultUtterancePhrase}getSocialMediaLinks(){return this.data.socialMediaLinks}}class iL extends Mo{constructor(e){super(ks.SONG,e)}getArtist(){return this.data.artist}getTimePlayed(){return this.data.timePlayed}}class T1 extends Mo{constructor(e){super(ks.TAG,e)}
171}class gg extends Mo{constructor(e){super(ks.STANDALONE_CHAPTER,e),Mo.cleanJsonObject(this.data)}getAudioStream(){var e;return(e=this.data.streamUrl)==null?void 0:e.m3u8}getDuration(){return this.data.durationSeconds||0}getEndTime(){return this.data.endDateTime}getEndTimeMillis(){return this.data.endDateTimeSeconds*1e3}getEndTimeSeconds(){return this.data.endDateTimeSeconds}getImageSquare(){return this.getParentImageSquare()}getParentEpisode(){return this.data.parentEpisode}getTranscript(){return this.data.transcript}getParentEpisodeId(){var e,n;return((n=(e=this.data)==null?void 0:e.parentEpisode)==null?void 0:n.id)??""}getParentEpisodeUrl(){var e,n;return((n=(e=this.data)==null?void 0:e.parentEpisode)==null?void 0:n.url)??""}getParentImageAlt(){return this.data.parentImage.alt}getParentImageSquare(){return this.data.parentImage.square}getParentShow(){return this.data.parentShow}getParentShowId(){return this.data.parentShow.id}getParentShowUrl(){return this.data.parentShow.url}getParentStation(){return this.data.parentStation}getParentStationId(){return this.data.parentStation.id}getParentTitle(){return this.data.parentTitle}getPublishDate(){return this.data.publishDate}getPublishDateSeconds(){return this.data.publishDateSeconds}getReplayableUntil(){return this.data.replayableUntilDateTime}getReplayableUntilDateTimeSeconds(){return this.data.replayableUntilDateTimeSeconds}getStartTime(){return this.data.startDateTime}getStartTimeMillis(){return this.data.startDateTimeSeconds*1e3}getStartTimeSeconds(){return this.data.startDateTimeSeconds}getStartOffset(){return this.data.startOffset}getStreamUrl(){var e;return(e=this.data.streamUrl)==null?void 0:e.m3u8}isRewindable(){return!0}}class oce extends b2{constructor(e,n,r,i,s){if(super(i),this.version=e,this.dataService=r,this.queryFunction=s,this.data=[],this.pageMap=[],this.total=0,n&&n.code>=400&&(n=void 0),n){this.pageSize=n.pageSize,this.total=n.total;const a=n.page,o=n.results,l=a*this.pageSize;this.pageMap[a]=!0;for(let u=0;u<o.length;
171u++)this.data[l+u]=o[u]}}createObject(e){let n;return e&&(e.entityType==="SHOW"?n=new E1(e):e.entityType==="STATION"?n=new Ec(e):e.entityType==="EPISODE"?n=new au(e):e.entityType==="SONG"?n=new iL(e):e.entityType==="TAG"?n=new T1(e):e.entityType==="CHAPTER"&&(n=new gg(e))),n}getAllObjects(){const e=[],n=this.data.length;for(let r=0;r<n;r++)if(this.data[r]!==void 0){const i=this.getObjectSync(r);i&&e.push(i)}return e}getNum(){return this.total}getNumInCore(){let e=0;for(let n=0;n<this.data.length;n++)this.data[n]!==void 0&&e++;return e}getObject(e){const n=(r,i)=>{const s=this.data[e];if(s===void 0){const a=e/this.pageSize|0;this.queryFunction===void 0?i():this.queryFunction(a).then(o=>{this.patchDataSet(o),this.data[e]?r(this.createObject(this.data[e])):i()})}else r(this.createObject(s))};return new Promise(n)}getObjectSync(e){return this.createObject(this.data[e])}patchDataSet(e){if(e){const n=e.pageMap.indexOf(!0),r=e.data,i=n*this.pageSize;this.total=e.total,this.pageMap[n]=!0;for(let s=i;s<r.length;s++)this.data[s]=r[s]}}
171prefetch(e,n){const r=[],i=[];for(let s=e;s<=n;s++){const a=s/this.pageSize|0;r.indexOf(a)===-1&&this.pageMap[a]!==!0&&(r.push(a),i.push(this.queryFunction(a)))}return Promise.all(i).then(s=>{for(let a=0;a<s.length;a++)this.patchDataSet(s[a])})}}const RY=il;class sKe extends oce{constructor(e,n,r,i,s=void 0){super(e,n,r,ks.ATL_HOST_LIST,s),this.searchStr=i}getId(e){var n;return(n=this.data[e])==null?void 0:n.id}getImageAlt(e){var n;return(n=this.data[e])==null?void 0:n.image.alt}getImageSquare(e){var n;return(n=this.data[e])==null?void 0:n.image.square}getFirstName(e){var n;return(n=this.data[e])==null?void 0:n.firstName}getLastName(e){var n;return(n=this.data[e])==null?void 0:n.lastName}getObject(e){return RY.error("Needs to be implemented once person object defined"),Promise.resolve()}getObjectSync(e){RY.error("Needs to be implemented once person object defined")}}class T7 extends b2{constructor({duration:e=0,startOffset:n,title:r,transcript:i}){super(ks.CHAPTER),this.data={duration:e,startOffset:n,title:r,transcript:i}}getDuration(){var e;return((e=this==null?void 0:this.data)==null?void 0:e.duration)||0}getStartOffset(){return this.data.startOffset}getTitle(){return this.data.title}getTranscript(){return this.data.transcript}}class aKe extends Mo{constructor(e){super(ks.CLIP,e),this.data=e}getDuration(){var e;return((e=this==null?void 0:this.data)==null?void 0:e.duration)||0}getAudioStream(){let e;return this.data.streamUrls&&(this.data.streamUrls.m3u8?e=this.data.streamUrls.m3u8:this.data.streamUrls.aac?e=this.data.streamUrls.aac:this.data.streamUrls.mp3&&(e=this.data.streamUrls.mp3)),e}getImageAlt(){return this.data.images&&this.data.images.alt}getImageSquare(){return this.data.images&&this.data.images.square}}class CU extends Mo{constructor(e){super(ks.COLLECTION,e)}getAuthor(){return this.data.author}getDuration(){var e;return((e=this==null?void 0:this.data)==null?void 0:e.durationSeconds)||0}getImageMetadata(){return this.data.imageMetadata}getImageAlt(){return this.data.images&&this.data.images.alt}getImageHero(){return this.data.images&&this.data.images.hero}getImageHeroAttribution(){return this.data.images&&this.data.images.heroAttribution}getImageSquare(){return this.data.images&&this.data.images.square}getImageSquareAttribution(){return this.data.images&&this.data.images.squareAttribution}getItems(){return this.data.itemsIdList}getUpdatedTime(){return this.data.contentUpdated}
171getUpdatedDate(){return this.data.updateDate}getItemsIdList(){return this.data.itemsList}}class LY extends oce{constructor(e,n,r,i=void 0,s=!1){if(super(e,n,r,ks.EPISODE_LIST,i),s===!0){const a=(o,l,u)=>({durationSeconds:l-o,endDateTime:new Date(l*1e3).toISOString(),endDateTimeSeconds:l,entitySubtype:"BROADCAST_SHOW_EPISODE",entityType:"EPISODE",id:"",isOnAirOnly:!1,parentImage:{},parentStationIds:[u],parentTitle:"Not Available",publishDate:"",publishDateSeconds:null,replayableUntilDateTime:new Date(o*1e3).toISOString(),replayableUntilDateTimeSeconds:o,showContentId:"",startDateTime:new Date(o*1e3).toISOString(),startDateTimeSeconds:o,title:""});if(this.data.length===0){const o=new Date;o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0);const l=new Date(o.getTime()+2*60*60*1e3);this.data.push(a(o.getTime()/1e3,l.getTime()/1e3,n.id))}this.onAirOnly=[],this.dupes=0,this.holes=0,this.overlaps=0;for(let o=this.data.length-1;o>=0;o--)this.data[o].isOnAirOnly===!0&&this.onAirOnly.push(this.data.splice(o,1)[0]);for(let o=0;o<this.data.length;o++)this.getEndTime(o)%60===59&&(this.data[o].durationSeconds+=1,this.data[o].endDateTimeSeconds+=1,this.data[o].endDateTime=new Date(this.data[o].endDateTimeSeconds*1e3).toISOString());for(let o=0;o<this.onAirOnly.length;o++)this.onAirOnly[o].endDateTimeSeconds%60===59&&(this.onAirOnly[o].durationSeconds+=1,this.onAirOnly[o].endDateTimeSeconds+=1,this.onAirOnly[o].endDateTime=new Date(this.onAirOnly[o].endDateTimeSeconds*1e3).toISOString());for(let o=this.data.length-2;o>=0;o--){const l=this.data[o].startDateTimeSeconds,u=this.data[o].endDateTimeSeconds,c=this.data[o+1].startDateTimeSeconds,d=this.data[o+1].endDateTimeSeconds;l===c&&u===d&&(this.dupes++,this.data[o].dupId=this.data[o+1].id,this.data.splice(o+1,1))}for(let o=this.data.length-2;o>=0;o--){const l=this.getStartTime(o),u=this.getEndTime(o+1);l!==u&&(l>u?(this.holes++,this.data.splice(o+1,0,a(u,l,n.id))):this.overlaps++)}for(let o=0;o<this.data.length-1;o++)this.getStartTime(o),this.getEndTime(o+1);for(;this.onAirOnly.length>0;)this.insert(this.onAirOnly.shift())}}getEndTime(e){return this.data[e].endDateTimeSeconds}getEpisode(e){let n;if(this.data.length>0){const r=s=>s,i=e/1e3;for(let s=0;s<this.data.length;s++)if(this.data[s].startDateTimeSeconds<=i&&i<this.data[s].endDateTimeSeconds){if(this.data[s].isOnAirOnly===!0&&Date.now()/1e3>this.data[s].endDateTimeSeconds){const a=this.data[s+1],o=this.data[s-1];a.startDateTimeSeconds<=i&&i<a.endDateTimeSeconds?n=this.getObject(s+1).then(r):o.startDateTimeSeconds<=i&&i<o.endDateTimeSeconds?n=this.getObject(s-1).then(r):n=this.getObject(s).then(r)}else n=this.getObject(s).then(r);break}}return n||this.getObject(this.data.length-1)}getReplayableUntil(e){return this.data[e].replayableUntilDateTimeSeconds}getReplayableUntilMillis(e){return this.data[e].replayableUntilDateTimeSeconds*1e3}getStartTime(e){return this.data[e].startDateTimeSeconds}getTitle(e){return this.data[e].title}insert(e){for(let n=0;n<this.data.length;n++)if(e.startDateTimeSeconds>=this.data[n].startDateTimeSeconds){this.data.splice(n,0,e);break}}}function oKe(){return{viewMap:{COLLECTION:{default:{viewId:"playlist",entityType:"COLLECTION",entitySubtype:"default",viewType:"COLLECTION",url:"/playlist/{{contentObj.siteSlug}}"},PLAYLIST:{viewId:"playlist",entityType:"COLLECTION",entitySubtype:"PLAYLIST",viewType:"COLLECTION",url:"/playlist/{{contentObj.siteSlug}}"}},STATION:{default:{viewId:"testTemplate",entityType:"STATION",entitySubtype:"default",viewType:"STATION",url:"/stations/testTemplate/{{contentObj.siteSlug}}"},BROADCAST_RADIO:{viewId:"stations",entityType:"STATION",entitySubtype:"BROADCAST_RADIO",viewType:"STATION",url:"/stations/{{contentObj.siteSlug}}"},EXCLUSIVE_STATION:{viewId:"stations",entityType:"STATION",entitySubtype:"EXCLUSIVE_STATION",viewType:"STATION",url:"/stations/{{contentObj.siteSlug}}"},INTERNET_RADIO:{viewId:"stations",entityType:"STATION",entitySubtype:"INTERNET_RADIO",viewType:"STATION",url:"/stations/{{contentObj.siteSlug}}"}},CHAPTER:{default:{viewId:"chapters",entityType:"CHAPTER",entitySubtype:"default",viewType:"CHAPTER",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.parentShow.siteSlug}}/episodes/{{contentObj.parentEpisode.siteSlug}}
171/chapters/{{contentObj.siteSlug}}"},BROADCAST_EPISODE_CHAPTER:{viewId:"chapters",entityType:"CHAPTER",entitySubtype:"BROADCAST_EPISODE_CHAPTER",viewType:"CHAPTER",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.parentShow.siteSlug}}/episodes/{{contentObj.parentEpisode.siteSlug}}/chapters/{{contentObj.siteSlug}}"}},EPISODE:{BROADCAST_SHOW_EPISODE:{viewId:"episodes",entityType:"EPISODE",entitySubtype:"BROADCAST_SHOW_EPISODE",viewType:"EPISODE",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.parentShow.siteSlug}}/episodes/{{contentObj.siteSlug}}"},PODCAST_EPISODE:{viewId:"episodes",entityType:"EPISODE",entitySubtype:"PODCAST_EPISODE",viewType:"EPISODE",url:"/podcast/{{contentObj.parentShow.siteSlug}}/episodes/{{contentObj.siteSlug}}"},default:{viewId:"episodes",entityType:"EPISODE",entitySubtype:"default",viewType:"EPISODE",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.parentShow.siteSlug}}/episodes/{{contentObj.siteSlug}}"},HOST_CREATED_EPISODE:{viewId:"episodes",entityType:"EPISODE",entitySubtype:"HOST_CREATED_EPISODE",viewType:"EPISODE",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.parentShow.siteSlug}}/episodes/{{contentObj.siteSlug}}"}},SHOW:{default:{viewId:"shows",entityType:"SHOW",entitySubtype:"default",viewType:"SHOW",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.siteSlug}}"},DIGITAL_ONLY:{viewId:"shows",entityType:"SHOW",entitySubtype:"DIGITAL_ONLY",viewType:"SHOW",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.siteSlug}}"},BROADCAST_SHOW:{viewId:"shows",entityType:"SHOW",entitySubtype:"BROADCAST_SHOW",viewType:"SHOW",url:"/stations/{{contentObj.parentStation.siteSlug}}/shows/{{contentObj.siteSlug}}"},PODCAST:{viewId:"podcasts",entityType:"SHOW",entitySubtype:"PODCAST",viewType:"SHOW",url:"/podcast/{{contentObj.siteSlug}}"}},TAG:{default:{viewId:"music",entityType:"TAG",entitySubtype:"default",viewType:"TAG",url:"/music/{{contentObj.siteSlug}}"},League:{viewId:"sportsleagues",entityType:"TAG",entitySubtype:"League",viewType:"TAG",url:"/sports/{{contentObj.siteSlug}}"},Category:{viewId:"stations_category",entityType:"TAG",entitySubtype:"Category",viewType:"TAG",url:"/stations/category/{{contentObj.siteSlug}}"},Team:{viewId:"sportsteams",entityType:"TAG",entitySubtype:"Team",viewType:"TAG",url:"/sports/{{contentObj.parentTag.siteSlug}}/{{contentObj.siteSlug}}"},Genre:{viewId:"music",entityType:"TAG",entitySubtype:"Genre",viewType:"TAG",url:"/music/{{contentObj.siteSlug}}"}},TOPIC:{MUSIC:{viewId:"music",entityType:"TOPIC",entitySubtype:"MUSIC",viewType:"TOPIC",url:"/music/{{contentObj.siteSlug}}"},SPORTS:{viewId:"sports",entityType:"TOPIC",entitySubtype:"SPORTS",viewType:"TOPIC",url:"/sports/{{contentObj.siteSlug}}"},NEWS:{viewId:"news",entityType:"TOPIC",entitySubtype:"NEWS",viewType:"TOPIC",url:"/news/{{contentObj.siteSlug}}"},CITIES:{viewId:"cities",entityType:"TOPIC",entitySubtype:"CITIES",viewType:"TOPIC",url:"/cities/{{contentObj.siteSlug}}"},PODCASTS:{viewId:"podcast_genre",entityType:"TOPIC",entitySubtype:"PODCASTS",viewType:"TOPIC",url:"/podcast/genre/{{contentObj.siteSlug}}"},NFLTEAM:{viewId:"sports_nfl",entityType:"TOPIC",entitySubtype:"NFLTEAM",viewType:"TOPIC",url:"/sports/nfl-72392/{{contentObj.siteSlug}}"}},GEOGRAPHY:{MARKET:{viewId:"locations",entityType:"GEOGRAPHY",entitySubtype:"MARKET",viewType:"MODULES",url:"https://webclient-stg.audacy.com/stations/location/{{contentObj.siteSlug}}"}}},tabs:[{iconRef:"Logo",label:"Home",viewId:"home",viewType:"MODULES"},{iconRef:"Search",label:"Search",viewId:"search",viewType:"SEARCH"},{iconRef:"Profile",label:"My Audio",viewId:"myAudio",viewType:"MY_AUDIO"}],global:{legalTermsOfUse:"legalTermsOfUse",registrationEmailPassword:"registrationEmailPassword",myAudioQueue:"myAudioQueue",profileSecurity:"profileSecurity",registrationName:"registrationName",ForYouTabs:"home|sports|podcast|music",profileOpenSource:"profileOpenSource",developerScreen:"developerScreen",profileContactSupport:"profileContactSupport",login:"login",carPlayLoggedOut:"carPlayLoggedOut",registrationFacebookEmailError:"registrationFacebookEmailError",selectAuthMethod:"selectAuthMethod",search:"search",accountReactivateRequest:"accountReactivateRequest",registrationAdditionalDetails:"registrationAdditionalDetails",resetPasswordCreateNewPassword:"resetPasswordCreateNewPassword",profileOverview:"profileOverview",resetPasswordEnterEmail:"resetPasswordEnterEmail",player:"player",profilePassword:"profilePassword",resetPasswordCheckEmail:"resetPasswordCheckEmail",onboardingStations:"onboardingStations",profileAccount:"profileAccount",myAudioStations:"myAudioStations",schedule:"schedule",legalPrivacyPolicy:"legalPrivacyPolicy",profileLocation:"profileLocation",carPlayRecentsList:"carPlayRecentsList",landing:"landing",deleteConfirmation:"deleteConfirmation",migration:"migration",profileDelete:"profileDelete",contactAudacy:"contact",profileNotification:"profileNotification",registrationCreatePassword:"registrationCreatePassword",allEpisodes:"episodes",myAudioTopics:"myAudioTopics",myAudioPodcastsAndShows:"myAudioPodcastsAndShows",myAudioRecent:"myAudioRecent",queue:"queueOverlay",privacyLegal:"privacyLegal"}}}class LP extends Mo{constructor(e){super(ks.TOPIC,e)}}class lKe{constructor(e,n,r,i){if(this.version=e,this.dataService=r,this.searchStr=i,this.data=[],this.pageMap=[],n&&n.code>=400&&(n=void 0),n){this.pageSize=20,this.total=n.total;const s=n.page,a=n.results,o=s*this.pageSize;this.pageMap[s]=!0;for(let l=0;l<a.length;l++)this.data[o+l]=a[l]}}createObject(e){let n;return e&&(e.entityType==="SHOW"?n=new E1(e):e.entityType==="STATION"?n=new Ec(e):e.entityType==="EPISODE"?n=new au(e):e.entityType==="SONG"?n=new iL(e):e.entityType==="TAG"?n=new T1(e):e.entityType==="COLLECTION"?n=new CU(e):e.entityType==="TOPIC"&&(n=new LP(e))),n}getNum(){return this.total}getNumInCore(){let e=0;for(let n=0;n<this.data.length;n++)this.data[n]!==void 0&&e++;return e}getObject(e){const n=r=>{const i=this.data[e];if(i===void 0){const s=e/this.pageSize|0;this.dataService.search(this.searchStr,void 0,void 0,s).then(a=>{this.patchDataSet(a),r(this.createObject(this.data[e]))})}else r(this.createObject(i))};return new Promise(n)}getObjectSync(e){return this.createObject(this.data[e])}patchDataSet(e){if(e){const n=e.pageMap.indexOf(!0),r=e.data,i=n*this.pageSize;this.total=e.total,this.pageMap[n]=!0;for(let s=i;s<r.length;s++)this.data[s]=r[s]}}
171prefetch(e,n){const r=[],i=[];for(let s=e;s<=n;s++){const a=s/this.pageSize|0;r.indexOf(a)===-1&&this.pageMap[a]!==!0&&(r.push(a),i.push(this.dataService.search(this.searchStr,void 0,void 0,a)))}return Promise.all(i).then(s=>{for(let a=0;a<s.length;a++)this.patchDataSet(s[a])})}}const uKe=il;let lce=class extends b2{constructor(e,n,r,i){super(i),this.version=e,this.data=n||[],this.dataService=r}getAllObjects(){const e=[];for(let n=0;n<this.data.length;n++){const r=this.getObject(n);r&&e.push(r)}return e}getObject(e){let n;switch(this.getObjectType()){case ks.EPISODE_LIST:n=this.data[e]?new au(this.data[e]):void 0;break;case ks.SEARCH_RESULT_LIST:this.data[e].entityType==="SHOW"?n=new E1(this.data[e]):this.data[e].entityType==="STATION"?n=new Ec(this.data[e]):this.data[e].entityType==="EPISODE"?n=new au(this.data[e]):this.data[e].entityType==="SONG"?n=new iL(this.data[e]):this.data[e].entityType==="TAG"&&(n=new T1(this.data[e]));break;case ks.SHOW_LIST:n=new E1(this.data[e]);break;case ks.SONG_LIST:n=new iL(this.data[e]);break;case ks.STATION_LIST:n=new Ec(this.data[e]);break;case ks.TAG:n=new T1(this.data[e]);break;case ks.STANDALONE_CHAPTER:n=new gg(this.data[e]);default:uKe.error("Unknown data object type = "+this.getObjectType());break}return n}getName(e){let n;switch(this.version){case"v1":n=this.data[e].attributes.title;break;case"v2":n=this.data[e].title;break;case"v3":n=this.data[e].title;break}return n}getNum(){return this.data.length}};class DY extends lce{constructor(e,n,r,i=void 0,s=void 0){super(e,n,r,ks.SEGMENT_LIST);let a=0;for(let l=0;l<n.length;l++)if(this.data[l].attributes.segment_type==="content"){let u=this.data[l].attributes.duration;u===null&&(u=(i.getEndTimeMillis()-this.getSegmentStartTime(l))/1e3,this.data[l].attributes.duration=u),a+=this.data[l].attributes.duration}let o=0;for(let l=0;l<n.length;l++)this.data[l].attributes.segment_type==="content"?(this.data[l].fract=o,this.data[l].fractLength=this.data[l].attributes.duration/a,o+=this.data[l].fractLength,this.data[l].attributes.station_id="101-"+this.data[l].attributes.station_id):(this.data[l].fract=o,this.data[l].fractLength=0,this.data[l].attributes.station_id="101-"+this.data[l].attributes.station_id);this.episode=i,this.station=s,this.duration=a}getAd(e){return this.data[e].aasAd}getAudioUrl(e){var n,r,i,s;return((r=(n=this.data[e])==null?void 0:n.aasAd)==null?void 0:r.getStream())||((s=(i=this.data[e])==null?void 0:i.attributes)==null?void 0:s.stream_url)}getContentDuration(){return this.duration}getAdFracts(){const e=[];for(let n=0;n<this.data.length;n++)this.data[n].attributes.segment_type==="ad"&&e.push(this.data[n].fract);return e}getDuration(e){var n,r;return((r=(n=this.data[e])==null?void 0:n.attributes)==null?void 0:r.duration)||0}getEndTime(e){return new Date(this.data[e].attributes.end_time).getTime()}getEpisode(){return this.episode}getFract(e){return this.data[e].fract}getFractForTime(e){const n=this.getSegmentIndexByTime(e),r=(e-this.getStartTime(n))/1e3/this.getDuration(n);return this.getFract(n)+r*this.getFractLength(n)}getFractLength(e){return this.data[e].fractLength}insert(e,n){this.data.splice(e,0,n)}getLiveSegment(){return this.data[this.getLiveSegmentIndex()]}getLiveSegmentIndex(){var n,r;return((r=(n=this.data[this.data.length-1])==null?void 0:n.attributes)==null?void 0:r.end_time)?void 0:this.data.length-1}getNum(){return this.data.length}getRaw(e){return this.data[e]}getSegmentByFract(e){let n;for(let r=0;r<this.data.length;r++)if(e<this.data[r].fract+this.data[r].fractLength){n=r;break}return n}getSegmentIndexByTime(e){let n;for(let r=0;r<this.data.length;r++){this.data[r].endTime===void 0&&(this.data[r].endTime=new Date(this.data[r].attributes.end_time).getTime());let i=this.data[r].endTime;if(i||(i=new Date(this.episode.data.endDateTime).getTime()),e<i){n=r;break}}return n}getSegmentStartTime(e){const n=this.data[e];return n&&n.startTime===void 0&&(n.startTime=new Date(n.attributes.start_time).getTime()),n==null?void 0:n.startTime}remove(e){this.data.splice(e,1)}getStartTime(e){return new Date(this.data[e].attributes.start_time).getTime()}getStation(){return this.station}getStationId(e){var n,r;return(r=(n=this.data[e])==null?void 0:n.attributes)==null?void 0:r.station_id}getType(e){return this.data[e]&&this.data[e].attributes.segment_type}removeAds(){for(let e=this.data.length-1;e>=0;e--)this.data[e].attributes.segment_type!=="content"&&this.data.splice(e,1)}replaceSegments(e){this.data=e.data,this.duration=e.duration,this.episode=e.episode,this.station=e.station}}class cKe extends Mo{constructor(e){super(ks.SHOW_SUMMARY,e)}getGenres(){return this.data.genres}getIsFav(){return this.data.isFav}getParentGenres(){return this.data.parentGenres}getParentStation(){return this.data.parentStation&&new S2(this.data.parentStation)}getParentTitle(){return this.data.parentTitle}getPodcastType(){return this.data.podcastType}getTitle(){return this.data.title}}class dS extends lce{constructor(e,n,r){super(e,n,r,ks.SONG_LIST)}getArtist(e){return this.data[e]&&this.data[e].artist}getImage(e){return this.data[e]&&this.data[e].image}getTitle(e){return this.data[e]&&this.data[e].title}getTimePlayed(e){return this.data[e]&&this.data[e].timePlayed}}const _A=il,dKe=il,fKe=il;class Tr extends ace{constructor(n){super();et(this,"sessionId");et(this,"schedulePromise",new Map);et(this,"getFollows",async()=>{const n=ys.get(Wy);if(n)return n;const{root:r}=this.getOverrides("getFollows"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/follows";try{const a=await this.getJsonAuthenticated(s,i);return a!=null&&a.contentIds&&ys.set(Wy,a.contentIds,GR),a==null?void 0:a.contentIds}catch{return[]}});et(this,"getPlaybacks",()=>{const{root:n}=this.getOverrides("getPlaybacks"),r=this.createAudacyBaseFetchOptions();let i=n+"identity/engagement/v1/playback";const s=this.getJsonAuthenticated(i,r).then(o=>o.playbacks),a=Date.now()/1e3-604800;for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)){const l=s[o];a>l&&(o.startsWith("101")||o.startsWith("202")||o.startsWith("801"))&&delete s[o]}return s});
171this.logger=dKe,this.onlineStatusProvider=fKe,this.isTokenValid=El.PENDING,this.envs={[Jp.DEV]:`${rE.DEV}/`,[Jp.PROD]:`${rE.PROD}/`,[Jp.STG]:`${rE.STG}/`,[Jp.QA]:`${rE.QA}/`},this.root=this.envs[n.env],this.env=n.env,this.version=n.ver,this.stats={},this.overrides={byCategory:{env:Jp.PROD,ver:nE.V1},schedules:{env:Jp.PROD,ver:nE.V1}};for(let r in n.overrides)n.overrides.hasOwnProperty(r)&&(this.overrides[r]=n.overrides[r]);setInterval(()=>ys.clean(),2e3)}get credentialsProvider(){return _A.personalizationServices}acceptAtlCallin(n,r){const i=Date.now(),{root:s}=this.getOverrides("acceptAtlCallin"),a=this.dataServices.createAudacyBaseFetchOptions(),o=s+"anytime-live-creator-service/v1/creator/episode/"+n+"/callin/"+r+"/accept",l={episodeId:n,callInRequestId:r};return a.method="PUT",a.body=JSON.stringify(l),this.getJsonAuthenticated(o,a,!0).then(()=>{this.addStat("acceptAtlCallin",Date.now()-i)})}addFollows(n){const{root:r}=this.getOverrides("addFollows"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/follows";return i.method="POST",i.body=JSON.stringify({contentIds:n}),this.getJsonAuthenticated(s,i)}addStat(n,r){let i=this.stats[n];i?(i.time+=r,i.count++,r>i.slowest&&(i.slowest=r),r<i.fastest&&(i.fastest=r),i.lastTen.length<10||i.lastTen.shift(),i.lastTen.push(r)):(i=this.stats[n]={},i.time=r,i.count=1,i.slowest=r,i.fastest=r,i.lastTen=[r])}addToHistory(n){const r=Date.now(),{root:i}=this.getOverrides("addToHistory"),s=this.createAudacyBaseFetchOptions();let a=i+"identity/engagement/v1/history";return s.method="POST",s.body=JSON.stringify({listenHistory:n}),this.getJsonAuthenticated(a,s).then(o=>(this.addStat("addToHistory",Date.now()-r),o))}bulkUnfollow(n){const r=async(i,s)=>(await i,this.deleteFollow(s));return n.reduce(r,Promise.resolve())}cancelAtlCallin(n,r){const i=Date.now(),{root:s}=this.getOverrides("cancelAtlCallin"),a=this.dataServices.createAudacyBaseFetchOptions(),o=s+"anytime-live-creator-service/v1/listener/episode/"+n+"/callin/"+r+"/cancel",l={episodeId:n,callInRequestId:r};return a.method="PUT",a.body=JSON.stringify(l),this.getJsonAuthenticated(o,a,!0).then(()=>{this.addStat("cancelAtlCallin",Date.now()-i)})}clearHistory(){const n=Date.now(),{root:r}=this.getOverrides("clearHistory"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/history";return i.method="DELETE",this.getJsonAuthenticated(s,i).then(a=>(this.addStat("clearHistory",Date.now()-n),a))}createAnonymousUser(){const n=r=>{setTimeout(()=>{const i=ug(aw());r(`f8k:${i.substr(3,32)}`)},500)};return new Promise(n)}createAudacyBaseFetchOptions(n=this.credentialsProvider.userToken,r=aw(),i="en-US"){const s=Date.now();return(this.lastInteraction===void 0||this.lastInteraction+18e5<s)&&(this.sessionId=this.createSessionId(),this.lastInteraction=s),{mode:"cors",headers:{Accept:"*/*","Accept-Language":i,"Aud-Correlation-Id":r,"Aud-Platform":this.platform,"Aud-Platform-Variant":this.platformVariant,"Aud-Client-Session-ID":this.sessionId,"Aud-User-Token":n,"Content-Type":"application/json"},referrerPolicy:"origin"}}static createAudacyError(n,r,i,s=0){const a={code:s,correlationId:i&&i.headers["Aud-Correlation-Id"],domain:"",errors:[n],message:"An unknown error has occurred calling "+r,sessionId:i&&i.headers["Aud-Client-Session-ID"],status:"UNKNOWN_ERROR"};return new RP(a.message,a)}createChatFetchOptions(){return this.dataServices.createAudacyBaseFetchOptions()}static createEntity(n){let r;switch(n.entityType){case gt.COLLECTION:r=new CU(n);break;case gt.EPISODE:r=new au(n);break;case gt.SHOW:r=new E1(n);break;case gt.STATION:r=new Ec(n);break;case gt.TAG:r=new T1(n);break;case gt.STANDALONE_CHAPTER:r=new gg(n);break;case gt.TOPIC:r=new LP(n);break;default:r=new Mo(ks.UNKNOWN,n);break}return r}createSessionId(){const n=ug(this.credentialsProvider.userToken?this.credentialsProvider.userToken:aw()).substr(0,20)+ug(Date.now()+"").substr(0,12);return n.substr(0,8)+"-"+n.substr(8,4)+"-"+n.substr(12,4)+"-"+n.substr(16,4)+"-"+n.substr(20)}deleteChatMessage(n,r){const{root:i}=this.getOverrides("deleteChatMessage"),s=this.dataServices.createAudacyBaseFetchOptions(),a=`${i}/chat-publish/v1/publish/${n}/text/${r}`;return s.method="DELETE",this.getJsonAuthenticated(a,s)}deleteFollow(n){const{root:r}=this.getOverrides("deleteFollow"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/follows/"+n;return i.method="DELETE",this.getJsonAuthenticated(s,i)}deleteUser(){const n=Date.now(),{root:r}=this.getOverrides("deleteUser"),i=this.createAudacyBaseFetchOptions();let s=`${r}identity/profile/v1/users/me`;return i.method="DELETE",this.getJsonAuthenticated(s,i).then(a=>(this.addStat("deleteUser",Date.now()-n),a))}editChatMessage(n,r,i){const{root:s}=this.getOverrides("editChatMessage"),a=this.dataServices.createAudacyBaseFetchOptions(),o=`${s}/chat-publish/v1/publish/${n}/text/${r}`,l={text:i};return a.method="PATCH",a.body=JSON.stringify(l),this.getJsonAuthenticated(o,a)}endAtlEpisode(n){const r=Date.now(),{root:i}=this.getOverrides("endAtlEpisode"),s=this.createAudacyBaseFetchOptions(),a=i+"anytime-live-creator-service/v1/creator/end-episode";s.method="POST";const o={episodeId:n};return s.body=JSON.stringify(o),this.getJsonAuthenticated(a,s).then(l=>(this.addStat("endAtlEpisode",Date.now()-r),l))}getAtlCreatorCallins(n){const r=Date.now(),{root:i}=this.getOverrides("getAtlCreatorCallins"),s=this.createAudacyBaseFetchOptions(),a=i+"anytime-live-creator-service/v1/creator/episode/"+n+"/callin";return this.getJsonAuthenticated(a,s).then(o=>(this.addStat("getAtlCreatorCallins",Date.now()-r),o.callIns))}
171getAtlHostShowDetails(){const n=Date.now(),{root:r}=this.getOverrides("getHostShowDetails"),i=this.createAudacyBaseFetchOptions(),s=r+"anytime-live-creator-service/v1/creator/host-show-details";return this.getJsonAuthenticated(s,i).then(a=>(this.addStat("getAtlHostShowDetails",Date.now()-n),a))}getAtlLiveEpisodes(){const n=Date.now(),{root:r}=this.getOverrides("getAtlLiveEpisodes"),i=this.createAudacyBaseFetchOptions(),s=r+"anytime-live-creator-service/v1/creator/episodes";return this.getJsonAuthenticated(s,i).then(a=>(this.addStat("getAtlLiveEpisodes",Date.now()-n),a.episodes))}getAtlRecentInvitees(n=10){const r=Date.now(),{root:i}=this.getOverrides("getRecentInvitees"),s=this.createAudacyBaseFetchOptions(),a=i+"anytime-live-creator-service/v1/creator/recent-invitees?limit="+n;return this.getJsonAuthenticated(a,s).then(o=>(this.addStat("getAtlRecentInvitees",Date.now()-r),o))}static async getAudioPreroll(n,r){var b;const i=new Xqe(0,0),a=`${r==="PROD"?wP.VAST_URL:wP.QA_VAST_URL}${n}`,o=await i.get(a),l=Mi.get(o,"ads[0].creatives",[]);if(l.length===0)return{adStartTrackers:[],creativeUrl:"",companionAd:"",companionAdClickThroughTracker:""};const u=l.filter(S=>S.type==="companion");let c="",d="";if(u.length>0){const S=((b=u[0])==null?void 0:b.variations.filter(A=>A.staticResource))||"";S&&S[0]&&(c=S[0].staticResource||""),S&&S[0]&&(d=S[0].companionClickThroughURLTemplate||"")}const f=l.filter(S=>S.type==="linear");let h=[],g="";return f.length>0&&(h=f[0].mediaFiles.filter(S=>S.fileURL&&S.fileURL.includes("https:"))||[],g=h[0].fileURL||""),{adStartTrackers:Mi.get(o,wP.IMPRESSION_TEMPLATES,[]),creativeUrl:g,companionAd:c,companionAdClickThroughTracker:d}}getChapters(n){const r=i=>{if(n!==void 0){const s=Date.now(),{root:a}=this.getOverrides("getChapters"),o=this.createAudacyBaseFetchOptions(),l=`${a}experience/v1/content/${n}/chapters`,u=({chapters:c})=>{this.addStat("getChapters",Date.now()-s);const d=[];if(c)for(let f=0;f<c.length;f++)d.push(new T7(c[f]));i(d)};Tr.getJson(l,o).then(u).catch(()=>i([]))}else i([])};return new Promise(r)}getChatConfig(n){const r=i=>{const{root:s}=this.getOverrides("getChatConfig"),a=this.dataServices.createAudacyBaseFetchOptions(),o=`${s}/chat-subscribe/v1/config/${n}`,l=u=>{i(u||[])};this.getJsonAuthenticated(o,a).then(l)};return new Promise(r)}getChatQuickReactionRollups(n,r,i,s,a){const o=l=>{const{root:u}=this.getOverrides("getChatQuickReactionRollups"),c=this.dataServices.createAudacyBaseFetchOptions(),d=`?start-ms-offset=${r}&page=${i}&max-events=${s}&fetch-backward=${a}`,f=`${u}/chat-history/v1/chat/${n}/quick-reaction-rollups${d}`,h=g=>{g?(this.eventListener&&this.eventListener({type:"messagePosted",message:g}),l(g)):l([])};this.getJsonAuthenticated(f,c).then(h)};return new Promise(o)}getChatQuickReactionsSummary(n){const r=i=>{const{root:s}=this.getOverrides("getChatQuickReactionsSummary"),a=this.dataServices.createAudacyBaseFetchOptions(),o=`${s}/chat-history/v1/chat/${n}/quick-reactions-summary`,l=u=>{i(u||[])};this.getJsonAuthenticated(o,a).then(l)};return new Promise(r)}getChatTextEvents(n,r,i,s,a){const o=l=>{const{root:u}=this.getOverrides("getChatTextEvents"),c=this.dataServices.createAudacyBaseFetchOptions(),d=`${u}/chat-history/v1/chat/${n}/text-events?start-ms-offset=${r}&page=${i}&max-events=${s}&fetch-backward=${a}`,f=h=>{l(h||[])};this.getJsonAuthenticated(d,c).then(f)};return new Promise(o)}verifyTokenPending(n=!1){if(this.isTokenValid!==El.PENDING)return;const r=20,i=50,s=3e4;return new Promise(a=>{let o=0,l=null;l=setInterval(()=>{o++,(o*i>s||this.isTokenValid!==El.PENDING||!n&&o>r)&&a(clearInterval(l))},i)})}async getClientSubNavigation(n){const r=Date.now(),{root:i}=this.getOverrides("getClientSubNavigation"),s=this.createAudacyBaseFetchOptions();await this.verifyTokenPending();const a=this.platform==="WEB"?"web":"mobile",o=this.isTokenValid===El.AUTHENTICATED?"authenticated":"unauthenticated",l=i+`experience/v2/config/navigation/${n}?platform=${a}&authStatus=${o}`;return await Tr.getJson(l,s).then(u=>(this.addStat("getClientSubNavigation",Date.now()-r),u))}async getClientNavigationTwo(){const n=Date.now(),{root:r}=this.getOverrides("getClientNavigationTwo"),i=this.createAudacyBaseFetchOptions();await this.verifyTokenPending();const s=this.platform==="WEB"?"web":"mobile",a=this.isTokenValid===El.AUTHENTICATED?"authenticated":"unauthenticated",o=r+`experience/v2/config/navigation?platform=${s}&authStatus=${a}`;return await Tr.getJson(o,i).then(l=>(this.addStat("getClientNavigationTwo",Date.now()-n),l)).catch(l=>{if(l.message.includes("status: 404"))return console.warn(`Navigation data not found, using default data fallback. Caught Error: ${l.message}`),Promise.resolve(oKe());console.warn(l.message)})}getClientNavigation(){const n=Date.now(),{root:r}=this.getOverrides("getClientNavigation"),i=this.createAudacyBaseFetchOptions(),s=r+"experience/v1/config/navigation";return Tr.getJson(s,i).then(a=>(this.addStat("getClientNavigation",Date.now()-n),a))}getClientSettings(){const n=Date.now(),{root:r}=this.getOverrides("getClientSettings"),i=this.createAudacyBaseFetchOptions(),s=r+"experience/v1/config/settings";return Tr.getJson(s,i).then(a=>(this.addStat("getClientSettings",Date.now()-n),a))}getContentJsonObject(n){const r=(i,s)=>{const{root:a}=this.getOverrides("getContentJsonObject"),o=this.createAudacyBaseFetchOptions(),l=`${a}
171experience/v1/content?contentId=${n}&objectType=${zp.FULL}`,u=Date.now();Promise.all([Tr.getJson(l,o),this.personalizationServices.getFollows()]).then(([c,d])=>{const f=c.content&&c.content[0];f?(Mo.cleanJsonObject(f),f.isFav=d.indexOf(f.id)!==-1,i(f)):c&&s(c),this.addStat("getContentJsonObject",Date.now()-u)})};return new Promise(r)}getContentJsonObjects(n){const r=(i,s)=>{const{root:a}=this.getOverrides("getContentJsonObjects"),o=this.createAudacyBaseFetchOptions(),l=`${a}experience/v1/content?contentId=${n.join("|")}&objectType=${zp.FULL}`,u=Date.now();Promise.all([Tr.getJson(l,o),this.personalizationServices.getFollows()]).then(([c,d])=>{const f=c.content,h={};f?f.forEach(g=>{Mo.cleanJsonObject(g),g.isFav=d.indexOf(g.id)!==-1,h[g.id]=g}):c&&s(c),this.addStat("getContentJsonObjects",Date.now()-u),i(h)})};return new Promise(r)}getContentObject(n){return this.getContent([n]).then(r=>r&&r.content&&r.content[n])}getContentObjects(n){return this.getContent(n,zp.FULL)}getContentSummaries(n){return this.getContent(n,zp.SUMMARY)}getContentSummary(n,r=!1){return this.getContent([n],zp.SUMMARY,r).then(i=>i&&i.content&&i.content[n])}getContent(n,r=zp.FULL,i=!1){var v;if(!(n!=null&&n.length))return Promise.resolve({content:{}});const{root:s}=this.getOverrides("getContent"),a=this.createAudacyBaseFetchOptions(),l=Math.ceil(((v=n.join("|"))==null?void 0:v.length)/6e3),u=Math.ceil((n==null?void 0:n.length)/l),d=Mi.chunk(n,u).map(b=>`${s}experience/v1/content?contentId=${b.join("|")}&objectType=${r}`),f=Date.now(),h=([b,S])=>{const A={};return b.forEach(({content:w})=>{if(w){if(r===zp.FULL){w.forEach(x=>{if(x)switch(x.entityType){case gt.CLIP:A[x.id]=new aKe(x);break;case gt.COLLECTION:A[x.id]=new CU(x);break;case gt.EPISODE:A[x.id]=new au(x);break;case gt.SHOW:A[x.id]=new E1(x);break;case gt.STATION:A[x.id]=new Ec(x);break;case gt.TAG:A[x.id]=new T1(x);break;case gt.STANDALONE_CHAPTER:A[x.id]=new gg(x);break;case gt.TOPIC:A[x.id]=new LP(x);break}});for(let x of Object.values(A))x.markAsFavorite(S.indexOf(x.getId())!==-1)}else if(r===zp.SUMMARY&&i){w.forEach(x=>{if(x)switch(x.entityType){case gt.STATION:A[x.id]=new S2(x);break;case gt.SHOW:A[x.id]=new cKe(x);break}});for(let x of Object.values(A))x.markAsFavorite(S.indexOf(x.getId())!==-1)}else w.forEach(x=>{x.isFav=S.indexOf(x.id)!==-1,A[x.id]=x});this.addStat("getContent",Date.now()-f)}}),{content:A}},g=b=>Promise.all(b.map(S=>Tr.getJson(S,a)));return Promise.all([g(d),this.personalizationServices.getFollows()]).then(h)}makeScheduleCall(n,r){let i=this.schedulePromise.get(n);return i||(i=Tr.getJson(n,r),this.schedulePromise.set(n,i),i)}async callSchedule(n,r){const i=Date.now(),s=r?"getCurrentEpisodes":"getSchedules",{root:a}=this.getOverrides(s),o=this.createAudacyBaseFetchOptions(),l=a+"experience/v1/content/"+n+"/schedule",u=r?`${n}_CURRENT`:n,c=ys.get(u);if(c)return c;const d=await this.makeScheduleCall(l,o);this.schedulePromise.delete(l),this.addStat(s,Date.now()-i);let f=(d==null?void 0:d.schedule)??[],h=!0;if(r){const b=Date.now()/1e3,S=[];for(let A=0;A<f.length;A++)f[A].startDateTimeSeconds<=b&&S.push(f[A]);f=S,h=!1}const g=new LY("v3",Tr.makeSchedulesPagedResponse(n,f),void 0,void 0,h),v=NBe(GR,Y$e);return ys.set(u,g,v),g}getCurrentEpisodes(n){return this.callSchedule(n,!0)}getSchedules(n){return this.callSchedule(n,!1)}static async getJson(n,r={}){try{const i=await cS(n,r);if(i.status>=400){const s=await i.json();throw new RP(`call failed with status: ${i.status} and message: ${s.message}`,s)}else if(i.status!==204)return i.json()}catch(i){throw new Error(`Request failed with error: ${i.name}, ${i.message}, URL: ${n}`)}}async getJsonAuthenticated(n,r,i=!1,s=!1){var l;const a=async()=>{try{return await this.triggerRefreshToken(),await this.getJsonAuthenticated(n,r,i,s)}catch{this.isTokenValid===El.PENDING&&(this.isTokenValid=El.UNAUTHENTICATED)}};r.credentials="omit",r.headers.Authorization=this.credentialsProvider.bearerHeader;const o=this.credentialsProvider.token;try{const u=await cS(n,r);switch(u.status){case 200:case 201:if(u.url.indexOf("oauth2/authorize")>=0)return await a();if(this.isTokenValid===El.PENDING&&(this.isTokenValid=El.AUTHENTICATED),u.status!==201&&i===!1||s===!0)return u.json();break;case 204:this.isTokenValid===El.PENDING&&(this.isTokenValid=El.AUTHENTICATED);break;case 401:return this.credentialsProvider.token&&o!==this.credentialsProvider.token?this.getJsonAuthenticated(n,r,i,s):(console.info("Got a 401, reauthenticating..."),await a());default:const c=await u.json();throw this.isTokenValid===El.PENDING&&(this.isTokenValid=El.UNAUTHENTICATED),new RP(`call to ${n} failed with status: ${u.status} and message: ${c==null?void 0:c.message}`,c)}}
171catch(u){throw(l=this.onlineStatusProvider)!=null&&l.online&&this.isTokenValid===El.PENDING&&(this.isTokenValid=El.UNAUTHENTICATED),new Error(`Request failed with error: ${u.name}, ${u.message}, URL: ${n}`)}}getLandingPage(){return this.getView("for-you")}getLogoutUrl(){const n=Date.now(),{root:r}=this.getOverrides("getLogoutUrl"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/logout";return this.platform==="WEB"&&(s+="?parent="+origin.split("//")[1]),i.headers["Refresh-Token"]=this.credentialsProvider.token,Tr.getJson(s,i).then(a=>(this.addStat("getLogoutUrl",Date.now()-n),a.frontChannelLogoutUrl))}getNowPlaying(n){const r=Date.now(),{root:i}=this.getOverrides("getNowPlaying"),s=this.createAudacyBaseFetchOptions(),a=Array.isArray(n)?n.join("|"):n,o=i+"experience/v1/now-playing?contentIds="+a,l=u=>(this.addStat("getNowPlaying",Date.now()-r),u);return Tr.getJson(o,s).then(l)}getEpisodes(n,r=0,i=zR.DATE_DESC,s=!1){const a=Date.now(),{root:o}=this.getOverrides("getEpisodes"),l=this.createAudacyBaseFetchOptions(),u=o+"experience/v1/content/"+n+"/episodes?page="+r+"&sort="+i+(s?"&bust="+aw():""),c=d=>this.getEpisodes(n,d,i);return Tr.getJson(u,l).then(d=>{if(this.addStat("getEpisodes",Date.now()-a),d&&d.results){const f=d.results;for(let h=0;h<f.length;h++)f[h].entitySubtype===Vn.BROADCAST_SHOW_EPISODE&&(f[h].startDateTimeSeconds===void 0&&(f[h].startDateTimeSeconds=new Date(f[h].startDateTime).getTime()/1e3),f[h].endDateTimeSeconds===void 0&&(f[h].endDateTime===void 0?(f[h].endDateTimeSeconds=f[h].startDateTimeSeconds+f[h].durationSeconds,f[h].endDateTime=new Date(f[h].endDateTimeSeconds*1e3).toISOString()):f[h].endDateTimeSeconds=new Date(f[h].endDateTime).getTime()/1e3))}return new LY("v3",d||[],this,c)})}getHistory(){const n=Date.now(),{root:r}=this.getOverrides("getHistory"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/history";return this.getJsonAuthenticated(s,i).then(a=>(this.addStat("getHistory",Date.now()-n),a.listenHistory))}getIncompleteProfileData(){const n=Date.now(),{root:r}=this.getOverrides("getIncompleteProfileData"),i=this.createAudacyBaseFetchOptions(),s=`${r}identity/profile/v1/users/me/incomplete`;return this.getJsonAuthenticated(s,i).then(a=>(this.addStat("getIncompleteProfileData",Date.now()-n),a))}getTranscript(n){const{root:r}=this.getOverrides("getTranscript"),i=this.createAudacyBaseFetchOptions();try{return this.getJsonAuthenticated(n,i)}catch(s){return s}}static async getTritonCookie(){const n="https://yield-op-idsync.live.streamtheworld.com/partnerIds",r={credentials:"include"};try{return(await Tr.getJson(n,r))["triton-uid"]??void 0}catch{return}}static async getFullTritonCookie(){const n="https://yield-op-idsync.live.streamtheworld.com/partnerIds",r={credentials:"include"};try{return await Tr.getJson(n,r)??void 0}catch{return}}getAdTargetingStatus(){const{root:n}=this.getOverrides("getAdTargetingStatus"),r=this.createAudacyBaseFetchOptions();let i=n+"identity/engagement/v1/users/me";return this.getJsonAuthenticated(i,r).then(s=>s)}getAdTargetingEligibility(){const{root:n}=this.getOverrides("getAdTargetingEligibility"),r=this.createAudacyBaseFetchOptions();let i=n+"identity/profile/v1/users/me/attributes?group=adTargeting";return this.getJsonAuthenticated(i,r).then(s=>s)}getOverrides(n){const r=this.overrides&&this.overrides[n],i=r?this.envs[r.env]:this.root,s=r?r.ver:this.version;return{root:i,ver:s}}getPage(n,r){const i=Date.now(),{root:s}=this.getOverrides("getPage"),a=this.createAudacyBaseFetchOptions();let o=s+"experience/v1/page?path="+encodeURIComponent(n);return r&&(o+="&marketIds="+r),Promise.all([Tr.getJson(o,a),this.personalizationServices.getFollows()]).then(([l,u])=>(this.addStat("getPage",Date.now()-i),l.contentObj&&(l.contentObj=Tr.createEntity(l.contentObj)),Tr.markFavs(l,u)))}async getProfileData(){const n=ys.get(nU);if(n)return n;const r=Date.now(),{root:i}=this.getOverrides("getProfileData"),s=this.createAudacyBaseFetchOptions(),a=i+"identity/profile/v1/users/me";return this.getJsonAuthenticated(a,s).then(o=>{this.addStat("getProfileData",Date.now()-r);const l=tKe(nBe,o);return ys.set(nU,l),l})}getPreferences(){const{root:n}=this.getOverrides("getPreferences"),r=this.createAudacyBaseFetchOptions(),i=n+"identity/engagement/v1/users/me/preferences";return this.getJsonAuthenticated(i,r)}setPreferences(n){const{root:r}=this.getOverrides("setPreferences"),i=this.createAudacyBaseFetchOptions(),s=r+"identity/engagement/v1/users/me/preferences";return i.method="PATCH",i.body=JSON.stringify(n),this.getJsonAuthenticated(s,i)}getQueue(){const n=Date.now(),{root:r}=this.getOverrides("getQueue"),i=this.createAudacyBaseFetchOptions(),s=r+"identity/engagement/v1/queue";return this.getJsonAuthenticated(s,i).then(a=>(this.addStat("getQueue",Date.now()-n),a||{currentId:"",itemIds:[]}))}getSuggestedTerms(){const{root:n}=this.getOverrides("getSuggestedTerms"),r=this.createAudacyBaseFetchOptions(),i=n+"experience/v1/search/suggested-terms";return Tr.getJson(i,r).then(s=>s.suggestedTerms)}getSegments(n,r,i,s=void 0,a=void 0){let u=new Date(r).getTime(),c=new Date(i).getTime();if(c-u<=288e5){const f="https://api.audacy.com/v1/stations/"+n+"/segments?filter[between]="+r+","+i+"&page[size]=500&filter[trim]=true&filter[current]=true&filter[fill]=true";return Tr.getJson(f).then(h=>new DY("v3",h.data?h.data:[],this,s,a))}else{let f=u,h=0,g=[];for(;f<c&&h<5&&f<Date.now();){let b=f+288e5<c?f+288e5:c;g.push(Tr.getJson("https://api.audacy.com/v1/stations/"+n+"/segments?filter[between]="+new Date(f).toISOString()+","+new Date(b).toISOString()+"&page[size]=500&filter[trim]=true&filter[current]=true&filter[fill]=true")),f=b,h++}const v=(b,S)=>{b.attributes.end_time=S.attributes.end_time;const A=(new Date(S.attributes.end_time).getTime()-new Date(b.attributes.start_time).getTime())/1e3;b.attributes.duration=A;const w=b.attributes.stream_url.lastIndexOf("-"),x=b.attributes.stream_url.lastIndexOf(".");w>-1&&x>-1&&(b.attributes.stream_url=b.attributes.stream_url.substring(0,w+1)+Math.ceil(A)+b.attributes.stream_url.substring(x))};return Promise.all(g).then(b=>{let S=[];for(let A=0;A<b.length-1;A++){let w=b[A].data,x=b[A+1].data;if(w.length>0&&x.length>0){let P=w[w.length-1],N=x[0];P.id===N.id&&(v(P,N),x.splice(0,1))}S=S.concat(w)}return S=S.concat(b[b.length-1].data),new DY("v3",S,this,s,a)})}}async getSongHistory(n,r){const{root:i}=this.getOverrides("getSongHistory"),a=`${i}experience/v2/stations/${n}/nowplaying?count=${r||5}`,o=await cS(a);switch(o.status){case 404:return await o.json(),[];case 503:return[];case 500:return[];default:const{performances:l}=await o.json();return l.map(u=>({artist:u.artist,title:u.title,time:u.time,image:u.mediumimage}))}}getStation(n){const r=this.overrides&&this.overrides.station,i=r?this.envs[r.env]:this.root,s=r?r.ver:this.version,o={v1:i+s+"/stations/"+n,v2:i+s+"/stations/"+n}[s];return Tr.getJson(o).then(l=>{let u;switch(this.version){case"v1":u=l.data?new Ec(l.data):void 0;break;case"v2":u=l.station?new Ec(l.station):void 0;break}return u})}getRecentlyPlayed(n){const{root:r}=this.getOverrides("getRecentlyPlayed"),i=this.createAudacyBaseFetchOptions(),s=r+"experience/v1/playing?stationId="+n;return Tr.getJson(s,i)}getStationRecents(n,r=3){const i=(s,a)=>{const o=l=>{if(l.getEntityType()===gt.STATION){const u=l.getId(),c=l.getEntitySubtype();if(c===Fr.BROADCAST){const d="https://api.radio.com/v2/songs?page=1&station="+u.split("_")[1]+"&size="+r;Tr.getJson(d).then(f=>{const h=[];if(f&&f.songs){const g=f.songs;for(let v=0;v<g.length;v++)h.push({artist:g[v].artist,image:g[v].image_url,timePlayed:new Date(g[v].time_played).getTime(),title:g[v].title})}s(new dS("v3",h,this))},a)}else if(c===Fr.EXCLUSIVE){const d=f=>{if(f){const h="https://smartstreams.radio.com/session/"+f+"/"+u.split("_")[1]+"/recently-played?results="+r;Tr.getJson(h).then(g=>{const v=[];
171if(g){const b=g.recentlyPlayed;for(let S=0;S<b.length;S++)v.push({artist:b[S].artist,image:b[S].imageUrl,timePlayed:new Date(b[S].timePlayed).getTime(),title:b[S].title})}s(new dS("v3",v,this))})}else s(new dS("v3",[],this))};this.personalizationServices.dataStore.getData("digitalStreamPlayId").then(d,a)}else s(new dS("v3",[],this))}else s(new dS("v3",[],this))};typeof n=="string"?this.getContentObject(n).then(o):n instanceof Ec?o(n):s(new dS("v3",[],this))};return new Promise(i)}getUserMarket(n,r,i=!1){const s=Date.now(),{root:a}=this.getOverrides("getUserMarket"),o=this.createAudacyBaseFetchOptions(),l="hasIpAddressLocationAvailable="+i;let u=`${a}experience/v1/location/market?${l}`;return n&&r&&(u+="&lat="+n+"&long="+r),Tr.getJson(u,o).then(c=>(this.addStat("getUserMarket",Date.now()-s),c))}getUserMarkets(n,r,i=!1){const s=Date.now(),{root:a}=this.getOverrides("getUserMarkets"),o=this.createAudacyBaseFetchOptions(),l="hasIpAddressLocationAvailable="+i;let u=`${a}experience/v1/location/markets?${l}`;return n&&r&&(u+="&lat="+n+"&long="+r),Tr.getJson(u,o).then(c=>(this.addStat("getUserMarkets",Date.now()-s),c))}getView(n,r,i){const s=Date.now(),{root:a}=this.getOverrides("getView"),o=this.createAudacyBaseFetchOptions();let l=a+"experience/v1/view/"+n+(r?"/"+r:"");return this.credentialsProvider.userToken,i&&(l+="?marketIds="+i),Promise.all([Tr.getJson(l,o),this.personalizationServices.getFollows()]).then(([u,c])=>(u.contentObj&&(u.contentObj=Tr.createEntity(u.contentObj)),this.addStat("getView",Date.now()-s),Tr.markFavs(u,c)))}getAutoView(n){const r=Date.now(),{root:i}=this.getOverrides("getAutoView"),s=this.createAudacyBaseFetchOptions();let a=i+"experience/v1/view/auto_home?viewId=auto_home&viewType=MODULES";return n&&(a+="&marketIds="+n),this.credentialsProvider.userToken===void 0&&Pn.error("Calling getAutoView() with no user token"),Tr.getJson(a,s).then(o=>(this.addStat("getAutoView",Date.now()-r),o))}getFeaturedPlayable(n){const r=`${this.root}experience/v1/content/${n}/featured-playable`,i=this.createAudacyBaseFetchOptions();return Tr.getJson(r,i).then(s=>{if(s&&s.contentObj){let a;if(s.contentObj.entityType===gt.STATION?a=Ec:s.contentObj.entityType===gt.EPISODE?a=au:s.contentObj.entityType===gt.STANDALONE_CHAPTER?a=gg:s.contentObj.entityType===gt.TOPIC&&(a=LP),a)return{contentObj:new a(s.contentObj),ctaTitle:s.ctaTitle}}}).catch(()=>{})}static getXml(n,r=!1){let i;const s=r===!0?{mode:"no-cors"}:{};if(n instanceof Array){let a=[];for(let o=0;o<n.length;o++)a.push(cS(n[o],s).then(l=>l.text(),l=>{throw l}));i=Promise.all(a)}else i=cS(n,s).then(a=>a.text(),a=>{throw a});return i}hangupAtlCreatorCallin(n,r){const i=Date.now(),{root:s}=this.getOverrides("hangupAtlCreatorCallin"),a=this.dataServices.createAudacyBaseFetchOptions(),o=s+"anytime-live-creator-service/v1/creator/episode/"+n+"/callin/"+r+"/hangup",l={episodeId:n,callInRequestId:r};return a.method="PUT",a.body=JSON.stringify(l),this.getJsonAuthenticated(o,a,!0).then(()=>{this.addStat("hangupAtlCreatorCallin",Date.now()-i)})}hangupAtlListenerCallin(n,r){const i=Date.now(),{root:s}=this.getOverrides("hangupAtlListenerCallin"),a=this.dataServices.createAudacyBaseFetchOptions(),o=s+"anytime-live-creator-service/v1/listener/episode/"+n+"/callin/"+r+"/hangup",l={episodeId:n,callInRequestId:r};return a.method="PUT",a.body=JSON.stringify(l),this.getJsonAuthenticated(o,a,!0).then(()=>{this.addStat("hangupAtlListenerCallin",Date.now()-i)})}static loadScript(n){const r=function(i,s){const a=document.createElement("script");a.type="text/javascript",a.src=n,a.async=!0,a.onload=i,a.onerror=s,document.getElementsByTagName("head")[0].appendChild(a)};return new Promise(r)}static loadImg(n){const r=function(i,s){const a=document.createElement("img");a.src=n,document.getElementsByTagName("head")[0].appendChild(a)};return new Promise(r)}static loadCSS(n){return new Promise((r,i)=>{const s=document.createElement("link");s.rel="stylesheet",s.onload=r,s.onerror=i,s.href=n,document.head.appendChild(s)})}static makeSchedulesPagedResponse(n,r){const i={code:200,id:n,page:0,pageSize:r.length,results:r,total:r.length};for(let s=0;s<r.length;s++)r[s].startDateTimeSeconds===void 0&&(r[s].startDateTimeSeconds=new Date(r[s].startDateTime).getTime()/1e3),r[s].endDateTimeSeconds===void 0&&(r[s].endDateTime===void 0?(r[s].endDateTimeSeconds=r[s].startDateTimeSeconds+r[s].durationSeconds,r[s].endDateTime=new Date(r[s].endDateTimeSeconds*1e3).toISOString()):r[s].endDateTimeSeconds=new Date(r[s].endDateTime).getTime()/1e3);return i}static markFavs(n,r=[]){for(const[i,s]of Object.entries(n.content))s.isFav=r.indexOf(i)!==-1;return n.contentObj&&n.contentObj.markAsFavorite(r.indexOf(n.contentObj.getId())!==-1),n}patchProfileData(n){const r=Date.now(),{root:i}=this.getOverrides("patchProfileData"),s=this.createAudacyBaseFetchOptions(),a=`${i}identity/profile/v1/users/me`;return s.method="PATCH",s.body=JSON.stringify(n),this.getJsonAuthenticated(a,s,!0).then(o=>(this.addStat("patchProfileData",Date.now()-r),o))}postServiceInit(n){var i;const r=s=>{var a;this.useChaptersEndpoint=(a=s==null?void 0:s.featureFlags)==null?void 0:a.broadcastChapters};
171return(i=this.onlineStatusProvider)!=null&&i.online?Promise.all([super.postServiceInit(n),this.getClientSettings().then(r)]):Promise.all([super.postServiceInit(n)])}rejectAtlCallin(n,r){const i=Date.now(),{root:s}=this.getOverrides("rejectAtlCallin"),a=this.dataServices.createAudacyBaseFetchOptions(),o=s+"anytime-live-creator-service/v1/creator/episode/"+n+"/callin/"+r+"/reject",l={episodeId:n,callInRequestId:r};return a.method="PUT",a.body=JSON.stringify(l),this.getJsonAuthenticated(o,a,!0).then(()=>{this.addStat("rejectAtlCallin",Date.now()-i)})}reportChatMessage(n,r){const{root:i}=this.getOverrides("search"),s=this.dataServices.createAudacyBaseFetchOptions(),a=`${i}/chat-moderation/v1/mod/report-message`,o={reportedReason:r,messageId:n};return s.method="POST",s.body=JSON.stringify(o),this.getJsonAuthenticated(a,s)}requestAtlCallin(n,r,i,s){const a=Date.now(),{root:o}=this.getOverrides("requestAtlCallin"),l=this.dataServices.createAudacyBaseFetchOptions(),u=o+"anytime-live-creator-service/v1/listener/episode/"+n+"/callin/request",c={firstName:r,message:i,memberId:s};return l.method="POST",l.body=JSON.stringify(c),this.getJsonAuthenticated(u,l,void 0,!0).then(d=>(this.addStat("requestAtlCallin",Date.now()-a),d))}search(n,r=[],i=[],s=[],a=[],o=0){const{root:l}=this.getOverrides("search"),u=this.createAudacyBaseFetchOptions();let c=l+"experience/v1/search",d="entityType=",f="entitySubtype=",h="excludeEntityType=",g="excludeEntitySubtype=",v=encodeURIComponent(n).replace(/[!'()*]/g,b=>`%${b.charCodeAt(0).toString(16).toUpperCase()}`);return c+=`?term=${v}&page=${o}`,r.length&&(r.forEach((b,S)=>d+=`${S>0?"%7C":""}${b}`),c+="&"+d),i.length&&(i.forEach((b,S)=>f+=`${S>0?"%7C":""}${b}`),c+="&"+f),s.length&&(s.forEach((b,S)=>h+=`${S>0?"%7C":""}${b}`),c+="&"+h),a.length&&(a.forEach((b,S)=>g+=`${S>0?"%7C":""}${b}`),c+="&"+g),Tr.getJson(c,u).then(b=>new lKe(nE.V3,b,this,n))}searchAtlHosts(n,r){const i=Date.now(),{root:s}=this.getOverrides("searchAtlHosts"),a=this.createAudacyBaseFetchOptions(),o=s+"anytime-live-creator-service/v1/creator/search-hosts?search-term="+n+"&page-number="+r,l=u=>this.searchAtlHosts(n,u);return this.getJsonAuthenticated(o,a).then(u=>(this.addStat("searchAtlHosts",Date.now()-i),u.hosts&&(u.results=u.hosts,delete u.hosts),new sKe(nE.V3,u,this,n,l)))}static sendAudioPrerollTrackers(n){n.forEach(r=>{fetch(r)})}sendChatMessage(n,r,i,s,a){const{root:o}=this.getOverrides("sendChatMessage"),l=this.dataServices.createAudacyBaseFetchOptions(),u=`${o}chat-publish/v1/publish/${n}/text`,c={streamOffsetMs:i,text:r,userDisplayName:s,userProfilePictureUrl:a};return l.method="POST",l.body=JSON.stringify(c),this.getJsonAuthenticated(u,l)}sendChatMessageReaction(n,r,i,s,a,o){const{root:l}=this.getOverrides("sendChatMessageReaction"),u=this.dataServices.createAudacyBaseFetchOptions(),c=`${l}chat-publish/v1/publish/${n}/message-reaction`,d={streamOffsetMs:s,action:i,targetMessageId:r,userDisplayName:a,userProfilePictureUrl:o};return u.method="POST",u.body=JSON.stringify(d),this.getJsonAuthenticated(c,u)}sendChatQuickReaction(n,r,i,s,a){const{root:o}=this.getOverrides("sendChatQuickReaction"),l=this.dataServices.createAudacyBaseFetchOptions(),u=`${o}chat-publish/v1/publish/${n}/quick-reaction`,c={streamOffsetMs:i,reactionId:r,userDisplayName:s,userProfilePictureUrl:a};return l.method="POST",l.body=JSON.stringify(c),this.getJsonAuthenticated(u,l)}sendUserEvents(n,r,i,s,a){const{root:o}=this.getOverrides("sendUserEvents"),l=this.createAudacyBaseFetchOptions(),u=o+"data-events/v1/events";return l.headers["Aud-App-Name"]=n,l.headers["Aud-App-Version"]=r,l.headers["Aud-App-Build-Number"]=i,l.headers["Aud-Logged-In"]=this.credentialsProvider.bearerHeader&&this.credentialsProvider.token?1:0,l.headers["User-Agent"]=s,l.method="POST",l.body=a,Tr.getJson(u,l).catch(()=>{throw new Error(`sendUserEvents request failed with error: ${error.name}, ${error.message}, URL: ${u}`)})}setAdTargetingStatus(n){const{root:r}=this.getOverrides("setAdTargetingStatus"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/users/me";return i.method="PATCH",i.body=JSON.stringify({adTargeting:n}),this.getJsonAuthenticated(s,i,!0)}setPlatformAndVariant(n,r){this.platform=n,this.platformVariant=r}setPlayback(n,r){const{root:i}=this.getOverrides("setPlayback"),s=this.createAudacyBaseFetchOptions();let a=i+"identity/engagement/v1/playback";return s.method="POST",s.body=JSON.stringify({playbacks:[{contentId:n,playbackOffset:r}]}),this.getJsonAuthenticated(a,s)}setPlaybacks(n){const{root:r}=this.getOverrides("setPlaybacks"),i=this.createAudacyBaseFetchOptions();let s=r+"identity/engagement/v1/playback";return i.method="POST",i.body=JSON.stringify({playbacks:n}),this.getJsonAuthenticated(s,i)}reactivateUser(){const n=Date.now(),{root:r}=this.getOverrides("reactivateUser"),i=this.createAudacyBaseFetchOptions();let s=`${r}identity/profile/v1/users/reactivate`;return i.method="POST",this.getJsonAuthenticated(s,i,!0).then(a=>(this.addStat("reactivateUser",Date.now()-n),a))}setQueue(n){const r=Date.now(),{root:i}=this.getOverrides("setQueue"),s=this.createAudacyBaseFetchOptions(),a=i+"identity/engagement/v1/queue";return s.method="PATCH",s.body=JSON.stringify(n),this.getJsonAuthenticated(a,s,!0).then(()=>{this.addStat("setQueue",Date.now()-r)}
171)}triggerPasswordResetEmail(){const n=Date.now(),{root:r}=this.getOverrides("triggerPasswordResetEmail"),i=this.createAudacyBaseFetchOptions(),s=r+"identity/forgot-password";return i.method="POST",this.getJsonAuthenticated(s,i,!0).then(()=>{this.addStat("triggerPasswordResetEmail",Date.now()-n)})}async triggerRefreshToken(){if(!this.authFetch){if(!this.credentialsProvider.token)throw await _A.personalizationServices.setAuthState({state:Bn.NONE}),this.authFetch=void 0,new sw("DS:Alpha");const n=this.credentialsProvider.token,{root:r}=this.getOverrides("triggerRefreshToken"),i=this.createAudacyBaseFetchOptions(),s=r+"identity/tokens";i.credentials="omit",i.method="POST",i.headers["Refresh-Token"]=this.credentialsProvider.token,this.authFetch=cS(s,i).then(async a=>{if(a.status!==201&&a.status!==200)throw await _A.personalizationServices.setAuthState({state:Bn.NONE}),this.authFetch=void 0,new sw("DS:Bravo - ("+n+") status = "+a.status);return a.json()}).then(async a=>{await _A.personalizationServices.setAuthState({state:Bn.AUTH,userId:this.credentialsProvider.userToken,refreshToken:a.refreshToken,accessToken:a.accessToken}),this.authFetch=void 0}).catch(async a=>{throw await _A.personalizationServices.setAuthState({state:Bn.NONE}),this.authFetch=void 0,a instanceof sw?a:new sw("DS:Charlie - ("+n+") "+a)})}return await this.authFetch}updateInteractionTime(){this.lastInteraction=Date.now()}}const hKe="DBABrGA~BVQqAAAACWA.QA~BUoAAAJY.QA~BVoAABY~BVoAAFg.QA~BVKAAAWA~BVoAAAFg.QA",pKe="DBABrGA~BVQVAAAABWA.QA~BUUAAAFY.QA~BVUAABY~BVUAAFg.QA~BVFAAAWA~BVUAAAFg.QA",sL=({optIn:t})=>t?hKe:pKe,gKe=3e3,mKe=15e3,vKe=3,yKe=t=>{var r;const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return(r=n.pop())==null?void 0:r.split(";").shift()},bKe=(t,e,n="/")=>{const r=new Date;r.setMonth(r.getMonth()+1),document.cookie=`${t}=${e}; expires=${r.toUTCString()}; path=${n}`},SKe=t=>{document.cookie=t+"=; Max-Age=0"},EKe=(t="")=>{if(uce())return;const e=document.getElementById("multisync-iframe"),n=e==null?void 0:e.getAttribute("data-load-time");n&&parseInt(n)+mKe>Date.now()||(e.onload=()=>{let r=0;const i=setInterval(()=>{fetch(`https://sync.amperwave.net/api/get/magnite/auid=${t}`).then(a=>a.json()).then(a=>{const{partner_id:o}=a;o?(bKe("partner_id",o),s()):(r++,r===vKe&&s())}).catch(a=>{console.error(a),s()})},gKe),s=()=>{clearInterval(i),e.removeAttribute("onload")}},e.src=`https://eus.rubiconproject.com/usync.html?p=7562&endpoint=us-west&auid=${t}`,e.setAttribute("data-load-time",Date.now().toString()))},uce=()=>yKe("partner_id")??"",cce=()=>{SKe("partner_id")};async function TKe(t){if(!window.syncCookies)return null;const n={...{timeout:1e3},...t};try{return await window.syncCookies(n)}catch(r){return console.error("Failed to sync user cookies.",r),null}}var xU=(t=>(t.Live="Live",t.VOD="VOD",t))(xU||{});const X3=15e3,IU=500,kY="Unable to load stream.",AKe=new Set(["sounder","ad"]),wKe="live.amperwave.net",_Ke=6e4,G0=10,CKe=1e3,xKe=3e4,ii={DESTROY:{target:"DESTROYED"}},NY="Content is not rewindable";async function IKe(t,e){const{platform:n}=e;return n===bs.ANDROID||n===bs.IOS?await PKe(t,e):OKe(t,e)}async function OKe(t,e){const{state:n}=await navigator.permissions.query({name:"geolocation"}),{locationProvider:r,featureFlags:i}=e;return n==="granted"?(t.removeQuery("sc"),t.addQuery({...r!=null&&r.lat?{lat:r==null?void 0:r.lat}:{},...r!=null&&r.long?{long:r==null?void 0:r.long}:{}})):i!=null&&i.enableSimulcastOverride?LKe(t):RKe(t,n)}async function PKe(t,e){const{locationProvider:n}=e;return n!=null&&n.lat&&t.addQuery("lat",n.lat),n!=null&&n.long&&t.addQuery("long",n.long),!(n!=null&&n.lat)&&!(n!=null&&n.long)&&t.addQuery("sc",j_.FORCE_SIMULCAST_OFF),Promise.resolve(t)}function RKe(t,e){switch(e){case"denied":return t.addQuery("sc",j_.FORCE_SIMULCAST_OFF);default:return t.addQuery("sc",j_.APPLY_AMPERWAVE_GEOLOCATION)}}function LKe(t){return t.addQuery("sc",j_.FORCE_SIMULCAST_OFF)}var DKe={APP_VERSION:"2026.08.01"};const kKe=g2([{cond:({autoplay:t})=>t,actions:[mY((t,e)=>({type:"PLAY",autoplay:t.autoplay}))]},{actions:[mY({type:"PAUSE"}),bn(()=>({autoplay:!0}))]}]),A7={play:({player:t})=>t==null?void 0:t.play(),pause:({player:t})=>t.pause(),stop:({player:t})=>t.stop(),autoplay:kKe,logPlaybackError:({contentType:t,item:e,logger:n,dataProvider:r},i)=>{const{error:s,errorMessage:a}=i||{},o=s?s.raw||s:a,l=`Playback error for ${t} from ${e.getId()} - ${e.getTitle()}`,u=typeof document<"u";let c="online";u&&!window.navigator.onLine&&(c="offline");const d=u?` Network Status: ${c}`:"",f=JSON.stringify(r.stats),v=`Error: ${typeof DOMException<"u"&&o instanceof DOMException?gle(o):JSON.stringify(o)} Api Stats: ${f} ${d}`;n==null||n.error(`${l}: ${v}`)},sendPlaybackErrorEvent:(t,e)=>{t.analyticsProvider.sendPlaybackErrorEvent(t,e)},logPlaybackFailure:async({contentType:t,item:e,logger:n,errors:r,firstLoadTime:i,analyticsProvider:s,retryCount:a,dataProvider:o,deviceInfoProvider:l})=>{const u=typeof document<"u";let c="online";u&&!window.navigator.onLine&&(c="offline");const d=u?` Network Status: ${c}`:"",f=JSON.stringify(o.stats),{bandwidthEstimateBPS:h,historicBandwidthEstimateBPS:g,type:v}=await(l==null?void 0:l.getNetworkInfo())||{},b=`Playback failed for ${e.getId()} - ${e.getTitle()} ${t?`- ${t} Api Stats: ${f} ${d}`:""}`;n==null||n.error(b),s.sendEventToListener({type:Ds.STREAM_PLAYBACK_FAILURE,eventDetails:{stationId:e.getId(),streamerType:t,uptimeMs:i?Date.now()-i:0,mostRecentError:r==null?void 0:r[0],retryCount:a,bandwidthEstimateBPS:h,historicBandwidthEstimateBPS:g,connectivityType:v}})},logLoadingError:({item:t,logger:e})=>{const n=`Failed to load sources from ${t.getId()} - ${t.getTitle()}`;e==null||e.error(n)},logRetry:({item:t,retryCount:e=0,errors:n,firstLoadTime:r,analyticsProvider:i,contentType:s})=>{e<G0&&Pn.log(`[StationMachine] StreamerUtils: Retry Attempt ${e} for ${t.getId()}`),i.sendEventToListener({type:Ds.STREAM_RECONNECT_ATTEMPT,eventDetails:{stationId:t.getId(),streamerType:s,uptimeMs:r?Date.now()-r:0,mostRecentError:n==null?void 0:n[0],retryCount:e}})},sendPlaybackFailedEvent:({analyticsProvider:t,item:e,deviceInfoProvider:n})=>{const r=e.getId(),i=n==null?void 0:n.getAudioRoute();r&&t.sendPlayerEvent({type:As.PLAYBACK_FAILED,contentId:r,streamUrl:ru(e==null?void 0:e.data.streamUrl),connectionType:i})}},Qh=t=>!!t&&AKe.has(t),NKe=(t,e)=>!!(t!=null&&t.optimizedAdBreaks)&&e.data.entityType===gt.STATION&&e.data.entitySubtype===Fr.BROADCAST&&e.data.ownerOperatorIdent==="501-1",MKe=async(t,e)=>{var f,h;const{platform:n,marketingDataProvider:r,credentialsProvider:i,item:s,featureFlags:a,sessionId:o}=e;let l=new H0(t);l.addQuery({apv:"a2",dist:"Audacy",source:XB[n??bs.WEB],gpp:sL({optIn:!Zh.disableTargetedAds})}),NKe(a,s)&&l.addQuery("dbi","1");const c=DKe.APP_VERSION;l.addQuery("a2_app_version",c),o&&l.addQuery("a2_session_id",o);const d=XB[n];if(d&&l.addQuery("source",d),l.host().indexOf(wKe)>-1){const g=!Zh.disableTargetedAds,{emailAddress:v,gender:b,zipCode:S,dateOfBirth:A,birthYear:w}=g&&(r==null?void 0:r.profile)||{};v&&(a!=null&&a.useHem)&&l.addQuery("hem",ug(v));
171const x=n===bs.WEB?await Tr.getTritonCookie():await(((f=r==null?void 0:r.getAdvertisingId)==null?void 0:f.call(r))??Promise.resolve(void 0));if((n===bs.ANDROID||n===bs.IOS)&&(l.addQuery({"store-id":X$e[n],"store-url":J$e[n],"bundle-id":Q$e[n]}),n===bs.IOS&&l.addQuery("atts",x!=null&&x.startsWith("idfa:")?TU.AUTHORIZED:TU.DENIED)),n===bs.WEB&&g){EKe(i==null?void 0:i.userToken);const P=await TKe({enabledDSPS:["AWZ","TAP","MAG"],userId:i==null?void 0:i.userToken,gpp:sL({optIn:g}),amperwaveStationId:s.getId()?parseInt(s.getId(),10):void 0,tapStationId:((h=s.getTritonName)==null?void 0:h.call(s))||"",magnitePartnerKey:uce(),magniteEndpoint:"us-east",timeout:200});if(P){const N={m_partner_ids:k=>k,a_partner_ids:k=>k,t_partner_ids:k=>DBe(btoa(JSON.stringify(k)))};for(const k in N)if(P[k]){const U=N[k];l.addQuery(k,U(P[k]))}}}if(x?l.addQuery("deviceid",x):i!=null&&i.userToken&&l.addQuery("deviceid",`app:${i.userToken}`),A){const P=()=>A?(Date.now()-new Date(A).getTime())/315576e5|0:void 0;l.addQuery("c_age",P())}b&&l.addQuery("c_gender",b),S&&l.addQuery("c_home_zip",S),i!=null&&i.userToken&&l.addQuery("c_user_id",i.userToken),w&&l.addQuery("c_yob",w),l=await IKe(l,e)}return BBe()&&l.addQuery("ete","all"),l.normalize().valueOf()},dce=async({marketingDataProvider:t,locationProvider:e,credentialsProvider:n,platform:r,item:i,dataProvider:{sessionId:s}})=>{const a=[],o=oo.getAll();"getHlsStream"in i&&i.getHlsStream()&&a.push({url:i.getHlsStream(),type:"m3u8"}),"getAacStream"in i&&i.getAacStream()&&a.push({url:i.getAacStream(),type:"aac"}),"getMp3Stream"in i&&i.getMp3Stream()&&a.push({url:i.getMp3Stream(),type:"mp3"}),!("getHlsStream"in i)&&"getAudioStream"in i&&i.getAudioStream()&&a.push({url:i.getAudioStream(),type:"m3u8"});for(const l of a)l.url=await MKe(l.url,{marketingDataProvider:t,locationProvider:e,credentialsProvider:n,platform:r,item:i,sessionId:s,featureFlags:o});return a};function ru(t){if(typeof t=="string")return t;if(t&&typeof t=="object"&&Object.keys(t).length>0){const e=Object.keys(t)[0];return t[e]}else return}function Mh(t){if(typeof t=="number")return Math.floor(t)}const FKe=async(t,e)=>{try{return await Tr.getAudioPreroll(t,e)}catch(n){console.error("Failed to get Audio Preroll",n)}return{adStartTrackers:[],creativeUrl:"",companionAd:"",companionAdClickThroughTracker:""}},$Ke=async t=>{try{Tr.sendAudioPrerollTrackers(t)}catch(e){console.error("Audio Preroll Trackers Failed",e)}},A1=t=>Math.min(CKe*2**(t||0),xKe),BKe=({logger:t,newMetadata:e,existingMetadata:n,entity:r,item:i})=>{var o,l,u;e&&(t==null||t.debug("Metadata assigner got input",e));const s={...n,...Gze(r?{image:r.getImageSquare()||r.getParentImageSquare()||i.getImageSquare(),songOrShow:r.getTitle(),start:r.getStartTimeMillis(),stop:r.getEndTimeMillis(),station:i instanceof Ec?i.getTitle():r.getParentTitle(),duration:r.getDuration()}:{},xle),...e};if(!!(e!=null&&e.contentType)&&!(e!=null&&e.companionAdIframeUrl)&&delete s.companionAdIframeUrl,s.isLive===void 0&&n&&(s.isLive=n.isLive),!s.artist&&!s.songOrShow||!Qh(s.contentType)&&((o=i.data)==null?void 0:o.category)!=="Music"){const c=(u=(l=r==null?void 0:r.data)==null?void 0:l.parentImage)==null?void 0:u.square;s.songOrShow=(r==null?void 0:r.getTitle())??"",s.artist=(r==null?void 0:r.getParentTitle())??"",s.image=c??s.image}return s};function UKe(t){var e,n,r;return(e=t==null?void 0:t.data)!=null&&e.title&&t.data.title.trim()!==""?t.data.title:(r=(n=t==null?void 0:t.data)==null?void 0:n.parentShow)!=null&&r.title&&t.data.parentShow.title.trim()!==""?t.data.parentShow.title:"unknown_content_title"}function w7(t,e,n=!1,r="No viwerId present"){var i;try{const s=(i=e==null?void 0:e.data)==null?void 0:i.id;if(!s)return;const a={assetName:UKe(e),viewerId:r,appVersion:Zh.personalizationServices.appVersion,categoryType:`${e==null?void 0:e.getEntityType()}:${e==null?void 0:e.getEntitySubtype()}`,contentType:n?xU.Live:xU.VOD,contentId:`${s}`};(t==null?void 0:t.reportPlaybackRequested)!==void 0&&(t==null||t.reportPlaybackRequested(a))}catch(s){console.error("Error reporting playback requested to Conviva:",s)}}function _7(t,e,n){try{if((t==null?void 0:t.setContentInfo)!==void 0){const r={isLive:e,streamUrl:n};t==null||t.setContentInfo(r)}}catch(r){console.error("Error setting content info to Conviva:",r)}}const mc=t=>({unit:"ms",value:t}),OU=t=>({unit:"s",value:t}),q_=t=>t.unit==="ms"?t.value:t.value*1e3,fce=t=>t.unit==="s"?t.value:t.value/1e3,aL=(t,e)=>mc(q_(t)+q_(e)),PU=(t,e)=>mc(q_(t)-q_(e)),VKe=il,hce=(t,e,n)=>{if(!t||!e)return;const r=aL(mc(e.getStartTimeMillis()),OU(n));for(let i=t.length-1;i>=0;i--)if(t[i].getStartOffset()<=fce(r))return i},MY=({chapters:t,episode:e,elapsed:n,currentChapterIndex:r,logger:i,metadata:s})=>{let a;return s!=null&&s.isLive&&t?a=t.length-1:a=hce(t,e,n??0),a!==r&&(i==null||i.info(`Current chapter index changed from ${r} to ${a}`)),{currentChapterIndex:a}},HKe=(t,e)=>{let n;if(e.length>0){const r=e[e.length-1];n=r.data.startOffset+r.data.duration+10}else n=t.getStartTimeSeconds();return new T7({startOffset:n,title:`Part ${e.length+1}`})},FY=t=>{const{logger:e,requestedOffset:n,standaloneChapter:r,source:i,seekingInChapter:s}=t;if(!i)throw new Error("No playable streamUrl found (SSR)");const a=new H0(i.url),o=t.streamType==="STANDALONE_CHAPTER";let l=s;if(n!==void 0&&!t.playLive){if(a.setQuery("startTs",n),o){const u=r==null?void 0:r.getEndTimeSeconds();a.addQuery("endTs",u)}pce(t)?(a.addQuery("mode","vod"),!zKe(t)&&GKe(t)?a.addQuery("inChapter",!0):a.addQuery("inChapter",s??!0),l=!0):t.retryCount&&t.retryCount>0?(a.addQuery("inChapter",!0),l=!0):(a.addQuery("inChapter",s!==!1),l=s!==!1),e==null||e.debug(`Requesting SSR stream with wall clock offset ${n}, ${s?"within the current chapter":"across a chapter boundary"}`)}return a.addQuery("newMeta","true"),e==null||e.info(`Requesting SSR stream with URL ${a.valueOf()}`),{url:a.valueOf(),isPodcast:i.type!=="m3u8",seekingInChapter:l??!1}},jKe=async t=>{var s;let e=t instanceof Ec?t:void 0;const n=t instanceof au?t:void 0,r=t instanceof gg?t:void 0;if(r)return{streamType:"STANDALONE_CHAPTER",station:void 0,episode:void 0,standaloneChapter:r};const i=(s=n==null?void 0:n.getParentStation())==null?void 0:s.getId();if(i)try{e=await VKe.dataServices.getContentObject(i)}catch(a){console.error(`Failed to fetch station ${i}:`,a),e=void 0}if(e&&e.getEntityType()===gt.STATION&&e.getEntitySubtype()===Fr.BROADCAST&&e.isRewindable())return{streamType:"BROADCAST",station:e,episode:n,standaloneChapter:void 0}},zKe=t=>{var e;return((e=t.metadata)==null?void 0:e.isLive)??!1},GKe=t=>{var i;const e=(i=t.chapters)==null?void 0:i[t.chapters.length-1],n=((e==null?void 0:e.data.startOffset)??0)+((e==null?void 0:e.data.duration)??0);return(t.requestedOffset??0)>n},pce=t=>{var e;return!!t.player.vodFeatureEnabled&&((e=t.episode)==null?void 0:e.isRewindable())&&!t.playLive},WKe=(t,e)=>{const{metadata:n,episode:r,standaloneChapter:i}=t,s=i??r,a=mc((s==null?void 0:s.getStartTimeMillis())??0),o=n!=null&&n.datumTime?OU(n.datumTime):a;return{elapsed:fce(aL(PU(o,a),OU(e)))}},RU=({resumePoint:t,entity:e,streamType:n})=>{if(!(e!=null&&e.isRewindable()))return;const r=Date.now()/1e3,i=new Date("2000").getTime()/1e3,s=e.getStartTimeSeconds(),a=e.getEndTimeSeconds();if(!t||t<0||t>=a||t>r){if(n==="BROADCAST"&&a>r)return;t=s}const o=Math.ceil(t)+1,l=o>=i?o:s+o;if(n==="BROADCAST"||n==="STANDALONE_CHAPTER")return l};function qKe(t,e){const{metadata:n,episode:r,standaloneChapter:i,chapters:s,currentChapterIndex:a}=t,l=RU({resumePoint:e,entity:i??r,streamType:t.streamType}),u=a!==void 0&&hce(s,r,e)===a;return{...t,seekingInChapter:pce(t)?!0:u,requestedOffset:l,elapsed:e,metadata:{...n,datumTime:n!=null&&n.datumTime?l:void 0}}}function gce(t,e){var n;return{...t,requestedOffset:t.player.vodFeatureEnabled&&Qh((n=t.metadata)==null?void 0:n.contentType)?t.requestedOffset:e}}function $Y(t,e=!0){const{elapsed:n,personalizationProvider:r,episode:i,standaloneChapter:s,item:a}=t,o=i??s;if(!o||n===void 0)return t;t.timeSinceLastSavedResumePoint=Date.now();const l=o.getStartTimeSeconds()+n,u={contentId:o.getId(),playbackOffset:l},c=a.data.id?{contentId:a.data.id,playbackOffset:l}:void 0,d=c?[u,c]:[u];return r.setPlaybacks(d,e),gce(t,l)}const KKe=5;class YKe{constructor(e){et(this,"logger");et(this,"platform");et(this,"appName");et(this,"appVersion");et(this,"appBuildNumber");et(this,"eventListener");et(this,"platformVariant");et(this,"events",[]);et(this,"queueTime",2e3);et(this,"userAgent");et(this,"timer");et(this,"eventSender");et(this,"marketingDataProvider");et(this,"networkStateProvider");et(this,"lastContinueListen");et(this,"lastContinueListen10");et(this,"songsPlayed");
171et(this,"onlineStatusProvider");switch(this.appName=e.appName,this.appVersion=e.appVersion,this.appBuildNumber=e.appBuildNumber,this.eventListener=e.eventListener,this.eventSender=e.eventSender,this.logger=e.logger,this.marketingDataProvider=e.marketingDataProvider,this.networkStateProvider=e.networkStateProvider,this.onlineStatusProvider=e.onlineStatusProvider,this.songsPlayed=[""],e.platform){case bs.ANDROID:this.platform="MOBILE",this.platformVariant="ANDROID";break;case bs.ANDROID_CREATOR:this.platform="CREATOR",this.platformVariant="ANDROID";break;case bs.IOS:this.platform="MOBILE",this.platformVariant="IOS";break;case bs.IOS_CREATOR:this.platform="CREATOR",this.platformVariant="IOS";break;case bs.WEB:this.platform="WEB",this.platformVariant="NONE";break;case bs.CS_TEST:this.platform="CLIENT_SERVICES_TEST",this.platformVariant="NONE";break}this.eventSender.setPlatformAndVariant(this.platform,this.platformVariant)}get queuedEvents(){return[...this.events]}sendEventToListener(e){var r;const n={...e,timestamp:new Date().toISOString()};Pn.info(`[${Rn.Analytics}] AnalyticsService: sending event to platform listenters:
172${JSON.stringify(n,null,2)}`),(r=this.eventListener)==null||r.call(this,[n])}pushEvent(e){var r;const n={...e,timestamp:new Date().toISOString()};this.events.push(n),(r=this.eventListener)==null||r.call(this,[n]),Pn.info(`[${Rn.Analytics}] AnalyticsService: adding event:
173${JSON.stringify(n,null,2)}`),!this.timer&&this.onlineStatusProvider.online&&(this.timer=setTimeout(()=>{this.timer=void 0,this.send()},this.queueTime))}handleEventSendFailure(e){var n;(n=this.logger)==null||n.warn("Unable to send events, putting them back in the queue."),this.events=e.concat(this.events)}async send(){var r;const e=(r=this.events)==null?void 0:r.filter(i=>i.type!==As.CONTINUE_LISTEN_10);if(!e||e.length===0)return!0;this.events=[];const n=JSON.stringify({campaign:this.marketingDataProvider.campaign,events:e});try{const i=await this.eventSender.sendUserEvents(this.appName,this.appVersion,this.appBuildNumber,this.userAgent,n);if((i==null?void 0:i.code)>=400)return this.handleEventSendFailure(e),!1}catch{return this.handleEventSendFailure(e),!1}return!0}async sendAppCrash(){this.pushEvent({type:zn.APP_CRASH}),await this.send()}sendAppExitEvent(e,n,r){this.pushEvent({type:zn.APP_EXIT,context:e,eventDetails:{...r&&{contentId:r},exitDestination:n}})}sendAppStart(){this.pushEvent({type:zn.APP_START})}sendAskToSpeak(e){this.pushEvent({type:zn.ASK_TO_SPEAK,eventDetails:{contentId:e}})}sendAutomotiveConnectEvent(e){const r={type:e?zn.AUTOMOTIVE_CONNECT:zn.AUTOMOTIVE_DISCONNECT,eventDetails:{isAutomotiveFlag:!0}};this.pushEvent(r)}sendCastToDevice(e,n,r){this.pushEvent({type:zn.CAST_TO_DEVICE,context:e,eventDetails:{...r&&{castDevice:r},contentId:n}})}sendChatCommentPost(e){this.pushEvent({type:zn.CHAT_COMMENT_POST,eventDetails:{contentId:e}})}sendChatCommentLike(e){this.pushEvent({type:zn.CHAT_COMMENT_LIKE,eventDetails:{contentId:e}})}sendChatReaction(e){this.pushEvent({type:zn.CHAT_REACTION,eventDetails:{contentId:e}})}sendContentShareEvent(e,n,r,i,s){this.pushEvent({type:zn.CONTENT_SHARE,context:e,eventDetails:{contentId:n,contentShareMethod:r,secondsOffset:i,chapter:s}})}sendFollow(e,n,r,i){this.pushEvent({type:i?zn.FOLLOW:zn.UNFOLLOW,context:e,eventDetails:{contentId:n,isOnboarding:r}})}sendLoginLogout(e,n,r,i){this.pushEvent({type:i?zn.LOGIN:zn.LOGOUT,context:e,eventDetails:r?{registrationMethod:r,hasIncompleteProfile:n}:void 0})}sendJumpToLive(e,n){this.pushEvent({type:zn.JUMP_TO_LIVE,eventDetails:{contentId:e,...n}})}sendModuleView(e){const{viewContext:n,moduleId:r,contentId:i,modulePosition:s,moduleDepth:a,isAutomotiveFlag:o}=e;r.includes(tBe)||this.pushEvent({type:zn.MODULE_VIEW,context:n,eventDetails:{...i&&{contentId:i},moduleId:r,...s&&a?{modulePosition:s,moduleDepth:a}:{},isAutomotiveFlag:o}})}sendOpenFromPushNotification(e,n,r,i,s,a){this.pushEvent({type:zn.PUSH_NOTIFICATION,context:e,eventDetails:{pushMessage:n,...r?{viewId:r}:{},...i?{contentId:i}:{},...s?{url:s}:{},...a?{pushType:a}:{}}})}sendPermissionEvent(e,n,r,i){this.pushEvent({type:n,context:e,eventDetails:{permissionStatus:r,isOnboarding:i}})}sendNavigationClickEvent(e,n){this.pushEvent({type:zn.NAVIGATION_CLICK,context:e,eventDetails:n})}sendPlayClickEvent(e,n,r){this.pushEvent({type:zn.PLAY_CLICK,context:e,eventDetails:{...n,...r??{}}})}sendStopClickEvent(e,n){this.pushEvent({type:zn.STOP_CLICK,context:e,eventDetails:{contentId:n==null?void 0:n.contentId,feature:n==null?void 0:n.feature,isAutomotiveFlag:n==null?void 0:n.isAutomotiveFlag}})}sendSkipByTimeClickEvent(e,n){this.pushEvent({type:zn.FIFTEEN_SECOND_CLICK,context:e,eventDetails:{contentId:n==null?void 0:n.contentId,feature:n==null?void 0:n.feature,isAutomotiveFlag:n==null?void 0:n.isAutomotiveFlag}})}sendAutoPlayClickEvent(e,n,r){this.pushEvent({type:e,context:n,eventDetails:r})}sendSleepTimerSetEvent(e,n,r,i){this.pushEvent({type:e,eventDetails:{contentId:n,endOfEpisode:r,duration:i}})}sendSongListenedEvent(e,n,r,i={},s){this.songsPlayed.includes(r)||r===""||(this.songsPlayed.push(r),this.songsPlayed.length>10&&this.songsPlayed.shift(),this.sendPlayerEvent({type:e,contentId:n,...i,replayFlag:s}))}sendPlayerEvent(e){let n={},r=this.networkStateProvider.connectivityType;const i=e.connectionType??"unknown";r||(r=a4e());const s=Date.now(),{type:a,...o}=e;
173a===As.CONTINUE_LISTEN?(this.shouldSendContinueListenEvent(e.contentId,s)&&(this.lastContinueListen={contentId:e.contentId,time:s},n={listenDuration:DS.CONTINUE_LISTEN_DURATION},this.pushEvent({type:a,eventDetails:{...o,...n,connectivityType:r,connectionType:i}})),this.shouldSendContinueListenEvent10(e.contentId,s)&&(this.lastContinueListen10={contentId:e.contentId,time:s},n={listenDuration:DS.CONTINUE_LISTEN_DURATION_10},this.pushEvent({type:As.CONTINUE_LISTEN_10,eventDetails:{...o,...n,connectivityType:r,connectionType:i}}))):this.pushEvent({type:a,eventDetails:{...o,...n,connectivityType:r,connectionType:i}})}async sendPlaybackErrorEvent(e,n){var g,v;const{contentType:r,item:i}=e,s=(g=e.deviceInfoProvider)==null?void 0:g.getAudioRoute(),{type:a}=await((v=e.deviceInfoProvider)==null?void 0:v.getNetworkInfo())||{},o=ru(i.data.streamUrl),{error:l,errorMessage:u}=n||{},c=(l==null?void 0:l.raw)||l||u,d=`Playback error for ${r} from ${i.getId()} - ${i.getTitle()}`,h=typeof DOMException<"u"&&c instanceof DOMException?gle(c):JSON.stringify(c);this.pushEvent({type:As.PLAYBACK_ERROR,eventDetails:{contentId:i.getId(),exception:d,exceptionObject:h,connectionType:s,connectivityType:a,streamUrl:o}})}sendQueueAddRemove(e,n,r){this.pushEvent({type:r?zn.ADD_TO_QUEUE:zn.REMOVE_FROM_QUEUE,context:e,eventDetails:{contentId:n}})}sendReactivateAccountEvent(e){this.pushEvent({type:zn.REACTIVATE_ACCOUNT,context:e})}sendRegistrationEntry(){this.pushEvent({type:zn.REGISTRATION_ENTRY})}sendRegistrationNameEntry(){this.pushEvent({type:zn.REGISTRATION_NAME_ENTRY})}sendRegistrationNameSuccessful(){this.pushEvent({type:zn.REGISTRATION_NAME_SUCCESSFUL})}sendRegistrationPiiEntry(){this.pushEvent({type:zn.REGISTRATION_PII_ENTRY})}sendRegistrationPiiSuccessful(){this.pushEvent({type:zn.REGISTRATION_PII_SUCCESSFUL})}sendRegistrationSuccessful(){this.pushEvent({type:zn.REGISTRATION_SUCCESSFUL})}sendScreenView(e){this.pushEvent({type:zn.SCREEN_VIEW,context:e})}sendSearchClickedEvent(e,n,r,i,s){this.pushEvent({type:zn.SEARCH_RESULTS_CLICK,eventDetails:{searchTerm:e,searchType:n,isOnboarding:r,...i?{viewId:i}:{},...s?{contentId:s}:{}}})}sendSearchEvent(e,n,r,i){this.pushEvent({type:zn.SEARCH,context:e,eventDetails:{searchTerm:n,searchType:r,isOnboarding:i}})}sendSongLikeEvent(e,n,r,i){this.pushEvent({type:i?zn.SONG_LIKE:zn.SONG_UNLIKE,eventDetails:{contentId:e,songTitle:n,artist:r}}
173)}sendStationCallEvent(e,n){this.pushEvent({type:zn.STATION_CALL,context:e,eventDetails:{contentId:n}})}setTTRRecordEvent(e){this.pushEvent({type:zn.TTR_RECORD,context:e})}sendTTRSendEvent(e,n){this.pushEvent({type:zn.TTR_SEND,context:e,eventDetails:n})}sendTTRReceivedEvent(e,n){this.pushEvent({type:zn.TTR_RECEIVED,context:e})}sendTTRFailedEvent(e,n){this.pushEvent({type:zn.TTR_FAIL,context:e})}sendTTRPreviewEvent(e){this.pushEvent({type:zn.TTR_PREVIEW,context:e})}sendTTRReRecordEvent(e){this.pushEvent({type:zn.TTR_RERECORD,context:e})}sendTTRCancelEvent(e){this.pushEvent({type:zn.TTR_CANCEL,context:e})}sendTTRRetryEvent(e){this.pushEvent({type:zn.TTR_RETRY,context:e})}setOffline(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}async setOnline(){if(this.events&&this.events.length>0){const e=async i=>await new Promise(s=>setTimeout(s,i));let n=0,r=!1;do n<1&&await e(5e3),n++,r=await this.send();while(!r&&n<KKe)}}setUserAgent(e){this.userAgent=e}shouldSendContinueListenEvent(e,n){return!this.lastContinueListen||e!==this.lastContinueListen.contentId?!0:Math.round((n-this.lastContinueListen.time)/1e3)*1e3>=DS.CONTINUE_LISTEN_DURATION}shouldSendContinueListenEvent10(e,n){return!this.lastContinueListen10||e!==this.lastContinueListen10.contentId?(this.lastContinueListen10={contentId:e,time:n-DS.CONTINUE_LISTEN_DURATION},!1):Math.round((n-this.lastContinueListen10.time)/1e3)*1e3>=DS.CONTINUE_LISTEN_DURATION_10}}function ZKe(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}var QKe=ZKe,XKe=/\s/;function JKe(t){for(var e=t.length;e--&&XKe.test(t.charAt(e)););return e}var eYe=JKe,tYe=eYe,nYe=/^\s+/;function rYe(t){return t&&t.slice(0,tYe(t)+1).replace(nYe,"")}var iYe=rYe,sYe=iYe,BY=Dg,aYe=u2,UY=NaN,oYe=/^[-+]0x[0-9a-f]+$/i,lYe=/^0b[01]+$/i,uYe=/^0o[0-7]+$/i,cYe=parseInt;function dYe(t){if(typeof t=="number")return t;if(aYe(t))return UY;if(BY(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=BY(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=sYe(t);var n=lYe.test(t);return n||uYe.test(t)?cYe(t.slice(2),n?2:8):oYe.test(t)?UY:+t}var C7=dYe,fYe=QKe,J3=C7;function hYe(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=J3(n),n=n===n?n:0),e!==void 0&&(e=J3(e),e=e===e?e:0),fYe(J3(t),e,n)}var pYe=hYe;const gYe=pi(pYe);var mce=(t=>(t.METERED_CONTENT_LIMIT_REACHED="METERED_CONTENT_LIMIT_REACHED",t))(mce||{});const x7=(t,e,n)=>{const r=t===gt.EPISODE&&e===Vn.PODCAST_EPISODE,i=t===gt.EPISODE&&e===Vn.BROADCAST_SHOW_EPISODE,s=t===gt.STATION&&e===Fr.BROADCAST&&!!n,a=t===gt.STANDALONE_CHAPTER;return r||i||s||a},I7={isConsideredPlayedEpsilon:.98,minimumSecondsForStarted:10},E2=(t,e)=>{const n=typeof e=="string"?new Date(e):e;if(t===void 0)return;const r=new Date("2000").getTime()/1e3;if(t>r){const i=(n==null?void 0:n.getTime())??0;return t-i/1e3}return t},mYe=t=>t===void 0?!1:t>=I7.minimumSecondsForStarted,xg=(t,e)=>t===void 0||e===void 0?!1:e/t>=I7.isConsideredPlayedEpsilon,DP=[.8,1,1.2,1.5,2],vYe=60,vce="vodSpeedControls",yYe={maxBufferSize:0,maxBufferLength:60,backBufferLength:0,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:5,retryDelayMs:25e3,maxRetryDelayMs:5e3},errorRetry:{maxNumRetry:5,retryDelayMs:5e3,maxRetryDelayMs:8e3}}}};
173class bYe{constructor(){et(this,"startBufferingCount",0);et(this,"endBufferingCount",0);et(this,"debounceTimeout",null);et(this,"debounceDelay",5e3);et(this,"firstEventTimestamp",null);et(this,"analyticsProvider");et(this,"eventDetails")}init(e,n){this.analyticsProvider=e,this.eventDetails=n}addEvent(e){Pn.log(`[${Rn.Streaming}] BufferingEventCounter: Received event: ${e}`),this.firstEventTimestamp||(this.firstEventTimestamp=Date.now()),e==="start_buffering"?this.startBufferingCount++:e==="end_buffering"&&this.endBufferingCount++,this.debounceLogCounts()}debounceLogCounts(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.logCounts()},this.debounceDelay)}logCounts(){const e=Date.now()-this.debounceDelay,n=this.firstEventTimestamp?(e-this.firstEventTimestamp)/(1e3*60):1,r=n>0?this.startBufferingCount/n:0,i=n>0?this.endBufferingCount/n:0;this.analyticsProvider?(Pn.log(`[${Rn.Streaming}] BufferingEventCounter: Sending analytics event`),this.analyticsProvider.sendEventToListener({type:Ds.STREAM_BUFFERING_COUNT,eventDetails:{...this.eventDetails,bufferingStartCount:this.startBufferingCount,bufferingEndCount:this.endBufferingCount,bufferingStartEventsPerMinute:r,bufferingEndEventsPerMinute:i,duration:e-(this.firstEventTimestamp||0)}})):Pn.error(`[${Rn.Streaming}] BufferingEventCounter: Analytics provider not initialized`),this.startBufferingCount=0,this.endBufferingCount=0,this.firstEventTimestamp=null}}const LE=new bYe;var ts=(t=>(t.ExclusiveStation="EXCLUSIVE_STATION",t.LiveStation="LIVE_STATION",t.Podcast="PODCAST",t.RewindNoReplay="LIVE_REWIND_NO_REPLAY",t.Rewind="LIVE_REWIND",t))(ts||{}),wf=(t=>(t.Idle="IDLE",t.EndOfEpisode="END_OF_EPISODE",t))(wf||{}),tu=(t=>(t.SingleItem="SINGLE_ITEM",t.Queue="QUEUE",t.Playlist="PLAYLIST",t))(tu||{});const{RESUME_POINT_INTERVAL_MSEC:SYe}=cle,LU="rewindStationMachine",VY=sx({predictableActionArguments:!0,id:"rewindStationMachine",initial:"LOADING",tsTypes:{},schema:{context:{timeSinceLastSavedResumePoint:Date.now()},events:{},services:{}},states:{LOADING:{id:"loading",entry:"assignDefaults",initial:"LOADING_SOURCES",states:{LOADING_SOURCES:{invoke:{id:"loadStationSources",src:"loadStationSources",onDone:{actions:["assignRewindContext"],target:"LOADING_SCHEDULE"},onError:{actions:["sendPlaybackFailedToLoadEvent",Im("LOADING_SOURCES","rewindStationMachine")],target:"FAILED_TO_LOAD"}}},LOADING_SCHEDULE:{invoke:{id:"getSchedule",src:"getSchedule",onDone:{actions:["assignScheduleResponse","assignMetadata","assignCurrentChapterIndexWithOffset","loadAudio","clearPlayLive"]},onError:{actions:["sendPlaybackFailedToLoadEvent",Im("LOADING_SCHEDULE","rewindStationMachine")],target:"FAILED_TO_LOAD"}}},FAILED_TO_LOAD:{entry:["logLoadingError","assignTrackError"],after:[{delay:IU,target:"#failureWithRetry"}]}},on:{REPORT_LOADED:{target:"LOADED"},REPORT_METADATA:{actions:"assignMetadata"},PAUSE:{target:"PAUSED",actions:["stop"]},REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},...ii}},LOADED:{entry:"autoplay",on:{PLAY:{target:"PLAY_REQUESTED"},REPORT_METADATA:{actions:"assignMetadata"},PAUSE:{target:"PAUSED",actions:["stop"]},REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},...ii}},PLAY_REQUESTED:{id:"playRequested",entry:"playWithOffset",on:{REPORT_PLAYING:{actions:["sendPlayEvent","addToHistory"],target:"PLAYING"},REPORT_METADATA:{actions:"assignMetadata"},REPORT_AUTOPLAY_POLICY:{target:"PAUSED"},PAUSE:{target:"PAUSED",actions:["stop"]},REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},...ii}},TRANSITION_TO_BUFFERING:{entry:["sendBufferingEvent"],on:{REPORT_PLAYING:{actions:["sendResumeFromBufferingEvent"],target:"PLAYING"},REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},...ii},after:[{target:"BUFFERING",delay:100}]},BUFFERING:{on:{PAUSE:{target:"PAUSE_REQUESTED"},REPORT_LOADING:{target:"TRANSITION_TO_BUFFERING"},REPORT_PAUSED:{target:"PAUSED"},REPORT_PLAYING:{actions:["sendResumeFromBufferingEvent"],target:"PLAYING"},REPORT_METADATA:{actions:["sendLiveSongListenedEvent","assignMetadata"]},STOP:{target:"PAUSED",actions:["stop","sendStopEvent"]},REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},...ii}},PLAYING:{initial:"IS_PLAYING",entry:"assignRetryCountToZero",states:{IS_PLAYING:{on:{REPORT_METADATA:{actions:["assignMetadata","clearPlayLive"],target:"UPDATING_CHAPTERS"},REPORT_TIME_UPDATE:[{cond:"isFinishedStandaloneChapter",actions:["assignTime","saveResumePoint","resetElapsed","sendReportEnded"]}
173,{cond:"isPlayingAfterEntityEnd",actions:["assignTime","saveResumePoint","resetElapsed"],target:"UPDATING_SCHEDULE"},{target:"IS_PLAYING",actions:["assignTime","assignCurrentChapterIndex","saveLocalResumePoint"]}],REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"}},after:[{delay:_Ke,target:"UPDATING_SCHEDULE"}]},UPDATING_SCHEDULE:{invoke:{id:"getSchedule",src:"getSchedule",onDone:[{cond:"isNonRewindableContent",actions:["stop","exitRewindMode","setPlayLive",Im("UPDATING_SCHEDULE","rewindStationMachine")],target:"#loading"},{actions:["assignScheduleResponse","assignMetadata","addEpisodeToHistory","assignCurrentChapterIndex"],target:"IS_PLAYING"}],onError:[{cond:"isNonRewindableContentError",actions:["stop","exitRewindMode","setPlayLive",Im("UPDATING_SCHEDULE","rewindStationMachine")],target:"#loading"},{actions:[Im("UPDATING_SCHEDULE","rewindStationMachine")]}]}},UPDATING_CHAPTERS:{invoke:{id:"getChapters",src:"getChapters",onDone:{actions:["assignChapterResponse","assignCurrentChapterIndex"],target:"IS_PLAYING"},onError:{actions:[Im("UPDATING_CHAPTERS","rewindStationMachine")],target:"IS_PLAYING"}}}},on:{GO_TO_LIVE:{actions:["stop","exitRewindMode","setPlayLive"],target:"LOADING"},SEEK_TIME:[{cond:"hasSeekedToEndOfStandaloneChapter",actions:["stop","resetResumePoint","handleRewindContentEnded"],target:"PAUSED"},{actions:["stop","assignSeekTime","saveResumePoint"],target:"LOADING"}],REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},REPORT_LOADING:{target:"TRANSITION_TO_BUFFERING"},REPORT_ENDED:[{cond:"isStandaloneChapter",actions:["stop","handleRewindContentEnded","sendStopEvent"],target:"PAUSED"},{cond:"isPlayingRewindContent",actions:["stop","handleRewindContentEnded","sendStopEvent"],target:"LOADING"}],REPORT_CONTINUE_PLAYING:[{cond:"shouldStandaloneChapterStop",actions:["stop","resetResumePoint","handleRewindContentEnded"],target:"PAUSED"},{target:"LOADING",actions:["setIsLiveAndRequestedOffset"]}],REPORT_PAUSED:[{cond:"isStandaloneChapter",actions:["handleRewindContentEnded","sendStopEvent"],target:"PAUSED"},{target:"PAUSED"}],PAUSE:{target:"PAUSE_REQUESTED"},STOP:{target:"PAUSE_REQUESTED"},REPORT_TIME_UPDATE:[{cond:"isPlayingAfterEntityEnd",actions:"sendReportEnded"},{actions:"assignTime"}],REPORT_METADATA:{actions:["assignMetadata","clearPlayLive"]},...ii}},PAUSE_REQUESTED:{entry:g2([{cond:"isAd",actions:"pause"},{cond:"isRewindable",actions:["saveResumePoint","cacheChaptersOnPause","stop"]},{actions:"stop"}]),on:{...ii,REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},REPORT_PAUSED:{target:"PAUSED"}}},PAUSED:{entry:["sendStopEvent","assignRetryCountToZero"],on:{GO_TO_LIVE:{actions:["stop","exitRewindMode","setPlayLive"],target:"LOADING"},SEEK_TIME:[{cond:"hasSeekedToEndOfStandaloneChapter",actions:["stop","resetResumePoint","handleRewindContentEnded"],target:"PAUSED"},{actions:["stop","assignSeekTime","saveResumePoint"],target:"LOADING"}],REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},REPORT_PLAYING:{target:"PLAYING"},PLAY:[{cond:"isAd",target:"PLAY_REQUESTED"},{target:"LOADING"}],...ii}},ENDED:{on:{GO_TO_LIVE:{actions:["stop","exitRewindMode","setPlayLive"],target:"LOADING"},SEEK_TIME:[{cond:"hasSeekedToEndOfStandaloneChapter",actions:["stop","resetResumePoint","handleRewindContentEnded"],target:"PAUSED"},{actions:["stop","assignSeekTime","saveResumePoint"],target:"LOADING"}],REPORT_PLAYBACK_FAILED:{target:"#failureWithRetry",actions:"sendNativePlaybackFailedEvent"},...ii}},FAILURE_WITH_RETRY:{id:"failureWithRetry",entry:["assignIncrementRetryCount","logRetry"],on:{...ii},after:[{target:"WAITING_TO_RETRY",delay:100}]},WAITING_TO_RETRY:{on:{PLAY:{target:"LOADING"},PAUSE:{target:"PAUSED",actions:"pause"},STOP:{actions:["stop","sendStopEvent"]},REPORT_PAUSED:{target:"PAUSED"},...ii},after:[{target:"FAILURE",delay:t=>A1(t.retryCount),cond:({retryCount:t=0})=>t>=G0},{actions:["stop","loadAudio",yU({type:"PLAY"})],target:"LOADING",delay:t=>A1(t.retryCount),cond:({retryCount:t=0})=>t<G0}]},FAILURE:{id:"failure",entry:["logPlaybackFailure","stop","sendPlaybackFailedEvent"],on:{...ii},after:[{delay:IU,target:"PAUSE_REQUESTED"}]},DESTROYED:{entry:["stop","sendStopEvent","saveResumePoint"],type:"final"}}},{services:{getChapters:async function(t){var r;const{episode:e}=t;if(!e)return t;const n=await e.getChapters({broadcastChapters:(r=t.featureFlags)==null?void 0:r.broadcastChapters})??[];return n.push(HKe(e,n)),t.chapters=n,t},getSchedule:async function(t){var s,a;const{playLive:e}=t;let n=await t.personalizationProvider.getPlaybacks();if(e&&(t.requestedOffset=void 0,n={}),t.streamType==="BROADCAST"){const o=await((s=t.station)==null?void 0:s.getSchedules());t.requestedOffset&&(t.episode=await(o==null?void 0:o.getEpisode(t.requestedOffset*1e3))),t.episode||(t.episode=await(o==null?void 0:o.getEpisode(Date.now())))}const i=t.streamType==="STANDALONE_CHAPTER"?t.standaloneChapter:t.episode;if(!i)return t;if(t.requestedOffset=RU({resumePoint:t.requestedOffset??n[i.getId()],entity:i,streamType:t.streamType}),!i.isRewindable()&&i.getEndTimeMillis()<Date.now())throw new Error(NY);if(t.episode){const o=n[i.getId()],l=await t.episode.getChapters({playback:o,broadcastChapters:(a=t.featureFlags)==null?void 0:a.broadcastChapters})??[];if(!l.length){const u=new T7({duration:t.episode.getDuration(),startOffset:t.episode.getStartTimeSeconds(),title:"Part 1",transcript:t.episode.getTranscript()});l.push(u)}t.chapters=l}return t},loadStationSources:async function(t){var n;const e=(n=await dce({...t,item:t.streamType==="BROADCAST"?t.station:t.item}))==null?void 0:n.find(r=>r.type==="m3u8");return{...t,source:e}}},guards:{isPlayingRewindContent:({metadata:t})=>!(t!=null&&t.isLive),isFinishedStandaloneChapter:t=>{const{episode:e,elapsed:n,standaloneChapter:r}=t,i=r??e,s=(n??0)>((i==null?void 0:i.getDuration())??0);return!!t.standaloneChapter&&s},isPlayingAfterEntityEnd:t=>{const{episode:e,elapsed:n,standaloneChapter:r}=t,i=r??e;return(n??0)>((i==null?void 0:i.getDuration())??0)},isAd:({metadata:t})=>Qh(t==null?void 0:t.contentType),isRewindable:({episode:t})=>(t==null?void 0:t.isRewindable())??!0,isNonRewindableContent:t=>{var e;return t.contentType===ts.Rewind&&!((e=t.episode)!=null&&e.isRewindable())},isNonRewindableContentError:(t,e)=>{const{message:n}=e.data;return n===NY},isStandaloneChapter:t=>!!t.standaloneChapter,shouldStandaloneChapterStop:t=>{const{metadata:e,requestedOffset:n,standaloneChapter:r}=t;return!!r&&!!n&&(e==null?void 0:e.contentType)==="content"},hasSeekedToEndOfStandaloneChapter:(t,{time:e})=>{const{standaloneChapter:n}=t;if(!n)return!1;const r=RU({resumePoint:e,entity:n,streamType:"STANDALONE_CHAPTER"});if(!r)return!1;const i=n.getEndTimeSeconds();return r>=i}},actions:{assignDefaults:bn(({item:t,metadata:e,firstLoadTime:n,analyticsProvider:r})=>(e||(r.sendEventToListener({type:Ds.STREAM_LOAD,eventDetails:{stationId:t.getId(),stationName:t.getTitle(),streamerType:ts.Rewind,isNativeErrorHandling:!0}}),LE.init(r,{stationId:t.getId(),stationName:t.getTitle(),streamerType:ts.Rewind})),{firstLoadTime:n||Date.now(),metadata:e??{image:t.getImageSquare(),station:t.getTitle()}})),assignRetryCountToZero:bn({retryCount:0}),assignIncrementRetryCount:bn({retryCount:({retryCount:t=0})=>t+1}),addToHistory:t=>{var a,o;const e=t.item.getId(),n=(a=t.episode)==null?void 0:a.getId(),r=(o=t.standaloneChapter)==null?void 0:o.getId(),i=[];e&&i.push(e),n&&i.push(n),r&&i.push(r);const s=[...new Set(i)];s.length>0&&!t.personalizationProvider.isInTopOfHistoryStack(s)&&t.personalizationProvider.addToHistory(s)},addEpisodeToHistory:(t,e)=>{var i;const r=(i=e.data.episode)==null?void 0:i.getId();r&&(t.personalizationProvider.isInTopOfHistoryStack(r)||t.personalizationProvider.addToHistory([r]))},assignScheduleResponse:bn(({chapters:t,episode:e},{data:n})=>({...n,chapters:t,episode:e})),assignChapterResponse:bn((t,{data:e})=>({chapters:e==null?void 0:e.chapters})),assignRewindContext:bn((t,{data:e})=>({...t,...e})),assignMetadata:bn((t,e)=>{const{metadata:n,episode:r,standaloneChapter:i,item:s,logger:a}=t,o={},l=i??r,u="metadata"in e?e.metadata:void 0;return u!=null&&u.songOrShow&&(u.songOrShow="",u.artist=""),o.metadata=BKe({existingMetadata:n,newMetadata:u,logger:a,entity:l,item:s}),o.contentType=(l==null?void 0:l.isRewindable())??!0?ts.Rewind:ts.Re
173windNoReplay,o}),exitRewindMode:bn(t=>({...t,requestedOffset:void 0,episode:void 0,playLive:!0})),sendReportEnded:vU({type:"REPORT_ENDED"}),playWithOffset:t=>{var a;const{player:e,episode:n,playLive:r}=t,i=FY(t),s=n==null?void 0:n.getId();return n!==void 0&&t.lastPlayedContentId!==s&&(w7(e,n,r,(a=t.credentialsProvider)==null?void 0:a.userToken),t.lastPlayedContentId=s,_7(e,r,i.url)),t.player.play()},saveResumePoint:bn(t=>$Y(t,!0)),cacheChaptersOnPause:t=>{var n;const e=((n=t.episode)==null?void 0:n.getId())??"";MBe(e)},saveLocalResumePoint:bn(t=>{t.timeSinceLastSavedResumePoint||(t.timeSinceLastSavedResumePoint=Date.now());const e=Date.now(),n=t.timeSinceLastSavedResumePoint+SYe;return e>=n?$Y(t,!1):t}),resetResumePoint:bn(t=>{const{elapsed:e,personalizationProvider:n,episode:r,standaloneChapter:i}=t,s=i??r;if(!s||!e)return t;const a=s.getStartTimeSeconds();return n.setPlayback(s.getId(),a),t.elapsed=0,gce(t,a)}),resetElapsed:bn(t=>(t.elapsed=0,t)),assignSeekTime:bn((t,{time:e})=>{const{episode:n,standaloneChapter:r,analyticsProvider:i,elapsed:s,metadata:{isLive:a=!1}={},deviceInfoProvider:o}=t,l=r??n,u=(l==null?void 0:l.getEndTimeSeconds())||0,c=(l==null?void 0:l.getStartTimeSeconds())||0,d=Date.now()/1e3;c<d&&u>d&&c+e>=u&&(e-=1);const h=qKe(t,e),g=o==null?void 0:o.getAudioRoute();return s!==void 0&&(l!=null&&l.data.id)&&(i==null||i.sendPlayerEvent({type:e>s?As.FAST_FORWARD:As.REWIND,contentId:l==null?void 0:l.data.id,rewindFlag:a,currentPosition:Mh(l.getStartTimeSeconds()+s),streamUrl:ru(l==null?void 0:l.data.streamUrl),connectionType:g})),h}),assignTime:bn((t,{time:e})=>({...t,...WKe(t,e)})),assignCurrentChapterIndex:bn(t=>{const{currentChapterIndex:e}=MY(t);return{currentChapterIndex:e}}),assignCurrentChapterIndexWithOffset:bn(t=>{const{currentChapterIndex:e}=MY(t);return{currentChapterIndex:e,...t}}),setPlayLive:bn(t=>({...t,playLive:!0})),clearPlayLive:bn(t=>({...t,playLive:!1})),handleRewindContentEnded(t){return{...t,episode:void 0,playLive:!0,requestedOffset:t.player.vodFeatureEnabled?t.requestedOffset:void 0}},loadAudio:bn(t=>{var n;const e=FY(t);return(n=t.player)==null||n.load({url:e.url,isPodcast:e.isPodcast,isAudioPreroll:!1,liveContentUrl:"",autoplay:t.autoplay}),{...t,seekingInChapter:e.seekingInChapter}}),setIsLiveAndRequestedOffset:bn((t,e)=>({...t,playLive:e.playLive,seekingInChapter:!1,requestedOffset:e.playlistNextStartTime})),sendStopEvent:async({analyticsProvider:t,episode:e,firstLoadTime:n,retryCount:r,errors:i,elapsed:s,contentType:a,metadata:{isLive:o=!1}={},deviceInfoProvider:l})=>{var g,v;const u=(g=e==null?void 0:e.data)==null?void 0:g.id;if(!u)return;const c=l==null?void 0:l.getAudioRoute();t.sendPlayerEvent({type:As.STOP,contentId:u,rewindFlag:o,currentPosition:e?Mh(e.getStartTimeSeconds()+(s??0)):void 0,streamUrl:ru((v=e==null?void 0:e.data)==null?void 0:v.streamUrl),connectionType:c});const{bandwidthEstimateBPS:d,historicBandwidthEstimateBPS:f,type:h}=await(l==null?void 0:l.getNetworkInfo())||{};t.sendEventToListener({type:Ds.STREAM_PAUSE,eventDetails:{isLive:o,stationId:u,stationName:e?e.getTitle():void 0,streamerType:a,uptimeMs:n?Date.now()-n:0,retryCount:r,bandwidthEstimateBPS:d,historicBandwidthEstimateBPS:f,connectivityType:h,isNativeErrorHandling:!0}}),r&&t.sendEventToListener({type:Ds.STREAM_RECONNECT_ABORTED,eventDetails:{isLive:o,stationId:u,stationName:e?e.getTitle():void 0,streamerType:a,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],bandwidthEstimateBPS:d,historicBandwidthEstimateBPS:f,connectivityType:h,isNativeErrorHandling:!0}})},sendPlayEvent:async({analyticsProvider:t,episode:e,firstLoadTime:n,retryCount:r,contentType:i,elapsed:s,metadata:{isLive:a=!1}={},deviceInfoProvider:o,errors:l})=>{var g;const u=(g=e==null?void 0:e.data)==null?void 0:g.id;if(!e||!u)return;const c=o==null?void 0:o.getAudioRoute();t.sendPlayerEvent({type:As.PLAY,contentId:u,rewindFlag:a,currentPosition:e?Mh(e.getStartTimeSeconds()+(s??0)):void 0,streamUrl:ru(e==null?void 0:e.data.streamUrl),connectionType:c});const{bandwidthEstimateBPS:d,historicBandwidthEstimateBPS:f,type:h}=await(o==null?void 0:o.getNetworkInfo())||{};t.sendEventToListener({type:Ds.STREAM_PLAY,eventDetails:{isLive:a,stationId:u,stationName:e?e.getTitle():void 0,streamerType:i,uptimeMs:n?Date.now()-n:0,retryCount:r,bandwidthEstimateBPS:d,historicBandwidthEstimateBPS:f,connectivityType:h,isNativeErrorHandling:!0}}),r&&t.sendEventToListener({type:Ds.STREAM_RECONNECT_SUCCESSFUL,eventDetails:{isLive:a,stationId:u,stationName:e?e.getTitle():void 0,streamerType:i,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:l==null?void 0:l[0],bandwidthEstimateBPS:d,historicBandwidthEstimateBPS:f,connectivityType:h,isNativeErrorHandling:!0}})},sendBufferingEvent:bn(()=>(LE.addEvent("end_buffering"),{bufferStartTime:Date.now()})),sendResumeFromBufferingEvent:bn(()=>(LE.addEvent("end_buffering"),{bufferStartTime:void 0})),sendNativePlaybackFailedEvent:({analyticsProvider:t,contentType:e,item:n,firstLoadTime:r,retryCount:i,metadata:{isLive:s=!1}={}},a)=>{Pn.info(`[${Rn.Streaming}]: RewindStationMachine: sendNativePlaybackFailedEvent event:
174${JSON.stringify(a,null,2)}`),t.sendEventToListener({type:Ds.STREAM_PLAYBACK_FAILED,eventDetails:{isLive:s,stationId:n.getId(),stationName:n.getTitle(),streamerType:e,uptimeMs:r?Date.now()-r:0,retryCount:i,error:{errorMessage:a==null?void 0:a.errorMessage,errorType:a==null?void 0:a.error},isNativeErrorHandling:!0}})},sendPlaybackFailedToLoadEvent:({analyticsProvider:t,contentType:e,item:n,firstLoadTime:r,retryCount:i,metadata:{isLive:s=!1}={}},a)=>{Pn.info(`[${Rn.Streaming}]: RewindStationMachine: sendPlaybackFailedToLoadEvent event:
175${JSON.stringify(a,null,2)}`),t.sendEventToListener({type:Ds.STREAM_FAILED_TO_LOAD,eventDetails:{isLive:s,stationId:n.getId(),stationName:n.getTitle(),streamerType:e,uptimeMs:r?Date.now()-r:0,retryCount:i,error:{...a},isNativeErrorHandling:!0}})},...A7}}),EYe=async(t,e,n)=>{const r=await jKe(t);if(!r)return;n==null||n.info("Using server-side rewind provider",t);const{station:i,episode:s,streamType:a,standaloneChapter:o}=r;return VY.withContext({...VY.context,item:a==="BROADCAST"?i:t,streamType:a,station:i,episode:s,standaloneChapter:o})};class TYe{constructor(){et(this,"info",{})}setDeviceInfo(e){for(const n in e)this.info[n]=e[n]}getDeviceInfo(){return this.info}}const AYe=new TYe;/*! *****************************************************************************
176Copyright (c) Microsoft Corporation.
177
178Permission to use, copy, modify, and/or distribute this software for any
179purpose with or without fee is hereby granted.
180
181THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
182REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
183AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
184INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
185LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
186OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
187PERFORMANCE OF THIS SOFTWARE.
188***************************************************************************** */var Fh=function(){return Fh=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Fh.apply(this,arguments)};function wYe(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function _Ye(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var CYe=K_;K_.default=K_;K_.stable=Sce;K_.stableStringify=Sce;var oL="[...]",yce="[Circular]",W0=[],n0=[];function bce(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function K_(t,e,n,r){typeof r>"u"&&(r=bce()),DU(t,"",0,[],void 0,0,r);var i;try{n0.length===0?i=JSON.stringify(t,e,n):i=JSON.stringify(t,Ece(e),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;W0.length!==0;){var s=W0.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function DE(t,e,n,r){var i=Object.getOwnPropertyDescriptor(r,n);i.get!==void 0?i.configurable?(Object.defineProperty(r,n,{value:t}),W0.push([r,n,e,i])):n0.push([e,n,t]):(r[n]=t,W0.push([r,n,e]))}function DU(t,e,n,r,i,s,a){s+=1;var o;if(typeof t=="object"&&t!==null){for(o=0;o<r.length;o++)if(r[o]===t){DE(yce,t,e,i);return}if(typeof a.depthLimit<"u"&&s>a.depthLimit){DE(oL,t,e,i);return}if(typeof a.edgesLimit<"u"&&n+1>a.edgesLimit){DE(oL,t,e,i);return}if(r.push(t),Array.isArray(t))for(o=0;o<t.length;o++)DU(t[o],o,o,r,t,s,a);else{var l=Object.keys(t);for(o=0;o<l.length;o++){var u=l[o];DU(t[u],u,o,r,t,s,a)}}r.pop()}}function xYe(t,e){return t<e?-1:t>e?1:0}function Sce(t,e,n,r){typeof r>"u"&&(r=bce());var i=kU(t,"",0,[],void 0,0,r)||t,s;try{n0.length===0?s=JSON.stringify(i,e,n):s=JSON.stringify(i,Ece(e),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;W0.length!==0;){var a=W0.pop();a.length===4?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return s}function kU(t,e,n,r,i,s,a){s+=1;var o;if(typeof t=="object"&&t!==null){for(o=0;o<r.length;o++)if(r[o]===t){DE(yce,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof a.depthLimit<"u"&&s>a.depthLimit){DE(oL,t,e,i);return}if(typeof a.edgesLimit<"u"&&n+1>a.edgesLimit){DE(oL,t,e,i);return}if(r.push(t),Array.isArray(t))for(o=0;o<t.length;o++)kU(t[o],o,o,r,t,s,a);else{var l={},u=Object.keys(t).sort(xYe);for(o=0;o<u.length;o++){var c=u[o];kU(t[c],c,o,r,t,s,a),l[c]=t[c]}if(typeof i<"u")W0.push([i,e,t]),i[e]=l;else return l}r.pop()}}function Ece(t){return t=typeof t<"u"?t:function(e,n){return n},function(e,n){if(n0.length>0)for(var r=0;r<n0.length;r++){var i=n0[r];if(i[1]===e&&i[0]===n){n=i[2],n0.splice(r,1);break}}return t.call(this,e,n)}}const IYe=pi(CYe);function HY(t){return typeof t=="function"?t():t}function NU(t,e){try{return JSON.stringify(t,e)}catch{return IYe(t,e)}}function Tce(t,e,n){var r,i,s={};try{for(var a=_Ye(e),o=a.next();!o.done;o=a.next()){var l=o.value;s[l]=t[l]}}catch(c){r={error:c}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var u=JSON.parse(NU(s,n));return NU(Fh(Fh({},t),u))}function MU(t,e){t.machine,t.configuration,t.history;var n=wYe(t,["machine","configuration","history"]);return Tce(n,["context","event","_event"],e)}function Ace(t,e){return Tce(t.definition,["context"],e)}function OYe(t,e){t===void 0&&(t=globalThis.__xstate__);var n=new Map,r=t.onRegister(function(i){n.set(i.sessionId,i)});return sx({predictableActionArguments:!0,initial:"pendingConnection",context:{client:void 0},states:{pendingConnection:{},connected:{on:{"service.state":{actions:function(i,s){return i.client.send(s)}},"service.event":{actions:function(i,s){return i.client.send(s)}},"service.register":{actions:function(i,s){return i.client.send(s)}},"service.stop":{actions:function(i,s){return i.client.send(s)}},"xstate.event":{actions:function(i,s){var a=s.event,o=JSON.parse(a),l=n.get(o.origin);l==null||l.send(o)}},unload:{actions:function(i){i.client.send({type:"xstate.disconnect"})}},disconnect:"disconnected"}},disconnected:{entry:function(){r.unsubscribe()},type:"final"}},on:{"xstate.inspecting":{target:".connected",actions:[bn({client:function(i,s){return s.client}}
188),function(i){t.services.forEach(function(s){var a;(a=i.client)===null||a===void 0||a.send({type:"service.register",machine:Ace(s.machine,e==null?void 0:e.serialize),state:MU(s.state||s.initialState,e==null?void 0:e.serialize),sessionId:s.sessionId})})}]}}})}var eF=new Map;function PYe(){var t=new Set,e=new Set;return{services:t,register:function(n){t.add(n),eF.set(n.sessionId,n),e.forEach(function(r){return r(n)}),n.onStop(function(){t.delete(n),eF.delete(n.sessionId)})},unregister:function(n){t.delete(n),eF.delete(n.sessionId)},onRegister:function(n){return e.add(n),t.forEach(function(r){return n(r)}),{unsubscribe:function(){e.delete(n)}}}}}var RYe={url:"https://stately.ai/viz?inspect",iframe:function(){return document.querySelector("iframe[data-xstate]")},devTools:function(){var t=PYe();return globalThis.__xstate__=t,t},serialize:void 0,targetWindow:void 0},LYe=function(t){var e=Fh(Fh({},RYe),t);return Fh(Fh({},e),{url:new URL(e.url),iframe:HY(e.iframe),devTools:HY(e.devTools)})},jY=new Set;function DYe(t){var e=LYe(t),n=e.iframe,r=e.url,i=e.devTools;if((t==null?void 0:t.targetWindow)===null)throw new Error("Received a nullable `targetWindow`.");var s=e.targetWindow;if(n===null&&!s){console.warn("No suitable <iframe> found to embed the inspector. Please pass an <iframe> element to `inspect(iframe)` or create an <iframe data-xstate></iframe> element.");return}var a=OYe(i,t),o=o7(a).start(),l=new Set,u=o.subscribe(function(h){l.forEach(function(g){return g.next(h)})}),c,d=function(h){if(typeof h.data=="object"&&h.data!==null&&"type"in h.data){n&&!s&&(s=n.contentWindow),c||(c={send:function(v){s.postMessage(v,r.origin)}});var g=Fh(Fh({},h.data),{client:c});o.send(g)}};window.addEventListener("message",d),window.addEventListener("unload",function(){o.send({type:"unload"})});var f=function(h){return NU(h,t==null?void 0:t.serialize)};return i.onRegister(function(h){var g,v=h.state||h.initialState;if(o.send({type:"service.register",machine:Ace(h.machine,t==null?void 0:t.serialize),state:MU(v,t==null?void 0:t.serialize),sessionId:h.sessionId,id:h.id,parent:(g=h.parent)===null||g===void 0?void 0:g.sessionId}),o.send({type:"service.event",event:f(v._event),sessionId:h.sessionId}),!jY.has(h)){jY.add(h);var b=h.send.bind(h);h.send=function(A,w){return o.send({type:"service.event",event:f(Oo(ix(A,w))),sessionId:h.sessionId}),b(A,w)}}h.subscribe(function(S){S!==void 0&&o.send({type:"service.state",state:MU(S,t==null?void 0:t.serialize),sessionId:h.sessionId})}),h.onStop(function(){o.send({type:"service.stop",sessionId:h.sessionId})})}),n?(n.addEventListener("load",function(){s=n.contentWindow}),n.setAttribute("src",String(r))):s||(s=window.open(String(r),"xstateinspector")),{send:function(h){o.send(h)},subscribe:function(h,g,v){var b=Bw(h,g,v);return l.add(b),b.next(o.state),{unsubscribe:function(){l.delete(b)}}},disconnect:function(){o.send("disconnect"),window.removeEventListener("message",d),u.unsubscribe()}}}var kYe=vb,NYe=Ld,MYe=bb,FYe="[object String]";function $Ye(t){return typeof t=="string"||!NYe(t)&&MYe(t)&&kYe(t)==FYe}var wce=$Ye;const Jl=pi(wce),BYe=5;var y0,b0,RC;class UYe{constructor(e){Mn(this,y0);Mn(this,b0);Mn(this,RC);hn(this,y0,new Map),hn(this,b0,new Map),hn(this,RC,e)}setLiveStationSessionId(e,n){Ne(this,y0).set(e,n??"")}getLiveStationSessionId(e){return Ne(this,y0).get(e)}isNewStationSession(e,n){const r=this.getLiveStationSessionId(e)??"";return n!==r}setLiveStationTimestamp(e,n){Ne(this,b0).set(e,n)}getLiveStationTimestamp(e){return Ne(this,b0).get(e)??null}isLiveStationResumable(e,n){const r=this.getLiveStationTimestamp(e);if(!r)return!1;const i=Ne(this,RC)*60*1e3;return n-r<i}clearLiveStationSessions(){Ne(this,y0).clear(),Ne(this,b0).clear()}}y0=new WeakMap,b0=new WeakMap,RC=new WeakMap;const zY=Object.freeze(new UYe(BYe)),dO=sx({predictableActionArguments:!0,id:"liveStationMachine",initial:"LOADING",tsTypes:{},schema:{context:{},events:{},services:{}},states:{LOADING:{entry:["assignDefaults"],invoke:{src:"loadSources",onDone:{actions:g2([{cond:"shouldPlayAudioPreroll",actions:["assignAudioSources","loadAudioVastAd"]},{actions:["assignAudioSources","loadAudio"]}])}},on:{REPORT_LOADED:{target:"LOADED"},REPORT_METADATA:{actions:"assignMetadata"},PAUSE:{target:"PAUSED",actions:"pauseLiveStation"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},TRANSITION_TO_BUFFERING:{entry:["sendBufferingEvent"],on:{REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},REPORT_PLAYING:{actions:["sendResumeFromBufferingEvent"],target:"PLAYING"},...ii},after:[{target:"BUFFERING",delay:100}]},LOADED:{entry:"autoplay",on:{PLAY:{target:"PLAY_REQUESTED"},REPORT_METADATA:{actions:"assignMetadata"},PAUSE:{target:"PAUSED",actions:"pauseLiveStation"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},PLAY_REQUESTED:{entry:["playLiveStation"],on:{REPORT_PLAYING:{actions:["sendPlayEvent","addToHistory"],target:"PLAYING"},REPORT_METADATA:{actions:"assignMetadata"},REPORT_AUTOPLAY_POLICY:{target:"PAUSED"},PAUSE:{target:"PAUSED",actions:"pauseLiveStation"},STOP:{target:"PAUSED",actions:["stop","sendStopEvent"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},BUFFERING:{on:{PAUSE:{target:"PAUSE_REQUESTED"},REPORT_LOADING:{target:"TRANSITION_TO_BUFFERING"},REPORT_PAUSED:{target:"PAUSED"},REPORT_PLAYING:{actions:["sendResumeFromBufferingEvent"],target:"PLAYING"},REPORT_METADATA:{actions:["sendLiveSongListenedEvent","assignMetadata"]},STOP:{target:"PAUSED",actions:["stop","sendStopEvent"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},PLAYING:{initial:"IS_PLAYING",entry:["assignRetryCountToZero"],states:{IS_PLAYING:{on:{REPORT_TIME_UPDATE:{target:"IS_PLAYING"}}}},on:{PAUSE:{target:"PAUSE_REQUESTED"},REPORT_LOADING:{target:"TRANSITION_TO_BUFFERING"},REPORT_PAUSED:{target:"PAUSED"},REPORT_METADATA:{actions:["sendLiveSongListenedEvent","assignMetadata"]},STOP:{actions:["stop","sendStopEvent"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},PAUSE_REQUESTED:{entry:"pauseLiveStation",on:{...ii,REPORT_PAUSED:{target:"PAUSED"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"}}},PAUSED:{entry:["sendStopEvent","assignRetryCountToZero"],on:{PLAY:{target:"LOADING"},REPORT_PLAYING:{target:"PLAYING"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},FAILURE_WITH_RETRY:{entry:["assignIncrementRetryCount","logRetry"],on:{...ii},after:[{target:"WAITING_TO_RETRY",delay:100}]},WAITING_TO_RETRY:{on:{PLAY:{target:"LOADING"},PAUSE:{target:"PAUSED",actions:"pauseLiveStation"},STOP:{actions:["stop","sendStopEvent"]},REPORT_PAUSED:{target:"PAUSED"},...ii},after:[{target:"FAILURE",delay:t=>A1(t.retryCount),cond:({retryCount:t=0})=>t>=G0},{actions:["stop","loadAudio",yU({type:"PLAY"})],target:"LOADING",delay:t=>A1(t.retryCount),cond:({retryCount:t=0})=>t<G0}]},FAILURE:{id:"failure",on:ii,entry:["sendPlaybackFailedEvent"],after:[{delay:1500,target:"PAUSED",actions:yU({type:"CHILD.TRANSITIONED"})}]},DESTROYED:{entry:["stop","sendStopEvent"],type:"final"}}},{services:{loadSources:dce},guards:{shouldPlayAudioPreroll:t=>{const e=t.platform===bs.ANDROID||t.platform===bs.IOS,n=t.item.data.ownerOperatorIdent!==eU.AUDACY_OWNED_AND_OPERATED_CODE,r=t.item.getTritonName()||"",i=!ys.get(eU.AUDIO_PREROLL);return!!(e&&n&&i&&r)}}
188,actions:{assignDefaults:bn(({analyticsProvider:t,item:e,metadata:n,firstLoadTime:r})=>{var i,s;return n||(t.sendEventToListener({type:Ds.STREAM_LOAD,eventDetails:{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.LiveStation,isNativeErrorHandling:!0}}),LE.init(t,{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.Rewind})),{contentType:ts.LiveStation,firstLoadTime:r||Date.now(),metadata:{...n,image:e.getImageSquare(),station:((i=e.data)==null?void 0:i.parentTitle)??e.getTitle(),artist:(s=e.data)!=null&&s.parentTitle?e.getTitle():void 0}}}),assignAudioSources:bn((t,{data:e})=>({audioSources:e})),assignRetryCountToZero:bn({retryCount:0}),assignIncrementRetryCount:bn({retryCount:({retryCount:t=0})=>t+1}),addToHistory:t=>{const e=t.item.getId();t.personalizationProvider.isInTopOfHistoryStack(e)||t.personalizationProvider.addToHistory([e])},loadAudioVastAd:async t=>{var n;if(t.player.isAudioPreroll)t.player.playPrerollInProgress();else{const r=t.item.getTritonName()||"",i=t.dataProvider.env,s=t.audioSources[0],a=await FKe(r,i);(n=t.player)==null||n.load({url:a.creativeUrl||s.url,isPodcast:!1,isAudioPreroll:!!a.creativeUrl,liveContentUrl:s.url,companionAd:a.companionAd}),a.adStartTrackers.length>0&&$Ke(a.adStartTrackers)}},assignMetadata:bn({metadata:({metadata:t},{metadata:e})=>{const n=!!(e!=null&&e.contentType),r=Qh(t==null?void 0:t.contentType)&&!n&&!(e!=null&&e.songOrShow);return n&&!(e!=null&&e.companionAdIframeUrl)&&(t!=null&&t.companionAdIframeUrl)?t==null||delete t.companionAdIframeUrl:r&&(e.companionAdIframeUrl=t==null?void 0:t.companionAdIframeUrl,e.songOrShow=t==null?void 0:t.songOrShow,e.artist=t==null?void 0:t.artist),{...t,...e,isAd:Qh(e==null?void 0:e.contentType)}}}),loadAudio:({audioSources:t,player:e,autoplay:n,item:r,contentStartEligible:i,dataProvider:s})=>{var l;const a=t[0],o=new H0(a.url);if(i){const u=(l=r.data)==null?void 0:l.id,c=s==null?void 0:s.sessionId;zY.isNewStationSession(u,c)&&(o.addQuery("content_start","1"),zY.setLiveStationSessionId(u,c))}if(a){const u=o.valueOf();e==null||e.load({url:u,isPodcast:a.type!=="m3u8",isAudioPreroll:!1,liveContentUrl:"",autoplay:n})}},playLiveStation:t=>{var u;const{audioSources:e,player:n,item:r,playLive:i}=t,s=e[0],o=new H0(s.url).valueOf(),l=r.getId();t.lastPlayedContentId!==l&&(w7(n,r,i,(u=t.credentialsProvider)==null?void 0:u.userToken),t.lastPlayedContentId=l,_7(n,i,o)),n.play()},pauseLiveStation:t=>{var e;((e=t.player)==null?void 0:e.reportPlaybackEnded)!==void 0&&t.player.reportPlaybackEnded(),t.platform===bs.ANDROID||t.platform===bs.IOS?t.player.pause():t.player.stop()},sendLiveSongListenedEvent:(t,e)=>{var c;const n=t.metadata,r=e.metadata,i=(n==null?void 0:n.songOrShow)!==(r==null?void 0:r.songOrShow),s=(n==null?void 0:n.songOrShow)||"",a=n&&n.contentType==="content",o=!!(n!=null&&n.artist),l=!!(n!=null&&n.songOrShow),u=(c=t.deviceInfoProvider)==null?void 0:c.getAudioRoute();n&&i&&a&&o&&l&&t.analyticsProvider.sendSongListenedEvent(As.SONG_LISTENED,t.item.data.id,s,{connectionType:u,streamUrl:ru(t.item.data.streamUrl)})},sendPlayEvent:({analyticsProvider:t,item:e,firstLoadTime:n,retryCount:r,errors:i})=>{if(e.data.id){const s=ru(e.data.streamUrl);t.sendPlayerEvent({type:As.PLAY,contentId:e.data.id,streamUrl:s}),t.sendEventToListener({type:Ds.STREAM_PLAY,eventDetails:{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.LiveStation,uptimeMs:n?Date.now()-n:0,retryCount:r,isNativeErrorHandling:!0}}),r&&t.sendEventToListener({type:Ds.STREAM_RECONNECT_SUCCESSFUL,eventDetails:{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.LiveStation,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],isNativeErrorHandling:!0}})}},sendStopEvent:({analyticsProvider:t,item:e,firstLoadTime:n,retryCount:r,errors:i})=>{e.data.id&&(t.sendPlayerEvent({type:As.STOP,contentId:e.data.id,streamUrl:ru(e.data.streamUrl)}),t.sendEventToListener({type:Ds.STREAM_PAUSE,eventDetails:{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.LiveStation,uptimeMs:n?Date.now()-n:0,retryCount:r,isNativeErrorHandling:!0}}),r&&t.sendEventToListener({type:Ds.STREAM_RECONNECT_ABORTED,eventDetails:{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.LiveStation,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],isNativeErrorHandling:!0}}))},sendBufferingEvent:bn(()=>(LE.addEvent("start_buffering"),{bufferStartTime:Date.now()})),sendResumeFromBufferingEvent:bn(()=>(LE.addEvent("end_buffering"),{bufferStartTime:void 0})),sendNativePlaybackFailedEvent:({analyticsProvider:t,item:e,firstLoadTime:n,retryCount:r},i)=>{Pn.info(`[${Rn.Streaming}]: LiveStationMachine: sendNativePlaybackFailedEvent event:
189${JSON.stringify(i,null,2)}`),t.sendEventToListener({type:Ds.STREAM_PLAYBACK_FAILED,eventDetails:{stationId:e.getId(),stationName:e.getTitle(),streamerType:ts.LiveStation,uptimeMs:n?Date.now()-n:0,retryCount:r,error:{errorMessage:i.errorMessage,errorType:i.error},isNativeErrorHandling:!0}})},...A7}}),VYe=async t=>{var e,n;if(t instanceof Ec&&t.getEntityType()===gt.STATION&&t.getEntitySubtype()===Fr.BROADCAST){Pn.info(`[${Rn.Streaming}]: LiveStationMachine: using NativePlayerErrorHandling streaming machine`);const r=oo.getAll().startOnSong,i=((e=t.data)==null?void 0:e.ownerOperatorIdent)==="501-1"&&((n=t.data)==null?void 0:n.category)==="Music",s=r&&i;return dO.withContext({...dO.context,item:t,contentStartEligible:s})}else if(t instanceof au&&t.getEntitySubtype()===Vn.HOST_CREATED_EPISODE)return Pn.info(`[${Rn.Streaming}]: LiveStationMachine: using NativePlayerErrorHandling streaming machine`),dO.withContext({...dO.context,item:t})},HYe="podcastEpisodeMachine",{RESUME_POINT_INTERVAL_MSEC:jYe}=cle,zYe=async t=>{var a;const e=t.item.getChapters({broadcastChapters:(a=t.featureFlags)==null?void 0:a.broadcastChapters}),n=t.personalizationProvider.getPlaybacks(),r=await e,s=(await n)[t.item.getId()];return{chapters:r,requestedOffset:s}},GY=(t,e=!0)=>{const{elapsed:n,personalizationProvider:r,item:i}=t;n!==void 0&&r.setPlayback(i.getId(),n,e)},WY=sx({predictableActionArguments:!0,id:"podcastEpisodeMachine",initial:"LOADING",tsTypes:{},schema:{context:{timeSinceLastSavedResumePoint:Date.now()},events:{},services:{}},states:{LOADING:{entry:["assignDefaults","clearFailed"],initial:"LOADING_INFO",states:{LOADING_INFO:{invoke:{id:"getEpisodeInfo",src:"getEpisodeInfo",onDone:{actions:["assignChapter
189s","assignRequestedOffset"],target:"LOADING_AUDIO"},onError:{target:"#failure",actions:Im("LOADING_INFO","podcastEpisodeMachine")}}},LOADING_AUDIO:{entry:"loadAudio"}},on:{REPORT_LOADED:{target:"LOADED"},REPORT_FAILURE:{actions:["logPlaybackError","sendPlaybackErrorEvent","assignTrackError"],target:"FAILURE"},PAUSE:{target:"PAUSE_REQUESTED"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii},after:{[X3]:{target:"FAILURE",actions:$Be("LOADING","podcastEpisodeMachine")}}},TRANSITION_TO_BUFFERING:{on:{PAUSE:{actions:"logPauseAttempt"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},REPORT_PLAYING:{actions:["sendResumeFromBufferingEvent"],target:"PLAYING"},...ii},after:[{target:"BUFFERING",delay:100}]},LOADED:{entry:"autoplay",on:{PLAY:{target:"PLAY_REQUESTED"},SEEK_TIME:{actions:["seekTime","assignTime","clearRequestedOffset","saveResumePoint"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},PLAY_REQUESTED:{id:"playRequested",entry:["playWithOffset","clearRequestedOffset"],on:{REPORT_PLAYING:{actions:["sendPlayEvent","addToHistory"],target:"PLAYING"},REPORT_AUTOPLAY_POLICY:{target:"PAUSED"},PAUSE:{target:"PAUSE_REQUESTED"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii},after:{[X3]:{target:"FAILURE"}}},BUFFERING:{on:{PAUSE:{target:"PAUSE_REQUESTED"},REPORT_LOADING:{target:"TRANSITION_TO_BUFFERING"},REPORT_PAUSED:{target:"PAUSED"},REPORT_PLAYING:{actions:["sendResumeFromBufferingEvent"],target:"PLAYING"},REPORT_METADATA:{actions:["sendLiveSongListenedEvent","assignMetadata"]},STOP:{target:"PAUSED",actions:["stop","sendStopEvent"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},PLAYING:{initial:"IS_PLAYING",states:{IS_PLAYING:{on:{REPORT_TIME_UPDATE:{target:"IS_PLAYING",actions:["assignTime","assignDuration","updateChapterIndex","saveLocalResumePoint"]}}},IS_ERROR:{on:{REPORT_FAILURE:{actions:["logPlaybackError","sendPlaybackErrorEvent","assignTrackError"]},REPORT_TIME_UPDATE:{target:"IS_PLAYING",actions:["assignTime","assignDuration","updateChapterIndex"]}}},IS_FATAL_ERROR:{entry:"logPlaybackFailure",after:[{delay:IU,target:"#failure"}]}},on:{PAUSE:{target:"PAUSE_REQUESTED"},REPORT_ENDED:{target:"ENDED"},REPORT_LOADING:{target:"TRANSITION_TO_BUFFERING"},REPORT_PAUSED:{target:"PAUSED"},SEEK_TIME:{actions:["seekTime","assignTime","saveResumePoint"]},STOP:{actions:["stop","sendStopEvent","saveResumePoint"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},PAUSE_REQUESTED:{entry:"pause",on:{...ii,REPORT_PAUSED:{target:"PAUSED",actions:"saveResumePoint"},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"}},after:{[X3]:{target:"FAILURE"}}},PAUSED:{on:{PLAY:[{target:"LOADING",cond:"hasFailed"},{target:"PLAY_REQUESTED"}],REPORT_PLAYING:{target:"PLAYING"},REPORT_TIME_UPDATE:{actions:["assignTime"]},SEEK_TIME:{actions:["seekTime","assignTime","updateChapterIndex","saveResumePoint"]},REPORT_PLAYBACK_FAILED:{target:"FAILURE_WITH_RETRY",actions:"sendNativePlaybackFailedEvent"},...ii}},FAILURE_WITH_RETRY:{entry:["assignIncrementRetryCount","logRetry","saveResumePoint"],on:{...ii},after:[{target:"WAITING_TO_RETRY",delay:100}]},WAITING_TO_RETRY:{on:{PLAY:{target:"LOADING"},PAUSE:{target:"PAUSED",actions:"pause"},STOP:{actions:["stop","sendStopEvent"]},REPORT_PAUSED:{target:"PAUSED"},...ii},after:[{target:"FAILURE",delay:t=>A1(t.retryCount),cond:({retryCount:t=0})=>t>=G0},{actions:["stop","loadAudio",bn(t=>({requestedOffset:t.elapsed??t.requestedOffset??0}))],target:"PLAY_REQUESTED",delay:t=>A1(t.retryCount),cond:({retryCount:t=0})=>t<G0}]},FAILURE:{id:"failure",on:ii,entry:["sendPlaybackFailedEvent"],after:[{delay:1500,target:"PAUSED"}]},ENDED:{entry:["sendStopEvent","markAsEnded","saveResumePoint"],on:{PLAY:[{target:"PLAY_REQUESTED",cond:"isPlaybackPositionAtEnd",actions:"resetTime"},{target:"PLAY_REQUESTED",actions:"resetTime"}],SEEK_TIME:{target:"PAUSED",actions:["assignTime","seekTime"]},...ii}},DESTROYED:{entry:["stop","sendStopEvent","saveResumePoint"],type:"final"}}},{services:{getEpisodeInfo:zYe},guards:{hasFailed:({failed:t})=>!!t,isPlaybackPositionAtEnd:({elapsed:t,episode:e,metadata:n})=>{if(!t||!e)return!0;const r=(n==null?void 0:n.duration)??e.getDuration();return t>=r}},actions:{addToHistory:t=>{const e=t.item.getId();t.personalizationProvider.isInTopOfHistoryStack(e)||t.personalizationProvider.addToHistory([e])},assignDefaults:bn(({item:t,metadata:e,firstLoadTime:n,analyticsProvider:r})=>(e||r.sendEventToListener({type:Ds.STREAM_LOAD,eventDetails:{stationId:t.getId(),stationName:t.getTitle(),streamerType:ts.Podcast,isNativeErrorHandling:!0}}),{contentType:ts.Podcast,firstLoadTime:n||Date.now(),metadata:{duration:t.getDuration(),songOrShow:t.getTitle(),image:t.getImageSquare()||t.getParentImageSquare(),artist:t.getParentTitle()}}
189)),assignChapters:bn((t,{data:{chapters:e}})=>({chapters:e})),updateChapterIndex:bn(({elapsed:t,chapters:e})=>{if(!t||!e||e.length===0)return{};const n=e==null?void 0:e.findIndex(r=>t>=r.getStartOffset()&&t<r.getStartOffset()+r.getDuration());return n===-1?{currentChapterIndex:void 0}:{currentChapterIndex:n}}),clearRequestedOffset:bn({requestedOffset:t=>{}}),assignRequestedOffset:bn((t,{data:{requestedOffset:e}})=>Mi.isUndefined(t.requestedOffset)?{requestedOffset:e}:t),loadAudio:t=>{const{analyticsProvider:e,item:n,metadata:r,player:i}=t,s=n==null?void 0:n.getAudioStream(),a=sL({optIn:!Zh.disableTargetedAds}),l=new H0(s).addQuery("gpp",a).valueOf();r||e.sendEventToListener({type:Ds.STREAM_LOAD,eventDetails:{contentId:n.getId(),streamerType:ts.Podcast,isNativeErrorHandling:!0}}),i==null||i.load({url:l,isPodcast:!0,isAudioPreroll:!1,liveContentUrl:"",autoplay:!1})},playWithOffset:t=>{var v;const{player:e,item:n,requestedOffset:r,metadata:i,elapsed:s}=t,a=n==null?void 0:n.getAudioStream(),o=sL({optIn:!Zh.disableTargetedAds}),u=new H0(a).addQuery("gpp",o).valueOf(),c=(i==null?void 0:i.duration)??0,f=Math.ceil(r??s??0);let h;f>0&&(c>0&&f>=c?h=void 0:h=f);const g=n.getId();t.lastPlayedContentId!==g&&(w7(e,n,!1,(v=t.credentialsProvider)==null?void 0:v.userToken),t.lastPlayedContentId=g,_7(e,!1,u)),e.playWithOffset(h)},resetTime:t=>{var e;return(e=t==null?void 0:t.player)==null?void 0:e.setPosition(0)},seekTime:({metadata:t,item:e,analyticsProvider:n,player:r,elapsed:i,deviceInfoProvider:s},a)=>{if(r==null||r.setPosition(Mi.clamp(a.time,0,(t==null?void 0:t.duration)??e.data.duration)),i!==void 0){const o=a.time>i?As.FAST_FORWARD:As.REWIND,l=s==null?void 0:s.getAudioRoute(),u=ru(e==null?void 0:e.data.streamUrl);n==null||n.sendPlayerEvent({type:o,contentId:e==null?void 0:e.data.id,connectionType:l,currentPosition:Mh(i),streamUrl:u})}},assignTime:bn({elapsed:(t,{time:e})=>e}),assignTrackError:bn(({errors:t},e)=>{const{error:n,errorMessage:r}=e||{},i=n?n.raw||n:r;return{errors:[{errorMessage:r,context:i},...t||[]].slice(0,5)}}),assignDuration:bn({metadata:(t,e)=>{var n;return{...t.metadata,duration:e.duration??((n=t.metadata)==null?void 0:n.duration)}}}),saveResumePoint:t=>{GY(t)},markAsEnded:bn({elapsed:(t,e)=>{var n;return((n=t==null?void 0:t.metadata)==null?void 0:n.duration)??0}}),sendResumeFromBufferingEvent:bn(({analyticsProvider:t,item:e,bufferStartTime:n,firstLoadTime:r})=>(t.sendEventToListener({type:Ds.STREAM_RESUME_FROM_BUFFERING,eventDetails:{stationId:e.getId(),streamerType:ts.Podcast,uptimeMs:r?Date.now()-r:0,timeBufferingMs:n?Date.now()-n:0,isNativeErrorHandling:!0}}),{bufferStartTime:void 0})),sendPlayEvent:({analyticsProvider:t,item:e,firstLoadTime:n,retryCount:r,errors:i,deviceInfoProvider:s,elapsed:a})=>{if(!(e!=null&&e.data.id))return;const o=s==null?void 0:s.getAudioRoute(),l=Mh(a??(e==null?void 0:e.data.currentPosition)),u=ru(e==null?void 0:e.data.streamUrl);t.sendPlayerEvent({type:As.PLAY,contentId:e.data.id,connectionType:o,currentPosition:l,streamUrl:u}),t.sendEventToListener({type:Ds.STREAM_PLAY,eventDetails:{stationId:e==null?void 0:e.data.id,stationName:e.getTitle(),streamerType:ts.Podcast,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],isNativeErrorHandling:!0}}),r&&t.sendEventToListener({type:Ds.STREAM_RECONNECT_SUCCESSFUL,eventDetails:{stationId:e==null?void 0:e.data.id,streamerType:ts.Podcast,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],isNativeErrorHandling:!0}})},sendStopEvent:({analyticsProvider:t,episode:e,firstLoadTime:n,retryCount:r,errors:i,deviceInfoProvider:s,elapsed:a})=>{if(!(e!=null&&e.data.id))return;const o=s==null?void 0:s.getAudioRoute(),l=Mh(a??(e==null?void 0:e.data.currentPosition)),u=ru(e==null?void 0:e.data.streamUrl);t.sendPlayerEvent({type:As.STOP,contentId:e.data.id,connectionType:o,currentPosition:l,streamUrl:u}),t.sendEventToListener({type:Ds.STREAM_PAUSE,eventDetails:{stationId:e==null?void 0:e.data.id,stationName:e.getTitle(),streamerType:ts.Podcast,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],isNativeErrorHandling:!0}}),r&&t.sendEventToListener({type:Ds.STREAM_RECONNECT_ABORTED,eventDetails:{stationId:e==null?void 0:e.data.id,streamerType:ts.Podcast,uptimeMs:n?Date.now()-n:0,retryCount:r,mostRecentError:i==null?void 0:i[0],isNativeErrorHandling:!0}})},saveLocalResumePoint:t=>{t.timeSinceLastSavedResumePoint||(t.timeSinceLastSavedResumePoint=Date.now());const e=Date.now(),n=t.timeSinceLastSavedResumePoint+jYe;e>=n&&(GY(t,!1),t.timeSinceLastSavedResumePoint=Date.now())},clearFailed:bn({failed:!1}),sendNativePlaybackFailedEvent:({analyticsProvider:t,item:e,firstLoadTime:n,retryCount:r},i)=>{Pn.info(`[${Rn.Streaming}]: LiveStationMachine: sendNativePlaybackFailedEvent event:
190${JSON.stringify(i,null,2)}`),t.sendEventToListener({type:Ds.STREAM_PLAYBACK_FAILED,eventDetails:{stationId:e.getId(),streamerType:ts.LiveStation,uptimeMs:n?Date.now()-n:0,retryCount:r,error:{errorMessage:i.errorMessage,errorType:i.error},isNativeErrorHandling:!0}})},...A7}}),GYe=async t=>{if(t instanceof au&&t.getEntityType()===gt.EPISODE&&t.getEntitySubtype()===Vn.PODCAST_EPISODE)return WY.withContext({...WY.context,item:t})},WYe=(t,e,n)=>{const r=i=>{var s;switch(i.type){case"loading":e({type:"REPORT_LOADING"});break;case"loaded":e({type:"REPORT_LOADED"});break;case"playing":e({type:"REPORT_PLAYING"});break;case"paused":e({type:"REPORT_PAUSED"});break;
190case"destroyed":e({type:"REPORT_ENDED"}),e({type:"DESTROY"});break;case"continuePlaying":e({type:"REPORT_CONTINUE_PLAYING",playlistNextStartTime:i.playlistNextStartTime,playLive:i.playLive});break;case"ended":e({type:"REPORT_ENDED"});break;case"update":e({type:"REPORT_TIME_UPDATE",time:i.time,duration:i.duration});break;case"metadata":e({type:"REPORT_METADATA",metadata:i});break;case"error":((s=i.raw)==null?void 0:s.name)==="NotAllowedError"?e({type:"REPORT_AUTOPLAY_POLICY"}):e({type:"REPORT_FAILURE",errorMessage:kY,error:i});break;case"playbackFailed":e({type:"REPORT_PLAYBACK_FAILED",errorMessage:kY,error:i});break;case"stats":n==null||n.info(`player stats: ${JSON.stringify(i)}`);break;default:n==null||n.error(`Unhandled player event: ${i.type} with payload: ${JSON.stringify(i)}`);break}};return t.addEventListener(r),()=>t.removeEventListener(r)},qYe=async(t,e,n)=>{Pn.info(`[${Rn.Streaming}]: AudioServicesUtils: Choosing native error handling machine platform:${AYe.getDeviceInfo().platform}`);const r=[GYe,EYe,VYe];for(const i of r){const s=await i(t,e,n);if(s)return s}},KYe=t=>Jl(t)?t:Object.keys(t)[0],YYe=()=>{if([!1,!1,typeof document<"u"].every(Boolean)){const e=[/services/i,/provider/i,/player/i,/client/i,/logger/i];DYe({iframe:!1,serialize:(n,r)=>e.some(i=>i.test(n))?"[OBJECT TOO BIG]":PBe(r)?"[FUNCTION]":r})}},ZYe=t=>{var o;const e=t.personalizationProvider.getQueue().then(l=>l.items),n=t.personalizationProvider.getPlaybacks(),r=t.playerSettingsProvider.getVolume(),i=t.playerSettingsProvider.getIsMuted(),s=t.playerSettingsProvider.getPlaybackRate(),a=(o=t.unauthenticatedProvider)==null?void 0:o.getUnauthenticatedPlaybackTime();return Promise.all([e,n,r,i,s,a])},tF=t=>{const{activeCollection:e,activePlayableObject:n,playbacks:r}=t,i=e.findIndex(a=>a.data.id===(n==null?void 0:n.data.id)),s=e.findIndex((a,o)=>{let l=r[a.data.id];return a.getEntityType()===gt.STANDALONE_CHAPTER&&a instanceof gg&&(l=l-a.getStartOffset()),o>i&&!xg(a.data.durationSeconds,l)});return e[s]},qY=t=>{const{activeCollection:e,activePlayableObject:n,playbacks:r}=t,i=e.findIndex(o=>o.data.id===(n==null?void 0:n.data.id)),s=e.slice().reverse().findIndex((o,l,u)=>{let c=r[o.data.id];return o.getEntityType()===gt.STANDALONE_CHAPTER&&o instanceof gg&&(c=c-o.getStartOffset()),u.length-1-l<i&&!xg(o.data.durationSeconds,c)}),a=s===-1?-1:e.length-1-s;return e[a]},QYe=async t=>{const{activePlayableObject:e,player:n,marketingDataProvider:r,personalizationProvider:i,logger:s,locationProvider:a,credentialsProvider:o,platform:l,autoplay:u,startOffset:c,dataProvider:d,signalWireEventListener:f,analyticsProvider:h,deviceInfoProvider:g,playLive:v,skipsCount:b,featureFlags:S,unauthenticatedProvider:A}=t;if(!e)return;s==null||s.info("Searching for machine to play object with ID",e.getId());const w=await qYe(e,d,s);if(w)s==null||s.info("Found machine",w.id,"for playable object with ID",e.getId());else throw s==null||s.error("No machine found for playable object with ID",e.getId()),new Error("No machine found for playable object");const x=s==null?void 0:s.getSubLogger({name:`Streamer(${w.id})`}),P={personalizationProvider:i,marketingDataProvider:r,logger:x,locationProvider:a,credentialsProvider:o,player:n,platform:l,autoplay:u,requestedOffset:c,dataProvider:d,signalWireEventListener:f,analyticsProvider:h,deviceInfoProvider:g,playLive:v,skipsCount:b,featureFlags:S,unauthenticatedProvider:A};return w.withContext({...w.context,...P,rewindProvider:{...w.context.rewindProvider,playLive:v}})},XYe=({currentStreamerMachine:t})=>t,fO=t=>t===LU||t===HYe,lL="activeStreamer",JYe=1e3,eZe=sx({predictableActionArguments:!0,preserveActionOrder:!0,id:"audioServicesMachine",tsTypes:{},schema:{context:{},events:{},services:{}},type:"parallel",states:{PLAYBACK_TIMER:{initial:"STOPPED",states:{STOPPED:{id:"playback_timer_stopped",on:{REPORT_PLAYING:{target:"RUNNING",actions:"startPlaybackTimer"}}},RUNNING:{after:{[JYe]:{target:"RUNNING",actions:g2([{cond:"shouldSendContinueListen",actions:["sendContinueListenEvent","resetPlaybackTimer","updateInteractionTime"]},{actions:["updatePlaybackTimer","updateInteractionTime"]}])}},on:{REPORT_PAUSED:{target:"STOPPED",actions:"stopPlaybackTimer"}}}}},MAIN:{initial:"INITIALIZING",on:{SET_VOLUME:{actions:["assignVolume","setVolume","persistVolume"]}
190,SET_MUTED:{actions:["assignMuted","setMuted","persistMuted"]},SET_PLAYBACK_RATE:{actions:["assignPlaybackRate","setPlaybackRate","persistPlaybackRate"]},INCREMENT_PLAYBACK_RATE:{actions:["incrementPlaybackRate","setPlaybackRate","persistPlaybackRate","sendPlaybackRateEvent"]},SET_SLEEP_TIMER:{actions:["setSleepTimer","sendSetSleepTimerEvent"]},CANCEL_SLEEP_TIMER:{actions:["cancelSleepTimer","sendCancelSleepTimerEvent"]},UPDATE_COLLECTION:{actions:"assignActiveCollection"},UPDATE_PLAYBACKS:{actions:"assignPlaybacks"},SET_COLLECTION_PLAYBACK_MODE:{actions:"assignCollectionPlaybackMode"},SCRUB:{actions:"sendScrubEvent"}},states:{INITIALIZING:{invoke:{id:"initialize",src:"initialize",onDone:[{cond:({activePlayableObject:t})=>!!t,actions:["assignPersonalizationData","setVolume","setMuted"],target:"LOADING"},{actions:["assignPersonalizationData","setVolume","setMuted"],target:"IDLE"}],onError:{target:"IDLE"}},on:{LOAD_OBJECT:{actions:["assignActiveObject","assignAutoplay","assignOffset","setPlayLive"]}}},IDLE:{on:{LOAD_OBJECT:{actions:["assignActiveObject","assignAutoplay","assignOffset","setPlayLive"],target:"LOADING"}}},LOADING:{entry:["clearStreamerMachine"],invoke:{id:"findStreamer",src:"findStreamer",onDone:[{cond:"foundValidStreamer",actions:"assignStreamerMachine",target:"STREAMING"},{target:"IDLE"}],onError:{target:["FAILURE","#playback_timer_stopped"],actions:Im("LOADING","audioServicesMachine")}}},STREAMING:{invoke:{src:"startStreamer",id:lL,autoForward:!0,onDone:[{target:"LOADING"}]},on:{LOAD_OBJECT:{actions:["assignActiveObject","assignAutoplay","assignOffset","destroyStreamer","setPlayLive"]},PLAY:[{actions:["assignAutoplay"]},{cond:"isNewDayForGuest",actions:["resetFreeListeningLimit"]},{cond:"isReachedUnauthenticatedListeningLimit",actions:["pause","callBrazeEvent"]},{cond:"shouldRespectPlaybackRate",actions:["assignPlaybackRate","setPlaybackRate"]}],REPORT_ENDED:[{cond:"shouldSleepEndOfEpisode",actions:"cancelSleepTimer"},{cond:"shouldPlayNextObject",actions:["assignNextPlayableObject","destroyStreamer"]}],REPORT_CONTINUE_PLAYING:[{cond:"shouldPlayNextObject",actions:["assignNextPlayableObject","destroyStreamer"]}],REPORT_TIME_UPDATE:[{cond:"shouldSleep",actions:["pause","cancelSleepTimer"]},{cond:"isReachedUnauthenticatedListeningLimit",actions:["pause","callBrazeEvent"]},{cond:"shouldTrackUnauthenticated",actions:["handleUnauthenticatedData"]}],NEXT:[{cond:(t,e)=>!!e.shouldSkipCompletedItems&&!!tF(t),actions:["assignNextPlayableObject","destroyStreamer"]},{cond:({activeCollection:t,activePlayableObject:e})=>t.findIndex(n=>n.data.id===(e==null?void 0:e.data.id))<t.length-1,actions:["assignNextObject","destroyStreamer"]}],PREVIOUS:[{cond:(t,e)=>!!e.shouldSkipCompletedItems&&!!qY(t),actions:["assignPreviousPlayableObject","destroyStreamer"]},{cond:({activeCollection:t,activePlayableObject:e})=>t.findIndex(n=>n.data.id===(e==null?void 0:e.data.id))>0,actions:["assignPreviousObject","destroyStreamer"]}],DESTROY:{target:"IDLE"}}},FAILURE:{on:{LOAD_OBJECT:{actions:["assignActiveObject","assignAutoplay","assignOffset","addToHistory","setPlayLive"],target:"LOADING"}}}}}}},{guards:{shouldPlayNextObject:t=>{const{collectionPlaybackMode:e,activeCollection:n,activePlayableObject:r}=t;return e===tu.Playlist?n.findIndex(i=>i.data.id===(r==null?void 0:r.data.id))<n.length-1:e!==tu.SingleItem?!!tF(t):!1},shouldSleep:({sleepTimerState:t})=>t!==wf.EndOfEpisode&&t!==wf.Idle&&Date.now()>t,shouldTrackUnauthenticated:t=>{var e,n,r,i,s,a,o,l;return!t.unauthenticatedProvider||!((e=t.featureFlags)!=null&&e.meteredContent)||((n=t.analyticsProvider)==null?void 0:n.platform)!=="WEB"?!1:((i=(r=t.credentialsProvider)==null?void 0:r.authData)==null?void 0:i.state)===Bn.AUTH&&t.unauthenticatedProvider.unauthenticatedPlaybackTime?!0:((a=(s=t.credentialsProvider)==null?void 0:s.authData)==null?void 0:a.state)===Bn.ANON||((l=(o=t.credentialsProvider)==null?void 0:o.authData)==null?void 0:l.state)===Bn.NONE},shouldSleepEndOfEpisode:({sleepTimerState:t})=>t===wf.EndOfEpisode,foundValidStreamer:(t,{data:e})=>!!e,shouldSendContinueListen:({playbackTimer:t})=>q_(aL(t.accumulator,t.elapsed))>DS.CONTINUE_LISTEN_DURATION,shouldRespectPlaybackRate:t=>{var a;const e=t.currentStreamerMachine,r=(e==null?void 0:e.context.dataProvider.audioServices.getStreamerMachineContext()).metadata,i=Qh(r.contentType),s=(e==null?void 0:e.id)===LU;return!i&&!!((a=t.activePlayableObject)!=null&&a.data)&&x7(t.activePlayableObject.data.entityType,t.activePlayableObject.data.entitySubtype,s)},isReachedUnauthenticatedListeningLimit:t=>{var e,n,r,i;if(t.unauthenticatedProvider&&((n=(e=t.credentialsProvider)==null?void 0:e.authData)==null?void 0:n.state)!==Bn.AUTH&&((r=t.featureFlags)!=null&&r.meteredContent)&&((i=t.analyticsProvider)==null?void 0:i.platform)==="WEB"){const{unauthenticatedProvider:s}=t,a=s.getUnauthenticatedPlaybackTime(),o=s.getMaxFreeListeningTime();if(o!==void 0&&o<=a)return!0}return!1},isNewDayForGuest:t=>{var e,n,r,i;return(e=t.featureFlags)!=null&&e.meteredContent&&((n=t.analyticsProvider)==null?void 0:n.platform)==="WEB"&&t.unauthenticatedProvider&&((i=(r=t.credentialsProvider)==null?void 0:r.authData)==null?void 0:i.state)!==Bn.AUTH?t.unauthenticatedProvider.isNewDay():!1}},actions:{resetFreeListeningLimit:t=>{t.unauthenticatedProvider&&t.unauthenticatedProvider.resetPlayedContentDaily()},callBrazeEvent:t=>{const{personalizationProvider:e}=t;e.callBrazeEvent&&e.callBrazeEvent(mce.METERED_CONTENT_LIMIT_REACHED)},handleUnauthenticatedData:t=>{var i,s;if(!t.unauthenticatedProvider)return;const{unauthenticatedProvider:e}=t,r=((s=(i=t.credentialsProvider)==null?void 0:i.authData)==null?void 0:s.state)===Bn.AUTH?0:e.getUnauthenticatedPlaybackTime()+1;e.setUnauthenticatedPlaybackTime(r)},addToHistory:(t,e)=>{const n=e.data.getId();t.personalizationProvider.isInTopOfHistoryStack(n)||t.personalizationProvider.addToHistory([n])},assignPersonalizationData:bn((t,{data:[e,n,r,i,s]})=>({activeCollection:e,playbacks:n,volume:r,isMuted:i,rate:s})),setPlayLive:bn({playLive:(t,e)=>!!e.playLive}),clearStreamerMachine:bn(t=>({currentStreamerMachine:void 0})),assignStreamerMachine:bn((t,e)=>({currentStreamerMachine:e.data})),assignActiveObject:bn({activePlayableObject:(t,e)=>e.data}),assignAutoplay:bn({autoplay:(t,e)=>e.autoplay}),assignActiveCollection:bn({activeCollection:(t,e)=>e.data}),assignPlaybacks:bn({playbacks:(t,e)=>e.data}),assignNextObject:bn(({activeCollection:t,activePlayableObject:e,playbacks:n})=>{const r=t.findIndex(s=>s.data.id===(e==null?void 0:e.data.id));if(r===-1)return{activePlayableObject:void 0,startOffset:void 0};let i=r;for(;++i<t.length;){const s=t[i];if(!xg(s.data.durationSeconds,n[s.getId()])){const a=s.data.durationSeconds&&n[s.getId()]<s.data.durationSeconds?n[s.getId()]:0;return{activePlayableObject:s,startOffset:a}}}return{activePlayableObject:e,startOffset:0}}),assignPreviousObject:bn(({activeCollection:t,activePlayableObject:e,playbacks:n})=>{const r=t.findIndex(s=>s.data.id===(e==null?void 0:e.data.id));if(r<=0)return{activePlayableObject:void 0,startOffset:void 0};let i=r;for(;--i>=0;){const s=t[i];if(!xg(s.data.durationSeconds,n[s.getId()])){const a=s.data.durationSeconds&&n[s.getId()]<s.data.durationSeconds?n[s.getId()]:0;return{activePlayableObject:s,startOffset:a}}}return{activePlayableObject:e,startOffset:0}}),assignNextPlayableObject:bn(t=>{const e=tF(t);if(e==null)return{activePlayableObject:void 0,startOffset:void 0};const n=e.data.durationSeconds&&t.playbacks[e.getId()]<e.data.durationSeconds?t.playbacks[e.getId()]:void 0;return{activePlayableObject:e,startOffset:n}}),assignPreviousPlayableObject:bn(t=>{const e=qY(t);if(e==null)return{activePlayableObject:void 0,startOffset:void 0};const n=e.data.durationSeconds&&t.playbacks[e.getId()]<e.data.durationSeconds?t.playbacks[e.getId()]:void 0;return{activePlayableObject:e,startOffset:n}}),assignCollectionPlaybackMode:bn((t,e)=>({collectionPlaybackMode:e.mode})),destroyStreamer:vU({type:"DESTROY"},{to:lL}),setVolume:t=>{var e;return(e=t==null?void 0:t.player)==null?void 0:e.setVolume(t.volume)},setMuted:t=>{var e;return(e=t==null?void 0:t.player)==null?void 0:e.setMuted(t.isMuted)},setPlaybackRate:t=>{var e;return(e=t==null?void 0:t.player)==null?void 0:e.setRate(t.rate)},assignVolume:bn({volume:(t,e)=>e.volume}),assignMuted:bn({isMuted:(t,e)=>e.isMuted}
190),assignPlaybackRate:bn({rate:(t,e)=>{const n=t.currentStreamerMachine,r=(n==null?void 0:n.id)===LU;return!t.player.vodFeatureEnabled&&r?1:e.type==="SET_PLAYBACK_RATE"?e.rate:t.rate}}),persistVolume:t=>t.playerSettingsProvider.setVolume(t.volume),persistMuted:t=>t.playerSettingsProvider.setIsMuted(t.isMuted),persistPlaybackRate:t=>t.playerSettingsProvider.setPlaybackRate(t.rate),incrementPlaybackRate:bn({rate:({rate:t})=>{const n=(DP.indexOf(t)+1)%DP.length;return DP[n]}}),sendSetSleepTimerEvent:({analyticsProvider:t,activePlayableObject:e,sleepTimerState:n})=>{let r=!1,i=0;const s=n===wf.Idle,a=n===wf.EndOfEpisode;s||(a?r=!0:i=Math.ceil((Number(n)-Date.now())/1e3),t==null||t.sendSleepTimerSetEvent(As.SLEEP_TIMER_SET,e==null?void 0:e.data.id,r,i))},setSleepTimer:bn({sleepTimerState:(t,e)=>e.sleepTimer}),cancelSleepTimer:bn({sleepTimerState:t=>wf.Idle}),pause:vU("PAUSE"),assignOffset:bn({startOffset:(t,e)=>{if(e.offset)return e.offset;if(t.playbacks[e.data.getId()]<e.data.data.durationSeconds*I7.isConsideredPlayedEpsilon)return t.playbacks[e.data.getId()]}}),startPlaybackTimer:bn(({playbackTimer:t})=>({playbackTimer:{...t,lastStartedTime:mc(Date.now())}})),stopPlaybackTimer:bn(({playbackTimer:t})=>({playbackTimer:{lastStartedTime:t.lastStartedTime,elapsed:mc(0),accumulator:t.lastStartedTime!==void 0?PU(aL(t.accumulator,mc(Date.now())),t.lastStartedTime):t.accumulator}})),resetPlaybackTimer:bn({playbackTimer:()=>({accumulator:mc(0),elapsed:mc(0),lastStartedTime:mc(Date.now())})}),updatePlaybackTimer:bn(({playbackTimer:t})=>({playbackTimer:{...t,elapsed:t.lastStartedTime!==void 0?PU(mc(Date.now()),t.lastStartedTime):t.elapsed}})),sendContinueListenEvent:t=>{var i,s,a,o,l,u;const e=(i=t.deviceInfoProvider)==null?void 0:i.getAudioRoute();let n;fO((s=t.currentStreamerMachine)==null?void 0:s.id)&&(n=Mh(t.playbacks[(a=t.activePlayableObject)==null?void 0:a.data.id]||0)),(u=t.analyticsProvider)==null||u.sendPlayerEvent({type:As.CONTINUE_LISTEN,contentId:(o=t.activePlayableObject)==null?void 0:o.data.id,currentPosition:n,streamUrl:ru((l=t.activePlayableObject)==null?void 0:l.data.streamUrl),connectionType:e})},sendScrubEvent:({analyticsProvider:t,activePlayableObject:e,deviceInfoProvider:n,playbacks:r,currentStreamerMachine:i})=>{const s=n==null?void 0:n.getAudioRoute();let a;fO(i==null?void 0:i.id)&&(a=Mh(r[e==null?void 0:e.data.id]||0)),t==null||t.sendPlayerEvent({type:As.SCRUB,contentId:e==null?void 0:e.data.id,currentPosition:a,streamUrl:ru(e==null?void 0:e.data.streamUrl),connectionType:s})},sendCancelSleepTimerEvent:({analyticsProvider:t,activePlayableObject:e,deviceInfoProvider:n,playbacks:r,currentStreamerMachine:i})=>{const s=n==null?void 0:n.getAudioRoute();let a;fO(i==null?void 0:i.id)&&(a=Mh(r[e==null?void 0:e.data.id]||0)),t==null||t.sendPlayerEvent({type:As.SLEEP_TIMER_CANCELED,contentId:e==null?void 0:e.data.id,currentPosition:a,streamUrl:ru(e==null?void 0:e.data.streamUrl),connectionType:s})},sendPlaybackRateEvent:t=>{var c,d;const{analyticsProvider:e,activePlayableObject:n,rate:r,featureFlags:i}=t,a=(i==null?void 0:i.vodSpeedControls)?r.toString():"disabled",o=(c=t.deviceInfoProvider)==null?void 0:c.getAudioRoute();let l;fO((d=t.currentStreamerMachine)==null?void 0:d.id)&&(l=Mh(t.playbacks[n==null?void 0:n.data.id]||0)),e==null||e.sendPlayerEvent({type:As.PLAYBACK_SPEED,contentId:n==null?void 0:n.data.id,speedSelection:a,currentPosition:l,streamUrl:ru(n==null?void 0:n.data.streamUrl),connectionType:o})},updateInteractionTime:({dataProvider:t})=>t.updateInteractionTime()},services:{initialize:ZYe,findStreamer:QYe,startStreamer:XYe}});YYe();class tZe{constructor(e){et(this,"logger");et(this,"previousParentState","");et(this,"previousChildState","");et(this,"eventListeners");et(this,"send");et(this,"getRootMachineContext");et(this,"getStreamerMachineContext");et(this,"setCollectionPlaybackMode",e=>this.send({type:"SET_COLLECTION_PLAYBACK_MODE",mode:e}));et(this,"getCollectionPlaybackMode",()=>this.getRootMachineContext().collectionPlaybackMode);et(this,"setSignalWireEventListener",e=>{this.send({type:"SET_SIGNAL_WIRE_EVENT_LISTENER",signalWireEventListener:e})});e.eventListener?this.eventListeners=new Set([e.eventListener]):this.eventListeners=new Set,this.logger=e.logger;const n={activeCollection:[],activePlayableObject:void 0,analyticsProvider:e.analyticsProvider,autoplay:!1,collectionPlaybackMode:tu.SingleItem,credentialsProvider:e.credentialsProvider,dataProvider:e.dataProvider,isMuted:!1,locationProvider:e.locationProvider,logger:e.logger,marketingDataProvider:e.marketingDataProvider,personalizationProvider:e.personalizationProvider,platform:e.platform,playbacks:{}
190,player:e.player,playerSettingsProvider:e.playerSettingsProvider,deviceInfoProvider:e.deviceInfoProvider,playLive:!1,rate:1,skipsCount:0,sleepTimerState:wf.Idle,unauthenticatedProvider:e.unauthenticatedProvider,volume:1,playbackTimer:{accumulator:mc(0),elapsed:mc(0)},featureFlags:e.featureFlags},r=eZe.withContext(n),i=o7(r,{devTools:!0});WYe(e.player,i.send,e.logger),this.send=i.send,this.getRootMachineContext=()=>i.getSnapshot().context,this.getStreamerMachineContext=()=>{var s;return(s=i.getSnapshot().children[lL])==null?void 0:s.getSnapshot().context},i.onTransition(s=>{setTimeout(()=>{var w,x,P,N;const a=(w=s.children[lL])==null?void 0:w.getSnapshot(),{activePlayableObject:o,playbacks:l,sleepTimerState:u,rate:c,volume:d,isMuted:f,activeCollection:h,collectionPlaybackMode:g}=s.context,v={value:s.value,context:{activePlayableObject:o,playbacks:l,sleepTimerState:u,rate:c,volume:d,isMuted:f,activeCollection:h,collectionPlaybackMode:g}},b=a?{...a,value:KYe(a.value)}:void 0;(P=this.logger)==null||P.trace(`AudioServices machine state: ${JSON.stringify(Object.values(s.value)[0])}, ${b?`Child streamer machine state: ${JSON.stringify(((x=b==null?void 0:b.historyValue)==null?void 0:x.current)||b.value,null,2)}`:""}`),Object.values(s.value)[0]!=this.previousParentState&&(this.previousParentState=Object.values(s.value)[0],Pn.info(`[${Rn.Streaming}] AudioServices: Parent streamer machine state: ${JSON.stringify(Object.values(s.value)[0])}`));const S=JSON.stringify(b?((N=b==null?void 0:b.historyValue)==null?void 0:N.current)||b.value:void 0);S!=this.previousChildState&&(this.previousChildState=S,Pn.info(`[${Rn.Streaming}] AudioServices: Child streamer machine state: ${S}`));const A={audioServicesState:v,streamerState:b};for(const k of this.eventListeners)k(A)},0)}),i.start()}setMicMuted(e){this.send({type:"SET_MIC_MUTED",isMuted:e})}setSleepTimerDuration(e){const n=e*60*1e3,r=Date.now()+n;this.send({type:"SET_SLEEP_TIMER",sleepTimer:r})}setSleepTimerForCurrentEpisode(){this.send({type:"SET_SLEEP_TIMER",sleepTimer:wf.EndOfEpisode})}cancelSleepTimer(){this.send({type:"CANCEL_SLEEP_TIMER"})}addEventListener(e){var r;return(r=this.eventListeners)==null||r.add(e),()=>{var i;return(i=this.eventListeners)==null?void 0:i.delete(e)}}setVolume(e){this.send({type:"SET_MUTED",isMuted:e===0}),this.send({type:"SET_VOLUME",volume:gYe(e,0,1)})}setMuted(e){this.send({type:"SET_MUTED",isMuted:e})}setPlaybackRate(e){this.send({type:"SET_PLAYBACK_RATE",rate:e})}getPlayer(){return this.getRootMachineContext().player}getVolume(){return this.getRootMachineContext().volume}getMuted(){return this.getRootMachineContext().isMuted}getIsLive(){var e,n;return((n=(e=this.getStreamerMachineContext())==null?void 0:e.metadata)==null?void 0:n.isLive)??!1}seekToTime(e){this.send({type:"SEEK_TIME",time:e})}seekToProgress(e){var n,r;this.seekToTime(e*(((r=(n=this.getStreamerMachineContext())==null?void 0:n.metadata)==null?void 0:r.duration)??0))}scrubbed(){this.send({type:"SCRUB"})}next(e=!1){this.send({type:"NEXT",shouldSkipCompletedItems:e})}previous(e=!1){this.send({type:"PREVIOUS",shouldSkipCompletedItems:e})}skip(){this.send({type:"SKIP"})}skipByTime(e,n){var s;const i=(((s=this.getStreamerMachineContext())==null?void 0:s.elapsed)??0)+e;this.seekToTime(i),n==null||n(i)}sendPreference(e){this.send({type:"SEND_PREFERENCE",preference:e})}goToLive(){this.send({type:"GO_TO_LIVE"})}play(e,n=!0,r,i=!1){e?(this.send({type:"STOP"}),this.send({type:"LOAD_OBJECT",data:e,autoplay:n,offset:r,playLive:i})):this.send({type:"PLAY",autoplay:n})}updatePlaybacks(e){this.send({type:"UPDATE_PLAYBACKS",data:e})}updateCollection(e){this.send({type:"UPDATE_COLLECTION",data:e})}playCollection(e,n){this.updateCollection(e),this.play(n)}pause(){this.send({type:"PAUSE"})}stop(){this.send({type:"STOP"})}incrementRate(){this.send({type:"INCREMENT_PLAYBACK_RATE"})}}var _ce={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ys,function(){/*! *****************************************************************************
191	    Copyright (c) Microsoft Corporation.
192
193	    Permission to use, copy, modify, and/or distribute this software for any
194	    purpose with or without fee is hereby granted.
195
196	    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
197	    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
198	    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
199	    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
200	    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
201	    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
202	    PERFORMANCE OF THIS SOFTWARE.
203	    ***************************************************************************** */var n=function(y,p){return n=Object.
203setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,_){E.__proto__=_}||function(E,_){for(var R in _)Object.prototype.hasOwnProperty.call(_,R)&&(E[R]=_[R])},n(y,p)};function r(y,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function E(){this.constructor=y}n(y,p),y.prototype=p===null?Object.create(p):(E.prototype=p.prototype,new E)}var i=function(){return i=Object.assign||function(y){for(var p,E=1,_=arguments.length;E<_;E++)for(var R in p=arguments[E])Object.prototype.hasOwnProperty.call(p,R)&&(y[R]=p[R]);return y},i.apply(this,arguments)};function s(y,p){var E={};for(var _ in y)Object.prototype.hasOwnProperty.call(y,_)&&p.indexOf(_)<0&&(E[_]=y[_]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function"){var R=0;for(_=Object.getOwnPropertySymbols(y);R<_.length;R++)p.indexOf(_[R])<0&&Object.prototype.propertyIsEnumerable.call(y,_[R])&&(E[_[R]]=y[_[R]])}return E}function a(y,p,E,_){return new(E||(E=Promise))(function(R,M){function W(oe){try{re(_.next(oe))}catch(he){M(he)}}function J(oe){try{re(_.throw(oe))}catch(he){M(he)}}function re(oe){var he;oe.done?R(oe.value):(he=oe.value,he instanceof E?he:new E(function(ee){ee(he)})).then(W,J)}re((_=_.apply(y,[])).next())})}function o(y,p){var E,_,R,M,W={label:0,sent:function(){if(1&R[0])throw R[1];return R[1]},trys:[],ops:[]};return M={next:J(0),throw:J(1),return:J(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function J(re){return function(oe){return function(he){if(E)throw new TypeError("Generator is already executing.");for(;W;)try{if(E=1,_&&(R=2&he[0]?_.return:he[0]?_.throw||((R=_.return)&&R.call(_),0):_.next)&&!(R=R.call(_,he[1])).done)return R;switch(_=0,R&&(he=[2&he[0],R.value]),he[0]){case 0:case 1:R=he;break;case 4:return W.label++,{value:he[1],done:!1};case 5:W.label++,_=he[1],he=[0];continue;case 7:he=W.ops.pop(),W.trys.pop();continue;default:if(R=W.trys,!((R=R.length>0&&R[R.length-1])||he[0]!==6&&he[0]!==2)){W=0;continue}if(he[0]===3&&(!R||he[1]>R[0]&&he[1]<R[3])){W.label=he[1];break}if(he[0]===6&&W.label<R[1]){W.label=R[1],R=he;break}if(R&&W.label<R[2]){W.label=R[2],W.ops.push(he);break}R[2]&&W.ops.pop(),W.trys.pop();continue}he=p.call(y,W)}catch(ee){he=[6,ee],_=0}finally{E=R=0}if(5&he[0])throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}([re,oe])}}}function l(y){var p=typeof Symbol=="function"&&Symbol.iterator,E=p&&y[p],_=0;if(E)return E.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&_>=y.length&&(y=void 0),{value:y&&y[_++],done:!y}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(y,p){var E=typeof Symbol=="function"&&y[Symbol.iterator];if(!E)return y;var _,R,M=E.call(y),W=[];try{for(;(p===void 0||p-- >0)&&!(_=M.next()).done;)W.push(_.value)}catch(J){R={error:J}}finally{try{_&&!_.done&&(E=M.return)&&E.call(M)}finally{if(R)throw R.error}}return W}function c(y,p,E){if(arguments.length===2)for(var _,R=0,M=p.length;R<M;R++)!_&&R in p||(_||(_=Array.prototype.slice.call(p,0,R)),_[R]=p[R]);return y.concat(_||Array.prototype.slice.call(p))}var d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Ys<"u"?Ys:typeof self<"u"?self:{};function f(y){if(y.__esModule)return y;var p=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(y).forEach(function(E){var _=Object.getOwnPropertyDescriptor(y,E);Object.defineProperty(p,E,_.get?_:{enumerable:!0,get:function(){return y[E]}})}),p}var h={exports:{}};(function(y){(function(p,E){var _=Math.pow(2,-24),R=Math.pow(2,32),M=Math.pow(2,53),W={encode:function(J){var re,oe=new ArrayBuffer(256),he=new DataView(oe),ee=0;function Pe(kt){for(var At=oe.byteLength,Ie=ee+kt;At<Ie;)At*=2;if(At!==oe.byteLength){var Xe=he;oe=new ArrayBuffer(At),he=new DataView(oe);for(var He=ee+3>>2,bt=0;bt<He;++bt)he.setUint32(4*bt,Xe.getUint32(4*bt))}return re=kt,he}function Se(){ee+=re}function Ee(kt){Se(Pe(1).setUint8(ee,kt))}function Ae(kt){for(var At=Pe(kt.length),Ie=0;Ie<kt.length;++Ie)At.setUint8(ee+Ie,kt[Ie]);Se()}function Ce(kt,At){At<24?Ee(kt<<5|At):At<256?(Ee(kt<<5|24),Ee(At)):At<65536?(Ee(kt<<5|25),function(Ie){Se(Pe(2).setUint16(ee,Ie))}(At)):At<4294967296?(Ee(kt<<5|26),function(Ie){Se(Pe(4).setUint32(ee,Ie))}(At)):(Ee(kt<<5|27),function(Ie){var Xe=Ie%R,He=(Ie-Xe)/R,bt=Pe(8);bt.setUint32(ee,He),bt.setUint32(ee+4,Xe),Se()}(At))}if(function kt(At){var Ie;if(At===!1)return Ee(244);if(At===!0)return Ee(245);if(At===null)return Ee(246);if(At===E)return Ee(247);switch(typeof At){case"number":if(Math.floor(At)===At){if(0<=At&&At<=M)return Ce(0,At);
203if(-M<=At&&At<0)return Ce(1,-(At+1))}return Ee(251),function(xe){Se(Pe(8).setFloat64(ee,xe))}(At);case"string":var Xe=[];for(Ie=0;Ie<At.length;++Ie){var He=At.charCodeAt(Ie);He<128?Xe.push(He):He<2048?(Xe.push(192|He>>6),Xe.push(128|63&He)):He<55296?(Xe.push(224|He>>12),Xe.push(128|He>>6&63),Xe.push(128|63&He)):(He=(1023&He)<<10,He|=1023&At.charCodeAt(++Ie),He+=65536,Xe.push(240|He>>18),Xe.push(128|He>>12&63),Xe.push(128|He>>6&63),Xe.push(128|63&He))}return Ce(3,Xe.length),Ae(Xe);default:var bt;if(Array.isArray(At))for(Ce(4,bt=At.length),Ie=0;Ie<bt;++Ie)kt(At[Ie]);else if(At instanceof Uint8Array)Ce(2,At.length),Ae(At);else{var Ke=Object.keys(At);for(Ce(5,bt=Ke.length),Ie=0;Ie<bt;++Ie){var nt=Ke[Ie];kt(nt),kt(At[nt])}}}}(J),"slice"in oe)return oe.slice(0,ee);for(var Ge=new ArrayBuffer(ee),vt=new DataView(Ge),Ft=0;Ft<ee;++Ft)vt.setUint8(Ft,he.getUint8(Ft));return Ge},decode:function(J,re,oe){var he=new DataView(J),ee=0;function Pe(Ie,Xe){return ee+=Xe,Ie}function Se(Ie){return Pe(new Uint8Array(J,ee,Ie),Ie)}function Ee(){return Pe(he.getUint8(ee),1)}function Ae(){return Pe(he.getUint16(ee),2)}function Ce(){return Pe(he.getUint32(ee),4)}function Ge(){return he.getUint8(ee)===255&&(ee+=1,!0)}function vt(Ie){if(Ie<24)return Ie;if(Ie===24)return Ee();if(Ie===25)return Ae();if(Ie===26)return Ce();if(Ie===27)return Ce()*R+Ce();if(Ie===31)return-1;throw"Invalid length encoding"}function Ft(Ie){var Xe=Ee();if(Xe===255)return-1;var He=vt(31&Xe);if(He<0||Xe>>5!==Ie)throw"Invalid indefinite length element";return He}function kt(Ie,Xe){for(var He=0;He<Xe;++He){var bt=Ee();128&bt&&(bt<224?(bt=(31&bt)<<6|63&Ee(),Xe-=1):bt<240?(bt=(15&bt)<<12|(63&Ee())<<6|63&Ee(),Xe-=2):(bt=(15&bt)<<18|(63&Ee())<<12|(63&Ee())<<6|63&Ee(),Xe-=3)),bt<65536?Ie.push(bt):(bt-=65536,Ie.push(55296|bt>>10),Ie.push(56320|1023&bt))}}typeof re!="function"&&(re=function(Ie){return Ie}),typeof oe!="function"&&(oe=function(){return E});var At=function Ie(){var Xe,He,bt=Ee(),Ke=bt>>5,nt=31&bt;if(Ke===7)switch(nt){case 25:return function(){var fs=new ArrayBuffer(4),Is=new DataView(fs),tc=Ae(),qd=32768&tc,ml=31744&tc,Jc=1023&tc;if(ml===31744)ml=261120;else if(ml!==0)ml+=114688;else if(Jc!==0)return Jc*_;return Is.setUint32(0,qd<<16|ml<<13|Jc<<13),Is.getFloat32(0)}();case 26:return Pe(he.getFloat32(ee),4);case 27:return Pe(he.getFloat64(ee),8)}if((He=vt(nt))<0&&(Ke<2||6<Ke))throw"Invalid length";switch(Ke){case 0:return He;case 1:return-1-He;case 2:if(He<0){for(var xe=[],It=0;(He=Ft(Ke))>=0;)It+=He,xe.push(Se(He));var Je=new Uint8Array(It),ft=0;for(Xe=0;Xe<xe.length;++Xe)Je.set(xe[Xe],ft),ft+=xe[Xe].length;return Je}return Se(He);case 3:var xt=[];if(He<0)for(;(He=Ft(Ke))>=0;)kt(xt,He);else kt(xt,He);return String.fromCharCode.apply(null,xt);case 4:var Nt;if(He<0)for(Nt=[];!Ge();)Nt.push(Ie());else for(Nt=new Array(He),Xe=0;Xe<He;++Xe)Nt[Xe]=Ie();return Nt;case 5:var Gr={};for(Xe=0;Xe<He||He<0&&!Ge();++Xe)Gr[Ie()]=Ie();return Gr;case 6:return re(Ie(),He);case 7:switch(He){case 20:return!1;case 21:return!0;case 22:return null;case 23:return E;default:return oe(He)}}}();if(ee!==J.byteLength)throw"Remaining bytes";return At}};y.exports?y.exports=W:p.CBOR||(p.CBOR=W)})(d)})(h);var g=h.exports,v={exports:{}};/*! lil-uuid - v0.1 - MIT License - https://github.com/lil-js/uuid */(function(y,p){(function(E){var _="0.1.0",R={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function M(){var J,re,oe="";for(J=0;J<32;J++)re=16*Math.random()|0,J!==8&&J!==12&&J!==16&&J!==20||(oe+="-"),oe+=(J===12?4:J===16?3&re|8:re).toString(16);return oe}function W(J,re){var oe=R[re||"all"];return oe&&oe.test(J)||!1}M.isUUID=W,M.VERSION=_,E.uuid=M,E.isUUID=W})(p),y!==null&&(y.exports=p.uuid)})(v,v.exports);var b=v.exports,S=function(){return b.uuid?b.uuid():b()},A=function(){function y(p){var E,_,R,M,W=p.setup;if(this._PNSDKSuffix={},this.instanceId="pn-".concat(S()),this.secretKey=W.secretKey||W.secret_key,this.subscribeKey=W.subscribeKey||W.subscribe_key,this.publishKey=W.publishKey||W.publish_key,this.sdkName=W.sdkName,this.sdkFamily=W.s
203dkFamily,this.partnerId=W.partnerId,this.setAuthKey(W.authKey),this.cryptoModule=W.cryptoModule,this.setFilterExpression(W.filterExpression),typeof W.origin!="string"&&!Array.isArray(W.origin)&&W.origin!==void 0)throw new Error("Origin must be either undefined, a string or a list of strings.");if(this.origin=W.origin||Array.from({length:20},function(J,re){return"ps".concat(re+1,".pndsn.com")}),this.secure=W.ssl||!1,this.restore=W.restore||!1,this.proxy=W.proxy,this.keepAlive=W.keepAlive,this.keepAliveSettings=W.keepAliveSettings,this.autoNetworkDetection=W.autoNetworkDetection||!1,this.dedupeOnSubscribe=W.dedupeOnSubscribe||!1,this.maximumCacheSize=W.maximumCacheSize||100,this.customEncrypt=W.customEncrypt,this.customDecrypt=W.customDecrypt,this.fileUploadPublishRetryLimit=(E=W.fileUploadPublishRetryLimit)!==null&&E!==void 0?E:5,this.useRandomIVs=(_=W.useRandomIVs)===null||_===void 0||_,this.enableEventEngine=(R=W.enableEventEngine)!==null&&R!==void 0&&R,this.maintainPresenceState=(M=W.maintainPresenceState)===null||M===void 0||M,typeof location<"u"&&location.protocol==="https:"&&(this.secure=!0),this.logVerbosity=W.logVerbosity||!1,this.suppressLeaveEvents=W.suppressLeaveEvents||!1,this.announceFailedHeartbeats=W.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=W.announceSuccessfulHeartbeats||!1,this.useInstanceId=W.useInstanceId||!1,this.useRequestId=W.useRequestId||!1,this.requestMessageCountThreshold=W.requestMessageCountThreshold,W.retryConfiguration&&this._setRetryConfiguration(W.retryConfiguration),this.setTransactionTimeout(W.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(W.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(W.useSendBeacon||!0),W.presenceTimeout?this.setPresenceTimeout(W.presenceTimeout):this._presenceTimeout=300,W.heartbeatInterval!=null&&this.setHeartbeatInterval(W.heartbeatInterval),typeof W.userId=="string"){if(typeof W.uuid=="string")throw new Error("Only one of the following configuration options has to be provided: `uuid` or `userId`");this.setUserId(W.userId)}else{if(typeof W.uuid!="string")throw new Error("One of the following configuration options has to be provided: `uuid` or `userId`");this.setUUID(W.uuid)}this.setCipherKey(W.cipherKey,W)}return y.prototype.getAuthKey=function(){return this.authKey},y.prototype.setAuthKey=function(p){return this.authKey=p,this},y.prototype.setCipherKey=function(p,E,_){var R;return this.cipherKey=p,this.cipherKey&&(this.cryptoModule=(R=E.cryptoModule)!==null&&R!==void 0?R:E.initCryptoModule({cipherKey:this.cipherKey,useRandomIVs:this.useRandomIVs}),_&&(_.cryptoModule=this.cryptoModule)),this},y.prototype.getUUID=function(){return this.UUID},y.prototype.setUUID=function(p){if(!p||typeof p!="string"||p.trim().length===0)throw new Error("Missing uuid parameter. Provide a valid string uuid");return this.UUID=p,this},y.prototype.getUserId=function(){return this.UUID},y.prototype.setUserId=function(p){if(!p||typeof p!="string"||p.trim().length===0)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");return this.UUID=p,this},y.prototype.getFilterExpression=function(){return this.filterExpression},y.prototype.setFilterExpression=function(p){return this.filterExpression=p,this},y.prototype.getPresenceTimeout=function(){return this._presenceTimeout},y.prototype.setPresenceTimeout=function(p){return p>=20?this._presenceTimeout=p:(this._presenceTimeout=20,console.log("WARNING: Presence timeout is less than the minimum. Using minimum value: ",this._presenceTimeout)),this.setHeartbeatInterval(this._presenceTimeout/2-1),this},y.prototype.setProxy=function(p){this.proxy=p},y.prototype.getHeartbeatInterval=function(){return this._heartbeatInterval},y.prototype.setHeartbeatInterval=function(p){return this._heartbeatInterval=p,this},y.prototype.getSubscribeTimeout=function(){return this._subscribeRequestTimeout},y.prototype.setSubscribeTimeout=function(p){return this._subscribeRequestTimeout=p,this},y.prototype.getTransactionTimeout=function(){return this._transactionalRequestTimeout},y.prototype.setTransactionTimeout=function(p){return this._transactionalRequestTimeout=p,this},y.prototype.isSendBeaconEnabled=function(){return this._useSendBeacon},y.prototype.setSendBeaconConfig=function(p){return this._useSendBeacon=p,this},y.prototype.getVersion=function(){return"7.6.3"},y.prototype._setRetryConfiguration=function(p){if(p.minimumdelay<2)throw new Error("Minimum delay can not be set less than 2 seconds for retry");if(p.maximumDelay>150)throw new Error("Maximum delay can not be set more than 150 seconds for retry");if(p.maximumDelay&&maximumRetry>6)throw new Error("Maximum retry for exponential retry policy can not be more than 6");if(p.maximumRetry>10)throw new Error("Maximum retry for linear retry policy can not be more than 10");this.retryConfiguration=p},y.prototype._addPnsdkSuffix=function(p,E){this._PNSDKSuffix[p]=E},y.prototype._getPnsdkSuffix=function(p){var E=this;return Object.keys(this._PNSDKSuffix).reduce(function(_,R){return _+p+E._PNSDKSuffix[R]},"")},y}();function w(y){var p=y.replace(/==?$/,""),E=Math.floor(p.length/4*3),_=new ArrayBuffer(E),R=new Uint8Array(_),M=0;function W(){var Ae=p.charAt(M++),Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
203+/=".indexOf(Ae);if(Ce===-1)throw new Error("Illegal character at ".concat(M,": ").concat(p.charAt(M-1)));return Ce}for(var J=0;J<E;J+=3){var re=W(),oe=W(),he=W(),ee=W(),Pe=(63&re)<<2|oe>>4,Se=(15&oe)<<4|he>>2,Ee=(3&he)<<6|ee>>0;R[J]=Pe,he!=64&&(R[J+1]=Se),ee!=64&&(R[J+2]=Ee)}return _}function x(y){for(var p,E="",_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=new Uint8Array(y),M=R.byteLength,W=M%3,J=M-W,re=0;re<J;re+=3)E+=_[(16515072&(p=R[re]<<16|R[re+1]<<8|R[re+2]))>>18]+_[(258048&p)>>12]+_[(4032&p)>>6]+_[63&p];return W==1?E+=_[(252&(p=R[J]))>>2]+_[(3&p)<<4]+"==":W==2&&(E+=_[(64512&(p=R[J]<<8|R[J+1]))>>10]+_[(1008&p)>>4]+_[(15&p)<<2]+"="),E}var P,N,k,U,H,B=B||function(y,p){var E={},_=E.lib={},R=function(){},M=_.Base={extend:function(Se){R.prototype=this;var Ee=new R;return Se&&Ee.mixIn(Se),Ee.hasOwnProperty("init")||(Ee.init=function(){Ee.$super.init.apply(this,arguments)}),Ee.init.prototype=Ee,Ee.$super=this,Ee},create:function(){var Se=this.extend();return Se.init.apply(Se,arguments),Se},init:function(){},mixIn:function(Se){for(var Ee in Se)Se.hasOwnProperty(Ee)&&(this[Ee]=Se[Ee]);Se.hasOwnProperty("toString")&&(this.toString=Se.toString)},clone:function(){return this.init.prototype.extend(this)}},W=_.WordArray=M.extend({init:function(Se,Ee){Se=this.words=Se||[],this.sigBytes=Ee??4*Se.length},toString:function(Se){return(Se||re).stringify(this)},concat:function(Se){var Ee=this.words,Ae=Se.words,Ce=this.sigBytes;if(Se=Se.sigBytes,this.clamp(),Ce%4)for(var Ge=0;Ge<Se;Ge++)Ee[Ce+Ge>>>2]|=(Ae[Ge>>>2]>>>24-Ge%4*8&255)<<24-(Ce+Ge)%4*8;else if(65535<Ae.length)for(Ge=0;Ge<Se;Ge+=4)Ee[Ce+Ge>>>2]=Ae[Ge>>>2];else Ee.push.apply(Ee,Ae);return this.sigBytes+=Se,this},clamp:function(){var Se=this.words,Ee=this.sigBytes;Se[Ee>>>2]&=4294967295<<32-Ee%4*8,Se.length=y.ceil(Ee/4)},clone:function(){var Se=M.clone.call(this);return Se.words=this.words.slice(0),Se},random:function(Se){for(var Ee=[],Ae=0;Ae<Se;Ae+=4)Ee.push(4294967296*y.random()|0);return new W.init(Ee,Se)}}),J=E.enc={},re=J.Hex={stringify:function(Se){var Ee=Se.words;Se=Se.sigBytes;for(var Ae=[],Ce=0;Ce<Se;Ce++){var Ge=Ee[Ce>>>2]>>>24-Ce%4*8&255;Ae.push((Ge>>>4).toString(16)),Ae.push((15&Ge).toString(16))}return Ae.join("")},parse:function(Se){for(var Ee=Se.length,Ae=[],Ce=0;Ce<Ee;Ce+=2)Ae[Ce>>>3]|=parseInt(Se.substr(Ce,2),16)<<24-Ce%8*4;return new W.init(Ae,Ee/2)}},oe=J.Latin1={stringify:function(Se){var Ee=Se.words;Se=Se.sigBytes;for(var Ae=[],Ce=0;Ce<Se;Ce++)Ae.push(String.fromCharCode(Ee[Ce>>>2]>>>24-Ce%4*8&255));return Ae.join("")},parse:function(Se){for(var Ee=Se.length,Ae=[],Ce=0;Ce<Ee;Ce++)Ae[Ce>>>2]|=(255&Se.charCodeAt(Ce))<<24-Ce%4*8;return new W.init(Ae,Ee)}},he=J.Utf8={stringify:function(Se){try{return decodeURIComponent(escape(oe.stringify(Se)))}catch{throw Error("Malformed UTF-8 data")}},parse:function(Se){return oe.parse(unescape(encodeURIComponent(Se)))}},ee=_.BufferedBlockAlgorithm=M.extend({reset:function(){this._data=new W.init,this._nDataBytes=0},_append:function(Se){typeof Se=="string"&&(Se=he.parse(Se)),this._data.concat(Se),this._nDataBytes+=Se.sigBytes},_process:function(Se){var Ee=this._data,Ae=Ee.words,Ce=Ee.sigBytes,Ge=this.blockSize,vt=Ce/(4*Ge);if(Se=(vt=Se?y.ceil(vt):y.max((0|vt)-this._minBufferSize,0))*Ge,Ce=y.min(4*Se,Ce),Se){for(var Ft=0;Ft<Se;Ft+=Ge)this._doProcessBlock(Ae,Ft);Ft=Ae.splice(0,Se),Ee.sigBytes-=Ce}return new W.init(Ft,Ce)},clone:function(){var Se=M.clone.call(this);return Se._data=this._data.clone(),Se},_minBufferSize:0});_.Hasher=ee.extend({cfg:M.extend(),init:function(Se){this.cfg=this.cfg.extend(Se),this.reset()},reset:function(){ee.reset.call(this),this._doReset()},update:function(Se){return this._append(Se),this._process(),this},finalize:function(Se){return Se&&this._append(Se),this._doFinalize()},blockSize:16,_createHelper:function(Se){return function(Ee,Ae){return new Se.init(Ae).finalize(Ee)}},_createHmacHelper:function(Se){return function(Ee,Ae){return new Pe.HMAC.init(Se,Ae).finalize(Ee)}}});var Pe=E.algo={};return E}(Math);(function(y){for(var p=B,E=(R=p.lib).WordArray,_=R.Hasher,R=p.algo,M=[],W=[],J=function(Ee){return 4294967296*(Ee-(0|Ee))|0},re=2,oe=0;64>oe;){var he;e:{he=re;
vendor: 13,769 bytes, line 203
203for(var ee=y.sqrt(he),Pe=2;Pe<=ee;Pe++)if(!(he%Pe)){he=!1;break e}he=!0}he&&(8>oe&&(M[oe]=J(y.pow(re,.5))),W[oe]=J(y.pow(re,1/3)),oe++),re++}var Se=[];R=R.SHA256=_.extend({_doReset:function(){this._hash=new E.init(M.slice(0))},_doProcessBlock:function(Ee,Ae){for(var Ce=this._hash.words,Ge=Ce[0],vt=Ce[1],Ft=Ce[2],kt=Ce[3],At=Ce[4],Ie=Ce[5],Xe=Ce[6],He=Ce[7],bt=0;64>bt;bt++){if(16>bt)Se[bt]=0|Ee[Ae+bt];else{var Ke=Se[bt-15],nt=Se[bt-2];Se[bt]=((Ke<<25|Ke>>>7)^(Ke<<14|Ke>>>18)^Ke>>>3)+Se[bt-7]+((nt<<15|nt>>>17)^(nt<<13|nt>>>19)^nt>>>10)+Se[bt-16]}Ke=He+((At<<26|At>>>6)^(At<<21|At>>>11)^(At<<7|At>>>25))+(At&Ie^~At&Xe)+W[bt]+Se[bt],nt=((Ge<<30|Ge>>>2)^(Ge<<19|Ge>>>13)^(Ge<<10|Ge>>>22))+(Ge&vt^Ge&Ft^vt&Ft),He=Xe,Xe=Ie,Ie=At,At=kt+Ke|0,kt=Ft,Ft=vt,vt=Ge,Ge=Ke+nt|0}Ce[0]=Ce[0]+Ge|0,Ce[1]=Ce[1]+vt|0,Ce[2]=Ce[2]+Ft|0,Ce[3]=Ce[3]+kt|0,Ce[4]=Ce[4]+At|0,Ce[5]=Ce[5]+Ie|0,Ce[6]=Ce[6]+Xe|0,Ce[7]=Ce[7]+He|0},_doFinalize:function(){var Ee=this._data,Ae=Ee.words,Ce=8*this._nDataBytes,Ge=8*Ee.sigBytes;return Ae[Ge>>>5]|=128<<24-Ge%32,Ae[14+(Ge+64>>>9<<4)]=y.floor(Ce/4294967296),Ae[15+(Ge+64>>>9<<4)]=Ce,Ee.sigBytes=4*Ae.length,this._process(),this._hash},clone:function(){var Ee=_.clone.call(this);return Ee._hash=this._hash.clone(),Ee}}),p.SHA256=_._createHelper(R),p.HmacSHA256=_._createHmacHelper(R)})(Math),N=(P=B).enc.Utf8,P.algo.HMAC=P.lib.Base.extend({init:function(y,p){y=this._hasher=new y.init,typeof p=="string"&&(p=N.parse(p));var E=y.blockSize,_=4*E;p.sigBytes>_&&(p=y.finalize(p)),p.clamp();for(var R=this._oKey=p.clone(),M=this._iKey=p.clone(),W=R.words,J=M.words,re=0;re<E;re++)W[re]^=1549556828,J[re]^=909522486;R.sigBytes=M.sigBytes=_,this.reset()},reset:function(){var y=this._hasher;y.reset(),y.update(this._iKey)},update:function(y){return this._hasher.update(y),this},finalize:function(y){var p=this._hasher;return y=p.finalize(y),p.reset(),p.finalize(this._oKey.clone().concat(y))}}),U=(k=B).lib.WordArray,k.enc.Base64={stringify:function(y){var p=y.words,E=y.sigBytes,_=this._map;y.clamp(),y=[];for(var R=0;R<E;R+=3)for(var M=(p[R>>>2]>>>24-R%4*8&255)<<16|(p[R+1>>>2]>>>24-(R+1)%4*8&255)<<8|p[R+2>>>2]>>>24-(R+2)%4*8&255,W=0;4>W&&R+.75*W<E;W++)y.push(_.charAt(M>>>6*(3-W)&63));if(p=_.charAt(64))for(;y.length%4;)y.push(p);return y.join("")},parse:function(y){var p=y.length,E=this._map;(_=E.charAt(64))&&(_=y.indexOf(_))!=-1&&(p=_);for(var _=[],R=0,M=0;M<p;M++)if(M%4){var W=E.indexOf(y.charAt(M-1))<<M%4*2,J=E.indexOf(y.charAt(M))>>>6-M%4*2;_[R>>>2]|=(W|J)<<24-R%4*8,R++}return U.create(_,R)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(y){function p(ee,Pe,Se,Ee,Ae,Ce,Ge){return((ee=ee+(Pe&Se|~Pe&Ee)+Ae+Ge)<<Ce|ee>>>32-Ce)+Pe}function E(ee,Pe,Se,Ee,Ae,Ce,Ge){return((ee=ee+(Pe&Ee|Se&~Ee)+Ae+Ge)<<Ce|ee>>>32-Ce)+Pe}function _(ee,Pe,Se,Ee,Ae,Ce,Ge){return((ee=ee+(Pe^Se^Ee)+Ae+Ge)<<Ce|ee>>>32-Ce)+Pe}function R(ee,Pe,Se,Ee,Ae,Ce,Ge){return((ee=ee+(Se^(Pe|~Ee))+Ae+Ge)<<Ce|ee>>>32-Ce)+Pe}for(var M=B,W=(re=M.lib).WordArray,J=re.Hasher,re=M.algo,oe=[],he=0;64>he;he++)oe[he]=4294967296*y.abs(y.sin(he+1))|0;re=re.MD5=J.extend({_doReset:function(){this._hash=new W.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(ee,Pe){for(var Se=0;16>Se;Se++){var Ee=ee[Ae=Pe+Se];ee[Ae]=16711935&(Ee<<8|Ee>>>24)|4278255360&(Ee<<24|Ee>>>8)}Se=this._hash.words;var Ae=ee[Pe+0],Ce=(Ee=ee[Pe+1],ee[Pe+2]),Ge=ee[Pe+3],vt=ee[Pe+4],Ft=ee[Pe+5],kt=ee[Pe+6],At=ee[Pe+7],Ie=ee[Pe+8],Xe=ee[Pe+9],He=ee[Pe+10],bt=ee[Pe+11],Ke=ee[Pe+12],nt=ee[Pe+13],xe=ee[Pe+14],It=ee[Pe+15],Je=p(Je=Se[0],Nt=Se[1],xt=Se[2],ft=Se[3],Ae,7,oe[0]),ft=p(ft,Je,Nt,xt,Ee,12,oe[1]),xt=p(xt,ft,Je,Nt,Ce,17,oe[2]),Nt=p(Nt,xt,ft,Je,Ge,22,oe[3]);Je=p(Je,Nt,xt,ft,vt,7,oe[4]),ft=p(ft,Je,Nt,xt,Ft,12,oe[5]),xt=p(xt,ft,Je,Nt,kt,17,oe[6]),Nt=p(Nt,xt,ft,Je,At,22,oe[7]),Je=p(Je,Nt,xt,ft,Ie,7,oe[8]),ft=p(ft,Je,Nt,xt,Xe,12,oe[9]),xt=p(xt,ft,Je,Nt,He,17,oe[10]),Nt=p(Nt,xt,ft,Je,bt,22,oe[11]),Je=p(Je,Nt,xt,ft,Ke,7,oe[12]),ft=p(ft,Je,Nt,xt,nt,12,oe[13]),xt=p(xt,ft,Je,Nt,xe,17,oe[14]),Je=E(Je,Nt=p(Nt,xt,ft,Je,It,22,oe[15]),xt,ft,Ee,5,oe[16]),ft=E(ft,Je,Nt,xt,kt,9,oe[17]),xt=E(xt,ft,Je,Nt,bt,14,oe[18]),Nt=E(Nt,xt,ft,Je,Ae,20,oe[19]),Je=E(Je,Nt,xt,ft,Ft,5,oe[20]),ft=E(ft,Je,Nt,xt,He,9,oe[21]),xt=E(xt,ft,Je,Nt,It,14,oe[22]),Nt=E(Nt,xt,ft,Je,vt,20,oe[23]),Je=E(Je,Nt,xt,ft,Xe,5,oe[24]),ft=E(ft,Je,Nt,xt,xe,9,oe[25]),xt=E(xt,ft,Je,Nt,Ge,14,oe[26]),Nt=E(Nt,xt,ft,Je,Ie,20,oe[27]),Je=E(Je,Nt,xt,ft,nt,5,oe[28]),ft=E(ft,Je,Nt,xt,Ce,9,oe[29]),xt=E(xt,ft,Je,Nt,At,14,oe[30]),Je=_(Je,Nt=E(Nt,xt,ft,Je,Ke,20,oe[31]),xt,ft,Ft,4,oe[32]),ft=_(ft,Je,Nt,xt,Ie,11,oe[33]),xt=_(xt,ft,Je,Nt,bt,16,oe[34]),Nt=_(Nt,xt,ft,Je,xe,23,oe[35]),Je=_(Je,Nt,xt,ft,Ee,4,oe[36]),ft=_(ft,Je,Nt,xt,vt,11,oe[37]),xt=_(xt,ft,Je,Nt,At,16,oe[38]),Nt=_(Nt,xt,ft,Je,He,23,oe[39]),Je=_(Je,Nt,xt,ft,nt,4,oe[40]),ft=_(ft,Je,Nt,xt,Ae,11,oe[41]),xt=_(xt,ft,Je,Nt,Ge,16,oe[42]),Nt=_(Nt,xt,ft,Je,kt,23,oe[43]),Je=_(Je,Nt,xt,ft,Xe,4,oe[44]),ft=_(ft,Je,Nt,xt,Ke,11,oe[45]),xt=_(xt,ft,Je,Nt,It,16,oe[46]),Je=R(Je,Nt=_(Nt,xt,ft,Je,Ce,23,oe[47]),xt,ft,Ae,6,oe[48]),ft=R(ft,Je,Nt,xt,At,10,oe[49]),xt=R(xt,ft,Je,Nt,xe,15,oe[50]),Nt=R(Nt,xt,ft,Je,Ft,21,oe[51]),Je=R(Je,Nt,xt,ft,Ke,6,oe[52]),ft=R(ft,Je,Nt,xt,Ge,10,oe[53]),xt=R(xt,ft,Je,Nt,He,15,oe[54]),Nt=R(Nt,xt,ft,Je,Ee,21,oe[55]),Je=R(Je,Nt,xt,ft,Ie,6,oe[56]),ft=R(ft,Je,Nt,xt,It,10,oe[57]),xt=R(xt,ft,Je,Nt,kt,15,oe[58]),Nt=R(Nt,xt,ft,Je,nt,21,oe[59]),Je=R(Je,Nt,xt,ft,vt,6,oe[60]),ft=R(ft,Je,Nt,xt,bt,10,oe[61]),xt=R(xt,ft,Je,Nt,Ce,15,oe[62]),Nt=R(Nt,xt,ft,Je,Xe,21,oe[63]),Se[0]=Se[0]+Je|0,Se[1]=Se[1]+Nt|0,Se[2]=Se[2]+xt|0,Se[3]=Se[3]+ft|0},_doFinalize:function(){var ee=this._data,Pe=ee.words,Se=8*this._nDataBytes,Ee=8*ee.sigBytes;Pe[Ee>>>5]|=128<<24-Ee%32;var Ae=y.floor(Se/4294967296);for(Pe[15+(Ee+64>>>9<<4)]=16711935&(Ae<<8|Ae>>>24)|4278255360&(Ae<<24|Ae>>>8),Pe[14+(Ee+64>>>9<<4)]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8),ee.sigBytes=4*(Pe.length+1),this._process(),Pe=(ee=this._hash).words,Se=0;4>Se;Se++)Ee=Pe[Se],Pe[Se]=16711935&(Ee<<8|Ee>>>24)|4278255360&(Ee<<24|Ee>>>8);return ee},clone:function(){var ee=J.clone.call(this);return ee._hash=this._hash.clone(),ee}}),M.MD5=J._createHelper(re),M.HmacMD5=J._createHmacHelper(re)}(Math),function(){var y,p=B,E=(y=p.lib).Base,_=y.WordArray,R=(y=p.algo).EvpKDF=E.extend({cfg:E.extend({keySize:4,hasher:y.MD5,iterations:1}),init:function(M){this.cfg=this.cfg.extend(M)},compute:function(M,W){for(var J=(ee=this.cfg).hasher.create(),re=_.create(),oe=re.words,he=ee.keySize,ee=ee.iterations;oe.length<he;){Pe&&J.update(Pe);var Pe=J.update(M).finalize(W);J.reset();for(var Se=1;Se<ee;Se++)Pe=J.finalize(Pe),J.reset();re.concat(Pe)}return re.sigBytes=4*he,re}});p.EvpKDF=function(M,W,J){return R.create(J).compute(M,W)}}(),B.lib.Cipher||function(y){var p=(Se=B).lib,E=p.Base,_=p.WordArray,R=p.BufferedBlockAlgorithm,M=Se.enc.Base64,W=Se.algo.EvpKDF,J=p.Cipher=R.extend({cfg:E.extend(),createEncryptor:function(Ae,Ce){return this.create(this._ENC_XFORM_MODE,Ae,Ce)},createDecryptor:function(Ae,Ce){return this.create(this._DEC_XFORM_MODE,Ae,Ce)},init:function(Ae,Ce,Ge){this.cfg=this.cfg.extend(Ge),this._xformMode=Ae,this._key=Ce,this.reset()},reset:function(){R.reset.call(this),this._doReset()},process:function(Ae){return this._append(Ae),this._process()},finalize:function(Ae){return Ae&&this._append(Ae),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(Ae){return{encrypt:function(Ce,Ge,vt){return(typeof Ge=="string"?Ee:Pe).encrypt(Ae,Ce,Ge,vt)},decrypt:function(Ce,Ge,vt){return(typeof Ge=="string"?Ee:Pe).decrypt(Ae,Ce,Ge,vt)}}}});p.StreamCipher=J.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var re=Se.mode={},oe=function(Ae,Ce,Ge){var vt=this._iv;vt?this._iv=void 0:vt=this._prevBlock;for(var Ft=0;Ft<Ge;Ft++)Ae[Ce+Ft]^=vt[Ft]},he=(p.BlockCipherMode=E.extend({createEncryptor:function(Ae,Ce){return this.Encryptor.create(Ae,Ce)},createDecryptor:function(Ae,Ce){return this.Decryptor.create(Ae,Ce)},init:function(Ae,Ce){this._cipher=Ae,this._iv=Ce}})).extend();he.Encryptor=he.extend({processBlock:function(Ae,Ce){var Ge=this._cipher,vt=Ge.blockSize;oe.call(this,Ae,Ce,vt),Ge.encryptBlock(Ae,Ce),this._prevBlock=Ae.slice(Ce,Ce+vt)}}),he.Decryptor=he.extend({processBlock:function(Ae,Ce){var Ge=this._cipher,vt=Ge.blockSize,Ft=Ae.slice(Ce,Ce+vt);Ge.decryptBlock(Ae,Ce),oe.call(this,Ae,Ce,vt),this._prevBlock=Ft}}),re=re.CBC=he,he=(Se.pad={}).Pkcs7={pad:function(Ae,Ce){for(var Ge,vt=(Ge=(Ge=4*Ce)-Ae.sigBytes%Ge)<<24|Ge<<16|Ge<<8|Ge,Ft=[],kt=0;kt<Ge;kt+=4)Ft.push(vt);Ge=_.create(Ft,Ge),Ae.concat(Ge)},unpad:function(Ae){Ae.sigBytes-=255&Ae.words[Ae.sigBytes-1>>>2]}},p.BlockCipher=J.extend({cfg:J.cfg.extend({mode:re,padding:he}),reset:function(){J.reset.call(this);var Ae=(Ce=this.cfg).iv,Ce=Ce.mode;if(this._xformMode==this._ENC_XFORM_MODE)var Ge=Ce.createEncryptor;else Ge=Ce.createDecryptor,this._minBufferSize=1;this._mode=Ge.call(Ce,this,Ae&&Ae.words)},_doProcessBlock:function(Ae,Ce){this._mode.processBlock(Ae,Ce)},_doFinalize:function(){var Ae=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){Ae.pad(this._data,this.blockSize);var Ce=this._process(!0)}else Ce=this._process(!0),Ae.unpad(Ce);return Ce},blockSize:4});var ee=p.CipherParams=E.extend({init:function(Ae){this.mixIn(Ae)},toString:function(Ae){return(Ae||this.formatter).stringify(this)}}),Pe=(re=(Se.format={}).OpenSSL={stringify:function(Ae){var Ce=Ae.ciphertext;return((Ae=Ae.salt)?_.create([1398893684,1701076831]).concat(Ae).concat(Ce):Ce).toString(M)},parse:function(Ae){var Ce=(Ae=M.parse(Ae)).words;if(Ce[0]==1398893684&&Ce[1]==1701076831){var Ge=_.create(Ce.slice(2,4));Ce.splice(0,4),Ae.sigBytes-=16}return ee.create({ciphertext:Ae,salt:Ge})}},p.SerializableCipher=E.extend({cfg:E.extend({format:re}),encrypt:function(Ae,Ce,Ge,vt){vt=this.cfg.extend(vt);var Ft=Ae.createEncryptor(Ge,vt);return Ce=Ft.finalize(Ce),Ft=Ft.cfg,ee.create({ciphertext:Ce,key:Ge,iv:Ft.iv,algorithm:Ae,mode:Ft.mode,padding:Ft.padding,blockSize:Ae.blockSize,formatter:vt.format})},decrypt:function(Ae,Ce,Ge,vt){return vt=this.cfg.extend(vt),Ce=this._parse(Ce,vt.format),Ae.createDecryptor(Ge,vt).finalize(Ce.ciphertext)},_parse:function(Ae,Ce){return typeof Ae=="string"?Ce.parse(Ae,this):Ae}})),Se=(Se.kdf={}).OpenSSL={execute:function(Ae,Ce,Ge,vt){return vt||(vt=_.random(8)),Ae=W.create({keySize:Ce+Ge}).compute(Ae,vt),Ge=_.create(Ae.words.slice(Ce),4*Ge),Ae.sigBytes=4*Ce,ee.create({key:Ae,iv:Ge,salt:vt})}},Ee=p.PasswordBasedCipher=Pe.extend({cfg:Pe.cfg.extend({kdf:Se}),encrypt:function(Ae,Ce,Ge,vt){return Ge=(vt=this.cfg.extend(vt)).kdf.execute(Ge,Ae.keySize,Ae.ivSize),vt.iv=Ge.iv,(Ae=Pe.encrypt.call(this,Ae,Ce,Ge.key,vt)).mixIn(Ge),Ae},decrypt:function(Ae,Ce,Ge,vt){return vt=this.cfg.extend(vt),Ce=this._parse(Ce,vt.format),Ge=vt.kdf.execute(Ge,Ae.keySize,Ae.ivSize,Ce.salt),vt.iv=Ge.iv,Pe.decrypt.call(this,Ae,Ce,Ge.key,vt)}})}(),function(){for(var y=B,p=y.lib.BlockCipher,E=y.algo,_=[],R=[],M=[],W=[],J=[],re=[],oe=[],he=[],ee=[],Pe=[],Se=[],Ee=0;256>Ee;Ee++)Se[Ee]=128>Ee?Ee<<1:Ee<<1^283;var Ae=0,Ce=0;for(Ee=0;256>Ee;Ee++){var Ge=(Ge=Ce^Ce<<1^Ce<<2^Ce<<3^Ce<<4)>>>8^255&Ge^99;_[Ae]=Ge,R[Ge]=Ae;var vt=Se[Ae],Ft=Se[vt],kt=Se[Ft],At=257*Se[Ge]^16843008*Ge;M[Ae]=At<<24|At>>>8,W[Ae]=At<<16|At>>>16,J[Ae]=At<<8|At>>>24,re[Ae]=At,At=16843009*kt^65537*Ft^257*vt^16843008*Ae,oe[Ge]=At<<24|At>>>8,he[Ge]=At<<16|At>>>16,ee[Ge]=At<<8|At>>>24,Pe[Ge]=At,Ae?(Ae=vt^Se[Se[Se[kt^vt]]],Ce^=Se[Se[Ce]]):Ae=Ce=1}var Ie=[0,1,2,4,8,16,32,64,128,27,54];E=E.AES=p.extend({_doReset:function(){for(var Xe=(bt=this._key).words,He=bt.sigBytes/4,bt=4*((this._nRounds=He+6)+1),Ke=this._keySchedule=[],nt=0;nt<bt;nt++)if(nt<He)Ke[nt]=Xe[nt];else{var xe=Ke[nt-1];nt%He?6<He&&nt%He==4&&(xe=_[xe>>>24]<<24|_[xe>>>16&255]<<16|_[xe>>>8&255]<<8|_[255&xe]):(xe=_[(xe=xe<<8|xe>>>24)>>>24]<<24|_[xe>>>16&255]<<16|_[xe>>>8&255]<<8|_[255&xe],xe^=Ie[nt/He|0]<<24),Ke[nt]=Ke[nt-He]^xe}for(Xe=this._invKeySchedule=[],He=0;He<bt;He++)nt=bt-He,xe=He%4?Ke[nt]:Ke[nt-4],Xe[He]=4>He||4>=nt?xe:oe[_[xe>>>24]]^he[_[xe>>>16&255]]^ee[_[xe>>>8&255]]^Pe[_[255&xe]]},encryptBlock:function(Xe,He){this._doCryptBlock(Xe,He,this._keySchedule,M,W,J,re,_)},decryptBlock:function(Xe,He){var bt=Xe[He+1];Xe[He+1]=Xe[He+3],Xe[He+3]=bt,this._doCryptBlock(Xe,He,this._invKeySchedule,oe,he,ee,Pe,R),bt=Xe[He+1],Xe[He+1]=Xe[He+3],Xe[He+3]=bt},_doCryptBlock:function(Xe,He,bt,Ke,nt,xe,It,Je){for(var ft=this._nRounds,xt=Xe[He]^bt[0],Nt=Xe[He+1]^bt[1],Gr=Xe[He+2]^bt[2],fs=Xe[He+3]^bt[3],Is=4,tc=1;tc<ft;tc++){var qd=Ke[xt>>>24]^nt[Nt>>>16&255]^xe[Gr>>>8&255]^It[255&fs]^bt[Is++],ml=Ke[Nt>>>24]^nt[Gr>>>16&255]^xe[fs>>>8&255]^It[255&xt]^bt[Is++],Jc=Ke[Gr>>>24]^nt[fs>>>16&255]^xe[xt>>>8&255]^It[255&Nt]^bt[Is++];fs=Ke[fs>>>24]^nt[xt>>>16&255]^xe[Nt>>>8&255]^It[255&Gr]^bt[Is++],xt=qd,Nt=ml,Gr=Jc}qd=(Je[xt>>>24]<<24|Je[Nt>>>16&255]<<16|Je[Gr>>>8&255]<<8|Je[255&fs])^bt[Is++],ml=(Je[Nt>>>24]<<24|Je[Gr>>>16&255]<<16|Je[fs>>>8&255]<<8|Je[255&xt])^bt[Is++],Jc=(Je[Gr>>>24]<<24|Je[fs>>>16&255]<<16|Je[xt>>>8&255]<<8|Je[255&Nt])^bt[Is++],fs=(Je[fs>>>24]<<24|Je[xt>>>16&255]<<16|Je[Nt>>>8&255]<<8|Je[255&Gr])^bt[Is++],Xe[He]=qd,Xe[He+1]=ml,Xe[He+2]=Jc,Xe[He+3]=fs},keySize:8}),y.AES=p._createHelper(E)}(),B.mode.ECB=((H=B.lib.BlockCipherMode.extend()).Encryptor=H.extend({processBlock:function(y,p){this._cipher.encryptBlock(y,p)}}),H.Decryptor=H.extend({processBlock:function(y,p){this._cipher.decryptBlock(y,p)}}),H);var q=B;function Z(y){var p,E=[];for(p=0;p<y.length;p+=1)E[p/4|0]|=y[p]<<24-8*p;return q.lib.WordArray.create(E,y.length)}var C=function(){function y(p){var E=p.config;this._config=E,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKe
203y:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return y.prototype.HMACSHA256=function(p){return q.HmacSHA256(p,this._config.secretKey).toString(q.enc.Base64)},y.prototype.SHA256=function(p){return q.SHA256(p).toString(q.enc.Hex)},y.prototype._parseOptions=function(p){var E=p||{};return E.hasOwnProperty("encryptKey")||(E.encryptKey=this._defaultOptions.encryptKey),E.hasOwnProperty("keyEncoding")||(E.keyEncoding=this._defaultOptions.keyEncoding),E.hasOwnProperty("keyLength")||(E.keyLength=this._defaultOptions.keyLength),E.hasOwnProperty("mode")||(E.mode=this._defaultOptions.mode),this._allowedKeyEncodings.indexOf(E.keyEncoding.toLowerCase())===-1&&(E.keyEncoding=this._defaultOptions.keyEncoding),this._allowedKeyLengths.indexOf(parseInt(E.keyLength,10))===-1&&(E.keyLength=this._defaultOptions.keyLength),this._allowedModes.indexOf(E.mode.toLowerCase())===-1&&(E.mode=this._defaultOptions.mode),E},y.prototype._decodeKey=function(p,E){return E.keyEncoding==="base64"?q.enc.Base64.parse(p):E.keyEncoding==="hex"?q.enc.Hex.parse(p):p},y.prototype._getPaddedKey=function(p,E){return p=this._decodeKey(p,E),E.encryptKey?q.enc.Utf8.parse(this.SHA256(p).slice(0,32)):p},y.prototype._getMode=function(p){return p.mode==="ecb"?q.mode.ECB:q.mode.CBC},y.prototype._getIV=function(p){return p.mode==="cbc"?q.enc.Utf8.parse(this._iv):null},y.prototype._getRandomIV=function(){return q.lib.WordArray.random(16)},y.prototype.encrypt=function(p,E,_){return this._config.customEncrypt?this._config.customEncrypt(p):this.pnEncrypt(p,E,_)},y.prototype.decrypt=function(p,E,_){return this._config.customDecrypt?this._config.customDecrypt(p):this.pnDecrypt(p,E,_)},y.prototype.pnEncrypt=function(p,E,_){if(!E&&!this._config.cipherKey)return p;_=this._parseOptions(_);var R=this._getMode(_),M=this._getPaddedKey(E||this._config.cipherKey,_);if(this._config.useRandomIVs){var W=this._getRandomIV(),J=q.AES.encrypt(p,M,{iv:W,mode:R}).ciphertext;return W.clone().concat(J.clone()).toString(q.enc.Base64)}var re=this._getIV(_);return q.AES.encrypt(p,M,{iv:re,mode:R}).ciphertext.toString(q.enc.Base64)||p},y.prototype.pnDecrypt=function(p,E,_){if(!E&&!this._config.cipherKey)return p;_=this._parseOptions(_);var R=this._getMode(_),M=this._getPaddedKey(E||this._config.cipherKey,_);if(this._config.useRandomIVs){var W=Z((oe=new Uint8ClampedArray(w(p))).slice(0,16)),J=Z(oe.slice(16));try{var re=q.AES.decrypt({ciphertext:J},M,{iv:W,mode:R}).toString(q.enc.Utf8);return JSON.parse(re)}catch{return null}}else{W=this._getIV(_);try{var oe=q.enc.Base64.parse(p);return re=q.AES.decrypt({ciphertext:oe},M,{iv:W,mode:R}).toString(q.enc.Utf8),JSON.parse(re)}catch{return null}}},y}(),L=function(){function y(p){var E=p.timeEndpoint;this._timeEndpoint=E}return y.prototype.onReconnection=function(p){this._reconnectionCallback=p},y.prototype.startPolling=function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)},y.prototype.stopPolling=function(){clearInterval(this._timeTimer)},y.prototype._performTimeLoop=function(){var p=this;this._timeEndpoint(function(E){E.error||(clearInterval(p._timeTimer),p._reconnectionCallback())})},y}(),V=function(){function y(p){var E=p.config;this.hashHistory=[],this._config=E}return y.prototype.getKey=function(p){var E=function(R){var M=0;if(R.length===0)return M;for(var W=0;W<R.length;W+=1)M=(M<<5)-M+R.charCodeAt(W),M&=M;return M}(JSON.stringify(p.payload)).toString(),_=p.publishMetaData.publishTimetoken;return"".concat(_,"-").concat(E)},y.prototype.isDuplicate=function(p){return this.hashHistory.includes(this.getKey(p))},y.prototype.addEntry=function(p){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(p))},y.prototype.clearHistory=function(){this.hashHistory=[]},y}(),j={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory",PNDisconnectedCategory:"PNDisconnectedCategory",PNConnectionErrorCategory:"PNConnectionErrorCategory",PNDisconnectedUnexpectedlyCategory:"PNDisconnectedUnexpectedlyCategory"},X=function(){function y(p){var E=p.subscribeEndpoint,_=p.leaveEndpoint,R=p.heartbeatEndpoint,M=p.setStateEndpoint,W=p.timeEndpoint,J=p.getFileUrl,re=p.config,oe=p.crypto,he=p.listenerManager,ee=p.cryptoModule,Pe=p.eventEmitter;this._listenerManager=he,this._config=re,this._leaveEndpoint=_,this._heartbeatEndpoint=R,this._setStateEndpoint=M,this._subscribeEndpoint=E,this._getFileUrl=J,this._crypto=oe,this._cryptoModule=ee,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new L({timeEndpoint:W}),this._dedupingManager=new V({config:re}),this._cryptoModule&&(this._decoder=new TextDecoder),this._eventEmitter=Pe}return y.prototype.adaptStateChange=function(p,E){var _=this,R=p.state,M=p.channels,W=M===void 0?[]:M,J=p.channelGroups,re=J===void 0?[]:J,oe=p.withHeartbeat,he=oe!==void 0&&oe;if(W.forEach(function(Pe){Pe in _._channels&&(_._channels[Pe].state=R)}),re.forEach(function(Pe){Pe in _._channelGroups&&(_._channelGroups[Pe].state=R)}),he){var ee={};return W.forEach(function(Pe){return ee[Pe]=R}),re.forEach(function(Pe){return ee[Pe]=R}),this._heartbeatEndpoint({channels:W,channelGroups:re,state:ee},E)}return this._setStateEndpoint({state:R,channels:W,channelGroups:re},E)},y.prototype.adaptPresenceChange=function(p){var E=this,_=p.connected,R=p.channels,M=R===void 0?[]:R,W=p.channelGroups,J=W===void 0?[]:W;
203_?(M.forEach(function(re){E._heartbeatChannels[re]={state:{}}}),J.forEach(function(re){E._heartbeatChannelGroups[re]={state:{}}})):(M.forEach(function(re){re in E._heartbeatChannels&&delete E._heartbeatChannels[re]}),J.forEach(function(re){re in E._heartbeatChannelGroups&&delete E._heartbeatChannelGroups[re]}),this._config.suppressLeaveEvents===!1&&this._leaveEndpoint({channels:M,channelGroups:J},function(re){E._listenerManager.announceStatus(re)})),this.reconnect()},y.prototype.adaptSubscribeChange=function(p){var E=this,_=p.timetoken,R=p.channels,M=R===void 0?[]:R,W=p.channelGroups,J=W===void 0?[]:W,re=p.withPresence,oe=re!==void 0&&re,he=p.withHeartbeats,ee=he!==void 0&&he;this._config.subscribeKey&&this._config.subscribeKey!==""?(_&&(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=_),this._currentTimetoken!=="0"&&this._currentTimetoken!==0&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),M.forEach(function(Pe){E._channels[Pe]={state:{}},oe&&(E._presenceChannels[Pe]={}),(ee||E._config.getHeartbeatInterval())&&(E._heartbeatChannels[Pe]={}),E._pendingChannelSubscriptions.push(Pe)}),J.forEach(function(Pe){E._channelGroups[Pe]={state:{}},oe&&(E._presenceChannelGroups[Pe]={}),(ee||E._config.getHeartbeatInterval())&&(E._heartbeatChannelGroups[Pe]={}),E._pendingChannelGroupSubscriptions.push(Pe)}),this._subscriptionStatusAnnounced=!1,this.reconnect()):console&&console.log&&console.log("subscribe key missing; aborting subscribe")},y.prototype.adaptUnsubscribeChange=function(p,E){var _=this,R=p.channels,M=R===void 0?[]:R,W=p.channelGroups,J=W===void 0?[]:W,re=[],oe=[];M.forEach(function(he){he in _._channels&&(delete _._channels[he],re.push(he),he in _._heartbeatChannels&&delete _._heartbeatChannels[he]),he in _._presenceChannels&&(delete _._presenceChannels[he],re.push(he))}),J.forEach(function(he){he in _._channelGroups&&(delete _._channelGroups[he],oe.push(he),he in _._heartbeatChannelGroups&&delete _._heartbeatChannelGroups[he]),he in _._presenceChannelGroups&&(delete _._presenceChannelGroups[he],oe.push(he))}),re.length===0&&oe.length===0||(this._config.suppressLeaveEvents!==!1||E||this._leaveEndpoint({channels:re,channelGroups:oe},function(he){he.affectedChannels=re,he.affectedChannelGroups=oe,he.currentTimetoken=_._currentTimetoken,he.lastTimetoken=_._lastTimetoken,_._listenerManager.announceStatus(he)}),Object.keys(this._channels).length===0&&Object.keys(this._presenceChannels).length===0&&Object.keys(this._channelGroups).length===0&&Object.keys(this._presenceChannelGroups).length===0&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())},y.prototype.unsubscribeAll=function(p){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},p)},y.prototype.getHeartbeatChannels=function(){return Object.keys(this._heartbeatChannels)},y.prototype.getHeartbeatChannelGroups=function(){return Object.keys(this._heartbeatChannelGroups)},y.prototype.getSubscribedChannels=function(){return Object.keys(this._channels)},y.prototype.getSubscribedChannelGroups=function(){return Object.keys(this._channelGroups)},y.prototype.reconnect=function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()},y.prototype.disconnect=function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()},y.prototype._registerHeartbeatTimer=function(){this._stopHeartbeatTimer(),this._config.getHeartbeatInterval()!==0&&this._config.getHeartbeatInterval()!==void 0&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))},y.prototype._stopHeartbeatTimer=function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)},y.prototype._performHeartbeatLoop=function(){var p=this,E=this.getHeartbeatChannels(),_=this.getHeartbeatChannelGroups(),R={};(E.length!==0||_.length!==0)&&(this.getSubscribedChannels().forEach(function(M){var W=p._channels[M].state;Object.keys(W).length&&(R[M]=W)}
203),this.getSubscribedChannelGroups().forEach(function(M){var W=p._channelGroups[M].state;Object.keys(W).length&&(R[M]=W)}),this._heartbeatEndpoint({channels:E,channelGroups:_,state:R},(function(M){M.error&&p._config.announceFailedHeartbeats&&p._listenerManager.announceStatus(M),M.error&&p._config.autoNetworkDetection&&p._isOnline&&(p._isOnline=!1,p.disconnect(),p._listenerManager.announceNetworkDown(),p.reconnect()),!M.error&&p._config.announceSuccessfulHeartbeats&&p._listenerManager.announceStatus(M)}).bind(this)))},y.prototype._startSubscribeLoop=function(){var p=this;this._stopSubscribeLoop();var E={},_=[],R=[];if(Object.keys(this._channels).forEach(function(W){var J=p._channels[W].state;Object.keys(J).length&&(E[W]=J),_.push(W)}),Object.keys(this._presenceChannels).forEach(function(W){_.push("".concat(W,"-pnpres"))}),Object.keys(this._channelGroups).forEach(function(W){var J=p._channelGroups[W].state;Object.keys(J).length&&(E[W]=J),R.push(W)}),Object.keys(this._presenceChannelGroups).forEach(function(W){R.push("".concat(W,"-pnpres"))}),_.length!==0||R.length!==0){var M={channels:_,channelGroups:R,state:E,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(M,this._processSubscribeResponse.bind(this))}},y.prototype._processSubscribeResponse=function(p,E){var _=this;if(p.error){if(p.errorData&&p.errorData.message==="Aborted")return;p.category===j.PNTimeoutCategory?this._startSubscribeLoop():p.category===j.PNNetworkIssuesCategory?(this.disconnect(),p.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection(function(){_._config.autoNetworkDetection&&!_._isOnline&&(_._isOnline=!0,_._listenerManager.announceNetworkUp()),_.reconnect(),_._subscriptionStatusAnnounced=!0;var he={category:j.PNReconnectedCategory,operation:p.operation,lastTimetoken:_._lastTimetoken,currentTimetoken:_._currentTimetoken};_._listenerManager.announceStatus(he)}),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(p)):p.category===j.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(p)):this._listenerManager.announceStatus(p)}else{if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=E.metadata.timetoken),!this._subscriptionStatusAnnounced){var R={};R.category=j.PNConnectedCategory,R.operation=p.operation,R.affectedChannels=this._pendingChannelSubscriptions,R.subscribedChannels=this.getSubscribedChannels(),R.affectedChannelGroups=this._pendingChannelGroupSubscriptions,R.lastTimetoken=this._lastTimetoken,R.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(R),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var M=E.messages||[],W=this._config,J=W.requestMessageCountThreshold,re=W.dedupeOnSubscribe;if(J&&M.length>=J){var oe={};oe.category=j.PNRequestMessageCountExceededCategory,oe.operation=p.operation,this._listenerManager.announceStatus(oe)}M.forEach(function(he){if(he.channel,he.subscriptionMatch,re){if(_._dedupingManager.isDuplicate(he))return;_._dedupingManager.addEntry(he)}_._eventEmitter.emitEvent(he)}),this._region=E.metadata.region,this._startSubscribeLoop()}},y.prototype._stopSubscribeLoop=function(){this._subscribeCall&&(typeof this._subscribeCall.abort=="function"&&this._subscribeCall.abort(),this._subscribeCall=null)},y.prototype._renameEvent=function(p){return p==="set"?"updated":"removed"},y.prototype._renameChannelField=function(p){var E=p.channel,_=s(p,["channel"]);return _.spaceId=E,_},y}(),G={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNSignalOperation:"PNSignalOperation",PNAddMessageActionOperation:"PNAddActionOperation",PNRemoveMessageActionOperation:"PNRemoveMessageActionOperation",PNGetMessageActionsOperation:"PNGetMessageActionsOperation",PNCreateUserOperation:"PNCreateUserOperation",PNUpdateUserOperation:"PNUpdateUserOperation",PNDeleteUserOperation:"PNDeleteUserOperation",PNGetUserOperation:"PNGetUsersOperation",PNGetUsersOperation:"PNGetUsersOperation",PNCreateSpaceOperation:"PNCreateSpaceOperation",PNUpdateSpaceOperation:"PNUpdateSpaceOperation",PNDeleteSpaceOperation:"PNDeleteSpaceOperation",PNGetSpaceOperation:"PNGetSpacesOperation",PNGetSpacesOperation:"PNGetSpacesOperation",PNGetMembersOperation:"PNGetMembersOperation",PNUpdateMembersOperation:"PNUpdateMembersOperation",PNGetMembershipsOperation:"PNGetMembershipsOperation",PNUpdateMembershipsOperation:"PNUpdateMembershipsOperation",PNListFilesOperation:"PNListFilesOperation",PNGenerateUploadUrlOperation:"PNGenerateUploadUrlOperation",PNPublishFileOperation:"PNPublishFileOperation",PNGetFileUrlOperation:"PNGetFileUrlOperation",PNDownloadFileOperation:"PNDownloadFileOperation",PNGetAllUUIDMetadataOperation:"PNGetAllUUIDMetadataOperation",PNGetUUIDMetadataOperation:"PNGetUUIDMetadataOperation",PNSetUUIDMetadataOperation:"PNSetUUIDMetadataOperation",PNRemoveUUIDMetadataOperation:"PNRemoveUUIDMetadataOperation",PNGetAllChannelMetadataOperation:"PNGetAllChannelMetadataOperation",PNGetChannelMetadataOperation:"PNGetChannelMetadataOperation",PNSetChannelMetadataOperation:"PNSetChannelMetadataOperation",PNRemoveChannelMetadataOperation:"PNRemoveChannelMetadataOperation",PNSetMembersOperation:"PNSetMembersOperation",PNSetMembershipsOperation:"PNSetMembershipsOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerGrantToken:"PNAccessManagerGrantToken",PNAccessManagerAudit:"PNAccessManagerAudit",PNAccessManagerRevokeToken:"PNAccessManagerRevokeToken",PNHandshakeOperation:"PNHandshakeOperation",PNReceiveMessagesOperation:"PNReceiveMessagesOperation"},ie=function(){function y(p){this._maximumSamplesCount=100,this._trackedLatencies={},this._latencies={},this._telemetryExcludeOperations=[G.PNSubscribeOperation,G.PNReceiveMessagesOperation,G.PNHandshakeOperation],this._maximumSamplesCount=p.maximumSamplesCount||this._maximumSamplesCount}return y.prototype.operationsLatencyForRequest=function(){var p=this,E={};
203return Object.keys(this._latencies).forEach(function(_){var R=p._latencies[_],M=p._averageLatency(R);M>0&&(E["l_".concat(_)]=M)}),E},y.prototype.startLatencyMeasure=function(p,E){!this._telemetryExcludeOperations.includes(p)&&E&&(this._trackedLatencies[E]=Date.now())},y.prototype.stopLatencyMeasure=function(p,E){if(!this._telemetryExcludeOperations.includes(p)&&E){var _=this._endpointName(p),R=this._latencies[_],M=this._trackedLatencies[E];R||(this._latencies[_]=[],R=this._latencies[_]),R.push(Date.now()-M),R.length>this._maximumSamplesCount&&R.splice(0,R.length-this._maximumSamplesCount),delete this._trackedLatencies[E]}},y.prototype._averageLatency=function(p){return Math.floor(p.reduce(function(E,_){return E+_},0)/p.length)},y.prototype._endpointName=function(p){var E=null;switch(p){case G.PNPublishOperation:E="pub";break;case G.PNSignalOperation:E="sig";break;case G.PNHistoryOperation:case G.PNFetchMessagesOperation:case G.PNDeleteMessagesOperation:case G.PNMessageCounts:E="hist";break;case G.PNUnsubscribeOperation:case G.PNWhereNowOperation:case G.PNHereNowOperation:case G.PNHeartbeatOperation:case G.PNSetStateOperation:case G.PNGetStateOperation:E="pres";break;case G.PNAddChannelsToGroupOperation:case G.PNRemoveChannelsFromGroupOperation:case G.PNChannelGroupsOperation:case G.PNRemoveGroupOperation:case G.PNChannelsForGroupOperation:E="cg";break;case G.PNPushNotificationEnabledChannelsOperation:case G.PNRemoveAllPushNotificationsOperation:E="push";break;case G.PNCreateUserOperation:case G.PNUpdateUserOperation:case G.PNDeleteUserOperation:case G.PNGetUserOperation:case G.PNGetUsersOperation:case G.PNCreateSpaceOperation:case G.PNUpdateSpaceOperation:case G.PNDeleteSpaceOperation:case G.PNGetSpaceOperation:case G.PNGetSpacesOperation:case G.PNGetMembersOperation:case G.PNUpdateMembersOperation:case G.PNGetMembershipsOperation:case G.PNUpdateMembershipsOperation:E="obj";break;case G.PNAddMessageActionOperation:case G.PNRemoveMessageActionOperation:case G.PNGetMessageActionsOperation:E="msga";break;case G.PNAccessManagerGrant:case G.PNAccessManagerAudit:E="pam";break;case G.PNAccessManagerGrantToken:case G.PNAccessManagerRevokeToken:E="pamv3";break;default:E="time"}return E},y}(),ae=function(){function y(p,E,_){this._payload=p,this._setDefaultPayloadStructure(),this.title=E,this.body=_}return Object.defineProperty(y.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"title",{set:function(p){this._title=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"subtitle",{set:function(p){this._subtitle=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"body",{set:function(p){this._body=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"badge",{set:function(p){this._badge=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"sound",{set:function(p){this._sound=p},enumerable:!1,configurable:!0}),y.prototype._setDefaultPayloadStructure=function(){},y.prototype.toObject=function(){return{}},y}(),ue=function(y){function p(){return y!==null&&y.apply(this,arguments)||this}return r(p,y),Object.defineProperty(p.prototype,"configurations",{set:function(E){E&&E.length&&(this._configurations=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"notification",{get:function(){return this._payload.aps},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"title",{get:function(){return this._title},set:function(E){E&&E.length&&(this._payload.aps.alert.title=E,this._title=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"subtitle",{get:function(){return this._subtitle},set:function(E){E&&E.length&&(this._payload.aps.alert.subtitle=E,this._subtitle=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"body",{get:function(){return this._body},set:function(E){E&&E.length&&(this._payload.aps.alert.body=E,this._body=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"badge",{get:function(){return this._badge},set:function(E){E!=null&&(this._payload.aps.badge=E,this._badge=E)}
203,enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"sound",{get:function(){return this._sound},set:function(E){E&&E.length&&(this._payload.aps.sound=E,this._sound=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"silent",{set:function(E){this._isSilent=E},enumerable:!1,configurable:!0}),p.prototype._setDefaultPayloadStructure=function(){this._payload.aps={alert:{}}},p.prototype.toObject=function(){var E=this,_=i({},this._payload),R=_.aps,M=R.alert;if(this._isSilent&&(R["content-available"]=1),this._apnsPushType==="apns2"){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");var W=[];this._configurations.forEach(function(J){W.push(E._objectFromAPNS2Configuration(J))}),W.length&&(_.pn_push=W)}return M&&Object.keys(M).length||delete R.alert,this._isSilent&&(delete R.alert,delete R.badge,delete R.sound,M={}),this._isSilent||Object.keys(M).length?_:null},p.prototype._objectFromAPNS2Configuration=function(E){var _=this;if(!E.targets||!E.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");var R=[];E.targets.forEach(function(re){R.push(_._objectFromAPNSTarget(re))});var M=E.collapseId,W=E.expirationDate,J={auth_method:"token",targets:R,version:"v2"};return M&&M.length&&(J.collapse_id=M),W&&(J.expiration=W.toISOString()),J},p.prototype._objectFromAPNSTarget=function(E){if(!E.topic||!E.topic.length)throw new TypeError("Target 'topic' undefined.");var _=E.topic,R=E.environment,M=R===void 0?"development":R,W=E.excludedDevices,J=W===void 0?[]:W,re={topic:_,environment:M};return J.length&&(re.excluded_devices=J),re},p}(ae),Q=function(y){function p(){return y!==null&&y.apply(this,arguments)||this}return r(p,y),Object.defineProperty(p.prototype,"backContent",{get:function(){return this._backContent},set:function(E){E&&E.length&&(this._payload.back_content=E,this._backContent=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"backTitle",{get:function(){return this._backTitle},set:function(E){E&&E.length&&(this._payload.back_title=E,this._backTitle=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"count",{get:function(){return this._count},set:function(E){E!=null&&(this._payload.count=E,this._count=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"title",{get:function(){return this._title},set:function(E){E&&E.length&&(this._payload.title=E,this._title=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"type",{get:function(){return this._type},set:function(E){E&&E.length&&(this._payload.type=E,this._type=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"subtitle",{get:function(){return this.backTitle},set:function(E){this.backTitle=E},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"body",{get:function(){return this.backContent},set:function(E){this.backContent=E},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"badge",{get:function(){return this.count},set:function(E){this.count=E},enumerable:!1,configurable:!0}),p.prototype.toObject=function(){return Object.keys(this._payload).length?i({},this._payload):null},p}(ae),de=function(y){function p(){return y!==null&&y.apply(this,arguments)||this}return r(p,y),Object.defineProperty(p.prototype,"notification",{get:function(){return this._payload.notification},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"data",{get:function(){return this._payload.data},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"title",{get:function(){return this._title},set:function(E){E&&E.length&&(this._payload.notification.title=E,this._title=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"body",{get:function(){return this._body},set:function(E){E&&E.length&&(this._payload.notification.body=E,this._body=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"sound",{get:function(){return this._sound},set:function(E){E&&E.length&&(this._payload.notification.sound=E,this._sound=E)}
203,enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"icon",{get:function(){return this._icon},set:function(E){E&&E.length&&(this._payload.notification.icon=E,this._icon=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"tag",{get:function(){return this._tag},set:function(E){E&&E.length&&(this._payload.notification.tag=E,this._tag=E)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"silent",{set:function(E){this._isSilent=E},enumerable:!1,configurable:!0}),p.prototype._setDefaultPayloadStructure=function(){this._payload.notification={},this._payload.data={}},p.prototype.toObject=function(){var E=i({},this._payload.data),_=null,R={};if(Object.keys(this._payload).length>2){var M=this._payload;M.notification,M.data;var W=s(M,["notification","data"]);E=i(i({},E),W)}return this._isSilent?E.notification=this._payload.notification:_=this._payload.notification,Object.keys(E).length&&(R.data=E),_&&Object.keys(_).length&&(R.notification=_),Object.keys(R).length?R:null},p}(ae),le=function(){function y(p,E){this._payload={apns:{},mpns:{},fcm:{}},this._title=p,this._body=E,this.apns=new ue(this._payload.apns,p,E),this.mpns=new Q(this._payload.mpns,p,E),this.fcm=new de(this._payload.fcm,p,E)}return Object.defineProperty(y.prototype,"debugging",{set:function(p){this._debugging=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"subtitle",{get:function(){return this._subtitle},set:function(p){this._subtitle=p,this.apns.subtitle=p,this.mpns.subtitle=p,this.fcm.subtitle=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"badge",{get:function(){return this._badge},set:function(p){this._badge=p,this.apns.badge=p,this.mpns.badge=p,this.fcm.badge=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"sound",{get:function(){return this._sound},set:function(p){this._sound=p,this.apns.sound=p,this.mpns.sound=p,this.fcm.sound=p},enumerable:!1,configurable:!0}),y.prototype.buildPayload=function(p){var E={};if(p.includes("apns")||p.includes("apns2")){this.apns._apnsPushType=p.includes("apns")?"apns":"apns2";var _=this.apns.toObject();_&&Object.keys(_).length&&(E.pn_apns=_)}if(p.includes("mpns")){var R=this.mpns.toObject();R&&Object.keys(R).length&&(E.pn_mpns=R)}if(p.includes("fcm")){var M=this.fcm.toObject();M&&Object.keys(M).length&&(E.pn_gcm=M)}return Object.keys(E).length&&this._debugging&&(E.pn_debug=!0),E},y}(),ye=function(){function y(){this._listeners=[]}return y.prototype.addListener=function(p){this._listeners.includes(p)||this._listeners.push(p)},y.prototype.removeListener=function(p){var E=[];this._listeners.forEach(function(_){_!==p&&E.push(_)}),this._listeners=E},y.prototype.removeAllListeners=function(){this._listeners=[]},y.prototype.announcePresence=function(p){this._listeners.forEach(function(E){E.presence&&E.presence(p)})},y.prototype.announceStatus=function(p){this._listeners.forEach(function(E){E.status&&E.status(p)})},y.prototype.announceMessage=function(p){this._listeners.forEach(function(E){E.message&&E.message(p)})},y.prototype.announceSignal=function(p){this._listeners.forEach(function(E){E.signal&&E.signal(p)})},y.prototype.announceMessageAction=function(p){this._listeners.forEach(function(E){E.messageAction&&E.messageAction(p)})},y.prototype.announceFile=function(p){this._listeners.forEach(function(E){E.file&&E.file(p)})},y.prototype.announceObjects=function(p){this._listeners.forEach(function(E){E.objects&&E.objects(p)})},y.prototype.announceUser=function(p){this._listeners.forEach(function(E){E.user&&E.user(p)})},y.prototype.announceSpace=function(p){this._listeners.forEach(function(E){E.space&&E.space(p)})},y.prototype.announceMembership=function(p){this._listeners.forEach(function(E){E.membership&&E.membership(p)})},y.prototype.announceNetworkUp=function(){var p={};p.category=j.PNNetworkUpCategory,this.announceStatus(p)},y.prototype.announceNetworkDown=function(){var p={};p.category=j.PNNetworkDownCategory,this.announceStatus(p)},y}(),fe=function(){function y(p,E){this._config=p,this._cbor=E}return y.prototype.setToken=function(p){p&&p.length>0?this._token=p:this._token=void 0},y.prototype.getToken=function(){return this._token},y.prototype.extractPermissions=function(p){var E={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return(128&p)==128&&(E.join=!0),(64&p)==64&&(E.update=!0),(32&p)==32&&(E.get=!0),(8&p)==8&&(E.delete=!0),(4&p)==4&&(E.manage=!0),(2&p)==2&&(E.write=!0),(1&p)==1&&(E.read=!0),E},y.prototype.parseToken=function(p){var E=this,_=this._cbor.decodeToken(p);if(_!==void 0){var R=_.res.uuid?Object.keys(_.res.uuid):[],M=Object.keys(_.res.chan),W=Object.keys(_.res.grp),J=_.pat.uuid?Object.keys(_.pat.uuid):[],re=Object.keys(_.pat.chan),oe=Object.keys(_.pat.grp),he={version:_.v,timestamp:_.t,ttl:_.ttl,authorized_uuid:_.uuid},ee=R.length>0,Pe=M.length>0,Se=W.length>0;(ee||Pe||Se)&&(he.resources={},ee&&(he.resources.uuids={},R.forEach(function(Ge){he.resources.uuids[Ge]=E.extractPermissions(_.res.uuid[Ge])})),Pe&&(he.resources.channels={},M.forEach(function(Ge){he.resources.channels[Ge]=E.extractPermissions(_.res.chan[Ge])})),Se&&(he.resources.groups={},W.forEach(function(Ge){he.resources.groups[Ge]=E.extractPermissions(_.res.grp[Ge])})));var Ee=J.length>0,Ae=re.length>0,Ce=oe.length>0;return(Ee||Ae||Ce)&&(he.patterns={},Ee&&(he.patterns.uuids={},J.forEach(function(Ge){he.patterns.uuids[Ge]=E.extractPermissions(_.pat.uuid[Ge])})),Ae&&(he.patterns.channels={},re.forEach(function(Ge){he.patterns.channels[Ge]=E.extractPermissions(_.pat.chan[Ge])})),Ce&&(he.patterns.groups={},oe.forEach(function(Ge){he.patterns.groups[Ge]=E.extractPermissions(_.pat.grp[Ge])}))),Object.keys(_.meta).length>0&&(he.meta=_.meta),he.signature=_.sig,he}},y}();function We(y){return encodeURIComponent(y).replace(/[!~*'()]/g,function(p){return"%".concat(p.charCo
203deAt(0).toString(16).toUpperCase())})}function Le(y){return function(p){var E=[];return Object.keys(p).forEach(function(_){return E.push(_)}),E}(y).sort()}var Ve={signPamFromParams:function(y){return Le(y).map(function(p){return"".concat(p,"=").concat(We(y[p]))}).join("&")},endsWith:function(y,p){return y.indexOf(p,this.length-p.length)!==-1},createPromise:function(){var y,p;return{promise:new Promise(function(E,_){y=E,p=_}),reject:p,fulfill:y}},encodeString:We,stringToArrayBuffer:function(y){for(var p=new ArrayBuffer(2*y.length),E=new Uint16Array(p),_=0,R=y.length;_<R;_++)E[_]=y.charCodeAt(_);return p},removeSingleOccurance:function(y,p){var E=Object.fromEntries(p.map(function(_){return[_,!1]}));return y.filter(function(_){return!(p.includes(_)&&!E[_])||(E[_]=!0,!1)})},findUniqueCommonElements:function(y,p){return __spreadArray([],__read(y),!1).filter(function(E){return p.includes(E)&&y.indexOf(E)===y.lastIndexOf(E)&&p.indexOf(E)===p.lastIndexOf(E)})}},at=function(y){function p(E,_){var R=this.constructor,M=y.call(this,E)||this;return M.name=M.constructor.name,M.status=_,M.message=E,Object.setPrototypeOf(M,R.prototype),M}return r(p,y),p}(Error);function Et(y){return(p={message:y}).type="validationError",p.error=!0,p;var p}function ne(y,p,E){return y.usePost&&y.usePost(p,E)?y.postURL(p,E):y.usePatch&&y.usePatch(p,E)?y.patchURL(p,E):y.useGetFile&&y.useGetFile(p,E)?y.getFileURL(p,E):y.getURL(p,E)}function Ze(y){if(y.sdkName)return y.sdkName;var p="PubNub-JS-".concat(y.sdkFamily);y.partnerId&&(p+="-".concat(y.partnerId)),p+="/".concat(y.getVersion());var E=y._getPnsdkSuffix(" ");return E.length>0&&(p+=E),p}function lt(y,p,E){return p.usePost&&p.usePost(y,E)?"POST":p.usePatch&&p.usePatch(y,E)?"PATCH":p.useDelete&&p.useDelete(y,E)?"DELETE":p.useGetFile&&p.useGetFile(y,E)?"GETFILE":"GET"}function ot(y,p,E,_,R){var M=y.config,W=y.crypto,J=lt(y,R,_);E.timestamp=Math.floor(new Date().getTime()/1e3),R.getOperation()==="PNPublishOperation"&&R.usePost&&R.usePost(y,_)&&(J="GET"),J==="GETFILE"&&(J="GET");var re="".concat(J,`
204`).concat(M.publishKey,`
205`).concat(p,`
206`).concat(Ve.signPamFromParams(E),`
207`);if(J==="POST")re+=typeof(oe=R.postPayload(y,_))=="string"?oe:JSON.stringify(oe);else if(J==="PATCH"){var oe;re+=typeof(oe=R.patchPayload(y,_))=="string"?oe:JSON.stringify(oe)}var he="v2.".concat(W.HMACSHA256(re));he=(he=(he=he.replace(/\+/g,"-")).replace(/\//g,"_")).replace(/=+$/,""),E.signature=he}function se(y,p){for(var E=[],_=2;_<arguments.length;_++)E[_-2]=arguments[_];var R=y.networking,M=y.config,W=y.telemetryManager,J=y.tokenManager,re=S(),oe=null,he=null,ee={};p.getOperation()===G.PNTimeOperation||p.getOperation()===G.PNChannelGroupsOperation?oe=E[0]:(ee=E[0],oe=E[1]),typeof Promise>"u"||oe||(he=Ve.createPromise());var Pe=p.validateParams(y,ee);if(Pe)return oe?oe(Et(Pe)):he?(he.reject(new at("Validation failed, check status for details",Et(Pe))),he.promise):void 0;var Se,Ee=p.prepareParams(y,ee),Ae=ne(p,y,ee),Ce={url:Ae,operation:p.getOperation(),timeout:p.getRequestTimeout(y),headers:p.getRequestHeaders?p.getRequestHeaders():{},ignoreBody:typeof p.ignoreBody=="function"&&p.ignoreBody(y),forceBuffered:typeof p.forceBuffered=="function"?p.forceBuffered(y,ee):null,abortSignal:typeof p.getAbortSignal=="function"?p.getAbortSignal(y,ee):null};Ee.uuid=M.UUID,Ee.pnsdk=Ze(M);var Ge=W.operationsLatencyForRequest();if(Object.keys(Ge).length&&(Ee=i(i({},Ee),Ge)),M.useInstanceId&&(Ee.instanceid=M.instanceId),M.useRequestId&&(Ee.requestid=re),p.isAuthSupported()){var vt=J.getToken()||M.getAuthKey();vt&&(Ee.auth=vt)}M.secretKey&&ot(y,Ae,Ee,ee,p);var Ft=function(At,Ie){if(At.error)return p.handleError&&p.handleError(y,ee,At),void(oe?oe(At):he&&he.reject(new at("PubNub call failed, check status for details",At)));W.stopLatencyMeasure(p.getOperation(),re);var Xe=p.handleResponse(y,Ie,ee);typeof(Xe==null?void 0:Xe.then)!="function"&&(Xe=Promise.resolve(Xe)),Xe.then(function(He){oe?oe(At,He):he&&he.fulfill(He)}).catch(function(He){if(oe){var bt=He;p.getOperation()===G.PNSubscribeOperation&&(bt={statusCode:400,error:!0,operation:p.getOperation(),errorData:He,category:j.PNUnknownCategory}),oe(bt,null)}else he&&he.reject(new at("PubNub call failed, check status for details",He))})};if(W.startLatencyMeasure(p.getOperation(),re),lt(y,p,ee)==="POST"){var kt=p.postPayload(y,ee);Se=R.POST(Ee,kt,Ce,Ft)}else lt(y,p,ee)==="PATCH"?(kt=p.patchPayload(y,ee),Se=R.PATCH(Ee,kt,Ce,Ft)):Se=lt(y,p,ee)==="DELETE"?R.DELETE(Ee,Ce,Ft):lt(y,p,ee)==="GETFILE"?R.GETFILE(Ee,Ce,Ft):R.GET(Ee,Ce,Ft);return p.getOperation()===G.PNSubscribeOperation?Se:he?he.promise:void 0}var Fe=Object.freeze({__proto__:null,getOperation:function(){return G.PNAddChannelsToGroupOperation}
207,validateParams:function(y,p){var E=p.channels,_=p.channelGroup,R=y.config;return _?E&&E.length!==0?R.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(y,p){var E=p.channelGroup,_=y.config;return"/v1/channel-registration/sub-key/".concat(_.subscribeKey,"/channel-group/").concat(Ve.encodeString(E))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.channels;return{add:(E===void 0?[]:E).join(",")}},handleResponse:function(){return{}}}),ht=Object.freeze({__proto__:null,getOperation:function(){return G.PNRemoveChannelsFromGroupOperation},validateParams:function(y,p){var E=p.channels,_=p.channelGroup,R=y.config;return _?E&&E.length!==0?R.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(y,p){var E=p.channelGroup,_=y.config;return"/v1/channel-registration/sub-key/".concat(_.subscribeKey,"/channel-group/").concat(Ve.encodeString(E))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.channels;return{remove:(E===void 0?[]:E).join(",")}},handleResponse:function(){return{}}}),Ct=Object.freeze({__proto__:null,getOperation:function(){return G.PNRemoveGroupOperation},validateParams:function(y,p){var E=p.channelGroup,_=y.config;return E?_.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(y,p){var E=p.channelGroup,_=y.config;return"/v1/channel-registration/sub-key/".concat(_.subscribeKey,"/channel-group/").concat(Ve.encodeString(E),"/remove")},isAuthSupported:function(){return!0},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},prepareParams:function(){return{}},handleResponse:function(){return{}}}),pt=Object.freeze({__proto__:null,getOperation:function(){return G.PNChannelGroupsOperation},validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y){var p=y.config;return"/v1/channel-registration/sub-key/".concat(p.subscribeKey,"/channel-group")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{groups:p.payload.groups}}}),me=Object.freeze({__proto__:null,getOperation:function(){return G.PNChannelsForGroupOperation},validateParams:function(y,p){var E=p.channelGroup,_=y.config;return E?_.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(y,p){var E=p.channelGroup,_=y.config;return"/v1/channel-registration/sub-key/".concat(_.subscribeKey,"/channel-group/").concat(Ve.encodeString(E))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{channels:p.payload.channels}}}),De=Object.freeze({__proto__:null,getOperation:function(){return G.PNPushNotificationEnabledChannelsOperation},validateParams:function(y,p){var E=p.device,_=p.pushGateway,R=p.channels,M=p.topic,W=y.config;return E?_?_!=="apns2"||M?R&&R.length!==0?W.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(y,p){var E=p.device,_=p.pushGateway,R=y.config;return _==="apns2"?"/v2/push/sub-key/".concat(R.subscribeKey,"/devices-apns2/").concat(E):"/v1/push/sub-key/".concat(R.subscribeKey,"/devices/").concat(E)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.pushGateway,_=p.channels,R=_===void 0?[]:_,M=p.environment,W=M===void 0?"development":M,J=p.topic,re={type:E,add:R.join(",")};return E==="apns2"&&delete(re=i(i({},re),{environment:W,topic:J})).type,re},handleResponse:function(){return{}}}),Me=Object.freeze({__proto__:null,getOperation:function(){return G.PNPushNotificationEnabledChannelsOperation}
207,validateParams:function(y,p){var E=p.device,_=p.pushGateway,R=p.channels,M=p.topic,W=y.config;return E?_?_!=="apns2"||M?R&&R.length!==0?W.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(y,p){var E=p.device,_=p.pushGateway,R=y.config;return _==="apns2"?"/v2/push/sub-key/".concat(R.subscribeKey,"/devices-apns2/").concat(E):"/v1/push/sub-key/".concat(R.subscribeKey,"/devices/").concat(E)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.pushGateway,_=p.channels,R=_===void 0?[]:_,M=p.environment,W=M===void 0?"development":M,J=p.topic,re={type:E,remove:R.join(",")};return E==="apns2"&&delete(re=i(i({},re),{environment:W,topic:J})).type,re},handleResponse:function(){return{}}}),qe=Object.freeze({__proto__:null,getOperation:function(){return G.PNPushNotificationEnabledChannelsOperation},validateParams:function(y,p){var E=p.device,_=p.pushGateway,R=p.topic,M=y.config;return E?_?_!=="apns2"||R?M.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(y,p){var E=p.device,_=p.pushGateway,R=y.config;return _==="apns2"?"/v2/push/sub-key/".concat(R.subscribeKey,"/devices-apns2/").concat(E):"/v1/push/sub-key/".concat(R.subscribeKey,"/devices/").concat(E)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.pushGateway,_=p.environment,R=_===void 0?"development":_,M=p.topic,W=p.start,J=p.count,re={type:E};return E==="apns2"&&delete(re=i(i({},re),{environment:R,topic:M})).type,W&&(re.start=W),J&&J>0&&(re.count=J),re},handleResponse:function(y,p){return{channels:p}}}),ut=Object.freeze({__proto__:null,getOperation:function(){return G.PNRemoveAllPushNotificationsOperation},validateParams:function(y,p){var E=p.device,_=p.pushGateway,R=p.topic,M=y.config;return E?_?_!=="apns2"||R?M.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(y,p){var E=p.device,_=p.pushGateway,R=y.config;return _==="apns2"?"/v2/push/sub-key/".concat(R.subscribeKey,"/devices-apns2/").concat(E,"/remove"):"/v1/push/sub-key/".concat(R.subscribeKey,"/devices/").concat(E,"/remove")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.pushGateway,_=p.environment,R=_===void 0?"development":_,M=p.topic,W={type:E};return E==="apns2"&&delete(W=i(i({},W),{environment:R,topic:M})).type,W},handleResponse:function(){return{}}}),Tt=Object.freeze({__proto__:null,getOperation:function(){return G.PNUnsubscribeOperation},validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=R.length>0?R.join(","):",";return"/v2/presence/sub-key/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(M),"/leave")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.channelGroups,_=E===void 0?[]:E,R={};return _.length>0&&(R["channel-group"]=_.join(",")),R},handleResponse:function(){return{}}}),jt=Object.freeze({__proto__:null,getOperation:function(){return G.PNWhereNowOperation},validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.uuid,R=_===void 0?E.UUID:_;return"/v2/presence/sub-key/".concat(E.subscribeKey,"/uuid/").concat(Ve.encodeString(R))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return p.payload?{channels:p.payload.channels}:{channels:[]}}}),on=Object.freeze({__proto__:null,getOperation:function(){return G.PNHeartbeatOperation}
207,validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=R.length>0?R.join(","):",";return"/v2/presence/sub-key/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(M),"/heartbeat")},isAuthSupported:function(){return!0},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},prepareParams:function(y,p){var E=p.channelGroups,_=E===void 0?[]:E,R=p.state,M=y.config,W={};return _.length>0&&(W["channel-group"]=_.join(",")),R&&(W.state=JSON.stringify(R)),W.heartbeat=M.getPresenceTimeout(),W},handleResponse:function(){return{}}}),wn=Object.freeze({__proto__:null,getOperation:function(){return G.PNGetStateOperation},validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.uuid,R=_===void 0?E.UUID:_,M=p.channels,W=M===void 0?[]:M,J=W.length>0?W.join(","):",";return"/v2/presence/sub-key/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(J),"/uuid/").concat(R)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.channelGroups,_=E===void 0?[]:E,R={};return _.length>0&&(R["channel-group"]=_.join(",")),R},handleResponse:function(y,p,E){var _=E.channels,R=_===void 0?[]:_,M=E.channelGroups,W=M===void 0?[]:M,J={};return R.length===1&&W.length===0?J[R[0]]=p.payload:J=p.payload,{channels:J}}}),kr=Object.freeze({__proto__:null,getOperation:function(){return G.PNSetStateOperation},validateParams:function(y,p){var E=y.config,_=p.state,R=p.channels,M=R===void 0?[]:R,W=p.channelGroups,J=W===void 0?[]:W;return _?E.subscribeKey?M.length===0&&J.length===0?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=R.length>0?R.join(","):",";return"/v2/presence/sub-key/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(M),"/uuid/").concat(Ve.encodeString(E.UUID),"/data")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.state,_=p.channelGroups,R=_===void 0?[]:_,M={};return M.state=JSON.stringify(E),R.length>0&&(M["channel-group"]=R.join(",")),M},handleResponse:function(y,p){return{state:p.payload}}}),Ir=Object.freeze({__proto__:null,getOperation:function(){return G.PNHereNowOperation},validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=p.channelGroups,W=M===void 0?[]:M,J="/v2/presence/sub-key/".concat(E.subscribeKey);if(R.length>0||W.length>0){var re=R.length>0?R.join(","):",";
207J+="/channel/".concat(Ve.encodeString(re))}return J},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.channelGroups,_=E===void 0?[]:E,R=p.includeUUIDs,M=R===void 0||R,W=p.includeState,J=W!==void 0&&W,re=p.queryParameters,oe=re===void 0?{}:re,he={};return M||(he.disable_uuids=1),J&&(he.state=1),_.length>0&&(he["channel-group"]=_.join(",")),he=i(i({},he),oe)},handleResponse:function(y,p,E){var _=E.channels,R=_===void 0?[]:_,M=E.channelGroups,W=M===void 0?[]:M,J=E.includeUUIDs,re=J===void 0||J,oe=E.includeState,he=oe!==void 0&&oe;return R.length>1||W.length>0||W.length===0&&R.length===0?function(){var ee={};return ee.totalChannels=p.payload.total_channels,ee.totalOccupancy=p.payload.total_occupancy,ee.channels={},Object.keys(p.payload.channels).forEach(function(Pe){var Se=p.payload.channels[Pe],Ee=[];return ee.channels[Pe]={occupants:Ee,name:Pe,occupancy:Se.occupancy},re&&Se.uuids.forEach(function(Ae){he?Ee.push({state:Ae.state,uuid:Ae.uuid}):Ee.push({state:null,uuid:Ae})}),ee}),ee}():function(){var ee={},Pe=[];return ee.totalChannels=1,ee.totalOccupancy=p.occupancy,ee.channels={},ee.channels[R[0]]={occupants:Pe,name:R[0],occupancy:p.occupancy},re&&p.uuids&&p.uuids.forEach(function(Se){he?Pe.push({state:Se.state,uuid:Se.uuid}):Pe.push({state:null,uuid:Se})}),ee}()},handleError:function(y,p,E){E.statusCode!==402||this.getURL(y,p).includes("channel")||(E.errorData.message="You have tried to perform a Global Here Now operation, your keyset configuration does not support that. Please provide a channel, or enable the Global Here Now feature from the Portal.")}}),gi=Object.freeze({__proto__:null,getOperation:function(){return G.PNAddMessageActionOperation},validateParams:function(y,p){var E=y.config,_=p.action,R=p.channel;return p.messageTimetoken?E.subscribeKey?R?_?_.value?_.type?_.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message channel":"Missing Subscribe Key":"Missing message timetoken"},usePost:function(){return!0},postURL:function(y,p){var E=y.config,_=p.channel,R=p.messageTimetoken;return"/v1/message-actions/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(_),"/message/").concat(R)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},getRequestHeaders:function(){return{"Content-Type":"application/json"}},isAuthSupported:function(){return!0},prepareParams:function(){return{}},postPayload:function(y,p){return p.action},handleResponse:function(y,p){return{data:p.data}}}),Ln=Object.freeze({__proto__:null,getOperation:function(){return G.PNRemoveMessageActionOperation},validateParams:function(y,p){var E=y.config,_=p.channel,R=p.actionTimetoken;return p.messageTimetoken?R?E.subscribeKey?_?void 0:"Missing message channel":"Missing Subscribe Key":"Missing action timetoken":"Missing message timetoken"},useDelete:function(){return!0},getURL:function(y,p){var E=y.config,_=p.channel,R=p.actionTimetoken,M=p.messageTimetoken;return"/v1/message-actions/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(_),"/message/").concat(M,"/action/").concat(R)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{data:p.data}}}),Ua=Object.freeze({__proto__:null,getOperation:function(){return G.PNGetMessageActionsOperation},validateParams:function(y,p){var E=y.config,_=p.channel;return E.subscribeKey?_?void 0:"Missing message channel":"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.channel;return"/v1/message-actions/".concat(E.subscribeKey,"/channel/").concat(Ve.encodeString(_))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.limit,_=p.start,R=p.end,M={};return E&&(M.limit=E),_&&(M.start=_),R&&(M.end=R),M},handleResponse:function(y,p){var E={data:p.data,start:null,end:null};return E.data.length&&(E.end=E.data[E.data.length-1].actionTimetoken,E.start=E.data[0].actionTimetoken),E}}),Qe={getOperation:function(){return G.PNListFilesOperation}
207,validateParams:function(y,p){if(!(p!=null&&p.channel))return"channel can't be empty"},getURL:function(y,p){var E=y.config;return"/v1/files/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel),"/files")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E={};return p.limit&&(E.limit=p.limit),p.next&&(E.next=p.next),E},handleResponse:function(y,p){return{status:p.status,data:p.data,next:p.next,count:p.count}}},Ue={getOperation:function(){return G.PNGenerateUploadUrlOperation},validateParams:function(y,p){return p!=null&&p.channel?p!=null&&p.name?void 0:"name can't be empty":"channel can't be empty"},usePost:function(){return!0},postURL:function(y,p){var E=y.config;return"/v1/files/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel),"/generate-upload-url")},postPayload:function(y,p){return{name:p.name}},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{status:p.status,data:p.data,file_upload_request:p.file_upload_request}}},Rt={getOperation:function(){return G.PNPublishFileOperation},validateParams:function(y,p){return p!=null&&p.channel?p!=null&&p.fileId?p!=null&&p.fileName?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},getURL:function(y,p){var E=y.config,_=E.publishKey,R=E.subscribeKey,M=function(W,J){var re=JSON.stringify(J);if(W.cryptoModule){var oe=W.cryptoModule.encrypt(re);re=typeof oe=="string"?oe:x(oe),re=JSON.stringify(re)}return re||""}(y,{message:p.message,file:{name:p.fileName,id:p.fileId}});return"/v1/files/publish-file/".concat(_,"/").concat(R,"/0/").concat(Ve.encodeString(p.channel),"/0/").concat(Ve.encodeString(M))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E={};return p.ttl&&(E.ttl=p.ttl),p.storeInHistory!==void 0&&(E.store=p.storeIn
207History?"1":"0"),p.meta&&typeof p.meta=="object"&&(E.meta=JSON.stringify(p.meta)),E},handleResponse:function(y,p){return{timetoken:p[2]}}},Ut=function(y){var p=function(E){var _=this,R=E.generateUploadUrl,M=E.publishFile,W=E.modules,J=W.PubNubFile,re=W.config,oe=W.cryptography,he=W.cryptoModule,ee=W.networking;return function(Pe){var Se=Pe.channel,Ee=Pe.file,Ae=Pe.message,Ce=Pe.cipherKey,Ge=Pe.meta,vt=Pe.ttl,Ft=Pe.storeInHistory;return a(_,void 0,void 0,function(){var kt,At,Ie,Xe,He,bt,Ke,nt,xe,It,Je,ft,xt,Nt,Gr,fs,Is,tc,qd,ml,Jc,zb,hr,Ey,tI,xp,Gb,Wb,qT;return o(this,function(Qr){switch(Qr.label){case 0:if(!Se)throw new at("Validation failed, check status for details",Et("channel can't be empty"));if(!Ee)throw new at("Validation failed, check status for details",Et("file can't be empty"));return kt=J.create(Ee),[4,R({channel:Se,name:kt.name})];case 1:return At=Qr.sent(),Ie=At.file_upload_request,Xe=Ie.url,He=Ie.form_fields,bt=At.data,Ke=bt.id,nt=bt.name,J.supportsEncryptFile&&(Ce||he)?Ce!=null?[3,3]:[4,he.encryptFile(kt,J)]:[3,6];case 2:return xe=Qr.sent(),[3,5];case 3:return[4,oe.encryptFile(Ce,kt,J)];case 4:xe=Qr.sent(),Qr.label=5;case 5:kt=xe,Qr.label=6;case 6:It=He,kt.mimeType&&(It=He.map(function(KT){return KT.key==="Content-Type"?{key:KT.key,value:kt.mimeType}:KT})),Qr.label=7;case 7:return Qr.trys.push([7,21,,22]),J.supportsFileUri&&Ee.uri?(xt=(ft=ee).POSTFILE,Nt=[Xe,It],[4,kt.toFileUri()]):[3,10];case 8:return[4,xt.apply(ft,Nt.concat([Qr.sent()]))];case 9:return Je=Qr.sent(),[3,20];case 10:return J.supportsFile?(fs=(Gr=ee).POSTFILE,Is=[Xe,It],[4,kt.toFile()]):[3,13];case 11:return[4,fs.apply(Gr,Is.concat([Qr.sent()]))];case 12:return Je=Qr.sent(),[3,20];case 13:return J.supportsBuffer?(qd=(tc=ee).POSTFILE,ml=[Xe,It],[4,kt.toBuffer()]):[3,16];case 14:return[4,qd.apply(tc,ml.concat([Qr.sent()]))];case 15:return Je=Qr.sent(),[3,20];case 16:return J.supportsBlob?(zb=(Jc=ee).POSTFILE,hr=[Xe,It],[4,kt.toBlob()]):[3,19];case 17:return[4,zb.apply(Jc,hr.concat([Qr.sent()]))];case 18:return Je=Qr.sent(),[3,20];case 19:throw new Error("Unsupported environment");case 20:return[3,22];case 21:throw(Ey=Qr.sent()).response&&typeof Ey.response.text=="string"?(tI=Ey.response.text,xp=/<Message>(.*)<\/Message>/gi.exec(tI),new at(xp?"Upload to bucket failed: ".concat(xp[1]):"Upload to bucket failed.",Ey)):new at("Upload to bucket failed.",Ey);case 22:if(Je.status!==204)throw new at("Upload to bucket was unsuccessful",Je);Gb=re.fileUploadPublishRetryLimit,Wb=!1,qT={timetoken:"0"},Qr.label=23;case 23:return Qr.trys.push([23,25,,26]),[4,M({channel:Se,message:Ae,fileId:Ke,fileName:nt,meta:Ge,storeInHistory:Ft,ttl:vt})];case 24:return qT=Qr.sent(),Wb=!0,[3,26];case 25:return Qr.sent(),Gb-=1,[3,26];case 26:if(!Wb&&Gb>0)return[3,23];Qr.label=27;case 27:if(Wb)return[2,{timetoken:qT.timetoken,id:Ke,name:nt}];throw new at("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{channel:Se,id:Ke,name:nt})}})})}}(y);return function(E,_){var R=p(E);return typeof _=="function"&&R.then(function(M){return _(null,M)}).catch(function(M){return _(M,null)}),R}},zt=function(y,p){var E=p.channel,_=p.id,R=p.name,M=y.config,W=y.networking,J=y.tokenManager;if(!E)throw new at("Validation failed, check status for details",Et("channel can't be empty"));if(!_)throw new at("Validation failed, check status for details",Et("file id can't be empty"));if(!R)throw new at("Validation failed, check status for details",Et("file name can't be empty"));var re="/v1/files/".concat(M.subscribeKey,"/channels/").concat(Ve.encodeString(E),"/files/").concat(_,"/").concat(R),oe={};oe.uuid=M.getUUID(),oe.pnsdk=Ze(M);var he=J.getToken()||M.getAuthKey();he&&(oe.auth=he),M.secretKey&&ot(y,re,oe,{},{getOperation:function(){return"PubNubGetFileUrlOperation"}});var ee=Object.keys(oe).map(function(Pe){return"".concat(encodeURIComponent(Pe),"=").concat(encodeURIComponent(oe[Pe]))}).join("&");return ee!==""?"".concat(W.getStandardOrigin()).concat(re,"?").concat(ee):"".concat(W.getStandardOrigin()).concat(re)},Yt={getOperation:function(){return G.PNDownloadFileOperation}
207,validateParams:function(y,p){return p!=null&&p.channel?p!=null&&p.name?p!=null&&p.id?void 0:"id can't be empty":"name can't be empty":"channel can't be empty"},useGetFile:function(){return!0},getFileURL:function(y,p){var E=y.config;return"/v1/files/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel),"/files/").concat(p.id,"/").concat(p.name)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},ignoreBody:function(){return!0},forceBuffered:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p,E){var _=y.PubNubFile,R=y.config,M=y.cryptography,W=y.cryptoModule;return a(void 0,void 0,void 0,function(){var J,re,oe,he;return o(this,function(ee){switch(ee.label){case 0:return J=p.response.body,_.supportsEncryptFile&&(E.cipherKey||W)?E.cipherKey!=null?[3,2]:[4,W.decryptFile(_.create({data:J,name:E.name}),_)]:[3,5];case 1:return re=ee.sent().data,[3,4];case 2:return[4,M.decrypt((oe=E.cipherKey)!==null&&oe!==void 0?oe:R.cipherKey,J)];case 3:re=ee.sent(),ee.label=4;case 4:J=re,ee.label=5;case 5:return[2,_.create({data:J,name:(he=p.response.name)!==null&&he!==void 0?he:E.name,mimeType:p.response.type})]}})})}},vn={getOperation:function(){return G.PNListFilesOperation},validateParams:function(y,p){return p!=null&&p.channel?p!=null&&p.id?p!=null&&p.name?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},useDelete:function(){return!0},getURL:function(y,p){var E=y.config;return"/v1/files/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel),"/files/").concat(p.id,"/").concat(p.name)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{status:p.status}}},nn={getOperation:function(){return G.PNGetAllUUIDMetadataOperation},validateParams:function(){},getURL:function(y){var p=y.config;return"/v2/objects/".concat(p.subscribeKey,"/uuids")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R,M,W,J,re,oe,he,ee={include:["status","type"]};return p!=null&&p.include&&(!((E=p.include)===null||E===void 0)&&E.customFields)&&ee.include.push("custom"),ee.include=ee.include.join(","),!((_=p==null?void 0:p.include)===null||_===void 0)&&_.totalCount&&(ee.count=(R=p.include)===null||R===void 0?void 0:R.totalCount),!((M=p==null?void 0:p.page)===null||M===void 0)&&M.next&&(ee.start=(W=p.page)===null||W===void 0?void 0:W.next),!((J=p==null?void 0:p.page)===null||J===void 0)&&J.prev&&(ee.end=(re=p.page)===null||re===void 0?void 0:re.prev),p!=null&&p.filter&&(ee.filter=p.filter),ee.limit=(oe=p==null?void 0:p.limit)!==null&&oe!==void 0?oe:100,p!=null&&p.sort&&(ee.sort=Object.entries((he=p.sort)!==null&&he!==void 0?he:{}).map(function(Pe){var Se=u(Pe,2),Ee=Se[0],Ae=Se[1];return Ae==="asc"||Ae==="desc"?"".concat(Ee,":").concat(Ae):Ee})),ee},handleResponse:function(y,p){return{status:p.status,data:p.data,totalCount:p.totalCount,next:p.next,prev:p.prev}}},fn={getOperation:function(){return G.PNGetUUIDMetadataOperation},validateParams:function(){},getURL:function(y,p){var E,_=y.config;return"/v2/objects/".concat(_.subscribeKey,"/uuids/").concat(Ve.encodeString((E=p==null?void 0:p.uuid)!==null&&E!==void 0?E:_.getUUID()))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R=y.config,M={};return M.uuid=(E=p==null?void 0:p.uuid)!==null&&E!==void 0?E:R.getUUID(),M.include=["status","type","custom"],p!=null&&p.include&&((_=p.include)===null||_===void 0?void 0:_.customFields)===!1&&M.include.pop(),M.include=M.include.join(","),M},handleResponse:function(y,p){return{status:p.status,data:p.data}}},tn={getOperation:function(){return G.PNSetUUIDMetadataOperation},validateParams:function(y,p){if(!(p!=null&&p.data))return"Data cannot be empty"},usePatch:function(){return!0},patchURL:function(y,p){var E,_=y.config;return"/v2/objects/".concat(_.subscribeKey,"/uuids/").concat(Ve.encodeString((E=p.uuid)!==null&&E!==void 0?E:_.getUUID()))},patchPayload:function(y,p){return p.data},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R=y.config,M={};return M.uuid=(E=p==null?void 0:p.uuid)!==null&&E!==void 0?E:R.getUUID(),M.include=["status","type","custom"],p!=null&&p.include&&((_=p.include)===null||_===void 0?void 0:_.customFields)===!1&&M.include.pop(),M.include=M.include.join(","),M},handleResponse:function(y,p){return{status:p.status,data:p.data}}},$n={getOperation:function(){return G.PNRemoveUUIDMetadataOperation}
207,validateParams:function(){},getURL:function(y,p){var E,_=y.config;return"/v2/objects/".concat(_.subscribeKey,"/uuids/").concat(Ve.encodeString((E=p==null?void 0:p.uuid)!==null&&E!==void 0?E:_.getUUID()))},useDelete:function(){return!0},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_=y.config;return{uuid:(E=p==null?void 0:p.uuid)!==null&&E!==void 0?E:_.getUUID()}},handleResponse:function(y,p){return{status:p.status,data:p.data}}},Hr={getOperation:function(){return G.PNGetAllChannelMetadataOperation},validateParams:function(){},getURL:function(y){var p=y.config;return"/v2/objects/".concat(p.subscribeKey,"/channels")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R,M,W,J,re,oe,he,ee={include:["status","type"]};return p!=null&&p.include&&(!((E=p.include)===null||E===void 0)&&E.customFields)&&ee.include.push("custom"),ee.include=ee.include.join(","),!((_=p==null?void 0:p.include)===null||_===void 0)&&_.totalCount&&(ee.count=(R=p.include)===null||R===void 0?void 0:R.totalCount),!((M=p==null?void 0:p.page)===null||M===void 0)&&M.next&&(ee.start=(W=p.page)===null||W===void 0?void 0:W.next),!((J=p==null?void 0:p.page)===null||J===void 0)&&J.prev&&(ee.end=(re=p.page)===null||re===void 0?void 0:re.prev),p!=null&&p.filter&&(ee.filter=p.filter),ee.limit=(oe=p==null?void 0:p.limit)!==null&&oe!==void 0?oe:100,p!=null&&p.sort&&(ee.sort=Object.entries((he=p.sort)!==null&&he!==void 0?he:{}).map(function(Pe){var Se=u(Pe,2),Ee=Se[0],Ae=Se[1];return Ae==="asc"||Ae==="desc"?"".concat(Ee,":").concat(Ae):Ee})),ee},handleResponse:function(y,p){return{status:p.status,data:p.data,totalCount:p.totalCount,prev:p.prev,next:p.next}}},dr={getOperation:function(){return G.PNGetChannelMetadataOperation},validateParams:function(y,p){if(!(p!=null&&p.channel))return"Channel cannot be empty"},getURL:function(y,p){var E=y.config;return"/v2/objects/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_={include:["status","type","custom"]};return p!=null&&p.include&&((E=p.include)===null||E===void 0?void 0:E.customFields)===!1&&_.include.pop(),_.include=_.include.join(","),_},handleResponse:function(y,p){return{status:p.status,data:p.data}}},jr={getOperation:function(){return G.PNSetChannelMetadataOperation},validateParams:function(y,p){return p!=null&&p.channel?p!=null&&p.data?void 0:"Data cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(y,p){var E=y.config;return"/v2/objects/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel))},patchPayload:function(y,p){return p.data},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_={include:["status","type","custom"]};return p!=null&&p.include&&((E=p.include)===null||E===void 0?void 0:E.customFields)===!1&&_.include.pop(),_.include=_.include.join(","),_},handleResponse:function(y,p){return{status:p.status,data:p.data}}},as={getOperation:function(){return G.PNRemoveChannelMetadataOperation},validateParams:function(y,p){if(!(p!=null&&p.channel))return"Channel cannot be empty"},getURL:function(y,p){var E=y.config;return"/v2/objects/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel))},useDelete:function(){return!0},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{status:p.status,data:p.data}}},ci={getOperation:function(){return G.PNGetMembersOperation},validateParams:function(y,p){if(!(p!=null&&p.channel))return"channel cannot be empty"},getURL:function(y,p){var E=y.config;return"/v2/objects/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel),"/uuids")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R,M,W,J,re,oe,he,ee,Pe,Se,Ee,Ae,Ce={include:[]};return p!=null&&p.include&&(!((E=p.include)===null||E===void 0)&&E.statusField&&Ce.include.push("status"),!((_=p.include)===null||_===void 0)&&_.customFields&&Ce.include.push("custom"),!((R=p.include)===null||R===void 0)&&R.UUIDFields&&Ce.include.push("uuid"),!((M=p.include)===null||M===void 0)&&M.customUUIDFields&&Ce.include.push("uuid.custom"),!((W=p.include)===null||W===void 0)&&W.UUIDStatusField&&Ce.include.push("uuid.status"),!((J=p.include)===null||J===void 0)&&J.UUIDTypeField&&Ce.include.push("uuid.type")),Ce.include=Ce.include.join(","),!((re=p==null?void 0:p.include)===null||re===void 0)&&re.totalCount&&(Ce.count=(oe=p.include)===null||oe===void 0?void 0:oe.totalCount),!((he=p==null?void 0:p.page)===null||he===void 0)&&he.next&&(Ce.start=(ee=p.page)===null||ee===void 0?void 0:ee.next),!((Pe=p==null?void 0:p.page)===null||Pe===void 0)&&Pe.prev&&(Ce.end=(Se=p.page)===null||Se===void 0?void 0:Se.prev),p!=null&&p.filter&&(Ce.filter=p.filter),Ce.limit=(Ee=p==null?void 0:p.limit)!==null&&Ee!==void 0?Ee:100,p!=null&&p.sort&&(Ce.sort=Object.entries((Ae=p.sort)!==null&&Ae!==void 0?Ae:{}).map(function(Ge){var vt=u(Ge,2),Ft=vt[0],kt=vt[1];return kt==="asc"||kt==="desc"?"".concat(Ft,":").concat(kt):Ft})),Ce},handleResponse:function(y,p){return{status:p.status,data:p.data,totalCount:p.totalCount,prev:p.prev,next:p.next}}},yt={getOperation:function(){return G.PNSetMembersOperation}
207,validateParams:function(y,p){return p!=null&&p.channel?p!=null&&p.uuids&&(p==null?void 0:p.uuids.length)!==0?void 0:"UUIDs cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(y,p){var E=y.config;return"/v2/objects/".concat(E.subscribeKey,"/channels/").concat(Ve.encodeString(p.channel),"/uuids")},patchPayload:function(y,p){var E;return(E={set:[],delete:[]})[p.type]=p.uuids.map(function(_){return typeof _=="string"?{uuid:{id:_}}:{uuid:{id:_.id},custom:_.custom,status:_.status}}),E},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R,M,W,J,re,oe,he,ee={include:["uuid.status","uuid.type","type"]};return p!=null&&p.include&&(!((E=p.include)===null||E===void 0)&&E.customFields&&ee.include.push("custom"),!((_=p.include)===null||_===void 0)&&_.customUUIDFields&&ee.include.push("uuid.custom"),!((R=p.include)===null||R===void 0)&&R.UUIDFields&&ee.include.push("uuid")),ee.include=ee.include.j
207oin(","),!((M=p==null?void 0:p.include)===null||M===void 0)&&M.totalCount&&(ee.count=!0),!((W=p==null?void 0:p.page)===null||W===void 0)&&W.next&&(ee.start=(J=p.page)===null||J===void 0?void 0:J.next),!((re=p==null?void 0:p.page)===null||re===void 0)&&re.prev&&(ee.end=(oe=p.page)===null||oe===void 0?void 0:oe.prev),p!=null&&p.filter&&(ee.filter=p.filter),p.limit!=null&&(ee.limit=p.limit),p!=null&&p.sort&&(ee.sort=Object.entries((he=p.sort)!==null&&he!==void 0?he:{}).map(function(Pe){var Se=u(Pe,2),Ee=Se[0],Ae=Se[1];return Ae==="asc"||Ae==="desc"?"".concat(Ee,":").concat(Ae):Ee})),ee},handleResponse:function(y,p){return{status:p.status,data:p.data,totalCount:p.totalCount,prev:p.prev,next:p.next}}},_i={getOperation:function(){return G.PNGetMembershipsOperation},validateParams:function(){},getURL:function(y,p){var E,_=y.config;return"/v2/objects/".concat(_.subscribeKey,"/uuids/").concat(Ve.encodeString((E=p==null?void 0:p.uuid)!==null&&E!==void 0?E:_.getUUID()),"/channels")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R,M,W,J,re,oe,he,ee,Pe,Se,Ee,Ae,Ce={include:[]};return p!=null&&p.include&&(!((E=p.include)===null||E===void 0)&&E.statusField&&Ce.include.push("status"),!((_=p.include)===null||_===void 0)&&_.customFields&&Ce.include.push("custom"),!((R=p.include)===null||R===void 0)&&R.channelFields&&Ce.include.push("channel"),!((M=p.include)===null||M===void 0)&&M.customChannelFields&&Ce.include.push("channel.custom"),!((W=p.include)===null||W===void 0)&&W.channelStatusField&&Ce.include.push("channel.status"),!((J=p.include)===null||J===void 0)&&J.channelTypeField&&Ce.include.push("channel.type")),Ce.include=Ce.include.join(","),!((re=p==null?void 0:p.include)===null||re===void 0)&&re.totalCount&&(Ce.count=(oe=p.include)===null||oe===void 0?void 0:oe.totalCount),!((he=p==null?void 0:p.page)===null||he===void 0)&&he.next&&(Ce.start=(ee=p.page)===null||ee===void 0?void 0:ee.next),!((Pe=p==null?void 0:p.page)===null||Pe===void 0)&&Pe.prev&&(Ce.end=(Se=p.page)===null||Se===void 0?void 0:Se.prev),p!=null&&p.filter&&(Ce.filter=p.filter),Ce.limit=(Ee=p==null?void 0:p.limit)!==null&&Ee!==void 0?Ee:100,p!=null&&p.sort&&(Ce.sort=Object.entries((Ae=p.sort)!==null&&Ae!==void 0?Ae:{}).map(function(Ge){var vt=u(Ge,2),Ft=vt[0],kt=vt[1];return kt==="asc"||kt==="desc"?"".concat(Ft,":").concat(kt):Ft})),Ce},handleResponse:function(y,p){return{status:p.status,data:p.data,totalCount:p.totalCount,prev:p.prev,next:p.next}}},$i={getOperation:function(){return G.PNSetMembershipsOperation},validateParams:function(y,p){if(!(p!=null&&p.channels)||(p==null?void 0:p.channels.length)===0)return"Channels cannot be empty"},usePatch:function(){return!0},patchURL:function(y,p){var E,_=y.config;return"/v2/objects/".concat(_.subscribeKey,"/uuids/").concat(Ve.encodeString((E=p.uuid)!==null&&E!==void 0?E:_.getUUID()),"/channels")},patchPayload:function(y,p){var E;return(E={set:[],delete:[]})[p.type]=p.channels.map(function(_){return typeof _=="string"?{channel:{id:_}}:{channel:{id:_.id},custom:_.custom,status:_.status}}),E},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E,_,R,M,W,J,re,oe,he,ee={include:["channel.status","channel.type","status"]};return p!=null&&p.include&&(!((E=p.include)===null||E===void 0)&&E.customFields&&ee.include.push("custom"),!((_=p.include)===null||_===void 0)&&_.customChannelFields&&ee.include.push("channel.custom"),!((R=p.include)===null||R===void 0)&&R.channelFields&&ee.include.push("channel")),ee.include=ee.include.join(","),!((M=p==null?void 0:p.include)===null||M===void 0)&&M.totalCount&&(ee.count=!0),!((W=p==null?void 0:p.page)===null||W===void 0)&&W.next&&(ee.start=(J=p.page)===null||J===void 0?void 0:J.next),!((re=p==null?void 0:p.page)===null||re===void 0)&&re.prev&&(ee.end=(oe=p.page)===null||oe===void 0?void 0:oe.prev),p!=null&&p.filter&&(ee.filter=p.filter),p.limit!=null&&(ee.limit=p.limit),p!=null&&p.sort&&(ee.sort=Object.entries((he=p.sort)!==null&&he!==void 0?he:{}).map(function(Pe){var Se=u(Pe,2),Ee=Se[0],Ae=Se[1];return Ae==="asc"||Ae==="desc"?"".concat(Ee,":").concat(Ae):Ee})),ee},handleResponse:function(y,p){return{status:p.status,data:p.data,totalCount:p.totalCount,prev:p.prev,next:p.next}}},vu=Object.freeze({__proto__:null,getOperation:function(){return G.PNAccessManagerAudit},validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y){var p=y.config;return"/v2/auth/audit/sub-key/".concat(p.subscribeKey)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(y,p){var E=p.channel,_=p.channelGroup,R=p.authKeys,M=R===void 0?[]:R,W={};return E&&(W.channel=E),_&&(W["channel-group"]=_),M.length>0&&(W.auth=M.join(",")),W},handleResponse:function(y,p){return p.payload}}),$s=Object.freeze({__proto__:null,getOperation:function(){return G.PNAccessManagerGrant},validateParams:function(y,p){var E=y.config;return E.subscribeKey?E.publishKey?E.secretKey?p.uuids==null||p.authKeys?p.uuids==null||p.channels==null&&p.channelGroups==null?void 0:"Both channel/channelgroup and uuid cannot be used in the same request":"authKeys are required for grant request on uuids":"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"},getURL:function(y){var p=y.config;return"/v2/auth/grant/sub-key/".concat(p.subscribeKey)},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(y,p){var E=p.channels,_=E===void 0?[]:E,R=p.channelGroups,M=R===void 0?[]:R,W=p.uuids,J=W===void 0?[]:W,re=p.ttl,oe
207=p.read,he=oe!==void 0&&oe,ee=p.write,Pe=ee!==void 0&&ee,Se=p.manage,Ee=Se!==void 0&&Se,Ae=p.get,Ce=Ae!==void 0&&Ae,Ge=p.join,vt=Ge!==void 0&&Ge,Ft=p.update,kt=Ft!==void 0&&Ft,At=p.authKeys,Ie=At===void 0?[]:At,Xe=p.delete,He={};return He.r=he?"1":"0",He.w=Pe?"1":"0",He.m=Ee?"1":"0",He.d=Xe?"1":"0",He.g=Ce?"1":"0",He.j=vt?"1":"0",He.u=kt?"1":"0",_.length>0&&(He.channel=_.join(",")),M.length>0&&(He["channel-group"]=M.join(",")),Ie.length>0&&(He.auth=Ie.join(",")),J.length>0&&(He["target-uuid"]=J.join(",")),(re||re===0)&&(He.ttl=re),He},handleResponse:function(){return{}}});function Va(y){var p,E,_,R,M=(y==null?void 0:y.authorizedUserId)!==void 0,W=((p=y==null?void 0:y.resources)===null||p===void 0?void 0:p.users)!==void 0,J=((E=y==null?void 0:y.resources)===null||E===void 0?void 0:E.spaces)!==void 0,re=((_=y==null?void 0:y.patterns)===null||_===void 0?void 0:_.users)!==void 0,oe=((R=y==null?void 0:y.patterns)===null||R===void 0?void 0:R.spaces)!==void 0;return re||W||oe||J||M}function cs(y){var p=0;return y.join&&(p|=128),y.update&&(p|=64),y.get&&(p|=32),y.delete&&(p|=8),y.manage&&(p|=4),y.write&&(p|=2),y.read&&(p|=1),p}function jc(y,p){if(Va(p))return function(Ee,Ae){var Ce=Ae.ttl,Ge=Ae.resources,vt=Ae.patterns,Ft=Ae.meta,kt=Ae.authorizedUserId,At={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(Ge){var Ie=Ge.users,Xe=Ge.spaces,He=Ge.groups;Ie&&Object.keys(Ie).forEach(function(xe){At.permissions.resources.uuids[xe]=cs(Ie[xe])}),Xe&&Object.keys(Xe).forEach(function(xe){At.permissions.resources.channels[xe]=cs(Xe[xe])}),He&&Object.keys(He).forEach(function(xe){At.permissions.resources.groups[xe]=cs(He[xe])})}if(vt){var bt=vt.users,Ke=vt.spaces,nt=vt.groups;bt&&Object.keys(bt).forEach(function(xe){At.permissions.patterns.uuids[xe]=cs(bt[xe])}),Ke&&Object.keys(Ke).forEach(function(xe){At.permissions.patterns.channels[xe]=cs(Ke[xe])}),nt&&Object.keys(nt).forEach(function(xe){At.permissions.patterns.groups[xe]=cs(nt[xe])})}return(Ce||Ce===0)&&(At.ttl=Ce),Ft&&(At.permissions.meta=Ft),kt&&(At.permissions.uuid="".concat(kt)),At}(0,p);var E=p.ttl,_=p.resources,R=p.patterns,M=p.meta,W=p.authorized_uuid,J={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(_){var re=_.uuids,oe=_.channels,he=_.groups;re&&Object.keys(re).forEach(function(Ee){J.permissions.resources.uuids[Ee]=cs(re[Ee])}),oe&&Object.keys(oe).forEach(function(Ee){J.permissions.resources.channels[Ee]=cs(oe[Ee])}),he&&Object.keys(he).forEach(function(Ee){J.permissions.resources.groups[Ee]=cs(he[Ee])})}if(R){var ee=R.uuids,Pe=R.channels,Se=R.groups;ee&&Object.keys(ee).forEach(function(Ee){J.permissions.patterns.uuids[Ee]=cs(ee[Ee])}),Pe&&Object.keys(Pe).forEach(function(Ee){J.permissions.patterns.channels[Ee]=cs(Pe[Ee])}),Se&&Object.keys(Se).forEach(function(Ee){J.permissions.patterns.groups[Ee]=cs(Se[Ee])})}return(E||E===0)&&(J.ttl=E),M&&(J.permissions.meta=M),W&&(J.permissions.uuid="".concat(W)),J}var op=Object.freeze({__proto__:null,getOperation:function(){return G.PNAccessManagerGrantToken},extractPermissions:cs,validateParams:function(y,p){var E,_,R,M,W,J,re=y.config;if(!re.subscribeKey)return"Missing Subscribe Key";if(!re.publishKey)return"Missing Publish Key";if(!re.secretKey)return"Missing Secret Key";if(!p.resources&&!p.patterns)return"Missing either Resources or Patterns.";var oe=(p==null?void 0:p.authorized_uuid)!==void 0,he=((E=p==null?void 0:p.resources)===null||E===void 0?void 0:E.uuids)!==void 0,ee=((_=p==null?void 0:p.resources)===null||_===void 0?void 0:_.channels)!==void 0,Pe=((R=p==null?void 0:p.resources)===null||R===void 0?void 0:R.groups)!==void 0,Se=((M=p==null?void 0:p.patterns)===null||M===void 0?void 0:M.uuids)!==void 0,Ee=((W=p==null?void 0:p.patterns)===null||W===void 0?void 0:W.channels)!==void 0,Ae=((J=p==null?void 0:p.patterns)===null||J===void 0?void 0:J.groups)!==void 0,Ce=oe||he||Se||ee||Ee||Pe||Ae;return Va(p)&&Ce?"Cannot mix `users`, `spaces` and `authorizedUserId` with `uuids`, `channels`, `groups` and `authorized_uuid`":(!p.resources||p.resources.uuids&&Object.keys(p.resources.uuids).length!==0||p.resources.channels&&Object.keys(p.resources.channels).length!==0||p.resources.groups&&Object.keys(p.resources.groups).length!==0||p.resources.users&&Object.keys(p.resources.users).length!==0||p.resources.space
207s&&Object.keys(p.resources.spaces).length!==0)&&(!p.patterns||p.patterns.uuids&&Object.keys(p.patterns.uuids).length!==0||p.patterns.channels&&Object.keys(p.patterns.channels).length!==0||p.patterns.groups&&Object.keys(p.patterns.groups).length!==0||p.patterns.users&&Object.keys(p.patterns.users).length!==0||p.patterns.spaces&&Object.keys(p.patterns.spaces).length!==0)?void 0:"Missing values for either Resources or Patterns."},postURL:function(y){var p=y.config;return"/v3/pam/".concat(p.subscribeKey,"/grant")},usePost:function(){return!0},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(){return{}},postPayload:function(y,p){return jc(0,p)},handleResponse:function(y,p){return p.data.token}}),Qu={getOperation:function(){return G.PNAccessManagerRevokeToken},validateParams:function(y,p){return y.config.secretKey?p?void 0:"token can't be empty":"Missing Secret Key"},getURL:function(y,p){var E=y.config;return"/v3/pam/".concat(E.subscribeKey,"/grant/").concat(Ve.encodeString(p))},useDelete:function(){return!0},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(y){return{uuid:y.config.getUUID()}},handleResponse:function(y,p){return{status:p.status,data:p.data}}};function cl(y,p){var E=JSON.stringify(p);if(y.cryptoModule){var _=y.cryptoModule.encrypt(E);E=typeof _=="string"?_:x(_),E=JSON.stringify(E)}return E||""}var lp=Object.freeze({__proto__:null,getOperation:function(){return G.PNPublishOperation},validateParams:function(y,p){var E=y.config,_=p.message;return p.channel?_?E.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},usePost:function(y,p){var E=p.sendByPost;return E!==void 0&&E},getURL:function(y,p){var E=y.config,_=p.channel,R=cl(y,p.message);return"/publish/".concat(E.publishKey,"/").concat(E.subscribeKey,"/0/").concat(Ve.encodeString(_),"/0/").concat(Ve.encodeString(R))},postURL:function(y,p){var E=y.config,_=p.channel;return"/publish/".concat(E.publishKey,"/").concat(E.subscribeKey,"/0/").concat(Ve.encodeString(_),"/0")},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},postPayload:function(y,p){return cl(y,p.message)},prepareParams:function(y,p){var E=p.meta,_=p.replicate,R=_===void 0||_,M=p.storeInHistory,W=p.ttl,J={};return M!=null&&(J.store=M?"1":"0"),W&&(J.ttl=W),R===!1&&(J.norep="true"),E&&typeof E=="object"&&(J.meta=JSON.stringify(E)),J},handleResponse:function(y,p){return{timetoken:p[2]}}}),Fg=Object.freeze({__proto__:null,getOperation:function(){return G.PNSignalOperation},validateParams:function(y,p){var E=y.config,_=p.message;return p.channel?_?E.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},getURL:function(y,p){var E,_=y.config,R=p.channel,M=p.message,W=(E=M,JSON.stringify(E));return"/signal/".concat(_.publishKey,"/").concat(_.subscribeKey,"/0/").concat(Ve.encodeString(R),"/0/").concat(Ve.encodeString(W))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(y,p){return{timetoken:p[2]}}}),zc=Object.freeze({__proto__:null,getOperation:function(){return G.PNHistoryOperation},validateParams:function(y,p){var E=p.channel,_=y.config;return E?_.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(y,p){var E=p.channel,_=y.config;return"/v2/history/sub-key/".concat(_.subscribeKey,"/channel/").concat(Ve.encodeString(E))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.start,_=p.end,R=p.reverse,M=p.count,W=M===void 0?100:M,J=p.stringifiedTimeToken,re=J!==void 0&&J,oe=p.includeMeta,he=oe!==void 0&&oe,ee={include_token:"true"};return ee.count=W,E&&(ee.start=E),_&&(ee.end=_),re&&(ee.string_message_token="true"),R!=null&&(ee.reverse=R.toString()),he&&(ee.include_meta="true"),ee},handleResponse:function(y,p){var E={messages:[],startTimeToken:p[1],endTimeToken:p[2]};
207return Array.isArray(p[0])&&p[0].forEach(function(_){var R=function(W,J){var re={};if(!W.cryptoModule)return re.payload=J,re;try{var oe=W.cryptoModule.decrypt(J),he=oe instanceof ArrayBuffer?JSON.parse(new TextDecoder().decode(oe)):oe;return re.payload=he,re}catch(ee){W.config.logVerbosity&&console&&console.log&&console.log("decryption error",ee.message),re.payload=J,re.error="Error while decrypting message content: ".concat(ee.message)}return re}(y,_.message),M={timetoken:_.timetoken,entry:R.payload};_.meta&&(M.meta=_.meta),R.error&&(M.error=R.error),E.messages.push(M)}),E}}),yo=Object.freeze({__proto__:null,getOperation:function(){return G.PNDeleteMessagesOperation},validateParams:function(y,p){var E=p.channel,_=y.config;return E?_.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},useDelete:function(){return!0},getURL:function(y,p){var E=p.channel,_=y.config;return"/v3/history/sub-key/".concat(_.subscribeKey,"/channel/").concat(Ve.encodeString(E))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.start,_=p.end,R={};return E&&(R.start=E),_&&(R.end=_),R},handleResponse:function(y,p){return p.payload}}),up=Object.freeze({__proto__:null,getOperation:function(){return G.PNMessageCounts},validateParams:function(y,p){var E=p.channels,_=p.timetoken,R=p.channelTimetokens,M=y.config;return E?_&&R?"timetoken and channelTimetokens are incompatible together":R&&R.length>1&&E.length!==R.length?"Length of channelTimetokens and channels do not match":M.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(y,p){var E=p.channels,_=y.config,R=E.join(",");return"/v3/history/sub-key/".concat(_.subscribeKey,"/message-counts/").concat(Ve.encodeString(R))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.timetoken,_=p.channelTimetokens,R={};if(_&&_.length===1){var M=u(_,1)[0];R.timetoken=M}else _?R.channelsTimetoken=_.join(","):E&&(R.timetoken=E);return R},handleResponse:function(y,p){return{channels:p.channels}}}),An=Object.freeze({__proto__:null,getOperation:function(){return G.PNFetchMessagesOperation},validateParams:function(y,p){var E=p.channels,_=p.includeMessageActions,R=_!==void 0&&_,M=y.config;if(!E||E.length===0)return"Missing channels";if(!M.subscribeKey)return"Missing Subscribe Key";if(R&&E.length>1)throw new TypeError("History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.")},getURL:function(y,p){var E=p.channels,_=E===void 0?[]:E,R=p.includeMessageActions,M=R!==void 0&&R,W=y.config,J=M?"history-with-actions":"history",re=_.length>0?_.join(","):",";return"/v3/".concat(J,"/sub-key/").concat(W.subscribeKey,"/channel/").concat(Ve.encodeString(re))},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=p.channels,_=p.start,R=p.end,M=p.includeMessageActions,W=p.count,J=p.stringifiedTimeToken,re=J!==void 0&&J,oe=p.includeMeta,he=oe!==void 0&&oe,ee=p.includeUuid,Pe=p.includeUUID,Se=Pe===void 0||Pe,Ee=p.includeMessageType,Ae=Ee===void 0||Ee,Ce={};return Ce.max=W||(E.length>1||M===!0?25:100),_&&(Ce.start=_),R&&(Ce.end=R),re&&(Ce.string_message_token="true"),he&&(Ce.include_meta="true"),Se&&ee!==!1&&(Ce.include_uuid="true"),Ae&&(Ce.include_message_type="true"),Ce},handleResponse:function(y,p){var E={channels:{}};return Object.keys(p.channels||{}).forEach(function(_){E.channels[_]=[],(p.channels[_]||[]).forEach(function(R){var M={},W=function(J,re){var oe={};if(!J.cryptoModule)return oe.payload=re,oe;try{var he=J.cryptoModule.decrypt(re),ee=he instanceof ArrayBuffer?JSON.parse(new TextDecoder().decode(he)):he;return oe.payload=ee,oe}catch(Pe){J.config.logVerbosity&&console&&console.log&&console.log("decryption error",Pe.message),oe.payload=re,oe.error="Error while decrypting message content: ".concat(Pe.message)}return oe}(y,R.message);M.channel=_,M.timetoken=R.timetoken,M.message=W.payload,M.messageType=R.message_type,M.uuid=R.uuid,R.actions&&(M.actions=R.actions,M.data=R.actions),R.meta&&(M.meta=R.meta),W.error&&(M.error=W.error),E.channels[_].push(M)})}),p.more&&(E.more=p.more),E}}),$e=Object.freeze({__proto__:null,getOperation:function(){return G.PNTimeOperation},getURL:function(){return"/time/0"},getRequestTimeout:function(y){return y.config.getTransactionTimeout()},prepareParams:function(){return{}},isAuthSupported:function(){return!1},handleResponse:function(y,p){return{timetoken:p[0]}},validateParams:function(){}}),$t=Object.freeze({__proto__:null,getOperation:function(){return G.PNSubscribeOperation}
207,validateParams:function(y){if(!y.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=R.length>0?R.join(","):",";return"/v2/subscribe/".concat(E.subscribeKey,"/").concat(Ve.encodeString(M),"/0")},getRequestTimeout:function(y){return y.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E=y.config,_=p.state,R=p.channelGroups,M=R===void 0?[]:R,W=p.timetoken,J=p.filterExpression,re=p.region,oe={heartbeat:E.getPresenceTimeout()};return M.length>0&&(oe["channel-group"]=M.join(",")),J&&J.length>0&&(oe["filter-expr"]=J),Object.keys(_).length&&(oe.state=JSON.stringify(_)),W&&(oe.tt=W),re&&(oe.tr=re),oe},handleResponse:function(y,p){var E=[];p.m.forEach(function(R){var M={timetoken:R.p.t,region:R.p.r},W={shard:parseInt(R.a,10),subscriptionMatch:R.b,channel:R.c,messageType:R.e,payload:R.d,flags:R.f,issuingClientId:R.i,subscribeKey:R.k,originationTimetoken:R.o,userMetadata:R.u,publishMetaData:M};E.push(W)});var _={timetoken:p.t.t,region:p.t.r};return{messages:E,metadata:_}}}),Zt={getOperation:function(){return G.PNHandshakeOperation},validateParams:function(y,p){if(!(p!=null&&p.channels)&&!(p!=null&&p.channelGroups))return"channels and channleGroups both should not be empty"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=R.length>0?R.join(","):",";return"/v2/subscribe/".concat(E.subscribeKey,"/").concat(Ve.encodeString(M),"/0")},getRequestTimeout:function(y){return y.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(y,p){var E={};return p.channelGroups&&p.channelGroups.length>0&&(E["channel-group"]=p.channelGroups.join(",")),E.tt=0,p.state&&(E.state=JSON.stringify(p.state)),p.filterExpression&&p.filterExpression.length>0&&(E["filter-expr"]=p.filterExpression),E.ee="",E},handleResponse:function(y,p){return{region:p.t.r,timetoken:p.t.t}}},fr={getOperation:function(){return G.PNReceiveMessagesOperation},validateParams:function(y,p){return p!=null&&p.channels||p!=null&&p.channelGroups?p!=null&&p.timetoken?p!=null&&p.region?void 0:"region can not be empty":"timetoken can not be empty":"channels and channleGroups both should not be empty"},getURL:function(y,p){var E=y.config,_=p.channels,R=_===void 0?[]:_,M=R.length>0?R.join(","):",";return"/v2/subscribe/".concat(E.subscribeKey,"/").concat(Ve.encodeString(M),"/0")},getRequestTimeout:function(y){return y.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},getAbortSignal:function(y,p){return p.abortSignal},prepareParams:function(y,p){var E={};return p.channelGroups&&p.channelGroups.length>0&&(E["channel-group"]=p.channelGroups.join(",")),p.filterExpression&&p.filterExpression.length>0&&(E["filter-expr"]=p.filterExpression),E.tt=p.timetoken,E.tr=p.region,E.ee="",E},handleResponse:function(y,p){var E=[];return p.m.forEach(function(_){var R={shard:parseInt(_.a,10),subscriptionMatch:_.b,channel:_.c,messageType:_.e,payload:_.d,flags:_.f,issuingClientId:_.i,subscribeKey:_.k,originationTimetoken:_.o,userMetadata:_.u,publishMetaData:{timetoken:_.p.t,region:_.p.r}};E.push(R)}),{messages:E,metadata:{region:p.t.r,timetoken:p.t.t}}}},ca=function(){function y(p){p===void 0&&(p=!1),this.sync=p,this.listeners=new Set}return y.prototype.subscribe=function(p){var E=this;return this.listeners.add(p),function(){E.listeners.delete(p)}},y.prototype.notify=function(p){var E=this,_=function(){E.listeners.forEach(function(R){R(p)})};this.sync?_():setTimeout(_,0)},y}(),$r=function(){function y(p){this.label=p,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}return y.prototype.transition=function(p,E){var _;if(this.transitionMap.has(E.type))return(_=this.transitionMap.get(E.type))===null||_===void 0?void 0:_(p,E)},y.prototype.on=function(p,E){return this.transitionMap.set(p,E),this},y.prototype.with=function(p,E){return[this,p,E??[]]},y.prototype.onEnter=function(p){return this.enterEffects.push(p),this},y.prototype.onExit=function(p){return this.exitEffects.push(p),this},y}(),_s=function(y){function p(){return y!==null&&y.apply(this,arguments)||this}return r(p,y),p.prototype.describe=function(E){return new $r(E)},p.prototype.start=function(E,_){this.currentState=E,this.currentContext=_,this.notify({type:"engineStarted",state:E,context:_})},p.prototype.transition=function(E){var _,R,M,W,J,re;if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:E});var oe=this.currentState.transition(this.currentContext,E);if(oe){var he=u(oe,3),ee=he[0],Pe=he[1],Se=he[2];try{for(var Ee=l(this.currentState.exitEffects),Ae=Ee.next();!Ae.done;Ae=Ee.next()){var Ce=Ae.value;this.notify({type:"invocationDispatched",invocation:Ce(this.currentContext)})}}catch(Xe){_={error:Xe}}finally{try{Ae&&!Ae.done&&(R=Ee.return)&&R.call(Ee)}finally{if(_)throw _.error}}var Ge=this.currentState;this.currentState=ee;var vt=this.currentContext;this.currentContext=Pe,this.notify({type:"transitionDone",fromState:Ge,fromContext:vt,toState:ee,toContext:Pe,event:E});try{for(var Ft=l(Se),kt=Ft.next();!kt.done;kt=Ft.next())Ce=kt.value,this.notify({type:"invocationDispatched",invocation:Ce})}catch(Xe){M={error:Xe}}finally{try{kt&&!kt.done&&(W=Ft.return)&&W.call(Ft)}
207finally{if(M)throw M.error}}try{for(var At=l(this.currentState.enterEffects),Ie=At.next();!Ie.done;Ie=At.next())Ce=Ie.value,this.notify({type:"invocationDispatched",invocation:Ce(this.currentContext)})}catch(Xe){J={error:Xe}}finally{try{Ie&&!Ie.done&&(re=At.return)&&re.call(At)}finally{if(J)throw J.error}}}},p}(ca),kl=function(){function y(p){this.dependencies=p,this.instances=new Map,this.handlers=new Map}return y.prototype.on=function(p,E){this.handlers.set(p,E)},y.prototype.dispatch=function(p){if(p.type!=="CANCEL"){var E=this.handlers.get(p.type);if(!E)throw new Error("Unhandled invocation '".concat(p.type,"'"));var _=E(p.payload,this.dependencies);p.managed&&this.instances.set(p.type,_),_.start()}else if(this.instances.has(p.payload)){var R=this.instances.get(p.payload);R==null||R.cancel(),this.instances.delete(p.payload)}},y.prototype.dispose=function(){var p,E;try{for(var _=l(this.instances.entries()),R=_.next();!R.done;R=_.next()){var M=u(R.value,2),W=M[0];M[1].cancel(),this.instances.delete(W)}}catch(J){p={error:J}}finally{try{R&&!R.done&&(E=_.return)&&E.call(_)}finally{if(p)throw p.error}}},y}();function Zn(y,p){var E=function(){for(var _=[],R=0;R<arguments.length;R++)_[R]=arguments[R];return{type:y,payload:p==null?void 0:p.apply(void 0,c([],u(_),!1))}};return E.type=y,E}function wa(y,p){var E=function(){for(var _=[],R=0;R<arguments.length;R++)_[R]=arguments[R];return{type:y,payload:p.apply(void 0,c([],u(_),!1)),managed:!1}};return E.type=y,E}function dl(y,p){var E=function(){for(var _=[],R=0;R<arguments.length;R++)_[R]=arguments[R];return{type:y,payload:p.apply(void 0,c([],u(_),!1)),managed:!0}};return E.type=y,E.cancel={type:"CANCEL",payload:y,managed:!1},E}var Yf=function(y){function p(){var E=this.constructor,_=y.call(this,"The operation was aborted.")||this;return _.name="AbortError",Object.setPrototypeOf(_,E.prototype),_}return r(p,y),p}(Error),LT=function(y){function p(){var E=y!==null&&y.apply(this,arguments)||this;return E._aborted=!1,E}return r(p,y),Object.defineProperty(p.prototype,"aborted",{get:function(){return this._aborted},enumerable:!1,configurable:!0}),p.prototype.throwIfAborted=function(){if(this._aborted)throw new Yf},p.prototype.abort=function(){this._aborted=!0,this.notify(new Yf)},p}(ca),$g=function(y){function p(E,_,R){var M=y.call(this,E,_)||this;return M.asyncFunction=R,M.abortSignal=new LT,M}return r(p,y),p.prototype.start=function(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies).catch(function(E){})},p.prototype.cancel=function(){this.abortSignal.abort()},p}(function(y,p){this.payload=y,this.dependencies=p}),Vo=function(y){return function(p,E){return new $g(p,E,y)}},Bg=dl("HANDSHAKE",function(y,p){return{channels:y,groups:p}}),Ug=dl("RECEIVE_MESSAGES",function(y,p,E){return{channels:y,groups:p,cursor:E}}),da=wa("EMIT_MESSAGES",function(y){return y}),yu=wa("EMIT_STATUS",function(y){return y}),cp=dl("RECEIVE_RECONNECT",function(y){return y}),Gc=dl("HANDSHAKE_RECONNECT",function(y){return y}),Ho=Zn("SUBSCRIPTION_CHANGED",function(y,p){return{channels:y,groups:p}}),Nl=Zn("SUBSCRIPTION_RESTORED",function(y,p,E,_){return{channels:y,groups:p,cursor:{timetoken:E,region:_??0}}}),Wv=Zn("HANDSHAKE_SUCCESS",function(y){return y}),qv=Zn("HANDSHAKE_FAILURE",function(y){return y}),Vg=Zn("HANDSHAKE_RECONNECT_SUCCESS",function(y){return{cursor:y}}),Kv=Zn("HANDSHAKE_RECONNECT_FAILURE",function(y){return y}),Bs=Zn("HANDSHAKE_RECONNECT_GIVEUP",function(y){return y}),fl=Zn("RECEIVE_SUCCESS",function(y,p){return{cursor:y,events:p}}),Us=Zn("RECEIVE_FAILURE",function(y){return y}),bo=Zn("RECEIVE_RECONNECT_SUCCESS",function(y,p){return{cursor:y,events:p}}),dp=Zn("RECEIVE_RECONNECT_FAILURE",function(y){return y}),Zf=Zn("RECEIVING_RECONNECT_GIVEUP",function(y){return y}),$d=Zn("DISCONNECT",function(){return{}}),Bd=Zn("RECONNECT",function(y,p){return{cursor:{timetoken:y??"",region:p??0}}}),Xu=Zn("UNSUBSCRIBE_ALL",function(){return{}}),Yv=function(y){function p(E,_){var R=y.call(this,_)||this;return R.on(Bg.type,Vo(function(M,W,J){var re=J.handshake,oe=J.presenceState,he=J.config;return a(R,void 0,void 0,function(){var ee,Pe;return o(this,function(Se){switch(Se.label){case 0:W.throwIfAborted(),Se.label=1;case 1:return Se.trys.push([1,3,,4]),[4,re(i({abortSignal:W,channels:M.channels,channelGroups:M.groups,filterExpression:he.filterExpression},he.maintainPresenceState&&{state:oe}))];case 2:return ee=Se.sent(),[2,E.transition(Wv(ee))];case 3:return(Pe=Se.sent())instanceof Error&&Pe.message==="Aborted"?[2]:Pe instanceof at?[2,E.transition(qv(Pe))]:[3,4];case 4:return[2]}})})})),R.on(Ug.type,Vo(function(M,W,J){var re=J.receiveMessages,oe=J.config;return a(R,void 0,void 0,function(){var he,ee;return o(this,function(Pe){switch(Pe.label){case 0:W.throwIfAborted(),Pe.label=1;case 1:return Pe.trys.push([1,3,,4]),[4,re({abortSignal:W,channels:M.channels,channelGroups:M.groups,timetoken:M.cursor.timetoken,region:M.cursor.region,filterExpression:oe.filterExpression})];case 2:return he=Pe.sent(),E.transition(fl(he.metadata,he.messages)),[3,4];case 3:return(ee=Pe.sent())instanceof Error&&ee.message==="Aborted"?[2]:ee instanceof at&&!W.aborted?[2,E.transition(Us(ee))]:[3,4];case 4:return[2]}})})})),R.on(da.type,Vo(function(M,W,J){var re=J.emitMessages;return a(R,void 0,void 0,function(){return o(this,function(oe){return M.length>0&&re(M),[2]})})})),R.on(yu.type,Vo(function(M,W,J){var re=J.emitStatus;return a(R,void 0,void 0,function(){return o(this,function(oe){return re(M),[2]})})})),R.on(cp.type,Vo(function(M,W,J){var re=J.receiveMessages,oe=J.delay,he=J.config;return a(R,void 0,void 0,function(){var ee,Pe;return o(this,function(Se){switch(Se.label){case 0:return he.retryConfiguration&&he.retryConfiguration.shouldRetry(M.reason,M.attempts)?(W.throwIfAborted(),[4,oe(he.retryConfiguration.getDelay(M.attempts,M.reason))]):[3,6];case 1:Se.sent(),W.throwIfAborted(),Se.label=2;case 2:return Se.trys.push([2,4,,5]),[4,re({abortSignal:W,channels:M.channels,channelGroups:M.groups,timetoken:M.cursor.timetoken,region:M.cursor.region,filterExpression:he.filterExpression})];case 3:return ee=Se.sent(),[2,E.transition(bo(ee.metadata,ee.messages))];case 4:return(Pe=Se.sent())instanceof Error&&Pe.message==="Aborted"?[2]:Pe instanceof at?[2,E.transition(dp(Pe))]:[3,5];case 5:return[3,7];case 6:return[2,E.transition(Zf(new at(he.retryConfiguration.getGiveupReason(M.reason,M.attempts))))];case 7:return[2]}})})})),R.on(Gc.type,Vo(function(M,W,J){var re=J.handshake,oe=J.delay,he=J.presenceState,ee=J.config;return a(R,void 0,void 0,function(){var Pe,Se;return o(this,function(Ee){switch(Ee.label){case 0:return ee.retryConfiguration&&ee.retryConfiguration.shouldRetry(M.reason,M.attempts)?(W.throwIfAborted(),[4,oe(ee.retryConfiguration.getDelay(M.attempts,M.reason))]):[3,6];case 1:Ee.sent(),W.throwIfAborted(),Ee.label=2;case 2:return Ee.trys.push([2,4,,5]),[4,re(i({abortSignal:W,channels:M.channels,channelGroups:M.groups,filterExpression:ee.filterExpression},ee.maintainPresenceState&&{state:he}))];case 3:return Pe=Ee.sent(),[2,E.transition(Vg(Pe))];case 4:return(Se=Ee.sent())instanceof Error&&Se.message==="Aborted"?[2]:Se instanceof at?[2,E.transition(Kv(Se))]:[3,5];case 5:return[3,7];case 6:return[2,E.transition(Bs(new at(ee.retryConfiguration.getGiveupReason(M.reason,M.attempts))))];case 7:return[2]}})})})),R}return r(p,y),p}(kl),jo=new $r("HANDSHAKE_FAILED");jo.on(Ho.type,function(y,p){return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),jo.on(Bd.type,function(y,p){return Ki.with({channels:y.channels,groups:y.groups,cursor:p.payload.cursor||y.cursor})}),jo.on(Nl.type,function(y,p){var E,_;return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region?p.payload.cursor.region:(_=(E=y==null?void 0:y.cursor)===null||E===void 0?void 0:E.region)!==null&&_!==void 0?_:0}})}),jo.on(Xu.type,function(y){return Ha.with()});
207var hl=new $r("HANDSHAKE_STOPPED");hl.on(Ho.type,function(y,p){return hl.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),hl.on(Bd.type,function(y,p){return Ki.with(i(i({},y),{cursor:p.payload.cursor||y.cursor}))}),hl.on(Nl.type,function(y,p){var E;return hl.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region||((E=y==null?void 0:y.cursor)===null||E===void 0?void 0:E.region)||0}})}),hl.on(Xu.type,function(y){return Ha.with()});var Qf=new $r("RECEIVE_FAILED");Qf.on(Bd.type,function(y,p){var E;return Ki.with({channels:y.channels,groups:y.groups,cursor:{timetoken:p.payload.cursor.timetoken?(E=p.payload.cursor)===null||E===void 0?void 0:E.timetoken:y.cursor.timetoken,region:p.payload.cursor.region||y.cursor.region}})}),Qf.on(Ho.type,function(y,p){return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),Qf.on(Nl.type,function(y,p){return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region||y.cursor.region}})}),Qf.on(Xu.type,function(y){return Ha.with(void 0)});var bu=new $r("RECEIVE_STOPPED");bu.on(Ho.type,function(y,p){return bu.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),bu.on(Nl.type,function(y,p){return bu.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region||y.cursor.region}})}),bu.on(Bd.type,function(y,p){var E;return Ki.with({channels:y.channels,groups:y.groups,cursor:{timetoken:p.payload.cursor.timetoken?(E=p.payload.cursor)===null||E===void 0?void 0:E.timetoken:y.cursor.timetoken,region:p.payload.cursor.region||y.cursor.region}})}),bu.on(Xu.type,function(){return Ha.with(void 0)});var So=new $r("RECEIVE_RECONNECTING");So.onEnter(function(y){return cp(y)}),So.onExit(function(){return cp.cancel}),So.on(bo.type,function(y,p){return fa.with({channels:y.channels,groups:y.groups,cursor:p.payload.cursor},[da(p.payload.events)])}),So.on(dp.type,function(y,p){return So.with(i(i({},y),{attempts:y.attempts+1,reason:p.payload}))}),So.on(Zf.type,function(y,p){var E;return Qf.with({groups:y.groups,channels:y.channels,cursor:y.cursor,reason:p.payload},[yu({category:j.PNDisconnectedUnexpectedlyCategory,error:(E=p.payload)===null||E===void 0?void 0:E.message})])}),So.on($d.type,function(y){return bu.with({channels:y.channels,groups:y.groups,cursor:y.cursor},[yu({category:j.PNDisconnectedCategory})])}),So.on(Nl.type,function(y,p){return fa.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region||y.cursor.region}})}),So.on(Ho.type,function(y,p){return fa.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),So.on(Xu.type,function(y){return Ha.with(void 0,[yu({category:j.PNDisconnectedCategory})])});var fa=new $r("RECEIVING");fa.onEnter(function(y){return Ug(y.channels,y.groups,y.cursor)}),fa.onExit(function(){return Ug.cancel}),fa.on(fl.type,function(y,p){return fa.with({channels:y.channels,groups:y.groups,cursor:p.payload.cursor},[da(p.payload.events)])}),fa.on(Ho.type,function(y,p){return p.payload.channels.length===0&&p.payload.groups.length===0?Ha.with(void 0):fa.with({cursor:y.cursor,channels:p.payload.channels,groups:p.payload.groups})}),fa.on(Nl.type,function(y,p){return p.payload.channels.length===0&&p.payload.groups.length===0?Ha.with(void 0):fa.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region||y.cursor.region}})}),fa.on(Us.type,function(y,p){return So.with(i(i({},y),{attempts:0,reason:p.payload}))}),fa.on($d.type,function(y){return bu.with({channels:y.channels,groups:y.groups,cursor:y.cursor},[yu({category:j.PNDisconnectedCategory})])}),fa.on(Xu.type,function(y){return Ha.with(void 0,[yu({category:j.PNDisconnectedCategory})])});var zo=new $r("HANDSHAKE_RECONNECTING");zo.onEnter(function(y){return Gc(y)}),zo.onExit(function(){return Gc.cancel}),zo.on(Vg.type,function(y,p){var E,_,R={timetoken:!((E=y.cursor)===null||E===void 0)&&E.timetoken?(_=y.cursor)===null||_===void 0?void 0:_.timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region};return fa.with({channels:y.channels,groups:y.groups,cursor:R},[yu({category:j.PNConnectedCategory})])}),zo.on(Kv.type,function(y,p){return zo.with(i(i({},y),{attempts:y.attempts+1,reason:p.payload}))}),zo.on(Bs.type,function(y,p){var E;return jo.with({groups:y.groups,channels:y.channels,cursor:y.cursor,reason:p.payload},[yu({category:j.PNConnectionErrorCategory,error:(E=p.payload)===null||E===void 0?void 0:E.message})])}),zo.on($d.type,function(y){return hl.with({channels:y.channels,groups:y.groups,cursor:y.cursor})}),zo.on(Ho.type,function(y,p){return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),zo.on(Nl.type,function(y,p){var E,_;return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:((E=p.payload.cursor)===null||E===void 0?void 0:E.region)||((_=y==null?void 0:y.cursor)===null||_===void 0?void 0:_.region)||0}})}),zo.on(Xu.type,function(y){return Ha.with(void 0)});var Ki=new $r("HANDSHAKING");Ki.onEnter(function(y){return Bg(y.channels,y.groups)}),Ki.onExit(function(){return Bg.cancel}),Ki.on(Ho.type,function(y,p){return p.payload.channels.length===0&&p.payload.groups.length===0?Ha.with(void 0):Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:y.cursor})}),Ki.on(Wv.type,function(y,p){var E,_;return fa.with({channels:y.channels,groups:y.groups,cursor:{timetoken:!((E=y==null?void 0:y.cursor)===null||E===void 0)&&E.timetoken?(_=y==null?void 0:y.cursor)===null||_===void 0?void 0:_.timetoken:p.payload.timetoken,region:p.payload.region}},[yu({category:j.PNConnectedCategory})])}),Ki.on(qv.type,function(y,p){return zo.with({channels:y.channels,groups:y.groups,cursor:y.cursor,attempts:0,reason:p.payload})}),Ki.on($d.type,function(y){return hl.with({channels:y.channels,groups:y.groups,cursor:y.cursor})}),Ki.on(Nl.type,function(y,p){var E;return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:{timetoken:p.payload.cursor.timetoken,region:p.payload.cursor.region||((E=y==null?void 0:y.cursor)===null||E===void 0?void 0:E.region)||0}})}),Ki.on(Xu.type,function(y){return Ha.with()});var Ha=new $r("UNSUBSCRIBED");Ha.on(Ho.type,function(y,p){return Ki.with({channels:p.payload.channels,groups:p.payload.groups})}),Ha.on(Nl.type,function(y,p){return Ki.with({channels:p.payload.channels,groups:p.payload.groups,cursor:p.payload.cursor})});var fp=function(){function y(p){var E=this;this.engine=new _s,this.channels=[],this.groups=[],this.dependencies=p,this.dispatcher=new Yv(this.engine,p),this._unsubscribeEngine=this.engine.subscribe(function(_){_.type==="invocationDispatched"&&E.dispatcher.dispatch(_.invocation)}),this.engine.start(Ha,void 0)}return Object.defineProperty(y.prototype,"_engine",{get:function(){return this.engine}
207,enumerable:!1,configurable:!0}),y.prototype.subscribe=function(p){var E=this,_=p.channels,R=p.channelGroups,M=p.timetoken,W=p.withPresence;this.channels=c(c([],u(this.channels),!1),u(_??[]),!1),this.groups=c(c([],u(this.groups),!1),u(R??[]),!1),W&&(this.channels.map(function(J){return E.channels.push("".concat(J,"-pnpres"))}),this.groups.map(function(J){return E.groups.push("".concat(J,"-pnpres"))})),M?this.engine.transition(Nl(Array.from(new Set(c(c([],u(this.channels),!1),u(_??[]),!1))),Array.from(new Set(c(c([],u(this.groups),!1),u(R??[]),!1))),M)):this.engine.transition(Ho(Array.from(new Set(c(c([],u(this.channels),!1),u(_??[]),!1))),Array.from(new Set(c(c([],u(this.groups),!1),u(R??[]),!1))))),this.dependencies.join&&this.dependencies.join({channels:Array.from(new Set(this.channels.filter(function(J){return!J.endsWith("-pnpres")}))),groups:Array.from(new Set(this.groups.filter(function(J){return!J.endsWith("-pnpres")})))})},y.prototype.unsubscribe=function(p){var E=this,_=p.channels,R=_===void 0?[]:_,M=p.channelGroups,W=M===void 0?[]:M,J=Ve.removeSingleOccurance(this.channels,c(c([],u(R),!1),u(R.map(function(ee){return"".concat(ee,"-pnpres")}
207)),!1)),re=Ve.removeSingleOccurance(this.groups,c(c([],u(W),!1),u(W.map(function(ee){return"".concat(ee,"-pnpres")})),!1));if(new Set(this.channels).size!==new Set(J).size||new Set(this.groups).size!==new Set(re).size){var oe=Ve.findUniqueCommonElements(this.channels,R),he=Ve.findUniqueCommonElements(this.groups,W);this.dependencies.presenceState&&(oe==null||oe.forEach(function(ee){return delete E.dependencies.presenceState[ee]}),he==null||he.forEach(function(ee){return delete E.dependencies.presenceState[ee]})),this.channels=J,this.groups=re,this.engine.transition(Ho(Array.from(new Set(this.channels.slice(0))),Array.from(new Set(this.groups.slice(0))))),this.dependencies.leave&&this.dependencies.leave({channels:oe.slice(0),groups:he.slice(0)})}},y.prototype.unsubscribeAll=function(){this.channels=[],this.groups=[],this.dependencies.presenceState&&(this.dependencies.presenceState={}),this.engine.transition(Ho(this.channels.slice(0),this.groups.slice(0))),this.dependencies.leaveAll&&this.dependencies.leaveAll()},y.prototype.reconnect=function(p){var E=p.timetoken,_=p.region;this.engine.transition(Bd(E,_))},y.prototype.disconnect=function(){this.engine.transition($d()),this.dependencies.leaveAll&&this.dependencies.leaveAll()},y.prototype.getSubscribedChannels=function(){return Array.from(new Set(this.channels))},y.prototype.getSubscribedChannelGroups=function(){return Array.from(new Set(this.groups))},y.prototype.dispose=function(){this.disconnect(),this._unsubscribeEngine(),this.dispatcher.dispose()},y}(),Hg=Zn("RECONNECT",function(){return{}}),jg=Zn("DISCONNECT",function(){return{}}),Ud=Zn("JOINED",function(y,p){return{channels:y,groups:p}}),mi=Zn("LEFT",function(y,p){return{channels:y,groups:p}}),Wc=Zn("LEFT_ALL",function(){return{}}),oi=Zn("HEARTBEAT_SUCCESS",function(y){return{statusCode:y}}),Nr=Zn("HEARTBEAT_FAILURE",function(y){return y}),zg=Zn("HEARTBEAT_GIVEUP",function(){return{}}),hp=Zn("TIMES_UP",function(){return{}}),Gg=wa("HEARTBEAT",function(y,p){return{channels:y,groups:p}}),ja=wa("LEAVE",function(y,p){return{channels:y,groups:p}}),pp=wa("EMIT_STATUS",function(y){return y}),os=dl("WAIT",function(){return{}}),Wg=dl("DELAYED_HEARTBEAT",function(y){return y}),Zv=function(y){function p(E,_){var R=y.call(this,_)||this;return R.on(Gg.type,Vo(function(M,W,J){var re=J.heartbeat,oe=J.presenceState,he=J.config;return a(R,void 0,void 0,function(){var ee;return o(this,function(Pe){switch(Pe.label){case 0:return Pe.trys.push([0,2,,3]),[4,re(i({channels:M.channels,channelGroups:M.groups},he.maintainPresenceState&&{state:oe}))];case 1:return Pe.sent(),E.transition(oi(200)),[3,3];case 2:return(ee=Pe.sent())instanceof at?[2,E.transition(Nr(ee))]:[3,3];case 3:return[2]}})})})),R.on(ja.type,Vo(function(M,W,J){var re=J.leave,oe=J.config;return a(R,void 0,void 0,function(){return o(this,function(he){switch(he.label){case 0:if(oe.suppressLeaveEvents)return[3,4];he.label=1;case 1:return he.trys.push([1,3,,4]),[4,re({channels:M.channels,channelGroups:M.groups})];case 2:case 3:return he.sent(),[3,4];case 4:return[2]}})})})),R.on(os.type,Vo(function(M,W,J){var re=J.heartbeatDelay;return a(R,void 0,void 0,function(){return o(this,function(oe){switch(oe.label){case 0:return W.throwIfAborted(),[4,re()];case 1:return oe.sent(),W.throwIfAborted(),[2,E.transition(hp())]}})})})),R.on(Wg.type,Vo(function(M,W,J){var re=J.heartbeat,oe=J.retryDelay,he=J.presenceState,ee=J.config;return a(R,void 0,void 0,function(){var Pe;return o(this,function(Se){switch(Se.label){case 0:return ee.retryConfiguration&&ee.retryConfiguration.shouldRetry(M.reason,M.attempts)?(W.throwIfAborted(),[4,oe(ee.retryConfiguration.getDelay(M.attempts,M.reason))]):[3,6];case 1:Se.sent(),W.throwIfAborted(),Se.label=2;case 2:return Se.trys.push([2,4,,5]),[4,re(i({channels:M.channels,channelGroups:M.groups},ee.maintainPresenceState&&{state:he}))];case 3:return Se.sent(),[2,E.transition(oi(200))];case 4:return(Pe=Se.sent())instanceof Error&&Pe.message==="Aborted"?[2]:Pe instanceof at?[2,E.transition(Nr(Pe))]:[3,5];case 5:return[3,7];case 6:return[2,E.transition(zg())];case 7:return[2]}})})})),R.on(pp.type,Vo(function(M,W,J){var re=J.emitStatus,oe=J.config;return a(R,void 0,void 0,function(){var he;return o(this,function(ee){return oe.announceFailedHeartbeats&&((he=M==null?void 0:M.status)===null||he===void 0?void 0:he.error)===!0?re(M.status):oe.announceSuccessfulHeartbeats&&M.statusCode===200&&re(i(i({},M),{operation:G.PNHeartbeatOperation,error:!1})),[2]})})})),R}return r(p,y),p}(kl),Ri=new $r("HEARTBEAT_STOPPED");Ri.on(Ud.type,function(y,p){return Ri.with({channels:c(c([],u(y.channels),!1),u(p.payload.channels),!1),groups:c(c([],u(y.groups),!1),u(p.payload.groups),!1)})}),Ri.on(mi.type,function(y,p){return Ri.with({channels:y.channels.filter(function(E){return!p.payload.channels.includes(E)}),groups:y.groups.filter(function(E){return!p.payload.groups.includes(E)})})}),Ri.on(Hg.type,function(y,p){return Cs.with({channels:y.channels,groups:y.groups})}),Ri.on(Wc.type,function(y,p){return ha.with(void 0)});var Ml=new $r("HEARTBEAT_COOLDOWN");Ml.onEnter(function(){return os()}),Ml.onExit(function(){return os.cancel}),Ml.on(hp.type,function(y,p){return Cs.with({channels:y.channels,groups:y.groups})}),Ml.on(Ud.type,function(y,p){return Cs.with({channels:c(c([],u(y.channels),!1),u(p.payload.channels),!1),groups:c(c([],u(y.groups),!1),u(p.payload.groups),!1)})}),Ml.on(mi.type,function(y,p){return Cs.with({channels:y.channels.filter(function(E){return!p.payload.channels.includes(E)}),groups:y.groups.filter(function(E){return!p.payload.groups.includes(E)})},[ja(p.payload.channels,p.payload.groups)])}),Ml.on(jg.type,function(y){return Ri.with({channels:y.channels,groups:y.groups},[ja(y.channels,y.groups)])}),Ml.on(Wc.type,function(y,p){return ha.with(void 0,[ja(y.channels,y.groups)])});var pl=new $r("HEARTBEAT_FAILED");pl.on(Ud.type,function(y,p){return Cs.with({channels:c(c([],u(y.channels),!1),u(p.payload.channels),!1),groups:c(c([],u(y.groups),!1),u(p.payload.groups),!1)})}),pl.on(mi.type,function(y,p){return Cs.with({channels:y.channels.filter(function(E){return!p.payload.channels.includes(E)}),groups:y.groups.filter(function(E){return!p.payload.groups.includes(E)})},[ja(p.payload.channels,p.payload.groups)])}),pl.on(Hg.type,function(y,p){return Cs.with({channels:y.channels,groups:y.groups})}),pl.on(jg.type,function(y,p){return Ri.with({channels:y.channels,groups:y.groups},[ja(y.channels,y.groups)])}),pl.on(Wc.type,function(y,p){return ha.with(void 0,[ja(y.channels,y.groups)])});var gl=new $r("HEARBEAT_RECONNECTING");gl.onEnter(function(y){return Wg(y)}),gl.onExit(function(){return Wg.cancel}),gl.on(Ud.type,function(y,p){return Cs.with({channels:c(c([],u(y.channels),!1),u(p.payload.channels),!1),groups:c(c([],u(y.groups),!1),u(p.payload.groups),!1)})}),gl.on(mi.type,function(y,p){return Cs.with({channels:y.channels.filter(function(E){return!p.payload.channels.includes(E)}),groups:y.groups.filter(function(E){return!p.payload.groups.includes(E)})},[ja(p.payload.channels,p.payload.groups)])}),gl.on(jg.type,function(y,p){Ri.with({channels:y.channels,groups:y.groups},[ja(y.channels,y.groups)])}),gl.on(oi.type,function(y,p){return Ml.with({channels:y.channels,groups:y.groups})}),gl.on(Nr.type,function(y,p){return gl.with(i(i({},y),{attempts:y.attempts+1,reason:p.payload}))}),gl.on(zg.type,function(y,p){return pl.with({channels:y.channels,groups:y.groups})}),gl.on(Wc.type,function(y,p){return ha.with(void 0,[ja(y.channels,y.groups)])});var Cs=new $r("HEARTBEATING");Cs.onEnter(function(y){return Gg(y.channels,y.groups)}),Cs.on(oi.type,function(y,p){return Ml.with({channels:y.channels,groups:y.groups})}),Cs.on(Ud.type,function(y,p){return Cs.with({channels:c(c([],u(y.channels),!1),u(p.payload.channels),!1),groups:c(c([],u(y.groups),!1),u(p.payload.groups),!1)})}),Cs.on(mi.type,function(y,p){return Cs.with({channels:y.channels.filter(function(E){return!p.payload.channels.includes(E)}),groups:y.groups.filter(function(E){return!p.payload.groups.includes(E)})},[ja(p.payload.channels,p.payload.groups)])}),Cs.on(Nr.type,function(y,p){return gl.with(i(i({},y),{attempts:0,reason:p.payload}))}),Cs.on(jg.type,function(y){return Ri.with({channels:y.channels,groups:y.groups},[ja(y.channels,y.groups)])}),Cs.on(Wc.type,function(y,p){return ha.with(void 0,[ja(y.channels,y.groups)])});var ha=new $r("HEARTBEAT_INACTIVE");ha.on(Ud.type,function(y,p){return Cs.with({channels:p.payload.channels,groups:p.payload.groups})});var xb=function(){function y(p){var E=this;this.engine=new _s,this.channels=[],this.groups=[],this.dispatcher=new Zv(this.engine,p),this.dependencies=p,this._unsubscribeEngine=this.engine.subscribe(function(_){_.type==="invocationDispatched"&&E.dispatcher.dispatch(_.invocation)}),this.engine.start(ha,void 0)}return Object.defineProperty(y.prototype,"_engine",{get:function(){return this.engine}
207,enumerable:!1,configurable:!0}),y.prototype.join=function(p){var E=p.channels,_=p.groups;this.channels=c(c([],u(this.channels),!1),u(E??[]),!1),this.groups=c(c([],u(this.groups),!1),u(_??[]),!1),this.engine.transition(Ud(this.channels.slice(0),this.groups.slice(0)))},y.prototype.leave=function(p){var E=this,_=p.channels,R=p.groups;this.dependencies.presenceState&&(_==null||_.forEach(function(M){return delete E.dependencies.presenceState[M]}),R==null||R.forEach(function(M){return delete E.dependencies.presenceState[M]})),this.engine.transition(mi(_??[],R??[]))},y.prototype.leaveAll=function(){this.engine.transition(Wc())},y.prototype.dispose=function(){this._unsubscribeEngine(),this.dispatcher.dispose()},y}(),Qv=function(){function y(){}return y.LinearRetryPolicy=function(p){return{delay:p.delay,maximumRetry:p.maximumRetry,shouldRetry:function(E,_){var R;return((R=E==null?void 0:E.status)===null||R===void 0?void 0:R.statusCode)!==403&&this.maximumRetry>_},getDelay:function(E,_){var R;return 1e3*(((R=_.retryAfter)!==null&&R!==void 0?R:this.delay)+Math.random())},getGiveupReason:function(E,_){var R;return this.maximumRetry<=_?"retry attempts exhaused.":((R=E==null?void 0:E.status)===null||R===void 0?void 0:R.statusCode)===403?"forbidden operation.":"unknown error"}}},y.ExponentialRetryPolicy=function(p){return{minimumDelay:p.minimumDelay,maximumDelay:p.maximumDelay,maximumRetry:p.maximumRetry,shouldRetry:function(E,_){var R;return((R=E==null?void 0:E.status)===null||R===void 0?void 0:R.statusCode)!==403&&this.maximumRetry>_},getDelay:function(E,_){var R;return 1e3*(((R=_.retryAfter)!==null&&R!==void 0?R:Math.min(Math.pow(2,E),this.maximumDelay))+Math.random())},getGiveupReason:function(E,_){var R;return this.maximumRetry<=_?"retry attempts exhaused.":((R=E==null?void 0:E.status)===null||R===void 0?void 0:R.statusCode)===403?"forbidden operation.":"unknown error"}}},y}(),Ib=function(){function y(p){var E=p.modules,_=p.listenerManager,R=p.getFileUrl;this.modules=E,this.listenerManager=_,this.getFileUrl=R,this._channelListenerMap=new Map,this._groupListenerMap=new Map,E.cryptoModule&&(this._decoder=new TextDecoder)}return y.prototype.emitEvent=function(p){var E=p.channel,_=p.publishMetaData,R=p.subscriptionMatch;if(E===R&&(R=null),p.channel.endsWith("-pnpres")){var M={channel:null,subscription:null};E&&(M.channel=E.substring(0,E.lastIndexOf("-pnpres"))),R&&(M.subscription=R.substring(0,R.lastIndexOf("-pnpres"))),M.action=p.payload.action,M.state=p.payload.data,M.timetoken=_.timetoken,M.occupancy=p.payload.occupancy,M.uuid=p.payload.uuid,M.timestamp=p.payload.timestamp,p.payload.join&&(M.join=p.payload.join),p.payload.leave&&(M.leave=p.payload.leave),p.payload.timeout&&(M.timeout=p.payload.timeout),M.actualChannel=R!=null?E:null,M.subscribedChannel=R??E,this.listenerManager.announcePresence(M),this._announce("presence",M,M.channel,M.subscription)}else if(p.messageType===1)(M={channel:null,subscription:null}).channel=E,M.subscription=R,M.timetoken=_.timetoken,M.publisher=p.issuingClientId,p.userMetadata&&(M.userMetadata=p.userMetadata),M.message=p.payload,this.listenerManager.announceSignal(M),this._announce("signal",M,M.channel,M.subscription);else if(p.messageType===2){if((M={channel:null,subscription:null}).channel=E,M.subscription=R,M.timetoken=_.timetoken,M.publisher=p.issuingClientId,p.userMetadata&&(M.userMetadata=p.userMetadata),M.message={event:p.payload.event,type:p.payload.type,data:p.payload.data},this.listenerManager.announceObjects(M),this._announce("objects",M,M.channel,M.subscription),p.payload.type==="uuid"){var W=this._renameChannelField(M),J=i(i({},W),{message:i(i({},W.message),{event:this._renameEvent(W.message.event),type:"user"})});this.listenerManager.announceUser(J),this._announce("user",J,M.channel,M.subscription)}else if(p.payload.type==="channel"){W=this._renameChannelField(M);var re=i(i({},W),{message:i(i({},W.message),{event:this._renameEvent(W.message.event),type:"space"})});this.listenerManager.announceSpace(re),this._announce("space",re,M.channel,M.subscription)}else if(p.payload.type==="membership"){var oe=(W=this._renameChannelField(M)).message.data,he=oe.uuid,ee=oe.channel,Pe=s(oe,["uuid","channel"]);Pe.user=he,Pe.space=ee;var Se=i(i({},W),{message:i(i({},W.message),{event:this._renameEvent(W.message.event),data:Pe})});this.listenerManager.announceMembership(Se),this._announce("membership",Se,M.channel,M.subscription)}}else if(p.messageType===3)(M={}).channel=E,M.subscription=R,M.timetoken=_.timetoken,M.publisher=p.issuingClientId,M.data={messageTimetoken:p.payload.data.messageTimetoken,actionTimetoken:p.payload.data.actionTimetoken,type:p.payload.data.type,uuid:p.issuingClientId,value:p.payload.data.value},M.event=p.payload.event,this.listenerManager.announceMessageAction(M),this._announce("messageAction",M,M.channel,M.subscription);else if(p.messageType===4){(M={}).channel=E,M.subscription=R,M.timetoken=_.timetoken,M.publisher=p.issuingClientId;var Ee=p.payload;if(this.modules.cryptoModule){var Ae=void 0;try{Ae=(Ce=this.modules.cryptoModule.decrypt(p.payload))instanceof ArrayBuffer?JSON.parse(this._decoder.decode(Ce)):Ce}catch(Ge){Ae=null,M.error="Error while decrypting message content: ".concat(Ge.message)}Ae!==null&&(Ee=Ae)}p.userMetadata&&(M.userMetadata=p.userMetadata),M.message=Ee.message,M.file={id:Ee.file.id,name:Ee.file.name,url:this.getFileUrl({id:Ee.file.id,name:Ee.file.name,channel:E})}
207,this.listenerManager.announceFile(M),this._announce("file",M,M.channel,M.subscription)}else{if((M={channel:null,subscription:null}).channel=E,M.subscription=R,M.timetoken=_.timetoken,M.publisher=p.issuingClientId,p.userMetadata&&(M.userMetadata=p.userMetadata),this.modules.cryptoModule){Ae=void 0;try{var Ce;Ae=(Ce=this.modules.cryptoModule.decrypt(p.payload))instanceof ArrayBuffer?JSON.parse(this._decoder.decode(Ce)):Ce}catch(Ge){Ae=null,M.error="Error while decrypting message content: ".concat(Ge.message)}M.message=Ae??p.payload}else M.message=p.payload;M.actualChannel=R!=null?E:null,M.subscribedChannel=R??E,this.listenerManager.announceMessage(M),this._announce("message",M,M.channel,M.subscription)}},y.prototype.addListener=function(p,E,_){var R=this;E&&_?(E==null||E.forEach(function(M){R._channelListenerMap[M]?R._channelListenerMap[M].includes(p)||R._channelListenerMap[M].push(p):R._channelListenerMap[M]=[p]}),_==null||_.forEach(function(M){R._groupListenerMap[M]?R._groupListenerMap[M].includes(p)||R._groupListenerMap[M].push(p):R._groupListenerMap[M]=[p]})):this.listenerManager.addListener(p)},y.prototype.removeListener=function(p,E,_){var R=this;
207E&&_?(E==null||E.forEach(function(M){var W;R._channelListenerMap[M]=(W=R._channelListenerMap[M])===null||W===void 0?void 0:W.filter(function(J){return J!==p})}),_==null||_.forEach(function(M){var W;R._groupListenerMap[M]=(W=R._groupListenerMap[M])===null||W===void 0?void 0:W.filter(function(J){return J!==p})})):this.listenerManager.removeListener(p)},y.prototype.removeAllListeners=function(){this.listenerManager.removeAllListeners()},y.prototype._renameEvent=function(p){return p==="set"?"updated":"removed"},y.prototype._renameChannelField=function(p){var E=p.channel,_=s(p,["channel"]);return _.spaceId=E,_},y.prototype._announce=function(p,E,_,R){var M,W;(M=this._channelListenerMap[_])===null||M===void 0||M.forEach(function(J){return J[p]&&J[p](E)}),(W=this._groupListenerMap[R])===null||W===void 0||W.forEach(function(J){return J[p]&&J[p](E)})},y}(),Xv=function(){function y(){}return y.prototype.subscribe=function(){var p,E;this.pubnub.subscribe(i({channels:this.channelNames,channelGroups:this.groupNames},((E=(p=this.options)===null||p===void 0?void 0:p.cursor)===null||E===void 0?void 0:E.timetoken)&&{timetoken:this.options.cursor.timetoken}
207))},y.prototype.unsubscribe=function(){this.pubnub.unsubscribe({channels:this.channelNames.filter(function(p){return!p.endsWith("-pnpres")}),channelGroups:this.groupNames.filter(function(p){return!p.endsWith("-pnpres")})})},Object.defineProperty(y.prototype,"onMessage",{set:function(p){this.listener.message=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onPresence",{set:function(p){this.listener.presence=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onSignal",{set:function(p){this.listener.signal=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onObjects",{set:function(p){this.listener.objects=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onMessageAction",{set:function(p){this.listener.messageAction=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onFile",{set:function(p){this.listener.file=p},enumerable:!1,configurable:!0}),y.prototype.addListener=function(p){this.eventEmitter.addListener(p,this.channelNames.filter(function(E){return!E.endsWith("-pnpres")}),this.groupNames.filter(function(E){return!E.endsWith("-pnpres")}))},y.prototype.removeListener=function(p){this.eventEmitter.removeListener(p,this.channelNames,this.groupNames)},Object.defineProperty(y.prototype,"channels",{get:function(){return this.channelNames.slice(0)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"channelGroups",{get:function(){return this.groupNames.slice(0)},enumerable:!1,configurable:!0}),y}(),qg=function(y){function p(E){var _=E.channels,R=_===void 0?[]:_,M=E.channelGroups,W=M===void 0?[]:M,J=E.subscriptionOptions,re=E.eventEmitter,oe=E.pubnub,he=y.call(this)||this;return he.channelNames=[],he.groupNames=[],he.subscriptionList=[],he.options=J,he.eventEmitter=re,he.pubnub=oe,R.filter(function(ee){return!ee.endsWith("-pnpres")}).forEach(function(ee){var Pe=he.pubnub.channel(ee).subscription(he.options);he.channelNames=c(c([],u(he.channelNames),!1),u(Pe.channels),!1),he.subscriptionList.push(Pe)}),W.filter(function(ee){return!ee.endsWith("-pnpres")}).forEach(function(ee){var Pe=he.pubnub.channelGroup(ee).subscription(he.options);he.groupNames=c(c([],u(he.groupNames),!1),u(Pe.channelGroups),!1),he.subscriptionList.push(Pe)}),he.listener={},re.addListener(he.listener,he.channelNames.filter(function(ee){return!ee.endsWith("-pnpres")}),he.groupNames.filter(function(ee){return!ee.endsWith("-pnpres")})),he}return r(p,y),p.prototype.addSubscription=function(E){this.subscriptionList.push(E),this.channelNames=c(c([],u(this.channelNames),!1),u(E.channels),!1),this.groupNames=c(c([],u(this.groupNames),!1),u(E.channelGroups),!1),this.eventEmitter.addListener(this.listener,E.channels,E.channelGroups)},p.prototype.removeSubscription=function(E){var _=E.channels,R=E.channelGroups;this.channelNames=this.channelNames.filter(function(M){return!_.includes(M)}),this.groupNames=this.groupNames.filter(function(M){return!R.includes(M)}),this.subscriptionList=this.subscriptionList.filter(function(M){return M!==E}),this.eventEmitter.removeListener(this.listener,_,R)},p.prototype.addSubscriptionSet=function(E){this.subscriptionList=c(c([],u(this.subscriptionList),!1),u(E.subscriptions),!1),this.channelNames=c(c([],u(this.channelNames),!1),u(E.channels),!1),this.groupNames=c(c([],u(this.groupNames),!1),u(E.channelGroups),!1),this.eventEmitter.addListener(this.listener,E.channels,E.channelGroups)},p.prototype.removeSubscriptionSet=function(E){var _=E.channels,R=E.channelGroups;this.channelNames=this.channelNames.filter(function(M){return!_.includes(M)}),this.groupNames=this.groupNames.filter(function(M){return!R.includes(M)}),this.subscriptionList=this.subscriptionList.filter(function(M){return!E.subscriptions.includes(M)}),this.eventEmitter.removeListener(this.listener,_,R)},Object.defineProperty(p.prototype,"subscriptions",{get:function(){return this.subscriptionList.slice(0)},enumerable:!1,configurable:!0}),p}(Xv),Xf=function(y){function p(E){var _=E.channels,R=E.channelGroups,M=E.subscriptionOptions,W=E.eventEmitter,J=E.pubnub,re=y.call(this)||this;return re.channelNames=[],re.groupNames=[],re.channelNames=_,re.groupNames=R,re.options=M,re.pubnub=J,re.eventEmitter=W,re.listener={},W.addListener(re.listener,re.channelNames.filter(function(oe){return!oe.endsWith("-pnpres")}
207),re.groupNames.filter(function(oe){return!oe.endsWith("-pnpres")})),re}return r(p,y),p.prototype.addSubscription=function(E){return new qg({channels:c(c([],u(this.channelNames),!1),u(E.channels),!1),channelGroups:c(c([],u(this.groupNames),!1),u(E.channelGroups),!1),subscriptionOptions:i(i({},this.options),E==null?void 0:E.options),eventEmitter:this.eventEmitter,pubnub:this.pubnub})},p}(Xv),za=function(){function y(p,E,_){this.name=p,this.eventEmitter=E,this.pubnub=_}return y.prototype.subscription=function(p){return new Xf({channels:p!=null&&p.receivePresenceEvents?[this.name,"".concat(this.name,"-pnpres")]:[this.name],channelGroups:[],subscriptionOptions:p,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},y}(),DT=function(){function y(p,E,_){this.name=p,this.eventEmitter=E,this.pubnub=_}return y.prototype.subscription=function(p){return new Xf({channels:[],channelGroups:p!=null&&p.receivePresenceEvents?[this.name,"".concat(this.name,"-pnpres")]:[this.name],subscriptionOptions:p,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},y}(),Go=function(){function y(p,E,_){this.id=p,this.eventEmitter=E,this.pubnub=_}return y.prototype.subscription=function(p){return new Xf({channels:[this.id],channelGroups:[],subscriptionOptions:p,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},y}(),Kg=function(){function y(p,E,_){this.id=p,this.eventEmitter=E,this.pubnub=_}return y.prototype.subscription=function(p){return new Xf({channels:[this.id],channelGroups:[],subscriptionOptions:p,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},y}(),Ob=function(){function y(p){var E=this,_=p.networking,R=p.cbor,M=new A({setup:p});this._config=M;var W=new C({config:M}),J=p.cryptography;_.init(M);var re=new fe(M,R);this._tokenManager=re;var oe=new ie({maximumSamplesCount:6e4});this._telemetryManager=oe;var he=this._config.cryptoModule,ee={config:M,networking:_,crypto:W,cryptography:J,tokenManager:re,telemetryManager:oe,PubNubFile:p.PubNubFile,cryptoModule:he};this.File=p.PubNubFile,this.encryptFile=function(Ie,Xe){return arguments.length==1&&typeof Ie!="string"&&ee.cryptoModule?(Xe=Ie,ee.cryptoModule.encryptFile(Xe,this.File)):J.encryptFile(Ie,Xe,this.File)},this.decryptFile=function(Ie,Xe){return arguments.length==1&&typeof Ie!="string"&&ee.cryptoModule?(Xe=Ie,ee.cryptoModule.decryptFile(Xe,this.File)):J.decryptFile(Ie,Xe,this.File)};var Pe=se.bind(this,ee,$e),Se=se.bind(this,ee,Tt),Ee=se.bind(this,ee,on),Ae=se.bind(this,ee,kr),Ce=se.bind(this,ee,$t),Ge=new ye;if(this._listenerManager=Ge,this.iAmHere=se.bind(this,ee,on),this.iAmAway=se.bind(this,ee,Tt),this.setPresenceState=se.bind(this,ee,kr),this.handshake=se.bind(this,ee,Zt),this.receiveMessages=se.bind(this,ee,fr),this._eventEmitter=new Ib({modules:ee,listenerManager:this._listenerManager,getFileUrl:function(Ie){return zt(ee,Ie)}}),M.enableEventEngine===!0){if(M.maintainPresenceState&&(this.presenceState={},this.setState=function(Ie){var Xe,He;return(Xe=Ie.channels)===null||Xe===void 0||Xe.forEach(function(bt){return E.presenceState[bt]=Ie.state}),(He=Ie.channelGroups)===null||He===void 0||He.forEach(function(bt){return E.presenceState[bt]=Ie.state}),E.setPresenceState({channels:Ie.channels,channelGroups:Ie.channelGroups,state:E.presenceState})}),M.getHeartbeatInterval()){var vt=new xb({heartbeat:this.iAmHere,leave:this.iAmAway,heartbeatDelay:function(){return new Promise(function(Ie){return setTimeout(Ie,1e3*ee.config.getHeartbeatInterval())})},retryDelay:function(Ie){return new Promise(function(Xe){return setTimeout(Xe,Ie)})},config:ee.config,presenceState:this.presenceState,emitStatus:function(Ie){Ge.announceStatus(Ie)}});this.presenceEventEngine=vt,this.join=this.presenceEventEngine.join.bind(vt),this.leave=this.presenceEventEngine.leave.bind(vt),this.leaveAll=this.presenceEventEngine.leaveAll.bind(vt)}var Ft=new fp({handshake:this.handshake,receiveMessages:this.receiveMessages,delay:function(Ie){return new Promise(function(Xe){return setTimeout(Xe,Ie)})},join:this.join,leave:this.leave,leaveAll:this.leaveAll,presenceState:this.presenceState,config:ee.config,emitMessages:function(Ie){var Xe,He;try{for(var bt=l(Ie),Ke=bt.next();!Ke.done;Ke=bt.next()){var nt=Ke.value;E._eventEmitter.emitEvent(nt)}}catch(xe){Xe={error:xe}}finally{try{Ke&&!Ke.done&&(He=bt.return)&&He.call(bt)}finally{if(Xe)throw Xe.error}}},emitStatus:function(Ie){Ge.announceStatus(Ie)}});this.subscribe=Ft.subscribe.bind(Ft),this.unsubscribe=Ft.unsubscribe.bind(Ft),this.unsubscribeAll=Ft.unsubscribeAll.bind(Ft),this.reconnect=Ft.reconnect.bind(Ft),this.disconnect=Ft.disconnect.bind(Ft),this.destroy=Ft.dispose.bind(Ft),this.get
207SubscribedChannels=Ft.getSubscribedChannels.bind(Ft),this.getSubscribedChannelGroups=Ft.getSubscribedChannelGroups.bind(Ft),this.eventEngine=Ft}else{var kt=new X({timeEndpoint:Pe,leaveEndpoint:Se,heartbeatEndpoint:Ee,setStateEndpoint:Ae,subscribeEndpoint:Ce,crypto:ee.crypto,config:ee.config,listenerManager:Ge,getFileUrl:function(Ie){return zt(ee,Ie)},cryptoModule:ee.cryptoModule,eventEmitter:this._eventEmitter});this.subscribe=kt.adaptSubscribeChange.bind(kt),this.unsubscribe=kt.adaptUnsubscribeChange.bind(kt),this.disconnect=kt.disconnect.bind(kt),this.reconnect=kt.reconnect.bind(kt),this.unsubscribeAll=kt.unsubscribeAll.bind(kt),this.getSubscribedChannels=kt.getSubscribedChannels.bind(kt),this.getSubscribedChannelGroups=kt.getSubscribedChannelGroups.bind(kt),this.setState=kt.adaptStateChange.bind(kt),this.presence=kt.adaptPresenceChange.bind(kt),this.destroy=function(Ie){kt.unsubscribeAll(Ie),kt.disconnect()}}this.addListener=this._eventEmitter.addListener.bind(this._eventEmitter),this.removeListener=this._eventEmitter.removeListener.bind(this._eventEmitter),this.removeAllListeners=this._eventEmitter.removeAllListeners.bind(this._eventEmitter),this.parseToken=re.parseToken.bind(re),this.setToken=re.setToken.bind(re),this.getToken=re.getToken.bind(re),this.channelGroups={listGroups:se.bind(this,ee,pt),listChannels:se.bind(this,ee,me),addChannels:se.bind(this,ee,Fe),removeChannels:se.bind(this,ee,ht),deleteGroup:se.bind(this,ee,Ct)},this.push={addChannels:se.bind(this,ee,De),removeChannels:se.bind(this,ee,Me),deleteDevice:se.bind(this,ee,ut),listChannels:se.bind(this,ee,qe)},this.hereNow=se.bind(this,ee,Ir),this.whereNow=se.bind(this,ee,jt),this.getState=se.bind(this,ee,wn),this.grant=se.bind(this,ee,$s),this.grantToken=se.bind(this,ee,op),this.audit=se.bind(this,ee,vu),this.revokeToken=se.bind(this,ee,Qu),this.publish=se.bind(this,ee,lp),this.fire=function(Ie,Xe){return Ie.replicate=!1,Ie.storeInHistory=!1,E.publish(Ie,Xe)},this.signal=se.bind(this,ee,Fg),this.history=se.bind(this,ee,zc),this.deleteMessages=se.bind(this,ee,yo),this.messageCounts=se.bind(this,ee,up),this.fetchMessages=se.bind(this,ee,An),this.addMessageAction=se.bind(this,ee,gi),this.removeMessageAction=se.bind(this,ee,Ln),this.getMessageActions=se.bind(this,ee,Ua),this.listFiles=se.bind(this,ee,Qe);var At=se.bind(this,ee,Ue);
207this.publishFile=se.bind(this,ee,Rt),this.sendFile=Ut({generateUploadUrl:At,publishFile:this.publishFile,modules:ee}),this.getFileUrl=function(Ie){return zt(ee,Ie)},this.downloadFile=se.bind(this,ee,Yt),this.deleteFile=se.bind(this,ee,vn),this.channel=function(Ie){return new za(Ie,E._eventEmitter,E)},this.channelGroup=function(Ie){return new DT(Ie,E._eventEmitter,E)},this.channelMetadata=function(Ie){return new Go(Ie,E._eventEmitter,E)},this.userMetadata=function(Ie){return new Kg(Ie,E._eventEmitter,E)},this.subscriptionSet=function(Ie){return new qg({channels:Ie.channels,channelGroups:Ie.channelGroups,subscriptionOptions:Ie.subscriptionOptions,eventEmitter:E._eventEmitter,pubnub:E})},this.objects={getAllUUIDMetadata:se.bind(this,ee,nn),getUUIDMetadata:se.bind(this,ee,fn),setUUIDMetadata:se.bind(this,ee,tn),removeUUIDMetadata:se.bind(this,ee,$n),getAllChannelMetadata:se.bind(this,ee,Hr),getChannelMetadata:se.bind(this,ee,dr),setChannelMetadata:se.bind(this,ee,jr),removeChannelMetadata:se.bind(this,ee,as),getChannelMembers:se.bind(this,ee,ci),setChannelMembers:function(Ie){for(var Xe=[],He=1;He<arguments.length;He++)Xe[He-1]=arguments[He];return se.call.apply(se,c([E,ee,yt,i({type:"set"},Ie)],u(Xe),!1))},removeChannelMembers:function(Ie){for(var Xe=[],He=1;He<arguments.length;He++)Xe[He-1]=arguments[He];return se.call.apply(se,c([E,ee,yt,i({type:"delete"},Ie)],u(Xe),!1))},getMemberships:se.bind(this,ee,_i),setMemberships:function(Ie){for(var Xe=[],He=1;He<arguments.length;He++)Xe[He-1]=arguments[He];return se.call.apply(se,c([E,ee,$i,i({type:"set"},Ie)],u(Xe),!1))},removeMemberships:function(Ie){for(var Xe=[],He=1;He<arguments.length;He++)Xe[He-1]=arguments[He];return se.call.apply(se,c([E,ee,$i,i({type:"delete"},Ie)],u(Xe),!1))}},this.createUser=function(Ie){return E.objects.setUUIDMetadata({uuid:Ie.userId,data:Ie.data,include:Ie.include})},this.updateUser=this.createUser,this.removeUser=function(Ie){return E.objects.removeUUIDMetadata({uuid:Ie==null?void 0:Ie.userId})},this.fetchUser=function(Ie){return E.objects.getUUIDMetadata({uuid:Ie==null?void 0:Ie.userId,include:Ie==null?void 0:Ie.include})},this.fetchUsers=this.objects.getAllUUIDMetadata,this.createSpace=function(Ie){return E.objects.setChannelMetadata({channel:Ie.spaceId,data:Ie.data,include:Ie.include})},this.updateSpace=this.createSpace,this.removeSpace=function(Ie){return E.objects.removeChannelMetadata({channel:Ie.spaceId})},this.fetchSpace=function(Ie){return E.objects.getChannelMetadata({channel:Ie.spaceId,include:Ie.include})},this.fetchSpaces=this.objects.getAllChannelMetadata,this.addMemberships=function(Ie){var Xe,He;return typeof Ie.spaceId=="string"?E.objects.setChannelMembers({channel:Ie.spaceId,uuids:(Xe=Ie.users)===null||Xe===void 0?void 0:Xe.map(function(bt){return typeof bt=="string"?bt:{id:bt.userId,custom:bt.custom,status:bt.status}}),limit:0}):E.objects.setMemberships({uuid:Ie.userId,channels:(He=Ie.spaces)===null||He===void 0?void 0:He.map(function(bt){return typeof bt=="string"?bt:{id:bt.spaceId,custom:bt.custom,status:bt.status}}),limit:0})},this.updateMemberships=this.addMemberships,this.removeMemberships=function(Ie){return typeof Ie.spaceId=="string"?E.objects.removeChannelMembers({channel:Ie.spaceId,uuids:Ie.userIds,limit:0}):E.objects.removeMemberships({uuid:Ie.userId,channels:Ie.spaceIds,limit:0})},this.fetchMemberships=function(Ie){return typeof Ie.spaceId=="string"?E.objects.getChannelMembers({channel:Ie.spaceId,filter:Ie.filter,limit:Ie.limit,page:Ie.page,include:{customFields:Ie.include.customFields,UUIDFields:Ie.include.userFields,customUUIDFields:Ie.include.customUserFields,statusField:Ie.include.statusField,UUIDStatusField:Ie.include.userStatusField,UUIDTypeField:Ie.include.userTypeField,totalCount:Ie.include.totalCount},sort:Ie.sort!=null?Object.fromEntries(Object.entries(Ie.sort).map(function(Xe){var He=u(Xe,2),bt=He[0],Ke=He[1];return[bt.replace("user","uuid"),Ke]})):null}).then(function(Xe){var He;return Xe.data=(He=Xe.data)===null||He===void 0?void 0:He.map(function(bt){return{user:bt.uuid,custom:bt.custom,updated:bt.updated,eTag:bt.eTag}}),Xe}):E.objects.getMemberships({uuid:Ie.userId,filter:Ie.filter,limit:Ie.limit,page:Ie.page,include:{customFields:Ie.include.customFields,channelFields:Ie.include.spaceFields,customChannelFields:Ie.include.customSpaceFields,statusField:Ie.include.statusField,channelStatusField:Ie.include.spaceStatusField,channelTypeField:Ie.include.spaceTypeField,totalCount:Ie.include.totalCount}
207,sort:Ie.sort!=null?Object.fromEntries(Object.entries(Ie.sort).map(function(Xe){var He=u(Xe,2),bt=He[0],Ke=He[1];return[bt.replace("space","channel"),Ke]})):null}).then(function(Xe){var He;return Xe.data=(He=Xe.data)===null||He===void 0?void 0:He.map(function(bt){return{space:bt.channel,custom:bt.custom,updated:bt.updated,eTag:bt.eTag}}),Xe})},this.time=Pe,this.stop=this.destroy,this.encrypt=function(Ie,Xe){if(Xe===void 0&&ee.cryptoModule){var He=ee.cryptoModule.encrypt(Ie);return typeof He=="string"?He:x(He)}return W.encrypt(Ie,Xe)},this.decrypt=function(Ie,Xe){if(Xe===void 0&&he){var He=ee.cryptoModule.decrypt(Ie);return He instanceof ArrayBuffer?JSON.parse(new TextDecoder().decode(He)):He}return W.decrypt(Ie,Xe)},this.getAuthKey=ee.config.getAuthKey.bind(ee.config),this.setAuthKey=ee.config.setAuthKey.bind(ee.config),this.getUUID=ee.config.getUUID.bind(ee.config),this.setUUID=ee.config.setUUID.bind(ee.config),this.getUserId=ee.config.getUserId.bind(ee.config),this.setUserId=ee.config.setUserId.bind(ee.config),this.getFilterExpression=ee.config.getFilterExpression.bind(ee.config),this.setFilterExpression=ee.config.setFilterExpression.bind(ee.config),this.setCipherKey=function(Ie){return ee.config.setCipherKey(Ie,p,ee)},this.setHeartbeatInterval=ee.config.setHeartbeatInterval.bind(ee.config),_.hasModule("proxy")&&(this.setProxy=function(Ie){ee.config.setProxy(Ie),E.reconnect()})}return y.prototype.getVersion=function(){return this._config.getVersion()},y.prototype._addPnsdkSuffix=function(p,E){this._config._addPnsdkSuffix(p,E)},y.prototype.networkDownDetected=function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)},y.prototype.networkUpDetected=function(){this._listenerManager.announceNetworkUp(),this.reconnect()},y.notificationPayload=function(p,E){return new le(p,E)},y.generateUUID=function(){return S()},y.OPERATIONS=G,y.CATEGORIES=j,y.LinearRetryPolicy=Qv.LinearRetryPolicy,y.ExponentialRetryPolicy=Qv.ExponentialRetryPolicy,y}(),Fl=function(){function y(p){var E=this;this._modules={},Object.keys(p).forEach(function(_){E._modules[_]=p[_].bind(E)})}return y.prototype.init=function(p){this._config=p,Array.isArray(this._config.origin)?this._currentSubDomain=Math.floor(Math.random()*this._config.origin.length):this._currentSubDomain=0,this._coreParams={},this.shiftStandardOrigin()},y.prototype.nextOrigin=function(){var p=this._config.secure?"https://":"http://";if(typeof this._config.origin=="string")return"".concat(p).concat(this._config.origin);this._currentSubDomain+=1,this._currentSubDomain>=this._config.origin.length&&(this._currentSubDomain=0);var E=this._config.origin[this._currentSubDomain];return"".concat(p).concat(E)},y.prototype.hasModule=function(p){return p in this._modules},y.prototype.shiftStandardOrigin=function(){return this._standardOrigin=this.nextOrigin(),this._standardOrigin},y.prototype.getStandardOrigin=function(){return this._standardOrigin},y.prototype.POSTFILE=function(p,E,_){return this._modules.postfile(p,E,_)},y.prototype.GETFILE=function(p,E,_){return this._modules.getfile(p,E,_)},y.prototype.POST=function(p,E,_,R){return this._modules.post(p,E,_,R)},y.prototype.PATCH=function(p,E,_,R){return this._modules.patch(p,E,_,R)},y.prototype.GET=function(p,E,_){return this._modules.get(p,E,_)},y.prototype.DELETE=function(p,E,_){return this._modules.del(p,E,_)},y.prototype._detectErrorCategory=function(p){if(p.code==="ENOTFOUND"||p.code==="ECONNREFUSED"||p.code==="ECONNRESET"||p.code==="EAI_AGAIN"||p.status===0||p.hasOwnProperty("status")&&p.status===void 0)return j.PNNetworkIssuesCategory;if(p.timeout)return j.PNTimeoutCategory;if(p.code==="ETIMEDOUT")return j.PNNetworkIssuesCategory;if(p.response){if(p.response.badRequest)return j.PNBadRequestCategory;if(p.response.forbidden)return j.PNAccessDeniedCategory}return j.PNUnknownCategory},y}();function gp(y){var p=function(_){return _&&typeof _=="object"&&_.constructor===Object};if(!p(y))return y;var E={};return Object.keys(y).forEach(function(_){var R=function(J){return typeof J=="string"||J instanceof String}(_),M=_,W=y[_];Array.isArray(_)||R&&_.indexOf(",")>=0?M=(R?_.split(","):_).reduce(function(J,re){return J+=String.fromCharCode(re)},""):(function(J){return typeof J=="number"&&isFinite(J)}(_)||R&&!isNaN(_))&&(M=String.fromCharCode(R?parseInt(_,10):10)),E[M]=p(W)?gp(W):W}),E}var Jv=function(){function y(p,E){this._base64ToBinary=E,this._decode=p}return y.prototype.decodeToken=function(p){var E="";p.length%4==3?E="=":p.length%4==2&&(E="==");var _=p.replace(/-/gi,"+").replace(/_/gi,"/")+E,R=this._decode(this._base64ToBinary(_));if(typeof R=="object")return R},y}
207(),vi={exports:{}},$l={exports:{}};(function(y){function p(E){if(E)return function(_){for(var R in p.prototype)_[R]=p.prototype[R];return _}(E)}y.exports=p,p.prototype.on=p.prototype.addEventListener=function(E,_){return this._callbacks=this._callbacks||{},(this._callbacks["$"+E]=this._callbacks["$"+E]||[]).push(_),this},p.prototype.once=function(E,_){function R(){this.off(E,R),_.apply(this,arguments)}return R.fn=_,this.on(E,R),this},p.prototype.off=p.prototype.removeListener=p.prototype.removeAllListeners=p.prototype.removeEventListener=function(E,_){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var R,M=this._callbacks["$"+E];if(!M)return this;if(arguments.length==1)return delete this._callbacks["$"+E],this;for(var W=0;W<M.length;W++)if((R=M[W])===_||R.fn===_){M.splice(W,1);break}return M.length===0&&delete this._callbacks["$"+E],this},p.prototype.emit=function(E){this._callbacks=this._callbacks||{};for(var _=new Array(arguments.length-1),R=this._callbacks["$"+E],M=1;M<arguments.length;M++)_[M-1]=arguments[M];if(R){M=0;for(var W=(R=R.slice(0)).length;M<W;++M)R[M].apply(this,_)}return this},p.prototype.listeners=function(E){return this._callbacks=this._callbacks||{},this._callbacks["$"+E]||[]},p.prototype.hasListeners=function(E){return!!this.listeners(E).length}})($l);var ey=qc;qc.default=qc,qc.stable=ds,qc.stableStringify=ds;var mp="[...]",vp="[Circular]",Vd=[],Vs=[];function Pb(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function qc(y,p,E,_){var R;_===void 0&&(_=Pb()),ir(y,"",0,[],void 0,0,_);try{R=Vs.length===0?JSON.stringify(y,p,E):JSON.stringify(y,Hd(p),E)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Vd.length!==0;){var M=Vd.pop();M.length===4?Object.defineProperty(M[0],M[1],M[3]):M[0][M[1]]=M[2]}}return R}function zr(y,p,E,_){var R=Object.getOwnPropertyDescriptor(_,E);R.get!==void 0?R.configurable?(Object.defineProperty(_,E,{value:y}),Vd.push([_,E,p,R])):Vs.push([p,E,y]):(_[E]=y,Vd.push([_,E,p]))}function ir(y,p,E,_,R,M,W){var J;if(M+=1,typeof y=="object"&&y!==null){for(J=0;J<_.length;J++)if(_[J]===y)return void zr(vp,y,p,R);if(W.depthLimit!==void 0&&M>W.depthLimit||W.edgesLimit!==void 0&&E+1>W.edgesLimit)return void zr(mp,y,p,R);if(_.push(y),Array.isArray(y))for(J=0;J<y.length;J++)ir(y[J],J,J,_,y,M,W);else{var re=Object.keys(y);for(J=0;J<re.length;J++){var oe=re[J];ir(y[oe],oe,J,_,y,M,W)}}_.pop()}}function Ju(y,p){return y<p?-1:y>p?1:0}function ds(y,p,E,_){_===void 0&&(_=Pb());var R,M=yp(y,"",0,[],void 0,0,_)||y;try{R=Vs.length===0?JSON.stringify(M,p,E):JSON.stringify(M,Hd(p),E)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Vd.length!==0;){var W=Vd.pop();W.length===4?Object.defineProperty(W[0],W[1],W[3]):W[0][W[1]]=W[2]}}return R}function yp(y,p,E,_,R,M,W){var J;if(M+=1,typeof y=="object"&&y!==null){for(J=0;J<_.length;J++)if(_[J]===y)return void zr(vp,y,p,R);try{if(typeof y.toJSON=="function")return}catch{return}if(W.depthLimit!==void 0&&M>W.depthLimit||W.edgesLimit!==void 0&&E+1>W.edgesLimit)return void zr(mp,y,p,R);if(_.push(y),Array.isArray(y))for(J=0;J<y.length;J++)yp(y[J],J,J,_,y,M,W);else{var re={},oe=Object.keys(y).sort(Ju);for(J=0;J<oe.length;J++){var he=oe[J];yp(y[he],he,J,_,y,M,W),re[he]=y[he]}if(R===void 0)return re;Vd.push([R,p,y]),R[p]=re}_.pop()}}function Hd(y){return y=y!==void 0?y:function(p,E){return E},function(p,E){if(Vs.length>0)for(var _=0;_<Vs.length;_++){var R=Vs[_];if(R[1]===p&&R[0]===E){E=R[2],Vs.splice(_,1);break}}return y.call(this,p,E)}}var yr,bp=typeof Symbol<"u"&&Symbol,Rb=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var y={},p=Symbol("test"),E=Object(p);if(typeof p=="string"||Object.prototype.toString.call(p)!=="[object Symbol]"||Object.prototype.toString.call(E)!=="[object Symbol]")return!1;for(p in y[p]=42,y)return!1;if(typeof Object.keys=="function"&&Object.keys(y).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(y).length!==0)return!1;var _=Object.getOwnPropertySymbols(y);if(_.length!==1||_[0]!==p||!Object.prototype.propertyIsEnumerable.call(y,p))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var R=Object.getOwnPropertyDescriptor(y,p);if(R.value!==42||R.enumerable!==!0)return!1}return!0},D="Function.prototype.bind called on incompatible ",F=Array.prototype.slice,
207K=Object.prototype.toString,pe="[object Function]",Te=function(y){var p=this;if(typeof p!="function"||K.call(p)!==pe)throw new TypeError(D+p);for(var E,_=F.call(arguments,1),R=function(){if(this instanceof E){var oe=p.apply(this,_.concat(F.call(arguments)));return Object(oe)===oe?oe:this}return p.apply(y,_.concat(F.call(arguments)))},M=Math.max(0,p.length-_.length),W=[],J=0;J<M;J++)W.push("$"+J);if(E=Function("binder","return function ("+W.join(",")+"){ return binder.apply(this,arguments); }")(R),p.prototype){var re=function(){};re.prototype=p.prototype,E.prototype=new re,re.prototype=null}return E},tt=Function.prototype.bind||Te,Qt=tt.call(Function.call,Object.prototype.hasOwnProperty),Dt=SyntaxError,ct=Function,Jn=TypeError,qt=function(y){try{return ct('"use strict"; return ('+y+").constructor;")()}catch{}},Cn=Object.getOwnPropertyDescriptor;if(Cn)try{Cn({},"")}catch{Cn=null}var Hn=function(){throw new Jn},Kc=Cn?function(){try{return Hn}catch{try{return Cn(arguments,"callee").get}catch{return Hn}}}():Hn,un=typeof bp=="function"&&typeof Symbol=="function"&&typeof bp("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&Rb(),kn=Object.getPrototypeOf||function(y){return y.__proto__},Hs={},ea=typeof Uint8Array>"u"?yr:kn(Uint8Array),Ga={"%AggregateError%":typeof AggregateError>"u"?yr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?yr:ArrayBuffer,"%ArrayIteratorPrototype%":un?kn([][Symbol.iterator]()):yr,"%AsyncFromSyncIteratorPrototype%":yr,"%AsyncFunction%":Hs,"%AsyncGenerator%":Hs,"%AsyncGeneratorFunction%":Hs,"%AsyncIteratorPrototype%":Hs,"%Atomics%":typeof Atomics>"u"?yr:Atomics,"%BigInt%":typeof BigInt>"u"?yr:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?yr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?yr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?yr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?yr:FinalizationRegistry,"%Function%":ct,"%GeneratorFunction%":Hs,"%Int8Array%":typeof Int8Array>"u"?yr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?yr:Int16Array,"%Int32Array%":typeof Int32Array>
207"u"?yr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":un?kn(kn([][Symbol.iterator]())):yr,"%JSON%":typeof JSON=="object"?JSON:yr,"%Map%":typeof Map>"u"?yr:Map,"%MapIteratorPrototype%":typeof Map<"u"&&un?kn(new Map()[Symbol.iterator]()):yr,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?yr:Promise,"%Proxy%":typeof Proxy>"u"?yr:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?yr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?yr:Set,"%SetIteratorPrototype%":typeof Set<"u"&&un?kn(new Set()[Symbol.iterator]()):yr,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?yr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":un?kn(""[Symbol.iterator]()):yr,"%Symbol%":un?Symbol:yr,"%SyntaxError%":Dt,"%ThrowTypeError%":Kc,"%TypedArray%":ea,"%TypeError%":Jn,"%Uint8Array%":typeof Uint8Array>"u"?yr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?yr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?yr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?yr:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?yr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?yr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?yr:WeakSet},ec=function y(p){var E;if(p==="%AsyncFunction%")E=qt("async function () {}");else if(p==="%GeneratorFunction%")E=qt("function* () {}");else if(p==="%AsyncGeneratorFunction%")E=qt("async function* () {}");else if(p==="%AsyncGenerator%"){var _=y("%AsyncGeneratorFunction%");_&&(E=_.prototype)}else if(p==="%AsyncIteratorPrototype%"){var R=y("%AsyncGenerator%");R&&(E=kn(R.prototype))}return Ga[p]=E,E},ty={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Lb=tt,Db=Qt,NN=Lb.call(Function.call,Array.prototype.concat),Yg=Lb.call(Function.apply,Array.prototype.splice),Su=Lb.call(Function.call,String.prototype.replace),ny=Lb.call(Function.call,String.prototype.slice),MN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,FN=/\\(\\)?/g,$N=function(y){var p=ny(y,0,1),E=ny(y,-1);if(p==="%"&&E!=="%")throw new Dt("invalid intrinsic syntax, expected closing `%`");if(E==="%"&&p!=="%")throw new Dt("invalid intrinsic syntax, expected opening `%`");var _=[];return Su(y,MN,function(R,M,W,J){_[_.length]=W?Su(J,FN,"$1"):M||R}),_},BN=function(y,p){var E,_=y;if(Db(ty,_)&&(_="%"+(E=ty[_])[0]+"%"),Db(Ga,_)){var R=Ga[_];if(R===Hs&&(R=ec(_)),R===void 0&&!p)throw new Jn("intrinsic "+y+" exists, but is not available. Please file an issue!");return{alias:E,name:_,value:R}}throw new Dt("intrinsic "+y+" does not exist!")}
207,kT=function(y,p){if(typeof y!="string"||y.length===0)throw new Jn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof p!="boolean")throw new Jn('"allowMissing" argument must be a boolean');var E=$N(y),_=E.length>0?E[0]:"",R=BN("%"+_+"%",p),M=R.name,W=R.value,J=!1,re=R.alias;re&&(_=re[0],Yg(E,NN([0,1],re)));for(var oe=1,he=!0;oe<E.length;oe+=1){var ee=E[oe],Pe=ny(ee,0,1),Se=ny(ee,-1);if((Pe==='"'||Pe==="'"||Pe==="`"||Se==='"'||Se==="'"||Se==="`")&&Pe!==Se)throw new Dt("property names with quotes must have matching quotes");if(ee!=="constructor"&&he||(J=!0),Db(Ga,M="%"+(_+="."+ee)+"%"))W=Ga[M];else if(W!=null){if(!(ee in W)){if(!p)throw new Jn("base intrinsic for "+y+" exists, but the property is not available.");return}if(Cn&&oe+1>=E.length){var Ee=Cn(W,ee);W=(he=!!Ee)&&"get"in Ee&&!("originalValue"in Ee.get)?Ee.get:W[ee]}else he=Db(W,ee),W=W[ee];he&&!J&&(Ga[M]=W)}}return W},Sp={exports:{}};(function(y){var p=tt,E=kT,_=E("%Function.prototype.apply%"),R=E("%Function.prototype.call%"),M=E("%Reflect.apply%",!0)||p.call(R,_),W=E("%Object.getOwnPropertyDescriptor%",!0),J=E("%Object.defineProperty%",!0),re=E("%Math.max%");if(J)try{J({},"a",{value:1})}catch{J=null}y.exports=function(he){var ee=M(p,R,arguments);if(W&&J){var Pe=W(ee,"length");Pe.configurable&&J(ee,"length",{value:1+re(0,he.length-(arguments.length-1))})}return ee};var oe=function(){return M(p,_,arguments)};J?J(y.exports,"apply",{value:oe}):y.exports.apply=oe})(Sp);var ze=kT,St=Sp.exports,dt=St(ze("String.prototype.indexOf")),mn=f(Object.freeze({__proto__:null,default:{}})),er=typeof Map=="function"&&Map.prototype,Zr=Object.getOwnPropertyDescriptor&&er?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,js=er&&Zr&&typeof Zr.get=="function"?Zr.get:null,Li=er&&Map.prototype.forEach,ry=typeof Set=="function"&&Set.prototype,NT=Object.getOwnPropertyDescriptor&&ry?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wo=ry&&NT&&typeof NT.get=="function"?NT.get:null,iy=ry&&Set.prototype.forEach,sy=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,Yc=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,ay=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,kb=Boolean.prototype.valueOf,Ci=Object.prototype.toString,UN=Function.prototype.toString,Nx=String.prototype.match,Zg=String.prototype.slice,Jf=String.prototype.replace,VN=String.prototype.toUpperCase,Mx=String.prototype.toLowerCase,oy=RegExp.prototype.test,jd=Array.prototype.concat,Bl=Array.prototype.join,Fx=Array.prototype.slice,ly=Math.floor,Nb=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Mb=Object.getOwnPropertySymbols,Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ep=typeof Symbol=="function"&&typeof Symbol.iterator=="object",pa=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ep||!0)?Symbol.toStringTag:null,eh=Object.prototype.propertyIsEnumerable,uy=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(y){return y.__proto__}:null);function $x(y,p){if(y===1/0||y===-1/0||y!=y||y&&y>-1e3&&y<1e3||oy.call(/e/,p))return p;var E=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof y=="number"){var _=y<0?-ly(-y):ly(y);if(_!==y){var R=String(_),M=Zg.call(p,R.length+1);return Jf.call(R,E,"$&_")+"."+Jf.call(Jf.call(M,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Jf.call(p,E,"$&_")}var MT=mn,Bx=MT.custom,cy=Ux(Bx)?Bx:null;function dy(y,p,E){var _=(E.quoteStyle||p)==="double"?'"':"'";return _+y+_}function FT(y){return Jf.call(String(y),/"/g,"&quot;")}function $T(y){return!(xs(y)!=="[object Array]"||pa&&typeof y=="object"&&pa in y)}function BT(y){return!(xs(y)!=="[object RegExp]"||pa&&typeof y=="object"&&pa in y)}function Ux(y){if(Ep)return y&&typeof y=="object"&&y instanceof Symbol;if(typeof y=="symbol")return!0;if(!y||typeof y!="object"||!Qg)return!1;try{return Qg.call(y),!0}catch{}return!1}var HN=Object.prototype.hasOwnProperty||function(y){return y in this};function Yi(y,p){return HN.call(y,p)}function xs(y){return Ci.call(y)}function Vx(y,p){if(y.indexOf)return y.indexOf(p);for(var E=0,_=y.length;E<_;E++)if(y[E]===p)return E;return-1}function Hx(y,p){if(y.length>p.maxStringLength){var E=y.length-p.maxStringLength,_="... "+E+" more character"+(E>1?"s":"");return Hx(Zg.call(y,0,p.maxStringLength),p)+_}return dy(Jf.call(Jf.call(y,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jx),"single",p)}function jx(y){var p=y.charCodeAt(0),E={8:"b",9:"t",10:"n",12:"f",13:"r"}[p];return E?"\\"+E:"\\x"+(p<16?"0":"")+VN.call(p.toString(16))}function fy(y){return"Object("+y+")"}function hy(y){return y+" { ? }"}function Xg(y,p,E,_){return y+" ("+p+") {"+(_?py(E,_):Bl.call(E,", "))+"}"}function py(y,p){if(y.length===0)return"";var E=`
208`+p.prev+p.base;return E+Bl.call(y,","+E)+`
209`+p.prev}function zd(y,p){var E=$T(y),_=[];
209if(E){_.length=y.length;for(var R=0;R<y.length;R++)_[R]=Yi(y,R)?p(y[R],y):""}var M,W=typeof Mb=="function"?Mb(y):[];if(Ep){M={};for(var J=0;J<W.length;J++)M["$"+W[J]]=W[J]}for(var re in y)Yi(y,re)&&(E&&String(Number(re))===re&&re<y.length||Ep&&M["$"+re]instanceof Symbol||(oy.call(/[^\w$]/,re)?_.push(p(re,y)+": "+p(y[re],y)):_.push(re+": "+p(y[re],y))));if(typeof Mb=="function")for(var oe=0;oe<W.length;oe++)eh.call(y,W[oe])&&_.push("["+p(W[oe])+"]: "+p(y[W[oe]],y));return _}var Tp=kT,Zc=function(y,p){var E=ze(y,!0);return typeof E=="function"&&dt(y,".prototype.")>-1?St(E):E},Fb=function y(p,E,_,R){var M=E||{};if(Yi(M,"quoteStyle")&&M.quoteStyle!=="single"&&M.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Yi(M,"maxStringLength")&&(typeof M.maxStringLength=="number"?M.maxStringLength<0&&M.maxStringLength!==1/0:M.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var W=!Yi(M,"customInspect")||M.customInspect;if(typeof W!="boolean"&&W!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Yi(M,"indent")&&M.indent!==null&&M.indent!=="	"&&!(parseInt(M.indent,10)===M.indent&&M.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Yi(M,"numericSeparator")&&typeof M.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var J=M.numericSeparator;if(p===void 0)return"undefined";if(p===null)return"null";if(typeof p=="boolean")return p?"true":"false";if(typeof p=="string")return Hx(p,M);if(typeof p=="number"){if(p===0)return 1/0/p>0?"0":"-0";var re=String(p);return J?$x(p,re):re}if(typeof p=="bigint"){var oe=String(p)+"n";return J?$x(p,oe):oe}var he=M.depth===void 0?5:M.depth;if(_===void 0&&(_=0),_>=he&&he>0&&typeof p=="object")return $T(p)?"[Array]":"[Object]";var ee=function(xe,It){var Je;if(xe.indent==="	")Je="	";else{if(!(typeof xe.indent=="number"&&xe.indent>0))return null;Je=Bl.call(Array(xe.indent+1)," ")}return{base:Je,prev:Bl.call(Array(It+1),Je)}}(M,_);if(R===void 0)R=[];else if(Vx(R,p)>=0)return"[Circular]";function Pe(xe,It,Je){if(It&&(R=Fx.call(R)).push(It),Je){var ft={depth:M.depth};return Yi(M,"quoteStyle")&&(ft.quoteStyle=M.quoteStyle),y(xe,ft,_+1,R)}return y(xe,M,_+1,R)}if(typeof p=="function"&&!BT(p)){var Se=function(xe){if(xe.name)return xe.name;var It=Nx.call(UN.call(xe),/^function\s*([\w$]+)/);return It?It[1]:null}(p),Ee=zd(p,Pe);return"[Function"+(Se?": "+Se:" (anonymous)")+"]"+(Ee.length>0?" { "+Bl.call(Ee,", ")+" }":"")}if(Ux(p)){var Ae=Ep?Jf.call(String(p),/^(Symbol\(.*\))_[^)]*$/,"$1"):Qg.call(p);return typeof p!="object"||Ep?Ae:fy(Ae)}if(function(xe){return!xe||typeof xe!="object"?!1:typeof HTMLElement<"u"&&xe instanceof HTMLElement?!0:typeof xe.nodeName=="string"&&typeof xe.getAttribute=="function"}(p)){for(var Ce="<"+Mx.call(String(p.nodeName)),Ge=p.attributes||[],vt=0;vt<Ge.length;vt++)Ce+=" "+Ge[vt].name+"="+dy(FT(Ge[vt].value),"double",M);return Ce+=">",p.childNodes&&p.childNodes.length&&(Ce+="..."),Ce+="</"+Mx.call(String(p.nodeName))+">"}if($T(p)){if(p.length===0)return"[]";var Ft=zd(p,Pe);return ee&&!function(xe){for(var It=0;It<xe.length;It++)if(Vx(xe[It],`
210`)>=0)return!1;return!0}(Ft)?"["+py(Ft,ee)+"]":"[ "+Bl.call(Ft,", ")+" ]"}if(function(xe){return!(xs(xe)!=="[object Error]"||pa&&typeof xe=="object"&&pa in xe)}(p)){var kt=zd(p,Pe);return"cause"in Error.prototype||!("cause"in p)||eh.call(p,"cause")?kt.length===0?"["+String(p)+"]":"{ ["+String(p)+"] "+Bl.call(kt,", ")+" }":"{ ["+String(p)+"] "+Bl.call(jd.call("[cause]: "+Pe(p.cause),kt),", ")+" }"}if(typeof p=="object"&&W){if(cy&&typeof p[cy]=="function"&&MT)return MT(p,{depth:he-_});if(W!=="symbol"&&typeof p.inspect=="function")return p.inspect()}if(function(xe){if(!js||!xe||typeof xe!="object")return!1;try{js.call(xe);try{Wo.call(xe)}catch{return!0}return xe instanceof Map}catch{}return!1}(p)){var At=[];return Li&&Li.call(p,function(xe,It){At.push(Pe(It,p,!0)+" => "+Pe(xe,p))}),Xg("Map",js.call(p),At,ee)}if(function(xe){if(!Wo||!xe||typeof xe!="object")return!1;try{Wo.call(xe);try{js.call(xe)}catch{return!0}return xe instanceof Set}catch{}return!1}(p)){var Ie=[];return iy&&iy.call(p,function(xe){Ie.push(Pe(xe,p))}),Xg("Set",Wo.call(p),Ie,ee)}if(function(xe){if(!sy||!xe||typeof xe!="object")return!1;try{sy.call(xe,sy);try{Yc.call(xe,Yc)}catch{return!0}return xe instanceof WeakMap}catch{}return!1}(p))return hy("WeakMap");if(function(xe){if(!Yc||!xe||typeof xe!="object")return!1;try{Yc.call(xe,Yc);try{sy.call(xe,sy)}catch{return!0}return xe instanceof WeakSet}catch{}return!1}(p))return hy("WeakSet");if(function(xe){if(!ay||!xe||typeof xe!="object")return!1;try{return ay.call(xe),!0}catch{}return!1}(p))return hy("WeakRef");if(function(xe){return!(xs(xe)!=="[object Number]"||pa&&typeof xe=="object"&&pa in xe)}(p))return fy(Pe(Number(p)));if(function(xe){if(!xe||typeof xe!="object"||!Nb)return!1;try{return Nb.call(xe),!0}catch{}return!1}(p))return fy(Pe(Nb.call(p)));if(function(xe){return!(xs(xe)!=="[object Boolean]"||pa&&typeof xe=="object"&&pa in xe)}(p))return fy(kb.call(p));if(function(xe){return!(xs(xe)!=="[object String]"||pa&&typeof xe=="object"&&pa in xe)}(p))return fy(Pe(String(p)));if(typeof window<"u"&&p===window)return"{ [object Window] }";if(p===d)return"{ [object globalThis] }";if(!function(xe){return!(xs(xe)!=="[object Date]"||pa&&typeof xe=="object"&&pa in xe)}(p)&&!BT(p)){var Xe=zd(p,Pe),He=uy?uy(p)===Object.prototype:p instanceof Object||p.constructor===Object,bt=p instanceof Object?"":"null prototype",Ke=!He&&pa&&Object(p)===p&&pa in p?Zg.call(xs(p),8,-1):bt?"Object":"",nt=(
210He||typeof p.constructor!="function"?"":p.constructor.name?p.constructor.name+" ":"")+(Ke||bt?"["+Bl.call(jd.call([],Ke||[],bt||[]),": ")+"] ":"");return Xe.length===0?nt+"{}":ee?nt+"{"+py(Xe,ee)+"}":nt+"{ "+Bl.call(Xe,", ")+" }"}return String(p)},Jg=Tp("%TypeError%"),$b=Tp("%WeakMap%",!0),Bb=Tp("%Map%",!0),jN=Zc("WeakMap.prototype.get"),zN=Zc("WeakMap.prototype.set"),GN=Zc("WeakMap.prototype.has"),Ub=Zc("Map.prototype.get"),gy=Zc("Map.prototype.set"),zx=Zc("Map.prototype.has"),ce=function(y,p){for(var E,_=y;(E=_.next)!==null;_=E)if(E.key===p)return _.next=E.next,E.next=y.next,y.next=E,E},em=String.prototype.replace,Vb=/%20/g,Eu="RFC3986",Or={default:Eu,formatters:{RFC1738:function(y){return em.call(y,Vb,"+")},RFC3986:function(y){return String(y)}},RFC1738:"RFC1738"},WN=Or,UT=Object.prototype.hasOwnProperty,Ap=Array.isArray,Eo=function(){for(var y=[],p=0;p<256;++p)y.push("%"+((p<16?"0":"")+p.toString(16)).toUpperCase());return y}(),Gx=function(y,p){for(var E=p&&p.plainObjects?Object.create(null):{},_=0;_<y.length;++_)y[_]!==void 0&&(E[_]=y[_]);return E},qN={arrayToObject:Gx,assign:function(y,p){return Object.keys(p).reduce(function(E,_){return E[_]=p[_],E},y)},combine:function(y,p){return[].concat(y,p)},compact:function(y){for(var p=[{obj:{o:y},prop:"o"}],E=[],_=0;_<p.length;++_)for(var R=p[_],M=R.obj[R.prop],W=Object.keys(M),J=0;J<W.length;++J){var re=W[J],oe=M[re];typeof oe=="object"&&oe!==null&&E.indexOf(oe)===-1&&(p.push({obj:M,prop:re}),E.push(oe))}return function(he){for(;he.length>1;){var ee=he.pop(),Pe=ee.obj[ee.prop];if(Ap(Pe)){for(var Se=[],Ee=0;Ee<Pe.length;++Ee)Pe[Ee]!==void 0&&Se.push(Pe[Ee]);ee.obj[ee.prop]=Se}}}(p),y},decode:function(y,p,E){var _=y.replace(/\+/g," ");if(E==="iso-8859-1")return _.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(_)}catch{return _}},encode:function(y,p,E,_,R){if(y.length===0)return y;var M=y;if(typeof y=="symbol"?M=Symbol.prototype.toString.call(y):typeof y!="string"&&(M=String(y)),E==="iso-8859-1")return escape(M).replace(/%u[0-9a-f]{4}/gi,function(oe){return"%26%23"+parseInt(oe.slice(2),16)+"%3B"});for(var W="",J=0;J<M.length;++J){var re=M.charCodeAt(J);re===45||re===46||re===95||re===126||re>=48&&re<=57||re>=65&&re<=90||re>=97&&re<=122||R===WN.RFC1738&&(re===40||re===41)?W+=M.charAt(J):re<128?W+=Eo[re]:re<2048?W+=Eo[192|re>>6]+Eo[128|63&re]:re<55296||re>=57344?W+=Eo[224|re>>12]+Eo[128|re>>6&63]+Eo[128|63&re]:(J+=1,re=65536+((1023&re)<<10|1023&M.charCodeAt(J)),W+=Eo[240|re>>18]+Eo[128|re>>12&63]+Eo[128|re>>6&63]+Eo[128|63&re])}return W},isBuffer:function(y){return!(!y||typeof y!="object")&&!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},isRegExp:function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},maybeMap:function(y,p){if(Ap(y)){for(var E=[],_=0;_<y.length;_+=1)E.push(p(y[_]));return E}return p(y)},merge:function y(p,E,_){if(!E)return p;if(typeof E!="object"){if(Ap(p))p.push(E);else{if(!p||typeof p!="object")return[p,E];(_&&(_.plainObjects||_.allowPrototypes)||!UT.call(Object.prototype,E))&&(p[E]=!0)}return p}
210if(!p||typeof p!="object")return[p].concat(E);var R=p;return Ap(p)&&!Ap(E)&&(R=Gx(p,_)),Ap(p)&&Ap(E)?(E.forEach(function(M,W){if(UT.call(p,W)){var J=p[W];J&&typeof J=="object"&&M&&typeof M=="object"?p[W]=y(J,M,_):p.push(M)}else p[W]=M}),p):Object.keys(E).reduce(function(M,W){var J=E[W];return UT.call(M,W)?M[W]=y(M[W],J,_):M[W]=J,M},R)}},Wx=function(){var y,p,E,_={assert:function(R){if(!_.has(R))throw new Jg("Side channel does not contain "+Fb(R))},get:function(R){if($b&&R&&(typeof R=="object"||typeof R=="function")){if(y)return jN(y,R)}else if(Bb){if(p)return Ub(p,R)}else if(E)return function(M,W){var J=ce(M,W);return J&&J.value}(E,R)},has:function(R){if($b&&R&&(typeof R=="object"||typeof R=="function")){if(y)return GN(y,R)}else if(Bb){if(p)return zx(p,R)}else if(E)return function(M,W){return!!ce(M,W)}(E,R);return!1},set:function(R,M){$b&&R&&(typeof R=="object"||typeof R=="function")?(y||(y=new $b),zN(y,R,M)):Bb?(p||(p=new Bb),gy(p,R,M)):(E||(E={key:{},next:null}),function(W,J,re){var oe=ce(W,J);oe?oe.value=re:W.next={key:J,next:W.next,value:re}}(E,R,M))}};return _},Hb=qN,my=Or,Gd=Object.prototype.hasOwnProperty,qx={brackets:function(y){return y+"[]"},comma:"comma",indices:function(y,p){return y+"["+p+"]"},repeat:function(y){return y}},Wd=Array.isArray,KN=Array.prototype.push,Kx=function(y,p){KN.apply(y,Wd(p)?p:[p])},YN=Date.prototype.toISOString,Qc=my.default,To={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Hb.encode,encodeValuesOnly:!1,format:Qc,formatter:my.formatters[Qc],indices:!1,serializeDate:function(y){return YN.call(y)},skipNulls:!1,strictNullHandling:!1},VT={},ZN=function y(p,E,_,R,M,W,J,re,oe,he,ee,Pe,Se,Ee,Ae,Ce){for(var Ge,vt=p,Ft=Ce,kt=0,At=!1;(Ft=Ft.get(VT))!==void 0&&!At;){var Ie=Ft.get(p);if(kt+=1,Ie!==void 0){if(Ie===kt)throw new RangeError("Cyclic object value");At=!0}Ft.get(VT)===void 0&&(kt=0)}if(typeof re=="function"?vt=re(E,vt):vt instanceof Date?vt=ee(vt):_==="comma"&&Wd(vt)&&(vt=Hb.maybeMap(vt,function(xt){return xt instanceof Date?ee(xt):xt})),vt===null){if(M)return J&&!Ee?J(E,To.encoder,Ae,"key",Pe):E;vt=""}if(typeof(Ge=vt)=="string"||typeof Ge=="number"||typeof Ge=="boolean"||typeof Ge=="symbol"||typeof Ge=="bigint"||Hb.isBuffer(vt))return J?[Se(Ee?E:J(E,To.encoder,Ae,"key",Pe))+"="+Se(J(vt,To.encoder,Ae,"value",Pe))]:[Se(E)+"="+Se(String(vt))];var Xe,He=[];if(vt===void 0)return He;if(_==="comma"&&Wd(vt))Ee&&J&&(vt=Hb.maybeMap(vt,J)),Xe=[{value:vt.length>0?vt.join(",")||null:void 0}];else if(Wd(re))Xe=re;else{var bt=Object.keys(vt);Xe=oe?bt.sort(oe):bt}for(var Ke=R&&Wd(vt)&&vt.length===1?E+"[]":E,nt=0;nt<Xe.length;++nt){var xe=Xe[nt],It=typeof xe=="object"&&xe.value!==void 0?xe.value:vt[xe];if(!W||It!==null){var Je=Wd(vt)?typeof _=="function"?_(Ke,xe):Ke:Ke+(he?"."+xe:"["+xe+"]");Ce.set(p,kt);var ft=Wx();ft.set(VT,Ce),Kx(He,y(It,Je,_,R,M,W,_==="comma"&&Ee&&Wd(vt)?null:J,re,oe,he,ee,Pe,Se,Ee,Ae,ft))}}return He},QN=function(y,p){var E,_=y,R=function(Ee){if(!Ee)return To;if(Ee.encoder!==null&&Ee.encoder!==void 0&&typeof Ee.encoder!="function")throw new TypeError("Encoder has to be a function.");var Ae=Ee.charset||To.charset;if(Ee.charset!==void 0&&Ee.charset!=="utf-8"&&Ee.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var Ce=my.default;if(Ee.format!==void 0){if(!Gd.call(my.formatters,Ee.format))throw new TypeError("Unknown format option provided.");Ce=Ee.format}var Ge=my.formatters[Ce],vt=To.filter;return(typeof Ee.filter=="function"||Wd(Ee.filter))&&(vt=Ee.filter),{addQueryPrefix:typeof Ee.addQueryPrefix=="boolean"?Ee.addQueryPrefix:To.addQueryPrefix,allowDots:Ee.allowDots===void 0?To.allowDots:!!Ee.allowDots,charset:Ae,charsetSentinel:typeof Ee.charsetSentinel=="boolean"?Ee.charsetSentinel:To.charsetSentinel,delimiter:Ee.delimiter===void 0?To.delimiter:Ee.delimiter,encode:typeof Ee.encode=="boolean"?Ee.encode:To.encode,encoder:typeof Ee.encoder=="function"?Ee.encoder:To.encoder,encodeValuesOnly:typeof Ee.encodeValuesOnly=="boolean"?Ee.encodeValuesOnly:To.encodeValuesOnly,filter:vt,format:Ce,formatter:Ge,serializeDate:typeof Ee.serializeDate=="function"?Ee.serializeDate:To.serializeDate,skipNulls:typeof Ee.skipNulls=="boolean"?Ee.skipNulls:To.skipNulls,sort:typeof Ee.sort=="function"?Ee.sort:null,strictNullHandling:typeof Ee.strictNullHandling=="boolean"?Ee.strictNullHandling:To.strictNullHandling}}(p);typeof R.filter=="function"?_=(0,R.filter)("",_):Wd(R.filter)&&(E=R.filter);var M,W=[];if(typeof _!="object"||_===null)return"";M=p&&p.arrayFormat in qx?p.arrayFormat:p&&"indices"in p?p.indices?"indices":"repeat":"indices";var J=qx[M];if(p&&"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var re=J==="comma"&&p&&p.commaRoundTrip;E||(E=Object.keys(_)),R.sort&&E.sort(R.sort);
210for(var oe=Wx(),he=0;he<E.length;++he){var ee=E[he];R.skipNulls&&_[ee]===null||Kx(W,ZN(_[ee],ee,J,re,R.strictNullHandling,R.skipNulls,R.encode?R.encoder:null,R.filter,R.sort,R.allowDots,R.serializeDate,R.format,R.formatter,R.encodeValuesOnly,R.charset,oe))}var Pe=W.join(R.delimiter),Se=R.addQueryPrefix===!0?"?":"";return R.charsetSentinel&&(R.charset==="iso-8859-1"?Se+="utf8=%26%2310003%3B&":Se+="utf8=%E2%9C%93&"),Pe.length>0?Se+Pe:""},XN={stringify:QN},Ul={};(function(y){function p(_,R){var M=typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(!M){if(Array.isArray(_)||(M=function(ee,Pe){if(ee){if(typeof ee=="string")return E(ee,Pe);var Se=Object.prototype.toString.call(ee).slice(8,-1);if(Se==="Object"&&ee.constructor&&(Se=ee.constructor.name),Se==="Map"||Se==="Set")return Array.from(ee);if(Se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Se))return E(ee,Pe)}}(_))||R){M&&(_=M);var W=0,J=function(){};return{s:J,n:function(){return W>=_.length?{done:!0}:{done:!1,value:_[W++]}},e:function(ee){throw ee},f:J}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
211In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}
211var re,oe=!0,he=!1;return{s:function(){M=M.call(_)},n:function(){var ee=M.next();return oe=ee.done,ee},e:function(ee){he=!0,re=ee},f:function(){try{oe||M.return==null||M.return()}finally{if(he)throw re}}}}function E(_,R){(R==null||R>_.length)&&(R=_.length);for(var M=0,W=new Array(R);M<R;M++)W[M]=_[M];return W}y.type=_=>_.split(/ *; */).shift(),y.params=_=>{const R={};var M,W=p(_.split(/ *; */));try{for(W.s();!(M=W.n()).done;){const J=M.value.split(/ *= */),re=J.shift(),oe=J.shift();re&&oe&&(R[re]=oe)}}catch(J){W.e(J)}finally{W.f()}return R},y.parseLinks=_=>{const R={};var M,W=p(_.split(/ *, */));try{for(W.s();!(M=W.n()).done;){const J=M.value.split(/ *; */),re=J[0].slice(1,-1);R[J[1].split(/ *= */)[1].slice(1,-1)]=re}}catch(J){W.e(J)}finally{W.f()}return R},y.cleanHeader=(_,R)=>(delete _["content-type"],delete _["content-length"],delete _["transfer-encoding"],delete _.host,R&&(delete _.authorization,delete _.cookie),_),y.isObject=_=>_!==null&&typeof _=="object",y.hasOwn=Object.hasOwn||function(_,R){if(_==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(_),R)},y.mixin=(_,R)=>{for(const M in R)y.hasOwn(R,M)&&(_[M]=R[M])}})(Ul);const Yx=mn,jb=Ul.isObject,qo=Ul.hasOwn;var JN=li;function li(){}li.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},li.prototype.parse=function(y){return this._parser=y,this},li.prototype.responseType=function(y){return this._responseType=y,this},li.prototype.serialize=function(y){return this._serializer=y,this},li.prototype.timeout=function(y){if(!y||typeof y!="object")return this._timeout=y,this._responseTimeout=0,this._uploadTimeout=0,this;for(const p in y)if(qo(y,p))switch(p){case"deadline":this._timeout=y.deadline;break;case"response":this._responseTimeout=y.response;break;case"upload":this._uploadTimeout=y.upload;break;default:console.warn("Unknown timeout option",p)}return this},li.prototype.retry=function(y,p){return arguments.length!==0&&y!==!0||(y=1),y<=0&&(y=0),this._maxRetries=y,this._retries=0,this._retryCallback=p,this};const eM=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),tM=new Set([408,413,429,500,502,503,504,521,522,524]);li.prototype._shouldRetry=function(y,p){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const E=this._retryCallback(y,p);if(E===!0)return!0;if(E===!1)return!1}catch(E){console.error(E)}
211return!!(p&&p.status&&tM.has(p.status)||y&&(y.code&&eM.has(y.code)||y.timeout&&y.code==="ECONNABORTED"||y.crossDomain))},li.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},li.prototype.then=function(y,p){if(!this._fullfilledPromise){const E=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((_,R)=>{E.on("abort",()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void R(this.timedoutError);const M=new Error("Aborted");M.code="ABORTED",M.status=this.status,M.method=this.method,M.url=this.url,R(M)}),E.end((M,W)=>{M?R(M):_(W)})})}return this._fullfilledPromise.then(y,p)},li.prototype.catch=function(y){return this.then(void 0,y)},li.prototype.use=function(y){return y(this),this},li.prototype.ok=function(y){if(typeof y!="function")throw new Error("Callback required");return this._okCallback=y,this},li.prototype._isResponseOK=function(y){return!!y&&(this._okCallback?this._okCallback(y):y.status>=200&&y.status<300)},li.prototype.get=function(y){return this._header[y.toLowerCase()]},li.prototype.getHeader=li.prototype.get,li.prototype.set=function(y,p){if(jb(y)){for(const E in y)qo(y,E)&&this.set(E,y[E]);return this}return this._header[y.toLowerCase()]=p,this.header[y]=p,this},li.prototype.unset=function(y){return delete this._header[y.toLowerCase()],delete this.header[y],this},li.prototype.field=function(y,p,E){if(y==null)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(jb(y)){for(const _ in y)qo(y,_)&&this.field(_,y[_]);return this}if(Array.isArray(p)){for(const _ in p)qo(p,_)&&this.field(y,p[_]);return this}if(p==null)throw new Error(".field(name, val) val can not be empty");return typeof p=="boolean"&&(p=String(p)),E?this._getFormData().append(y,p,E):this._getFormData().append(y,p),this},li.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(Yx.gte(process.version,"v13.0.0")&&Yx.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},li.prototype._auth=function(y,p,E,_){switch(E.type){case"basic":this.set("Authorization",`Basic ${_(`${y}:${p}`)}`);break;case"auto":this.username=y,this.password=p;break;case"bearer":this.set("Authorization",`Bearer ${y}`)}return this},li.prototype.withCredentials=function(y){return y===void 0&&(y=!0),this._withCredentials=y,this},li.prototype.redirects=function(y){return this._maxRedirects=y,this},li.prototype.maxResponseSize=function(y){if(typeof y!="number")throw new TypeError("Invalid argument");return this._maxResponseSize=y,this},li.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},li.prototype.send=function(y){const p=jb(y);let E=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(p&&!this._data)Array.isArray(y)?this._data=[]:this._isHost(y)||(this._data={});else if(y&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(p&&jb(this._data))for(const _ in y){if(typeof y[_]=="bigint"&&!y[_].toJSON)throw new Error("Cannot serialize BigInt value to json");qo(y,_)&&(this._data[_]=y[_])}else{if(typeof y=="bigint")throw new Error("Cannot send value of type BigInt");typeof y=="string"?(E||this.type("form"),E=this._header["content-type"],E&&(E=E.toLowerCase().trim()),this._data=E==="application/x-www-form-urlencoded"?this._data?`${this._data}&${y}`:y:(this._data||"")+y):this._data=y}return!p||this._isHost(y)||E||this.type("json"),this},li.prototype.sortQuery=function(y){return this._sort=y===void 0||y,this},li.prototype._finalizeQueryString=function(){const y=this._query.join("&");if(y&&(this.url+=(this.url.includes("?")?"&":"?")+y),this._query.length=0,this._sort){const p=this.url.indexOf("?");if(p>=0){const E=this.url.slice(p+1).split("&");typeof this._sort=="function"?E.sort(this._sort):E.sort(),this.url=this.url.slice(0,p)+"?"+E.join("&")}}},li.prototype._appendQueryString=()=>{console.warn("Unsupported")}
211,li.prototype._timeoutError=function(y,p,E){if(this._aborted)return;const _=new Error(`${y+p}ms exceeded`);_.timeout=p,_.code="ECONNABORTED",_.errno=E,this.timedout=!0,this.timedoutError=_,this.abort(),this.callback(_)},li.prototype._setTimeouts=function(){const y=this;this._timeout&&!this._timer&&(this._timer=setTimeout(()=>{y._timeoutError("Timeout of ",y._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(()=>{y._timeoutError("Response timeout of ",y._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};const HT=Ul;var Zx=vy;function vy(){}function nM(y,p){var E=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!E){if(Array.isArray(y)||(E=function(re,oe){if(re){if(typeof re=="string")return Qx(re,oe);var he=Object.prototype.toString.call(re).slice(8,-1);if(he==="Object"&&re.constructor&&(he=re.constructor.name),he==="Map"||he==="Set")return Array.from(re);if(he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he))return Qx(re,oe)}}(y))||p){E&&(y=E);var _=0,R=function(){};return{s:R,n:function(){return _>=y.length?{done:!0}:{done:!1,value:y[_++]}},e:function(re){throw re},f:R}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
212In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M,W=!0,J=!1;return{s:function(){E=E.call(y)},n:function(){var re=E.next();return W=re.done,re},e:function(re){J=!0,M=re},f:function(){try{W||E.return==null||E.return()}finally{if(J)throw M}}}}function Qx(y,p){(p==null||p>y.length)&&(p=y.length);for(var E=0,_=new Array(p);E<p;E++)_[E]=y[E];return _}function yy(){this._defaults=[]}vy.prototype.get=function(y){return this.header[y.toLowerCase()]},vy.prototype._setHeaderProperties=function(y){const p=y["content-type"]||"";this.type=HT.type(p);const E=HT.params(p);for(const _ in E)Object.prototype.hasOwnProperty.call(E,_)&&(this[_]=E[_]);this.links={};try{y.link&&(this.links=HT.parseLinks(y.link))}catch{}},vy.prototype._setStatusProperties=function(y){const p=Math.trunc(y/100);this.statusCode=y,this.status=this.statusCode,this.statusType=p,this.info=p===1,this.ok=p===2,this.redirect=p===3,this.clientError=p===4,this.serverError=p===5,this.error=(p===4||p===5)&&this.toError(),this.created=y===201,this.accepted=y===202,this.noContent=y===204,this.badRequest=y===400,this.unauthorized=y===401,this.notAcceptable=y===406,this.forbidden=y===403,this.notFound=y===404,this.unprocessableEntity=y===422};for(var wp=0,by=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];wp<by.length;wp++){const y=by[wp];yy.prototype[y]=function(){for(var p=arguments.length,E=new Array(p),_=0;_<p;_++)E[_]=arguments[_];return this._defaults.push({fn:y,args:E}),this}}yy.prototype._setDefaults=function(y){var p,E=nM(this._defaults);try{for(E.s();!(p=E.n()).done;){const _=p.value;y[_.fn](..._.args)}}catch(_){E.e(_)}finally{E.f()}};var rM=yy;(function(y,p){function E(Ke,nt){var xe=typeof Symbol<"u"&&Ke[Symbol.iterator]||Ke["@@iterator"];if(!xe){if(Array.isArray(Ke)||(xe=function(Gr,fs){if(Gr){if(typeof Gr=="string")return _(Gr,fs);var Is=Object.prototype.toString.call(Gr).slice(8,-1);if(Is==="Object"&&Gr.constructor&&(Is=Gr.constructor.name),Is==="Map"||Is==="Set")return Array.from(Gr);if(Is==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Is))return _(Gr,fs)}}(Ke))||nt){xe&&(Ke=xe);var It=0,Je=function(){};return{s:Je,n:function(){return It>=Ke.length?{done:!0}:{done:!1,value:Ke[It++]}},e:function(Gr){throw Gr},f:Je}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
213In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ft,xt=!0,Nt=!1;return{s:function(){xe=xe.call(Ke)},n:function(){var Gr=xe.next();return xt=Gr.done,Gr},e:function(Gr){Nt=!0,ft=Gr},f:function(){try{xt||xe.return==null||xe.return()}finally{if(Nt)throw ft}}}}function _(Ke,nt){(nt==null||nt>Ke.length)&&(nt=Ke.length);for(var xe=0,It=new Array(nt);xe<nt;xe++)It[xe]=Ke[xe];return It}let R;typeof window<"u"?R=window:typeof self>"u"?(console.warn("Using browser-only version of superagent in non-browser environment"),R=void 0):R=self;const M=$l.exports,W=ey,J=XN,re=JN,oe=Ul.isObject,he=Ul.mixin,ee=Ul.hasOwn,Pe=Zx,Se=rM;function Ee(){}y.exports=function(Ke,nt){return typeof nt=="function"?new p.Request("GET",Ke).end(nt):arguments.length===1?new p.Request("GET",Ke):new p.Request(Ke,nt)};const Ae=p=y.exports;p.Request=Ie,Ae.getXHR=()=>
213{if(R.XMLHttpRequest)return new R.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const Ce="".trim?Ke=>Ke.trim():Ke=>Ke.replace(/(^\s*|\s*$)/g,"");function Ge(Ke){if(!oe(Ke))return Ke;const nt=[];for(const xe in Ke)ee(Ke,xe)&&vt(nt,xe,Ke[xe]);return nt.join("&")}function vt(Ke,nt,xe){if(xe!==void 0)if(xe!==null)if(Array.isArray(xe)){var It,Je=E(xe);try{for(Je.s();!(It=Je.n()).done;)vt(Ke,nt,It.value)}catch(ft){Je.e(ft)}finally{Je.f()}}else if(oe(xe))for(const ft in xe)ee(xe,ft)&&vt(Ke,`${nt}[${ft}]`,xe[ft]);else Ke.push(encodeURI(nt)+"="+encodeURIComponent(xe));else Ke.push(encodeURI(nt))}function Ft(Ke){const nt={},xe=Ke.split("&");let It,Je;for(let ft=0,xt=xe.length;ft<xt;++ft)It=xe[ft],Je=It.indexOf("="),Je===-1?nt[decodeURIComponent(It)]="":nt[decodeURIComponent(It.slice(0,Je))]=decodeURIComponent(It.slice(Je+1));return nt}function kt(Ke){return/[/+]json($|[^-\w])/i.test(Ke)}function At(Ke){this.req=Ke,this.xhr=this.req.xhr,this.text=this.req.method!=="HEAD"&&(this.xhr.responseType===""||this.xhr.responseType==="text")||this.xhr.responseType===void 0?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let nt=this.xhr.status;nt===1223&&(nt=204),this._setStatusProperties(nt),this.headers=function(xe){const It=xe.split(/\r?\n/),Je={};let ft,xt,Nt,Gr;for(let fs=0,Is=It.length;fs<Is;++fs)xt=It[fs],ft=xt.indexOf(":"),ft!==-1&&(Nt=xt.slice(0,ft).toLowerCase(),Gr=Ce(xt.slice(ft+1)),Je[Nt]=Gr);return Je}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.text===null&&Ke._responseType?this.body=this.xhr.response:this.body=this.req.method==="HEAD"?null:this._parseBody(this.text?this.text:this.xhr.response)}function Ie(Ke,nt){const xe=this;this._query=this._query||[],this.method=Ke,this.url=nt,this.header={},this._header={},this.on("end",()=>{let It,Je=null,ft=null;try{ft=new At(xe)}catch(xt){return Je=new Error("Parser is unable to parse the response"),Je.parse=!0,Je.original=xt,xe.xhr?(Je.rawResponse=xe.xhr.responseType===void 0?xe.xhr.responseText:xe.xhr.response,Je.status=xe.xhr.status?xe.xhr.status:null,Je.statusCode=Je.status):(Je.rawResponse=null,Je.status=null),xe.callback(Je)}xe.emit("response",ft);try{xe._isResponseOK(ft)||(It=new Error(ft.statusText||ft.text||"Unsuccessful HTTP response"))}catch(xt){It=xt}It?(It.original=Je,It.response=ft,It.status=It.status||ft.status,xe.callback(It,ft)):xe.callback(null,ft)})}Ae.serializeObject=Ge,Ae.parseString=Ft,Ae.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},Ae.serialize={"application/x-www-form-urlencoded":J.stringify,"application/json":W},Ae.parse={"application/x-www-form-urlencoded":Ft,"application/json":JSON.parse},he(At.prototype,Pe.prototype),At.prototype._parseBody=function(Ke){let nt=Ae.parse[this.type];return this.req._parser?this.req._parser(this,Ke):(!nt&&kt(this.type)&&(nt=Ae.parse["application/json"]),nt&&Ke&&(Ke.length>0||Ke instanceof Object)?nt(Ke):null)},At.prototype.toError=function(){const Ke=this.req,nt=Ke.method,xe=Ke.url,It=`cannot ${nt} ${xe} (${this.status})`,Je=new Error(It);return Je.status=this.status,Je.method=nt,Je.url=xe,Je},Ae.Response=At,M(Ie.prototype),he(Ie.prototype,re.prototype),Ie.prototype.type=function(Ke){return this.set("Content-Type",Ae.types[Ke]||Ke),this},Ie.prototype.accept=function(Ke){return this.set("Accept",Ae.types[Ke]||Ke),this},Ie.prototype.auth=function(Ke,nt,xe){arguments.length===1&&(nt=""),typeof nt=="object"&&nt!==null&&(xe=nt,nt=""),xe||(xe={type:typeof btoa=="function"?"basic":"auto"});const It=xe.encoder?xe.encoder:Je=>{if(typeof btoa=="function")return btoa(Je);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(Ke,nt,xe,It)},Ie.prototype.query=function(Ke){return typeof Ke!="string"&&(Ke=Ge(Ke)),Ke&&this._query.push(Ke),this},Ie.prototype.attach=function(Ke,nt,xe){if(nt){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(Ke,nt,xe||nt.name)}return this},Ie.prototype._getFormData=function(){return this._formData||(this._formData=new R.FormData),this._formData},Ie.prototype.callback=function(Ke,nt){if(this._shouldRetry(Ke,nt))return this._retry();const xe=this._callback;this.clearTimeout(),Ke&&(this._maxRetries&&(Ke.retries=this._retries-1),this.emit
213("error",Ke)),xe(Ke,nt)},Ie.prototype.crossDomainError=function(){const Ke=new Error(`Request has been terminated
214Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.`);Ke.crossDomain=!0,Ke.status=this.status,Ke.method=this.method,Ke.url=this.url,this.callback(Ke)},Ie.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},Ie.prototype.ca=Ie.prototype.agent,Ie.prototype.buffer=Ie.prototype.ca,Ie.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},Ie.prototype.pipe=Ie.prototype.write,Ie.prototype._isHost=function(Ke){return Ke&&typeof Ke=="object"&&!Array.isArray(Ke)&&Object.prototype.toString.call(Ke)!=="[object Object]"},Ie.prototype.end=function(Ke){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=Ke||Ee,this._finalizeQueryString(),this._end()},Ie.prototype._setUploadTimeout=function(){const Ke=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{Ke._timeoutError("Upload timeout of ",Ke._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},Ie.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const Ke=this;this.xhr=Ae.getXHR();const nt=this.xhr;let xe=this._formData||this._data;this._setTimeouts(),nt.addEventListener("readystatechange",()=>{const Je=nt.readyState;if(Je>=2&&Ke._responseTimeoutTimer&&clearTimeout(Ke._responseTimeoutTimer),Je!==4)return;let ft;try{ft=nt.status}catch{ft=0}if(!ft)return Ke.timedout||Ke._aborted?void 0:Ke.crossDomainError();Ke.emit("end")});const It=(Je,ft)=>{ft.total>0&&(ft.percent=ft.loaded/ft.total*100,ft.percent===100&&clearTimeout(Ke._uploadTimeoutTimer)),ft.direction=Je,Ke.emit("progress",ft)};if(this.hasListeners("progress"))try{nt.addEventListener("progress",It.bind(null,"download")),nt.upload&&nt.upload.addEventListener("progress",It.bind(null,"upload"))}catch{}nt.upload&&this._setUploadTimeout();try{this.username&&this.password?nt.open(this.method,this.url,!0,this.username,this.password):nt.open(this.method,this.url,!0)}catch(Je){return this.callback(Je)}if(this._withCredentials&&(nt.withCredentials=!0),!this._formData&&this.method!=="GET"&&this.method!=="HEAD"&&typeof xe!="string"&&!this._isHost(xe)){const Je=this._header["content-type"];let ft=this._serializer||Ae.serialize[Je?Je.split(";")[0]:""];!ft&&kt(Je)&&(ft=Ae.serialize["application/json"]),ft&&(xe=ft(xe))}for(const Je in this.header)this.header[Je]!==null&&ee(this.header,Je)&&nt.setRequestHeader(Je,this.header[Je]);this._responseType&&(nt.responseType=this._responseType),this.emit("request",this),nt.send(xe===void 0?null:xe)},Ae.agent=()=>new Se;for(var Xe=0,He=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];Xe<He.length;Xe++){const Ke=He[Xe];Se.prototype[Ke.toLowerCase()]=function(nt,xe){const It=new Ae.Request(Ke,nt);return this._setDefaults(It),xe&&It.end(xe),It}}function bt(Ke,nt,xe){const It=Ae("DELETE",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.send(nt),xe&&It.end(xe),It}Se.prototype.del=Se.prototype.delete,Ae.get=(Ke,nt,xe)=>{const It=Ae("GET",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.query(nt),xe&&It.end(xe),It},Ae.head=(Ke,nt,xe)=>{const It=Ae("HEAD",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.query(nt),xe&&It.end(xe),It},Ae.options=(Ke,nt,xe)=>{const It=Ae("OPTIONS",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.send(nt),xe&&It.end(xe),It},Ae.del=bt,Ae.delete=bt,Ae.patch=(Ke,nt,xe)=>{const It=Ae("PATCH",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.send(nt),xe&&It.end(xe),It},Ae.post=(Ke,nt,xe)=>{const It=Ae("POST",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.send(nt),xe&&It.end(xe),It},Ae.put=(Ke,nt,xe)=>{const It=Ae("PUT",Ke);return typeof nt=="function"&&(xe=nt,nt=null),nt&&It.send(nt),xe&&It.end(xe),It}})(vi,vi.exports);var _p=vi.exports;function iM(y){var p=new Date().getTime(),E=new Date().toISOString(),_=console&&console.log?console:window&&window.console&&window.console.log?window.console:console;_.log("<<<<<"),_.log("[".concat(E,"]"),`
215`,y.url,`
216`,y.qs),_.log("-----"),y.on("response",function(R){var M=new Date().getTime()-p,W=new Date().toISOString();_.log(">>>>>>"),_.log("[".concat(W," / ").concat(M,"]"),`
217`,y.url,`
218`,y.qs,`
219`,R.text),_.log("-----")})}function Vl(y,p,E){var _=this;this._config.logVerbosity&&(y=y.use(iM)),this._config.proxy&&this._modules.proxy&&(y=this._modules.proxy.call(this,y)),this._config.keepAlive&&this._modules.keepAlive&&(y=this._modules.keepAlive(y));var R=y;
219if(p.abortSignal)var M=p.abortSignal.subscribe(function(){R.abort(),M()});return p.forceBuffered===!0?R=typeof Blob>"u"?R.buffer().responseType("arraybuffer"):R.responseType("arraybuffer"):p.forceBuffered===!1&&(R=R.buffer(!1)),(R=R.timeout(p.timeout)).on("abort",function(){return E({category:j.PNUnknownCategory,error:!0,operation:p.operation,errorData:new Error("Aborted")},null)}),R.end(function(W,J){var re,oe={};if(oe.error=W!==null,oe.operation=p.operation,J&&J.status&&(oe.statusCode=J.status),W){if(W.response&&W.response.text&&!_._config.logVerbosity)try{oe.errorData=JSON.parse(W.response.text)}catch{oe.errorData=W}else oe.errorData=W;return oe.category=_._detectErrorCategory(W),E(oe,null)}if(p.ignoreBody)re={headers:J.headers,redirects:J.redirects,response:J};else try{re=JSON.parse(J.text)}catch{return oe.errorData=J,oe.error=!0,E(oe,null)}return re.error&&re.error===1&&re.status&&re.message&&re.service?(oe.errorData=re,oe.statusCode=re.status,oe.error=!0,oe.category=_._detectErrorCategory(oe),E(oe,null)):(re.error&&re.error.message&&(oe.errorData=re.error),E(oe,re))}),R}function jT(y,p,E){return a(this,void 0,void 0,function(){var _;return o(this,function(R){switch(R.label){case 0:return _=_p.post(y),p.forEach(function(M){var W=M.key,J=M.value;_=_.field(W,J)}),_.attach("file",E,{contentType:"application/octet-stream"}),[4,_];case 1:return[2,R.sent()]}})})}function Cp(y,p,E){var _=_p.get(this.getStandardOrigin()+p.url).set(p.headers).query(y);return Vl.call(this,_,p,E)}function Tu(y,p,E){var _=_p.get(this.getStandardOrigin()+p.url).set(p.headers).query(y);return Vl.call(this,_,p,E)}function sM(y,p,E,_){var R=_p.post(this.getStandardOrigin()+E.url).query(y).set(E.headers).send(p);return Vl.call(this,R,E,_)}function Xx(y,p,E,_){var R=_p.patch(this.getStandardOrigin()+E.url).query(y).set(E.headers).send(p);return Vl.call(this,R,E,_)}function Jx(y,p,E){var _=_p.delete(this.getStandardOrigin()+p.url).set(p.headers).query(y);return Vl.call(this,_,p,E)}function tm(y,p){var E=new Uint8Array(y.byteLength+p.byteLength);return E.set(new Uint8Array(y),0),E.set(new Uint8Array(p),y.byteLength),E.buffer}var io,zT=function(){function y(){}return Object.defineProperty(y.prototype,"algo",{get:function(){return"aes-256-cbc"},enumerable:!1,configurable:!0}),y.prototype.encrypt=function(p,E){return a(this,void 0,void 0,function(){var _;return o(this,function(R){switch(R.label){case 0:return[4,this.getKey(p)];case 1:if(_=R.sent(),E instanceof ArrayBuffer)return[2,this.encryptArrayBuffer(_,E)];if(typeof E=="string")return[2,this.encryptString(_,E)];throw new Error("Cannot encrypt this file. In browsers file encryption supports only string or ArrayBuffer")}})})},y.prototype.decrypt=function(p,E){return a(this,void 0,void 0,function(){var _;return o(this,function(R){switch(R.label){case 0:return[4,this.getKey(p)];case 1:if(_=R.sent(),E instanceof ArrayBuffer)return[2,this.decryptArrayBuffer(_,E)];if(typeof E=="string")return[2,this.decryptString(_,E)];throw new Error("Cannot decrypt this file. In browsers file decryption supports only string or ArrayBuffer")}})})},y.prototype.encryptFile=function(p,E,_){return a(this,void 0,void 0,function(){var R,M,W;return o(this,function(J){switch(J.label){case 0:if(E.data.byteLength<=0)throw new Error("encryption error. empty content");return[4,this.getKey(p)];case 1:return R=J.sent(),[4,E.data.arrayBuffer()];case 2:return M=J.sent(),[4,this.encryptArrayBuffer(R,M)];case 3:return W=J.sent(),[2,_.create({name:E.name,mimeType:"application/octet-stream",data:W})]}})})},y.prototype.decryptFile=function(p,E,_){return a(this,void 0,void 0,function(){var R,M,W;return o(this,function(J){switch(J.label){case 0:return[4,this.getKey(p)];case 1:return R=J.sent(),[4,E.data.arrayBuffer()];case 2:return M=J.sent(),[4,this.decryptArrayBuffer(R,M)];case 3:return W=J.sent(),[2,_.create({name:E.name,data:W})]}})})},y.prototype.getKey=function(p){return a(this,void 0,void 0,function(){var E,_,R;return o(this,function(M){switch(M.label){case 0:return[4,crypto.subtle.digest("SHA-256",y.encoder.encode(p))];case 1:return E=M.sent(),_=Array.from(new Uint8Array(E)).map(function(W){return W.toString(16).padStart(2,"0")}).join(""),R=y.encoder.encode(_.slice(0,32)).buffer,[2,crypto.subtle.importKey("raw",R,"AES-CBC",!0,["encrypt","decrypt"])]}})})},y.prototype.encryptArrayBuffer=function(p,E){return a(this,void 0,void 0,function(){var _,R,M;return o(this,function(W){switch(W.label){case 0:return _=crypto.getRandomValues(new Uint8Array(16)),R=tm,M=[_.buffer],[4,crypto.subtle.encrypt({name:"AES-CBC",iv:_},p,E)];case 1:return[2,R.apply(void 0,M.concat([W.sent()]))]}})})},y.prototype.decryptArrayBuffer=function(p,E){return a(this,void 0,void 0,function(){var _;return o(this,function(R){switch(R.label){case 0:if(_=E.slice(0,16),E.slice(y.IV_LENGTH).byteLength<=0)throw new Error("decryption error: empty content");
219return[4,crypto.subtle.decrypt({name:"AES-CBC",iv:_},p,E.slice(y.IV_LENGTH))];case 1:return[2,R.sent()]}})})},y.prototype.encryptString=function(p,E){return a(this,void 0,void 0,function(){var _,R,M,W;return o(this,function(J){switch(J.label){case 0:return _=crypto.getRandomValues(new Uint8Array(16)),R=y.encoder.encode(E).buffer,[4,crypto.subtle.encrypt({name:"AES-CBC",iv:_},p,R)];case 1:return M=J.sent(),W=tm(_.buffer,M),[2,y.decoder.decode(W)]}})})},y.prototype.decryptString=function(p,E){return a(this,void 0,void 0,function(){var _,R,M,W;return o(this,function(J){switch(J.label){case 0:return _=y.encoder.encode(E).buffer,R=_.slice(0,16),M=_.slice(16),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:R},p,M)];case 1:return W=J.sent(),[2,y.decoder.decode(W)]}})})},y.IV_LENGTH=16,y.encoder=new TextEncoder,y.decoder=new TextDecoder,y}(),aM=(io=function(){function y(p){if(p instanceof File)this.data=p,this.name=this.data.name,this.mimeType=this.data.type;else if(p.data){var E=p.data;this.data=new File([E],p.name,{type:p.mimeType}),this.name=p.name,p.mimeType&&(this.mimeType=p.mimeType)}if(this.data===void 0)throw new Error("Couldn't construct a file out of supplied options.");if(this.name===void 0)throw new Error("Couldn't guess filename out of the options. Please provide one.")}return y.create=function(p){return new this(p)},y.prototype.toBuffer=function(){return a(this,void 0,void 0,function(){return o(this,function(p){throw new Error("This feature is only supported in Node.js environments.")})})},y.prototype.toStream=function(){return a(this,void 0,void 0,function(){return o(this,function(p){throw new Error("This feature is only supported in Node.js environments.")})})},y.prototype.toFileUri=function(){return a(this,void 0,void 0,function(){return o(this,function(p){throw new Error("This feature is only supported in react native environments.")})})},y.prototype.toBlob=function(){return a(this,void 0,void 0,function(){return o(this,function(p){return[2,this.data]})})},y.prototype.toArrayBuffer=function(){return a(this,void 0,void 0,function(){var p=this;return o(this,function(E){return[2,new Promise(function(_,R){var M=new FileReader;M.addEventListener("load",function(){if(M.result instanceof ArrayBuffer)return _(M.result)}),M.addEventListener("error",function(){R(M.error)}),M.readAsArrayBuffer(p.data)})]})})},y.prototype.toString=function(){return a(this,void 0,void 0,function(){var p=this;return o(this,function(E){return[2,new Promise(function(_,R){var M=new FileReader;M.addEventListener("load",function(){if(typeof M.result=="string")return _(M.result)}),M.addEventListener("error",function(){R(M.error)}),M.readAsBinaryString(p.data)})]})})},y.prototype.toFile=function(){return a(this,void 0,void 0,function(){return o(this,function(p){return[2,this.data]})})},y}(),io.supportsFile=typeof File<"u",io.supportsBlob=typeof Blob<"u",io.supportsArrayBuffer=typeof ArrayBuffer<"u",io.supportsBuffer=!1,io.supportsStream=!1,io.supportsString=!0,io.supportsEncryptFile=!0,io.supportsFileUri=!1,io),nm=function(){function y(p){this.config=p,this.cryptor=new C({config:p}),this.fileCryptor=new zT}return Object.defineProperty(y.prototype,"identifier",{get:function(){return""},enumerable:!1,configurable:!0}),y.prototype.encrypt=function(p){var E=typeof p=="string"?p:new TextDecoder().decode(p);return{data:this.cryptor.encrypt(E),metadata:null}},y.prototype.decrypt=function(p){var E=typeof p.data=="string"?p.data:x(p.data);return this.cryptor.decrypt(E)},y.prototype.encryptFile=function(p,E){var _;return a(this,void 0,void 0,function(){return o(this,function(R){return[2,this.fileCryptor.encryptFile((_=this.config)===null||_===void 0?void 0:_.cipherKey,p,E)]})})},y.prototype.decryptFile=function(p,E){return a(this,void 0,void 0,function(){return o(this,function(_){return[2,this.fileCryptor.decryptFile(this.config.cipherKey,p,E)]})})},y}(),GT=function(){function y(p){this.cipherKey=p.cipherKey,this.CryptoJS=q,this.encryptedKey=this.CryptoJS.SHA256(this.cipherKey)}return Object.defineProperty(y.prototype,"algo",{get:function(){return"AES-CBC"}
219,enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"identifier",{get:function(){return"ACRH"},enumerable:!1,configurable:!0}),y.prototype.getIv=function(){return crypto.getRandomValues(new Uint8Array(y.BLOCK_SIZE))},y.prototype.getKey=function(){return a(this,void 0,void 0,function(){var p,E;return o(this,function(_){switch(_.label){case 0:return p=y.encoder.encode(this.cipherKey),[4,crypto.subtle.digest("SHA-256",p.buffer)];case 1:return E=_.sent(),[2,crypto.subtle.importKey("raw",E,this.algo,!0,["encrypt","decrypt"])]}})})},y.prototype.encrypt=function(p){if((typeof p=="string"?p:y.decoder.decode(p)).length===0)throw new Error("encryption error. empty content");var E=this.getIv();return{metadata:E,data:w(this.CryptoJS.AES.encrypt(p,this.encryptedKey,{iv:this.bufferToWordArray(E),mode:this.CryptoJS.mode.CBC}).ciphertext.toString(this.CryptoJS.enc.Base64))}},y.prototype.decrypt=function(p){var E=this.bufferToWordArray(new Uint8ClampedArray(p.metadata)),_=this.bufferToWordArray(new Uint8ClampedArray(p.data));return y.encoder.encode(this.CryptoJS.AES.decrypt({ciphertext:_},this.encryptedKey,{iv:E,mode:this.CryptoJS.mode.CBC}).toString(this.CryptoJS.enc.Utf8)).buffer},y.prototype.encryptFileData=function(p){return a(this,void 0,void 0,function(){var E,_,R;return o(this,function(M){switch(M.label){case 0:return[4,this.getKey()];case 1:return E=M.sent(),_=this.getIv(),R={},[4,crypto.subtle.encrypt({name:this.algo,iv:_},E,p)];case 2:return[2,(R.data=M.sent(),R.metadata=_,R)]}})})},y.prototype.decryptFileData=function(p){return a(this,void 0,void 0,function(){var E;return o(this,function(_){switch(_.label){case 0:return[4,this.getKey()];case 1:return E=_.sent(),[2,crypto.subtle.decrypt({name:this.algo,iv:p.metadata},E,p.data)]}})})},y.prototype.bufferToWordArray=function(p){var E,_=[];for(E=0;E<p.length;E+=1)_[E/4|0]|=p[E]<<24-8*E;return this.CryptoJS.lib.WordArray.create(_,p.length)},y.BLOCK_SIZE=16,y.encoder=new TextEncoder,y.decoder=new TextDecoder,y}(),WT=function(){function y(p){var E;this.defaultCryptor=p.default,this.cryptors=(E=p.cryptors)!==null&&E!==void 0?E:[]}return y.legacyCryptoModule=function(p){var E;return new this({default:new nm({cipherKey:p.cipherKey,useRandomIVs:(E=p.useRandomIVs)===null||E===void 0||E}),cryptors:[new GT({cipherKey:p.cipherKey})]})},y.aesCbcCryptoModule=function(p){var E;return new this({default:new GT({cipherKey:p.cipherKey}),cryptors:[new nm({cipherKey:p.cipherKey,useRandomIVs:(E=p.useRandomIVs)===null||E===void 0||E})]})},y.withDefaultCryptor=function(p){return new this({default:p})},y.prototype.getAllCryptors=function(){return c([this.defaultCryptor],u(this.cryptors),!1)},y.prototype.encrypt=function(p){var E=this.defaultCryptor.encrypt(p);if(!E.metadata)return E.data;var _=this.getHeaderData(E);return this.concatArrayBuffer(_,E.data)},y.prototype.decrypt=function(p){var E=typeof p=="string"?w(p):p,_=Zi.tryParse(E),R=this.getCryptor(_),M=_.length>0?E.slice(_.length-_.metadataLength,_.length):null;if(E.slice(_.length).byteLength<=0)throw new Error("decryption error. empty content");return R.decrypt({data:E.slice(_.length),metadata:M})},y.prototype.encryptFile=function(p,E){return a(this,void 0,void 0,function(){var _,R;return o(this,function(M){switch(M.label){case 0:return this.defaultCryptor.identifier===Zi.LEGACY_IDENTIFIER?[2,this.defaultCryptor.encryptFile(p,E)]:[4,this.getFileData(p.data)];case 1:return _=M.sent(),[4,this.defaultCryptor.encryptFileData(_)];case 2:return R=M.sent(),[2,E.create({name:p.name,mimeType:"application/octet-stream",data:this.concatArrayBuffer(this.getHeaderData(R),R.data)})]}})})},y.prototype.decryptFile=function(p,E){return a(this,void 0,void 0,function(){var _,R,M,W,J,re,oe,he;return o(this,function(ee){switch(ee.label){case 0:return[4,p.data.arrayBuffer()];case 1:return _=ee.sent(),R=Zi.tryParse(_),((M=this.getCryptor(R))==null?void 0:M.identifier)===y.LEGACY_IDENTIFIER?[2,M.decryptFile(p,E)]:[4,this.getFileData(_)];case 2:return W=ee.sent(),J=W.slice(R.length-R.metadataLength,R.length),oe=(re=E).create,he={name:p.name},[4,this.defaultCryptor.decryptFileData({data:_.slice(R.length),metadata:J})];case 3:return[2,oe.apply(re,[(he.data=ee.sent(),he)])]}})})},y.prototype.getCryptor=function(p){if(p===""){var E=this.getAllCryptors().find(function(_){return _.identifier===""});if(E)return E;throw new Error("unknown cryptor error")}if(p instanceof Sy)return this.getCryptorFromId(p.identifier)},y.prototype.getCryptorFromId=function(p){var E=this.getAllCryptors().find(function(_){return p===_.identifier});if(E)return E;throw Error("unknown cryptor error")},y.prototype.concatArrayBuffer=function(p,E){var _=new Uint8Array(p.byteLength+E.byteLength);return _.set(new Uint8Array(p),0),_.set(new Uint8Array(E),p.byteLength),_.buffer},y.prototype.getHeaderData=function(p){if(p.metadata){var E=Zi.from(this.defaultCryptor.identifier,p.metadata),_=new Uint8Array(E.length),R=0;return _.set(E.data,R),R+=E.length-p.metadata.byteLength,_.set(new Uint8Array(p.metadata),R),_.buffer}},y.prototype.getFileData=function(p){return a(this,void 0,void 0,function(){return o(this,function(E){switch(E.label){case 0:return p 
219instanceof Blob?[4,p.arrayBuffer()]:[3,2];case 1:return[2,E.sent()];case 2:if(p instanceof ArrayBuffer)return[2,p];if(typeof p=="string")return[2,y.encoder.encode(p)];throw new Error("Cannot decrypt/encrypt file. In browsers file encrypt/decrypt supported for string, ArrayBuffer or Blob")}})})},y.LEGACY_IDENTIFIER="",y.encoder=new TextEncoder,y.decoder=new TextDecoder,y}(),Zi=function(){function y(){}return y.from=function(p,E){if(p!==y.LEGACY_IDENTIFIER)return new Sy(p,E.byteLength)},y.tryParse=function(p){var E=new Uint8Array(p),_="";if(E.byteLength>=4&&(_=E.slice(0,4),this.decoder.decode(_)!==y.SENTINEL))return"";if(!(E.byteLength>=5))throw new Error("decryption error. invalid header version");if(E[4]>y.MAX_VERSION)throw new Error("unknown cryptor error");var R="",M=5+y.IDENTIFIER_LENGTH;if(!(E.byteLength>=M))throw new Error("decryption error. invalid crypto identifier");R=E.slice(5,M);var W=null;if(!(E.byteLength>=M+1))throw new Error("decryption error. invalid metadata length");return W=E[M],M+=1,W===255&&E.byteLength>=M+2&&(W=new Uint16Array(E.slice(M,M+2)).reduce(function(J,re){return(J<<8)+re},0),M+=2),new Sy(this.decoder.decode(R),W)},y.SENTINEL="PNED",y.LEGACY_IDENTIFIER="",y.IDENTIFIER_LENGTH=4,y.VERSION=1,y.MAX_VERSION=1,y.decoder=new TextDecoder,y}(),Sy=function(){function y(p,E){this._identifier=p,this._metadataLength=E}return Object.defineProperty(y.prototype,"identifier",{get:function(){return this._identifier},set:function(p){this._identifier=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"metadataLength",{get:function(){return this._metadataLength},set:function(p){this._metadataLength=p},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"version",{get:function(){return Zi.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"length",{get:function(){return Zi.SENTINEL.length+1+Zi.IDENTIFIER_LENGTH+(this.metadataLength<255?1:3)+this.metadataLength},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"data",{get:function(){var p=0,E=new Uint8Array(this.length),_=new TextEncoder;E.set(_.encode(Zi.SENTINEL)),E[p+=Zi.SENTINEL.length]=this.version,p++,this.identifier&&E.set(_.encode(this.identifier),p),p+=Zi.IDENTIFIER_LENGTH;var R=this.metadataLength;return R<255?E[p]=R:E.set([255,R>>8,255&R],p),E},enumerable:!1,configurable:!0}),y.IDENTIFIER_LENGTH=4,y.SENTINEL="PNED",y}();function eI(y){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(y)}var Xc=function(y){function p(E){var _=this,R=E.listenToBrowserNetworkEvents,M=R===void 0||R;return E.sdkFamily="Web",E.networking=new Fl({del:Jx,get:Tu,post:sM,patch:Xx,sendBeacon:eI,getfile:Cp,postfile:jT}),E.cbor=new Jv(function(W){return gp(g.decode(W))},w),E.PubNubFile=aM,E.cryptography=new zT,E.initCryptoModule=function(W){return new WT({default:new nm({cipherKey:W.cipherKey,useRandomIVs:W.useRandomIVs}),cryptors:[new GT({cipherKey:W.cipherKey})]})},_=y.call(this,E)||this,M&&(window.addEventListener("offline",function(){_.networkDownDetected()}),window.addEventListener("online",function(){_.networkUpDetected()})),_}return r(p,y),p.CryptoModule=WT,p}(Ob);return Xc})})(_ce);var nZe=_ce.exports;const rZe=pi(nZe),KY=50,ac=il,iZe=il;class sZe{constructor(e,n,r,i,s){this.contentId=e,this.sessionId=n,this.eventListener=r,this.userDisplayName=i,this.userProfilePictureUrl=s}deleteMessage(e){return ac.dataServices.deleteChatMessage(this.sessionId,e)}editMessage(e,n){return ac.dataServices.editChatMessage(this.sessionId,e,n)}end(){const e="chat."+this.sessionId;try{this.pubnub.unsubscribe({channels:[e]}),this.sessionId=void 0}catch(n){throw iZe.error("Unable to end pubnub session"),n}}getQuickReactionRollups(e=Date.now(),n=0,r=KY,i=!0){return ac.dataServices.getChatQuickReactionRollups(this.sessionId,e,n,r,i).then(s=>s.events)}getQuickReactionsSummary(){return ac.dataServices.getChatQuickReactionsSummary(this.sessionId).then(e=>e.quickReactionCounts)}getTextEvents(e=Date.now(),n=0,r=KY,i=!0){return ac.dataServices.getChatTextEvents(this.sessionId,e,n,r,i).then(s=>s.events)}isActive(){return this.sessionId!==void 0}reportMessage(e,n){return ac.dataServices.reportChatMessage(e,n)}sendMessage(e,n=Date.now()){return ac.analyticServices.sendChatCommentPost(this.contentId),ac.dataServices.sendChatMessage(this.sessionId,e,n,this.userDisplayName,this.userProfilePictureUrl)}
219sendMessageReaction(e,n,r){return ac.analyticServices.sendChatCommentLike(this.contentId),ac.dataServices.sendChatMessageReaction(this.sessionId,e,n,r,this.userDisplayName,this.userProfilePictureUrl)}sendQuickReaction(e,n=Date.now()){return ac.analyticServices.sendChatReaction(this.contentId),ac.dataServices.sendChatQuickReaction(this.sessionId,e,n,this.userDisplayName,this.userProfilePictureUrl)}setScreenName(e){this.userDisplayName=e}start(){return ac.dataServices.getChatConfig(this.sessionId).then(n=>{if(n.code===404)throw n.auxData.errorResponse;return this.pubnub||(this.pubnub=new rZe({restore:!0,heartbeatInterval:0,publishKey:n.pubKey,subscribeKey:n.subKey,uuid:n.uuid,authKey:n.authToken}),this.pubnub.addListener({file:r=>this.eventListener&&this.eventListener({type:"file",data:r}),message:r=>this.eventListener&&this.eventListener({type:"message",data:r}),messageAction:r=>this.eventListener&&this.eventListener({type:"messageAction",data:r}),objects:r=>this.eventListener&&this.eventListener({type:"objects",data:r}),presence:r=>this.eventListener&&this.eventListener({type:"presence",data:r}),signal:r=>this.eventListener&&this.eventListener({type:"signal",data:r}),status:r=>this.eventListener&&this.eventListener({type:"status",data:r})})),this.pubnub.subscribe({channels:n.chatChannels}),n}).catch(n=>{this.eventListener&&this.eventListener({type:"error",error:n})})}}const CA=il;class aZe extends ace{constructor(){super(),this.chatSessions={}}async createSession(e,n,r,i=void 0,s=!1){(!this.userDisplayName||!this.userProfilePictureUrl)&&await this.updateDisplayName(i,s);const a=this.chatSessions[n];return a===void 0||a.isActive()===!1?this.chatSessions[n]=new sZe(e,n,r,this.userDisplayName,this.userProfilePictureUrl):a}async updateDisplayName(e=void 0,n=!1){const r=()=>{const l="User-"+((Math.random()*899999|0)+1e5);return CA.personalizationServices.dataStore.setData("displayName",l),l};let i;e?await CA.personalizationServices.dataStore.setData("displayName",e):(i=await CA.personalizationServices.getProfileData(),e=i==null?void 0:i.displayName,e||(e=await CA.personalizationServices.dataStore.getData("displayName")),e||(e=i==null?void 0:i.firstName),e||(e=r())),this.userDisplayName=(n===!0?q$e:"")+e;for(let s of Object.values(this.chatSessions))s.setScreenName(this.userDisplayName);i||(i=await CA.personalizationServices.getProfileData()),this.userProfilePictureUrl=(i==null?void 0:i.avatar)||"https://radioimg.audacy.com/logos/Audacy_generic_300x250.jpg"}}function Ra(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Xn(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function vr(t){Xn(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||Bu(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function q0(t,e){Xn(2,arguments);var n=vr(t),r=Ra(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function oZe(t,e){Xn(2,arguments);var n=vr(t),r=Ra(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var a=s.getDate();return i>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function xA(t,e){if(Xn(2,arguments),!e||Bu(e)!=="object")return new Date(NaN);var n=e.years?Ra(e.years):0,r=e.months?Ra(e.months):0,i=e.weeks?Ra(e.weeks):0,s=e.days?Ra(e.days):0,a=e.hours?Ra(e.hours):0,o=e.minutes?Ra(e.minutes):0,l=e.seconds?Ra(e.seconds):0,u=vr(t),c=r||n?oZe(u,r+n*12):u,d=s||i?q0(c,s+i*7):c,f=o+a*60,h=l+f*60,g=h*1e3,v=new Date(d.getTime()+g);return v}function Cce(t,e){Xn(2,arguments);var n=vr(t).getTime(),r=Ra(e);return new Date(n+r)}var lZe=36e5;function uZe(t,e){Xn(2,arguments);var n=Ra(e);return Cce(t,n*lZe)}var cZe={};function dx(){return cZe}function FU(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Nf(t){Xn(1,arguments);var e=vr(t);return e.setHours(0,0,0,0),e}var dZe=864e5;function fZe(t,e){Xn(2,arguments);var n=Nf(t),r=Nf(e),i=n.getTime()-FU(n),s=r.getTime()-FU(r);return Math.round((i-s)/dZe)}function kE(t,e){Xn(2,arguments);var n=vr(t),r=vr(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var O7=6e4,P7=36e5,hZe=1e3,pZe=60;function R7(t,e){Xn(2,arguments);var n=Nf(t),r=Nf(e);return n.getTime()===r.getTime()}function gZe(t){return Xn(1,arguments),t instanceof Date||Bu(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function mZe(t){if(Xn(1,arguments),!gZe(t)&&typeof t!="number")return!1;var e=vr(t);return!isNaN(Number(e))}function vZe(t,e){Xn(2,arguments);var n=vr(t),r=vr(e),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function yZe(t,e){Xn(2,arguments);var n=vr(t),r=vr(e);return n.getFullYear()-r.getFullYear()}
219function YY(t,e){var n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function bZe(t,e){Xn(2,arguments);var n=vr(t),r=vr(e),i=YY(n,r),s=Math.abs(fZe(n,r));n.setDate(n.getDate()-i*s);var a=+(YY(n,r)===-i),o=i*(s-a);return o===0?0:o}function L7(t,e){return Xn(2,arguments),vr(t).getTime()-vr(e).getTime()}var SZe={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},EZe="trunc";function D7(t){return SZe[EZe]}function T2(t,e,n){Xn(2,arguments);var r=L7(t,e)/P7;return D7()(r)}function xce(t,e,n){Xn(2,arguments);var r=L7(t,e)/O7;return D7()(r)}function TZe(t){Xn(1,arguments);var e=vr(t);return e.setHours(23,59,59,999),e}function AZe(t){Xn(1,arguments);var e=vr(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function wZe(t){Xn(1,arguments);var e=vr(t);return TZe(e).getTime()===AZe(e).getTime()}function _Ze(t,e){Xn(2,arguments);var n=vr(t),r=vr(e),i=kE(n,r),s=Math.abs(vZe(n,r)),a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);var o=kE(n,r)===-i;wZe(vr(t))&&s===1&&kE(t,r)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function CZe(t,e,n){Xn(2,arguments);var r=L7(t,e)/1e3;return D7()(r)}function xZe(t,e){Xn(2,arguments);var n=vr(t),r=vr(e),i=kE(n,r),s=Math.abs(yZe(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=kE(n,r)===-i,o=i*(s-Number(a));return o===0?0:o}function IZe(t,e){Xn(2,arguments);var n=Ra(e);return Cce(t,-n)}var OZe=864e5;function PZe(t){Xn(1,arguments);var e=vr(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/OZe)+1}function uL(t){Xn(1,arguments);var e=1,n=vr(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Ice(t){Xn(1,arguments);var e=vr(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=uL(r),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var a=uL(s);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function RZe(t){Xn(1,arguments);var e=Ice(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=uL(n);return r}var LZe=6048e5;function DZe(t){Xn(1,arguments);var e=vr(t),n=uL(e).getTime()-RZe(e).getTime();return Math.round(n/LZe)+1}function cL(t,e){var n,r,i,s,a,o,l,u;Xn(1,arguments);var c=dx(),d=Ra((n=(r=(i=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=vr(t),h=f.getUTCDay(),g=(h<d?7:0)+h-d;return f.setUTCDate(f.getUTCDate()-g),f.setUTCHours(0,0,0,0),f}function Oce(t,e){var n,r,i,s,a,o,l,u;Xn(1,arguments);var c=vr(t),d=c.getUTCFullYear(),f=dx(),h=Ra((n=(r=(i=(s=e==null?void 0:e.firstWeekContainsDate)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(d+1,0,h),g.setUTCHours(0,0,0,0);var v=cL(g,e),b=new Date(0);b.setUTCFullYear(d,0,h),b.setUTCHours(0,0,0,0);var S=cL(b,e);return c.getTime()>=v.getTime()?d+1:c.getTime()>=S.getTime()?d:d-1}function kZe(t,e){var n,r,i,s,a,o,l,u;Xn(1,arguments);var c=dx(),d=Ra((n=(r=(i=(s=e==null?void 0:e.firstWeekContainsDate)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=Oce(t,e),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var g=cL(h,e);return g}var NZe=6048e5;function MZe(t,e){Xn(1,arguments);var n=vr(t),r=cL(n,e).getTime()-kZe(n,e).getTime();return Math.round(r/NZe)+1}function Bi(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var cm={y:function(e,n){var r=e.getUTCFullYear(),i=r>0?r:1-r;return Bi(n==="yy"?i%100:i,n.length)},M:function(e,n){var r=e.getUTCMonth();return n==="M"?String(r+1):Bi(r+1,2)},d:function(e,n){return Bi(e.getUTCDate(),n.length)},a:function(e,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,n){return Bi(e.getUTCHours()%12||12,n.length)},H:function(e,n){return Bi(e.getUTCHours(),n.length)},m:function(e,n){return Bi(e.getUTCMinutes(),n.length)},s:function(e,n){return Bi(e.getUTCSeconds(),n.length)},S:function(e,n){var r=n.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,r-3));return Bi(s,n.length)}},fS={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},FZe={G:function(e,n,r){var i=e.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(e,n,r){if(n==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return r.ordinalNumber(s,{unit:"year"})}return cm.y(e,n)},Y:function(e,n,r,i){var s=Oce(e,i),a=s>0?s:1-s;if(n==="YY"){var o=a%100;return Bi(o,2)}return n==="Yo"?r.ordinalNumber(a,{unit:"year"}):Bi(a,n.length)},R:function(e,n){var r=Ice(e);return Bi(r,n.length)},u:function(e,n){var r=e.getUTCFullYear();return Bi(r,n.length)},Q:function(e,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return Bi(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return Bi(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,n,r){var i=e.getUTCMonth();switch(n){case"M":case"MM":return cm.M(e,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(e,n,r){var i=e.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return Bi(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(e,n,r,i){var s=MZe(e,i);return n==="wo"?r.ordinalNumber(s,{unit:"week"}):Bi(s,n.length)},I:function(e,n,r){var i=DZe(e);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):Bi(i,n.length)},d:function(e,n,r){return n==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):cm.d(e,n)},D:function(e,n,r){var i=PZe(e);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Bi(i,n.length)},E:function(e,n,r){var i=e.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(e,n,r,i){var s=e.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return Bi(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(e,n,r,i){var s=e.getUTCDay(),a=(s-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return Bi(a,n.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(e,n,r){var i=e.getUTCDay(),s=i===0?7:i;switch(n){case"i":return String(s);case"ii":return Bi(s,n.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(e,n,r){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,n,r){var i=e.getUTCHours(),s;switch(i===12?s=fS.noon:i===0?s=fS.midnight:s=i/12>
vendor: 13,134 bytes, line 219
219=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,n,r){var i=e.getUTCHours(),s;switch(i>=17?s=fS.evening:i>=12?s=fS.afternoon:i>=4?s=fS.morning:s=fS.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,n,r){if(n==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return cm.h(e,n)},H:function(e,n,r){return n==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):cm.H(e,n)},K:function(e,n,r){var i=e.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Bi(i,n.length)},k:function(e,n,r){var i=e.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):Bi(i,n.length)},m:function(e,n,r){return n==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):cm.m(e,n)},s:function(e,n,r){return n==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):cm.s(e,n)},S:function(e,n){return cm.S(e,n)},X:function(e,n,r,i){var s=i._originalDate||e,a=s.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return QY(a);case"XXXX":case"XX":return By(a);case"XXXXX":case"XXX":default:return By(a,":")}},x:function(e,n,r,i){var s=i._originalDate||e,a=s.getTimezoneOffset();switch(n){case"x":return QY(a);case"xxxx":case"xx":return By(a);case"xxxxx":case"xxx":default:return By(a,":")}},O:function(e,n,r,i){var s=i._originalDate||e,a=s.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+ZY(a,":");case"OOOO":default:return"GMT"+By(a,":")}},z:function(e,n,r,i){var s=i._originalDate||e,a=s.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+ZY(a,":");case"zzzz":default:return"GMT"+By(a,":")}},t:function(e,n,r,i){var s=i._originalDate||e,a=Math.floor(s.getTime()/1e3);return Bi(a,n.length)},T:function(e,n,r,i){var s=i._originalDate||e,a=s.getTime();return Bi(a,n.length)}};function ZY(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),s=r%60;if(s===0)return n+String(i);var a=e;return n+String(i)+a+Bi(s,2)}function QY(t,e){if(t%60===0){var n=t>0?"-":"+";return n+Bi(Math.abs(t)/60,2)}return By(t,e)}function By(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t),s=Bi(Math.floor(i/60),2),a=Bi(i%60,2);return r+s+n+a}var XY=function(e,n){switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Pce=function(e,n){switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},$Ze=function(e,n){var r=e.match(/(P+)(p+)?/)||[],i=r[1],s=r[2];if(!s)return XY(e,n);var a;switch(i){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",XY(i,n)).replace("{{time}}",Pce(s,n))},BZe={p:Pce,P:$Ze},UZe=["D","DD"],VZe=["YY","YYYY"];function HZe(t){return UZe.indexOf(t)!==-1}function jZe(t){return VZe.indexOf(t)!==-1}function JY(t,e,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var zZe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},GZe=function(e,n,r){var i,s=zZe[e];return typeof s=="string"?i=s:n===1?i=s.one:i=s.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};function nF(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var WZe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qZe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KZe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},YZe={date:nF({formats:WZe,defaultWidth:"full"}),time:nF({formats:qZe,defaultWidth:"full"}),dateTime:nF({formats:KZe,defaultWidth:"full"})},ZZe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QZe=function(e,n,r,i){return ZZe[e]};function IA(t){return function(e,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):s;i=t.formattingValues[a]||t.formattingValues[s]}else{var o=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[o]}var u=t.argumentCallback?t.argumentCallback(e):e;return i[u]}}var XZe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},JZe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eQe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tQe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nQe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},rQe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iQe=function(e,n){var r=Number(e),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},sQe={ordinalNumber:iQe,era:IA({values:XZe,defaultWidth:"wide"}),quarter:IA({values:JZe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:IA({values:eQe,defaultWidth:"wide"}),day:IA({values:tQe,defaultWidth:"wide"}),dayPeriod:IA({values:nQe,defaultWidth:"wide",formattingValues:rQe,defaultFormattingWidth:"wide"})};function OA(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;var a=s[0],o=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(o)?oQe(o,function(d){return d.test(a)}):aQe(o,function(d){return d.test(a)}),u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var c=e.slice(a.length);return{value:u,rest:c}}}function aQe(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function oQe(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function lQe(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var i=r[0],s=e.match(t.parsePattern);if(!s)return null;var a=t.valueCallback?t.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;var o=e.slice(i.length);return{value:a,rest:o}}}var uQe=/^(\d+)(th|st|nd|rd)?/i,cQe=/\d+/i,dQe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fQe={any:[/^b/i,/^(a|c)/i]},hQe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pQe={any:[/1/i,/2/i,/3/i,/4/i]},gQe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},mQe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},vQe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yQe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bQe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},SQe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},EQe={ordinalNumber:lQe({matchPattern:uQe,parsePattern:cQe,valueCallback:function(e){return parseInt(e,10)}}),era:OA({matchPatterns:dQe,defaultMatchWidth:"wide",parsePatterns:fQe,defaultParseWidth:"any"}),quarter:OA({matchPatterns:hQe,defaultMatchWidth:"wide",parsePatterns:pQe,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:OA({matchPatterns:gQe,defaultMatchWidth:"wide",parsePatterns:mQe,defaultParseWidth:"any"}),day:OA({matchPatterns:vQe,defaultMatchWidth:"wide",parsePatterns:yQe,defaultParseWidth:"any"}),dayPeriod:OA({matchPatterns:bQe,defaultMatchWidth:"any",parsePatterns:SQe,defaultParseWidth:"any"})},Rce={code:"en-US",formatDistance:GZe,formatLong:YZe,formatRelative:QZe,localize:sQe,match:EQe,options:{weekStartsOn:0,firstWeekContainsDate:1}},TQe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,AQe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wQe=/^'([^]*?)'?$/,_Qe=/''/g,CQe=/[a-zA-Z]/;function Xh(t,e,n){var r,i,s,a,o,l,u,c,d,f,h,g,v,b;Xn(2,arguments);var S=String(e),A=dx(),w=(r=(i=void 0)!==null&&i!==void 0?i:A.locale)!==null&&r!==void 0?r:Rce,x=Ra((s=(a=(o=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&o!==void 0?o:A.firstWeekContainsDate)!==null&&a!==void 0?a:(u=A.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=Ra((d=(f=(h=(g=void 0)!==null&&g!==void 0?g:void 0)!==null&&h!==void 0?h:A.weekStartsOn)!==null&&f!==void 0?f:(v=A.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&d!==void 0?d:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var N=vr(t);if(!mZe(N))throw new RangeError("Invalid time value");var k=FU(N),U=IZe(N,k),H={firstWeekContainsDate:x,weekStartsOn:P,locale:w,_originalDate:N},B=S.match(AQe).map(function(q){var Z=q[0];
219if(Z==="p"||Z==="P"){var C=BZe[Z];return C(q,w.formatLong)}return q}).join("").match(TQe).map(function(q){if(q==="''")return"'";var Z=q[0];if(Z==="'")return xQe(q);var C=FZe[Z];if(C)return jZe(q)&&JY(q,e,String(t)),HZe(q)&&JY(q,e,String(t)),C(U,q,w.localize,H);if(Z.match(CQe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Z+"`");return q}).join("");return B}function xQe(t){var e=t.match(wQe);return e?e[1].replace(_Qe,"'"):t}var IQe=["years","months","weeks","days","hours","minutes","seconds"];function $U(t,e){var n,r,i,s,a;if(arguments.length<1)throw new TypeError("1 argument required, but only ".concat(arguments.length," present"));var o=dx(),l=(n=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:o.locale)!==null&&n!==void 0?n:Rce,u=(i=e==null?void 0:e.format)!==null&&i!==void 0?i:IQe,c=(s=e==null?void 0:e.zero)!==null&&s!==void 0?s:!1,d=(a=e==null?void 0:e.delimiter)!==null&&a!==void 0?a:" ";if(!l.formatDistance)return"";var f=u.reduce(function(h,g){var v="x".concat(g.replace(/(^.)/,function(S){return S.toUpperCase()})),b=t[g];return typeof b=="number"&&(c||t[g])?h.concat(l.formatDistance(v,b)):h},[]).join(d);return f}function dL(t){Xn(1,arguments);var e=Ra(t);return vr(e*1e3)}function OQe(t){Xn(1,arguments);var e=vr(t),n=e.getMinutes();return n}function PQe(t){Xn(1,arguments);var e=vr(t),n=e.getTime();return n}function RQe(t){return Xn(1,arguments),Math.floor(PQe(t)/1e3)}function LQe(t){Xn(1,arguments);var e=vr(t.start),n=vr(t.end);if(isNaN(e.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw new RangeError("End Date is invalid");var r={};r.years=Math.abs(xZe(n,e));var i=kE(n,e),s=xA(e,{years:i*r.years});r.months=Math.abs(_Ze(n,s));var a=xA(s,{months:i*r.months});r.days=Math.abs(bZe(n,a));var o=xA(a,{days:i*r.days});r.hours=Math.abs(T2(n,o));var l=xA(o,{hours:i*r.hours});r.minutes=Math.abs(xce(n,l));var u=xA(l,{minutes:i*r.minutes});return r.seconds=Math.abs(CZe(n,u)),r}function eZ(t,e){Xn(2,arguments);var n=vr(t),r=vr(e);return n.getTime()>r.getTime()}function K0(t,e){Xn(2,arguments);var n=vr(t),r=vr(e);return n.getTime()<r.getTime()}function Lce(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lce=function(){return!!t})()}function Dce(t){return Xn(1,arguments),R7(t,Date.now())}function kce(t,e){Xn(2,arguments);var n=Ra(e);return q0(t,-n)}function Nce(t){return Xn(1,arguments),R7(t,kce(Date.now(),1))}function fL(t,e){var n;Xn(1,arguments);var r=Ra((n=void 0)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=MQe(t),s;if(i.date){var a=FQe(i.date,r);s=$Qe(a.restDateString,a.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var o=s.getTime(),l=0,u;if(i.time&&(l=BQe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(u=UQe(i.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(o+l),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return new Date(o+l+u)}var hO={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},DQe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kQe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,NQe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function MQe(t){var e={},n=t.split(hO.dateTimeDelimiter),r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],hO.timeZoneDelimiter.test(e.date)&&(e.date=t.split(hO.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){var i=hO.timezone.exec(r);i?(e.time=r.replace(i[1],""),e.timezone=i[1]):e.time=r}return e}function FQe(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:s===null?i:s*100,restDateString:t.slice((r[1]||r[2]).length)}}function $Qe(t,e){if(e===null)return new Date(NaN);var n=t.match(DQe);if(!n)return new Date(NaN);var r=!!n[4],i=PA(n[1]),s=PA(n[2])-1,a=PA(n[3]),o=PA(n[4]),l=PA(n[5])-1;if(r)return GQe(e,o,l)?VQe(e,o,l):new Date(NaN);var u=new Date(0);return!jQe(e,s,a)||!zQe(e,i)?new Date(NaN):(u.setUTCFullYear(e,s,Math.max(i,a)),u)}function PA(t){return t?parseInt(t):1}function BQe(t){var e=t.match(kQe);
219if(!e)return NaN;var n=rF(e[1]),r=rF(e[2]),i=rF(e[3]);return WQe(n,r,i)?n*P7+r*O7+i*1e3:NaN}function rF(t){return t&&parseFloat(t.replace(",","."))||0}function UQe(t){if(t==="Z")return 0;var e=t.match(NQe);if(!e)return 0;var n=e[1]==="+"?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return qQe(r,i)?n*(r*P7+i*O7):NaN}function VQe(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=r.getUTCDay()||7,s=(e-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+s),r}var HQe=[31,null,31,30,31,30,31,31,30,31,30,31];function Mce(t){return t%400===0||t%4===0&&t%100!==0}function jQe(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(HQe[e]||(Mce(t)?29:28))}function zQe(t,e){return e>=1&&e<=(Mce(t)?366:365)}function GQe(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function WQe(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function qQe(t,e){return e>=0&&e<=59}function tZ(t){return Xn(1,arguments),t*hZe}function KQe(t){Xn(1,arguments);var e=t/pZe;return Math.floor(e)}function YQe(t,e){Xn(2,arguments);var n=Ra(e);return uZe(t,-n)}var ZQe=Ble,QQe=Vle,XQe=a2,JQe=Ld,eXe=tx,tXe=z9,nXe=q9,rXe=W9,iXe="[object Map]",sXe="[object Set]",aXe=Object.prototype,oXe=aXe.hasOwnProperty;function lXe(t){if(t==null)return!0;if(eXe(t)&&(JQe(t)||typeof t=="string"||typeof t.splice=="function"||tXe(t)||rXe(t)||XQe(t)))return!t.length;var e=QQe(t);if(e==iXe||e==sXe)return!t.size;if(nXe(t))return!ZQe(t).length;for(var n in t)if(oXe.call(t,n))return!1;return!0}var uXe=lXe;const Fce=pi(uXe);var cXe=K9;function dXe(t,e){return cXe(t,e)}var fXe=dXe;const k7=pi(fXe);var Ti;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ti||(Ti={}));var nZ;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(nZ||(nZ={}));const Tn=Ti.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Om=t=>{switch(typeof t){case"undefined":return Tn.undefined;case"string":return Tn.string;case"number":return Number.isNaN(t)?Tn.nan:Tn.number;case"boolean":return Tn.boolean;case"function":return Tn.function;case"bigint":return Tn.bigint;case"symbol":return Tn.symbol;case"object":return Array.isArray(t)?Tn.array:t===null?Tn.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Tn.promise:typeof Map<"u"&&t instanceof Map?Tn.map:typeof Set<"u"&&t instanceof Set?Tn.set:typeof Date<"u"&&t instanceof Date?Tn.date:Tn.object;default:return Tn.unknown}}
vendor: 4,379 bytes, line 219
219,Kt=Ti.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ig extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const u=a.path[l];l===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(a))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return i(this),r}static assert(e){if(!(e instanceof Ig))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ti.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ig.create=t=>new Ig(t);const BU=(t,e)=>{let n;switch(t.code){case Kt.invalid_type:t.received===Tn.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Kt.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ti.jsonStringifyReplacer)}`;break;case Kt.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ti.joinValues(t.keys,", ")}`;break;case Kt.invalid_union:n="Invalid input";break;case Kt.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ti.joinValues(t.options)}`;break;case Kt.invalid_enum_value:n=`Invalid enum value. Expected ${Ti.joinValues(t.options)}, received '${t.received}'`;break;case Kt.invalid_arguments:n="Invalid function arguments";break;case Kt.invalid_return_type:n="Invalid function return type";break;case Kt.invalid_date:n="Invalid date";break;case Kt.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ti.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Kt.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Kt.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Kt.custom:n="Invalid input";break;
vendor: 5,151 bytes, line 219
219case Kt.invalid_intersection_types:n="Intersection results could not be merged";break;case Kt.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Kt.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ti.assertNever(t)}return{message:n}};let hXe=BU;function pXe(){return hXe}const gXe=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)o=u(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}};function pn(t,e){const n=pXe(),r=gXe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===BU?void 0:BU].filter(i=>!!i)});t.common.issues.push(r)}class uu{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return or;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return uu.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return or;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const or=Object.freeze({status:"aborted"}),ow=t=>({status:"dirty",value:t}),kd=t=>({status:"valid",value:t}),rZ=t=>t.status==="aborted",iZ=t=>t.status==="dirty",w1=t=>t.status==="valid",hL=t=>typeof Promise<"u"&&t instanceof Promise;var On;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(On||(On={}));class Jh{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const sZ=(t,e)=>{if(w1(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ig(t.common.issues);return this._error=n,this._error}}};function xr(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{const{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:i}}let ai=class{get description(){return this._def.description}_getType(e){return Om(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Om(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new uu,ctx:{common:e.parent.common,data:e.data,parsedType:Om(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(hL(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Om(e)},i=this._parseSync({data:e,path:r.path,parent:r});return sZ(r,i)}"~validate"(e){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Om(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:n});return w1(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(r=s==null?void 0:s.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(s=>w1(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Om(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(hL(i)?i:Promise.resolve(i));return sZ(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:Kt.custom,...r(i)});
vendor: 6,128 bytes, line 219
219return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new C1({schema:this,typeName:rr.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return mv.create(this,this._def)}nullable(){return x1.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _1.create(this)}promise(){return bL.create(this,this._def)}or(e){return mL.create([this,e],this._def)}and(e){return vL.create(this,e,this._def)}transform(e){return new C1({...xr(this._def),schema:this,typeName:rr.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new qU({...xr(this._def),innerType:this,defaultValue:n,typeName:rr.ZodDefault})}brand(){return new $Xe({typeName:rr.ZodBranded,type:this,...xr(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new KU({...xr(this._def),innerType:this,catchValue:n,typeName:rr.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return M7.create(this,e)}readonly(){return YU.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const mXe=/^c[^\s-]{8,}$/i,vXe=/^[0-9a-z]+$/,yXe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bXe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,SXe=/^[a-z0-9_-]{21}$/i,EXe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,TXe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,AXe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wXe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let iF;const _Xe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CXe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xXe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,IXe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,OXe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,PXe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$ce="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",RXe=new RegExp(`^${$ce}$`);function Bce(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function LXe(t){return new RegExp(`^${Bce(t)}$`)}function DXe(t){let e=`${$ce}T${Bce(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function kXe(t,e){return!!((e==="v4"||!e)&&_Xe.test(t)||(e==="v6"||!e)&&xXe.test(t))}function NXe(t,e){if(!EXe.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function MXe(t,e){return!!((e==="v4"||!e)&&CXe.test(t)||(e==="v6"||!e)&&IXe.test(t))}let pL=class lw extends ai{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Tn.string){const s=this._getOrReturnCtx(e);
vendor: 8,751 bytes, line 219
219return pn(s,{code:Kt.invalid_type,expected:Tn.string,received:s.parsedType}),or}const r=new uu;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?pn(i,{code:Kt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&pn(i,{code:Kt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")AXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"email",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")iF||(iF=new RegExp(wXe,"u")),iF.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"emoji",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")bXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"uuid",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")SXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"nanoid",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")mXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"cuid",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")vXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"cuid2",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")yXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"ulid",code:Kt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),pn(i,{validation:"url",code:Kt.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"regex",code:Kt.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?DXe(s).test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?RXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?LXe(s).test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?TXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"duration",code:Kt.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?kXe(e.data,s.version)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"ip",code:Kt.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?NXe(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"jwt",code:Kt.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?MXe(e.data,s.version)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"cidr",code:Kt.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?OXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"base64",code:Kt.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?PXe.test(e.data)||(i=this._getOrReturnCtx(e,i),pn(i,{validation:"base64url",code:Kt.invalid_string,message:s.message}),r.dirty()):Ti.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Kt.invalid_string,...On.errToObj(r)})}_addCheck(e){return new lw({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...On.errToObj(e)})}url(e){return this._addCheck({kind:"url",...On.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...On.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...On.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...On.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...On.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...On.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...On.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...On.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...On.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...On.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...On.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...On.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...On.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...On.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...On.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...On.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...On.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...On.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...On.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...On.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...On.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...On.errToObj(n)})}nonempty(e){return this.min(1,On.errToObj(e))}trim(){return new lw({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new lw({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new lw({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};pL.create=t=>new pL({checks:[],typeName:rr.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...xr(t)});function FXe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return s%a/10**i}let UU=class VU extends ai{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Tn.number){const s=this._getOrReturnCtx(e);
vendor: 8,652 bytes, line 219
219return pn(s,{code:Kt.invalid_type,expected:Tn.number,received:s.parsedType}),or}let r;const i=new uu;for(const s of this._def.checks)s.kind==="int"?Ti.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?FXe(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.not_finite,message:s.message}),i.dirty()):Ti.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,On.toString(n))}gt(e,n){return this.setLimit("min",e,!1,On.toString(n))}lte(e,n){return this.setLimit("max",e,!0,On.toString(n))}lt(e,n){return this.setLimit("max",e,!1,On.toString(n))}setLimit(e,n,r,i){return new VU({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:On.toString(i)}]})}_addCheck(e){return new VU({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:On.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:On.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:On.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:On.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:On.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:On.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:On.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:On.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:On.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ti.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};UU.create=t=>new UU({checks:[],typeName:rr.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xr(t)});class Y_ extends ai{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Tn.bigint)return this._getInvalidInput(e);let r;const i=new uu;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),pn(r,{code:Kt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ti.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return pn(n,{code:Kt.invalid_type,expected:Tn.bigint,received:n.parsedType}),or}gte(e,n){return this.setLimit("min",e,!0,On.toString(n))}gt(e,n){return this.setLimit("min",e,!1,On.toString(n))}lte(e,n){return this.setLimit("max",e,!0,On.toString(n))}lt(e,n){return this.setLimit("max",e,!1,On.toString(n))}setLimit(e,n,r,i){return new Y_({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:On.toString(i)}]})}_addCheck(e){return new Y_({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:On.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:On.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:On.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:On.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:On.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Y_.create=t=>new Y_({checks:[],typeName:rr.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...xr(t)});let aZ=class extends ai{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Tn.boolean){const r=this._getOrReturnCtx(e);return pn(r,{code:Kt.invalid_type,expected:Tn.boolean,received:r.parsedType}),or}return kd(e.data)}};aZ.create=t=>new aZ({typeName:rr.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xr(t)});class gL extends ai{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Tn.date){const s=this._getOrReturnCtx(e);return pn(s,{code:Kt.invalid_type,expected:Tn.date,received:s.parsedType}),or}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return pn(s,{code:Kt.invalid_date}),or}const r=new uu;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),pn(i,{code:Kt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Ti.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new gL({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:On.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:On.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}gL.create=t=>new gL({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:rr.ZodDate,...xr(t)});class oZ extends ai{_parse(e){if(this._getType(e)!==Tn.symbol){const r=this._getOrReturnCtx(e);return pn(r,{code:Kt.invalid_type,expected:Tn.symbol,received:r.parsedType}),or}return kd(e.data)}}oZ.create=t=>new oZ({typeName:rr.ZodSymbol,...xr(t)});class lZ extends ai{_parse(e){if(this._getType(e)!==Tn.undefined){const r=this._getOrReturnCtx(e);return pn(r,{code:Kt.invalid_type,expected:Tn.undefined,received:r.parsedType}),or}return kd(e.data)}}lZ.create=t=>new lZ({typeName:rr.ZodUndefined,...xr(t)});class uZ extends ai{_parse(e){if(this._getType(e)!==Tn.null){const r=this._getOrReturnCtx(e);return pn(r,{code:Kt.invalid_type,expected:Tn.null,received:r.parsedType}),or}return kd(e.data)}}uZ.create=t=>new uZ({typeName:rr.ZodNull,...xr(t)});class HU extends ai{constructor(){super(...arguments),this._any=!0}_parse(e){return kd(e.data)}}HU.create=t=>new HU({typeName:rr.ZodAny,...xr(t)});let cZ=class extends ai{constructor(){super(...arguments),this._unknown=!0}_parse(e){return kd(e.data)}};cZ.create=t=>new cZ({typeName:rr.ZodUnknown,...xr(t)});let _v=class extends ai{_parse(e){const n=this._getOrReturnCtx(e);return pn(n,{code:Kt.invalid_type,expected:Tn.never,received:n.parsedType}),or}};_v.create=t=>new _v({typeName:rr.ZodNever,...xr(t)});class dZ extends ai{_parse(e){if(this._getType(e)!==Tn.undefined){const r=this._getOrReturnCtx(e);return pn(r,{code:Kt.invalid_type,expected:Tn.void,received:r.parsedType}),or}return kd(e.data)}}dZ.create=t=>new dZ({typeName:rr.ZodVoid,...xr(t)});let _1=class kP extends ai{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;
vendor: 5,508 bytes, line 219
219if(n.parsedType!==Tn.array)return pn(n,{code:Kt.invalid_type,expected:Tn.array,received:n.parsedType}),or;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(pn(n,{code:a?Kt.too_big:Kt.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(pn(n,{code:Kt.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(pn(n,{code:Kt.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new Jh(n,a,n.path,o)))).then(a=>uu.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new Jh(n,a,n.path,o)));return uu.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new kP({...this._def,minLength:{value:e,message:On.toString(n)}})}max(e,n){return new kP({...this._def,maxLength:{value:e,message:On.toString(n)}})}length(e,n){return new kP({...this._def,exactLength:{value:e,message:On.toString(n)}})}nonempty(e){return this.min(1,e)}};_1.create=(t,e)=>new _1({type:t,minLength:null,maxLength:null,exactLength:null,typeName:rr.ZodArray,...xr(e)});function NS(t){if(t instanceof Og){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=mv.create(NS(r))}return new Og({...t._def,shape:()=>e})}else return t instanceof _1?new _1({...t._def,type:NS(t.element)}):t instanceof mv?mv.create(NS(t.unwrap())):t instanceof x1?x1.create(NS(t.unwrap())):t instanceof Y0?Y0.create(t.items.map(e=>NS(e))):t}let Og=class of extends ai{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ti.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Tn.object){const u=this._getOrReturnCtx(e);return pn(u,{code:Kt.invalid_type,expected:Tn.object,received:u.parsedType}),or}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof _v&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||o.push(u);const l=[];for(const u of a){const c=s[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jh(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof _v){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")o.length>0&&(pn(i,{code:Kt.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jh(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>uu.mergeObjectSync(r,u)):uu.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return On.errToObj,new of({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var s,a;const i=((a=(s=this._def).errorMap)==null?void 0:a.call(s,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:On.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new of({...this._def,unknownKeys:"strip"})}passthrough(){return new of({...this._def,unknownKeys:"passthrough"})}extend(e){return new of({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new of({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:rr.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new of({...this._def,catchall:e})}pick(e){const n={};for(const r of Ti.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new of({...this._def,shape:()=>n})}omit(e){const n={};for(const r of Ti.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new of({...this._def,shape:()=>n})}deepPartial(){return NS(this)}partial(e){const n={};for(const r of Ti.objectKeys(this.shape)){const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new of({...this._def,shape:()=>n})}required(e){const n={};for(const r of Ti.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof mv;)s=s._def.innerType;n[r]=s}return new of({...this._def,shape:()=>n})}keyof(){return Uce(Ti.objectKeys(this.shape))}};Og.create=(t,e)=>new Og({shape:()=>t,unknownKeys:"strip",catchall:_v.create(),typeName:rr.ZodObject,...xr(e)});Og.strictCreate=(t,e)=>new Og({shape:()=>t,unknownKeys:"strict",catchall:_v.create(),typeName:rr.ZodObject,...xr(e)});Og.lazycreate=(t,e)=>new Og({shape:t,unknownKeys:"strip",catchall:_v.create(),typeName:rr.ZodObject,...xr(e)});let mL=class extends ai{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Ig(o.ctx.common.issues));
vendor: 4,104 bytes, line 219
219return pn(n,{code:Kt.invalid_union,unionErrors:a}),or}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new Ig(l));return pn(n,{code:Kt.invalid_union,unionErrors:o}),or}}get options(){return this._def.options}};mL.create=(t,e)=>new mL({options:t,typeName:rr.ZodUnion,...xr(e)});function jU(t,e){const n=Om(t),r=Om(e);if(t===e)return{valid:!0,data:t};if(n===Tn.object&&r===Tn.object){const i=Ti.objectKeys(e),s=Ti.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=jU(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===Tn.array&&r===Tn.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=jU(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Tn.date&&r===Tn.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let vL=class extends ai{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(rZ(s)||rZ(a))return or;const o=jU(s.value,a.value);return o.valid?((iZ(s)||iZ(a))&&n.dirty(),{status:n.value,value:o.data}):(pn(r,{code:Kt.invalid_intersection_types}),or)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};vL.create=(t,e,n)=>new vL({left:t,right:e,typeName:rr.ZodIntersection,...xr(n)});class Y0 extends ai{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Tn.array)return pn(r,{code:Kt.invalid_type,expected:Tn.array,received:r.parsedType}),or;if(r.data.length<this._def.items.length)return pn(r,{code:Kt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),or;!this._def.rest&&r.data.length>this._def.items.length&&(pn(r,{code:Kt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Jh(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>uu.mergeArray(n,a)):uu.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Y0({...this._def,rest:e})}}Y0.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Y0({items:t,typeName:rr.ZodTuple,rest:null,...xr(e)})};class yL extends ai{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Tn.object)return pn(r,{code:Kt.invalid_type,expected:Tn.object,received:r.parsedType}),or;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new Jh(r,o,r.path,o)),value:a._parse(new Jh(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?uu.mergeObjectAsync(n,i):uu.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof ai?new yL({keyType:e,valueType:n,typeName:rr.ZodRecord,...xr(r)}):new yL({keyType:pL.create(),valueType:e,typeName:rr.ZodRecord,...xr(n)})}}class fZ extends ai{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Tn.map)return pn(r,{code:Kt.invalid_type,expected:Tn.map,received:r.parsedType}),or;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],u)=>
vendor: 4,134 bytes, line 219
219({key:i._parse(new Jh(r,o,r.path,[u,"key"])),value:s._parse(new Jh(r,l,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return or;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return or;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}}}}fZ.create=(t,e,n)=>new fZ({valueType:e,keyType:t,typeName:rr.ZodMap,...xr(n)});class Z_ extends ai{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Tn.set)return pn(r,{code:Kt.invalid_type,expected:Tn.set,received:r.parsedType}),or;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(pn(r,{code:Kt.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(pn(r,{code:Kt.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return or;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((l,u)=>s._parse(new Jh(r,l,r.path,u)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new Z_({...this._def,minSize:{value:e,message:On.toString(n)}})}max(e,n){return new Z_({...this._def,maxSize:{value:e,message:On.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Z_.create=(t,e)=>new Z_({valueType:t,minSize:null,maxSize:null,typeName:rr.ZodSet,...xr(e)});class hZ extends ai{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}hZ.create=(t,e)=>new hZ({getter:t,typeName:rr.ZodLazy,...xr(e)});class zU extends ai{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return pn(n,{received:n.data,code:Kt.invalid_literal,expected:this._def.value}),or}return{status:"valid",value:e.data}}get value(){return this._def.value}}zU.create=(t,e)=>new zU({value:t,typeName:rr.ZodLiteral,...xr(e)});function Uce(t,e){return new N7({values:t,typeName:rr.ZodEnum,...xr(e)})}let N7=class GU extends ai{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return pn(n,{expected:Ti.joinValues(r),received:n.parsedType,code:Kt.invalid_type}),or}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return pn(n,{received:n.data,code:Kt.invalid_enum_value,options:r}),or}return kd(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return GU.create(e,{...this._def,...n})}exclude(e,n=this._def){return GU.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};N7.create=Uce;class WU extends ai{_parse(e){const n=Ti.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Tn.string&&r.parsedType!==Tn.number){const i=Ti.objectValues(n);return pn(r,{expected:Ti.joinValues(i),received:r.parsedType,code:Kt.invalid_type}),or}if(this._cache||(this._cache=new Set(Ti.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=Ti.objectValues(n);return pn(r,{received:r.data,code:Kt.invalid_enum_value,options:i}),or}return kd(e.data)}get enum(){return this._def.values}}WU.create=(t,e)=>new WU({values:t,typeName:rr.ZodNativeEnum,...xr(e)});class bL extends ai{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Tn.promise&&n.common.async===!1)return pn(n,{code:Kt.invali
vendor: 4,095 bytes, line 219
219d_type,expected:Tn.promise,received:n.parsedType}),or;const r=n.parsedType===Tn.promise?n.data:Promise.resolve(n.data);return kd(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}bL.create=(t,e)=>new bL({type:t,typeName:rr.ZodPromise,...xr(e)});class C1 extends ai{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===rr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{pn(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return or;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?or:l.status==="dirty"||n.value==="dirty"?ow(l.value):l});{if(n.value==="aborted")return or;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?or:o.status==="dirty"||n.value==="dirty"?ow(o.value):o}}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?or:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?or:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!w1(a))return or;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>w1(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):or);Ti.assertNever(i)}}C1.create=(t,e,n)=>new C1({schema:t,typeName:rr.ZodEffects,effect:e,...xr(n)});C1.createWithPreprocess=(t,e,n)=>new C1({schema:e,effect:{type:"preprocess",transform:t},typeName:rr.ZodEffects,...xr(n)});let mv=class extends ai{_parse(e){return this._getType(e)===Tn.undefined?kd(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};mv.create=(t,e)=>new mv({innerType:t,typeName:rr.ZodOptional,...xr(e)});let x1=class extends ai{_parse(e){return this._getType(e)===Tn.null?kd(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};x1.create=(t,e)=>new x1({innerType:t,typeName:rr.ZodNullable,...xr(e)});let qU=class extends ai{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Tn.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};qU.create=(t,e)=>new qU({innerType:t,typeName:rr.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xr(e)});let KU=class extends ai{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return hL(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ig(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ig(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};KU.create=(t,e)=>new KU({innerType:t,typeName:rr.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xr(e)});class pZ extends ai{_parse(e){if(this._getType(e)!==Tn.nan){const r=this._getOrReturnCtx(e);
219return pn(r,{code:Kt.invalid_type,expected:Tn.nan,received:r.parsedType}),or}return{status:"valid",value:e.data}}}pZ.create=t=>new pZ({typeName:rr.ZodNaN,...xr(t)});class $Xe extends ai{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class M7 extends ai{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?or:s.status==="dirty"?(n.dirty(),ow(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?or:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new M7({in:e,out:n,typeName:rr.ZodPipeline})}}let YU=class extends ai{_parse(e){const n=this._def.innerType._parse(e),r=i=>(w1(i)&&(i.value=Object.freeze(i.value)),i);return hL(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}};YU.create=(t,e)=>new YU({innerType:t,typeName:rr.ZodReadonly,...xr(e)});var rr;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(rr||(rr={}));const Tc=pL.create,BXe=UU.create,gZ=HU.create;_v.create;const Vce=_1.create,F7=Og.create,UXe=mL.create;vL.create;Y0.create;const mZ=yL.create,VXe=zU.create;N7.create;const $7=WU.create;bL.create;mv.create;x1.create;const HXe=t=>t instanceof au,Hce=t=>t instanceof gg;var T0=(t=>(t.FEMALE="FEMALE",t.MALE="MALE",t.NON_BINARY="NON_BINARY",t.NOT_SPECIFIED="PREFER_NOT_TO_SAY",t))(T0||{});const jXe=F7({dateOfBirth:Tc().optional(),emailAddress:Tc(),birthYear:BXe().optional(),firstName:Tc().optional(),gender:UXe([$7(T0),VXe("")]).optional(),lastLogin:Tc().optional(),lastName:Tc().optional(),notifications:Vce(gZ()).optional(),userType:gZ().optional(),zipCode:Tc().optional()});var SL=(t=>(t.OPT_IN="OPT_IN",t.OPT_OUT="OPT_OUT",t))(SL||{}),rg=(t=>(t.OPT_IN="OPT_IN",t.OPT_OUT="OPT_OUT",t.INELIGIBLE="INELIGIBLE",t))(rg||{});const zXe=(t,e)=>{const n=e.getId(),{items:r}=t;let i=!1;if(n){for(let s=0;s<r.length;s++)if(r[s].getId()===n){i=!0;break}}return i===!1&&e&&r.push(e),r.length===1&&(t.currentId=r[0].getId()),t},ZU=(t,e)=>"items"in e?e.items.findIndex(n=>(n==null?void 0:n.getId())===t):"queue"in e?e.queue.findIndex(n=>n===t):-1,vZ=(t,e)=>(ZU(t,e)>=0&&(e.currentId=t),e.currentId===t),yZ=t=>HXe(t)||Hce(t),GXe=(t,e)=>{if(e==null)return t;for(const r in e){const i=t[r],s=e[r];i&&i>s&&delete e[r]}return{...e,...t}},WXe=(t,e)=>{if(t.length===0)return e;const n=[...e],r=new Set(e.map(i=>i.contentId));return t.forEach(i=>{r.has(i.contentId)||n.push(i)}),n};class qXe{constructor(e){et(this,"dataStore");et(this,"unauthenticatedPlaybackTime");et(this,"maxFreeListeningTime");this.dataStore=e.dataStore,this.unauthenticatedPlaybackTime=this.dataStore.getDataSync(tr.UNAUTHENTICATED_PLAYBACK_TIME)??0,this.maxFreeListeningTime=this.dataStore.getDataSync(tr.UNAUTHENTICATED_PLAYBACK_MAX_DURATION),this.isNewDay()&&this.resetPlayedContentDaily()}getUnauthenticatedPlaybackTime(){return this.unauthenticatedPlaybackTime}getMaxFreeListeningTime(){return this.maxFreeListeningTime}setUnauthenticatedPlaybackTime(e){this.unauthenticatedPlaybackTime=e,this.dataStore.setDataSync(tr.UNAUTHENTICATED_PLAYBACK_TIME,e)}resetPlayedContentDaily(){this.setUnauthenticatedPlaybackTime(0),this.dataStore.setDataSync(tr.UNAUTHENTICATED_PLAYBACK_LAST_RESET_DATE,new Date().getTime())}isNewDay(){const e=new Date().getTime(),n=this.dataStore.getDataSync(tr.UNAUTHENTICATED_PLAYBACK_LAST_RESET_DATE),r=n?+n:null;return!r||!R7(e,r)}}class KXe{constructor(e){et(this,"profile");et(this,"campaign");this.advertisingIdFunction=e}get age(){var n;const e=(n=this.profile)==null?void 0:n.dateOfBirth;return e?(Date.now()-new Date(e).getTime())/315576e5|0:void 0}get zip(){var n;const e=(n=this.profile)==null?void 0:n.zipCode;if(e&&eKe(e))return e}get yearofBirth(){var r,i;const e=(r=this.profile)==null?void 0:r.birthYear;if(e)return`${e}`;const n=(i=this.profile)==null?void 0:i.dateOfBirth;if(n)return n.split("-")[0]}get gender(){var n;switch((n=this.profile)==null?void 0:n.gender){case T0.MALE:return"M";case T0.FEMALE:return"F"}}get getAdvertisingId(){return this.advertisingIdFunction}}
219class YXe{constructor(e){et(this,"dataStore");et(this,"logger");et(this,"playerVolume");et(this,"authData",{state:Bn.NONE});et(this,"profileApi");et(this,"experienceApi");et(this,"eventListener");et(this,"queueListeners",[]);et(this,"playbacksListeners",[]);et(this,"authConfig");et(this,"profileEventListener");et(this,"historyEventListener");et(this,"historyQueue",[]);et(this,"writingHistory",!1);et(this,"_marketingDataProvider");et(this,"callBrazeEvent");et(this,"removeFromBrazeAttributeArray");et(this,"addToBrazeAttributeArray");et(this,"currentHistorySessionId");et(this,"currentSessionId");et(this,"getFollowsPromise",null);et(this,"getProfilePromise",null);et(this,"getIncompletePromise",null);et(this,"historyPromise");et(this,"setProfileData",async e=>{var n;if(this.getAuthState()===Bn.AUTH){await this.checkForAuthError(this.profileApi.patchProfileData(e)),this.clearLocalProfile();const r=await this.getProfileData();return(n=this.profileEventListener)==null||n.call(this,r),r}});et(this,"setPreferences",async e=>{this.getAuthState()===Bn.AUTH&&await this.checkForAuthError(this.profileApi.setPreferences(e))});et(this,"setVolume",e=>{this.playerVolume=e,this.dataStore.setData("volume",e)});et(this,"getVolume",async()=>this.playerVolume||await this.dataStore.getData("volume")||1);et(this,"setIsMuted",e=>{this.dataStore.setData("isMuted",e)});et(this,"getIsMuted",async()=>await this.dataStore.getData("isMuted")??!1);et(this,"setPlaybackRate",e=>{this.dataStore.setData("rate",e)});et(this,"getPlaybackRate",async()=>await this.dataStore.getData("rate")??1);et(this,"setIsSoftDeleted",e=>{this.dataStore.setData(tr.IS_SOFT_DELETED,e)});et(this,"getIsSoftDeleted",async()=>await this.dataStore.getData(tr.IS_SOFT_DELETED)??!1);this.logger=e.logger,this.profileApi=e.profileApi,this.experienceApi=e.experienceApi,this.eventListener=e.eventListener,this.dataStore=e.dataStore,this.playerVolume=e.playerVolume,this.authConfig={appName:e.appName,appVersion:e.appVersion,language:e.language,baseUrl:rE[e.env],plat:(()=>{switch(e.platform){case bs.ANDROID:return"android";case bs.ANDROID_CREATOR:return"androidCreator";case bs.IOS:return"ios";case bs.IOS_CREATOR:return"iosCreator";case bs.WEB:default:return"ott"}})()},this.profileEventListener=e.profileEventListener,this.historyEventListener=e.historyEventListener,this._marketingDataProvider=new KXe(e.getAdvertisingId),this.callBrazeEvent=e.callBrazeEvent,this.removeFromBrazeAttributeArray=e.removeFromBrazeAttributeArray,this.addToBrazeAttributeArray=e.addToBrazeAttributeArray,this.cleanPlaybacks(),setTimeout(()=>{this.setAdParameters()},0)}setEventListener(e){this.eventListener=e}get marketingDataProvider(){return this._marketingDataProvider}async setAdParameters(){const e=await this.getProfileData();this._marketingDataProvider.profile=e}setCampaignData(e){this._marketingDataProvider.campaign=e}async getIncompleteProfileData(){return this.getAuthState()===Bn.AUTH?(this.getIncompletePromise||(this.getIncompletePromise=new Promise((n,r)=>{this.checkForAuthError(this.profileApi.getIncompleteProfileData()).then(n).catch(r)}).finally(()=>{this.getIncompletePromise=null})),this.getIncompletePromise):null}async getProfileData(){var r,i,s;const e={};if(!(this.getAuthState()===Bn.AUTH))return e;try{const a=await this.profileApi.getProfileData(),o=a==null?void 0:a.profile;if(o)try{return jXe.parse(o)}catch(l){return(r=this.logger)==null||r.error("Invalid profile shape received from API",l),e}else return(i=this.logger)==null||i.error("Undefined profile received from API"),e}catch(a){return(s=this.logger)==null||s.error("Error fetching profile from API",a),e}}clearLocalProfile(){ys.delete(nU)}async getPreferences(){return this.getAuthState()===Bn.AUTH?await this.checkForAuthError(this.profileApi.getPreferences()):{}}async getAdTargetingStatus(){let e;return this.getAuthState()===Bn.AUTH&&(e=await this.checkForAuthError(this.profileApi.getAdTargetingStatus()),/^INELIGIBLE.*$/.test(e.adTargeting)&&(e.adTargeting="INELIGIBLE")),e}async setAdTargetingStatus(e){this.getAuthState()===Bn.AUTH&&await this.checkForAuthError(this.profileApi.setAdTargetingStatus(e))}async getAdTargetingEligibility(){let e;return this.getAuthState()===Bn.AUTH&&(e=await this.checkForAuthError(this.profileApi.getAdTargetingEligibility())),e}addPlaybacksListener(e){this.playbacksListeners.indexOf(e)<0&&this.playbacksListeners.push(e)}removePlaybacksListener(e){const n=this.playbacksListeners.indexOf(e);n>=0&&this.playbacksListeners.splice(n,1)}cleanPlaybacks(){const e={...this.dataStore.getDataSync("playbacks")},n=Date.now()/1e3-604800;for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=e[r];n>i&&(r.startsWith("101")||r.startsWith("202")||r.startsWith("801"))&&delete e[r]}this.dataStore.setDataSync("playbacks",e)}async getPlaybacks(){const{getPlaybacks:e}=this.profileApi,n={...this.dataStore.getDataSync("playbacks")};if(this.getAuthState()===Bn.AUTH&&this.currentSessionId!==this.profileApi.sessionId){this.currentSessionId=this.profileApi.sessionId;const i=await this.checkForAuthError(e()),s=GXe(n,i);return this.dataStore.setDataSync("playbacks",s),s}return n}async setPlayback(e,n,r=!0){var a;if(!e||!n){(a=this.logger)==null||a.warn("Called setPlayback without contentId or offset");return}const i=this.dataStore.getDataSync("playbacks")??{};i[e]=n,this.dataStore.setDataSync("playbacks",i),this.playbacksListeners.forEac
219h(o=>o(i)),this.getAuthState()===Bn.AUTH&&r&&await this.checkForAuthError(this.profileApi.setPlayback(e,n))}async setPlaybacks(e,n=!0){const r=this.dataStore.getDataSync("playbacks")??{};e.forEach(s=>{r[s.contentId]=s.playbackOffset}),this.dataStore.setDataSync("playbacks",r),this.playbacksListeners.forEach(s=>s(r)),this.getAuthState()===Bn.AUTH&&n&&await this.checkForAuthError(this.profileApi.setPlaybacks(e))}async addFollows(e){let n=ys.get(Wy)||[];n.push(e),n=n.flat();const r=[...new Set(n)];return ys.set(Wy,r,GR),await this.checkForAuthError(this.profileApi.addFollows(e))}async deleteFollow(e){await this.bulkUnfollow([e])}async bulkUnfollow(e){let n=ys.get(Wy)||[];n=n.flat();const r=n.filter(i=>!e.includes(i));ys.set(Wy,r,GR),await this.checkForAuthError(this.profileApi.bulkUnfollow(e))}async getFollows(){const{getFollows:e}=this.profileApi;return this.getAuthState()===Bn.AUTH&&!this.getFollowsPromise&&(this.getFollowsPromise=new Promise((r,i)=>{this.checkForAuthError(e()).then(r).catch(i)}).finally(()=>{this.getFollowsPromise=null})),this.getFollowsPromise??[]}async getFollowsWithSummaries(){const e=await this.getFollows(),n=await this.experienceApi.getContentSummaries(e),r=Object.values(n.content),i=/^(the|an|a) /gi,s=a=>a.replace(i,"");return r.sort((a,o)=>s(a.title).localeCompare(s(o.title))),r}addQueueListener(e){return this.queueListeners.indexOf(e)<0&&this.queueListeners.push(e)}removeQueueListener(e){const n=this.queueListeners.indexOf(e);n>=0&&this.queueListeners.splice(n,1)}clearQueue(){return this.profileApi.setQueue({currentId:"",queue:[]})}async addToQueue(e){const n=this.getQueue(),r=Jl(e)?await this.experienceApi.getContentObject(e):e;return await this.setQueue(zXe(await n,r))}async updateRebuiltQueue(e){return{...await this.setQueue(e),itemsRemoved:!0}}async getQueue(){if(this.getAuthState()!==Bn.AUTH)return CK;const{queue:e,currentId:n}=await this.checkForAuthError(this.profileApi.getQueue()),r=await this.experienceApi.getContentObjects(e);let i={itemsRemoved:!1,items:[]};for(const a of e){const o=r.content[a];yZ(o)?i.items.push(o):i.itemsRemoved=!0}const s=r.content[n];return!Fce(n)&&!yZ(s)&&(i.currentId="",i.itemsRemoved=!0),i.itemsRemoved&&(i=await this.updateRebuiltQueue(i)),i}async updateCurrentId(e){const n=await this.profileApi.getQueue(),r=ZU(e.currentId,n);e.currentId=void 0;for(let i=r+1;i<n.queue.length&&e.currentId===void 0;i++)vZ(n.queue[i],e);for(let i=r-1;i>=0&&e.currentId===void 0;i--)vZ(n.queue[i],e);e.currentId===void 0&&(e.currentId=e.queue[0])}async setQueue(e,n=!1){if(this.getAuthState()!==Bn.AUTH)return CK;const r={queue:e.items.map(s=>s.getId())};r.queue.length===0?r.currentId="":r.queue.length===1?r.currentId=r.queue[0]:ZU(r.currentId,r)<0&&await this.updateCurrentId(r),await this.profileApi.setQueue(r);const i=await this.getQueue();return n||this.queueListeners.forEach(s=>s(i)),i}async removeFromQueue(e){const n=new Set(e),r=await this.getQueue(),i={...r,items:r.items.filter(s=>!n.has(s.getId()))};return await this.setQueue(i)}isInTopOfHistoryStack(e){var s;const n=this.dataStore.getDataSync(tr.HISTORY)??[],r=Array.isArray(e)?e:[e],i=((s=n==null?void 0:n.slice(0,r.length))==null?void 0:s.map(({contentId:a})=>a))||[];return k7(i,r)}async addToHistory(e){var n;if(e.forEach(r=>{this.historyQueue.push({contentId:r,timestamp:new Date().toISOString()})}),!this.writingHistory){for(this.writingHistory=!0;this.historyQueue.length>0;){const r=this.dataStore.getDataSync(tr.HISTORY)??[],i=[...this.historyQueue];this.historyQueue=[];try{if(this.getAuthState()===Bn.AUTH){const s=WXe(r,i);this.dataStore.setDataSync(tr.HISTORY,s),await this.profileApi.addToHistory(i)}}catch{this.historyQueue=[...i,...this.historyQueue];break}}this.writingHistory=!1,(n=this.historyEventListener)==null||n.call(this)}}clearHistory(){return this.profileApi.clearHistory()}clearLocalFollows(){ys.delete(Wy)}async getHistoryWithSummaries(){if(this.getAuthState()!==Bn.AUTH)return[];if(this.currentHistorySessionId!==this.profileApi.sessionId){this.currentHistorySessionId=this.profileApi.sessionId,this.historyPromise=this.checkForAuthError(this.profileApi.getHistory());const s=await this.historyPromise;this.dataStore.setDataSync(tr.HISTORY,s),this.historyPromise=void 0}let n;this.historyPromise?n=await this.historyPromise??[]:n=this.dataStore.getDataSync(tr.HISTORY)??[];const r=n.map(s=>
219s.contentId),{content:i}=await this.experienceApi.getContentSummaries(r);return n.filter(s=>!!i[s.contentId]).map(s=>({...s,content:i[s.contentId]})).filter(({content:{replayableUntilDateTime:s,entitySubtype:a}})=>a===Vn.BROADCAST_SHOW_EPISODE?!!s&&K0(new Date,new Date(s)):!0)}async getAutoHome(e){var a;if(this.getAuthState()!==Bn.AUTH)return[];const n=await this.checkForAuthError(this.profileApi.getAutoView(e)),r=await this.getHistoryWithSummaries(),i=r.filter(({content:o})=>o.entitySubtype===Fr.BROADCAST||o.entitySubtype===Fr.EXCLUSIVE),s=r.filter(({content:o})=>o.entitySubtype===Vn.BROADCAST_SHOW_EPISODE||o.entitySubtype===Vn.PODCAST_EPISODE);return await Promise.all(((a=n.modules)==null?void 0:a.map(async o=>{var u,c,d,f,h,g,v;const{moduleType:l}=o;if(l===gn.RECENTLY_PLAYED_STATIONS_LIVE)return{header:o.config.title.label??"",items:i,viewId:o.moduleId,viewType:bA.imageRow,moduleId:o.moduleId,isLive:!0};if(l===gn.CONTINUE_LISTENING)return{header:o.config.title.label??"",items:s,viewId:o.moduleId,viewType:bA.list,moduleId:o.moduleId};if(l===gn.SECTION_WRAPPER){const b=(u=o.modules)!=null&&u[0].modules?o.modules[0].modules.map(A=>A.config.contentId):[],{content:S}=await this.experienceApi.getContentSummaries(b);return{header:o.config.title.label??"",items:(c=o.modules)!=null&&c[0].modules?(d=o.modules)==null?void 0:d[0].modules.filter(A=>!!S[A.config.contentId]).map(A=>({...A,content:S[A.config.contentId]})):[],showLimit:(h=(f=o.modules)==null?void 0:f[0].config)==null?void 0:h.itemsPerColumn,viewId:o.moduleId,viewType:((v=(g=o.modules)==null?void 0:g[0].modules)==null?void 0:v[0].moduleType)===gn.ENTITY_CARD_VERTICAL?bA.imageRow:bA.list,moduleId:o.moduleId}}return o.moduleType===gn.VIEW_TITLE?{header:o.config.titleFragments[0]??"",items:[],viewId:o.moduleId,viewType:bA.list,moduleId:o.moduleId}:{}}))??[])}get localCollectionId(){return this.dataStore.getDataSync(tr.COLLECTION_ID)}get localActivePlaylistItems(){return this.dataStore.getDataSync(tr.ACTIVE_PLAYLIST_ITEMS)}get token(){return this.authData.state===Bn.AUTH?this.authData.refreshToken:void 0}get userToken(){return this.authData.state!==Bn.NONE?this.authData.userToken:void 0}get userDeviceId(){return this.dataStore.getDataSync(tr.BRAZE_DEVICE_ID)}get bearerHeader(){return this.authData.state===Bn.AUTH?this.authData.bearerHeader:void 0}get authUrl(){var n,r,i;const e=new H0("identity").absoluteTo(this.authConfig.baseUrl).addQuery("appName",this.authConfig.appName).addQuery("appVersion",this.authConfig.appVersion).addQuery("language",this.authConfig.language).addQuery("plat",this.authConfig.plat).addQuery("version","2");return(n=this.marketingDataProvider.campaign)!=null&&n.name&&e.addQuery("campaign",this.marketingDataProvider.campaign.name),(r=this.marketingDataProvider.campaign)!=null&&r.medium&&e.addQuery("entry",this.marketingDataProvider.campaign.medium),(i=this.marketingDataProvider.campaign)!=null&&i.source&&e.addQuery("source",this.marketingDataProvider.campaign.source),this.profileApi.sessionId&&e.addQuery("sessionId",this.profileApi.sessionId),this.authConfig.plat==="ott"&&typeof origin<"u"&&e.addQuery("parent",origin),e.valueOf()}async setAuthState(e){const{state:n}=e,r=this.dataStore.getDataSync(tr.BRAZE_DEVICE_ID);switch(n){case Bn.ANON:{this.authData={state:n,userToken:r||await this.profileApi.createAnonymousUser()};break}case Bn.AUTH:{if("data"in e&&(!e.isTrusted||!Object.values(rE).map(o=>o.toString()).includes(e.origin)))return await this.setAuthState({state:Bn.NONE});const{refreshToken:i,userId:s}="data"in e?e.data:e,a="data"in e?e.data.authorizationHeader:e.accessToken?`Bearer ${e.accessToken}`:void 0;this.authData={state:n,refreshToken:i,userToken:s,bearerHeader:a};break}default:this.authData={state:n};break}await this.persistAuthState(this.authData),await this.setAdParameters(),await this.getPlaybacks()}getAuthState(){const e=this.dataStore.getDataSync(tr.BEARER_HEADER),n=this.dataStore.getDataSync(tr.REFRESH_TOKEN),r=this.dataStore.getDataSync(tr.USER_TOKEN);return n&&r?this.authData={state:Bn.AUTH,bearerHeader:e,refreshToken:n,userToken:r}:r&&this.authConfig.plat==="ott"?this.authData={state:Bn.ANON,userToken:r}:this.authData={state:Bn.NONE},this.authData.state}async persistAuthState(e){return await Promise.all(["userToken"in e&&e.userToken?this.dataStore.setData(tr.USER_TOKEN,e.userToken):this.dataStore.clearData(tr.USER_TOKEN),"bearerHeader"in e&&e.bearerHeader?this.dataStore.setData(tr.BEARER_HEADER,e.bearerHeader):this.dataStore.clearData(tr.BEARER_HEADER),"refreshToken"in e&&e.refreshToken?this.dataStore.setData(tr.REFRESH_TOKEN,e.refreshToken):this.dataStore.clearData(tr.REFRESH_TOKEN)])}async checkForAuthError(e){var n,r;try{return await e}catch(i){throw i instanceof sw&&(await this.setAuthState({state:Bn.NONE}),(n=this.eventListener)==null||n.call(this,i),(r=this.logger)==null||r.error("Triggered Login: "+i.message)),i}}triggerPasswordResetEmail(){return this.checkForAuthError(this.profileApi.triggerPasswordResetEmail())}getLogoutUrl(){return this.profileApi.getLogoutUrl()}async executeLogout(){let e;if(this.getAuthState()===Bn.AUTH)try{e=await this.profileApi.getLogoutUrl()}catch{}return await this.setAuthState({state:Bn.NONE}),this.clearLocalFollows(),this.clearLocalProfile(),this.profileApi.sessionId=void 0,this.profileApi.lastInteraction=void 0,this.dataStore.clearData(tr.HISTORY),e}}class ZXe{constructor(e){et(this,"globalLoggerShim",il);
219et(this,"onlineStatusProvider",il);et(this,"locationProvider",il);et(this,"networkStateProvider",il);et(this,"serviceBus",il);et(this,"onReadyPromises",[]);et(this,"getAnalyticServices",()=>this.serviceBus.analyticServices);et(this,"getAudioServices",()=>this.serviceBus.audioServices);et(this,"getChatServices",()=>this.serviceBus.chatServices);et(this,"getDataServices",()=>this.serviceBus.dataServices);et(this,"getPersonalizationServices",()=>this.serviceBus.personalizationServices);et(this,"getOnlineStatus",()=>this.onlineStatusProvider.online);et(this,"onReady",()=>Promise.all(this.onReadyPromises).then(()=>{}));Object.assign(Zh,e),this.onlineStatusProvider.online=!1;const r=e.logger.getSubLogger({name:"Global"});this.globalLoggerShim.error=r.error,this.globalLoggerShim.log=r.log,this.globalLoggerShim.warn=r.warn,this.initServices(e)}setLatLong(e,n){this.locationProvider.lat=e,this.locationProvider.long=n}setOnlineStatus(e){this.onlineStatusProvider.online=e,e?this.getAnalyticServices().setOnline():this.getAnalyticServices().setOffline()}setConnectivityType(e){this.networkStateProvider.connectivityType=e}initServices(e){this.serviceBus.dataServices=new Tr({...e.dataServices}),e.personalizationServices.platform===bs.WEB&&(this.serviceBus.unauthenticatedServices=new qXe({dataStore:e.personalizationServices.dataStore})),this.serviceBus.personalizationServices=new YXe({...e.personalizationServices,playerVolume:e.audioServices.player.getVolume(),profileApi:this.serviceBus.dataServices,experienceApi:this.serviceBus.dataServices,logger:e.logger.getSubLogger({name:"PersonalizationServices"})}),this.serviceBus.analyticServices=new YKe({...e.analyticServices,eventSender:this.serviceBus.dataServices,marketingDataProvider:this.serviceBus.personalizationServices.marketingDataProvider,networkStateProvider:this.networkStateProvider,onlineStatusProvider:this.onlineStatusProvider,logger:e.logger.getSubLogger({name:"AnalyticServices"})}),this.serviceBus.audioServices=new tZe({...e.audioServices,personalizationProvider:this.serviceBus.personalizationServices,unauthenticatedProvider:this.serviceBus.unauthenticatedServices,analyticsProvider:this.serviceBus.analyticServices,playerSettingsProvider:this.serviceBus.personalizationServices,credentialsProvider:this.serviceBus.personalizationServices,marketingDataProvider:this.serviceBus.personalizationServices.marketingDataProvider,locationProvider:this.locationProvider,logger:e.logger.getSubLogger({name:"AudioServices"}),dataProvider:this.serviceBus.dataServices,featureFlags:e.featureFlags}),this.serviceBus.chatServices=new aZe,this.serviceBus.personalizationServices.addQueueListener(r=>{this.serviceBus.audioServices.getCollectionPlaybackMode()===tu.Queue&&this.serviceBus.audioServices.updateCollection(r.items)}),this.serviceBus.personalizationServices.addPlaybacksListener(r=>this.serviceBus.audioServices.updatePlaybacks(r));const n={chatServices:this.serviceBus.chatServices,dataServices:this.serviceBus.dataServices};this.onReadyPromises=[];for(const r of Object.values(n)){const i=r.postServiceInit(this.serviceBus);i&&this.onReadyPromises.push(i)}}}const jce={eviction:"most-recent"};function ss(t){const e=t.cachePolicy_UNSTABLE?t:{...t,cachePolicy_UNSTABLE:jce};return hb(e)}function Aa(t){const e=t.cachePolicy_UNSTABLE?t:{...t,cachePolicy_UNSTABLE:jce};return Mv(e)}const zce=t=>t.map(e=>e.marketId).join("|"),bZ=60*1e3,B7={limit10m:10*bZ,limit60s:bZ},I1={every15s:15*1e3,every30s:30*1e3},QXe={episodesList:20},r0={getContent:()=>{},module:void 0},Gce=t=>{$.useEffect(()=>(t(!0),()=>t(!1)),[t])},Wce={cacheLimit:B7.limit60s},fx=t=>{const{cacheLimit:e,refreshEverySeconds:n}={...Wce,...t},r=Yn({default:Date.now(),key:`${t.key}_RequestTime`}),i={interval:void 0,listenersCount:0},s=ss({...t,get:c=>(c.get(r),t.get(c))}),a=()=>{xc(r,Date.now())},o=()=>Hk(({get:c,set:d})=>f=>{const h=c(r),g=Date.now();(f||!h||g-h>e)&&d(r,g)},[]),l=()=>{const c=Cc(({set:d})=>async f=>{i.listenersCount+=f?1:-1,i.listenersCount<=0&&i.interval?(clearInterval(i.interval),i.interval=void 0):!i.interval&&n!==void 0&&(i.interval=setInterval(()=>{d(r,Date.now())}
219,n))},[]);Gce(c)};return{selector:s,useListener:l,useRefreshCache:o,useWrappedCachedValue:()=>{const[,c]=$.useState(0),d=$.useRef(!1);$.useEffect(()=>(d.current=!0,()=>{d.current=!1}),[]);const f=Cc(({snapshot:h})=>()=>{const g=h.getLoadable(s),v=g.valueMaybe(),b=h.retain();return v===void 0&&g.state==="loading"&&g.toPromise().then(()=>d.current&&c(S=>S+1)).catch(()=>{}).finally(()=>b()),v},[c]);return l(),f()},forceRefresh:a}},hx=t=>{const{cacheLimit:e,refreshEverySeconds:n}={...Wce,...t},r=X1({default:Date.now(),key:`${t.key}_RequestTimes`}),i=new Map,s=Aa({...t,get:u=>c=>(c.get(r(u)),t.get(u)({...c,blockRefreshes:()=>{const d=i.get(u);d?d.shouldBlockRefreshes=!0:i.set(u,{interval:void 0,listenersCount:0,shouldBlockRefreshes:!0})}}))}),a=u=>{const c=KR(u)?u:[u];return Hk(({get:d,set:f})=>h=>{for(const g of c){const v=r(g),b=d(v),S=Date.now();(h||!b||S-b>e)&&f(v,S)}},[])},o=u=>{const c=KR(u)?u:[u],d=Cc(({set:f})=>async h=>{for(const g of c){i.has(g)||i.set(g,{interval:void 0,listenersCount:0,shouldBlockRefreshes:!1});const v=i.get(g),b=r(g);v.listenersCount+=h?1:-1,v.listenersCount<=0&&v.interval||v.shouldBlockRefreshes?(v.interval&&clearInterval(v.interval),v.interval=void 0):!v.interval&&n!==void 0&&(v.interval=setInterval(()=>{f(b,Date.now())},n))}},[]);Gce(d)};return{selector:s,useListener:o,useRefreshCache:a,useWrappedCachedValue:u=>{var f;const[,c]=$.useState(0),d=Cc(({snapshot:h})=>()=>{const g=h.getLoadable(s(u)),v=g.valueMaybe(),b=h.retain();return v===void 0&&g.state==="loading"&&g.toPromise().then(()=>c(S=>S+1)).catch(()=>{}).finally(()=>b()),v},[c,u]);return o(u),(f=t.useAdditionalListenerHook)==null||f.call(t,u),d()}}},U7=({get:t,key:e})=>{let n;return ss({get:r=>{const i=t(r),s=Mi.isEqualWith(n,i,(a,o)=>{if(Mi.isFunction(a)||Mi.isFunction(o))return!0});return n!==void 0&&s?n:(n=i,i)},key:e})},XXe=t=>ss({get({get:e}){return e(t)},key:`${t.key}_Deep_Compare`,set({get:e,set:n},r){const i=e(t);k7(i,r)||n(t,r)}}),A2=XXe(Yn({default:{markets:[]},key:"LocationMarketsState"})),V7=Yse(A2);ss({get:({get:t})=>{const{markets:e}=t(V7);return e.length?e[0]:void 0},key:"LocationPrimaryMarket"});const JXe={notDetermined:"NOT_DETERMINED"};Yn({default:JXe.notDetermined,key:"LocationStatusState"});const QU={xHours:"{{count}}h",xMinutes:"{{count}}m",xSeconds:"{{count}}s"},eJe={formatDistance:(t,e)=>QU[t].replace("{{count}}",e)},H7=t=>{const e=LQe({end:t*1e3,start:0}),n=t<60?["seconds"]:["hours","minutes"];return{duration:e,label:$U(e,{format:n,locale:eJe})}},j7=(t,e)=>{if(!(!t||!e))return new Date((+t||Date.now())+(e||0)*1e3).toISOString()},sl=t=>t?new Date(t):void 0,qce=t=>{const e=new Date,n=xce(e,t),r=T2(e,t);if(n<5)return si.t("global.justNow");if(n<60)return si.t("global.timeAgo",{time:QU.xMinutes.replace("{{count}}",n.toString())});if(r<=6)return si.t("global.timeAgo",{time:QU.xHours.replace("{{count}}",r.toString())});if(Dce(t))return si.t("global.today");if(Nce(t))return si.t("global.yesterday");try{return Xh(t,"MMM d, yyyy")}catch(i){return console.error(i,t),""}},Kce=(t,e=" - ")=>{if(t)return Xh(t,`eeee${e}MMM d, yyyy`)},tJe=t=>{const e=fL(t.toLocaleString());return EL(e)},w2=(t,e,n="-",r=!0)=>{let i=EL(new Date(t),r);const s=EL(new Date(e),r);return(i.endsWith("am")&&s.endsWith("am")||i.endsWith("pm")&&s.endsWith("pm"))&&(i=i.substring(0,i.length-2)),`${i}${n}${s}`},EL=(t,e=!0)=>{const n=OQe(t)===0&&e?"haaa":"h:mmaaa";return Xh(t,n)},ZNt=({selectedIndex:t,todayIndex:e,today:n})=>t>e?q0(n,t-e):t<e?kce(n,e-t):n,Yce=t=>({hours:Math.floor(t/(60*60))%24,minutes:Math.floor(t/60)%60,seconds:t%60}),hT=t=>{var e,n;return{description:t.getDescription(),getDataObject:()=>t,id:t.getId(),image:(e=t.getImages())==null?void 0:e.square,imageAlt:(n=t.getImages())==null?void 0:n.alt,isFollowable:t.isFollowable()||!1,subtype:t.getEntitySubtype(),entitySubtype:t.getEntitySubtype(),title:t.getTitle()??"",type:t.getEntityType(),entityType:t.getEntityType(),url:t.getUrl()??void 0}},Zce=t=>{var e,n,r,i,s,a,o,l,u;return{...hT(t),author:(e=t.getAuthor)==null?void 0:e.call(t),durationSeconds:(n=t.getDuration)==null?void 0:n.call(t),image:(r=t.getImageSquare)==null?void 0:r.call(t),imageAlt:(i=t.getImageAlt)==null?void 0:i.call(t),imageHero:(s=t.getImageHero)==null?void 0:s.call(t),imageMetadata:(a=t==null?void 0:t.getImageMetadata)==null?void 0:a.call(t),itemsIdList:(o=t.getItems)==null?void 0:o.call(t),contentUpdated:sl((l=t.getUpdatedTime)==null?void 0:l.call(t)),updateDate:sl((u=t.getUpdatedDate)==null?void 0:u.call(t))}},_2=t=>({get:e=>{const n=t.getObjectSync(e);if(n)return Cv(n)},getAll:()=>t.getAllObjects().map(Cv),getLength:()=>t.getNum(),prefetch:(e,n)=>
219t.prefetch(e,n)}),Cv=t=>{var i,s,a;const e=new Date().getTime(),n=sl(t.getReplayableUntil()),r=sl(t.getPublishDate())??sl(t.getStartTime());return{...hT(t),chatChannels:(i=t.data)==null?void 0:i.chatChannels,duration:t.getDuration(),endDateTime:sl(t.getEndTime()),endTime:t.getEndTimeMillis(),isDoneAndRewind:t.getEndTimeMillis()<e&&t.isRewindable(),isLive:t.getStartTimeMillis()<e&&t.getEndTimeMillis()>e&&!t.getIsOnAirOnly(),isOnAirOnly:t.getIsOnAirOnly(),isReplayable:t.isRewindable(),isRewind:t.isRewindable(),parentImage:t.getParentImageSquare(),parentImageAlt:t.getParentImageAlt(),parentShowUrl:(s=t.getParentShow())==null?void 0:s.url,parentStationIds:t.getParentStationIds(),parentTitle:t.getParentTitle(),publishDate:r,replayableUntilDateTime:n==null?void 0:n.toISOString(),showContentId:t.getParentId(),startDateTime:sl(t.getStartTime()),startTime:t.getStartTimeMillis(),episodeId:(a=t.data)==null?void 0:a.id,transcript:t.getTranscript()}},nJe=t=>({...hT(t),podcastType:t.getPodcastType(),author:t.getAuthor(),allowShowImageOverride:t.getAllowShowImageOverride()}),C2=t=>{const e=new Date().getTime(),n=sl(t.getReplayableUntil()),r=sl(t.getPublishDate())??sl(t.getStartTime());return{...hT(t),duration:t.getDuration(),endDateTime:sl(t.getEndTime()),endTime:t.getEndTimeMillis(),isDoneAndRewind:t.getEndTimeMillis()<e&&t.isRewindable(),isReplayable:t.isRewindable(),isRewind:t.isRewindable(),parentEpisodeId:t.getParentEpisodeId(),parentEpisodeUrl:t.getParentEpisodeUrl(),parentImage:t.getParentImageSquare(),parentImageAlt:t.getParentImageAlt(),parentShowId:t.getParentShowId(),parentShowUrl:t.getParentShowUrl(),parentStationId:t.getParentStationId(),parentTitle:t.getParentTitle(),publishDate:r,replayableUntilDateTime:n==null?void 0:n.toISOString(),showContentId:t.getParentShowId(),startDateTime:sl(t.getStartTime()),startTime:t.getStartTimeMillis(),standaloneChapterId:t.getId(),isOnAirOnly:!1,transcript:t.getTranscript()}},Qce=t=>({...hT(t),category:t.getCategory(),genres:t.getGenres(),marketTitle:t.getMarketTitle(),phoneNumber:t.getPhoneNumber(),rewindable:t.isRewindable(),callsign:t.getCallsign(),isTtrEnabled:t.getIsTTREnabled(),socialMediaLinks:t.getSocialMediaLinks(),utterancePhrase:t.getDefaultUtterancePhrase()}),rJe=t=>({get:e=>iJe(t.getObject(e)),length:t.getNum()}),iJe=t=>{var e;return{artist:t.getArtist(),image:(e=t.getImages())==null?void 0:e.square,timePlayed:t.getTimePlayed(),title:t.getTitle()}},pT=t=>{if(!t)return;switch(t.getEntityType()){case gt.STATION:return Qce(t);case gt.EPISODE:return Cv(t);case gt.SHOW:return nJe(t);case gt.COLLECTION:return Zce(t);case gt.STANDALONE_CHAPTER:return C2(t);default:return hT(t)}},px=t=>{var n,r,i;const e={duration:t.durationSeconds,entitySubtype:t.entitySubtype,entityType:t.entityType,id:t.id,image:((n=t.images)==null?void 0:n.square)??((r=t.parentImage)==null?void 0:r.square),parentImage:(i=t.parentImage)==null?void 0:i.square,parentTitle:t.parentTitle,marketTitle:t.marketTitle,genres:t.genres,publishDate:sl(t.publishDate),author:t.author,showContentId:t.showContentId,startDateTime:sl(t.startDateTime),replayableUntilDateTime:t.replayableUntilDateTime,title:t.title,url:t.url,itemsIdList:t.itemsIdList,updateDate:sl(t.updateDate)};switch(t.entityType){case gt.STANDALONE_CHAPTER:{const s=t.parentEpisode,a=t.parentShow;return{...e,episodeUrl:s==null?void 0:s.url,showUrl:a==null?void 0:a.url,showContentId:a==null?void 0:a.id,episodeContentId:s==null?void 0:s.id}}case gt.STATION:{const s=t.isRewindable;return{...e,isRewindable:s}}default:return e}};let sF;const sJe=async t=>await lr.getPersonalizationServices().getAutoHome(t).then(e=>e.map(n=>({...n,items:n.items.map(r=>({...px(r.content),lastListenDateTime:r.timestamp}))}))),{forceRefresh:aJe}=fx({get:async({get:t})=>{try{const{markets:e}=t(V7),n=zce(e);return sF=sJe(n),await sF}finally{sF=void 0}},key:"AutoHomeTab"}),gT=Aa({get:t=>async()=>{try{if(!t)return;const e=await lr.getDataServices().getContentObject(t);return pT(e)}catch{}},key:"Content"});var oJe=vb,lJe=bb,uJe="[object Date]";function cJe(t){return lJe(t)&&oJe(t)==uJe}var dJe=cJe,fJe=dJe,hJe=Nle,SZ=Mle,EZ=SZ&&SZ.isDate,pJe=EZ?hJe(EZ):fJe,gJe=pJe;const mJe=pi(gJe),vJe=X1({key:"DownloadQueueItem",default:null}),XU=Yn({key:"CompletedDownloads",default:new Map}),Xce=Aa({get({id:t,fromCompletedDownloads:e}){return({get:n})=>{if(!t)return;if(e)return n(XU).get(t);const r=n(vJe(t));return n(XU).get(t)??r}},key:"downloadItemSelectorFamily"});ss({get:({get:t})=>{const e=t(XU);return Array.from(e.values()).map(r=>{const i=r.episode.publishDate;return{...r.episode,publishDate:mJe(i)?i:new Date(i)}})},key:"downloadItemsSelector"});const Jce=Yn({default:!0,key:"isInternetReachableState"}),x2=(t,e)=>{if(!t||!e||!(e.id in t)||e.entityType!==gt.EPISODE&&e.entityType!==gt.STANDALONE_CHAPTER)return{};const n=t[e.id],r=E2(n,e.startDateTime)??n,s=xg(e.duration,r)?void 0:n;return{fixedPlaybackResumePointSeconds:r,playbackResumePointStartOffset:s}},Cd=Yn({default:{},key:"PlaybackResumePoints"}),ede=t=>{const e=Ht(Cd);return x2(e,t)},yJe=Aa({get({id:t,startDateTime:e}){return({get:n})=>{var i;if(!t)return 0;const r=(i=n(Cd))==null?void 0:i[t];return E2(r,e)??r}},key:"FixedPlaybackResumePointState"});ss({get:({get:t})=>e=>{const n=t(Cd),{playbackResumePointStartOffset:r}=x2(n,e);return r},key:"PlaybackResumePointStartOffset"});ss({get:({get:t})=>e=>{const n=t(Cd);return x2(n,e)},key:"ResumePointForEntityState"});ss({get:({get:t})=>e=>t(Cd)[e],key:"PlaybackResumePointsSelector"});var bJe=Xle,SJe=Kle;function EJe(t,e){return bJe(t,e,function(n,r){return SJe(t,r)})}var TJe=EJe,TZ=JC,AJe=a2,wJe=Ld,AZ=TZ?TZ.isConcatSpreadable:void 0;function _Je(t){return wJe(t)||AJe(t)||!!(AZ&&t&&t[AZ])}var CJe=_Je,xJe=j9,IJe=CJe;function tde(t,e,n,r,i){var s=-1,a=t.length;for(n||(n=IJe),i||(i=[]);++s<a;){var o=t[s];e>0&&n(o)?e>1?tde(o,e-1,n,r,i):xJe(i,o):r||(i[i.length]=o)}return i}var OJe=tde,PJe=OJe;function RJe(t){var e=t==null?0:t.length;return e?PJe(t,1):[]}var LJe=RJe;function DJe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var kJe=DJe,NJe=kJe,wZ=Math.max;function MJe(t,e,n){return e=wZ(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=wZ(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=r[i];return o[e]=n(a),NJe(t,this,o)}}var FJe=MJe;function $Je(t){return function(){return t}}var BJe=$Je,UJe=BJe,_Z=Zle,VJe=Yle,HJe=_Z?function(t,e){return _Z(t,"toString",{configurable:!0,enumerable:!1,value:UJe(e),writable:!0})}:VJe,jJe=HJe,zJe=800,GJe=16,WJe=Date.now;function qJe(t){var e=0,n=0;return function(){var r=WJe(),i=GJe-(r-n);if(n=r,i>0){if(++e>=zJe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var KJe=qJe,YJe=jJe,ZJe=KJe,QJe=ZJe(YJe),XJe=QJe,JJe=LJe,eet=FJe,tet=XJe;function net(t){return tet(eet(t,void 0,JJe),t+"")}var ret=net,iet=TJe,set=ret,aet=set(function(t,e){return t==null?{}:iet(t,e)}),oet=aet;const uet=pi(oet);let cet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nde=(t=21)=>{let e="",n=t|0;for(;n--;)e+=cet[Math.random()*64|0];return e};var Ad=(t=>
219(t.Circular="CIRCULAR",t.Grid="GRID",t.GridImage="GRID_IMAGE",t.Small="SMALL",t.Square="SQUARE",t))(Ad||{}),rde=(t=>(t.Large="LARGE",t.Small="SMALL",t.Default="DEFAULT",t))(rde||{});const ide=(t,e)=>{var n,r,i;switch(t.type){case gn.ENTITY_CARD_HORIZONTAL:case gn.ENTITY_CARD_VERTICAL:case gn.ENTITY_CARD_FEATURED:case gn.ENTITY_CARD_COLLECTION:return!!(sde((n=t.config)==null?void 0:n.contentId,e)||t.config.url);case gn.CAROUSEL:case gn.CAROUSEL_PERSONALIZED:case gn.CONTENT_ROW:case gn.SECTION_WRAPPER:case gn.SAFE_SECTION_WRAPPER:return!!((i=(r=t.modules)==null?void 0:r.filter(s=>ide(s,e)))!=null&&i.length);default:{let s=!1;for(const[a,o]of Object.entries(gn))t.type===o&&(s=!0);return s||Zh.logger.warn("Unknown module of type "+t.type+" encountered on view "+e.id),s}}},sde=(t,e)=>{var r;if(!t)return;const n=(r=e.content)==null?void 0:r[t];if(n)return px(n)},det=(t,e)=>{if(!t)return;const n=pT(t);if(n)return{contentObj:n,ctaTitle:e}},CZ=(t,e)=>{var r;const n=((r=t==null?void 0:t.modules)==null?void 0:r.map(mT).filter(i=>ide(i,t)))||[];return fet(n),{...uet(t,"id","type"),featuredPlayable:det(e==null?void 0:e.contentObj,e==null?void 0:e.ctaTitle),getContent:i=>sde(i,t),meta:t.meta,modules:n,rootObject:pT(t==null?void 0:t.contentObj),status:(t==null?void 0:t.status)??{code:-1,message:"Missing Status"},uniqueId:nde()}},mT=t=>{var e;return{config:t.config||{},id:t.moduleId,modules:(e=t.modules)==null?void 0:e.map(mT),type:t.moduleType,uniqueId:t.moduleId}},fet=t=>{let e=0;for(let n=0;n<t.length;n++){const r=t[n];if(r){const i=r.modules;if(i)for(let s=0;s<i.length;s++){const a=i[s];a.type===gn.CAROUSEL&&(e++,het(r,a,e.toString()))}}}},het=(t,e,n)=>{t.position===void 0&&JU(t,n,"1"),JU(e,n,"1"),pet(e)},pet=t=>{const e=t.modules;if(e){const n=get(t);for(let r=0;r<e.length;r++){const i=Math.trunc(r/n)+1;JU(e[r],t.position,i.toString())}}},get=t=>t.config.itemsPerColumn&&t.config.itemsPerColumn>0?t.config.itemsPerColumn:1,JU=(t,e,n)=>{t.position=e,t.depth=n},met=(t,e,n)=>{if(!e||!n)return!1;const r=Nf(t).getTime(),i=Nf(q0(t,1)).getTime(),s=n>r&&n<=i;return e>r&&e<i||s},vet=(t,e,n)=>{const r=Nf(q0(t,1)).getTime(),i=Nf(q0(t,2)).getTime(),s=Nf(t).getTime();return{continuesNextDay:n>r&&n<=i,continuesPreviousDay:e<s&&e<=r&&n>s}},yet=t=>Xh(t,"h:mmaaa").replace(":00",""),bet=(t,e,n)=>{const r=vet(n,t,e),i=yet(t);return r.continuesPreviousDay?"12am":i},Eet=(t,e)=>{const n=Mi.groupBy(t,i=>i==null?void 0:i.startTime),r=[];Object.keys(n).forEach(i=>{n[i].sort((o,l)=>o.isOnAirOnly===l.isOnAirOnly?o.endTime-l.endTime:+o.isOnAirOnly-+l.isOnAirOnly);const s=n[i][0],a=bet(s==null?void 0:s.startTime,s==null?void 0:s.endTime,e);r.push({episodes:n[i],startTime:s==null?void 0:s.startTime,timeLabel:a})}),r.sort((i,s)=>(i==null?void 0:i.startTime)-(s==null?void 0:s.startTime));for(let i=0;i<r.length;i++){const s=r[i];for(let a=i+1;a<r.length;a++){const o=r[a];if(o.episodes.some(u=>!(u!=null&&u.isOnAirOnly))){s.nextShowStartTime=o==null?void 0:o.startTime;break}}}return r},QNt=(t,e,n)=>e!==void 0&&t!==e&&!n.continuesNextDay,vT=Aa({get:t=>async()=>_2(await lr.getDataServices().getSchedules(t)),key:"Schedules"}),XNt=Aa({get:({id:t,selectedDate:e})=>({get:n})=>{const i=n(vT(t)).getAll().filter(s=>s&&met(e,s.startTime,s.endTime));return Eet(i,e)},key:"ScheduleGroups"}),Tet=Aa({get:({stationId:t,daysOffset:e=-7})=>({get:n})=>{if(!t)return r0;const{recents:r}=n(O2),i=n(vT(t));if(!r.length)return r0;const s=r.reduce((f,h)=>({...f,[h.id]:h.lastListenDateTime}),{});if(!i)return r0;const a=Nf(new Date).getTime(),o=Nf(q0(a,e)).getTime(),l=i.getAll().filter(({id:f,duration:h,isReplayable:g,startTime:v,startDateTime:b})=>{const S=n(yJe({id:f,startDateTime:b}));return g&&v>=o&&S&&!xg(h,S)}).slice(0,10).sort((f,h)=>new Date(s[h.id]).getTime()-new Date(s[f.id]).getTime());if(l.length===0)return r0;const u={},c=l.map(f=>(u[f.id]=Cv(f.getDataObject()),{config:{contentId:f.id,moduleSize:rde.Large,subType:k9.UNFINISHED_EPISODES},moduleId:`CLIENT--ENTITY_CARD_HORIZONTAL--UNFINISHED_EPISODES--${f.id}`,moduleType:gn.ENTITY_CARD_HORIZONTAL})),d=mT({moduleId:"CLIENT--SECTION_WRAPPER--UNFINISHED_EPISODES",moduleType:gn.SECTION_WRAPPER,modules:[{moduleId:"CLIENT--CAROUSEL--UNFINISHED_EPISODES",moduleType:gn.CAROUSEL,modules:c,config:{isStacked:!0}}]});return{getContent:f=>f?u[f]:void 0,module:d}},key:"EpisodesBySchedule"}),Aet=X1({default:[],key:"EpisodesItems"}),JNt=X1({default:t=>t===dle.EPISODIC?zR.DATE_DESC:zR.DATE_ASC,key:"PodcastSort"}),xZ=t=>({endIndex:t+(QXe.episodesList-1),startIndex:t});function eMt(t,e){const{contents:n,state:r}=pb(wet({showContentId:t,sort:e})),[i,s]=Fo(Aet(t)),[a,o]=$.useState(!1),[l,u]=$.useState(!0),[c,d]=$.useState(!1),f=$.useCallback(({startIndex:g,endIndex:v})=>{var S;const b=[];if(r==="hasValue"){for(let w=g;w<=v;w++)n.get(w)&&b.push(n.get(w));u(!1),s([...i,...b]);const A=(((S=n==null?void 0:n.getLength)==null?void 0:S.call(n))??0)-1>v;o(A),d(!1)}},[n,i,s,r]),h=$.useCallback(()=>
219{if(a&&n&&!c){d(!0);const{endIndex:g,startIndex:v}=xZ(i.length);n.prefetch(v,g).then(()=>{f({endIndex:g,startIndex:v})})}},[n,a,i.length,f,d,c]);return $.useEffect(()=>{n&&i.length===0&&f(xZ(0))},[n,i.length,f]),$.useEffect(()=>()=>{s([])},[s,e]),{hasMoreResults:a,isLoading:l,isLoadingMoreEpisodes:c,loadMoreEpisodes:h,resultsData:i}}const wet=Aa({get:({showContentId:t,sort:e})=>({get:n})=>{var i;return((i=n(gT(t)))==null?void 0:i.getDataObject()).getEpisodeList(e).then(s=>_2(s))},key:"Episodes"}),_et=Aa({get:t=>({get:e})=>{var i;let n;if(e(Jce))n=(i=e(gT(t)))==null?void 0:i.getDataObject();else{const s=e(Xce({id:t,fromCompletedDownloads:!0}));n=s!=null&&s.episode?new au(s.episode):void 0}if(n)return Cv(n)},key:"Episode"}),ade=Aa({get:t=>async()=>_2(await lr.getDataServices().getCurrentEpisodes(t)),key:"CurrentEpisodes"}),IZ={episode:void 0};ss({get:({getCallback:t})=>t(({snapshot:e})=>async(n,r=[])=>{var d;if(!n)return IZ;const i=await e.getPromise(vT(n));if(!i)return IZ;const s=Date.now(),a=await lr.getPersonalizationServices().getPlaybacks(),o=i.getAll().filter(f=>{const h=x2(a,f);return f.startTime<=s&&h}),l=new Map(o.map(f=>[f.episodeId,f])),u=(d=r.find(f=>l.has(f.id)))==null?void 0:d.id;return{episode:u?l.get(u):void 0}}),key:"CurrentEpisode"});const ode=t=>t.showContentId?"validEpisode":t.parentTitle===l4e?"invalidFiller":"validFiller",lde=(t,e)=>t===gt.EPISODE&&e===Vn.BROADCAST_SHOW_EPISODE,ude=t=>!!t&&ode(t)!=="invalidFiller",tMt=t=>!!t&&ode(t)==="validEpisode",Cet=t=>!!(t!=null&&t.isRewind),I2=(t,e=!1)=>{if(!t)return[void 0,void 0];if(e)return[t.parentTitle,t.parentImage];let n=t.title;return n||(n=Kce(t.publishDate||t.startDateTime)),[n,t.image??t.parentImage]},nMt=(t,e,n,r)=>t?w2(e,n," - ",!1):r,cde=(t,e)=>{if(!(!t||!e))return!lde(t,e)},dde=Aa({key:"LiveEpisodeFromSchedule",get:({contentId:t,isStation:e})=>({get:n})=>{if(!t)return;const r=n(e?vT(t):ade(t));if(!r)return;const i=Date.now(),s=r.getAll();return s.length<=1?void 0:s.find(o=>i>o.startTime&&i<o.endTime&&ude(o)&&!o.isOnAirOnly)}});Aa({get:({contentId:t,isStation:e})=>({get:n})=>{if(!t)return;const r=n(dde({contentId:t,isStation:e}));return{currentShow:n(gT(r==null?void 0:r.showContentId)),url:r==null?void 0:r.url}},key:"CurrentShow"});Aa({get:t=>async()=>{const e=await lr.getDataServices().getStationRecents(t);return rJe(e)},key:"StationsRecent"});const xet=Aa({get:t=>({get:e})=>{var r;const n=(r=e(gT(t)))==null?void 0:r.getDataObject();if(n)return Qce(n)},key:"Station"});let pO;const Iet=async()=>{let t;const e=await lr.getPersonalizationServices().getHistoryWithSummaries().then(n=>{var r;return t=(r=n[n.length-1])==null?void 0:r.timestamp,n.map(i=>({...px(i.content),lastListenDateTime:i.timestamp}))});return{lastItemTimestamp:t,recents:e}},{useRefreshCache:Oet,useWrappedCachedValue:rMt,selector:O2,forceRefresh:Pet}=fx({get:async()=>{try{return pO||(pO=Iet()),await pO}finally{pO=void 0}},key:"ListenHistory"}),fde={maxContinueListening:15,maxRecentlyPlayedStations:15},{selector:Ret}=fx({get:({get:t})=>{const{recents:e}=t(O2),n={},r=e.filter(s=>s.entityType===gt.STATION).slice(0,fde.maxRecentlyPlayedStations).map(s=>(n[s.id]=s,{config:{contentId:s.id},moduleId:`CLIENT--ENTITY_CARD_HORIZONTAL--RECENTLY_PLAYED_STATIONS--${s.id}`,moduleType:gn.ENTITY_CARD_VERTICAL}));let i;return r.length&&(i=mT({config:{title:{label:"Recently Played Stations"}},moduleId:"CLIENT--SECTION_WRAPPER--RECENTLY_PLAYED_STATIONS",moduleType:gn.SECTION_WRAPPER,modules:[{moduleId:"CLIENT--CAROUSEL--RECENTLY_PLAYED_STATIONS",moduleType:gn.CAROUSEL,modules:r}]})),{getContent:s=>s?n[s]:void 0,module:i}},key:"RecentlyPlayedStations"}),hde=({lastListenDateTime:t,replayableUntilDateTime:e})=>{if(!t)return!1;const n=new Date,r=new Date(e??t);return e?K0(n,r):T2(n,r)<72},Let=t=>{if(!t)return!1;const e=new Date;return K0(t,e)&&T2(e,t)<24},pde=(t,e)=>{const{duration:n,entitySubtype:r,startDateTime:i,endDateTime:s}=t;if([Vn.HOST_CREATED_EPISODE].includes(r)&&!Let(s))return!1;const l=E2(e,i);return mYe(l)&&!xg(n,l)},{selector:Det}=fx({get:({get:t})=>{const{recents:e}=(t==null?void 0:t(O2))||{recents:[]},n=t(Cd),r={},i=e.filter(a=>{const{id:o,entityType:l,replayableUntilDateTime:u,lastListenDateTime:c}=a,d=[gt.EPISODE,gt.CLIP,gt.STANDALONE_CHAPTER].includes(l),f=n[o]&&hde({lastListenDateTime:c,replayableUntilDateTime:u});
219return!d||!f?!1:pde(a,n[o])}).slice(0,fde.maxContinueListening).map(a=>(r[a.id]=a,{config:{contentId:a.id},moduleId:`CLIENT--${gn.ENTITY_CARD_HORIZONTAL}--${gn.CONTINUE_LISTENING}--${a.id}`,moduleType:gn.ENTITY_CARD_HORIZONTAL}));let s;return i.length&&(s=mT({config:{title:{label:"Continue Listening"}},moduleId:`CLIENT--${gn.SECTION_WRAPPER}--${gn.CONTINUE_LISTENING}`,moduleType:gn.SECTION_WRAPPER,modules:[{config:{itemsPerColumn:3},moduleId:`CLIENT--${gn.CAROUSEL}--${gn.CONTINUE_LISTENING}`,moduleType:gn.CAROUSEL,modules:i}]})),{getContent:a=>a?r[a]:void 0,module:s}},key:"ContinueListening"});function ket(t){const{replayableUntilDateTime:e,lastListenDateTime:n}=t;if(!n||!e)return!0;const r=fL(n),i=fL(e),s=new Date,a=YQe(s,6);return K0(r,a)?!0:K0(i,s)}const Net=hb({get:async({get:t})=>{const{recents:e}=t(O2);if(!e||e.length===0)return{item:void 0,resumePoint:void 0};let n=e[0];if(n.entitySubtype===Fr.BROADCAST){const s=t(xet(n.id));if(!(s!=null&&s.rewindable))return{item:n,resumePoint:void 0};const a=n.lastListenDateTime?new Date(n.lastListenDateTime).getTime():0,o=e[1].lastListenDateTime?new Date(e[1].lastListenDateTime).getTime():0;if(a>o||ket(e[1])){const l=t(dde({contentId:n.id,isStation:!0}));return l==null&&t(vT(n.id)).getLength()==0?{item:n,resumePoint:void 0}:{item:l,resumePoint:void 0}}else n=e[1]}const r=await lr.getPersonalizationServices().getPlaybacks();let i;if(n){const{id:s,entityType:a,replayableUntilDateTime:o}=n;if(i=r[s],[gt.EPISODE,gt.CLIP].includes(a)&&!pde(n,i)||hde({replayableUntilDateTime:o}))return{item:void 0,resumePoint:void 0}}return{item:n,resumePoint:i}},key:"MostRecentlyPlayed"}),Met=()=>pb(Net).valueMaybe(),gde=t=>{const[e,n]=$.useState(void 0),r=pb(t).valueMaybe();return $.useEffect(()=>{r&&n(r)},[r]),e},mde=()=>{let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),reject:e,resolve:t}};let uc;const Q_=mde(),Fet=(t,e,n)=>{const r=new ZXe({analyticServices:{...e,...t,eventListener:n.analyticsEventListener,deviceInfoProvider:n.deviceInfoProvider},audioServices:{eventListener:()=>{},...e,domParser:n.domParser,player:n.player,rewindAds:!1,getAdvertisingId:n.getAdvertisingId,deviceInfoProvider:n.deviceInfoProvider,featureFlags:n.featureFlags},dataServices:{...e,ver:nE.V3},personalizationServices:{...e,...t,dataStore:n.dataStore,eventListener:()=>{},language:"en_US",profileEventListener:n.profileEventListener,historyEventListener:()=>{Pet(),typeof document>"u"&&aJe()},getAdvertisingId:n.getAdvertisingId,callBrazeEvent:n.callBrazeEvent,removeFromBrazeAttributeArray:n.removeFromBrazeAttributeArray,addToBrazeAttributeArray:n.addToBrazeAttributeArray},logger:n.logger,featureFlags:n.featureFlags,deviceInfoProvider:n.deviceInfoProvider});r.onReady().then(async()=>{const i=r.getPersonalizationServices();await i.getAuthState()===Bn.NONE&&await i.setAuthState({state:Bn.ANON})}).then(()=>{uc=r,Q_.resolve(uc)}).catch(Q_.reject)},lr={setLatLong:(t,e)=>uc.setLatLong(t,e),setConnectivityType:t=>uc.setConnectivityType(t),getAnalyticServices:()=>uc.getAnalyticServices(),getAudioServices:()=>uc.getAudioServices(),getChatServices:()=>uc.getChatServices(),getDataServices:()=>uc.getDataServices(),getPersonalizationServices:()=>uc.getPersonalizationServices(),onReady:()=>Q_.promise.then(()=>{}),setOnlineStatus:t=>uc.setOnlineStatus(t),getOnlineStatus:()=>uc==null?void 0:uc.getOnlineStatus()};let vde=!1;const yde=Q_.promise.then(()=>vde=!0),Uf=()=>Promise.all([yde,Q_.promise]).then(([,t])=>t),Fa=()=>{const[t,e]=$.useState(vde);return $.useEffect(()=>{t||yde.then(e)},[t]),{clientServices:lr,loading:!t}};let A0;const bde=async()=>{await lr.onReady();const t=await lr.getPersonalizationServices().getAuthState();return A0==null||A0(t),t},z7=Yn({default:bde(),effects:[({onSet:t})=>t(e=>{A0==null||A0(e)})],key:"Auth"}),$et=async()=>(await lr.onReady(),await lr.getPersonalizationServices().getIsSoftDeleted()),Sde=Yn({default:$et(),key:"AuthSoftDeleted"}),kg=ss({get:({get:t})=>t(z7)===Bn.AUTH,key:"LoggedIn"}),Bet=t=>{A0=t,bde()};var sE=function(){return sE=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},sE.apply(this,arguments)},Uet="~",Vet="~~";function G7(t,e){for(var n={},r={},i=t.split(Vet),s=!1,a=0;i.length>a;a++){for(var o=i[a].split(Uet),l=0;l<o.length;l+=2){var u=o[l],c=o[l+1],d="&"+u+";";n[d]=c,s&&(n["&"+u]=c),r[c]=d}s=!0}return e?{entities:sE(sE({},n),e.entities),characters:sE(sE({},r),e.characters)}:{entities:n,characters:r}}var aF={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&notin;|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&centerdot;|&copysr;|&divideontimes;|&gtcc;|&gtcir;|&gtdot;|&gtlPar;|&gtquest;|&gtrapprox;|&gtrarr;|&gtrdot;|&gtreqless;|&gtreqqless;|&gtrless;|&gtrsim;|&ltcc;|&ltcir;|&ltdot;|&lthree;|&ltimes;|&ltlarr;|&ltquest;|&ltrPar;|&ltri;|&ltrie;|&ltrif;|&notin;|&notinE;|&notindot;|&notinva;|&notinvb;|&notinvc;|&notni;|&notniva;|&notnivb;|&notnivc;|&parallel;|&timesb;|&timesbar;|&timesd;|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},O1={};O1.xml=G7(`lt~<~gt~>~quot~"~apos~'~amp~&`);O1.html4=G7(`apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~z
219wnj~‌~zwj~‍~lrm~‎~rlm~‏~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Î¥~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~Â¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~­~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~Ã¥~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~"~amp~&~lt~<~gt~>`);O1.html5=G7('Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~⁡~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~â«§~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~â©´~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ä¢~Gcirc~Ĝ~Gcy~Г~Gdot~Ä ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~⁣~InvisibleTimes~⁢~Iogon~Ä®~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ä´~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Ð¥~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ä»~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~â§
219~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ä¿~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~​~NegativeThickSpace~​~NegativeThinSpace~​~NegativeVeryThinSpace~​~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~⁠~NonBreakingSpace~ 
vendor: 18,429 bytes, line 219
219~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~	~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~  ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~​~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~⁡~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~⁣~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~⁢~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~
219"~REG~®',O1.html4);var Het={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},jet=String.fromCodePoint||function(t){return String.fromCharCode(Math.floor((t-65536)/1024)+55296,(t-65536)%1024+56320)},P1=function(){return P1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},P1.apply(this,arguments)},zet=P1(P1({},O1),{all:O1.html5}),Get={scope:"body",level:"all"},oF=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,lF=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,OZ={xml:{strict:oF,attribute:lF,body:aF.xml},html4:{strict:oF,attribute:lF,body:aF.html4},html5:{strict:oF,attribute:lF,body:aF.html5}},Wet=P1(P1({},OZ),{all:OZ.html5}),Ede=String.fromCharCode,qet=Ede(65533);function Ket(t,e,n,r){var i=t,s=t[t.length-1];if(n&&s==="=")i=t;else if(r&&s!==";")i=t;else{var a=e[t];if(a)i=a;else if(t[0]==="&"&&t[1]==="#"){var o=t[2],l=o=="x"||o=="X"?parseInt(t.substr(3),16):parseInt(t.substr(2));i=l>=1114111?qet:l>65535?jet(l):Ede(Het[l]||l)}}return i}function PZ(t,e){var n=e===void 0?Get:e,r=n.level,i=r===void 0?"all":r,s=n.scope,a=s===void 0?i==="xml"?"strict":"body":s;if(!t)return"";var o=Wet[i][a],l=zet[i].entities,u=a==="attribute",c=a==="strict";return t.replace(o,function(d){return Ket(d,l,u,c)})}function W7(t){this.j={},this.jr=[],this.jd=null,this.t=t}W7.prototype={accepts:function(){return!!this.t},tt:function(e,n){if(n&&n.j)return this.j[e]=n,n;var r=n,i=this.j[e];if(i)return r&&(i.t=r),i;i=es();var s=TL(this,e);return s?(Object.assign(i.j,s.j),i.jr.append(s.jr),i.jr=s.jd,i.t=r||s.t):i.t=r,this.j[e]=i,i}};var es=function(){return new W7},Gn=function(e){return new W7(e)},Xt=function(e,n,r){e.j[n]||(e.j[n]=r)},wo=function(e,n,r){e.jr.push([n,r])},TL=function(e,n){var r=e.j[n];if(r)return r;for(var i=0;i<e.jr.length;i++){var s=e.jr[i][0],a=e.jr[i][1];if(s.test(n))return a}return e.jd},Ur=function(e,n,r){for(var i=0;i<n.length;i++)Xt(e,n[i],r)},Yet=function(e,n){for(var r=0;r<n.length;r++){var i=n[r][0],s=n[r][1];Xt(e,i,s)}},xy=function(e,n,r,i){for(var s=0,a=n.length,o;s<a&&(o=e.j[n[s]]);)e=o,s++;if(s>=a)return[];for(;s<a-1;)o=i(),Xt(e,n[s],o),e=o,s++;Xt(e,n[a-1],r)},gf="DOMAIN",Wp="LOCALHOST",yh="TLD",sd="NUM",R1="PROTOCOL",q7="MAILTO",Tde="WS",K7="NL",aE="OPENBRACE",Uw="OPENBRACKET",Vw="OPENANGLEBRACKET",Hw="OPENPAREN",qy="CLOSEBRACE",oE="CLOSEBRACKET",lE="CLOSEANGLEBRACKET",uE="CLOSEPAREN",AL="AMPERSAND",wL="APOSTROPHE",_L="ASTERISK",cE="AT",CL="BACKSLASH",xL="BACKTICK",IL="CARET",jw="COLON",Y7="COMMA",OL="DOLLAR",Pm="DOT",PL="EQUALS",Z7="EXCLAMATION",RL="HYPHEN",LL="PERCENT",DL="PIPE",kL="PLUS",NL="POUND",ML="QUERY",Q7="QUOTE",X7="SEMI",eg="SLASH",FL="TILDE",$L="UNDERSCORE",BL="SYM",Zet=Object.freeze({__proto__:null,DOMAIN:gf,LOCALHOST:Wp,TLD:yh,NUM:sd,PROTOCOL:R1,MAILTO:q7,WS:Tde,NL:K7,OPENBRACE:aE,OPENBRACKET:Uw,OPENANGLEBRACKET:Vw,OPENPAREN:Hw,CLOSEBRACE:qy,CLOSEBRACKET:oE,CLOSEANGLEBRACKET:lE,CLOSEPAREN:uE,AMPERSAND:AL,APOSTROPHE:wL,ASTERISK:_L,AT:cE,BACKSLASH:CL,BACKTICK:xL,CARET:IL,COLON:jw,COMMA:Y7,DOLLAR:OL,DOT:Pm,EQUALS:PL,EXCLAMATION:Z7,HYPHEN:RL,PERCENT:LL,PIPE:DL,PLUS:kL,POUND:NL,QUERY:ML,QUOTE:Q7,SEMI:X7,SLASH:eg,TILDE:FL,UNDERSCORE:$L,SYM:BL}),RZ="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care c
219areer careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramer
219ica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),RA=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
2190EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,LA=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,DA=/\uFE0F/,kA=/\d/,LZ=/\s/;function Qet(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=es(),n=Gn(sd),r=Gn(gf),i=es(),s=Gn(Tde),a=[[kA,r],[RA,r],[LA,r],[DA,r]],o=function(){var x=Gn(gf);return x.j={"-":i},x.jr=[].concat(a),x},l=function(x){var P=o();return P.t=x,P};
219Yet(e,[["'",Gn(wL)],["{",Gn(aE)],["[",Gn(Uw)],["<",Gn(Vw)],["(",Gn(Hw)],["}",Gn(qy)],["]",Gn(oE)],[">",Gn(lE)],[")",Gn(uE)],["&",Gn(AL)],["*",Gn(_L)],["@",Gn(cE)],["`",Gn(xL)],["^",Gn(IL)],[":",Gn(jw)],[",",Gn(Y7)],["$",Gn(OL)],[".",Gn(Pm)],["=",Gn(PL)],["!",Gn(Z7)],["-",Gn(RL)],["%",Gn(LL)],["|",Gn(DL)],["+",Gn(kL)],["#",Gn(NL)],["?",Gn(ML)],['"',Gn(Q7)],["/",Gn(eg)],[";",Gn(X7)],["~",Gn(FL)],["_",Gn($L)],["\\",Gn(CL)]]),Xt(e,`
220`,Gn(K7)),wo(e,LZ,s),Xt(s,`
221`,es()),wo(s,LZ,s);for(var u=0;u<RZ.length;u++)xy(e,RZ[u],l(yh),o);var c=o(),d=o(),f=o(),h=o();xy(e,"file",c,o),xy(e,"ftp",d,o),xy(e,"http",f,o),xy(e,"mailto",h,o);var g=o(),v=Gn(R1),b=Gn(q7);Xt(d,"s",g),Xt(d,":",v),Xt(f,"s",g),Xt(f,":",v),Xt(c,":",v),Xt(g,":",v),Xt(h,":",b);for(var S=o(),A=0;A<t.length;A++)xy(e,t[A],S,o);return Xt(S,":",v),xy(e,"localhost",l(Wp),o),wo(e,kA,n),wo(e,RA,r),wo(e,LA,r),wo(e,DA,r),wo(n,kA,n),wo(n,RA,r),wo(n,LA,r),wo(n,DA,r),Xt(n,"-",i),Xt(r,"-",i),Xt(i,"-",i),wo(r,kA,r),wo(r,RA,r),wo(r,LA,r),wo(r,DA,r),wo(i,kA,r),wo(i,RA,r),wo(i,LA,r),wo(i,DA,r),e.jd=Gn(BL),e}function Xet(t,e){for(var n=Jet(e.replace(/[A-Z]/g,function(h){return h.toLowerCase()})),r=n.length,i=[],s=0,a=0;a<r;){for(var o=t,l=null,u=0,c=null,d=-1,f=-1;a<r&&(l=TL(o,n[a]));)o=l,o.accepts()?(d=0,f=0,c=o):d>=0&&(d+=n[a].length,f++),u+=n[a].length,s+=n[a].length,a++;s-=d,a-=f,u-=d,i.push({t:c.t,v:e.substr(s-u,u),s:s-u,e:s})}return i}function Jet(t){for(var e=[],n=t.length,r=0;r<n;){var i=t.charCodeAt(r),s=void 0,a=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function NP(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?NP=function(e){return typeof e}:NP=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NP(t)}var Al={defaultProtocol:"http",events:null,format:DZ,formatHref:DZ,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function ett(t){t=t||{},this.defaultProtocol="defaultProtocol"in t?t.defaultProtocol:Al.defaultProtocol,this.events="events"in t?t.events:Al.events,this.format="format"in t?t.format:Al.format,this.formatHref="formatHref"in t?t.formatHref:Al.formatHref,this.nl2br="nl2br"in t?t.nl2br:Al.nl2br,this.tagName="tagName"in t?t.tagName:Al.tagName,this.target="target"in t?t.target:Al.target,this.rel="rel"in t?t.rel:Al.rel,this.validate="validate"in t?t.validate:Al.validate,this.truncate="truncate"in t?t.truncate:Al.truncate,this.className="className"in t?t.className:Al.className,this.attributes=t.attributes||Al.attributes,this.ignoreTags=[];for(var e=("ignoreTags"in t)?t.ignoreTags:Al.ignoreTags,n=0;n<e.length;n++)this.ignoreTags.push(e[n].toUpperCase())}ett.prototype={resolve:function(e){var n=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",n,e),tagName:this.get("tagName",n,e),className:this.get("className",n,e),target:this.get("target",n,e),rel:this.get("rel",n,e),events:this.getObject("events",n,e),attributes:this.getObject("attributes",n,e),truncate:this.get("truncate",n,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,n,r){var i=this[e];if(!i)return i;var s;switch(NP(i)){case"function":return i(n,r.t);case"object":return s=r.t in i?i[r.t]:Al[e],typeof s=="function"?s(n,r.t):s}return i},getObject:function(e,n,r){var i=this[e];return typeof i=="function"?i(n,r.t):i}};function DZ(t){return t}function ttt(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Object.create(t.prototype);for(var i in n)r[i]=n[i];return r.constructor=e,e.prototype=r,e}function UL(){}UL.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Al.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};function Sb(t,e){function n(r,i){this.t=t,this.v=r,this.tk=i}return ttt(UL,n,e),n}var Ade=Sb("email",{isLink:!0}),e4=Sb("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),t4=Sb("text"),wde=Sb("nl"),Em=Sb("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Al.defaultProtocol,n=this.tk,r=!1,i=!1,s=[],a=0;n[a].t===R1;)r=!0,s.push(n[a].v),a++;for(;n[a].t===eg;)i=!0,s.push(n[a].v),a++;for(;a<n.length;a++)s.push(n[a].v);return s=s.join(""),r||i||(s="".concat(e,"://").concat(s)),s},hasProtocol:function(){return this.tk[0].t===R1}}),ntt=Object.freeze({__proto__:null,MultiToken:UL,Base:UL,createTokenClass:Sb,MailtoEmail:Ade,Email:e4,Text:t4,Nl:wde,Url:Em});function rtt(){var t=es(),e=es(),n=es(),r=es(),i=es(),s=es(),a=es(),o=Gn(Em),l=es(),u=Gn(Em),c=Gn(Em),d=es(),f=es(),h=es(),g=es(),v=es(),b=Gn(Em),S=Gn(Em),A=Gn(Em),w=Gn(Em),x=es(),P=es(),N=es(),k=es(),U=es(),H=es(),B=Gn(e4),q=es(),Z=Gn(e4),C=Gn(Ade),L=es(),V=es(),j=es(),X=es(),G=Gn(wde);Xt(t,K7,G),Xt(t,R1,e),Xt(t,q7,n),Xt(e,eg,r),Xt(r,eg,i),Xt(t,yh,s),Xt(t,gf,s),Xt(t,Wp,o),Xt(t,sd,s),Xt(i,yh,c),Xt(i,gf,c),Xt(i,sd,c),Xt(i,Wp,c),Xt(s,Pm,a),Xt(U,Pm,H),Xt(a,yh,o),Xt(a,gf,s),Xt(a,sd,s),Xt(a,Wp,s),Xt(H,yh,B),Xt(H,gf,U),Xt(H,sd,U),Xt(H,Wp,U),Xt(o,Pm,a),Xt(B,Pm,H),Xt(o,jw,l),Xt(o,eg,c),Xt(l,sd,u),Xt(u,eg,c),Xt(B,jw,q),
221Xt(q,sd,Z);var ie=[AL,_L,cE,CL,xL,IL,OL,gf,PL,RL,Wp,sd,LL,DL,kL,NL,R1,eg,BL,FL,yh,$L],ae=[wL,lE,qy,oE,uE,jw,Y7,Pm,Z7,Vw,aE,Uw,Hw,ML,Q7,X7];Xt(c,aE,f),Xt(c,Uw,h),Xt(c,Vw,g),Xt(c,Hw,v),Xt(d,aE,f),Xt(d,Uw,h),Xt(d,Vw,g),Xt(d,Hw,v),Xt(f,qy,c),Xt(h,oE,c),Xt(g,lE,c),Xt(v,uE,c),Xt(b,qy,c),Xt(S,oE,c),Xt(A,lE,c),Xt(w,uE,c),Xt(x,qy,c),Xt(P,oE,c),Xt(N,lE,c),Xt(k,uE,c),Ur(f,ie,b),Ur(h,ie,S),Ur(g,ie,A),Ur(v,ie,w),Ur(f,ae,x),Ur(h,ae,P),Ur(g,ae,N),Ur(v,ae,k),Ur(b,ie,b),Ur(S,ie,S),Ur(A,ie,A),Ur(w,ie,w),Ur(b,ae,b),Ur(S,ae,S),Ur(A,ae,A),Ur(w,ae,w),Ur(x,ie,b),Ur(P,ie,S),Ur(N,ie,A),Ur(k,ie,w),Ur(x,ae,x),Ur(P,ae,P),Ur(N,ae,N),Ur(k,ae,k),Ur(c,ie,c),Ur(d,ie,c),Ur(c,ae,d),Ur(d,ae,d),Xt(n,yh,C),Xt(n,gf,C),Xt(n,sd,C),Xt(n,Wp,C),Ur(C,ie,C),Ur(C,ae,L),Ur(L,ie,C),Ur(L,ae,L);var ue=[AL,wL,_L,CL,xL,IL,qy,OL,gf,PL,RL,sd,aE,LL,DL,kL,NL,ML,eg,BL,FL,yh,$L];return Ur(s,ue,V),Xt(s,cE,j),Ur(o,ue,V),Xt(o,cE,j),Ur(a,ue,V),Ur(V,ue,V),Xt(V,cE,j),Xt(V,Pm,X),Ur(X,ue,V),Xt(j,yh,U),Xt(j,gf,U),Xt(j,sd,U),Xt(j,Wp,B),t}function itt(t,e,n){for(var r=n.length,i=0,s=[],a=[];i<r;){for(var o=t,l=null,u=null,c=0,d=null,f=-1;i<r&&!(l=TL(o,n[i].t));)a.push(n[i++]);for(;i<r&&(u=l||TL(o,n[i].t));)l=null,o=u,o.accepts()?(f=0,d=o):f>=0&&f++,i++,c++;if(f<0)for(var h=i-c;h<i;h++)a.push(n[h]);else{a.length>0&&(s.push(uF(t4,e,a)),a=[]),i-=f,c-=f;var g=d.t,v=n.slice(i-c,i);s.push(uF(g,e,v))}}return a.length>0&&s.push(uF(t4,e,a)),s}function uF(t,e,n){var r=n[0].s,i=n[n.length-1].e,s=e.substr(r,i-r);return new t(s,n)}var mf={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function stt(){mf.scanner={start:Qet(mf.customProtocols),tokens:Zet},mf.parser={start:rtt(),tokens:ntt};for(var t={createTokenClass:Sb},e=0;e<mf.pluginQueue.length;e++)mf.pluginQueue[e][1]({scanner:mf.scanner,parser:mf.parser,utils:t});mf.initialized=!0}function att(t){return mf.initialized||stt(),itt(mf.parser.start,t,Xet(mf.scanner.start,t))}function ott(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=att(t),r=[],i=0;i<n.length;i++){var s=n[i];s.isLink&&(!e||s.t===e)&&r.push(s.toObject())}return r}const cF=t=>Jl(t)?unescape(t):t,VL={bullet:"•",rightAngleQuotation:"›",spaceSingle:" "},ltt=t=>/<[a-z][\s\S]*>/i.test(t),utt=t=>ott(t).length>0,_de=t=>ltt(t)||utt(t),iMt=t=>{if(t<999)return t.toString();const e=t.toString().split("");return e.splice(-3,0,","),e.join("")},Cde=(t,e)=>`${t.substring(0,e)}...`,xde=ss({get:async({get:t})=>{if(t(kg))try{return await lr.getPersonalizationServices().getIncompleteProfileData()}catch{}},key:"IncompleteProfileData"}),P2=ss({get:async()=>await lr.getPersonalizationServices().getProfileData(),key:"ProfileData"});ss({get:({get:t})=>{const e=t(P2),{firstName:n,emailAddress:r}=e;return n?{text:`${n.trim()}`,isEmail:!1}:{text:Cde(r,16),isEmail:!0}},key:"ProfileNameOrEmail"});ss({get:({get:t})=>{const e=t(P2),{firstName:n,lastName:r,emailAddress:i}=e;return n&&r?{text:`${n.trim()} ${r.trim()}`,isEmail:!1}:{text:Cde(i,16),isEmail:!0}},key:"ProfileFullName"});const sMt=()=>{const{clientServices:t}=Fa(),e=BW(P2),n=BW(xde);return async({profile:r,shouldRefreshProfileData:i,shouldRefreshIncompleteProfileData:s,callbacks:a})=>{await t.getPersonalizationServices().setProfileData(r).then(()=>{var o;i&&e(),s&&n(),(o=a==null?void 0:a.onSuccess)==null||o.call(a)}).catch(()=>{var o;(o=a==null?void 0:a.onError)==null||o.call(a)})}},we={init:function(t){t===void 0&&we.zg!==void 0||(we.zg=!!t),we.l||(we.l=!0)},destroy:function(){we.l=!1,we.zg=void 0,we.vd=void 0},setLogger:function(t){typeof t=="function"?(we.init(),we.vd=t):we.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){we.init(),we.zg?(console.log("Disabling Braze logging"),we.zg=!1):(console.log("Enabled Braze logging"),we.zg=!0)},info:function(t){if(we.zg){const e="Braze: "+t;we.vd!=null?we.vd(e):console.log(e)}},warn:function(t){if(we.zg){const e="Braze SDK Warning: "+t+" (v5.9.1)";we.vd!=null?we.vd(e):console.warn(e)}},error:function(t){if(we.zg){const e="Braze SDK Error: "+t+" (v5.9.1)";we.vd!=null?we.vd(e):console.error(e)}}},ctt={qn:function(t){const e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}},_r={CustomEvent:"ce",Pr:"p",wc:"pc",Su:"i",qu:"ie",ts:"cci",rs:"ccic",Mt:"ccc",Wt:"ccd",Fl:"ss",Dl:"se",Ki:"si",Li:"sc",Qi:"sbc",Do:"iec",bc:"lr",vc:"uae",ss:"ci",Ot:"cc",Sc:"lcaa",yc:"lcar",Hn:"inc",On:"add",Gn:"rem",$n:"set",Bn:"ncam",jc:"sgu",yr:"ffi",ro:"bi",ct:"bc"},dtt={Fr:"feed_displayed"},Pg={ce:function(){const t=(e=!1)=>{const n=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+n.substr(0,4)+"-"+n.substr(4,4):n};return t()+t(!0)+t(!0)+t()}};class Ss{constructor(e,n){this.database=e,this.vd=n,this.parent=typeof window>"u"?self:window,this.database=e,this.vd=n}Dd(){if("indexedDB"in this.parent)return this.parent.indexedDB}isSupported(){var e;try{if(this.Dd()==null)return!1;{const n=(e=this.Dd())===null||e===void 0?void 0:e.open("Braze IndexedDB Support Test");
221if(n&&(n.onupgradeneeded=()=>n.result.close(),n.onsuccess=()=>n.result.close()),typeof window<"u"){const r=window,i=r.chrome||r.browser||r.pd;if(i&&i.runtime&&i.runtime.id)return this.vd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}}catch(n){return this.vd.info("Not using IndexedDB for storage due to following error: "+n),!1}}Bd(e,n){var r;const i=(r=this.Dd())===null||r===void 0?void 0:r.open(this.database.Sd,this.database.VERSION);if(i==null)return typeof n=="function"&&n(),!1;const s=this;return i.onupgradeneeded=a=>{var o;s.vd.info("Upgrading indexedDB "+s.database.Sd+" to v"+s.database.VERSION+"...");const l=(o=a.target)===null||o===void 0?void 0:o.result;for(const u in s.database.Ms){const c=u;s.database.Ms.hasOwnProperty(u)&&!l.objectStoreNames.contains(s.database.Ms[c])&&l.createObjectStore(s.database.Ms[c])}},i.onsuccess=a=>{var o;const l=(o=a.target)===null||o===void 0?void 0:o.result;l.onversionchange=()=>{l.close(),typeof n=="function"&&n(),s.vd.error("Needed to close the database unexpectedly because of an upgrade in another tab")},e(l)},i.onerror=a=>{var o;const l=a;return s.vd.info("Could not open indexedDB "+s.database.Sd+" v"+s.database.VERSION+": "+((o=l.target)===null||o===void 0?void 0:o.errorCode)),typeof n=="function"&&n(),!0},!0}setItem(e,n,r,i,s){if(!this.isSupported())return typeof s=="function"&&s(),!1;const a=this;return this.Bd(o=>{if(!o.objectStoreNames.contains(e))return a.vd.error("Could not store object "+n+" in "+e+" on indexedDB "+a.database.Sd+" - "+e+" is not a valid objectStore"),typeof s=="function"&&s(),void o.close();const l=o.transaction([e],"readwrite");l.oncomplete=()=>o.close();const u=l.objectStore(e).put(r,n);u.onerror=()=>{a.vd.error("Could not store object "+n+" in "+e+" on indexedDB "+a.database.Sd),typeof s=="function"&&s()},u.onsuccess=()=>{typeof i=="function"&&i()}},s)}getItem(e,n,r){if(!this.isSupported())return!1;const i=this;return this.Bd(s=>{if(!s.objectStoreNames.contains(e))return i.vd.error("Could not retrieve object "+n+" in "+e+" on indexedDB "+i.database.Sd+" - "+e+" is not a valid objectStore"),void s.close();const a=s.transaction([e],"readonly");a.oncomplete=()=>s.close();const o=a.objectStore(e).get(n);o.onerror=()=>{i.vd.error("Could not retrieve object "+n+" in "+e+" on indexedDB "+i.database.Sd)},o.onsuccess=l=>{var u;const c=(u=l.target)===null||u===void 0?void 0:u.result;c!=null&&r(c)}})}cr(e,n,r){if(!this.isSupported())return typeof r=="function"&&r(),!1;const i=this;return this.Bd(s=>{if(!s.objectStoreNames.contains(e))return i.vd.error("Could not retrieve last record from "+e+" on indexedDB "+i.database.Sd+" - "+e+" is not a valid objectStore"),typeof r=="function"&&r(),void s.close();const a=s.transaction([e],"readonly");a.oncomplete=()=>s.close();const o=a.objectStore(e).openCursor(null,"prev");o.onerror=()=>{i.vd.error("Could not open cursor for "+e+" on indexedDB "+i.database.Sd),typeof r=="function"&&r()},o.onsuccess=l=>{var u;const c=(u=l.target)===null||u===void 0?void 0:u.result;c!=null&&c.value!=null&&c.key!=null?n(c.key,c.value):typeof r=="function"&&r()}},r)}ge(e,n){if(!this.isSupported())return!1;const r=this;return this.Bd(i=>{if(!i.objectStoreNames.contains(e))return r.vd.error("Could not delete record "+n+" from "+e+" on indexedDB "+r.database.Sd+" - "+e+" is not a valid objectStore"),void i.close();const s=i.transaction([e],"readwrite");s.oncomplete=()=>i.close(),s.objectStore(e).delete(n).onerror=()=>{r.vd.error("Could not delete record "+n+" from "+e+" on indexedDB "+r.database.Sd)}})}Ns(e,n){if(!this.isSupported())return!1;const r=this;return this.Bd(i=>{if(!i.objectStoreNames.contains(e))return r.vd.error("Could not retrieve objects from "+e+" on indexedDB "+r.database.Sd+" - "+e+" is not a valid objectStore"),void i.close();const s=i.transaction([e],"readwrite");s.oncomplete=()=>i.close();const a=s.objectStore(e),o=a.openCursor(),l=[];o.onerror=()=>{l.length>0?(r.vd.info("Cursor closed midway through for "+e+" on indexedDB "+r.database.Sd),n(l)):r.vd.error("Could not open cursor for "+e+" on indexedDB "+r.database.Sd)},o.onsuccess=u=>{var c;const d=(c=u.target)===null||c===void 0?void 0:c.result;
221d!=null?(d.value!=null&&d.key!=null&&(a.delete(d.key).onsuccess=()=>{l.push(d.value)}),typeof d.continue=="function"&&d.continue()):l.length>0&&n(l)}})}clearData(){if(!this.isSupported())return!1;const e=[];for(const r in this.database.Ms){const i=r;this.database.Ms.hasOwnProperty(r)&&this.database.Ms[i]!==this.database.Ms.pe&&e.push(this.database.Ms[i])}const n=this;return this.Bd(function(r){const i=r.transaction(e,"readwrite");i.oncomplete=()=>r.close();for(let s=0;s<e.length;s++){const a=e[s];i.objectStore(a).clear().onerror=function(){n.vd.error("Could not clear "+this.source.name+" on indexedDB "+n.database.Sd)}}i.onerror=function(){n.vd.error("Could not clear object stores on indexedDB "+n.database.Sd)}})}}Ss.Ls={Fs:{Sd:"AppboyServiceWorkerAsyncStorage",VERSION:6,Ms:{Nu:"data",jr:"pushClicks",cu:"pushSubscribed",Cd:"fallbackDevice",Js:"cardUpdates",pe:"optOut",kr:"pendingData",yh:"sdkAuthenticationSignature"},be:1}};const kZ={Yo:"allowCrawlerActivity",Zo:"baseUrl",Wh:"noCookies",Vh:"devicePropertyAllowlist",Da:"disablePushTokenMaintenance",$h:"enableLogging",Yh:"enableSdkAuthentication",Ca:"manageServiceWorkerExternally",Xh:"minimumIntervalBetweenTriggerActionsInSeconds",Zh:"sessionTimeoutInSeconds",Qh:"appVersion",Ea:"appVersionNumber",_a:"serviceWorkerLocation",Ba:"safariWebsitePushId",Zn:"localization",er:"contentSecurityNonce",re:"allowUserSuppliedJavascript",Go:"inAppMessageZIndex",Ko:"openInAppMessagesInNewTab",en:"openNewsFeedCardsInNewTab",mh:"requireExplicitInAppMessageDismissal",Ia:"doNotLoadFontAwesome",Na:"deviceId",Aa:"serviceWorkerScope",Oa:"sdkFlavor",tn:"openCardsInNewTab"};function R2(t){const e=[];let n;for(const r in t)n=r,Object.prototype.hasOwnProperty.call(t,n)&&t[n]!==void 0&&e.push(t[n]);return e}function Wh(t,e,n,r){const i=R2(t);return i.indexOf(e)!==-1||(we.error(`${n} Valid values from ${r} are "${i.join('"/"')}".`),!1)}function to(t){return Array.isArray?Array.isArray(t):Object.prototype.toString.call(t)==="[object Array]"}function Cf(t){return Object.prototype.toString.call(t)==="[object Date]"}function gx(t){return Object.prototype.toString.call(t)==="[object Object]"}function ftt(t,...e){t==null&&(t=[]);const n=[],r=arguments.length;for(let i=0,s=t.length;i<s;i++){const a=t[i];if(n.indexOf(a)!==-1)continue;let o=1;for(o=1;o<r&&arguments[o].indexOf(a)!==-1;o++);o===r&&n.push(a)}return n}function Fu(t){const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}function Z0(t,e){if(t===e)return t!==0||1/t==1/e;if(t==null||e==null)return t===e;const n=t.toString();if(n!==e.toString())return!1;switch(n){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}const r=n==="[object Array]";if(!r){if(typeof t!="object"||typeof e!="object")return!1;const o=t.constructor,l=e.constructor;if(o!==l&&!(typeof o=="function"&&o instanceof o&&typeof l=="function"&&l instanceof l)&&"constructor"in t&&"constructor"in e)return!1}const i=[],s=[];let a=i.length;for(;a--;)if(i[a]===t)return s[a]===e;if(i.push(t),s.push(e),r){if(a=t.length,a!==e.length)return!1;for(;a--;)if(!Z0(t[a],e[a]))return!1}else{const o=Fu(t);let l;if(a=o.length,Fu(e).length!==a)return!1;for(;a--;)if(l=o[a],!Object.prototype.hasOwnProperty.call(e,l)||!Z0(t[l],e[l]))return!1}return i.pop(),s.pop(),!0}function mx(t,e=!1){let n=t/1e3;return e&&(n=Math.floor(n)),n}function htt(t){return 1e3*t}function Mf(t){if(t==null)return null;const e=parseInt(t.toString());return isNaN(e)?null:new Date(1e3*e)}function HL(t){return t!=null&&Cf(t)?t.toISOString().replace(/\.[0-9]{3}Z$/,""):t}function w0(t){return t==null||t===""?null:new Date(t)}function ptt(t){return t==null||t===""?new Date().valueOf():t}function NZ(t){return(new Date().valueOf()-t.valueOf())/1e3}function MZ(t){return(t.valueOf()-new Date().valueOf())/1e3}const FZ=100,J7="inAppMessage must be an InAppMessage object",eV="must be a Card object",gtt=500,mtt="logCustomEvent",dE="setCustomUserAttribute",Ac="Braze must be initialized before calling methods.",vtt=30,ytt=30,btt=72e5,Stt=15,dF=1,L2="data-update-subscription-id",tV="Banners are disabled. Make sure you have at least one campaign and relau
221nch the app.";let eo=class{constructor(){this.Mi={}}Dt(e){if(typeof e!="function")return null;const n=Pg.ce();return this.Mi[n]=e,n}removeSubscription(e){delete this.Mi[e]}removeAllSubscriptions(){this.Mi={}}hc(){return Object.keys(this.Mi).length}X(e){const n=[];for(const r in this.Mi){const i=this.Mi[r];n.push(i(e))}return n}},_t=class Wr{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b){this.id=e,this.viewed=n,this.title=r,this.imageUrl=i,this.description=s,this.created=a,this.updated=o,this.categories=l,this.expiresAt=u,this.url=c,this.linkText=d,this.aspectRatio=f,this.extras=h,this.pinned=g,this.dismissible=v,this.clicked=b,this.id=e,this.viewed=n||!1,this.title=r||"",this.imageUrl=i,this.description=s||"",this.created=a||null,this.updated=o||null,this.categories=l||[],this.expiresAt=u||null,this.url=c,this.linkText=d,f==null?this.aspectRatio=null:(f=parseFloat(f.toString()),this.aspectRatio=isNaN(f)?null:f),this.extras=h||{},this.pinned=g||!1,this.dismissible=v||!1,this.dismissed=!1,this.clicked=b||!1,this.isControl=!1,this.test=!1,this.ti=null,this.ii=null,this.si=null}subscribeToClickedEvent(e){return this.hi().Dt(e)}subscribeToDismissedEvent(e){return this.ni().Dt(e)}removeSubscription(e){this.hi().removeSubscription(e),this.ni().removeSubscription(e)}removeAllSubscriptions(){this.hi().removeAllSubscriptions(),this.ni().removeAllSubscriptions()}dismissCard(){if(!this.dismissible||this.dismissed)return;typeof this.logCardDismissal=="function"&&this.logCardDismissal();let e=this.te;!e&&this.id&&(e=document.getElementById(this.id)),e&&(e.style.height=e.offsetHeight+"px",e.className=e.className+" ab-hide",setTimeout(function(){e&&e.parentNode&&(e.style.height="0",e.style.margin="0",setTimeout(function(){e&&e.parentNode&&e.parentNode.removeChild(e)},Wr.li))},gtt))}hi(){return this.ti==null&&(this.ti=new eo),this.ti}ni(){return this.ii==null&&(this.ii=new eo),this.ii}_t(){const e=new Date().valueOf();return!(this.si!=null&&e-this.si<Wr.ei)&&(this.si=e,this.viewed=!0,!0)}$t(){this.viewed=!0,this.clicked=!0,this.hi().X()}Qt(){return!(!this.dismissible||this.dismissed)&&(this.dismissed=!0,this.ni().X(),!0)}ri(e){if(e==null||e[Wr.ui.ds]!==this.id)return!0;if(e[Wr.ui.Ei])return!1;if(e[Wr.ui.xs]!=null&&this.updated!=null&&parseInt(e[Wr.ui.xs])<mx(this.updated.valueOf()))return!0;if(e[Wr.ui.ps]&&!this.viewed&&(this.viewed=!0),e[Wr.ui.ys]&&!this.clicked&&(this.clicked=e[Wr.ui.ys]),e[Wr.ui.us]!=null&&(this.title=e[Wr.ui.us]),e[Wr.ui.ls]!=null&&(this.imageUrl=e[Wr.ui.ls]),e[Wr.ui.fs]!=null&&(this.description=e[Wr.ui.fs]),e[Wr.ui.xs]!=null){const n=Mf(e[Wr.ui.xs]);n!=null&&(this.updated=n)}if(e[Wr.ui.js]!=null){let n;n=e[Wr.ui.js]===Wr.oi?null:Mf(e[Wr.ui.js]),this.expiresAt=n}if(e[Wr.ui.URL]!=null&&(this.url=e[Wr.ui.URL]),e[Wr.ui.zs]!=null&&(this.linkText=e[Wr.ui.zs]),e[Wr.ui.ks]!=null){const n=parseFloat(e[Wr.ui.ks].toString());this.aspectRatio=isNaN(n)?null:n}return e[Wr.ui.qs]!=null&&(this.extras=e[Wr.ui.qs]),e[Wr.ui.vs]!=null&&(this.pinned=e[Wr.ui.vs]),e[Wr.ui.ws]!=null&&(this.dismissible=e[Wr.ui.ws]),e[Wr.ui.As]!=null&&(this.test=e[Wr.ui.As]),!0}bt(){we.error("Must be implemented in a subclass")}};_t.oi=-1,_t.ui={ds:"id",ps:"v",ws:"db",Ei:"r",xs:"ca",vs:"p",js:"ea",qs:"e",hs:"tp",ls:"i",us:"tt",fs:"ds",URL:"u",zs:"dm",ks:"ar",ys:"cl",As:"t"},_t.cs={os:"captioned_image",Ti:"text_announcement",Ii:"short_news",ai:"banner_image",ci:"control"},_t.es={ds:"id",ps:"v",ws:"db",bs:"cr",xs:"ca",vs:"p",gs:"t",js:"ea",qs:"e",hs:"tp",ls:"i",us:"tt",fs:"ds",URL:"u",zs:"dm",ks:"ar",ys:"cl",As:"s"},_t.Ni={mi:"ADVERTISING",Si:"ANNOUNCEMENTS",Ai:"NEWS",Di:"SOCIAL"},_t.li=400,_t.ei=1e4;class Ide extends _t{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g){super(e,n,null,r,null,i,s,a,o,l,u,c,d,f,h,g),this.oe="ab-image-only",this.ae=!1,this.test=!1}bt(){const e={};return e[_t.es.hs]=_t.cs.ai,e[_t.es.ds]=this.id,e[_t.es.ps]=this.viewed,e[_t.es.ls]=this.imageUrl,e[_t.es.xs]=this.updated,e[_t.es.bs]=this.created,e[_t.es.gs]=this.categories,e[_t.es.js]=this.expiresAt,e[_t.es.URL]=this.url,e[_t.es.zs]=this.linkText,e[_t.es.ks]=this.aspectRatio,e[_t.es.qs]=this.extras,e[_t.es.vs]=this.pinned,e[_t.es.ws]=this.dismissible,e[_t.es.ys]=this.clicked,e[_t.es.As]=this.test,e}}class Ode extends _t{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b){super(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b),this.oe="ab-captioned-image",this.ae=!0,this.test=!1}bt(){const e={};return e[_t.es.hs]=_t.cs.os,e[_t.es.ds]=this.id,e[_t.es.ps]=this.viewed,e[_t.es.us]=this.title,e[_t.es.ls]=this.imageUrl,e[_t.es.fs]=this.description,e[_t.es.xs]=this.updated,e[_t.es.bs]=this.created,e[_t.es.gs]=this.categories,e[_t.es.js]=this.expiresAt,e[_t.es.URL]=this.url,e[_t.es.zs]=this.linkText,e[_t.es.ks]=this.aspectRatio,e[_t.es.qs]=this.extras,e[_t.es.vs]=this.pinned,e[_t.es.ws]=this.dismissible,e[_t.es.ys]=this.clicked,e[_t.es.As]=this.test,e}}class Pde extends _t{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b){super(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b),this.oe="ab-classic-card",this.ae=!0}bt(){const e={};return e[_t.es.hs]=_t.cs.Ii,e[_t.es.ds]=this.id,e[_t.es.ps]=this.viewed,e[_t.es.us]=this.title,e[_t.es.ls]=this.imageUrl,e[_t.es.fs]=this.description,e[_t.es.xs]=this.updated,e[_t.es.bs]=this.created,e[_t.es.gs]=this.categories,e[_t.es.js]=this.expiresAt,e[_t.es.URL]=this.url,e[_t.es.zs]=this.linkText,e[_t.es.ks]=this.aspectRatio,e[_t.es.qs]=this.extras,e[_t.es.vs]=this.pinned,e[_t.es.ws]=this.dismissible,e[_t.es.ys]=this.clicked,e[_t.es.As]=this.test,e}}class vx extends _t{constructor(e,n,r,i,s,a){super(e,n,null,null,null,null,r,null,i,null,null,null,s,a),this.isControl
221=!0,this.oe="ab-control-card",this.ae=!1}bt(){const e={};return e[_t.es.hs]=_t.cs.ci,e[_t.es.ds]=this.id,e[_t.es.ps]=this.viewed,e[_t.es.xs]=this.updated,e[_t.es.js]=this.expiresAt,e[_t.es.qs]=this.extras,e[_t.es.vs]=this.pinned,e[_t.es.As]=this.test,e}}function n4(t){const e=t==null?void 0:t.ft(rt.gt._E);let n;return e&&(n={label:e.l,name:e.a}),n}let qh=class r4{constructor(e,n,r,i,s){this.userId=e,this.type=n,this.time=r,this.sessionId=i,this.data=s,this.userId=e,this.type=n,this.time=ptt(r),this.sessionId=i,this.data=s}Nr(){var e;const n={name:this.type,time:mx(this.time),data:this.data||{},session_id:this.sessionId};this.userId!=null&&(n.user_id=this.userId);const r=((e=je.Sr())===null||e===void 0?void 0:e.jh())||!1;if(!n.user_id&&!r){const i=n4(je.j());i&&(n.alias=i)}return n}bt(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(e){return new r4(e.user_id,e.name,e.time,e.session_id,e.data)}static RE(e){return e!=null&&gx(e)&&e.t!=null&&e.t!==""}static Rn(e){return new r4(e.u,e.t,e.ts,e.s,e.d)}};const Of=t=>t instanceof Error?t.message:String(t);class Pf{constructor(e,n,r){this.eu=e,e==null&&(e=Pg.ce()),!r||isNaN(r)?this.Gl=new Date().valueOf():this.Gl=r,this.eu=e,this.ql=new Date().valueOf(),this.kl=n}bt(){return`g:${encodeURIComponent(this.eu)}|e:${this.kl}|c:${this.Gl}|l:${this.ql}`}static hE(e){if(typeof e!="string")return null;const n=e.lastIndexOf("|e:"),r=e.substring(0,n),i=r.split("g:")[1];let s;return s=/[|:]/.test(i)?encodeURIComponent(i):i,e=e.replace(r,`g:${s}`)}static Rn(e){let n;if(typeof e=="string")try{const r=e.split("|");if(!to(r)||r.length!==4)return null;const i=a=>a.split(":")[1],s=a=>{const o=parseInt(i(a));if(!isNaN(o))return o};n=new Pf(decodeURIComponent(i(r[0])),s(r[1]),s(r[2])),n.ql=s(r[3])}catch(r){we.info(`Unable to parse cookie string ${e}, failed with error: ${Of(r)}`)}else{if(e==null||e.g==null)return null;n=new Pf(e.g,e.e,e.c),n.ql=e.l}return n}}function jL(t){let e=t.length;for(let n=t.length-1;n>=0;n--){const r=t.charCodeAt(n);r>127&&r<=2047?e++:r>2047&&r<=65535&&(e+=2),r>=56320&&r<=57343&&n--}return e}function Ett(t){try{t=t.replace(/-/g,"+").replace(/_/g,"/");const e=window.atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);const r=new Uint16Array(n.buffer);return String.fromCharCode(...r)}catch(e){return we.error("Unable to decode Base64: "+e),null}}const Ar={types:{io:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",co:"openLink",mo:"openLinkInWebView"},properties:{type:"type",eo:"steps",so:"args"}},X_={Mr:"unknownBrazeAction",wr:"noPushPrompt"},i4=(t,e)=>{switch(t){case X_.Mr:return`${e} contains an unknown braze action type and will not be displayed.`;case X_.wr:return`${e} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`;default:return""}};function nV(t){try{const e=t.match(J_),n=e?e[0].length:null,r=n?t.substring(n):null;if(n==null||n>t.length-1||!r)return void we.error(`Did not find base64 encoded brazeAction in url to process : ${t}`);const i=Ett(r);return i?JSON.parse(i):void we.error(`Failed to decode base64 encoded brazeAction: ${r}`)}catch(e){return void we.error(`Failed to process brazeAction URL ${t} : ${Of(e)}`)}}function Rde(t,e){let n=!1;if(e){for(const r of e)if(n=n||t(r),n)return!0}return!1}function rV(t){const e=Ar.properties.type,n=Ar.properties.eo;try{if(t==null)return!0;const r=t[e];return r===Ar.types.io?Rde(rV,t[n]):!Ptt(r)}catch{return!0}}function Lde(t){if(!t||!Dde(t))return!1;const e=Ar.properties.type,n=Ar.properties.eo,r=t[e];return r===Ar.types.io?Rde(Lde,t[n]):r===Ar.types.requestPushPermission}const Ttt=/^[^\x00-\x1F\x22]+$/,Att=/[$.]/,wtt=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],_tt=new RegExp(/^.+@.+\..+$/),J_=/^brazeActions:\/\/v\d+\//,Ctt=/^[^\s]+$/;function fd(t,e,n){const r=t!=null&&typeof t=="string"&&(t===""||t.match(Ttt)!=null);return r||we.error(`Cannot ${e} because ${n} "${t}
221" is invalid.`),r}function iV(t){return t!=null&&t.match(Att)&&wtt.indexOf(t)===-1&&we.warn("Custom attribute keys cannot contain '$' or '.'"),fd(t,"set custom user attribute","the given key")}function sV(t){const e=typeof t;return t==null||e==="number"||e==="boolean"||Cf(t)||e==="string"}function s4(t,e,n){const r=n!==-1;if(r&&n>50)return we.error("Nested attributes cannot be more than 50 levels deep."),!1;const i=r?n+1:-1;if(to(t)&&to(e)){for(let s=0;s<t.length&&s<e.length;s++)if(Cf(t[s])&&(e[s]=HL(t[s])),!s4(t[s],e[s],i))return!1}else{if(!gx(t))return sV(t);for(const s of Fu(t)){const a=t[s];if(r&&!iV(s)||(Cf(a)&&(e[s]=HL(a)),!s4(a,e[s],i)))return!1}}return!0}function xtt(t,e,n,r,i){let s;return s=gx(t)||to(t)?s4(t,e,i?1:-1):sV(t),s||we.error(`Cannot ${n} because ${r} "${t}" is invalid.`),s}function cc(t,e,n,r=!1){const i=typeof t=="string"||t===null&&r;return i||we.error(`Cannot ${e} because ${n} "${t}" is invalid.`),i}function D2(t,e,n,r,i){if(t==null&&(t={}),typeof t!="object"||to(t))return we.error(`${e} requires that ${n} be an object. Ignoring ${i}.`),[!1,null];let s,a;e===dE?(s=76800,a="75KB"):(s=51200,a="50KB");const o=JSON.stringify(t);if(jL(o)>s)return we.error(`Could not ${r} because ${n} was greater than the max size of ${a}.`),[!1,null];let l;try{l=JSON.parse(o)}catch{return we.error(`Could not ${r} because ${n} did not contain valid JSON.`),[!1,null]}for(const u in t){if(e===dE&&!iV(u))return[!1,null];if(!fd(u,r,`the ${i} property name`))return[!1,null];const c=t[u];if(e!==dE&&c==null){delete t[u],delete l[u];continue}if(Cf(c)&&(l[u]=HL(c)),!xtt(c,l[u],r,`the ${i} property "${u}"`,e===dE))return[!1,null]}return[!0,l]}function Itt(t,e){let n=!1,r=!1;const i=()=>{we.error("Custom attribute arrays must be either string arrays or object arrays.")};for(const s of e)if(typeof s=="string"){if(r)return i(),[!1,!1];if(!fd(s,`set custom user attribute "${t}"`,"the element in the given array"))return[!1,!1];n=!0}else{if(!gx(s))return i(),[!1,!1];if(n)return i(),[!1,!1];if(!D2(s,dE,"attribute value",`set custom user attribute "${t}"`,"custom user attribute"))return[!1,!1];r=!0}return[n,r]}function Ott(t){return typeof t=="string"&&t.toLowerCase().match(_tt)!=null}function Dde(t){if(!(Ar.properties.type in t))return!1;switch(t[Ar.properties.type]){case Ar.types.io:if(Ar.properties.eo in t)return!0;break;case Ar.types.logCustomEvent:case Ar.types.setEmailNotificationSubscriptionType:case Ar.types.setPushNotificationSubscriptionType:case Ar.types.setCustomUserAttribute:case Ar.types.addToSubscriptionGroup:case Ar.types.removeFromSubscriptionGroup:case Ar.types.addToCustomAttributeArray:case Ar.types.removeFromCustomAttributeArray:case Ar.types.co:case Ar.types.mo:if(Ar.properties.so in t)return!0;break;case Ar.types.requestPushPermission:return!0;default:return!1}return!1}function Ptt(t){let e=!1;return Object.keys(Ar.types).forEach(n=>{Ar.types[n]!==t.toString()||(e=!0)}),e}function Rtt(t){return Ctt.test(t)}class Si{constructor(e,n){this.Cs=e,this.Fi=n,this.Cs=e,this.Fi=n}getUserId(e){const n=this.Cs.getUserId();if(typeof e!="function")return n;we.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),e(n)}addAlias(e,n){return!cc(e,"add alias","the alias",!1)||e.length<=0?(we.error("addAlias requires a non-empty alias"),!1):!cc(n,"add alias","the label",!1)||n.length<=0?(we.error("addAlias requires a non-empty label"),!1):this.Fi.Cn(e,n).tt}setFirstName(e){return!!cc(e,"set first name","the firstName",!0)&&this.Cs.nu("first_name",e)}setLastName(e){return!!cc(e,"set last name","the lastName",!0)&&this.Cs.nu("last_name",e)}setEmail(e){return e===null||Ott(e)?this.Cs.nu("email",e):(we.error(`Cannot set email address - "${e}" did not pass RFC-5322 validation.`),!1)}setGender(e){return typeof e=="string"&&(e=e.toLowerCase()),!(e!==null&&!Wh(Si.Genders,e,`Gender "${e}" is not a valid gender.`,"User.Genders"))&&this.Cs.nu("gender",e)}setDateOfBirth(e,n,r){return e===null&&n===null&&r===null?this.Cs.nu("dob",null):(e=e!=null?parseInt(e.toString()):null,n=n!=null?parseInt(n.toString()):null,r=r!=null?parseInt(r.toString()):null,e==null||n==null||r==null||isNaN(e)||isNaN(n)||isNaN(r)||n>12||n<1||r>31||r<1?(we.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.Cs.nu("dob",`${e}-${n}-${r}`))}setCountry(e){return!!cc(e,"set country","the country",!0)&&this.Cs.nu("country",e)}setHomeCity(e){return!!cc(e,"set home city","the homeCity",!0)&&this.Cs.nu("home_city",e)}setLanguage(e){return!!cc(e,"set language","the language",!0)&&this.Cs.nu("language",e)}setEmailNotificationSubscriptionType(e){return!!Wh(Si.NotificationSubscriptionTypes,e,`Email notification setting "${e}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Cs.nu("email_subscribe",e)}setPushNotificationSubscriptionType(e){return!!Wh(Si.NotificationSubscriptionTypes,e,`Push notification setting "${e}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Cs.nu("push_subscribe",e)}setPhoneNumber(e){return!!cc(e,"set phone number","the phoneNumber",!0)&&(e===null||e.match(Si.Fn)?this.Cs.nu("phone",e):(we.error(`Cannot set phone number - "${e}
221" did not pass validation.`),!1))}setLastKnownLocation(e,n,r,i,s){return e==null||n==null?(we.error("Cannot set last-known location - latitude and longitude are required."),!1):(e=parseFloat(e.toString()),n=parseFloat(n.toString()),r!=null&&(r=parseFloat(r.toString())),i!=null&&(i=parseFloat(i.toString())),s!=null&&(s=parseFloat(s.toString())),isNaN(e)||isNaN(n)||r!=null&&isNaN(r)||i!=null&&isNaN(i)||s!=null&&isNaN(s)?(we.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):e>90||e<-90||n>180||n<-180?(we.error("Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively."),!1):r!=null&&r<0||s!=null&&s<0?(we.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.Fi.setLastKnownLocation(this.Cs.getUserId(),e,n,i,r,s).tt)}setCustomUserAttribute(e,n,r){if(!iV(e))return!1;const i=s=>{const[a]=D2(s,dE,"attribute value",`set custom user attribute "${e}"`,"custom user attribute");return a};if(to(n)){const[s,a]=Itt(e,n);if(!s&&!a&&n.length!==0)return!1;if(s||n.length===0)return this.Fi.Ln(_r.$n,e,n).tt;for(const o of n)if(!i(o))return!1}else if(gx(n)){if(!i(n))return!1;if(r)return this.Fi.Ln(_r.Bn,e,n).tt}else if(!(n!==void 0&&sV(n))||(Cf(n)&&(n=HL(n)),typeof n=="string"&&!fd(n,`set custom user attribute "${e}"`,"the element in the given array")))return!1;return this.Cs.setCustomUserAttribute(e,n)}addToCustomAttributeArray(e,n){return!!fd(e,"add to custom user attribute array","the given key")&&!(n!=null&&!fd(n,"add to custom user attribute array","the given value"))&&this.Fi.Ln(_r.On,e,n).tt}removeFromCustomAttributeArray(e,n){return!!fd(e,"remove from custom user attribute array","the given key")&&!(n!=null&&!fd(n,"remove from custom user attribute array","the given value"))&&this.Fi.Ln(_r.Gn,e,n).tt}incrementCustomUserAttribute(e,n){if(!fd(e,"increment custom user attribute","the given key"))return!1;n==null&&(n=1);const r=parseInt(n.toString());return isNaN(r)||r!==parseFloat(n.toString())?(we.error(`Cannot increment custom user attribute because the given incrementValue "${n}" is not an integer.`),!1):this.Fi.Ln(_r.Hn,e,r).tt}setCustomLocationAttribute(e,n,r){return!!fd(e,"set custom location attribute","the given key")&&((n!==null||r!==null)&&(n=n!=null?parseFloat(n.toString()):null,r=r!=null?parseFloat(r.toString()):null,n==null&&r!=null||n!=null&&r==null||n!=null&&(isNaN(n)||n>90||n<-90)||r!=null&&(isNaN(r)||r>180||r<-180))?(we.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal."),!1):this.Fi.Kn(e,n,r).tt)}addToSubscriptionGroup(e){return!cc(e,"add user to subscription group","subscription group ID",!1)||e.length<=0?(we.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Fi.Mn(e,Si.Yn.SUBSCRIBED).tt}removeFromSubscriptionGroup(e){return!cc(e,"remove user from subscription group","subscription group ID",!1)||e.length<=0?(we.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Fi.Mn(e,Si.Yn.UNSUBSCRIBED).tt}setLineId(e){return cc(e,"set LINE user ID","the ID",!0)&&(e==null?void 0:e.length)!==0?e&&e.length>Si.Jn?(we.error(`Rejected LINE user ID ${e} because it is longer than ${Si.Jn} characters.`),!1):this.Cs.nu("native_line_id",e):(we.error("setLineId requires a non-empty ID"),!1)}An(e,n,r,i,s){this.Cs.An(e,n,r,i,s),this.Fi.Qn()}xn(e){this.Cs.xn(e)}}Si.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},Si.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},Si.Fn=/^[0-9 .\\(\\)\\+\\-]+$/,Si.Yn={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},Si.Xn="user_id",Si.lu="custom",Si.ur=997,Si.Jn=33;let kde=class{constructor(){}ef(){}ff(){}ec(e){}static nf(e,n){if(e&&n){if(e=e.toLowerCase(),to(n.cf)){for(let r=0;r<n.cf.length;r++)if(e.indexOf(n.cf[r].toLowerCase())!==-1)return n.identity}else if(e.indexOf(n.cf.toLowerCase())!==-1)return n.identity}}};const uf={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox"},Oh={xg:"Android",ao:"iOS",Pg:"Mac",Og:"Windows"};class aV extends kde{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){const e=this.Bc();this.browser=e.browser||"Unknown Browser",this.version=e.version||"Unknown Version"}this.OS=null}ef(){return this.browser}ff(){return this.version}ec(e){if(this.OS)return Promise.resolve(this.OS);const n=r=>{for(let i=0;i<e.length;i++){const s=aV.nf(r,e[i]);if(s)return this.OS=s,this.OS}return r};return this.userAgentData.platform?Promise.resolve(n(this.userAgentData.platform)):this.getHighEntropyValues().then(r=>r.platform?n(r.platform):navigator.platform).catch(()=>navigator.platform)}Bc(){const e={},n=this.userAgentData.brands;if(n&&n.length)for(const r of n){const i=this.Vc(uf),s=r.brand.match(i);if(s&&s.length>
2210){e.browser=s[0],e.version=r.version;break}}return e}Vc(e){const n=[];for(const r in e){const i=r;n.push(e[i])}return new RegExp("("+n.join("|")+")","i")}getHighEntropyValues(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()}}class zL extends kde{constructor(){super(),this.fd=zL.Bc(navigator.userAgent||"")}ef(){return this.fd[0]||"Unknown Browser"}ff(){return this.fd[1]||"Unknown Version"}ec(e){for(let n=0;n<e.length;n++){const r=e[n].string;let i=zL.nf(r,e[n]);if(i)return i===Oh.Pg&&navigator.maxTouchPoints>1&&(i=Oh.ao),Promise.resolve(i)}return Promise.resolve(navigator.platform)}static Bc(e){let n,r=e.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(e.indexOf("(Web0S; Linux/SmartTV)")!==-1)return["LG Smart TV",null];if(e.indexOf("CrKey")!==-1)return["Chromecast",null];if(e.indexOf("BRAVIA")!==-1||e.indexOf("SonyCEBrowser")!==-1||e.indexOf("SonyDTV")!==-1)return["Sony Smart TV",null];if(e.indexOf("PhilipsTV")!==-1)return["Philips Smart TV",null];if(e.match(/\b(Roku)\b/))return["Roku",null];if(e.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(r[1]===uf.rO&&(n=e.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),n!=null))return n=n.slice(1),n[0]=n[0].replace("OPR",uf.oO),n[0]=n[0].replace("EdgA",uf.eO),n[0]==="Edg"&&(n[0]=uf.eO),[n[0],n[1]];if(r[1]===uf.Bg&&(n=e.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),n!=null))return n=n.slice(1),n[0]=n[0].replace("EdgiOS",uf.eO),[n[0],n[1]];if(r=r[2]?[r[1],r[2]]:[null,null],r[0]===uf.Bg&&(n=e.match(/version\/(\.?\d+(\.\d+)*)/i))!=null&&r.splice(1,1,n[1]),(n=e.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))!=null&&r.splice(1,1,n[2]),r[0]===uf.oO&&(n=e.match(/mini\/(\.?\d+(\.\d+)*)/i))!=null)return["Opera Mini",n[1]||""];if(r[0]){const i=r[0].toLowerCase();i==="crios"&&(r[0]=uf.rO),i==="tizen"&&(r[0]="Samsung Smart TV",r[1]=null),i==="samsungbrowser"&&(r[0]="Samsung Browser")}return r}}class eC{constructor(){const e=navigator.userAgentData?aV:zL;this.Sg=new e,this.userAgent=navigator.userAgent,this.browser=this.Sg.ef(),this.version=this.Sg.ff(),this.OS=null,this.ec().then(r=>this.OS=r);const n=navigator;this.language=(n.userLanguage||n.language||n.browserLanguage||n.systemLanguage||"").toLowerCase(),this.Ja=eC.vg(this.userAgent)}fE(){return this.browser===uf.Bg}ic(){return this.OS||null}ec(){return this.OS?Promise.resolve(this.OS):this.Sg.ec(eC.kg).then(e=>(this.OS=e,e))}static vg(e){e=e.toLowerCase();const n=["googlebot","bingbot","slurp","duckduckbot","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","msnbot","adsbot","mediapartners-google","teoma","taiko"];for(let r=0;r<n.length;r++)if(e.indexOf(n[r])!==-1)return!0;return!1}}eC.kg=[{string:navigator.platform,cf:"Win",identity:Oh.Og},{string:navigator.platform,cf:"Mac",identity:Oh.Pg},{string:navigator.platform,cf:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,cf:"FreeBSD",identity:"FreeBSD"},{string:navigator.platform,cf:"OpenBSD",identity:"OpenBSD"},{string:navigator.platform,cf:"Nintendo",identity:"Nintendo"},{string:navigator.platform,cf:"SunOS",identity:"SunOS"},{string:navigator.platform,cf:"PlayStation",identity:"PlayStation"},{string:navigator.platform,cf:"X11",identity:"X11"},{string:navigator.userAgent,cf:["iPhone","iPad","iPod"],identity:Oh.ao},{string:navigator.platform,cf:"Pike v",identity:Oh.ao},{string:navigator.userAgent,cf:["Web0S"],identity:"WebOS"},{string:navigator.userAgent,cf:"Tizen",identity:"Tizen"},{string:navigator.platform,cf:["Linux armv7l","Android"],identity:Oh.xg},{string:navigator.userAgent,cf:["Android"],identity:Oh.xg},{string:navigator.platform,cf:"Linux",identity:"Linux"}];const Du=new eC,rt={iu:{su:"ab.storage.userId",Na:"ab.storage.deviceId",Nl:"ab.storage.sessionId"},gt:{ac:"ab.test",tE:"ab.storage.events",eE:"ab.storage.attributes",sE:"ab.storage.attributes.anonymous_user",oc:"ab.storage.device",pu:"ab.storage.sdk_metadata",Ru:"ab.storage.session_id_for_cached_metadata",zn:"ab.storage.pushToken",qi:"ab.storage.newsFeed",zi:"ab.storage.lastNewsFeedRefresh",Zt:"ab.storage.cardImpressions",ml:"ab.storage.serverConfig",rE:"ab.storage.triggers",oE:"ab.storage.triggers.ts",Hl:"ab.storage.messagingSessionStart",Hs:"ab.storage.cc",Os:"ab.storage.ccLastFullSync",Qs:"ab.storage.ccLastCardUpdated",Hu:"ab.storage.globalRateLimitCurrentTokenCount",_u:"ab.storage.dynamicRateLimitCurrentTokenCount",Kt:"ab.storage.ccClicks",Yt:"ab.storage.ccImpressions",Vt:"ab.storage.ccDismissals",nE:"ab.storage.lastDisplayedTriggerTimesById",aE:"ab.storage.lastDisplayedTriggerTime",iE:"ab.storage.triggerFireInstancesById",qh:"ab.storage.signature",EE:"ab.storage.brazeSyncRetryCount",Zs:"ab.storage.sdkVersion",Xe:"ab.storage.ff",Ge:"ab.storage.ffImpressions",Ze:"ab.storage.ff
221LastRefreshAt",Ve:"ab.storage.ff.sessionId",lE:"ab.storage.lastReqToEndpoint",SE:"ab.storage.requestAttempts",Kr:"ab.storage.deferredIam",Ku:"ab.storage.lastSdkReq",_E:"ab.storage.alias",vt:"ab.storage.banners",Nt:"ab.storage.banners.impressions",yt:"ab.storage.banners.sessionId"},me:"ab.optOut"};let Cl=class Nde{constructor(e,n){this.uE=e,this.cE=n,this.uE=e,this.cE=n}Ha(e){const n=Fu(rt.iu),r=new Nde.se(e);for(const i of n)r.remove(rt.iu[i])}uu(e,n){let r=null;n!=null&&n instanceof Pf&&(r=n.bt()),this.uE.store(e,r)}TE(e){const n=this.tu(e);n!=null&&(n.ql=new Date().valueOf(),this.uu(e,n))}tu(e){const n=this.uE.gr(e),r=(s=>{let a;try{a=JSON.parse(s)}catch{a=null}return a})(n);let i;if(r)i=Pf.Rn(r)||null,i&&this.uu(e,i);else{const s=Pf.hE(n);i=Pf.Rn(s)||null,s!==n&&i&&this.uu(e,i)}return i}Jl(e){this.uE.remove(e)}Xa(){const e=Fu(rt.iu);let n;for(const r of e)n=this.tu(rt.iu[r]),n!=null&&this.uu(rt.iu[r],n)}Vo(e){let n;if(e==null||e.length===0)return!1;n=to(e)?e:[e];let r=this.cE.gr(rt.gt.tE);r!=null&&to(r)||(r=[]);for(let i=0;i<n.length;i++)r.push(n[i].bt());return this.cE.store(rt.gt.tE,r)}Al(e){return e!=null&&this.Vo([e])}AE(){let e=this.cE.gr(rt.gt.tE);this.cE.remove(rt.gt.tE),e==null&&(e=[]);const n=[];let r=!1,i=null;if(to(e))for(let s=0;s<e.length;s++)qh.RE(e[s])?n.push(qh.Rn(e[s])):i=s;else r=!0;if(r||i!=null){let s="Stored events could not be deserialized as Events";r&&(s+=", was "+Object.prototype.toString.call(e)+" not an array"),i!=null&&(s+=", value at index "+i+" does not look like an event"),s+=", serialized values were of type "+typeof e+": "+JSON.stringify(e),n.push(new qh(null,_r.qu,new Date().valueOf(),null,{e:s}))}return n}Bt(e,n){return!!Wh(rt.gt,e,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.cE.store(e,n)}ft(e){return!!Wh(rt.gt,e,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.cE.gr(e)}Ut(e){return!!Wh(rt.gt,e,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.cE.remove(e),!0)}clearData(){const e=Fu(rt.iu),n=Fu(rt.gt);for(let r=0;r<e.length;r++){const i=e[r];this.uE.remove(rt.iu[i])}for(let r=0;r<n.length;r++){const i=n[r];this.cE.remove(rt.gt[i])}}gE(e){return e||rt.gt.sE}Cu(e){let n=this.cE.gr(rt.gt.eE);n==null&&(n={});const r=this.gE(e[Si.Xn]),i=n[r];for(const s in e)s!==Si.Xn&&(n[r]==null||i&&i[s]==null)&&this.mu(e[Si.Xn],s,e[s])}mu(e,n,r){let i=this.cE.gr(rt.gt.eE);i==null&&(i={});const s=this.gE(e);let a=i[s];if(a==null&&(a={},e!=null&&(a[Si.Xn]=e)),n===Si.lu){a[n]==null&&(a[n]={});for(const o in r)a[n][o]=r[o]}else a[n]=r;return i[s]=a,this.cE.store(rt.gt.eE,i)}OE(){const e=this.cE.gr(rt.gt.eE);this.cE.remove(rt.gt.eE);const n=[];for(const r in e)e[r]!=null&&n.push(e[r]);return n}ru(e){const n=this.cE.gr(rt.gt.eE);if(n!=null){const a=this.gE(null),o=n[a];o!=null&&(n[a]=void 0,this.cE.store(rt.gt.eE,n),o[Si.Xn]=e,this.Cu(o))}const r=this.tu(rt.iu.Nl);let i=null;r!=null&&(i=r.eu);const s=this.AE();if(s!=null)for(let a=0;a<s.length;a++){const o=s[a];o.userId==null&&o.sessionId==i&&(o.userId=e),this.Al(o)}}IE(){return this.cE.dE}};Cl.gc=class{constructor(t){this.an=t,this.an=t,this.dE=Du.fE()?3:10}bE(t){return t+"."+this.an}store(t,e){const n={v:e};try{return localStorage.setItem(this.bE(t),JSON.stringify(n)),!0}catch(r){return we.info("Storage failure: "+Of(r)),!1}}gr(t){try{let e=null;const n=localStorage.getItem(this.bE(t));return n!=null&&(e=JSON.parse(n)),e==null?null:e.v}catch(e){return we.info("Storage retrieval failure: "+Of(e)),null}}remove(t){try{localStorage.removeItem(this.bE(t))}catch(e){return we.info("Storage removal failure: "+Of(e)),!1}}},Cl.uc=class{constructor(){this.KE={},this.mE=5242880,this.dE=3}store(t,e){const n={value:e},r=this.YE(e);return r>this.mE?(we.info("Storage failure: object is ≈"+r+" bytes which is greater than the max of "+this.mE),!1):(this.KE[t]=n,!0)}YE(t){const e=[],n=[t];let r=0;for(;n.length;){const i=n.pop();if(typeof i=="boolean")r+=4;else if(typeof i=="string")r+=2*i.length;else if(typeof i=="number")r+=8;else if(typeof i=="object"&&e.indexOf(i)===-1){let s,a;e.push(i);for(const o in i)a=i,s=o,n.push(a[s])}}return r}gr(t){const e=this.KE[t];return e==null?null:e.value}remove(t){this.KE[t]=null}},Cl.se=class{constructor(t,e){this.an=t,this.NE=e,this.an=t,this.GE=this.DE(),this.CE=576e3,this.NE=!!e}bE(t){return this.an!=null?t+"."+this.an:t}DE(){let t=0,e=document.location.hostname;const n=e.split("."),r="ab._gd";
221for(;t<n.length-1&&document.cookie.indexOf(r+"="+r)===-1;)t++,e="."+n.slice(-1-t).join("."),document.cookie=r+"="+r+";domain="+e+";";return document.cookie=r+"=;expires="+new Date(0).toUTCString()+";domain="+e+";",e}le(){const t=new Date;return t.setTime(t.getTime()+60*this.CE*1e3),t.getFullYear()}ME(){const t=R2(rt.iu),e=document.cookie.split(";");for(let n=0;n<e.length;n++){let r=e[n];for(;r.charAt(0)===" ";)r=r.substring(1);let i=!1;for(let s=0;s<t.length;s++)if(r.indexOf(t[s])===0){i=!0;break}if(i){const s=r.split("=")[0];s.indexOf("."+this.an)===-1&&this.pE(s)}}}store(t,e){this.ME();const n=new Date;n.setTime(n.getTime()+60*this.CE*1e3);const r="expires="+n.toUTCString(),i="domain="+this.GE;let s;s=this.NE?e:encodeURIComponent(e);const a=this.bE(t)+"="+s+";"+r+";"+i+";path=/";return a.length>=4093?(we.info("Storage failure: string is "+a.length+" chars which is too large to store as a cookie."),!1):(document.cookie=a,!0)}gr(t){const e=[],n=this.bE(t)+"=",r=document.cookie.split(";");for(let i=0;i<r.length;i++){let s=r[i];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(n)===0)try{let a;a=this.NE?s.substring(n.length,s.length):decodeURIComponent(s.substring(n.length,s.length)),e.push(a)}catch(a){return we.info("Storage retrieval failure: "+Of(a)),this.remove(t),null}}return e.length>0?e[e.length-1]:null}remove(t){this.pE(this.bE(t))}pE(t){const e=t+"=;expires="+new Date(0).toUTCString();document.cookie=e,document.cookie=e+";path=/";const n=e+";domain="+this.GE;document.cookie=n,document.cookie=n+";path=/"}},Cl.lc=class{constructor(t,e,n){this.an=t,this.vE=[],e&&this.vE.push(new Cl.se(t)),n&&this.vE.push(new Cl.gc(t)),this.vE.push(new Cl.uc)}store(t,e){let n=!0;for(let r=0;r<this.vE.length;r++)n=this.vE[r].store(t,e)&&n;return n}gr(t){for(let e=0;e<this.vE.length;e++){const n=this.vE[e].gr(t);if(n!=null)return n}return null}remove(t){new Cl.se(this.an).remove(t);for(let e=0;e<this.vE.length;e++)this.vE[e].remove(t)}};class Ltt{constructor(e,n,r){this.C=e,this.gh=n,this.Fh=r,this.C=e,this.gh=n||!1,this.Fh=r,this.kh=new eo,this.fh=0,this.wh=1}jh(){return this.gh}xh(){return this.C.ft(rt.gt.qh)}setSdkAuthenticationSignature(e){const n=this.xh();this.C.Bt(rt.gt.qh,e);const r=Ss.Ls.Fs;new Ss(r,we).setItem(r.Ms.yh,this.wh,e),n!==e&&this.it()}Bh(){this.C.Ut(rt.gt.qh);const e=Ss.Ls.Fs;new Ss(e,we).ge(e.Ms.yh,this.wh)}subscribeToSdkAuthenticationFailures(e){return this.Fh.Dt(e)}Gh(e){this.Fh.X(e)}Hh(){this.kh.removeAllSubscriptions()}Jh(){this.fh+=1}Kh(){return this.fh}it(){this.fh=0}}let yT=class{constructor(){}U(e){}changeUser(e=!1){}clearData(e=!1){}};class Dtt{constructor(e){this.id=e,this.id=e}Nr(){const e={};return this.browser!=null&&(e.browser=this.browser),this.tc!=null&&(e.browser_version=this.tc),this.os!=null&&(e.os_version=this.os),this.resolution!=null&&(e.resolution=this.resolution),this.language!=null&&(e.locale=this.language),this.timeZone!=null&&(e.time_zone=this.timeZone),this.userAgent!=null&&(e.user_agent=this.userAgent),e}}const bh={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};class ktt{constructor(e,n){this.C=e,this.Qa=n,this.C=e,n==null&&(n=R2(bh)),this.Qa=n}ve(e=!0){let n=this.C.tu(rt.iu.Na);n==null&&(n=new Pf(Pg.ce()),e&&this.C.uu(rt.iu.Na,n));const r=new Dtt(n.eu);for(let i=0;i<this.Qa.length;i++)switch(this.Qa[i]){case bh.BROWSER:r.browser=Du.browser;break;case bh.BROWSER_VERSION:r.tc=Du.version;break;case bh.OS:r.os=this.ec();break;case bh.RESOLUTION:r.rc=screen.width+"x"+screen.height;break;case bh.LANGUAGE:r.language=Du.language;break;case bh.TIME_ZONE:r.timeZone=this.sc(new Date);break;case bh.USER_AGENT:r.userAgent=Du.userAgent}return r}ec(){if(Du.ic())return Du.ic();const e=this.C.ft(rt.gt.oc);return e&&e.os_version?e.os_version:Du.ec()}sc(e){let n=!1;if(typeof Intl<"u"&&typeof Intl.DateTimeFormat=="function")try{if(typeof Intl.DateTimeFormat().resolvedOptions=="function"){const i=Intl.DateTimeFormat().resolvedOptions().timeZone;if(i!=null&&i!=="")return i}}catch(i){we.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+Of(i)),n=!0}if(n)return"";const r=e.getTimezoneOffset();return this.nc(r)}nc(e){const n=Math.trunc(e/60),r=Math.trunc(e%60);let i="GMT";return e!==0&&(i+=e<0?"+":"-",i+=("00"+Math.abs(n)).slice(-2)+":"+("00"+Math.abs(r)).slice(-2)),i}}
221const Ky={Du:"invalid_api_key",Tu:"blacklisted",ku:"no_device_identifier",Au:"invalid_json_response",bu:"empty_response",__:"sdk_auth_error"},Nn={O:{Nu:"data",wi:"content_cards/sync",Le:"feature_flags/sync",Er:"template",K:"banners/sync"},Vu:t=>t==null?void 0:t.ft(rt.gt.lE),sm:t=>t==null?void 0:t.ft(rt.gt.SE),nm:(t,e)=>{t==null||t.Bt(rt.gt.lE,e)},rm:(t,e)=>{t==null||t.Bt(rt.gt.SE,e)},zu:(t,e)=>{if(!t||!e)return-1;const n=Nn.Vu(t);if(n==null)return-1;const r=n[e];return r==null||isNaN(r)?-1:r},ju:(t,e)=>{let n=dF;if(!t||!e)return n;const r=Nn.sm(t);return r==null?n:(n=r[e],n==null||isNaN(n)?dF:n)},W:(t,e,n)=>{if(!t||!e)return;let r=Nn.Vu(t);r==null&&(r={}),r[e]=n,Nn.nm(t,r)},Mu:(t,e,n)=>{if(!t||!e)return;let r=Nn.sm(t);r==null&&(r={}),r[e]=n,Nn.rm(t,r)},vi:(t,e)=>{t&&e&&Nn.Mu(t,e,dF)},Uu:(t,e)=>{if(!t||!e)return;const n=Nn.ju(t,e);Nn.Mu(t,e,n+1)}},yx={Y:t=>{let e,n;try{const r=()=>{we.error("This browser does not have any supported ajax options!")};let i=!1;if(window.XMLHttpRequest&&(i=!0),!i)return void r();e=new XMLHttpRequest;const s=o=>{typeof t.error=="function"&&t.error(e.status),typeof t.nt=="function"&&t.nt(!1,o)};e.onload=()=>{let o=!1;if(e.readyState!==4)return;o=e.status>=200&&e.status<300||e.status===304;const l=e.getAllResponseHeaders();if(o){if(typeof t.tt=="function"){let u;try{u=JSON.parse(e.responseText)}catch{const d={error:e.responseText===""?Ky.bu:Ky.Au,response:e.responseText};(0,t.tt)(d,l)}u&&t.tt(u,l)}typeof t.nt=="function"&&t.nt(!0,l)}else s(l)},e.onerror=()=>{s(e.getAllResponseHeaders())},e.ontimeout=()=>{s()},n=JSON.stringify(t.data),e.open("POST",t.url,!0),e.setRequestHeader("Content-type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest");const a=t.headers||[];for(const o of a)e.setRequestHeader(o[0],o[1]);e.send(n)}catch(r){we.error(`Network request error: ${Of(r)}`)}}},Ntt=t=>{const e={},n=t.toString().split(`\r
222`);if(!n)return e;let r,i;for(const s of n)s&&(r=s.slice(0,s.indexOf(":")).toLowerCase().trim(),i=s.slice(s.indexOf(":")+1).trim(),e[r]=i);return e};class Mtt{constructor(e,n,r,i,s,a,o,l,u,c,d,f){this.hn=e,this.C=n,this.Pa=r,this.Cs=i,this.T=s,this.B=a,this.an=o,this.La=l,this.Ta=u,this.Ra=c,this.appVersion=d,this.au=f,this.du=h=>h==null?"":`${h} `,this.hn=e,this.C=n,this.Pa=r,this.Cs=i,this.T=s,this.B=a,this.an=o,this.La=l,this.Ta=u,this.Ra=c,this.appVersion=d,this.au=f,this.fu=["npm"],this.vu=[]}H(e,n=!1,r=!1){const i=this.hn.ve(!r),s=i.Nr(),a=this.C.ft(rt.gt.oc);Z0(a,s)||(e.device=s),e.api_key=this.an,e.time=mx(new Date().valueOf(),!0);const o=this.C.ft(rt.gt.pu)||[],l=this.C.ft(rt.gt.Ru)||"";this.fu.length>0&&(!Z0(o,this.fu)||l!==this.T.St())&&(e.sdk_metadata=this.fu),e.sdk_version=this.Ta,this.Ra&&(e.sdk_flavor=this.Ra),e.app_version=this.appVersion,e.app_version_code=this.au,e.device_id=i.id;const u=this.Cs.getUserId();if(n&&u!==null&&(e.user_id=u),!u&&!this.Pa.jh()){const c=n4(this.C);c&&(e.alias=c)}return e}st(e,n,r){const i=n.auth_error,s=n.error;if(!i&&!s)return!0;if(i){let a;this.Pa.Jh();const o={errorCode:i.error_code};for(const u of r)to(u)&&u[0]==="X-Braze-Auth-Signature"&&(o.signature=u[1]);e.respond_with&&e.respond_with.user_id?o.userId=e.respond_with.user_id:e.user_id&&(o.userId=e.user_id);const l=i.reason;return l?(o.reason=l,a=`due to ${l}`):a=`with error code ${i.error_code}.`,this.Pa.jh()||(a+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),we.error(`SDK Authentication failed ${a}`),this.gu(e.events||[],e.attributes||[]),this.Pa.Gh(o),!1}if(s){let a,o=s;switch(o){case Ky.bu:return a="Received successful response with empty body.",ka.ut(_r.qu,{e:a}),we.info(a),!1;case Ky.Au:return a="Received successful response with invalid JSON",ka.ut(_r.qu,{e:a+": "+n.response}),we.info(a),!1;case Ky.Du:o=`The API key "${e.api_key}" is invalid for the baseUrl ${this.La}`;break;case Ky.Tu:o="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case Ky.ku:o="No device identifier. Please contact [email protected]"}we.error("Backend error: "+o)}return!1}yu(e,n,r,i){return!!(e&&e.length!==0||n&&n.length!==0||r||i)}wu(e,n,r,i,s=!1){const a=[],o=v=>v||"",l=o(this.Cs.getUserId());let u=this.Gr(e,n);const c=[],d=[];let f,h=null;if(r.length>0){const v=[];for(const b of r){if(f=b.Nr(),this.Pa.jh()){if(l&&!f.user_id){h||(h={}),h.events||(h.events=[]),h.events.push(f);continue}if(o(f.user_id)!==l){d.push(f);continue}}v.push(f)}v.length>0&&(u.events=v)}if(i.length>0){const v=[];for(const b of i)b&&(this.Pa.jh()&&o(b.user_id)!==l?c.push(b):v.push(b));v.length>0&&(u.attributes=v)}if(this.gu(d,c),u=this.H(u,!1,s),h){h=this.H(h,!1,s);const v={requestData:h,headers:this.J(h,Nn.O.Nu)};a.push(v)}if(u&&!this.yu(u.events,u.attributes,e,n))return h?a:null;const g={requestData:u,headers:this.J(u,Nn.O.Nu)};return a.push(g),a}gu(e,n){if(e){const r=[];for(const i of e){const s=qh.fromJson(i);s.time=htt(s.time),r.push(s)}this.C.Vo(r)}if(n)for(const r of n)this.C.Cu(r)}et(e,n){let r="HTTP error ";e!=null&&(r+=e+" "),r+=n,we.error(r)}zr(e){return ka.ut(_r.Su,{n:e})}Gr(e,n,r){const i={};e&&(i.feed=!0),n&&(i.triggers=!0);const s=r??this.Cs.getUserId();if(s&&(i.user_id=s),!i.user_id&&!this.Pa.jh()){const a=n4(this.C);a&&(i.alias=a)}return i.config={config_time:this.B.Et()},{respond_with:i}}
222Bu(e){const n=new Date().valueOf();let r=btt.toString();const i=Nn.zu(this.C,e);return i!==-1&&(r=(n-i).toString()),r}J(e,n,r=!1){const i=[["X-Braze-Api-Key",this.an]],s=this.Bu(n);i.push(["X-Braze-Last-Req-Ms-Ago",s]);const a=Nn.ju(this.C,n).toString();i.push(["X-Braze-Req-Attempt",a]);let o=!1;if(e.respond_with!=null&&e.respond_with.triggers&&(i.push(["X-Braze-TriggersRequest","true"]),o=!0),e.respond_with!=null&&e.respond_with.feed&&(i.push(["X-Braze-FeedRequest","true"]),o=!0),n===Nn.O.wi){i.push(["X-Braze-ContentCardsRequest","true"]);let l=Nn.ju(this.C,Nn.O.wi);l&&!r||(l=1,Nn.Mu(this.C,Nn.O.wi,l));const u=Math.max(0,l-1);i.push(["BRAZE-SYNC-RETRY-COUNT",u.toString()]),o=!0}if(n===Nn.O.Le&&(i.push(["X-Braze-FeatureFlagsRequest","true"]),o=!0),o&&i.push(["X-Braze-DataRequest","true"]),this.Pa.jh()){const l=this.Pa.xh();l!=null&&i.push(["X-Braze-Auth-Signature",l])}return i}Xu(e,n,r,i){const s=window.setTimeout(()=>{we.info(`Retrying rate limited ${this.du(i)}SDK request.`),this.V(n,r,i)},e);this.vu.push(s)}fo(){for(const e of this.vu)window.clearTimeout(e);this.vu=[]}V(e,n,r,i){if(!this.$u(r))return we.info(`${this.du(r)}SDK request being rate limited.`),void(typeof i=="function"&&i());const s=this.Fu();if(!s.Lu)return we.info(`${this.du(r)}SDK request being rate limited. Request will be retried in ${Math.trunc(s.Eu/1e3)} seconds.`),void this.Xu(s.Eu,e,n,r);this.C.Bt(rt.gt.Ku,new Date().valueOf());const a=e.device;a&&a.os_version instanceof Promise?a.os_version.then(o=>{e.device.os_version=o,n(s.Iu)}):n(s.Iu)}Pu(e){const n=e?Ntt(e):null;if(!n||!n["retry-after"])return null;const r=n["retry-after"];return isNaN(r)&&!isNaN(Date.parse(r))?{type:"date",value:Date.parse(r)}:isNaN(parseFloat(r.toString()))?(ka.ut(_r.qu,{e:"Received unexpected value for retry-after header in /sync response"+": "+r}),null):{type:"timestamp",value:1e3*parseFloat(r.toString())}}rt(e,n,r,i,s,a){if(Nn.ju(this.C,r)>=Stt)return;let o;a=a||0;const l=this.Pu(e);s();const u=c=>{const d=window.setTimeout(()=>{n()},c);i(d),Nn.Uu(this.C,r)};if(l&&!isNaN(l.value)){switch(l.type){case"date":o=l.value-new Date().getTime()+a,o<0&&n();break;case"timestamp":o=l.value+a}u(o)}else a?u(a):Nn.vi(this.C,r)}xu(e){var n;(n=this.C)===null||n===void 0||n.Bt(rt.gt.Hu,e)}Ou(e,n){let r=this.Gu();r==null&&(r={}),r[e]=n,this.C.Bt(rt.gt._u,r)}Wu(){var e;return(e=this.C)===null||e===void 0?void 0:e.ft(rt.gt.Hu)}Gu(){var e;return(e=this.C)===null||e===void 0?void 0:e.ft(rt.gt._u)}Yu(e,n,r,i,s=""){let a;if(s){const l=this.Gu();a=l==null||isNaN(l[s])?n:l[s]}else a=this.Wu(),(a==null||isNaN(a))&&(a=n);const o=(e-i)/1e3;return a=Math.min(a+o/r,n),a}Ju(e,n){return Math.max(0,(1-e)*n*1e3)}Qu(e,n=""){var r,i,s,a,o;const l={Lu:!0,Iu:-1,Eu:0};if(e==null&&(e=!0),!e&&!n)return l;let u,c,d=null;if(e)d=(r=this.C)===null||r===void 0?void 0:r.ft(rt.gt.Ku);else{const g=Nn.Vu(this.C);if(g==null||g[n]==null)return l;d=g[n]}if(d==null||isNaN(d)||(e?(u=((i=this.B)===null||i===void 0?void 0:i.Zu())||-1,c=((s=this.B)===null||s===void 0?void 0:s.tl())||-1):(u=((a=this.B)===null||a===void 0?void 0:a.el(n))||-1,c=((o=this.B)===null||o===void 0?void 0:o.il(n))||-1),u===-1||c===-1))return l;const f=new Date().valueOf();let h=this.Yu(f,u,c,d,n);return h<1?(l.Lu=!1,l.Eu=this.Ju(h,c),l):(h=Math.trunc(h)-1,l.Iu=h,e?this.xu(h):this.Ou(n,h),l)}Fu(){return this.Qu(!0)}$u(e){const n=this.Qu(!1,e);return!(n&&!n.Lu)}it(){this.Pa.it()}Z(){return this.La}addSdkMetadata(e){for(const n of e)this.fu.indexOf(n)===-1&&this.fu.push(n)}}const bx=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t);let vv=class{constructor(e=!1,n=[]){this.tt=e,this.$e=n,this.tt=e,this.$e=n}ns(e){this.tt=this.tt&&e.tt,this.$e.push(...e.$e)}};const sa={mn:()=>"serviceWorker"in navigator&&typeof ServiceWorkerRegistration<"u"&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,vn:()=>"safari"in window&&"pushNotification"in window.safari&&typeof window.safari.pushNotification.permission=="function"&&typeof window.safari.pushNotification.requestPermission=="function",isPushSupported:()=>sa.mn()||sa.vn(),isPushBlocked:()=>{const t=sa.isPushSupported()&&"Notification"in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission==="denied",e=sa.isPushSupported()&&(!("Notification"in window)||window.Notification==null);return t||e},isPushPermissionGranted:()=>sa.isPushSupported()&&"Notification"in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission==="granted",Tr:()=>
222!sa.isPushBlocked()&&sa.isPushSupported()&&!sa.isPushPermissionGranted()};class Ftt{constructor(e,n,r,i,s,a,o,l,u,c){this.an=e,this.baseUrl=n,this.T=r,this.hn=i,this.Cs=s,this.B=a,this.C=o,this.$l=l,this.Pa=u,this.S=c,this.an=e,this.baseUrl=n,this.Tl=0,this.dE=o.IE()||0,this.Ml=null,this.T=r,this.hn=i,this.Cs=s,this.B=a,this.C=o,this.Pa=u,this.S=c,this.$l=l,this.Pl=new eo,this.Ol=null,this.Ul=50,this._l=!1}Kl(e,n){return!e&&!n&&this.Pa.Kh()>=this.Ul}Xl(e){let n=this.T.zl();if(e.length>0){const r=this.Cs.getUserId();for(const i of e){const s=!i.userId&&!r||i.userId===r;i.type===_r.Fl&&s&&(n=!0)}}return n}Ql(e=!1,n=!1,r=!0,i,s,a,o=!1,l=!1){r&&this.Yl();const u=this.C.AE(),c=this.C.OE();let d=!1;const f=(S,A,w=-1)=>{const x=new Date().valueOf();Nn.W(this.C,Nn.O.Nu,x),w!==-1&&A.push(["X-Braze-Req-Tokens-Remaining",w.toString()]);let P=!1;yx.Y({url:this.baseUrl+"/data/",data:S,headers:A,tt:N=>{S.respond_with!=null&&S.respond_with.triggers&&(this.Tl=Math.max(this.Tl-1,0)),this.S.st(S,N,A)?(this.Pa.it(),this.B.gl(N),S.respond_with!=null&&S.respond_with.user_id!=this.Cs.getUserId()||(S.device!=null&&this.C.Bt(rt.gt.oc,S.device),S.sdk_metadata!=null&&(this.C.Bt(rt.gt.pu,S.sdk_metadata),this.C.Bt(rt.gt.Ru,this.T.St())),this.$l(N),Nn.Mu(this.C,Nn.O.Nu,1),typeof i=="function"&&i())):N.auth_error&&(P=!0)},error:()=>{P=!0,S.respond_with!=null&&S.respond_with.triggers&&(this.Tl=Math.max(this.Tl-1,0)),this.S.gu(S.events,S.attributes),typeof s=="function"&&s()},nt:(N,k)=>{typeof a=="function"&&a(!P);const U=this.S.Pu(k);let H=0;if(U)switch(U.type){case"date":H=Math.max(U.value-new Date().valueOf(),0);break;case"timestamp":H=U.value}if(r&&!d){if(P){Nn.Uu(this.C,Nn.O.Nu);let B=this.Ml;(B==null||B<1e3*this.dE)&&(B=1e3*this.dE);const q=Math.min(3e5,bx(1e3*this.dE,3*B))+H;this.Zl(q)}else this.Zl(Math.max(1e3*this.dE,H));d=!0}}})},h=this.Xl(u),g=n||h;if(this.Kl(o,h))return void we.info("Declining to flush data due to 50 consecutive authentication failures");if(r&&!this.S.yu(u,c,e,g))return this.Zl(),void(typeof a=="function"&&a(!0));const v=this.S.wu(e,g,u,c,l);g&&this.Tl++;let b=!1;if(v)for(const S of v)this.S.V(S.requestData,A=>f(S.requestData,S.headers,A),Nn.O.Nu,s),b=!0;this.Pa.jh()&&r&&!b?this.Zl():h&&(we.info("Invoking new session subscriptions"),this.Pl.X())}dc(){return this.Tl>0}Zl(e=1e3*this.dE){this._l||(this.Yl(),this.Ol=window.setTimeout(()=>{if(document.hidden){const n="visibilitychange",r=()=>{document.hidden||(document.removeEventListener(n,r,!1),this.Ql())};document.addEventListener(n,r,!1)}else this.Ql()},e),this.Ml=e)}Yl(){this.Ol!=null&&(clearTimeout(this.Ol),this.Ol=null)}initialize(){this._l=!1,this.Zl()}destroy(){this.Pl.removeAllSubscriptions(),this.Pa.Hh(),this.Yl(),this._l=!0,this.Ql(void 0,void 0,!1,void 0,void 0,void 0,void 0,!0),this.Ol=null}on(e){return this.Pl.Dt(e)}openSession(){const e=this.T.St()!==this.T.Qo();e&&(this.C.TE(rt.iu.Na),this.C.TE(rt.iu.su)),this.Ql(void 0,!1,void 0,()=>{this.C.Ut(rt.gt.Ge)}),this.Qn(),e&&Cr(()=>Promise.resolve().then(()=>Bnt),void 0).then(n=>{if(this._l)return;const r=n.default.ea();if(r!=null&&(sa.isPushPermissionGranted()||sa.isPushBlocked())){const i=()=>{r.wn()?we.info("Push token maintenance is disabled, not refreshing token for backend."):r.subscribe()},s=(l,u)=>{u&&i()},a=()=>{const l=this.C.ft(rt.gt.zn);(l==null||l)&&i()},o=Ss.Ls.Fs;new Ss(o,we).cr(o.Ms.cu,s,a)}})}mc(){this.C.Ut(rt.gt.Xe),this.C.Ut(rt.gt.Hs),this.C.Ut(rt.gt.Kr)}fc(){var e,n;this.C.Ut(rt.gt.Ku),this.C.Ut(rt.gt.lE);const r=Nn.O;for(const i in r){const s=r[i];this.S.Ou(s,(e=this.B)===null||e===void 0?void 0:e.el(s))}this.S.xu((n=this.B)===null||n===void 0?void 0:n.Zu())}changeUser(e,n,r){const i=this.Cs.getUserId();if(i!==e){this.T.Il(),this.mc(),i!=null&&this.Ql(void 0,!1,void 0,void 0,void 0),this.Cs.ou(e),r?this.Pa.setSdkAuthenticationSignature(r):this.Pa.Bh();for(let s=0;s<n.length;s++)n[s].changeUser(i==null);this.S.fo(),i!=null&&this.C.Ut(rt.gt.Zt),this.C.Ut(rt.gt.oc),this.C.Ut(rt.gt._E),this.fc(),this.openSession(),we.info('Changed user to "'+e+'".')}else{let s="Doing nothing.";r&&this.Pa.xh()!==r&&(this.Pa.setSdkAuthenticationSignature(r),s="Updated SDK authentication signature"),we.info(`Current user is already ${e}. ${s}`)}}requestImmediateDataFlush(e){this.Yl(),this.T.Qo(),this.Ql(void 0,void 0,void 0,void 0,()=>{we.error("Failed to flush data, request will be retried automatically.")},e,!0)}requestFeedRefresh(){this.T.Qo(),this.Ql(!0)}br(e,n){this.T.Qo(),we.info("Requesting explicit trigger refresh."),this.Ql(void 0,!0,void 0,e,n)}Cn(e,n){const r=_r.vc,i={a:e,l:n},s=ka.ut(r,i);return s&&(we.info(`Logged alias ${e} with label ${n}`),this.C.Bt(rt.gt._E,i)),s}Ln(e,n,r){if(this.B.hu(n))return we.info(`Custom Attribute "${n}" is blocklisted, ignoring.`),new vv;const i={key:n,value:r},s=ka.ut(e,i);if(s){const a=typeof r=="object"?JSON.stringify(r,null,2):r;we.info(`Logged custom attribute: ${n} with value: ${a}`)}return s}setLastKnownLocation(e,n,r,i,s,a){const o={latitude:n,longitude:r};i!=null&&(o.altitude=i),s!=null&&(o.ll_accuracy=s),a!=null&&(o.alt_accuracy=a);const l=ka.ut(_r.bc,o,e||void 0);return l&&we.info(`Set user last known location as ${JSON.stringify(o,null,2)}`),l}lr(e,n){const r=this.T.Qo();return new qh(this.Cs.getUserId(),_r.wc,e,r,{cid:n})}kc(e,n){return new Ss(e,n)}Qn(){const e=Ss.Ls.Fs;this.kc(e,we).setItem(e.Ms.Nu,1,{baseUrl:this.baseUrl,data:{api_key:this.an,device_id:this.hn.ve().id},userId:this.Cs.getUserId(),sdkAuthEnabled:this.Pa.jh()})}vr(e){for(const n of e)if(n.api_key===this.an)this.S.gu(n.events,n.attributes);else{const r=Ss.Ls.Fs;new Ss(r,we).setItem(r.Ms.kr,Pg.ce(),n)}}Kn(e,n,r){if(this.B.hu(e))return we.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new vv;let i,s;return n===null&&r===null?(i=_r.yc,s={key:e}):(i=_r.Sc,s={key:e,latitude:n,longitude:r}),ka.ut(i,s)}Mn(e,n){const r={group_id:e,status:n};return ka.ut(_r.jc,r)}}class zw{constructor(e=0,n=[],r=[],i=[],s=null,a=null,o={enabled:!1},l={enabled:!1,refresh_rate_limit:void 0},u={enabled:!0,capacity:vtt,refill_rate:ytt,endpoint_overrides:{}},c=null){this.dl=e,this.Rl=n,this.Cl=r,this.El=i,this.yl=s,this.fl=a,this.vl=o,this.De=l,this.bl=u,this.banners=c,this.dl=e,this.Rl=n,this.Cl=r,this.El=i,this.yl=s,this.fl=a,this.vl=o,this.De=l,this.bl=u,this.banners=c}bt(){return{s:"5.9.1",l:this.dl,e:this.Rl,a:this.Cl,p:this.El,m:this.yl,v:this.fl,c:this.vl,f:this.De,grl:this.bl,b:this.banners}}static Rn(e){let n=e.l;return e.s!=="5.9.1"&&(n=0),new zw(n,e.e,e.a,e.p,e.m,e.v,e.c,e.f,e.grl,e.b)}}class $tt{constructor(e){this.C=e,this.C=e,this.sl=new eo,this.rl=ne
222w eo,this.ul=new eo,this.al=new eo,this.hl=null,this.ol=null}cl(){if(this.ol==null){const e=this.C.ft(rt.gt.ml);this.ol=e!=null?zw.Rn(e):new zw}return this.ol}Et(){return this.cl().dl}gl(e){var n,r;if(e!=null&&e.config!=null){const i=e.config;if(i.time>this.cl().dl){const s=d=>d??this.cl().bl,a=new zw(i.time,i.events_blacklist,i.attributes_blacklist,i.purchases_blacklist,i.messaging_session_timeout,i.vapid_public_key,i.content_cards,i.feature_flags,s(i.global_request_rate_limit),i.banners);let o=!1;a.fl!=null&&this.In()!==a.fl&&(o=!0);let l=!1;a.vl.enabled!=null&&this.yi()!==a.vl.enabled&&(l=!0);let u=!1;a.De.enabled!=null&&this.ke()!==a.De.enabled&&(u=!0);let c=!1;((n=a.banners)===null||n===void 0?void 0:n.enabled)!=null&&this.zt()!==((r=a.banners)===null||r===void 0?void 0:r.enabled)&&(c=!0),this.ol=a,this.C.Bt(rt.gt.ml,a.bt()),o&&this.sl.X(),l&&this.rl.X(),u&&this.ul.X(),c&&this.al.X()}}}Vn(e){const n=this.sl.Dt(e);return this.hl&&this.sl.removeSubscription(this.hl),this.hl=n,n}gi(e){return this.rl.Dt(e)}Ke(e){return this.ul.Dt(e)}A(e){return this.al.Dt(e)}je(e){return this.cl().Rl.indexOf(e)!==-1}hu(e){return this.cl().Cl.indexOf(e)!==-1}Dr(e){return this.cl().El.indexOf(e)!==-1}wl(){return this.cl().yl}In(){return this.cl().fl}yi(){return this.cl().vl.enabled||!1}Ll(){const e=this.cl().bl;return!(!e||e.enabled==null)&&e.enabled}Zu(){if(!this.Ll())return-1;const e=this.cl().bl;return e.capacity==null||e.capacity<10?-1:e.capacity}tl(){if(!this.Ll())return-1;const e=this.cl().bl;return e.refill_rate==null||e.refill_rate<=0?-1:e.refill_rate}Bl(e){const n=this.cl().bl.endpoint_overrides;return n==null?null:n[e]}el(e){const n=this.Bl(e);return n==null||isNaN(n.capacity)||n.capacity<=0?-1:n.capacity}il(e){const n=this.Bl(e);return n==null||isNaN(n.refill_rate)||n.refill_rate<=0?-1:n.refill_rate}ke(){return this.cl().De.enabled&&this.Oe()==null?(ka.ut(_r.qu,{e:"Missing feature flag refresh_rate_limit."}),!1):this.cl().De.enabled||!1}Oe(){return this.cl().De.refresh_rate_limit}zt(){var e;return((e=this.cl().banners)===null||e===void 0?void 0:e.enabled)||null}ne(){var e;return((e=this.cl().banners)===null||e===void 0?void 0:e.max_placements)||0}}class Btt{constructor(e,n,r,i){this.C=e,this.Cs=n,this.B=r,this.Sl=i,this.C=e,this.Cs=n,this.B=r,this.jl=1e3,(i==null||isNaN(i))&&(i=1800),i<this.jl/1e3&&(we.info("Specified session timeout of "+i+"s is too small, using the minimum session timeout of "+this.jl/1e3+"s instead."),i=this.jl/1e3),this.Sl=i}xl(e,n){return new qh(this.Cs.getUserId(),_r.Dl,e,n.eu,{d:mx(e-n.Gl)})}St(){const e=this.C.tu(rt.iu.Nl);return e==null?null:e.eu}zl(){const e=new Date().valueOf(),n=this.B.wl();if(n==null)return!1;const r=this.C.ft(rt.gt.Hl),i=r==null||e-r>1e3*n;return i&&this.C.Bt(rt.gt.Hl,e),i}Wl(e,n){return n==null||n.kl==null||!(e-n.Gl<this.jl)&&n.kl<e}Qo(){const e=new Date().valueOf(),n=e+1e3*this.Sl,r=this.C.tu(rt.iu.Nl);if(this.Wl(e,r)){let i="Generating session start event with time "+e;if(r!=null){let a=r.ql;a-r.Gl<this.jl&&(a=r.Gl+this.jl),this.C.Al(this.xl(a,r)),i+=" (old session ended "+a+")"}i+=". Will expire "+n.valueOf(),we.info(i);const s=new Pf(Pg.ce(),n);return this.C.Al(new qh(this.Cs.getUserId(),_r.Fl,e,s.eu)),this.C.uu(rt.iu.Nl,s),this.C.ft(rt.gt.Hl)==null&&this.C.Bt(rt.gt.Hl,e),s.eu}if(r!=null)return r.ql=e,r.kl=n,this.C.uu(rt.iu.Nl,r),r.eu}Il(){const e=this.C.tu(rt.iu.Nl);e!=null&&(this.C.Jl(rt.iu.Nl),this.C.Al(this.xl(new Date().valueOf(),e)))}}const Mde={Ya:function(t,e=!1){let n=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(rt.gt.ac,"true"),localStorage.getItem(rt.gt.ac)&&(localStorage.removeItem(rt.gt.ac),n=!0)}catch(a){if(!(a instanceof Error&&(a.name==="QuotaExceededError"||a.name==="NS_ERROR_DOM_QUOTA_REACHED")&&localStorage.length>0))throw a;n=!0}}catch{we.info("Local Storage not supported!")}const r=Mde.cc(),i=new Cl.lc(t,r&&!e,n);let s;return s=n?new Cl.gc(t):new Cl.uc,new Cl(i,s)},cc:function(){return navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)}};class Ff{constructor(e,n){this.triggerId=e,this.messageExtras=n,this.triggerId=e,this.messageExtras=n,this.extras={}
222,this.isControl=!0,this.Ht=!1}static fromJson(e){return new Ff(e.trigger_id,e.message_extras)}_t(){return!this.Ht&&(this.Ht=!0,!0)}Bo(){return this.Ht}}function Utt(t,e=!1,n=!1,r=!1){if(t==null)return!1;e=e||!1,n=n||!1;const i=t.getBoundingClientRect();return i!=null&&(i.top>=0&&i.top<=(window.innerHeight||document.documentElement.clientHeight)||!e)&&(i.left>=0||!r)&&(i.bottom>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!n)&&(i.right<=(window.innerWidth||document.documentElement.clientWidth)||!r)}const i0={Ic:null,Ho:Utt},$h={qo:"up",yo:"down",ie:"left",de:"right"};function Fde(){if(i0.Ic==null){i0.Ic=!1;try{const t=Object.defineProperty({},"passive",{get:()=>{i0.Ic=!0}});window.addEventListener("testPassive",()=>{},t),window.removeEventListener("testPassive",()=>{},t)}catch(t){we.error(Of(t))}}return i0.Ic}function L1(t,e,n=()=>{}){t.addEventListener(e,n,!!Fde()&&{passive:!0})}function $de(t){return i0.Ho(t,!0,!1,!1)}function Bde(t){return i0.Ho(t,!1,!0,!1)}function $Z(t){if(t.onclick){const e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0),t.onclick.apply(t,[e])}}function Gw(t,e,n){let r=null,i=null;L1(t,"touchstart",s=>{r=s.touches[0].clientX,i=s.touches[0].clientY}),L1(t,"touchmove",s=>{if(r==null||i==null)return;const a=r-s.touches[0].clientX,o=i-s.touches[0].clientY;Math.abs(a)>Math.abs(o)&&Math.abs(a)>=25?((a>0&&e===$h.ie||a<0&&e===$h.de)&&n(s),r=null,i=null):Math.abs(o)>=25&&((o>0&&e===$h.qo&&t.scrollTop===t.scrollHeight-t.offsetHeight||o<0&&e===$h.yo&&t.scrollTop===0)&&n(s),r=null,i=null)})}function Ude(t,e,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg");i.setAttribute("viewBox",t),i.setAttribute("xmlns",r);const s=document.createElementNS(r,"path");return s.setAttribute("d",e),n!=null&&s.setAttribute("fill",n),i.appendChild(s),i}const cg={Wo:32,Ao:9,Xo:13,_h:27},Vde=t=>t!==null&&t.tagName==="IFRAME";class Re{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H,B,q,Z,C,L){this.message=e,this.messageAlignment=n,this.slideFrom=r,this.extras=i,this.triggerId=s,this.clickAction=a,this.uri=o,this.openTarget=l,this.dismissType=u,this.duration=c,this.icon=d,this.imageUrl=f,this.imageStyle=h,this.iconColor=g,this.iconBackgroundColor=v,this.backgroundColor=b,this.textColor=S,this.closeButtonColor=A,this.animateIn=w,this.animateOut=x,this.header=P,this.headerAlignment=N,this.headerTextColor=k,this.frameColor=U,this.buttons=H,this.cropType=B,this.orientation=q,this.htmlId=Z,this.css=C,this.messageExtras=L,this.message=e,this.messageAlignment=n||Re.TextAlignment.CENTER,this.duration=c||5e3,this.slideFrom=r||Re.SlideFrom.BOTTOM,this.extras=i||{},this.triggerId=s,this.clickAction=a||Re.ClickAction.NONE,this.uri=o,this.openTarget=l||Re.OpenTarget.NONE,this.dismissType=u||Re.DismissType.AUTO_DISMISS,this.icon=d,this.imageUrl=f,this.imageStyle=h||Re.ImageStyle.TOP,this.iconColor=g||Re.th.ih,this.iconBackgroundColor=v||Re.th.sh,this.backgroundColor=b||Re.th.ih,this.textColor=S||Re.th.hh,this.closeButtonColor=A||Re.th.eh,this.animateIn=w,this.animateIn==null&&(this.animateIn=!0),this.animateOut=x,this.animateOut==null&&(this.animateOut=!0),this.header=P,this.headerAlignment=N||Re.TextAlignment.CENTER,this.headerTextColor=k||Re.th.hh,this.frameColor=U||Re.th.Eh,this.buttons=H||[],this.cropType=B||Re.CropType.FIT_CENTER,this.orientation=q,this.htmlId=Z,this.css=C,this.isControl=!1,this.messageExtras=L,this.nh=!1,this.Ht=!1,this.So=!1,this.Th=!1,this.jo=null,this.wo=null,this.ti=new eo,this.oh=new eo,this.$o=Re.TextAlignment.CENTER}subscribeToClickedEvent(e){return this.ti.Dt(e)}subscribeToDismissedEvent(e){return this.oh.Dt(e)}removeSubscription(e){this.ti.removeSubscription(e),this.oh.removeSubscription(e)}removeAllSubscriptions(){this.ti.removeAllSubscriptions(),this.oh.removeAllSubscriptions()}closeMessage(){this.ll(this.jo)}vo(){return!0}Po(){return this.vo()}ho(){return this.htmlId!=null&&this.htmlId.length>4}lo(){return this.ho()&&this.css!=null&&this.css.length>0}do(){if(this.ho()&&this.lo())return this.htmlId+"-css"}_t(){return!this.Ht&&(this.Ht=!0,!0)}Bo(){return this.Ht}$t(e){return!this.So&&(this.So=!0,this.ti.X(),!0)}Qt(){return!this.Th&&(this.Th=!0,this.oh.X(),!0)}hide(e){if(e&&e.parentNode){let n=e.closest(".ab-iam-root");
222if(n==null&&(n=e),this.vo()&&n.parentNode!=null){const r=n.parentNode.classList;r&&r.contains(Re.rh)&&r.remove(Re.rh),document.body.removeEventListener("touchmove",Re.lh)}n.className=n.className.replace(Re.uh,Re.ah)}return this.animateOut||!1}ll(e,n){if(e==null)return;let r;this.jo=null,r=e.className.indexOf("ab-in-app-message")===-1?e.getElementsByClassName("ab-in-app-message")[0]:e;let i=!1;r&&(i=this.hide(r));const s=document.body;let a;s!=null&&(a=s.scrollTop);const o=()=>{if(e&&e.parentNode){let u=e.closest(".ab-iam-root");u==null&&(u=e),u.parentNode&&u.parentNode.removeChild(u)}const l=this.do();if(l!=null){const u=document.getElementById(l);u&&u.parentNode&&u.parentNode.removeChild(u)}s!=null&&Du.browser==="Safari"&&(s.scrollTop=a),n?n():this.Qt()};i?setTimeout(o,Re.Ih):o(),this.wo&&this.wo.focus()}zo(){return document.createTextNode(this.message||"")}ko(e){let n="";this.message||this.header||!this.vo()||(n="Modal Image"),e.setAttribute("alt",n)}static lh(e){if(e.targetTouches&&e.targetTouches.length>1)return;const n=e.target;n&&n.classList&&n.classList.contains("ab-message-text")&&n.scrollHeight>n.clientHeight||document.querySelector(`.${Re.rh}`)&&e.cancelable&&e.preventDefault()}Ah(e){const n=e.parentNode;this.vo()&&n!=null&&this.orientation!==Re.Orientation.LANDSCAPE&&(n.classList!=null&&n.classList.add(Re.rh),document.body.addEventListener("touchmove",Re.lh,!!Fde()&&{passive:!1})),e.className+=" "+Re.uh}static Oh(e){if(e.keyCode===cg._h&&!je.ee(ur.mh)&&document.querySelectorAll(".ab-modal-interactions").length>0){const n=document.getElementsByClassName("ab-html-message");let r=!1;for(const i of n){let s=null;Vde(i)&&i.contentWindow&&(s=i.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),s!=null&&($Z(s),r=!0)}if(!r){const i=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];i!=null&&$Z(i)}}}Lh(){this.nh||je.ee(ur.mh)||(document.addEventListener("keydown",Re.Oh,!1),je.Nh(()=>{document.removeEventListener("keydown",Re.Oh)}),this.nh=!0)}bt(e){const n={};return e&&(n[Re.es.ra]=this.message,n[Re.es.sa]=this.messageAlignment,n[Re.es.Sh]=this.slideFrom,n[Re.es.qs]=this.extras,n[Re.es.ta]=this.triggerId,n[Re.es.ia]=this.clickAction,n[Re.es.URI]=this.uri,n[Re.es.oa]=this.openTarget,n[Re.es.pa]=this.dismissType,n[Re.es.ma]=this.duration,n[Re.es.na]=this.icon,n[Re.es.ls]=this.imageUrl,n[Re.es.ua]=this.imageStyle,n[Re.es.ca]=this.iconColor,n[Re.es.fa]=this.iconBackgroundColor,n[Re.es.da]=this.backgroundColor,n[Re.es.la]=this.textColor,n[Re.es.ga]=this.closeButtonColor,n[Re.es.ja]=this.animateIn,n[Re.es.xa]=this.animateOut,n[Re.es.za]=this.header,n[Re.es.ha]=this.headerAlignment,n[Re.es.va]=this.headerTextColor,n[Re.es.wa]=this.frameColor,n[Re.es.ya]=this.buttons,n[Re.es.Sa]=this.cropType,n[Re.es.ba]=this.orientation,n[Re.es.ka]=this.htmlId,n[Re.es.CSS]=this.css,n[Re.es.hs]=e,n[Re.es.qa]=this.messageExtras),n}}Re.th={hh:4281545523,ih:4294967295,sh:4278219733,Rh:4293914607,Mh:4283782485,Eh:3224580915,eh:4288387995},Re.Co={Dh:"hd",xo:"ias",Ch:"of",dh:"do",Uh:"umt",bh:"tf",Ph:"te"},Re.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},Re.ClickAction={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:"NONE"},Re.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},Re.OpenTarget={NONE:"NONE",BLANK:"BLANK"},Re.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},Re.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},Re.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},Re.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},Re.bo={Wr:"SLIDEUP",Vr:"MODAL",Fo:"MODAL_STYLED",Lr:"FULL",Ur:"WEB_HTML",po:"HTML",Jo:"HTML_FULL"},Re.Ih=500,Re.ph=200,Re.uh="ab-show",Re.ah="ab-hide",Re.rh="ab-pause-scrolling",Re.es={ra:"m",sa:"ma",Sh:"sf",qs:"e",ta:"ti",ia:"ca",URI:"u",oa:"oa",pa:"dt",ma:"d",na:"i",ls:"iu",ua:"is",ca:"ic",fa:"ibc",da:"bc",la:"tc",ga:"cbc",ja:"ai",xa:"ao",za:"h",ha:"ha",va:"htc",wa:"fc",ya:"b",Sa:"ct",ba:"o",ka:"hi",CSS:"css",hs:"type",Eo:"messageFields",qa:"me"};class Nc extends Re{constructor(e,n,r,i,s,a,o,l,u,c,d,f){super(e,void 0,void 0,n,r,void 0,void 0,void 0,i=i||Re.DismissType.MANUAL,s,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,a,o,void 0,void 0,void 0,l,void 0,void 0,void 0,u,c,f),this.messageFields=d,this.messageFields=d}Po(){return!1}$t(e){if(this.uo===Re.bo.Ur){if(this.So)return!1;this.So=!0}
222return this.ti.X(e),!0}bt(){const e=super.bt(Nc.cs);return e[Re.es.Eo]=this.messageFields,e}static Qr(e){return new Nc(e[Re.es.ra],e[Re.es.qs],e[Re.es.ta],e[Re.es.pa],e[Re.es.ma],e[Re.es.ja],e[Re.es.xa],e[Re.es.wa],e[Re.es.ka],e[Re.es.CSS],e[Re.es.Eo],e[Re.es.qa])}}Nc.cs=Re.bo.Ur;class Rg{constructor(e,n,r,i,s,a,o){this.text=e,this.backgroundColor=n,this.textColor=r,this.borderColor=i,this.clickAction=s,this.uri=a,this.id=o,this.text=e||"",this.backgroundColor=n||Re.th.sh,this.textColor=r||Re.th.ih,this.borderColor=i||this.backgroundColor,this.clickAction=s||Re.ClickAction.NONE,this.uri=a,o==null&&(o=Rg.Yi),this.id=o,this.So=!1,this.ti=new eo}subscribeToClickedEvent(e){return this.ti.Dt(e)}removeSubscription(e){this.ti.removeSubscription(e)}removeAllSubscriptions(){this.ti.removeAllSubscriptions()}$t(){return!this.So&&(this.So=!0,this.ti.X(),!0)}static fromJson(e){return new Rg(e.text,e.bg_color,e.text_color,e.border_color,e.click_action,e.uri,e.id)}}Rg.Yi=-1;class Vf extends Re{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H,B,q,Z,C){l=l||Re.DismissType.MANUAL,B=B||Re.Orientation.PORTRAIT,super(e,n,void 0,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H=H||Re.CropType.CENTER_CROP,B,q,Z,C),this.$o=Re.TextAlignment.CENTER}bt(){return super.bt(Vf.cs)}static Qr(e){return new Vf(e[Re.es.ra],e[Re.es.sa],e[Re.es.qs],e[Re.es.ta],e[Re.es.ia],e[Re.es.URI],e[Re.es.oa],e[Re.es.pa],e[Re.es.ma],e[Re.es.na],e[Re.es.ls],e[Re.es.ua],e[Re.es.ca],e[Re.es.fa],e[Re.es.da],e[Re.es.la],e[Re.es.ga],e[Re.es.ja],e[Re.es.xa],e[Re.es.za],e[Re.es.ha],e[Re.es.va],e[Re.es.wa],jde(e[Re.es.ya]),e[Re.es.Sa],e[Re.es.ba],e[Re.es.ka],e[Re.es.CSS],e[Re.es.qa])}}Vf.cs=Re.bo.Lr;class ep extends Re{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H,B,q,Z){super(e,n,void 0,r,i,s,a,o,l=l||Re.DismissType.MANUAL,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H=H||Re.CropType.FIT_CENTER,void 0,B,q,Z),this.$o=Re.TextAlignment.CENTER}bt(){return super.bt(ep.cs)}static Qr(e){return new ep(e[Re.es.ra],e[Re.es.sa],e[Re.es.qs],e[Re.es.ta],e[Re.es.ia],e[Re.es.URI],e[Re.es.oa],e[Re.es.pa],e[Re.es.ma],e[Re.es.na],e[Re.es.ls],e[Re.es.ua],e[Re.es.ca],e[Re.es.fa],e[Re.es.da],e[Re.es.la],e[Re.es.ga],e[Re.es.ja],e[Re.es.xa],e[Re.es.za],e[Re.es.ha],e[Re.es.va],e[Re.es.wa],jde(e[Re.es.ya]),e[Re.es.Sa],e[Re.es.ka],e[Re.es.CSS],e[Re.es.qa])}}ep.cs=Re.bo.Vr;class Hf extends Re{constructor(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N){b=b||Re.th.Mh,v=v||Re.th.Rh,super(e,n=n||Re.TextAlignment.START,r,i,s,a,o,l,u,c,d,f,void 0,h,g,v,b,S,A,w,void 0,void 0,void 0,void 0,void 0,void 0,void 0,x,P,N),this.$o=Re.TextAlignment.START}vo(){return!1}zo(){const e=document.createElement("span");return e.appendChild(document.createTextNode(this.message||"")),e}Ah(e){const n=e.getElementsByClassName("ab-in-app-message")[0];i0.Ho(n,!0,!0)||(this.slideFrom===Re.SlideFrom.TOP?n.style.top="0px":n.style.bottom="0px"),super.Ah(e)}bt(){return super.bt(Hf.cs)}static Qr(e){return new Hf(e[Re.es.ra],e[Re.es.sa],e[Re.es.Sh],e[Re.es.qs],e[Re.es.ta],e[Re.es.ia],e[Re.es.URI],e[Re.es.oa],e[Re.es.pa],e[Re.es.ma],e[Re.es.na],e[Re.es.ls],e[Re.es.ca],e[Re.es.fa],e[Re.es.da],e[Re.es.la],e[Re.es.ga],e[Re.es.ja],e[Re.es.xa],e[Re.es.ka],e[Re.es.CSS],e[Re.es.qa])}}Hf.cs=Re.bo.Wr;function Hde(t){if(!t)return null;if(t.is_control)return Ff.fromJson(t);let e=t.type;e!=null&&(e=e.toUpperCase());const n=t.message,r=t.text_align_message,i=t.slide_from,s=t.extras,a=t.trigger_id,o=t.click_action,l=t.uri,u=t.open_target,c=t.message_close,d=t.duration,f=t.icon,h=t.image_url,g=t.image_style,v=t.icon_color,b=t.icon_bg_color,S=t.bg_color,A=t.text_color,w=t.close_btn_color,x=t.header,P=t.text_align_header,N=t.header_text_color,k=t.frame_color,U=[];let H=t.btns;H==null&&(H=[]);for(let G=0;G<H.length;G++)U.push(Rg.fromJson(H[G]));const B=t.crop_type,q=t.orientation,Z=t.animate_in,C=t.animate_out;let L=t.html_id,V=t.css;L!=null&&L!==""&&V!=null&&V!==""||(L=void 0,V=void 0);const j=t.message_extras;let X;if(e===ep.cs||e===Re.bo.Fo)X=new ep(n,r,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,Z,C,x,P,N,k,U,B,L,V,j);else if(e===Vf.cs)X=new Vf(n,r,s,a,o,l,u,c,d,f,h,g,v,b,S,A,w,Z,C,x,P,N,k,U,B,q,L,V,j);else if(e===Hf.cs)X=new Hf(n,r,i,s,a,o,l,u,c,d,f,h,v,b,S,A,w,Z,C,L,V,j);else{if(e!==Nc.cs&&e!==Re.bo.po&&e!==Re.bo.Jo)return void we.error("Ignoring message with unknown type "+e);{const G=t.message_fields;X=new Nc(n,s,a,c,d,Z,C,k,L,V,G,j),X.trusted=t.trusted||!1}}return X.uo=e,X}
222function jde(t){const e=[];for(const n of t)e.push(new Rg(n.text,n.backgroundColor,n.textColor,n.borderColor,n.clickAction,n.uri,n.id));return e}class GL{constructor(e){this.xc=e,this.xc=e}zc(e){return this.xc==null||this.xc===e[0]}static fromJson(e){return new GL(e?e.event_name:null)}bt(){return this.xc}}class gs{constructor(e,n,r,i){this.yE=e,this.HE=n,this.comparator=r,this.LE=i,this.yE=e,this.HE=n,this.comparator=r,this.LE=i,this.HE===gs.QE.UE&&this.comparator!==gs.wE.XE&&this.comparator!==gs.wE.BE&&this.comparator!==gs.wE.jE&&this.comparator!==gs.wE.zE&&(this.LE=Mf(this.LE))}zc(e){let n=null;switch(e!=null&&(n=e[this.yE]),this.comparator){case gs.wE.FE:return n!=null&&n.valueOf()===this.LE.valueOf();case gs.wE.kE:return n==null||n.valueOf()!==this.LE.valueOf();case gs.wE.xE:return n!=null&&typeof n==typeof this.LE&&n>this.LE;case gs.wE.XE:return this.HE===gs.QE.UE?n!=null&&Cf(n)&&NZ(n)<=this.LE.valueOf():n!=null&&typeof n==typeof this.LE&&n>=this.LE;case gs.wE.JE:return n!=null&&typeof n==typeof this.LE&&n<this.LE;case gs.wE.BE:return this.HE===gs.QE.UE?n!=null&&Cf(n)&&NZ(n)>=this.LE.valueOf():n!=null&&typeof n==typeof this.LE&&n<=this.LE;case gs.wE.VE:return n!=null&&typeof n=="string"&&typeof n==typeof this.LE&&n.match(this.LE)!=null;case gs.wE.qE:return n!=null;case gs.wE.PE:return n==null;case gs.wE.jE:return n!=null&&Cf(n)&&MZ(n)<this.LE;case gs.wE.zE:return n!=null&&Cf(n)&&MZ(n)>this.LE;case gs.wE.WE:return n==null||typeof n!=typeof this.LE||typeof n!="string"||n.match(this.LE)==null}return!1}static fromJson(e){return new gs(e.property_key,e.property_type,e.comparator,e.property_value)}bt(){let e=this.LE;return Cf(this.LE)&&(e=mx(e.valueOf())),{k:this.yE,t:this.HE,c:this.comparator,v:e}}static Rn(e){return new gs(e.k,e.t,e.c,e.v)}}gs.QE={ZE:"boolean",$E:"number",tT:"string",UE:"date"},gs.wE={FE:1,kE:2,xE:3,XE:4,JE:5,BE:6,VE:10,qE:11,PE:12,jE:15,zE:16,WE:17};class Q0{constructor(e){this.filters=e,this.filters=e}zc(e){let n=!0;for(let r=0;r<this.filters.length;r++){const i=this.filters[r];let s=!1;for(let a=0;a<i.length;a++)if(i[a].zc(e)){s=!0;break}if(!s){n=!1;break}}return n}static fromJson(e){if(e==null||!to(e))return null;const n=[];for(let r=0;r<e.length;r++){const i=[],s=e[r];for(let a=0;a<s.length;a++)i.push(gs.fromJson(s[a]));n.push(i)}return new Q0(n)}bt(){const e=[];for(let n=0;n<this.filters.length;n++){const r=this.filters[n],i=[];for(let s=0;s<r.length;s++)i.push(r[s].bt());e.push(i)}return e}static Rn(e){const n=[];for(let r=0;r<e.length;r++){const i=[],s=e[r];for(let a=0;a<s.length;a++)i.push(gs.Rn(s[a]));n.push(i)}return new Q0(n)}}class WL{constructor(e,n){this.xc=e,this.tf=n,this.xc=e,this.tf=n}zc(e){if(this.xc==null||this.tf==null)return!1;const n=e[0],r=e[1];return n===this.xc&&this.tf.zc(r)}static fromJson(e){return new WL(e?e.event_name:null,e?Q0.fromJson(e.property_filters):null)}bt(){return{e:this.xc,pf:this.tf?this.tf.bt():null}}}class qL{constructor(e,n){this.if=e,this.rf=n,this.if=e,this.rf=n}zc(e){if(this.if==null)return!1;const n=pr.sf(e[0],this.if);if(!n)return!1;let r=this.rf==null||this.rf.length===0;if(this.rf!=null){for(let i=0;i<this.rf.length;i++)if(this.rf[i]===e[1]){r=!0;break}}return n&&r}static fromJson(e){return new qL(e?e.id:null,e?e.buttons:null)}bt(){return this.if}}class KL{constructor(e){this.productId=e,this.productId=e}zc(e){return this.productId==null||e[0]===this.productId}static fromJson(e){return new KL(e?e.product_id:null)}bt(){return this.productId}}class YL{constructor(e,n){this.productId=e,this.tf=n,this.productId=e,this.tf=n}zc(e){if(this.productId==null||this.tf==null)return!1;const n=e[0],r=e[1];return n===this.productId&&this.tf.zc(r)}static fromJson(e){return new YL(e?e.product_id:null,e?Q0.fromJson(e.property_filters):null)}bt(){return{id:this.productId,pf:this.tf?this.tf.bt():null}}}class ZL{constructor(e){this.if=e,this.if=e}zc(e){return this.if==null||pr.sf(e[0],this.if)}static fromJson(e){return new ZL(e?e.campaign_id:null)}bt(){return this.if}}const co={OPEN:"open",Rr:"purchase",hr:"push_click",Ee:"custom_event",Zr:"iam_click",As:"test"};class pr{constructor(e,n){this.type=e,this.data=n,this.type=e,this.data=n}_c(e,n){return pr.Ec[this.type]===e&&(this.data==null||this.data.zc(n))}static sf(e,n){let r=null;try{r=window.atob(e)}catch(i){return we.info("Failed to unencode analytics id "+e+": "+Of(i)),!1}return n===r.split("_")[0]}static fromJson(e){const n=e.type;let r=null;switch(n){case pr.Or.OPEN:case pr.Or.As:break;case pr.Or.Rr:r=KL.fromJson(e.data);break;case pr.Or.Cc:r=YL.fromJson(e.data);break;case pr.Or.hr:r=ZL.fromJson(e.data);break;case pr.Or.Ee:r=GL.fromJson(e.data);break;case pr.Or.Pc:r=WL.fromJson(e.data);break;case pr.Or.Zr:r=qL.fromJson(e.data)}return new pr(n,r)}
222bt(){return{t:this.type,d:this.data?this.data.bt():null}}static Rn(e){let n,r=null;switch(e.t){case pr.Or.OPEN:case pr.Or.As:break;case pr.Or.Rr:r=new KL(e.d);break;case pr.Or.Cc:n=e.d||{},r=new YL(n.id,Q0.Rn(n.pf||[]));break;case pr.Or.hr:r=new ZL(e.d);break;case pr.Or.Ee:r=new GL(e.d);break;case pr.Or.Pc:n=e.d||{},r=new WL(n.e,Q0.Rn(n.pf||[]));break;case pr.Or.Zr:r=new qL(e.d)}return new pr(e.t,r)}}pr.Or={OPEN:"open",Rr:"purchase",Cc:"purchase_property",hr:"push_click",Ee:"custom_event",Pc:"custom_event_property",Zr:"iam_click",As:"test"},pr.Ec={},pr.Ec[pr.Or.OPEN]=co.OPEN,pr.Ec[pr.Or.Rr]=co.Rr,pr.Ec[pr.Or.Cc]=co.Rr,pr.Ec[pr.Or.hr]=co.hr,pr.Ec[pr.Or.Ee]=co.Ee,pr.Ec[pr.Or.Pc]=co.Ee,pr.Ec[pr.Or.Zr]=co.Zr,pr.Ec[pr.Or.As]=co.As;class Nu{constructor(e,n=[],r,i,s=0,a,o,l=0,u=Nu.td,c,d,f){this.id=e,this.sd=n,this.startTime=r,this.endTime=i,this.priority=s,this.type=a,this.data=o,this.ed=l,this.rd=u,this.Jr=c,this.hd=d,this.od=f,this.id=e,this.sd=n||[],r===void 0&&(r=null),this.startTime=r,i===void 0&&(i=null),this.endTime=i,this.priority=s||0,this.type=a,this.ed=l||0,c==null&&(c=1e3*(this.ed+30)),this.Jr=c,this.data=o,u!=null&&(this.rd=u),this.hd=d,this.od=f||null}nd(e){return this.od==null||this.rd!==Nu.td&&e-this.od>=1e3*this.rd}ad(e){this.od=e}ud(e){const n=e+1e3*this.ed;return Math.max(n-new Date().valueOf(),0)}dd(e){const n=new Date().valueOf()-e,r=e==null||isNaN(n)||this.Jr==null||n<this.Jr;return r||we.info(`Trigger action ${this.type} is no longer eligible for display - fired ${n}ms ago and has a timeout of ${this.Jr}ms.`),!r}static fromJson(e){const n=e.id,r=[];for(let h=0;h<e.trigger_condition.length;h++)r.push(pr.fromJson(e.trigger_condition[h]));const i=Mf(e.start_time),s=Mf(e.end_time),a=e.priority,o=e.type,l=e.delay,u=e.re_eligibility,c=e.timeout,d=e.data,f=e.min_seconds_since_last_trigger;return Wh(Nu.Or,o,"Could not construct Trigger from server data","Trigger.Types")?new Nu(n,r,i,s,a,o,d,l,u,c,f):null}bt(){const e=[];for(let n=0;n<this.sd.length;n++)e.push(this.sd[n].bt());return{i:this.id,c:e,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.ed,r:this.rd,tm:this.Jr,ss:this.hd,ld:this.od}}static Rn(e){const n=[],r=e.c||[];for(let i=0;i<r.length;i++)n.push(pr.Rn(r[i]));return new Nu(e.i,n,w0(e.s),w0(e.e),e.p,e.t,e.da,e.d,e.r,e.tm,e.ss,e.ld)}}Nu.Or={Cr:"inapp",md:"templated_iam"},Nu.td=-1;function oV(t,e,n){const r=document.querySelector("head"),i=`ab-${e}-css-definitions-${"5.9.1".replace(/\./g,"-")}`;if(!r)return;const s=r.ownerDocument||document;if(s.getElementById(i)==null){const a=s.createElement("style");a.innerHTML=n||"",a.id=i;const o=je.ee(ur.er);o!=null&&a.setAttribute("nonce",o),r.appendChild(a)}}function zde(){if(je.ee(ur.Ia))return;const t="https://use.fontawesome.com/7f85a56ba4.css";if(document.querySelector('link[rel=stylesheet][href="'+t+'"]')===null){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),document.getElementsByTagName("head")[0].appendChild(e)}}function Vtt(t){oV(t,"feed","body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
222ans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button[dir=rtl]{left:0}.ab-feed .ab-card .ab-close-button[dir=ltr]{right:0}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}
222.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
222ans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body[dir=ltr]{padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body[dir=rtl]{padding-right:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area[dir=rtl]{padding:20px 25px 25px 0}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}")}function Gde(){Vtt(),zde()}function Htt(t){oV(t,"iam",".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
222ans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
222ans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{dis
222play:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}
222.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
222ans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100
222%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}")}function Wde(){Htt(),zde()}function jtt(t){oV(t,"banner",".ab-html-banner{width:100%;height:100%;border:none}.ab-html-control-banner{width:0;height:0;margin:0;border:none}")}function ztt(){jtt()}function Gtt(t){let e="";return t.animateIn&&(e+=" ab-animate-in"),t.animateOut&&(e+=" ab-animate-out"),t instanceof Vf?e+=" ab-effect-fullscreen":t instanceof Nc?e+=" ab-effect-html":t instanceof ep?e+=" ab-effect-modal":t instanceof Hf&&(e+=" ab-effect-slide"),e}function qde(t,e,n,r="ltr"){const i=document.createElement("button");i.setAttribute("aria-label",t),i.setAttribute("tabindex","0"),i.setAttribute("role","button"),i.dir=r,L1(i,"touchstart"),i.className="ab-close-button";const s=Ude("0 0 15 15","M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z",e);return i.appendChild(s),i.addEventListener("keydown",a=>{a.keyCode!==cg.Wo&&a.keyCode!==cg.Xo||(n(),a.stopPropagation())}),i.onclick=a=>{n(),a.stopPropagation()},i}function Wtt(t){return t!=null&&(t=parseInt(t.toString()),!isNaN(t)&&(4278190080&t)>>>24==0)}function Tf(t,e){return t==null||(t=parseInt(t.toString()),isNaN(t))?"":(e&&!isNaN(parseFloat(e.toString()))||(e=1),"rgba("+[(16711680&(t>>>=0))>>>16,(65280&t)>>>8,255&t,((4278190080&t)>>>24)/255*e].join(",")+")")}function QL(t){if(!je.rr())return!1;if(!(t instanceof Re||t instanceof Ff))return we.error(J7),!1;const e=t instanceof Ff?_r.Do:_r.Ki;return lo.ea().ut(t,e).tt}function Kde(t){if(!je.rr())return!1;if(!(t instanceof Re))return we.error(J7),!1;const e=lo.ea().ut(t,_r.Li);if(e){t.Bo()||QL(t);for(let n=0;n<e.$e.length;n++)Ya.m().Ce(co.Zr,[t.triggerId],e.$e[n])}return e.tt}const Bm={PORTRAIT:0,LANDSCAPE:1};function qtt(){return screen.width<=600}
222function Ktt(){if("orientation"in window)return Math.abs(window.orientation)===90||window.orientation===270?Bm.LANDSCAPE:Bm.PORTRAIT;const t=window;if("screen"in t){let e=t.screen.orientation||screen.mozOrientation||screen.msOrientation;return e!=null&&typeof e=="object"&&(e=e.type),e==="landscape-primary"||e==="landscape-secondary"?Bm.LANDSCAPE:Bm.PORTRAIT}return Bm.PORTRAIT}function Ytt(t,e,n){t&&(e||n!=null&&n.metaKey?window.open(t):window.location=t)}function Ztt(){return window.location.href}const X0={openUri:Ytt,Uo:qtt,No:Ktt,$a:Ztt};function md(){if(je.rr())return je.mr()}function k2(t,e,n){if(je.rr())if(J_.test(t)){const r=nV(t);if(!r)return;const i=s=>{if(!Dde(s))return void we.error(`Decoded Braze Action json is invalid: ${JSON.stringify(s,null,2)}`);const a=Ar.properties.type,o=Ar.properties.eo,l=Ar.properties.so,u=s[a];if(u===Ar.types.io){const c=s[o];for(const d of c)i(d)}else{const c=s[l];let d,f;switch(u){case Ar.types.logCustomEvent:Cr(async()=>{const{logCustomEvent:h}=await Promise.resolve().then(()=>Sfe);return{logCustomEvent:h}},void 0).then(({logCustomEvent:h})=>{je.nn()?(f=Array.prototype.slice.call(c),h(...f)):we.error(Ac)});break;case Ar.types.requestPushPermission:Cr(async()=>{const{requestPushPermission:h}=await Promise.resolve().then(()=>Ofe);return{requestPushPermission:h}},void 0).then(({requestPushPermission:h})=>{je.nn()?Du.browser==="Safari"&&Du.OS===Oh.ao?window.navigator.standalone&&h():h():we.error(Ac)});break;case Ar.types.setEmailNotificationSubscriptionType:case Ar.types.setPushNotificationSubscriptionType:case Ar.types.setCustomUserAttribute:case Ar.types.addToSubscriptionGroup:case Ar.types.removeFromSubscriptionGroup:case Ar.types.addToCustomAttributeArray:case Ar.types.removeFromCustomAttributeArray:d=md(),d&&d[u](...Array.prototype.slice.call(c));break;case Ar.types.co:case Ar.types.mo:f=Array.prototype.slice.call(c),X0.openUri(...f);break;default:we.info(`Ignoring unknown Braze Action: ${u}`)}}};i(r)}else X0.openUri(t,e,n)}function Qtt(t,e){k2(t,e)}function Yde(t){t==null&&(t="");const e=t.split("?").slice(1).join("?"),n={};if(e!=null){const r=e.split("&");for(let i=0;i<r.length;i++){const s=r[i].split("=");s[0]!==""&&(n[s[0]]=s[1])}}return n}function a4(t){return!(!t||(t=t.toString().toLowerCase()).lastIndexOf("javascript:",0)!==0&&t.lastIndexOf("data:",0)!==0)}function XL(t,e,n){if(!je.rr())return!1;if(!(t instanceof Nc))return we.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;let r=_r.Li;e!=null&&(r=_r.Qi);const i=lo.ea().ut(t,r,e,n);if(i.tt)for(let s=0;s<i.$e.length;s++)Ya.m().Ce(co.Zr,[t.triggerId,e],i.$e[s]);return i.tt}const BZ=(t,e,n,r)=>{const i=n.getAttribute("href"),s=n.onclick;return a=>{if(s!=null&&typeof s=="function"&&s.bind(n)(a)===!1)return;let o=Yde(i).abButtonId;if(o!=null&&o!==""||(o=n.getAttribute("id")||void 0),i!=null&&i!==""&&i.indexOf("#")!==0){const l=(n.getAttribute("target")||"").toLowerCase().replace("_","")==="blank",u=r||t.openTarget===Re.OpenTarget.BLANK||l,c=()=>{XL(t,o,i),X0.openUri(i,u,a)};u?c():t.ll(e,c)}else XL(t,o,i||void 0);return a.stopPropagation(),!1}},Zde=(t,e,n)=>{const r={display:{},web:{}},i=function(){return function(){const b=arguments;Cr(()=>Promise.resolve().then(()=>Ofe),void 0).then(S=>{je.nn()?S.requestPushPermission(...Array.prototype.slice.call(b)):we.error(Ac)})}},s={requestImmediateDataFlush:function(){const b=arguments;Cr(async()=>{const{requestImmediateDataFlush:S}=await Promise.resolve().then(()=>xnt);return{requestImmediateDataFlush:S}},void 0).then(({requestImmediateDataFlush:S})=>{je.nn()?S(...Array.prototype.slice.call(b)):we.error(Ac)})},logCustomEvent:function(){const b=arguments;Cr(async()=>{const{logCustomEvent:S}=await Promise.resolve().then(()=>Sfe);return{logCustomEvent:S}},void 0).then(({logCustomEvent:S})=>{if(!je.nn())return void we.error(Ac);S(...Array.prototype.slice.call(b))})},logPurchase:function(){const b=arguments;Cr(async()=>{const{logPurchase:S}=await Promise.resolve().then(()=>_nt);return{logPurchase:S}},void 0).then(({logPurchase:S})=>{if(!je.nn())return void we.error(Ac);S(...Array.prototype.slice.call(b))})},unregisterPush:function(){const b=arguments;Cr(async()=>{const{unregisterPush:S}=await Promise.resolve().then(()=>Unt);return{unregisterPush:S}},void 0).then(({unregisterPush:S})=>{je.nn()?S(...Array.prototype.slice.call(b)):we.error(Ac)})},requestPushPermission:i(),changeUser:function(){const b=arguments;Cr(async()=>{const{changeUser:S}=await Promise.resolve().then(()=>ynt);return{changeUser:S}},void 0).then(({changeUser:S})=>{if(!je.nn())return void we.error(Ac);S(...Array.prototype.slice.call(b))})}},a=function(b){return function(){s[b](...Array.prototype.slice.call(arguments))}};for(const b of Fu(s))r[b]=a(b);const o=["setFirstName","setLastName","setEmail","setGender","setDateOfBirth","setCountry","setHomeCity","setEmailNotificationSubscriptionType","setLanguage","addAlias","setPushNotificationSubscriptionType","setPhoneNumber","setCustomUserAttribute","addToCustomAttributeArray","removeFromCustomAttributeArray","incrementCustomUserAttribute","setCustomLocationAttribute","addToSubscriptionGroup","removeFromSubscriptionGroup","setLineId"],l=function(b){return function(){const S=md();S&&S[b](...Array.prototype.slice.call(arguments))}},u={};for(let b=0;b<o.length;b++)u[o[b]]=l(o[b]);r.getUser=function(){return u};const c={showFeed:e},d=function(b){return function(){const S=arguments;typeof n!="function"?c[b](...Array.prototype.slice.call(S)):n(t,function(){c[b](...Array.prototype.slice.call(S))})}},f=r.display;for(const b of Fu(c))f[b]=d(b);const h={registerAppboyPushMessages:i()},g=function(b){return function(){h[b](...Array.prototype.slice.call(arguments))}},v=r.web;for(const b of Fu(h))v[b]=g(b);return r},UZ=(t,e,n)=>{const r=`([\\w]+)\\s*=\\s*document.createElement\\(['"]${n}['"]\\)`,i=t.match(new RegExp(r));if(i){const s=`${i[1]}.setAttribute("nonce", "${e}")`;return`${t.slice(0,i.index+i[0].length)};${s};${t.slice(i.index+i[0].length)}`}return null},Qde=(t,e,n)=>{let r=null;if(n!=null){r=document.createElement("html"),r.innerHTML=e||"";const i=r.getElementsByTagName("style");for(let a=0;a<i.length;a++)i[a].setAttribute("nonce",n);const s=r.getElementsByTagName("script");for(let a=0;a<s.length;a++){s[a].setAttribute("nonce",n),s[a].innerHTML=s[a].innerHTML.replace(/<style>/g,`<style nonce='${n}'>`);const o=UZ(s[a].innerHTML,n,"script");o&&(s[a].innerHTML=o);const l=UZ(s[a].innerHTML,n,"style");l&&(s[a].innerHTML=l)}}t.srcdoc=r?r.innerHTML:e||""};function Xtt(t,e,n,r,i,s){const a=document.createElement("iframe");
222if(a.setAttribute("title","Modal Message"),i&&(a.style.zIndex=(i+1).toString()),Qde(a,t.message,s),a.onload=()=>{const o=a.contentWindow;o.focus();const l=o.document.getElementsByTagName("head")[0];if(l!=null){if(t.lo()){const h=document.createElement("style");h.innerHTML=t.css||"",h.id=t.do()||"",s!=null&&h.setAttribute("nonce",s),l.appendChild(h)}const f=o.document.createElement("base");f!=null&&(f.setAttribute("target","_parent"),l.appendChild(f))}const u=o.document.getElementsByTagName("title");u&&u.length>0&&a.setAttribute("title",u[0].textContent||"");const c=Object.assign(Object.assign({},Zde(a,e,(f,h)=>t.ll(f,h))),{closeMessage:function(){t.ll(a)},logClick:function(){XL(t,...arguments)}});if(o.appboyBridge=c,o.brazeBridge=c,t.uo!==Re.bo.po){const f=o.document.getElementsByTagName("a");for(let g=0;g<f.length;g++)f[g].onclick=BZ(t,a,f[g],r);const h=o.document.getElementsByTagName("button");for(let g=0;g<h.length;g++)h[g].onclick=BZ(t,a,h[g],r)}const d=o.document.body;if(d!=null){t.ho()&&(d.id=t.htmlId||"");const f=document.createElement("hidden");f.onclick=c.closeMessage,f.className="ab-programmatic-close-button",d.appendChild(f)}o.dispatchEvent(new CustomEvent("ab.BridgeReady")),a.className.indexOf("ab-start-hidden")!==-1&&(a.className=a.className.replace("ab-start-hidden",""),n(a))},a.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions",Du.OS===Oh.ao){const o=document.createElement("div");return o.className="ab-ios-scroll-wrapper",o.appendChild(a),t.jo=o,o}return t.jo=a,a}function Xde(t,e){var n;if(!je.rr())return!1;if(!(t instanceof Rg))return we.error("button must be an InAppMessageButton object"),!1;if(!(e instanceof Re))return we.error(J7),!1;const r=lo.ea().Wi(t,e);if(r.tt)for(let i=0;i<r.$e.length;i++)Ya.m().Ce(co.Zr,[e.triggerId,(n=t.id)===null||n===void 0?void 0:n.toString()],r.$e[i]);return r.tt}const fF={Io:t=>{const e=t.querySelectorAll(".ab-close-button, .ab-message-text, .ab-message-button");let n;for(let r=0;r<e.length;r++)n=e[r],n.tabIndex=0;if(e.length>0){const r=e[0],i=e[e.length-1];t.addEventListener("keydown",s=>{const a=document.activeElement;s.keyCode===cg.Ao&&(s.shiftKey||a!==i&&a!==t?!s.shiftKey||a!==r&&a!==t||(s.preventDefault(),i.focus()):(s.preventDefault(),r.focus()))})}},To:(t,e)=>{e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label","Modal Message"),t&&e.setAttribute("aria-labelledby",t)},Lo:(t,e,n,r)=>{if(t.buttons&&t.buttons.length>0){const i=document.createElement("div");i.className="ab-message-buttons",n.appendChild(i);const s=n.getElementsByClassName("ab-message-text")[0];s!=null&&(s.className+=" ab-with-buttons");const a=o=>l=>(t.ll(n,()=>{Xde(o,t),o.clickAction===Re.ClickAction.URI?k2(o.uri||"",r||t.openTarget===Re.OpenTarget.BLANK,l):o.clickAction===Re.ClickAction.NEWS_FEED&&e()}),l.stopPropagation(),!1);for(let o=0;o<t.buttons.length;o++){const l=t.buttons[o],u=document.createElement("button");u.className="ab-message-button",u.setAttribute("type","button"),L1(u,"touchstart");let c=l.text;l.text===""&&(c=" "),u.appendChild(document.createTextNode(c)),t.lo()||(u.style.backgroundColor=Tf(l.backgroundColor),u.style.color=Tf(l.textColor),u.style.borderColor=Tf(l.borderColor)),u.onclick=a(l),i.appendChild(u)}}}};function Jtt(t,e,n,r,i,s,a,o=document.body,l="ltr"){if(t.wo=document.activeElement,t instanceof Nc)return Xtt(t,e,n,i,s,a);const u=function(c,d,f,h,g,v,b=document.body,S="ltr"){let A=null;const w=document.createElement("div");w.dir=S,w.className="ab-in-app-message ab-start-hidden ab-background",v&&(w.style.zIndex=(v+1).toString()),c.vo()&&(w.className+=" ab-modal-interactions",w.setAttribute("tabindex","-1")),c.lo()||(w.style.color=Tf(c.textColor),w.style.backgroundColor=Tf(c.backgroundColor),Wtt(c.backgroundColor)&&(w.className+=" ab-no-shadow"));const x=()=>{w.className.indexOf("ab-start-hidden")!==-1&&(w.className=w.className.replace("ab-start-hidden",""),document.querySelectorAll(".ab-iam-img-loading").length>0?h(`Cannot show in-app message ${c.message} because another message is being shown.`,Re.Co.xo):f(w))},P=(q=!0)=>{let Z=document.querySelectorAll(".ab-iam-root");Z&&Z.length!==0||(Z=b.querySelectorAll(".ab-iam-root")),Z&&Z.length>0&&(Z[0].classList.remove("ab-iam-img-loading"),A&&(clearTimeout(A),A=null),q?x():we.error(`Cannot show in-app message ${c.message} because the image failed to load.`))};c.imageStyle===Re.ImageStyle.GRAPHIC&&(w.className+=" graphic"),c.orientation===Re.Orientation.LANDSCAPE&&(w.className+=" landscape"),c.buttons!=null&&c.buttons.length===0&&(c.clickAction!==Re.ClickAction.NONE&&(w.className+=" ab-clickable"),w.onclick=q=>(c.ll(w,()=>{Kde(c),c.clickAction===Re.ClickAction.URI?k2(c.uri||"",g||c.openTarget===Re.OpenTarget.BLANK,q):c.clickAction===Re.ClickAction.NEWS_FEED&&d()}),q.stopPropagation(),!1));const N=qde("Close Message",c.lo()?void 0:Tf(c.closeButtonColor),()=>{c.ll(w)},S);w.appendChild(N),v&&(N.style.zIndex=(v+2).toString());const k=document.createElement("div");k.className="ab-message-text",k.dir=S;const U=(c.messageAlignment||c.$o).toLowerCase();k.className+=" "+U+"-aligned";let H=!1;const B=document.createElement("div");if(B.className="ab-image-area",c.imageUrl){if(c.cropType===Re.CropType.CENTER_CROP){const q=document.createElement("span");q.className="ab-center-cropped-img",q.style.backgroundImage="url("+c.imageUrl+")",q.setAttribute("role","img"),q.setAttribute("aria-label","Modal Image"),c.ko(q),B.appendChild(q)}else{const q=document.createElement("img");if(q.setAttribute("src",c.imageUrl),c.ko(q),document.querySelectorAll(".ab-iam-img-loading").length===0){H=!0;const Z=document.querySelectorAll(".ab-iam-root");Z&&Z.length>0&&Z[0].classList.add("ab-iam-img-loading"),A=window.setTimeout(()=>{P(!1)},6e4),q.onload=()=>{P()},q.onerror=()=>{P(!1)}}B.appendChild(q)}w.appendChild(B),k.className+=" ab-with-image"}else if(c.icon){B.className+=" ab-icon-area";const q=document.createElement("span");q.className="ab-icon",c.lo()||(q.style.backgroundColor=Tf(c.iconBackgroun
222dColor),q.style.color=Tf(c.iconColor));const Z=document.createElement("i");Z.className="fa",Z.appendChild(document.createTextNode(c.icon)),Z.setAttribute("aria-hidden","true"),q.appendChild(Z),B.appendChild(q),w.appendChild(B),k.className+=" ab-with-icon"}if(L1(k,"touchstart"),c.header&&c.header.length>0){const q=document.createElement("h1");q.className="ab-message-header",c.Mo=Pg.ce(),q.id=c.Mo;const Z=(c.headerAlignment||Re.TextAlignment.CENTER).toLowerCase();q.className+=" "+Z+"-aligned",c.lo()||(q.style.color=Tf(c.headerTextColor)),q.appendChild(document.createTextNode(c.header)),k.appendChild(q)}return k.appendChild(c.zo()),w.appendChild(k),H||x(),c.jo=w,w}(t,e,n,r,i,s,o,l);if(t instanceof Vf||t instanceof ep){const c=t instanceof Vf?"ab-fullscreen":"ab-modal";u.className+=` ${c} ab-centered`,fF.Lo(t,e,u,i),fF.Io(u),fF.To(t.Mo,u)}else if(t instanceof Hf){u.className+=" ab-slideup";const c=u.getElementsByClassName("ab-close-button")[0];if(c!=null){const h=Ude("0 0 11.38 19.44","M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",t.lo()?void 0:Tf(t.closeButtonColor));h.setAttribute("class",`ab-chevron ${l}`),c.appendChild(h)}let d,f;Gw(u,$h.ie,h=>{u.className+=" ab-swiped-left",c!=null&&c.onclick!=null&&c.onclick(h)}),Gw(u,$h.de,h=>{u.className+=" ab-swiped-right",c!=null&&c.onclick!=null&&c.onclick(h)}),t.slideFrom===Re.SlideFrom.TOP?(d=$h.qo,f=" ab-swiped-up"):(d=$h.yo,f=" ab-swiped-down"),Gw(u,d,h=>{u.className+=f,c!=null&&c.onclick!=null&&c.onclick(h)})}return u}const hF={en:{NO_CARDS_MESSAGE:"We have no updates for you at this time.<br/>Please check again later.",FEED_TIMEOUT_MESSAGE:"Sorry, this refresh timed out.<br/>Please try again later."},ar:{NO_CARDS_MESSAGE:"ليس لدينا أي تحديث. يرجى التحقق مرة أخرى لاحقاً",FEED_TIMEOUT_MESSAGE:"يرجى تكرار المحاولة لاحقا"},cs:{NO_CARDS_MESSAGE:"V tuto chvíli pro vás nemáme žádné aktualizace.<br/>Zkontrolujte prosím znovu později.",FEED_TIMEOUT_MESSAGE:"Prosím zkuste to znovu později."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Prøv venligst senere.",FEED_TIMEOUT_MESSAGE:"Prøv venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verfügbar.<br/>Bitte später noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte später noch einmal versuchen."},es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compruébelo más tarde.",FEED_TIMEOUT_MESSAGE:"Por favor inténtelo más tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualización.<br/>Vuelva a verificar más tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo más tarde."},et:{NO_CARDS_MESSAGE:"Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.",FEED_TIMEOUT_MESSAGE:"Palun proovige hiljem uuesti."},fi:{NO_CARDS_MESSAGE:"Päivityksiä ei ole saatavilla.<br/>Tarkista myöhemmin uudelleen.",FEED_TIMEOUT_MESSAGE:"Yritä myöhemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise à jour disponible.<br/>Veuillez vérifier ultérieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez réessayer ultérieurement."},he:{NO_CARDS_MESSAGE:".אין לנו עדכונים. בבקשה בדוק שוב בקרוב",FEED_TIMEOUT_MESSAGE:".בבקשה נסה שוב בקרוב"},hi:{NO_CARDS_MESSAGE:"हमारे पास कोई अपडेट नहीं हैं। कृपया बाद में फिर से जाँच करें.।",FEED_TIMEOUT_MESSAGE:"कृपया बाद में दोबारा प्रयास करें।."},id:{NO_CARDS_MESSAGE:"Kami tidak memiliki pembaruan. Coba lagi nanti.",FEED_TIMEOUT_MESSAGE:"Coba lagi nanti."},it:{NO_CARDS_MESSAGE:"Non ci sono aggiornamenti.<br/>Ricontrollare più tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare più tardi."},ja:{NO_CARDS_MESSAGE:"アップデートはありません。<br/>後でもう一度確認してください。",FEED_TIMEOUT_MESSAGE:"後でもう一度試してください。"},ko:{NO_CARDS_MESSAGE:"업데이트가 없습니다. 다음에 다시 확인해 주십시오.",FEED_TIMEOUT_MESSAGE:"나중에 다시 시도해 주십시오."},ms:{NO_CARDS_MESSAGE:"Tiada kemas kini. Sila periksa kemudian.",FEED_TIMEOUT_MESSAGE:"Sila cuba kemudian."},nl:{NO_CARDS_MESSAGE:"Er zijn geen updates.<br/>Probeer het later opnieuw.",FEED_TIMEOUT_MESSAGE:"Probeer het later opnieuw."},no:{NO_CARDS_MESSAGE:"Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.",FEED_TIMEOUT_MESSAGE:"Vennligst prøv igjen senere."},pl:{NO_CARDS_MESSAGE:"Brak aktualizacji.<br/>Proszę sprawdzić ponownie później.",FEED_TIMEOUT_MESSAGE:"Proszę spróbować ponownie później."},pt:{NO_CARDS_MESSAGE:"Não temos atualizações.<br/>Por favor, verifique mais tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, tente mais tarde."},"pt-br":{NO_CARDS_MESSAGE:"Não temos nenhuma atualização.<br/>Verifique novamente mais tarde.",FEED_TIMEOUT_MESSAGE:"Tente novamente mais tarde."},ru:{NO_CARDS_MESSAGE:"Обновления недоступны.<br/>Пожалуйста, проверьте снова позже.",FEED_TIMEOUT_MESSAGE:"Пожалуйста, повторите попытку позже."},sv:{NO_CARDS_MESSAGE:"Det finns inga uppdateringar.<br/>
222Försök igen senare.",FEED_TIMEOUT_MESSAGE:"Försök igen senare."},th:{NO_CARDS_MESSAGE:"เราไม่มีการอัพเดต กรุณาตรวจสอบภายหลัง.",FEED_TIMEOUT_MESSAGE:"กรุณาลองใหม่ภายหลัง."},uk:{NO_CARDS_MESSAGE:"Оновлення недоступні.<br/>ласка, перевірте знову пізніше.",FEED_TIMEOUT_MESSAGE:"Будь ласка, спробуйте ще раз пізніше."},vi:{NO_CARDS_MESSAGE:"Chúng tôi không có cập nhật nào.<br/>Vui lòng kiểm tra lại sau.",FEED_TIMEOUT_MESSAGE:"Vui lòng thử lại sau."},"zh-hk":{NO_CARDS_MESSAGE:"暫時沒有更新.<br/>請稍候再試.",FEED_TIMEOUT_MESSAGE:"請稍候再試."},"zh-hans":{NO_CARDS_MESSAGE:"暂时没有更新.<br/>请稍后再试.",FEED_TIMEOUT_MESSAGE:"请稍候再试."},"zh-hant":{NO_CARDS_MESSAGE:"暫時沒有更新.<br/>請稍候再試.",FEED_TIMEOUT_MESSAGE:"請稍候再試."},"zh-tw":{NO_CARDS_MESSAGE:"暫時沒有更新.<br/>請稍候再試.",FEED_TIMEOUT_MESSAGE:"請稍候再試."},zh:{NO_CARDS_MESSAGE:"暂时没有更新.<br/>请稍后再试.",FEED_TIMEOUT_MESSAGE:"请稍候再试."}};class ent{constructor(e,n=!1){if(this.language=e,e!=null&&(e=e.toLowerCase()),e!=null&&hF[e]==null){const r=e.indexOf("-");r>0&&(e=e.substring(0,r))}if(hF[e]==null){const r="Braze does not yet have a localization for language "+e+", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.";n?we.error(r):we.info(r),e="en"}this.language=e}get(e){return hF[this.language][e]}Oo(){switch(this.language){case"ar":case"he":case"fa":return"rtl";default:return"ltr"}}}const ad={l:!1,aa:null,ea:()=>{if(ad.p(),!ad.aa){let t=Du.language,e=!1;je.ee(ur.Zn)&&(t=je.ee(ur.Zn),e=!0),ad.aa=new ent(t,e)}return ad.aa},p:()=>{ad.l||(je.h(ad),ad.l=!0)},destroy:()=>{ad.aa=null,ad.l=!1}};function Jde(t,e,n){if(!je.rr())return;if(Wde(),t==null)return!1;if(t instanceof Ff)return we.info("User received control for a multivariate test, logging to Braze servers."),QL(t),!0;if(!(t instanceof Re)||t.constructor===Re)return!1;t.Lh();const r=t instanceof Nc;if(r&&!t.trusted&&!je.tr())return we.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'),!1;if(e==null&&(e=document.body),t.vo()&&e.querySelectorAll(".ab-modal-interactions").length>0)return we.info(`Cannot show in-app message ${t.message} because another message is being shown.`),!1;if(X0.Uo()){const o=X0.No();if(o===Bm.PORTRAIT&&t.orientation===Re.Orientation.LANDSCAPE||o===Bm.LANDSCAPE&&t.orientation===Re.Orientation.PORTRAIT){const l=o===Bm.PORTRAIT?"portrait":"landscape",u=t.orientation===Re.Orientation.PORTRAIT?"portrait":"landscape";return we.info(`Not showing ${u} in-app message ${t.message} because the screen is currently ${l}`),!1}}if(!je.tr()){let o=!1;if(t.buttons&&t.buttons.length>0){const l=t.buttons;for(let u=0;u<l.length;u++)if(l[u].clickAction===Re.ClickAction.URI){const c=l[u].uri;o=a4(c)}}else t.clickAction===Re.ClickAction.URI&&(o=a4(t.uri));if(o)return we.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'),!1}const i=document.createElement("div");if(i.className="ab-iam-root v3",i.className+=Gtt(t),i.setAttribute("role","complementary"),t.ho()&&(i.id=t.htmlId),je.ee(ur.Go)&&(i.style.zIndex=(je.ee(ur.Go)+1).toString()),e.appendChild(i),t.lo()){const o=document.createElement("style");o.innerHTML=t.css,o.id=t.do(),je.ee(ur.er)!=null&&o.setAttribute("nonce",je.ee(ur.er)),document.getElementsByTagName("head")[0].appendChild(o)}const s=t instanceof Hf,a=Jtt(t,()=>{Cr(()=>Promise.resolve().then(()=>Cfe),void 0).then(o=>{je.nn()?o.showFeed():we.error(Ac)})},o=>{if(t.vo()&&t.Po()){const l=document.createElement("div");if(l.className="ab-page-blocker",t.lo()||(l.style.backgroundColor=Tf(t.frameColor)),je.ee(ur.Go)&&(l.style.zIndex=je.ee(ur.Go).toString()),i.appendChild(l),!je.ee(ur.mh)){const u=new Date().valueOf();l.onclick=c=>{new Date().valueOf()-u>Re.ph&&(t.ll(o),c.stopPropagation())}}i.appendChild(o),o.focus(),t.Ah(i)}else if(s){const l=document.querySelectorAll(".ab-slideup");let u=null;for(let c=l.length-1;c>=0;c--)if(l[c]!==o){u=l[c];break}if(t.slideFrom===Re.SlideFrom.TOP){let c=0;u!=null&&(c=u.offsetTop+u.offsetHeight),o.style.top=Math.max(c,0)+"px"}else{let c=0;u!=null&&(c=(window.innerHeight||document.documentElement.clientHeight)-u.offsetTop),o.style.bottom=Math.max(c,0)+"px"}}else if(r&&!je.ee(ur.mh)){const l=t;Vde(o)&&o.contentWindow&&o.contentWindow.addEventListener("keydown",function(u){u.keyCode===cg._h&&l.closeMessage()})}
222QL(t),t.dismissType===Re.DismissType.AUTO_DISMISS&&setTimeout(()=>{i.contains(o)&&t.ll(o)},t.duration),typeof n=="function"&&n()},o=>{we.info(o)},je.ee(ur.Ko),je.ee(ur.Go),je.ee(ur.er),e,ad.ea().Oo());return(r||s)&&(i.appendChild(a),t.Ah(i)),!0}function efe(t){if(je.rr())return typeof t!="function"?null:lo.ea().Xi(function(e){return t(e[0]),e.slice(1)})}function tfe(){if(!je.rr())return;Wde();const t=lo.ea();if(t.Hi()==null){const e=efe(n=>Jde(n));t.Ji(e)}return t.Hi()}function tnt(t){if(je.rr())return t instanceof Ff?(we.info("Not deferring since this is a ControlMessage."),!1):t instanceof Re?lo.ea().sn(t):(we.info("Not an instance of InAppMessage, ignoring."),!1)}function nnt(){if(je.rr())return lo.ea().Ar()}class rnt{constructor(e,n,r,i){this.S=e,this.T=n,this.C=r,this.Cs=i,this.S=e,this.T=n,this.C=r,this.Cs=i,this.Mi=new eo,je.F(this.Mi),this.Bi=1e3,this._i=6e4,this.Pi=null,this.Gi=null,this.$i=null}Oi(){return this.Mi}Xi(e){return this.Mi.Dt(e)}Hi(){return this.Pi}Ji(e){this.Pi=e}ut(e,n,r,i){const s=new vv;let a;if(n===_r.Ki||e instanceof Ff){if(!e._t())return we.info("This in-app message has already received an impression. Ignoring analytics event."),s}else if((n===_r.Li||e instanceof Nc&&n===_r.Qi)&&!e.$t(i))return we.info("This in-app message has already received a click. Ignoring analytics event."),s;return a=e instanceof Ff?{trigger_ids:[e.triggerId]}:this.Vi(e),a==null?s:(e.messageExtras&&(a.message_extras=e.messageExtras),r!=null&&(a.bid=r),ka.ut(n,a))}Wi(e,n){const r=new vv;if(!e.$t())return we.info("This in-app message button has already received a click. Ignoring analytics event."),r;const i=this.Vi(n);return i==null?r:e.id===Rg.Yi?(we.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),r):(e.id!=null&&(i.bid=e.id),ka.ut(_r.Qi,i))}Zi(e){const n=e.messageFields;return n!=null&&n.is_push_primer||!1}Ir(e){if(!(e instanceof Re))return;const n=s=>{if(!s)return;const a=nV(s);return rV(a)?i4(X_.Mr,"In-App Message"):Lde(a)&&!sa.Tr()?i4(X_.wr,"In-App Message"):void 0};if(this.Zi(e)&&!sa.Tr())return"In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";const r=e.buttons||[];let i;for(const s of r)if(s.clickAction===Re.ClickAction.URI&&s.uri&&J_.test(s.uri)&&(i=n(s.uri),i))return i;return e.clickAction===Re.ClickAction.URI&&e.uri&&J_.test(e.uri)?n(e.uri):void 0}Br(e,n){n!==this.$i&&this._r(),this.Gi=e,this.$i=n}_r(){this.Gi!=null&&(clearTimeout(this.Gi),this.Gi=null,this.$i=null)}qr(e,n,r,i){const s=this.S;if(!s)return;this.$i&&e.triggerId!==this.$i&&(this._r(),Nn.vi(this.C,Nn.O.Er));const a=s.Gr(!1,!1),o=s.H(a);o.template={trigger_id:e.triggerId,trigger_event_type:n},r!=null&&(o.template.data=r.Nr());const l=s.J(o,Nn.O.Er);s.V(o,(u=-1)=>{const c=this.S;if(!c)return;const d=new Date().valueOf();Nn.W(this.C,Nn.O.Er,d),u!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",u.toString()]);let f,h,g=!1;yx.Y({url:`${c.Z()}/template/`,data:o,headers:l,tt:v=>{if(!c.st(o,v,l))return void(typeof e.$r=="function"&&e.$r());if(c.it(),v==null||v.templated_message==null)return;const b=v.templated_message;if(b.type!==Nu.Or.Cr)return;const S=Hde(b.data);if(S==null)return;const A=this.Ir(S);if(A)return we.error(A),void(typeof e.$r=="function"&&e.$r());typeof e.Xr=="function"&&e.Xr(S)},error:v=>{g=!0,f=v,h=`getting user personalization for message ${e.triggerId}.`},nt:(v,b)=>{if(new Date().valueOf()-e.Hr<e.Jr){let S=0;if(g){const A=Math.min(e.Jr,this._i),w=this.Bi;i==null&&(i=w),S=Math.min(A,bx(w,3*i))}c.rt(b,()=>{this.qr(e,n,r,S)},Nn.O.Er,A=>this.Br(A,e.triggerId),()=>this._r(),S)}g&&c.et(f,h)}})},Nn.O.Er)}Vi(e){if(e.triggerId==null)return we.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;const n={};return e.triggerId!=null&&(n.trigger_ids=[e.triggerId]),n}sn(e){return!!this.C&&!(!(e&&e instanceof Re&&e.constructor!==Re)||e instanceof Ff)&&this.C.Bt(rt.gt.Kr,e.bt())}Ar(){if(!this.C)return null;const e=this.C.ft(rt.gt.Kr);if(!e)return null;let n;switch(e.type){case Re.bo.Lr:n=Vf.Qr(e);break;case Re.bo.Ur:case Re.bo.po:case Re.bo.Jo:n=Nc.Qr(e);break;case Re.bo.Vr:case Re.bo.Fo:n=ep.Qr(e);break;
222case Re.bo.Wr:n=Hf.Qr(e)}return n&&this.Yr(),n}Yr(){this.C&&this.C.Ut(rt.gt.Kr)}}const lo={aa:null,l:!1,ea:()=>(lo.p(),lo.aa||(lo.aa=new rnt(je.g(),je.P(),je.j(),je.ir())),lo.aa),p:()=>{lo.l||(je.h(lo),lo.l=!0)},destroy:()=>{lo.aa=null,lo.l=!1}};class lV{constructor(e,n,r,i,s){this.triggerId=e,this.Xr=n,this.$r=r,this.Hr=i,this.Jr=s,this.triggerId=e,this.Xr=n,this.$r=r,this.Hr=i,this.Jr=s}static fromJson(e,n,r,i,s){return e==null||e.trigger_id==null?null:new lV(e.trigger_id,n,r,i,s)}}class int extends yT{constructor(e,n,r,i,s){super(),this.tg=e,this.Ts=n,this.C=r,this.Fi=i,this.ig=s,this.tg=e,this.Ts=n,this.C=r,this.Fi=i,this.ig=s,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.C){this.hg=this.C.ft(rt.gt.aE)||this.hg,this.ng=this.C.ft(rt.gt.iE)||this.ng,this.og=this.C.ft(rt.gt.nE)||this.og;for(let e=0;e<this.triggers.length;e++){const n=this.triggers[e];n.id&&this.og[n.id]!=null&&n.ad(this.og[n.id])}}}ag(){if(!this.C)return;this.lg=this.C.ft(rt.gt.oE)||0;const e=this.C.ft(rt.gt.rE)||[],n=[];for(let r=0;r<e.length;r++)n.push(Nu.Rn(e[r]));this.triggers=n,this.fg()}gg(){const e=this,n=function(s,a,o,l,u){return function(){e.cg(s,a,o,l,u)}},r={};for(const s of this.triggers)s.id&&(r[s.id]=s);let i=!1;for(let s=0;s<this.triggers.length;s++){const a=this.triggers[s];if(a.id&&this.ng[a.id]!=null){const o=this.ng[a.id],l=[];for(let u=0;u<o.length;u++){const c=o[u],d=a.ud(c.Hr||0);if(d>0){let f,h;l.push(c),c.ug!=null&&(f=c.ug),c.dg!=null&&qh.RE(c.dg)&&(h=qh.Rn(c.dg));const g=[];if(c.pg&&to(c.pg))for(let v=0;v<c.pg.length;v++){const b=r[c.pg[v]];b!=null&&g.push(b)}this.eg.push(window.setTimeout(n(a,c.Hr||0,f,h,g),d))}}this.ng[a.id].length>l.length&&(this.ng[a.id]=l,i=!0,this.ng[a.id].length===0&&delete this.ng[a.id])}}i&&this.C&&this.C.Bt(rt.gt.iE,this.ng)}mg(){if(!this.C)return;const e=[];for(let n=0;n<this.triggers.length;n++)e.push(this.triggers[n].bt());this.lg=new Date().valueOf(),this.C.Bt(rt.gt.rE,e),this.C.Bt(rt.gt.oE,this.lg)}bg(){this.C&&((this.C.ft(rt.gt.oE)||0)>this.lg?this.ag():this.fg())}U(e){let n=!1;if(e!=null&&e.triggers){this.ig.Yr(),this.fg();const r={},i={};this.triggers=[];for(let o=0;o<e.triggers.length;o++){const l=Nu.fromJson(e.triggers[o]);if(l){l.id&&this.og[l.id]!=null&&(l.ad(this.og[l.id]),r[l.id]=this.og[l.id]),l.id&&this.ng[l.id]!=null&&(i[l.id]=this.ng[l.id]);for(let u=0;u<l.sd.length;u++)if(l.sd[u]._c(co.As,null)){n=!0;break}this.triggers.push(l)}}Z0(this.og,r)||(this.og=r,this.C&&this.C.Bt(rt.gt.nE,this.og)),Z0(this.ng,i)||(this.ng=i,this.C&&this.C.Bt(rt.gt.iE,this.ng)),this.mg(),n&&(we.info("Trigger with test condition found, firing test."),this.Ce(co.As)),this.Ce(co.OPEN);const s=this.sg;let a;this.sg=[];for(let o=0;o<s.length;o++)a=Array.prototype.slice.call(s[o]),this.Ce(...a)}}cg(e,n,r,i,s){const a=d=>{this.fg();const f=new Date().valueOf();e.dd(n)||(navigator.onLine===!1&&e.type===Nu.Or.Cr&&d.imageUrl?we.info(`Not showing ${e.type} trigger action ${e.id} due to offline state.`):e.nd(f)&&this.wg(e,f,r)?this.Ts.hc()===0?we.info(`Not displaying trigger ${e.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.Ts.X([d]),this.yg(e,f)):we.info(`Not displaying trigger ${e.id} because display time fell outside of the acceptable time window.`))},o=()=>{this.fg();const d=s.pop();if(d!=null)if(this.Tg(d,n,r,i,s),d.dd(n)){let f=`Server aborted in-app message display, but the timeout on fallback trigger ${d.id} has already elapsed.`;s.length>0&&(f+=" Continuing to fall back."),we.info(f),o()}else{we.info(`Server aborted in-app message display. Falling back to lower priority ${d.type} trigger action ${e.id}.`);const f=1e3*d.ed-(new Date().valueOf()-n);f>0?this.eg.push(window.setTimeout(()=>{this.cg(d,n,r,i,s)},f)):this.cg(d,n,r,i,s)}};let l,u,c;switch(e.type){case Nu.Or.Cr:if(l=Hde(e.data),l==null){we.error(`Could not parse trigger data for trigger ${e.id}, ignoring.`);break}if(u=this.ig.Ir(l),u){we.error(u),o();break}a(l);break;case Nu.Or.md:if(c=lV.fromJson(e.data,a,o,n,e.Jr||0),c==null){we.error(`Could not parse trigger data for trigger ${e.id}, ignoring.`);break}this.ig.qr(c,r,i);break;default:we.error(`Trigger ${e.id} was of unexpected type ${e.type}, ignoring.`)}}Ce(e,n=null,r){if(!Wh(co,e,"Cannot fire trigger action.","TriggerEvents"))return;if(this.Fi&&this.Fi.dc())return we.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.sg.push(arguments);this.bg();const i=new Date().valueOf(),s=i-(this.hg||0);let a=!0,o=!0;const l=[];for(let c=0;c<this.triggers.length;c++){const d=this.triggers[c],f=i+1e3*d.ed;if(d.nd(f)&&(d.startTime==null||d.startTime.valueOf()<=i)&&(d.endTime==null||d.endTime.valueOf()>=i)){let h=!1;for(let g=0;g<d.sd.length;g++)if(d.sd[g]._c(e,n)){h=!0;break}h&&(a=!1,this.wg(d,f,e)&&(o=!1,l.push(d)))}}if(a)return void we.info(`Trigger event ${e} did not match any trigger conditions.`);if(o)return void we.info(`Ignoring ${e} trigger event because a trigger was displayed ${s/1e3}s ago.`);l.sort((c,d)=>c.priority-d.priority);const u=l.pop();u!=null&&(we.info(`Firing ${u.type} trigger action ${u.id} from trigger event ${e}.`),this.Tg(u,i,e,r,l),u.ed===0?this.cg(u,i,e,r,l):this.eg.push(window.setTimeout(()=>{this.cg(u,i,e,r,l)},1e3*u.ed)))}changeUser(e=!1){if(this.triggers=[],this.C&&this.C.Ut(rt.gt.rE),!e){this.sg=[],this.hg=null,this.og={},this.ng={};for(let n=0;n<this.eg.length;n++)clearTimeout(this.eg[n]);this.eg=[],this.C&&(this.C.Ut(rt.gt.aE),this.C.Ut(rt.gt.nE),this.C.Ut(rt.gt.iE))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[]}wg(e,n,r){if(this.hg==null)return!0;
222if(r===co.As)return we.info("Ignoring minimum interval between trigger because it is a test type."),!0;let i=e.hd;return i==null&&(i=this.tg),n-this.hg>=1e3*i}Tg(e,n,r,i,s){this.fg(),e.id&&(this.ng[e.id]=this.ng[e.id]||[]);const a={};let o;a.Hr=n,a.ug=r,i!=null&&(o=i.bt()),a.dg=o;const l=[];for(const u of s)u.id&&l.push(u.id);a.pg=l,e.id&&this.ng[e.id].push(a),this.C&&this.C.Bt(rt.gt.iE,this.ng)}yg(e,n){this.fg(),e.ad(n),this.hg=n,e.id&&(this.og[e.id]=n),this.C&&(this.C.Bt(rt.gt.aE,n),this.C.Bt(rt.gt.nE,this.og))}}const Ya={l:!1,provider:null,m:()=>(Ya.p(),Ya.provider||Ya.rg(),Ya.provider),rg:()=>{if(!Ya.provider){const t=je.ee(ur.Xh);Ya.provider=new int(t??30,lo.ea().Oi(),je.j(),je.rn(),lo.ea()),je._(Ya.provider)}},p:()=>{Ya.l||(Ya.rg(),je.h(Ya),Ya.l=!0)},destroy:()=>{Ya.provider=null,Ya.l=!1}};class N2{constructor(e,n,r,i,s){this.endpoint=e,this.En=n,this.publicKey=r,this.Vl=i,this.fl=s,this.endpoint=e||null,this.En=n||null,this.publicKey=r||null,this.Vl=i||null,this.fl=s||null}bt(){return{e:this.endpoint,c:this.En,p:this.publicKey,u:this.Vl,v:this.fl}}static Rn(e){return new N2(e.e,w0(e.c),e.p,e.u,e.v)}}class snt{constructor(e,n){this.B=e,this.C=n,this.B=e,this.C=n}getUserId(){const e=this.C.tu(rt.iu.su);if(e==null)return null;let n=e.eu,r=jL(n);if(r>Si.ur){for(;r>Si.ur;)n=n.slice(0,n.length-1),r=jL(n);e.eu=n,this.C.uu(rt.iu.su,e)}return n}ou(e){const n=this.getUserId()==null;this.C.uu(rt.iu.su,new Pf(e)),n&&this.C.ru(e)}setCustomUserAttribute(e,n){if(this.B.hu(e))return we.info('Custom Attribute "'+e+'" is blocklisted, ignoring.'),!1;const r={};return r[e]=n,this.nu(Si.lu,r,!0)}nu(e,n,r=!1,i=!1){const s=this.C.mu(this.getUserId(),e,n);let a="",o=e,l=n;return r&&(a=" custom",typeof n=="object"&&(o=Object.keys(n)[0],l=n[o],typeof l=="object"&&(l=JSON.stringify(l,null,2)))),!i&&s&&we.info(`Logged${a} attribute ${o} with value ${l}`),s}An(e,n,r,i,s){this.nu("push_token",e,!1,!0),this.nu("custom_push_public_key",r,!1,!0),this.nu("custom_push_user_auth",i,!1,!0),this.nu("custom_push_vapid_public_key",s,!1,!0);const a=Ss.Ls.Fs,o=new Ss(a,we),l=new N2(e,n,r,i,s);this.C.Bt(rt.gt.zn,l.bt()),o.setItem(a.Ms.cu,a.be,!0)}xn(e){if(this.nu("push_token",null,!1,!0),this.nu("custom_push_public_key",null,!1,!0),this.nu("custom_push_user_auth",null,!1,!0),this.nu("custom_push_vapid_public_key",null,!1,!0),e){const n=Ss.Ls.Fs,r=new Ss(n,we);this.C.Bt(rt.gt.zn,!1),r.setItem(n.Ms.cu,n.be,!1)}}}const ur={Yo:"allowCrawlerActivity",Zo:"baseUrl",Wh:"noCookies",Da:"disablePushTokenMaintenance",$h:"enableLogging",Yh:"enableSdkAuthentication",Ca:"manageServiceWorkerExternally",Xh:"minimumIntervalBetweenTriggerActionsInSeconds",Zh:"sessionTimeoutInSeconds",Qh:"appVersion",Ea:"appVersionNumber",_a:"serviceWorkerLocation",Ba:"safariWebsitePushId",Zn:"localization",er:"contentSecurityNonce",re:"allowUserSuppliedJavascript",Go:"inAppMessageZIndex",Ko:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",en:"openNewsFeedCardsInNewTab",mh:"requireExplicitInAppMessageDismissal",Ia:"doNotLoadFontAwesome",Na:"deviceId",Aa:"serviceWorkerScope",Oa:"sdkFlavor"};class ant{constructor(){this.an="",this.Ta="",this.Ra=void 0,this.Pa=null,this.hn=null,this.S=null,this.Fi=null,this.B=null,this.T=null,this.C=null,this.Cs=null,this.La="",this.isInitialized=!1,this.Ua=!1,this.Wa=new eo,this.Va=new eo,this.options={},this.Fa=[],this.Ka=[],this.Mi=[],this.Ta="5.9.1"}Ga(e){this.Wa.Dt(e)}Nh(e){this.Va.Dt(e)}initialize(e,n){if(this.nn())return we.info("Braze has already been initialized with an API key."),!0;this.options=n||{};let r=this.ee(ur.$h);const i=Yde(X0.$a());if(i&&i.brazeLogging==="true"&&(r=!0),we.init(r),we.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),e==null||e===""||typeof e!="string")return we.error("Braze requires a valid API key to be initialized."),!1;this.an=e;let s=this.ee(ur.Zo);if(s==null||s===""||typeof s!="string")return we.error("Braze requires a valid baseUrl to be initialized."),!1;/^https?:/.test(s)===!1&&(s=`https://${s}`);const a=s;if(s=document.createElement("a"),s.href=a,s.pathname==="/"&&(s=`${s}api/v3`),this.La=s.toString(),Du.Ja&&!this.ee(ur.Yo))return we.info("Ignoring activity from crawler bot "+navigator.userAgent),this.Ua=!0,!1;const o=this.ee(ur.Wh)||!1;if(this.C=Mde.Ya(e,o),o&&this.C.Ha(e),new Cl.se(null,!0).gr(rt.me))return we.info("Ignoring all activity due to previous opt out"),this.Ua=!0,!1;for(const f of Fu(this.options))R2(kZ).indexOf(f)===-1&&we.warn(`Ignoring unknown initialization option '${f}'.`);const l=["mparticle","wordpress","tealium"];if(this.ee(ur.Oa)!=null){const f=this.ee(ur.Oa);l.indexOf(f)!==-1?this.Ra=f:we.error("Invalid sdk flavor passed: "+f)}let u=this.ee(kZ.Vh);if(u!=null)if(to(u)){const f=[];for(let h=0;h<u.length;
222h++)Wh(bh,u[h],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&f.push(u[h]);u=f}else we.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),u=null;const c=this.ee(ur.Na);if(c){const f=new Pf(c);this.C.uu(rt.iu.Na,f)}this.hn=new ktt(this.C,u),this.B=new $tt(this.C),this.Cs=new snt(this.B,this.C),this.T=new Btt(this.C,this.Cs,this.B,this.ee(ur.Zh));const d=new eo;return this.Pa=new Ltt(this.C,this.ee(ur.Yh),d),this.F(d),this.S=new Mtt(this.hn,this.C,this.Pa,this.Cs,this.T,this.B,this.an,this.La,this.Ta,this.Ra||"",this.ee(ur.Qh),this.ee(ur.Ea)),this.Fi=new Ftt(this.an,this.La,this.T,this.hn,this.Cs,this.B,this.C,f=>{if(this.nn())for(const h of this.ar())h.U(f)},this.Pa,this.S),this.Fi.initialize(),o||this.C.Xa(),we.info(`Initialized for the Braze backend at "${this.ee(ur.Zo)}" with API key "${this.an}".`),Ya.p(),this.B.Ke(()=>{var f;this.isInitialized&&(!((f=this.B)===null||f===void 0)&&f.ke())&&Cr(()=>Promise.resolve().then(()=>VZ),void 0).then(h=>{this.isInitialized&&(0,h.default)()})}),this.Fi.on(()=>{var f;this.isInitialized&&(!((f=this.B)===null||f===void 0)&&f.ke())&&Cr(()=>Promise.resolve().then(()=>VZ),void 0).then(h=>{this.isInitialized&&(0,h.default)(void 0,void 0,!0)})}),this.Wa.X(this.options),this.isInitialized=!0,window.dispatchEvent(new CustomEvent("braze.initialized")),!0}destroy(e){if(we.destroy(),this.nn()){this.Va.X(),this.Va.removeAllSubscriptions();for(const n of this.Fa)n.destroy();this.Fa=[];for(const n of this.Ka)n.clearData(!1);this.S&&this.S.fo(),this.Ka=[],this.removeAllSubscriptions(),this.Mi=[],this.Fi!=null&&this.Fi.destroy(),this.Fi=null,this.Pa=null,this.hn=null,this.S=null,this.B=null,this.T=null,this.Cs=null,this.options={},this.Ra=void 0,this.isInitialized=!1,this.Ua=!1,e&&(this.C=null)}}rr(){return!this.Za()&&(!!this.nn()||(console.warn(Ac),!1))}Ma(){return this.an}Sr(){return this.Pa}Z(){return this.La}ue(){return this.hn}g(){return this.S}ee(e){return this.options[e]}ar(){return this.Ka}rn(){return this.Fi}v(){return this.B}P(){return this.T}j(){return this.C}mr(){if(this.Cs&&this.Fi)return new Si(this.Cs,this.Fi)}ir(){return this.Cs}tr(){return this.ee(ur.re)===!0}h(e){let n=!1;for(const r of this.Fa)r===e&&(n=!0);n||this.Fa.push(e)}_(e){let n=!1;for(const r of this.Ka)r.constructor===e.constructor&&(n=!0);e instanceof yT&&!n&&this.Ka.push(e)}F(e){e instanceof eo&&this.Mi.push(e)}removeAllSubscriptions(){if(this.rr())for(const e of this.Mi)e.removeAllSubscriptions()}removeSubscription(e){if(this.rr())for(const n of this.Mi)n.removeSubscription(e)}fe(e){this.Ua=e}nn(){return this.isInitialized}Za(){return this.Ua}fi(){return this.Ta}}const je=new ant,ka={ut:(t,e,n)=>{var r,i;const s=new vv,a=je.P();if(!a)return we.info(`Not logging event with type "${t}" because the current session ID could not be found.`),s;const o=a.Qo();return s.$e.push(new qh(n||((r=je.ir())===null||r===void 0?void 0:r.getUserId()),t,new Date().valueOf(),o,e)),s.tt=((i=je.j())===null||i===void 0?void 0:i.Vo(s.$e))||!1,s}};let ont=class{constructor(e){this.C=e,this.C=e}logClick(e,n){const r=new vv;if(e.$t(),e.url==null||e.url==="")return we.info(`Card ${e.id} has no url. Not logging click to Braze servers.`),r;if(n&&e.id&&this.C){const a=this.C.ft(rt.gt.Kt)||{};a[e.id]=!0,this.C.Bt(rt.gt.Kt,a)}const i=this.Lt([e]);if(i==null)return r;const s=n?_r.Mt:_r.Ot;return ka.ut(s,i)}Pt(e){const n=new vv;if(!e.Qt())return we.info(`Card ${e.id} refused this dismissal. Ignoring analytics event.`),n;if(e.id&&this.C){const i=this.C.ft(rt.gt.Vt)||{};i[e.id]=!0,this.C.Bt(rt.gt.Vt,i)}const r=this.Lt([e]);return r==null?n:ka.ut(_r.Wt,r)}Xt(e,n){const r=new vv(!0),i=[],s=[];let a={};this.C&&(a=n?this.C.ft(rt.gt.Yt)||{}:this.C.ft(rt.gt.Zt)||{});for(const u of e)u._t()?(u instanceof vx?s.push(u):i.push(u),u.id&&(a[u.id]=!0)):we.info(`Card ${u.id} logged an impression too recently. Ignoring analytics event.`);const o=this.Lt(i),l=this.Lt(s);if(o==null&&l==null)return r.tt=!1,r;if(this.C&&(n?this.C.Bt(rt.gt.Yt,a):this.C.Bt(rt.gt.Zt,a)),o!=null){const u=n?_r.ts:_r.ss,c=ka.ut(u,o);r.ns(c)}if(l!=null&&n){const u=ka.ut(_r.rs,l);r.ns(u)}return r}Lt(e){let n,r=null;for(let i=0;i<e.length;i++)n=e[i].id,n!=null&&n!==""&&(r=r||{}
222,r.ids=r.ids||[],r.ids.push(n));return r}};const od={l:!1,aa:null,ea:()=>(od.p(),od.aa||(od.aa=new ont(je.j())),od.aa),p:()=>{od.l||(je.h(od),od.l=!0)},destroy:()=>{od.aa=null,od.l=!1}};function M2(t,e){return!!je.rr()&&(t instanceof _t?od.ea().logClick(t,e).tt:(we.error("card "+eV),!1))}function nfe(t){return!!je.rr()&&(t instanceof _t?od.ea().Pt(t).tt:(we.error("card "+eV),!1))}function F2(t,e){if(!je.rr())return!1;if(!to(t))return we.error("cards must be an array"),!1;for(const n of t)if(!(n instanceof _t))return we.error(`Each card in cards ${eV}`),!1;return od.ea().Xt(t,e).tt}function lnt(t){return F2(t,!0)}function unt(t){return M2(t,!0)}class _0{constructor(e,n){this.cards=e,this.lastUpdated=n,this.cards=e,this.lastUpdated=n}getUnreadCardCount(){let e=0;for(const n of this.cards)n.viewed||n instanceof vx||e++;return e}nr(){we.error("Must be implemented in a subclass")}logCardImpressions(e){we.error("Must be implemented in a subclass")}logCardClick(e){we.error("Must be implemented in a subclass")}sr(){we.error("Must be implemented in a subclass")}}_0.dr=6e4,_0.Ih=500,_0.Ro=1e4;function uV(t,e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S){let A;if(e===_t.cs.Ti||e===_t.cs.Ii)A=new Pde(t,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b);else if(e===_t.cs.os)A=new Ode(t,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b);else if(e===_t.cs.ai)A=new Ide(t,n,i,a,o,l,u,c,d,f,h,g,v,b);else{if(e!==_t.cs.ci)return we.error("Ignoring card with unknown type "+e),null;A=new vx(t,n,o,u,h,g)}return S&&(A.test=S),A}function pF(t){if(t[_t.ui.Ei])return null;const e=t[_t.ui.ds],n=t[_t.ui.hs],r=t[_t.ui.ps],i=t[_t.ui.us],s=t[_t.ui.ls],a=t[_t.ui.fs],o=Mf(t[_t.ui.xs]),l=o;let u;return u=t[_t.ui.js]===_t.oi?null:Mf(t[_t.ui.js]),uV(e,n,r,i,s,a,l,o,null,u,t[_t.ui.URL],t[_t.ui.zs],t[_t.ui.ks],t[_t.ui.qs],t[_t.ui.vs],t[_t.ui.ws],t[_t.ui.ys],t[_t.ui.As]||!1)}function cnt(t){return uV(t.id,t.type,t.viewed,t.title,t.image,t.description,Mf(t.created),Mf(t.updated),t.categories,Mf(t.expires_at),t.url,t.domain,t.aspect_ratio,t.extras,!1,
222!1)}function rfe(t){return uV(t[_t.es.ds],t[_t.es.hs],t[_t.es.ps],t[_t.es.us],t[_t.es.ls],t[_t.es.fs],w0(t[_t.es.bs]),w0(t[_t.es.xs]),t[_t.es.gs],w0(t[_t.es.js]),t[_t.es.URL],t[_t.es.zs],t[_t.es.ks],t[_t.es.qs],t[_t.es.vs],t[_t.es.ws],t[_t.es.ys],t[_t.es.As]||!1)||void 0}let dnt=class extends yT{constructor(e,n,r,i,s){super(),this.Cs=e,this.C=n,this.B=r,this.Ss=i,this.S=s,this.Cs=e,this.C=n,this.B=r,this.Ss=i,this.S=s,this.Ts=new eo,je.F(this.Ts),this.Rs=0,this.Us=0,this.cards=[],this.Ds();const a=Ss.Ls.Fs;new Ss(a,we).Ns(a.Ms.Js,o=>{this.$s(o)}),this.Bs=null,this.N=null,this.Es=null,this.Ps=null,this.Xs=10}_s(){return this.Bs}Gs(e){this.Bs=e}Ct(){return this.N}Tt(e){this.N=e}Ds(){if(!this.C)return;const e=this.C.ft(rt.gt.Hs)||[],n=[];for(let r=0;r<e.length;r++){const i=rfe(e[r]);i!=null&&n.push(i)}this.cards=this.Is(this.Ks(n,!1)),this.Rs=this.C.ft(rt.gt.Os)||this.Rs,this.Us=this.C.ft(rt.gt.Qs)||this.Us}Vs(e,n=!1,r=0,i=0){let s;if(n){s=[];for(const a of this.cards)a.test&&s.push(a)}else s=this.cards.slice();for(let a=0;a<e.length;a++){const o=e[a];let l=null;for(let u=0;u<this.cards.length;u++)if(o.id===this.cards[u].id){l=this.cards[u];break}if(n){const u=pF(o);l!=null&&l.viewed&&u&&(u.viewed=!0),u!=null&&s.push(u)}else if(l==null){const u=pF(o);u!=null&&s.push(u)}else if(!l.ri(o)){for(let u=0;u<s.length;u++)if(o.id===s[u].id){s.splice(u,1);break}}}this.cards=this.Is(this.Ks(s,n)),this.Ws(),this.Rs=r,this.Us=i,this.C&&(this.C.Bt(rt.gt.Os,this.Rs),this.C.Bt(rt.gt.Qs,this.Us))}U(e){if(this.Ys()&&e!=null&&e.cards){this.C&&this.C.Bt(rt.gt.Zs,je.fi());const n=e.full_sync;n||this.Ds(),this.Vs(e.cards,n,e.last_full_sync_at,e.last_card_updated_at),this.Ts.X(this.di(!0))}}pi(e){this.Ci(),this.Es=e}$s(e){var n;if(!this.Ys())return;this.Ds();const r=this.cards.slice();let i=null;i=(n=this.Cs)===null||n===void 0?void 0:n.getUserId();for(let s=0;s<e.length;s++)if(i===e[s].userId||i==null&&e[s].userId==null){const a=e[s].card;let o=null;for(let l=0;l<this.cards.length;l++)if(a.id===this.cards[l].id){o=this.cards[l];break}if(o==null){const l=pF(a);l!=null&&r.push(l)}else if(!o.ri(a)){for(let l=0;l<r.length;l++)if(a.id===r[l].id){r.splice(l,1);break}}}this.cards=this.Is(this.Ks(r,!1)),this.Ws(),this.Ts.X(this.di(!0))}Ks(e,n){let r={},i={},s={};this.C&&(r=this.C.ft(rt.gt.Kt)||{},i=this.C.ft(rt.gt.Yt)||{},s=this.C.ft(rt.gt.Vt)||{});const a={},o={},l={};for(let u=0;u<e.length;u++){const c=e[u].id;c&&(r[c]&&(e[u].clicked=!0,a[c]=!0),i[c]&&(e[u].viewed=!0,o[c]=!0),s[c]&&(e[u].dismissed=!0,l[c]=!0))}return n&&this.C&&(this.C.Bt(rt.gt.Kt,a),this.C.Bt(rt.gt.Yt,o),this.C.Bt(rt.gt.Vt,l)),e}Is(e){const n=[],r=new Date;let i={};this.C&&(i=this.C.ft(rt.gt.Vt)||{});let s=!1;for(let a=0;a<e.length;a++){const o=e[a].url;if(!this.Ss&&o&&a4(o)){we.error(`Card with url ${o} will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.`);continue}const l=e[a].expiresAt;let u=!0;if(l!=null&&(u=l>=r),u=u&&!e[a].dismissed,u)n.push(e[a]);else{const c=e[a].id;c&&(i[c]=!0),s=!0}}return s&&this.C&&this.C.Bt(rt.gt.Vt,i),n}Ws(){var e;const n=[];for(let r=0;r<this.cards.length;r++)n.push(this.cards[r].bt());(e=this.C)===null||e===void 0||e.Bt(rt.gt.Hs,n)}Ci(){this.Es&&(clearTimeout(this.Es),this.Es=null)}bi(e,n,r=!1){var i;const s=this.S,a=this.C;if(!s||!a)return void(typeof n=="function"&&n());if(r&&(Nn.vi(a,Nn.O.wi),this.Ci()),!this.Ys())return void((i=this.B)===null||i===void 0||i.gi(()=>{this.bi(e,n,!0)}));const o=s.H({},!0);a.ft(rt.gt.Zs)!==je.fi()&&this.ji(),o.last_full_sync_at=this.Rs,o.last_card_updated_at=this.Us;const l=s.J(o,Nn.O.wi,r);let u=!1;s.V(o,(c=-1)=>{if(this.C){const d=new Date().valueOf();Nn.W(this.C,Nn.O.wi,d)}c!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",c.toString()]),yx.Y({url:`${s.Z()}/content_cards/sync`,data:o,headers:l,tt:d=>{if(!s.st(o,d,l))return u=!0,void(typeof n=="function"&&n());s.it(),this.U(d),u=!1,typeof e=="function"&&e()},error:d=>{s.et(d,"retrieving content cards"),u=!0,typeof n=="function"&&n()},nt:(d,f)=>{let h;if(u){let g=this.Ps;(g==null||g<1e3*this.Xs)&&(g=1e3*this.Xs),h=Math.min(3e5,bx(1e3*this.Xs,3*g))}s.rt(f,()=>{this.bi(e,n,!1)},Nn.O.wi,g=>this.pi(g),()=>this.Ci(),h)}})},Nn.O.wi,n)}di(e){e||this.Ds();const n=this.Is(this.cards);n.sort((i,s)=>i.pinned&&!s.pinned?-1:s.pinned&&!i.pinned?1:i.updated&&s.updated&&i.updated>s.updated?-1:i.updated&&s.updated&&s.updated>i.updated?1:0);let r=Math.max(this.Us||0,this.Rs||0);return r===0&&(r=void 0),this.C&&this.C.ft(rt.gt.Qs)===this.Us&&r===void 0&&(r=this.Us),new dg(n,Mf(r))}qt(e){return this.Ts.Dt(e)}ji(){this.Rs=0,this.Us=0,this.C&&(this.C.Ut(rt.gt.Os),this.C.Ut(rt.gt.Qs))}changeUser(e){e||(this.cards=[],this.Ts.X(new dg(this.cards.slice(),null)),this.C&&(this.C.Ut(rt.gt.Hs),this.C.Ut(rt.gt.Kt),this.C.Ut(rt.gt.Yt),this.C.Ut(rt.gt.Vt))),this.Ci(),this.ji()}clearData(e){this.Rs=0,this.Us=0,this.cards=[],this.Ts.X(new dg(this.cards.slice(),null)),e&&this.C&&(this.C.Ut(rt.gt.Hs),this.C.Ut(rt.gt.Kt),this.C.Ut(rt.gt.Yt),this.C.Ut(rt.gt.Vt),this.C.Ut(rt.gt.Os),this.C.Ut(rt.gt.Qs)),this.Ci()}Ys(){return!!this.B&&(!!this.B.yi()||(this.B.Et()!==0&&this.Ri(),!1))}Ri(){this.Ts.X(new dg([],new Date)),this.C&&this.C.Ut(rt.gt.Hs)}};const Ql={l:!1,provider:null,m:()=>(Ql.p(),Ql.provider||(Ql.provider=new dnt(je.ir(),je.j(),je.v(),je.tr(),je.g()),je._(Ql.provider)),Ql.provider),p:()=>{Ql.l||(je.h(Ql),Ql.l=!0)},destroy:()=>{Ql.provider=null,Ql.l=!1}};function ife(t,e){if(je.rr())return Ql.m().bi(t,e,!0)}class dg extends _0{constructor(e,n){super(e,n)}getUnviewedCardCount(){return super.getUnreadCardCount()}logCardImpressions(e){F2(e,!0)}logCardClick(e){return M2(e,!0)}sr(){ife()}nr(){return!0}}dg.dr=6e4;function fnt(){if(je.rr())return Ql.m().di(!1)}function sfe(t){if(t!=null){const e=t.querySelectorAll(".ab-unread-indicator")[0];e!=null&&(e.className+=" read")}}function hnt(t){return t.getAttribute("data-ab-card-id")}function pnt(t,e){let n="";
222t.title||t.description||(n="Feed Image"),e.setAttribute("alt",n)}function afe(t,e){const n=e.querySelectorAll(".ab-image-area");let r,i=0;n.length>0&&(i=n[0].offsetWidth);for(const s of t)if(r=s.te,r&&s.imageUrl&&typeof s.aspectRatio=="number"){const a=i/s.aspectRatio;a&&(r.style.height=`${a}px`)}}function gnt(t,e,n,r="ltr"){const i=document.createElement("div");i.dir=r,i.className="ab-card ab-effect-card "+t.oe,t.id&&(i.setAttribute("data-ab-card-id",t.id),i.setAttribute("id",t.id)),i.setAttribute("role","article"),i.setAttribute("tabindex","0");let s="",a=!1;t.url&&t.url!==""&&(s=t.url,a=!0);const o=h=>(sfe(i),a&&(e(t),k2(s,n,h)),!1);if(t.pinned){const h=document.createElement("div");h.className="ab-pinned-indicator";const g=document.createElement("i");g.className="fa fa-star",h.appendChild(g),i.appendChild(h)}if(t.imageUrl&&t.imageUrl!==""){const h=document.createElement("div");h.dir=r,h.className="ab-image-area";const g=document.createElement("img");if(g.setAttribute("src",t.imageUrl),g.onload=()=>{i.style.height="auto"},pnt(t,g),h.appendChild(g),i.className+=" with-image",a&&!t.ae){const v=document.createElement("a");v.setAttribute("href",s),v.onclick=o,v.appendChild(h),i.appendChild(v)}else i.appendChild(h)}const l=document.createElement("div");if(l.className="ab-card-body",l.dir=r,t.dismissible){t.logCardDismissal=()=>nfe(t);const h=qde("Dismiss Card",void 0,t.dismissCard.bind(t),r);i.appendChild(h),Gw(l,$h.ie,g=>{i.className+=" ab-swiped-left",h.onclick(g)}),Gw(l,$h.de,g=>{i.className+=" ab-swiped-right",h.onclick(g)})}let u="",c=!1;if(t.title&&t.title!==""&&(u=t.title,c=!0),c){const h=document.createElement("h1");if(h.className="ab-title",h.id=Pg.ce(),i.setAttribute("aria-labelledby",h.id),a){const g=document.createElement("a");g.setAttribute("href",s),g.onclick=o,g.appendChild(document.createTextNode(u)),h.appendChild(g)}else h.appendChild(document.createTextNode(u));l.appendChild(h)}const d=document.createElement("div");if(d.className=c?"ab-description":"ab-description ab-no-title",d.id=Pg.ce(),i.setAttribute("aria-describedby",d.id),t.description&&d.appendChild(document.createTextNode(t.description)),a){const h=document.createElement("div");h.className="ab-url-area";const g=document.createElement("a");g.setAttribute("href",s),t.linkText&&g.appendChild(document.createTextNode(t.linkText)),g.onclick=o,h.appendChild(g),d.appendChild(h)}l.appendChild(d),i.appendChild(l);const f=document.createElement("div");return f.className="ab-unread-indicator",t.viewed&&(f.className+=" read"),i.appendChild(f),t.te=i,i}function cV(t){je.rr()&&je.removeSubscription(t)}function ofe(t){return t!=null&&!!t.getAttribute("data-ab-had-top-impression")}function lfe(t){t!=null&&t.setAttribute("data-ab-had-top-impression","true")}function ufe(t){return t!=null&&!!t.getAttribute("data-ab-had-bottom-impression")}function cfe(t){t!=null&&t.setAttribute("data-ab-had-bottom-impression","true")}const gO={oo:ofe,no:ufe},dfe="data-last-requested-refresh",o4={};function bT(t){t&&(t.className=t.className.replace("ab-show","ab-hide"),setTimeout(()=>{t&&t.parentNode&&t.parentNode.removeChild(t)},_0.Ih));const e=t.getAttribute(L2);e!=null&&cV(e);const n=t.getAttribute("data-listener-id");n!=null&&(window.removeEventListener("scroll",o4[n]),delete o4[n])}function ffe(t,e){const n=ad.ea(),r=document.createElement("div");if(r.className="ab-feed-body",r.setAttribute("aria-label","Feed"),r.setAttribute("role","feed"),t.lastUpdated==null){const i=document.createElement("div");i.className="ab-no-cards-message";const s=document.createElement("i");s.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner",i.appendChild(s),r.appendChild(i)}else{let i=!1;const s=a=>t.logCardClick(a);for(const a of t.cards){const o=a instanceof vx;!o||t.nr()?(r.appendChild(gnt(a,s,e,n.Oo())),i=i||!o):we.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.")}if(!i){const a=document.createElement("div");a.className="ab-no-cards-message",a.innerHTML=n.get("NO_CARDS_MESSAGE")||"",a.setAttribute("role","article"),r.appendChild(a)}}return r}function $2(t,e){if(t!=null&&e!=null){const n=[],r=e.querySelectorAll(".ab-card");t._o||(t._o={});for(let i=0;i<r.length;i++){const s=hnt(r[i]),a=$de(r[i]),o=Bde(r[i]);if(t._o[s]){a||o||sfe(r[i]);continue}let l=ofe(r[i]),u=ufe(r[i]);const c=l,d=u;if(!l&&a&&(l=!0,lfe(r[i])),!u&&o&&(u=!0,cfe(r[i])),l&&u){if(c&&d)continue;for(const f of t.cards)if(f.id===s){t._o[f.id]=!0,n.push(f);break}}}n.length>0&&t.logCardImpressions(n)}}function dV(t,e){if(t==null||e==null)return;e.setAttribute("aria-busy","true");const n=e.querySelectorAll(".ab-refresh-button")[0];n!=null&&(n.className+=" fa-spin");const r=new Date().valueOf().toString();e.setAttribute("data-last-requested-refresh",r),setTimeout(()=>{if(e.getAttribute("data-last-requested-refresh")===r){const i=e.querySelectorAll(".fa-spin");for(let a=0;a<i.length;a++)i[a].className=i[a].className.replace(/fa-spin/g,"");const s=e.querySelectorAll(".ab-initial-spinner")[0];if(s!=null){const a=document.createElement("span");a.innerHTML=ad.ea().get("FEED_TIMEOUT_MESSAGE")||"",s.parentNode!=null&&(s.parentNode.appendChild(a),s.parentNode.removeChild(s))}e.getAttribute("aria-busy")==="true"&&e.setAttribute("aria-busy","false")}},_0.Ro),t.sr()}function hfe(t,e,n){const r=document.createElement("div");r.className="ab-feed ab-hide ab-effect-slide",r.setAttribute("role","dialog"),r.setAttribute("aria-label","Feed"),r.setAttribute("tabindex","-1");const i=document.createElement("div");i.className="ab-feed-buttons-wrapper",i.setAttribute("role","group"),r.appendChild(i);const s=document.createElement("i");s.className="fa fa-times ab-close-button",s.setAttribute("aria-label","Close Feed"),s.setAttribute("tabindex","0"),s.setAttribute("role","button");const a=c=>{bT(r),c.stopPropagation()};s.addEventListener("keydown",c=>{c.keyCode!==cg.Wo&&c.keyCode!==cg.Xo||a(c)}),s.onclick=a;const o=document.createElement("i");o.className="fa fa-refresh ab-refresh-button",t&&t.lastUpdated==null&&(o.className+=" fa-spin"),o.setAttribute("aria-label","Refresh Feed"),o.setAttribute("tabindex","0"),o.setAttribute("role","button");const l=c=>{dV(t,r),c.stopPropagation()};o.addEventListener("keydown",c=>{c.keyCode!==cg.Wo&&c.keyCode!==cg.Xo||l(c)}),o.onclick=l,i.appendChild(o),i.appendChild(s),r.appendChild(ffe(t,e));const u=()=>$2(t,r);
222if(r.addEventListener("scroll",u),!n){window.addEventListener("scroll",u);const c=Pg.ce();o4[c]=u,r.setAttribute("data-listener-id",c)}return r}function JL(t,e,n,r,i){if(!to(e))return;const s=[];for(const a of e)if(a instanceof _t){if(a.url&&J_.test(a.url)){const o=nV(a.url);if(rV(o)){we.error(i4(X_.Mr,"Content Card"));continue}}s.push(a)}if(t.cards=s,t.lastUpdated=n,r!=null)if(r.setAttribute("aria-busy","false"),t.lastUpdated==null)bT(r);else{const a=r.querySelectorAll(".ab-feed-body")[0];if(a!=null){const o=ffe(t,i);a.parentNode&&a.parentNode.replaceChild(o,a),$2(t,o.parentNode)}}}function pfe(t,e){t&&e.setAttribute(L2,t)}function gfe(t){if(!je.rr())return;const e=document.querySelectorAll(".ab-feed");for(let n=0;n<e.length;n++)(t==null||t!=null&&e[n].parentNode===t)&&bT(e[n])}function mfe(t,e){if(!je.rr())return;Gde();let n=!1;t==null&&(t=document.body,n=!0);const r=je.ee(ur.tn)||je.ee(ur.en)||!1,i=Ql.m().di(!1);typeof e=="function"&&JL(i,e(i.cards.slice()),i.lastUpdated,null,r);const s=hfe(i,r,n),a=Ql.m(),o=a._s();(i.lastUpdated==null||new Date().valueOf()-i.lastUpdated.valueOf()>dg.dr)&&(o==null||new Date().valueOf()-o>dg.dr)&&(we.info(`Cached content cards were older than max TTL of ${dg.dr} ms, requesting an update from the server.`),dV(i,s),a.Gs(new Date().valueOf()));const l=new Date().valueOf(),u=vfe(function(f){const h=s.querySelectorAll(".ab-refresh-button")[0];if(h!=null){let v=500,b=v-=new Date().valueOf()-l;const S=s.getAttribute(dfe);S&&(b=parseInt(S),isNaN(b)||(v-=new Date().valueOf()-b)),setTimeout(function(){h.className=h.className.replace(/fa-spin/g,"")},Math.max(v,0))}let g=f.cards;typeof e=="function"&&(g=e(g.slice())),JL(i,g,f.lastUpdated,s,r)});pfe(u,s);const c=function(f){const h=f.querySelectorAll(".ab-feed");let g=null;for(let v=0;v<h.length;v++)h[v].parentNode===f&&(g=h[v]);g!=null?(bT(g),g.parentNode!=null&&g.parentNode.replaceChild(s,g)):f.appendChild(s),setTimeout(function(){s.className=s.className.replace("ab-hide","ab-show")},0),n&&s.focus(),$2(i,s),afe(i.cards,f)};var d;t!=null?c(t):window.onload=(d=window.onload,function(){typeof d=="function"&&d(new Event("oldLoad")),c(document.body)})}function vfe(t){if(!je.rr())return;const e=Ql.m(),n=e.qt(t);if(!e.Ct()){const r=je.rn();if(r){const i=r.on(()=>{e.bi(void 0,void 0,!0)});i&&e.Tt(i)}}return n}function mnt(t,e){je.rr()&&(document.querySelectorAll(".ab-feed").length>0?gfe():mfe(t,e))}const yfe={GOOGLE_TAG_MANAGER:"gg",MPARTICLE:"mp",SEGMENT:"sg",TEALIUM:"tl",MANUAL:"manu",NPM:"npm",CDN:"wcd",SHOPIFY:"shp"};function vnt(t){if(!je.rr())return;const e=je.g();if(e){if(!to(t))return we.error("Cannot set SDK metadata because metadata is not an array."),!1;for(const n of t)if(!Wh(yfe,n,"sdkMetadata contained an invalid value.","BrazeSdkMetadata"))return!1;return e.addSdkMetadata(t),!0}}function fV(t,e){if(!je.rr())return;if(t==null||t.length===0||t!=t)return void we.error("changeUser requires a non-empty userId.");if(jL(t)>Si.ur)return void we.error(`Rejected user id "${t}" because it is longer than ${Si.ur} bytes.`);if(e!=null&&!cc(e,"set signature for new user","signature"))return;const n=je.rn();n&&n.changeUser(t.toString(),je.ar(),e)}const ynt=Object.freeze(Object.defineProperty({__proto__:null,changeUser:fV},Symbol.toStringTag,{value:"Module"}));function bnt(){we.info("Destroying Braze instance"),je.destroy(!0)}function Snt(){const t=je.rn();t&&t.requestImmediateDataFlush();const e=new Cl.se(null,!0),n="This-cookie-will-expire-in-"+e.le();e.store(rt.me,n);const r=Ss.Ls.Fs;new Ss(r,we).setItem(r.Ms.pe,r.be,!0),we.info("disableSDK was called"),je.destroy(!1),je.fe(!0)}function Ent(){new Cl.se(null,!0).remove(rt.me);const t=Ss.Ls.Fs;new Ss(t,we).ge(t.Ms.pe,t.be),we.info("enableSDK was called"),je.destroy(!1),je.fe(!1)}function Tnt(t){if(!je.rr())return;const e=je.ue();if(!e)return;const n=e.ve().id;if(typeof t!="function")return n;we.warn("The callback for getDeviceId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getDeviceId()`)"),t(n)}function bfe(t,e){return je.initialize(t,e)}function Ant(){return!!new Cl.se(null,!0).gr(rt.me)}function wnt(){return je.nn()}function tC(t,e){if(!je.rr())return!1;if(t==null||t.length<=0)return we.error(`logCustomEvent requires a non-empty eventName, got "${t}". Ignoring event.`),!1;if(!fd(t,"log custom event","the event name"))return!1;const[n,r]=D2(e,mtt,"eventProperties",`log custom event "${t}"`,"event");
222if(!n)return!1;const i=je.v();if(i&&i.je(t))return we.info(`Custom Event "${t}" is blocklisted, ignoring.`),!1;const s=ka.ut(_r.CustomEvent,{n:t,p:r});if(s.tt){we.info(`Logged custom event "${t}".`);for(const a of s.$e)Ya.m().Ce(co.Ee,[t,e],a)}return s.tt}const Sfe=Object.freeze(Object.defineProperty({__proto__:null,logCustomEvent:tC},Symbol.toStringTag,{value:"Module"}));function Efe(t,e,n,r,i){if(!je.rr())return!1;if(n==null&&(n="USD"),r==null&&(r=1),t==null||t.length<=0)return we.error(`logPurchase requires a non-empty productId, got "${t}", ignoring.`),!1;if(!fd(t,"log purchase","the purchase name"))return!1;if(e==null||isNaN(parseFloat(e.toString())))return we.error(`logPurchase requires a numeric price, got ${e}, ignoring.`),!1;const s=parseFloat(e.toString()).toFixed(2);if(r==null||isNaN(parseInt(r.toString())))return we.error(`logPurchase requires an integer quantity, got ${r}, ignoring.`),!1;const a=parseInt(r.toString());if(a<1||a>FZ)return we.error(`logPurchase requires a quantity >1 and <${FZ}, got ${a}, ignoring.`),!1;if(n=n!=null?n.toUpperCase():n,["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTC","BTN","BWP","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMK","ZMW","ZWL"].indexOf(n)===-1)return we.error(`logPurchase requires a valid currencyCode, got ${n}, ignoring.`),!1;const[o,l]=D2(i,"logPurchase","purchaseProperties",`log purchase "${t}"`,"purchase");if(!o)return!1;const u=je.v();if(u&&u.Dr(t))return we.info(`Purchase "${t}" is blocklisted, ignoring.`),!1;const c=ka.ut(_r.Pr,{pid:t,c:n,p:s,q:a,pr:l});if(c.tt){we.info(`Logged ${a} purchase${a>1?"s":""} of "${t}" for ${n} ${s}.`);for(const d of c.$e)Ya.m().Ce(co.Rr,[t,i],d)}return c.tt}const _nt=Object.freeze(Object.defineProperty({__proto__:null,logPurchase:Efe},Symbol.toStringTag,{value:"Module"}));function Tfe(){if(!je.rr())return;const t=je.rn();if(!t)return;t.openSession();const e=Ss.Ls.Fs,n=new Ss(e,we);n.cr(e.Ms.jr,(r,i)=>{const s=i.lastClick,a=i.trackingString;we.info(`Firing push click trigger from ${a} push click at ${s}`);const o=t.lr(s,a),l=function(){Ya.m().Ce(co.hr,[a],o)};t.br(l,l),n.ge(e.Ms.jr,r)}),n.Ns(e.Ms.kr,function(r){t.vr(r)})}function Cnt(){je.rr()&&je.removeAllSubscriptions()}function hV(t){if(!je.rr())return;const e=je.rn();e&&e.requestImmediateDataFlush(t)}const xnt=Object.freeze(Object.defineProperty({__proto__:null,requestImmediateDataFlush:hV},Symbol.toStringTag,{value:"Module"}));function Int(t){we.setLogger(t)}function Ont(t){if(!je.rr()||t===""||!cc(t,"set signature","signature",!1))return!1;const e=je.Sr();return!!e&&(e.setSdkAuthenticationSignature(t),!0)}function Pnt(t){var e;if(je.rr())return(e=je.Sr())===null||e===void 0?void 0:e.subscribeToSdkAuthenticationFailures(t)}function Rnt(){we.toggleLogging()}function Lnt(){const t=je.j();if(t==null)return void we.warn(Ac);t.clearData();const e=Fu(Ss.Ls);for(let r=0;r<e.length;r++){const i=e[r],s=Ss.Ls[i];new Ss(s,we).clearData()}if(je.rr())for(const r of je.ar())r.clearData(!0);const n=je.g();n&&n.fo()}let Dnt=class extends yT{constructor(e,n){super(),this.C=e,this.Fi=n,this.cards=[],this.xi=null,this.C=e,this.Fi=n,this.Ts=new eo,je.F(this.Ts),this.Ds()}Ds(){let e=[];this.C&&(e=this.C.ft(rt.gt.qi)||[]);const n=[];for(let r=0;r<e.length;r++){const i=rfe(e[r]);i!=null&&n.push(i)}this.cards=n,this.C&&(this.xi=w0(this.C.ft(rt.gt.zi)))}Ui(e){const n=[];let r=null,i={};this.C&&(i=this.C.ft(rt.gt.Zt)||{});const s={};for(let a=0;a<e.length;a++){r=e[a];const o=cnt(r);if(o!=null){const l=o.id;l&&i[l]&&(o.viewed=!0,s[l]=!0),n.push(o)}}this.cards=n,this.Ws(),this.xi=new Date,this.C&&(this.C.Bt(rt.gt.Zt,s),this.C.Bt(rt.gt.zi,this.xi))}Ws(){var e;const n=[];for(let r=0;r<this.cards.length;r++)n.push(this.cards[r].bt());(e=this.C)===null||e===void 0||e.Bt(rt.gt.qi,n)}U(e){e!=null&&e.feed&&(this.Ds(),this.Ui(e.feed),this.Ts.X(new C0(this.cards.slice(),this.xi)))}ki(){this.Ds();const e=[],n=new Date;for(let r=0;r<this.cards.length;r++){const i=this.cards[r].expiresAt;let s=!0;i!=null&&(s=i>=n),s&&e.push(this.cards[r])}return new C0(e,this.xi)}bi(){this.Fi&&this.Fi.requestFeedRefresh()}qt(e){return this.Ts.Dt(e)}clearData(e){e==null&&(e=!1),this.cards=[],this.xi=null,e&&this.C&&(this.C.Ut(rt.gt.qi),this.C.Ut(rt.gt.zi)),this.Ts.X(new C0(this.cards.slice(),this.xi))}};const Pu={l:!1,provider:null,m:()=>(Pu.p(),Pu.provider||(Pu.provider=new Dnt(je.j(),je.rn()),je._(Pu.provider)),Pu.provider),p:()=>{Pu.l||(je.h(Pu),Pu.l=!0)},destroy:()=>{Pu.provider=null,Pu.l=!1}};function Afe(){if(je.rr())return Pu.m().bi()}class C0 extends _0{constructor(e,n){super(e,n)}logCardImpressions(e){F2(e,!1)}logCardClick(e){return M2(e,!1)}sr(){Afe()}nr(){return!1}}function knt(){if(je.rr())return Pu.m().ki()}function wfe(){if(!je.rr())return;const t=document.querySelectorAll(".ab-feed");for(let e=0;e<t.length;e++)bT(t[e])}function _fe(){var t;if(je.rr())return(t=je.g())===null||t===void 0?void 0:t.zr(dtt.Fr).tt}function pV(t,e,n){if(!je.rr())return;Gde();const r=(d,f)=>{if(f==null)return d;const h=[];for(let v=0;v<f.length;v++)h.push(f[v].toLowerCase());const g=[];for(let v=0;v<d.length;v++){const b=[],S=d[v].categories||[];for(let A=0;A<S.length;A++)b.push(S[A].toLowerCase());ftt(b,h).length>0&&g.push(d[v])}return g},i=je.ee(ur.tn)||je.ee(ur.en)||!1;let s=!1;t==null&&(t=document.body,s=!0);let a,o=!1;e==null?(a=Pu.m().ki(),JL(a,r(a.cards,n),a.lastUpdated,null,i),o=!0):a=new C0(r(e,n),new Date);const l=hfe(a,i,s);if(o){(a.lastUpdated==null||new Date().valueOf()-a.lastUpdated.valueOf()>C0.dr)&&(we.info(`Cached feed was older than max TTL of ${C0.dr} ms, requesting an update from the server.`),dV(a,l));const d=new Date().valueOf(),f=xfe(function(h){const g=l.querySelectorAll(".ab-refresh-button")[0];if(g!=null){let v=500;v-=new Date().valueOf()-d;const b=l.getAttribute(dfe);if(b){const S=parseInt(b);isNaN(S)||(v-=new Date().valueOf()-S)}setTimeout(function(){g.className=g.className.replace(/fa-spin/g,"")},Math.max(v,0))}JL(a,r(h.cards,n),h.lastUpdated,l,i)});pfe(f,l)}const u=d=>{const f=d.querySelectorAll(".ab-feed");let h=null;for(let g=0;g<f.length;g++)f[g].parentNode===d&&(h=f[g]);h!=null?(bT(h),h.parentNode&&h.parentNode.replaceChild(l,h)):d.appendChild(l),setTimeout(function(){l.className=l.className.replace("ab-hide","ab-show")},0),s&&l.focus(),_fe(),$2(a,l),a&&afe(a.cards,d)};var c;t!=null?u(t):window.onload=(c=window.onload,function(){typeof c=="function"&&c(new Event("oldLoad")),u(document.body)})}const Cfe=Object.freeze(Object.defineProperty({__proto__:null,showFeed:pV},Symbol.toStringTag,{value:"Module"}));function xfe(t){if(je.rr())return Pu.m().qt(t)}function Nnt(t,e,n){je.rr()&&(document.querySelectorAll(".ab-feed").length>0?wfe():pV(t,e,n))}function Mnt(){if(je.rr())return sa.isPushBlocked()}function Fnt(){if(je.rr())return sa.isPushPermissionGranted()}function $nt(){if(je.rr())return sa.isPushSupported()}class nC{constructor(e,n,r,i,s,a,o,l,u,c,d){this.un=e,this.an=n,this.hn=r,this.cn=s,this.fn=a,this.ln=o,this.B=l,this.dn=u,this.pn=c,this.C=d,this.un=e,this.an=n,this.hn=r,this.bn=i+"/safari/"+n,this.cn=s||"/service-worker.js",this.ln=o,this.B=l,this.dn=u||!1,this.pn=c||!1,this.C=d,this.yn=sa.mn(),this.gn=sa.vn()}wn(){return this.pn}kn(e,n,r,i,s){e.unsubscribe().then(a=>{a?this.Pn(n,r,i,s):(we.error("Failed to unsubscribe device from push."),typeof s=="function"&&s(!1))}).catch(a=>{we.error("Push unsubscription error: "+a),typeof s=="function"&&s(!1)})}Dn(e,n,r){var i;const s=(c=>{if(typeof c=="string")return c;if(c.endpoint.indexOf("https://android.googleapis.com/gcm/send")!==0)return c.endpoint;let d=c.endpoint;const f=c;return f.Sn&&c.endpoint.indexOf(f.Sn)===-1&&(d=c.endpoint+"/"+f.Sn),d})(e);let a=null,o=null;const l=e;if(l.getKey!=null)try{const c=Array.from(new Uint8Array(l.getKey("p256dh"))),d=Array.from(new Uint8Array(l.getKey("auth")));a=btoa(String.fromCharCode.apply(null,c)),o=btoa(String.fromCharCode.apply(null,d))}catch(c){we.error(Of(c))}const u=(c=>{let d;return c.options&&(d=c.options.applicationServerKey)&&d.byteLength&&d.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(d)))).replace(/\+/g,"-").replace(/\//g,"_"):null})(l);(i=this.un)===null||i===void 0||i.An(s,n,a,o,u),s&&typeof r=="function"&&r(s,a,o)}jn(){var e;(e=this.un)===null||e===void 0||e.xn(!0)}Nn(e,n){var r;(r=this.un)===null||r===void 0||r.xn(!1),we.info(e),typeof n=="function"&&n(!1)}Un(e,n,r,i){var s;if(n.permission==="default")try{window.safari.pushNotification.requestPermission(this.bn,e,{api_key:this.an,device_id:((s=this.hn)===null||s===void 0?void 0:s.ve().id)||""},a=>{a.permission==="granted"&&this.un&&this.un.setPushNotificationSubscriptionType(Si.NotificationSubscriptionTypes.OPTED_IN),this.Un(e,a,r,i)})}catch(a){this.Nn("Could not request permission for push: "+a,i)}else n.permission==="denied"?this.Nn("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",i):n.permission==="granted"&&(we.info("Device successfully subscribed to push."),this.Dn(n.deviceToken,new Date,r))}requestPermission(e,n,r){const i=a=>{switch(a){case"granted":return void(typeof e=="function"&&e());case"default":return void(typeof n=="function"&&n());case"denied":return void(typeof r=="function"&&r());default:we.error("Received unexpected permission result "+a)}};let s=!1;if(window.Notification.permission!=="default")i(Notification.permission);else{const a=window.Notification.requestPermission(o=>{s&&i(o)});a?a.then(o=>{i(o)}):s=!0}}Pn(e,n,r,i){const s={userVisibleOnly:!0};n!=null&&(s.applicationServerKey=n),e.pushManager.subscribe(s).then(a=>{we.info("Device successfully subscribed to push."),this.Dn(a,new Date,r)}
222).catch(a=>{sa.isPushBlocked()?(we.info("Permission for push notifications was denied."),typeof i=="function"&&i(!1)):(we.error("Push subscription failed: "+a),typeof i=="function"&&i(!0))})}Wn(){if(this.dn)return navigator.serviceWorker.getRegistration(this.cn);const e=this.fn?{scope:this.fn}:void 0;return navigator.serviceWorker.register(this.cn,e).then(()=>navigator.serviceWorker.ready.then(n=>(n&&typeof n.update=="function"&&n.update().catch(r=>{we.info("ServiceWorker update failed: "+r)}),n)))}_n(e){this.dn||(e.unregister(),we.info("Service worker successfully unregistered."))}subscribe(e,n){if(!sa.isPushSupported())return we.info(nC.Tn),void(typeof n=="function"&&n(!1));if(this.yn){if(!this.dn&&window.location!=null){let o=this.cn;o.indexOf(window.location.host)===-1&&(o=window.location.host+o),o.indexOf(window.location.protocol)===-1&&(o=window.location.protocol+"//"+o)}if(sa.isPushBlocked())return void this.Nn("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",n);if(this.B&&!this.B.In()&&this.B.Et()===0)return we.info("Waiting for VAPID key from server config before subscribing to push."),void this.B.Vn(()=>{this.subscribe(e,n)});const r=()=>{we.info("Permission for push notifications was denied."),typeof n=="function"&&n(!1)},i=()=>{let o="Permission for push notifications was ignored.";sa.isPushBlocked()&&(o+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),we.info(o),typeof n=="function"&&n(!0)},s=sa.isPushPermissionGranted(),a=()=>{!s&&this.un&&this.un.setPushNotificationSubscriptionType(Si.NotificationSubscriptionTypes.OPTED_IN),this.Wn().then(o=>{if(o==null)return we.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerPush."),void(typeof n=="function"&&n(!0));o.pushManager.getSubscription().then(l=>{var u;let c=null;if(((u=this.B)===null||u===void 0?void 0:u.In())!=null&&(c=ctt.qn(this.B.In())),l){let d,f=null,h=null;if(this.C&&(d=this.C.ft(rt.gt.zn)),d&&!to(d)){let g;try{g=N2.Rn(d).En}catch{g=null}g==null||isNaN(g.getTime())||g.getTime()===0||(f=g,h=new Date(f),h.setMonth(f.getMonth()+6))}c!=null&&l.options&&l.options.applicationServerKey&&l.options.applicationServerKey.byteLength&&l.options.applicationServerKey.byteLength>0&&!Z0(c,new Uint8Array(l.options.applicationServerKey))?(l.options.applicationServerKey.byteLength>12?we.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):we.info("Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription."),this.kn(l,o,c,e,n)):l.expirationTime&&new Date(l.expirationTime).valueOf()<=new Date().valueOf()?(we.info("Push subscription is expired, creating new subscription."),this.kn(l,o,c,e,n)):d&&to(d)?this.kn(l,o,c,e,n):h==null?(we.info("No push subscription creation date found, creating new subscription."),this.kn(l,o,c,e,n)):h.valueOf()<=new Date().valueOf()?(we.info("Push subscription older than 6 months, creating new subscription."),this.kn(l,o,c,e,n)):(we.info("Device already subscribed to push, sending existing subscription to backend."),this.Dn(l,f,e))}else this.Pn(o,c,e,n)}).catch(l=>{we.error("Error checking current push subscriptions: "+l)})}).catch(o=>{we.error("ServiceWorker registration failed: "+o)})};this.requestPermission(a,i,r)}else if(this.gn){if(this.ln==null||this.ln==="")return we.error("You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari"),void(typeof n=="function"&&n(!0));const r=window.safari.pushNotification.permission(this.ln);this.Un(this.ln,r,e,n)}}unsubscribe(e,n){if(!sa.isPushSupported())return we.info(nC.Tn),void(typeof n=="function"&&n());this.yn?navigator.serviceWorker.getRegistration(this.cn).then(r=>{r?r.pushManager.getSubscription().then(i=>{i?(this.jn(),i.unsubscribe().then(s=>{s?(we.info("Device successfully unsubscribed from push."),typeof e=="function"&&e()):(we.error("Failed to unsubscribe device from push."),typeof n=="function"&&n()),this._n(r)}).catch(s=>{we.error("Push unsubscription error: "+s),typeof n=="function"&&n()})):(we.info("Device already unsubscribed from push."),typeof e=="function"&&e())}).catch(i=>{we.error("Error unsubscribing from push: "+i),typeof n=="function"&&n()}):(we.info("Device already unsubscribed from push."),typeof e=="function"&&e())}):this.gn&&(this.jn(),we.info("Device unsubscribed from push."),typeof e=="function"&&e())}}nC.Tn="Push notifications are not supported in this browser.";const ld={l:!1,aa:null,ea:()=>(ld.p(),ld.aa||(ld.aa=new nC(je.mr(),je.Ma(),je.ue(),je.Z(),je.ee(ur._a),je.ee(ur.Aa),je.ee(ur.Ba),je.v(),je.ee(ur.Ca),je.ee(ur.Da),je.j())),ld.aa),p:()=>{ld.l||(je.h(ld),ld.l=!0)},destroy:()=>{ld.aa=null,ld.l=!1}},Bnt=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"}));function Ife(t,e){if(je.rr())return ld.ea().subscribe((n,r,i)=>{const s=je.rn();s&&s.requestImmediateDataFlush(),typeof t=="function"&&t(n,r,i)},e)}const Ofe=Object.freeze(Object.defineProperty({__proto__:null,requestPushPermission:Ife},Symbol.toStringTag,{value:"Module"}));function Pfe(t,e){if(je.rr())return ld.ea().unsubscribe(t,e)}const Unt=Object.freeze(Object.defineProperty({__proto__:null,unregisterPush:Pfe},Symbol.toStringTag,{value:"Module"}));class Ea{constructor(e,n=!1,r={},i){this.id=e,this.enabled=n,this.properties=r,this.trackingString=i,this.id=e,this.enabled=n,this.properties=r,this.trackingString=i}he(e,n,r){const i=this.properties[e];return i==null?(this.ye(e),null):n(i)?i.value:(this.Pe(r),null)}getStringProperty(e){return this.he(e,this.Ie,"string")}getNumberProperty(e){return this.he(e,this.Te,"number")}getBooleanProperty(e){return this.he(e,this.Ne,"boolean")}getImageProperty(e){return this.he(e,this.Re,"image")}getJsonProperty(e){return this.he(e,this.Se,"jsonobject")}getTimestampProperty(e){return this.he(e,this.Ae,"datetime")}bt(){const e={};return e[Ea.es.ds]=this.id,e[Ea.es.Fe]=this.enabled,e[Ea.es.we]=this.properties,e[Ea.es.xe]=this.trackingString,e}Pe(e){we.info(`Property is not of type ${e}.`)}ye(e){we.info(`${e} not found in feature flag properties.`)}Ie(e){return e.type==="string"&&typeof e.value=="string"}Te(e){return e.type==="number"&&typeof e.value=="number"}Ne(e){return e.type==="boolean"&&typeof e.value=="boolean"}Re(e){return e.type==="image"&&typeof e.value=="string"}Se(e){return e.type==="jsonobject"&&typeof e.value=="object"&&e.value.constructor==Object}Ae(e){return e.type==="datetime"&&typeof e.value=="number"}}Ea.es={ds:"id",Fe:"e",we:"pr",xe:"fts"},Ea.ui={ds:"id",Fe:"enabled",we:"properties",xe:"fts"};function Vnt(t){if(t[Ea.ui.ds]&&typeof t[Ea.ui.Fe]=="boolean")return new Ea(t[Ea.ui.ds],t[Ea.ui.Fe],t[Ea.ui.we],t[Ea.ui.xe]);we.info(`Unable to create feature flag from ${JSON.stringify(t,null,2)}`)}function Hnt(t){if(t[Ea.es.ds]&&typeof t[Ea.es.Fe]=="boolean")return new Ea(t[Ea.es.ds],t[Ea.es.Fe],t[Ea.es.we],t[Ea.es.xe]);
222we.info(`Unable to deserialize feature flag from ${JSON.stringify(t,null,2)}`)}class jnt extends yT{constructor(e,n,r,i){super(),this.B=e,this.S=n,this.C=r,this.T=i,this.De=[],this.qe=0,this.B=e,this.S=n,this.C=r,this.T=i,this.ze=null,this.Ue=new eo,this.R=10,this.I=null,this.q=null,je.F(this.Ue)}U(e){var n;if(!((n=this.B)===null||n===void 0)&&n.ke()&&e!=null&&e.feature_flags){this.De=[];for(const r of e.feature_flags){const i=Vnt(r);i&&this.De.push(i)}this.qe=new Date().getTime(),this.Be(),this.Ue.X(this.De)}}Me(){let e={};this.C&&(e=this.C.ft(rt.gt.Xe));const n={};for(const r in e){const i=Hnt(e[r]);i&&(n[i.id]=i)}return n}_e(){var e;return((e=this.C)===null||e===void 0?void 0:e.ft(rt.gt.Ge))||{}}He(e){this.C&&this.C.Bt(rt.gt.Ge,e)}qt(e){return this.Ue.Dt(e)}refreshFeatureFlags(e,n,r=!1,i=!0){const s=()=>{typeof n=="function"&&n(),this.Ue.X(this.De)};if(!this.Je(r))return!this.ze&&this.B&&(this.ze=this.B.Ke(()=>{this.refreshFeatureFlags(e,n)})),void s();const a=this.S;if(!a)return void s();i&&this.G();const o=a.H({},!0),l=a.J(o,Nn.O.Le);let u=!1;a.V(o,(c=-1)=>{const d=this.S;if(!d)return void s();const f=new Date().valueOf();Nn.W(this.C,Nn.O.Le,f),c!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",c.toString()]),yx.Y({url:`${d.Z()}/feature_flags/sync`,headers:l,data:o,tt:h=>{if(!d.st(o,h,l))return u=!0,void s();d.it(),this.U(h),u=!1,typeof e=="function"&&e()},error:h=>{d.et(h,"retrieving feature flags"),u=!0,s()},nt:(h,g)=>{let v;if(u){let b=this.I;(b==null||b<1e3*this.R)&&(b=1e3*this.R),v=Math.min(3e5,bx(1e3*this.R,3*b))}d.rt(g,()=>{this.refreshFeatureFlags(e,n,r,!0)},Nn.O.Le,b=>this.ot(b),()=>this.G(),v)}})},Nn.O.Le,n)}G(){this.q!=null&&(clearTimeout(this.q),this.q=null)}ot(e){this.G(),this.q=e}Je(e){if(!this.B)return!1;if(!e){const n=this.B.Oe();if(n==null)return!1;let r=!1;if(!isNaN(n)){if(n===-1)return we.info("Feature flag refreshes not allowed"),!1;r=new Date().getTime()>=(this.qe||0)+1e3*n}if(!r)return we.info(`Feature flag refreshes were rate limited to ${n} seconds`),!1}return this.B.ke()}Qe(){var e;return((e=this.C)===null||e===void 0?void 0:e.ft(rt.gt.Ve))||null}We(){var e,n;(e=this.C)===null||e===void 0||e.Bt(rt.gt.Ve,(n=this.T)===null||n===void 0?void 0:n.St())}Ye(){var e;const n=(e=this.T)===null||e===void 0?void 0:e.St(),r=this.Qe();return r==null||n===r}Be(){if(!this.C)return;const e={};for(const n of this.De){const r=n.bt();e[n.id]=r}this.C.Bt(rt.gt.Xe,e),this.C.Bt(rt.gt.Ze,this.qe),this.We()}changeUser(){this.G()}clearData(){this.G()}}const Xo={l:!1,provider:null,m:()=>(Xo.p(),Xo.provider||(Xo.provider=new jnt(je.v(),je.g(),je.j(),je.P()),je._(Xo.provider)),Xo.provider),p:()=>{Xo.l||(je.h(Xo),Xo.l=!0)},destroy:()=>{Xo.provider=null,Xo.l=!1}};function Rfe(t,e,n=!1){if(je.rr())return Xo.m().refreshFeatureFlags(t,e,n)}function Lfe(t,e){Rfe(t,e)}const VZ=Object.freeze(Object.defineProperty({__proto__:null,default:Rfe,refreshFeatureFlags:Lfe},Symbol.toStringTag,{value:"Module"}));function znt(t){if(!je.rr())return;const e=je.v();if(e&&!e.ke())return null;const n=Xo.m().Me();return n[t]?n[t]:null}function Dfe(){if(!je.rr())return;const t=[],e=je.v();if(e&&!e.ke())return t;const n=Xo.m().Me();for(const r in n)t.push(n[r]);return t}function Gnt(t){if(!je.rr())return;const e=Xo.m();if(e.Ye()){const n=Dfe();n&&typeof t=="function"&&t(n)}return e.qt(t)}function Wnt(t){if(!je.rr())return;if(!t)return!1;const e="Not logging a feature flag impression. The feature flag was not part of any matching experiment.",n=Xo.m().Me();if(!n[t])return we.info(e),!1;const r=n[t].trackingString;if(!r)return we.info(e),!1;const i=Xo.m()._e();if(i[r])return we.info("Not logging another feature flag impression. This ID was already logged this session."),!1;i[r]=!0,Xo.m().He(i);const s={fid:t,fts:r};return ka.ut(_r.yr,s).tt}class B2{constructor(e,n,r,i=!1,s=!1,a=-1){this.id=e,this.placementId=n,this.html=r,this.At=i,this.isControl=s,this.Gt=a,this.id=e,this.placementId=n,this.html=r,this.At=i,this.isControl=s,this.Gt=a,this.Ht=!1}Jt(){return this.isControl}bt(){return{id:this.id,o:this.placementId,html:this.html,t:this.At,i:this.isControl,u:this.Gt}}}function qnt(t){return new B2(t.id,t.o,t.html,t.t,t.i,t.u)}function Knt(t){return new B2(t.id,t.placement_id,t.html,t.is_test_send,t.is_control,t.expires_at)}let Ynt=class extends yT{constructor(e,n,r,i){super(),this.B=e,this.S=n,this.C=r,this.T=i,this.banners={},this.B=e,this.S=n,this.C=r,this.T=i,this.R=10,this.I=null,this.q=null,this.D=new eo,je.F(this.D),this.N=null,this.k=null}U(e){if(this.L()&&e!=null&&e.banners){this.banners={};const n=e.banners;for(const r in n){const i=n[r];let s=null;i!=null&&i.banner!=null&&(s=Knt(i.banner)),s&&(this.banners[r]=s)}this.M(),this.D.X(this.banners)}}$(e,n,r,i=!0){var s;const a=()=>{typeof r=="function"&&r()};if(!this.L())return void((s=this.B)===null||s===void 0||s.A(()=>{this.$(e,n,r)}));const o=this.S;if(!o)return void a();i&&this.G();const l=o.H({},!0),u=[];for(const f of e)u.push({id:f});l.placements=u;const c=o.J(l,Nn.O.K);let d=!1;o.V(l,(f=-1)=>{const h=this.S;if(!h)return void a();const g=new Date().valueOf();Nn.W(this.C,Nn.O.K,g),f!==-1&&c.push(["X-Braze-Req-Tokens-Remaining",f.toString()]),yx.Y({url:`${h.Z()}/banners/sync`,headers:c,data:l,tt:v=>{if(!h.st(l,v,c))return d=!0,void a();h.it(),this.U(v),d=!1,typeof n=="function"&&n()},error:v=>{h.et(v,"retrieving banners"),d=!0,a()},nt:(v,b)=>{let S;if(this.k=e,d){let A=this.I;(A==null||A<1e3*this.R)&&(A=1e3*this.R),S=Math.min(3e5,bx(1e3*this.R,3*A))}h.rt(b,()=>{this.$(e,n,r,!1)},Nn.O.K,A=>
222this.ot(A),()=>this.G(),S)}})},Nn.O.K,r)}ht(){return this.k}lt(e,n){const r={id:e.id};return n&&(r.bid=n),ka.ut(_r.ct,r).tt}G(){this.q!=null&&(clearTimeout(this.q),this.q=null)}ot(e){this.G(),this.q=e}dt(){let e={};this.C&&(e=this.C.ft(rt.gt.vt));const n={};for(const r in e){let i=null;e[r]!=null&&(i=qnt(e[r])),i&&(n[i.placementId]=i)}return n}M(){var e;if(!this.C)return;const n={};for(const r in this.banners){const i=((e=this.banners[r])===null||e===void 0?void 0:e.bt())||null;n[r]=i}this.C.Bt(rt.gt.vt,n),this.jt()}jt(){var e,n;(e=this.C)===null||e===void 0||e.Bt(rt.gt.yt,(n=this.T)===null||n===void 0?void 0:n.St())}wt(){var e;return((e=this.C)===null||e===void 0?void 0:e.ft(rt.gt.yt))||null}Ct(){return this.N}Tt(e){this.N=e}Rt(){var e;const n=(e=this.T)===null||e===void 0?void 0:e.St(),r=this.wt();return r!=null&&n===r}It(){var e;const n=(e=this.T)===null||e===void 0?void 0:e.St(),r=this.wt();return r==null||n===r}qt(e){return this.D.Dt(e)}Ft(){var e;return((e=this.C)===null||e===void 0?void 0:e.ft(rt.gt.Nt))||{}}kt(e){this.C&&this.C.Bt(rt.gt.Nt,e)}changeUser(){this.xt(),this.G()}clearData(){this.G()}L(){return!!this.B&&(!!this.B.zt()||(this.B.Et()!==0&&this.xt(),!1))}xt(){this.banners={},this.C&&(this.C.Ut(rt.gt.vt),this.C.Ut(rt.gt.Nt)),this.D.X({})}};const Ro={l:!1,provider:null,m:()=>(Ro.p(),Ro.provider||(Ro.provider=new Ynt(je.v(),je.g(),je.j(),je.P()),je._(Ro.provider)),Ro.provider),p:()=>{Ro.l||(je.h(Ro),Ro.l=!0)},destroy:()=>{Ro.provider=null,Ro.l=!1}};function kfe(t,e){const n=t[e];if(!n)return null;const r=n.Gt,i=new Date().valueOf();return r!==-1&&1e3*r<i?(we.info(`Banner with ID: ${n.id} and placement ID: ${e} has expired.`),null):n}function Znt(t){var e;if(!je.rr())return;((e=je.v())===null||e===void 0?void 0:e.zt())===!1&&we.error(tV);const n=Ro.m();return n.L()?kfe(n.dt(),t):null}function Qnt(t,e){if(!je.rr())return;if(!(t instanceof B2))return we.error("Banner argument to logBannerClick must be an Banner object."),!1;const n=Ro.m(),r=n.dt();return Fu(r).length===0?(we.info("Not logging banner click. No banners exist."),!1):r[t.placementId]?n.lt(t,e):(we.info(`Not logging banner click for ID ${t.placementId}. The placement ID did not correspond to any banner.`),!1)}const gV="data-ab-banner-placement-id",Xnt="ab-html-banner",Jnt="ab-html-control-banner";function ert(t){const e=document.createElement("div");return e.id=t.id,e.className="ab-html-control-banner",e.setAttribute(gV,t.placementId),e}function HZ(t,e){if(t.Jt())return ert(t);const n=document.createElement("iframe");return n.id=t.id,e&&n.setAttribute("nonce",e),n.className="ab-html-banner",n.setAttribute(gV,t.placementId),n.setAttribute("title","Banner"),Qde(n,t.html,e),n.onload=()=>{const r=n.contentWindow,i=r.document.getElementsByTagName("title");i&&i.length>0&&n.setAttribute("title",i[0].textContent||"");const s=Object.assign(Object.assign({},Zde(n,()=>{Cr(()=>Promise.resolve().then(()=>Cfe),void 0).then(a=>{je.nn()?a.showFeed():we.error(Ac)})})),{logClick:function(){Qnt(t,...arguments)},closeMessage:function(){},setBannerHeight:a=>{isNaN(a)||!isFinite(a)||a<0?we.warn(`Invalid banner height: ${a}`):n.style.height=`${a}px`}});r.brazeBridge=s,r.appboyBridge=s,r.dispatchEvent(new CustomEvent("ab.BridgeReady"))},n}function trt(t){const e=t.getAttribute(L2);e!=null&&cV(e),t&&t.parentNode&&t.parentNode.removeChild(t)}function Nfe(t){if(!je.rr())return;if(!t||t.length<=0)return!1;const e=Ro.m(),n=e.dt();if(Fu(n).length===0)return we.info("Not logging banners impression. No banners exist."),!1;const r=e.Ft(),i=[];for(const a of t){const o=n[a];o?r[o.placementId]?we.info(`Not logging banners impression for ID ${a}. This ID was already logged this session.`):(r[o.placementId]=!0,i.push(o.id)):we.info(`Not logging banners impression for ID ${a}. The placement ID did not correspond to any banner.`)}if(i.length===0)return!1;e.kt(r);const s={ids:i};return ka.ut(_r.ro,s).tt}function jZ(){const t=document.querySelectorAll(`.${Xnt}, .${Jnt}`),e=[];for(let n=0;n<t.length;n++){const r=t[n],i=r.getAttribute(gV);if(!i)continue;const s=gO.oo(r),a=gO.no(r);if(s&&a)continue;
222const o=$de(r),l=Bde(r);o&&!s&&lfe(r),l&&!a&&cfe(r),gO.oo(r)&&gO.no(r)&&e.push(i)}e.length>0&&Nfe(e)}function Mfe(){if(!je.rr())return;const t={},e=je.v();if((e==null?void 0:e.zt())===!1&&we.error(tV),!(e!=null&&e.zt()))return t;const n=Ro.m().dt();for(const r in n)t[r]=kfe(n,r);return t}function Ffe(t){var e;if(!je.rr())return;const n=Ro.m();if(n.It()){const i=Mfe();i&&typeof t=="function"&&t(i)}const r=n.qt(t);if(!n.Ct()){const i=(e=je.rn())===null||e===void 0?void 0:e.on(()=>{const s=n.ht();s&&s.length>0&&n.$(s)});i&&n.Tt(i)}return r}function nrt(t,e){if(!je.rr())return;if(!t)return void we.error("Not inserting banner: banner was not provided.");if(!e)return void we.error("Not inserting banner: parentNode was not provided.");if(!je.ee(ur.re))return void we.error("Banners are disabled. Use the 'allowUserSuppliedJavascript' option for braze.initialize to enable these messages.");ztt();const n=HZ(t,je.ee(ur.er)),r=Ffe(i=>{const s=i[t.placementId];s?e.replaceChildren(HZ(s,je.ee(ur.er))):trt(n)});r&&n.setAttribute(L2,r),e.replaceChildren(n),L1(window,"scroll",jZ),jZ()}function $fe(t,e,n){if(!je.rr())return void we.warn(Ac);const r=je.v();if(!r)return;if(!to(t)||t.length===0)return void we.warn("placementIds should be a non-empty array.");if(!je.ee(ur.re))return void we.error("Banners are disabled. Use the 'allowUserSuppliedJavascript' option for braze.initialize to enable these messages.");const i=Ro.m();if(Ro.m().Rt())return void we.warn("Banners can be refreshed only once per session per user.");if(r.zt()===!1&&we.error(tV),!i.L())return void r.A(()=>{$fe(t,e,n)});const s=r.ne();t.length>s&&(we.warn(`Number of placement IDs requested exceeds the max allowed. Trimming placementIds array from length ${t.length} to ${s} (max allowed).`),t=t.slice(0,s)),(t=t.filter(a=>!!Rtt(a)||(we.warn(`Placement ID should be a valid utf8 string with no whitespaces, filtering out: ${a}`),!1))).length!==0&&(we.info(`Requesting banners for placement IDs: ${JSON.stringify(t)}`),Ro.m().$(t,e,n))}const Bfe=Object.freeze(Object.defineProperty({__proto__:null,Banner:B2,BrazeSdkMetadata:yfe,CaptionedImage:Ode,Card:_t,ClassicCard:Pde,ContentCards:dg,ControlCard:vx,ControlMessage:Ff,DeviceProperties:bh,FeatureFlag:Ea,Feed:C0,FullScreenMessage:Vf,HtmlMessage:Nc,ImageOnly:Ide,InAppMessage:Re,InAppMessageButton:Rg,ModalMessage:ep,SlideUpMessage:Hf,User:Si,WindowUtils:X0,addSdkMetadata:vnt,automaticallyShowInAppMessages:tfe,changeUser:fV,deferInAppMessage:tnt,destroy:bnt,destroyFeed:wfe,disableSDK:Snt,enableSDK:Ent,getAllBanners:Mfe,getAllFeatureFlags:Dfe,getBanner:Znt,getCachedContentCards:fnt,getCachedFeed:knt,getDeferredInAppMessage:nnt,getDeviceId:Tnt,getFeatureFlag:znt,getUser:md,handleBrazeAction:Qtt,hideContentCards:gfe,initialize:bfe,insertBanner:nrt,isDisabled:Ant,isInitialized:wnt,isPushBlocked:Mnt,isPushPermissionGranted:Fnt,isPushSupported:$nt,logBannerImpressions:Nfe,logCardClick:M2,logCardDismissal:nfe,logCardImpressions:F2,logContentCardClick:unt,logContentCardImpressions:lnt,logCustomEvent:tC,logFeatureFlagImpression:Wnt,logFeedDisplayed:_fe,logInAppMessageButtonClick:Xde,logInAppMessageClick:Kde,logInAppMessageHtmlClick:XL,logInAppMessageImpression:QL,logPurchase:Efe,openSession:Tfe,refreshFeatureFlags:Lfe,removeAllSubscriptions:Cnt,removeSubscription:cV,requestBannersRefresh:$fe,requestContentCardsRefresh:ife,requestFeedRefresh:Afe,requestImmediateDataFlush:hV,requestPushPermission:Ife,setLogger:Int,setSdkAuthenticationSignature:Ont,showContentCards:mfe,showFeed:pV,showInAppMessage:Jde,subscribeToBannersUpdates:Ffe,subscribeToContentCardsUpdates:vfe,subscribeToFeatureFlagsUpdates:Gnt,subscribeToFeedUpdates:xfe,subscribeToInAppMessage:efe,subscribeToSdkAuthenticationFailures:Pnt,toggleContentCards:mnt,toggleFeed:Nnt,toggleLogging:Rnt,unregisterPush:Pfe,wipeData:Lnt},Symbol.toStringTag,{value:"Module"}));function Ufe(t,e,n,r){return!Mi.isPlainObject(t)||!Object.keys(t).length?e?(n[e]=t,n):t:(Mi.isNumber(r)&&r--,Object.keys(t).reduce((i,s)=>{const o=(e?e+".":"")+s,l=r===-1?{[o]:t[s]}:Ufe(t[s],o,n,r);return Object.assign(i,l)},{}))}function rrt(t,e){return Ufe(t,null,{},e)}const irt=(t,e)=>{const n=new Map;return e.forEach(r=>n.set(r.getId(),r)),t.map(r=>n.get(r)).filter(r=>!!r)},srt=(t,e)=>{const n=new Map;return e.forEach(r=>n.set(r.id,r)),t.map(r=>n.get(r)).filter(r=>!!r)},l4=mde();class art{constructor(e){et(this,"brazeInstance");this.brazeInstance=e,this.brazeInstance.refreshFeatureFlags()}async getAllFeatureFlags(){return this.brazeInstance.getAllFeatureFlags()}async getFeatureFlag(e){return this.brazeInstance.getFeatureFlag(e)}}function ort(t){return t.reduce((e,n)=>{var r,i;return n.enabled?{...e,[n.id]:!!((i=(r=n.properties)==null?void 0:r.active)!=null&&i.value)}:e},{})}let MP;const lrt=t=>{MP?console.warn("BrazeFeatureFlagsService is already initialized."):(MP=new art(t),MP.getAllFeatureFlags().then(e=>l4.resolve(ort(e||[]))).catch(()=>l4.reject()))},Vfe=()=>l4.promise.then(t=>t),urt=(t,e,n)=>{e.forEach(r=>{const i=rrt(r);t(r.type,{...i,...n})})},Hfe=Yn({key:"BrazeFeatureFlags",default:{},effects:[({setSelf:t})=>
222{Vfe().then(e=>t(e))}]});var _n=(t=>(t.AccountReactivateRequest="accountReactivateRequest",t.AllEpisodes="allEpisodes",t.AndroidAutoNowPlaying="androidAutoNowPlaying",t.AndroidAutoChapterList="androidAutoChapterList",t.AndroidAutoHomePage="androidAutoHomePage",t.CarPlayLoggedOut="carPlayLoggedOut",t.CarPlayInternetConnection="carPlayInternetConnection",t.CarPlayRecentsList="carPlayRecentsList",t.CarPlayHomePage="carPlayHomePage",t.CarPlayChapterList="carPlayChapterList",t.CarPlayNestedList="carPlayNestedList",t.CarPlayNowPlaying="carPlayNowPlaying",t.Contact="contactAudacy",t.SettingsDeleteConfirmation="settingsDeleteConfirmation",t.DeveloperScreen="developerScreen",t.Landing="landing",t.Migration="migration",t.MyAudioPodcastsAndShows="myAudioPodcastsAndShows",t.MyAudioFollowed="myAudioFollowed",t.MyAudioQueue="myAudioQueue",t.MyAudioRecent="myAudioRecent",t.MyAudioStations="myAudioStations",t.MyAudioTopics="myAudioTopics",t.MyAudioDownloads="myAudioDownloads",t.OnboardingStations="onboardingStations",t.Player="player",t.PrivacyLegal="privacyLegal",t.PrivacyPolicy="legalPrivacyPolicy",t.ProfileAccount="profileAccount",t.ProfileContactSupport="profileContactSupport",t.ProfileDelete="profileDelete",t.ProfileLocation="profileLocation",t.ProfileNotification="profileNotification",t.ProfileOpenSource="profileOpenSource",t.ProfileOverview="profileOverview",t.ProfilePassword="profilePassword",t.ProfileSecurity="profileSecurity",t.Queue="queue",t.RegistrationAdditionalDetails="registrationAdditionalDetails",t.RegistrationName="registrationName",t.Schedule="schedule",t.SongHistory="songHistory",t.Search="search",t.Terms="legalTermsOfUse",t.TapToRecordScreen="tapToRecordScreen",t.TranscriptScreen="transcriptScreen",t.Playlist="playlist",t))(_n||{});const crt="180",rC={featureFlags:{broadcastChapters:!0,chapters:!0,downloadPodcasts:!1,follows:!0,queue:!0,recentHistory:!0,search:!0,settingsLinks:!1,share:!0,voicify:!1,tapToRecord:!0,sleepTimer:!0,verbosePlayerLogging:!1,videoPreRoll:!1,searchPlaylistsTab:!1,searchEpisodesTab:!1,searchTopicsTab:!1,meteredContent:!1,nativePlayerErrorHandlingPhaseTwoAndroid:!1,vodSpeedControls:!1,settingsOpenSource:!1,settingsLegal:!1,settingsContact:!1,settingsSecurity:!1,settingsPlayback:!1,settingsNotifications:!1,settingsLocation:!1,settingsAccount:!1,identityNotifications:!1,podcastTranscript:!1,useHem:!1,usePickupWhereYouLeftOff:!1,optimizedAdBreaks:!1,enableTraceSession:!1,enableSimulcastOverride:!1,curatorDefinedNavigation:!1,startOnSong:!1,enableConvivaMonitoring:!0,memoryDiagnostics:!1,useLoggerOverlay:!1},global:{[_n.AccountReactivateRequest]:"accountReactivateRequest",[_n.AndroidAutoChapterList]:"androidAutoChapterList",[_n.AndroidAutoNowPlaying]:"androidAutoNowPlaying",[_n.AndroidAutoHomePage]:"androidAutoHomePage",[_n.AllEpisodes]:"allEpisodes",[_n.CarPlayLoggedOut]:"carPlayLoggedOut",[_n.CarPlayRecentsList]:"carPlayRecentsList",[_n.CarPlayHomePage]:"carPlayHomePage",[_n.CarPlayChapterList]:"сarPlayChapterList",[_n.CarPlayNestedList]:"сarPlayNestedList",[_n.CarPlayNowPlaying]:"сarPlayNowPlaying",[_n.CarPlayInternetConnection]:"carPlayInternetConnection",[_n.Contact]:"contact",[_n.SettingsDeleteConfirmation]:"settingsDeleteConfirmation",[_n.DeveloperScreen]:"developerScreen",[_n.Landing]:"landing",[_n.Migration]:"migration",[_n.MyAudioFollowed]:"myAudioFollowed",[_n.MyAudioPodcastsAndShows]:"myAudioPodcastsAndShows",[_n.MyAudioQueue]:"myAudioQueue",[_n.MyAudioRecent]:"myAudioRecent",[_n.MyAudioStations]:"myAudioStations",[_n.MyAudioDownloads]:"myAudioDownloads",[_n.MyAudioTopics]:"myAudioTopics",[_n.OnboardingStations]:"onboardingStations",[_n.Player]:"player",[_n.PrivacyLegal]:"privacyLegal",[_n.PrivacyPolicy]:"legalPrivacyPolicy",[_n.ProfileAccount]:"profileAccount",[_n.ProfileContactSupport]:"profileContactSupport",[_n.ProfileDelete]:"profileDelete",[_n.ProfileLocation]:"profileLocation",[_n.ProfileNotification]:"profileNotification",[_n.ProfileOpenSource]:"profileOpenSource",[_n.ProfileOverview]:"profileOverview",[_n.ProfilePassword]:"profilePassword",[_n.ProfileSecurity]:"profileSecurity",[_n.Queue]:"queueOverlay",[_n.RegistrationAdditionalDetails]:"registrationAdditionalDetails",[_n.RegistrationName]:"registrationName",[_n.Schedule]:"schedule",[_n.SongHistory]:"songHistory",[_n.Search]:"search",[_n.TapToRecordScreen]:"tapToRecordScreen",[_n.TranscriptScreen]:"transcriptScreen",[_n.Terms]:"legalTermsOfUse",[_n.Playlist]:"playlist"},configuration:{adRefreshInterval:crt}},jfe=rC.featureFlags;oo.set(oo.defaultFlags,jfe);let gF=null;const drt=async()=>
222{if(gF)return gF;const t=await Uf().then(n=>n.getDataServices().getClientSettings()),e={featureFlags:{...jfe,...t.featureFlags},global:{...rC.global,...t.global},configuration:{...rC.configuration,...t.configuration}};return oo.set("remoteSettings",e.featureFlags),gF=e,e},zfe=ss({get:({get:t})=>t(Jce)?drt():rC,key:"ClientSettings"}),frt=(t,e)=>t[e],hrt=t=>frt(Ht(zfe).global,t),Gfe=Mv({key:"FeatureFlags",get:t=>({get:e})=>{const n=e(mV),r=e(Wfe).featureFlags,i=e(Hfe),s=i[t]!==void 0?i:r;return{...n[t]!==void 0?n:s,...{podcastTranscript:!1}}[t]}}),Eb=t=>Ht(Gfe(t)),mV=Yn({default:{},key:"FeatureFlagOverrides"}),Wfe=Yse(zfe),qfe=()=>{const t=rC.featureFlags,e=pb(Wfe),n=Ht(mV),r=Ht(Hfe),i=e.state==="hasValue"?e.contents.featureFlags:{};return{...t,...i,...r,...n,podcastTranscript:!1}},prt=(t,e,n)=>{var s,a;if(t!==Hi.Playing||!e)return!1;const r=(s=n==null?void 0:n.dataObject)==null?void 0:s.id,i=(a=n==null?void 0:n.episodeDataObject)==null?void 0:a.id;return!r&&!i?!1:e.some(o=>r===o||i===o)},Pr=qr.VisibleEnabled,Rr=qr.VisibleDisabled,Wa=qr.Hidden,fo=(t,e=!1)=>e?t===qr.VisibleEnabled:t===qr.VisibleEnabled||t===qr.VisibleDisabled,hS=t=>t===qr.VisibleDisabled,grt=t=>{const{chapterPositionType:e,contentType:n,fractionPositionType:r,isAd:i=!1,isLive:s=!1,playState:a,skipsRemaining:o,collectionPlaybackMode:l,isFirst:u,isLast:c,isStandaloneChapter:d,isAudioPreroll:f}=t,h=a===Hi.Playing,g=a===Hi.Paused,v=a===Hi.Ended,b=a===Hi.Loading,S=a===Hi.Error;if(n===void 0)return g?{...Qi,playButton:Pr}:Qi;const A=r===lg.Start?Rr:Pr,w=r===lg.End?Rr:Pr,x=()=>i||e===kh.StartAndEnd?Wa:e===kh.Start?Rr:Pr,P=()=>i||e===kh.StartAndEnd?Wa:e===kh.End||s?Rr:Pr,N=i||e===kh.StartAndEnd?Wa:Pr,k=u?qr.VisibleDisabled:qr.VisibleEnabled,U=c?qr.VisibleDisabled:qr.VisibleEnabled;if(l===tu.Playlist||l===tu.Queue){if(a===Hi.Playing)return{...Qi,prevTrackButton:k,nextTrackButton:U,ff15sButton:w,rw15sButton:A,playButton:qr.Hidden,pauseButton:qr.VisibleEnabled,scrubberIsUserControlled:!0};if(a===Hi.Paused)return{...Qi,prevTrackButton:k,nextTrackButton:U,ff15sButton:w,rw15sButton:A,playButton:qr.VisibleEnabled,pauseButton:qr.Hidden,scrubberIsUserControlled:!0};if(a===Hi.Loading)return{...Qi,prevTrackButton:qr.VisibleDisabled,nextTrackButton:qr.VisibleDisabled,ff15sButton:qr.VisibleDisabled,rw15sButton:qr.VisibleDisabled,playButton:qr.VisibleDisabled,pauseButton:qr.Hidden,scrubberIsUserControlled:!1}}switch(n){case ts.Podcast:if(h)return{...Qi,ff15sButton:r===lg.End?Rr:Pr,pauseButton:Pr,playButton:Rr,replayButton:Wa,rw15sButton:A,scrubberIsUserControlled:!0,scrubberIsDisabled:!1};if(g)return{...Qi,ff15sButton:r===lg.End?Rr:Pr,pauseButton:Rr,playButton:Pr,replayButton:Wa,rw15sButton:A,scrubberIsUserControlled:!0};if(b)return{...Qi,ff15sButton:Rr,pauseButton:Pr,playButton:Rr,replayButton:Wa,rw15sButton:Rr,scrubberIsUserControlled:!0,scrubberIsDisabled:!0};if(v)return{...Qi,ff15sButton:w,pauseButton:Rr,playButton:Wa,replayButton:Pr,rw15sButton:A,scrubberIsUserControlled:!0};if(S)return{...Qi,playButton:Rr};break;case ts.LiveStation:return h&&f?{...Qi,playButton:Rr,scrubberBarType:fc.Live,stopButton:Pr,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!1}:!h&&f?{...Qi,playButton:Pr,scrubberBarType:fc.Live,stopButton:Rr,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!1}:h?{...Qi,playButton:Rr,scrubberBarType:fc.Live,stopButton:Pr,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!0}:b?{...Qi,playButton:Rr,scrubberBarType:fc.Live,stopButton:Pr,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!0}:{...Qi,playButton:Pr,scrubberBarType:fc.Live,stopButton:Rr,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!0};case ts.ExclusiveStation:{const H=o??0,B=Jqe();return b&&B?{...Qi,pauseButton:Pr,skipButton:Wa,skipsRemaining:H,thumbsUpButton:Wa}:h&&B?{...Qi,pauseButton:Pr,playButton:Rr,skipButton:Wa,skipsRemaining:H,thumbsUpButton:Wa}:B?{...Qi,pauseButton:Rr,playButton:Pr,skipButton:Wa,skipsRemaining:H,thumbsUpButton:Wa}:b?{...Qi,pauseButton:Pr,skipButton:Rr,skipsRemaining:H,thumbsUpButton:Rr}:h&&i?{...Qi,pauseButton:Pr,playButton:Rr,skipButton:Rr,skipsRemaining:H,thumbsUpButton:Rr}:h?{...Qi,pauseButton:Pr,playButton:Rr,skipButton:i||H<=0?Rr:Pr,skipsRemaining:H,thumbsUpButton:Pr}:{...Qi,pauseButton:Rr,playButton:Pr,skipButton:i||H<=0?Rr:Pr,skipsRemaining:H,thumbsUpButton:Pr}}case ts.Rewind:{const H=s||i||d?Wa:Pr,B=d?fc.ElapsedTime:fc.WallClock;return h||g?{...Qi,ff15sButton:i?Rr:w,pauseButton:g?Wa:Pr,playButton:h?Wa:Pr,rw15sButton:i?Rr:A,scrubberBarType:B,scrubberIsUserControlled:!0,scrubberIsDisabled:i,shouldDisplayLiveIndicator:s,backToLiveButton:H,previousChapterButton:x(),nextChapterButton:P(),restartShowButton:N}:{...Qi,ff15sButton:Rr,pauseButton:Pr,playButton:Pr,rw15sButton:Rr,scrubberBarType:B,scrubberIsUserControlled:!0,scrubberIsDisabled:i,shouldDisplayLiveIndicator:s,backToLiveButton:H,previousChapterButton:x(),nextChapterButton:P(),restartShowButton:N}}case ts.RewindNoReplay:return h?{...Qi,playButton:Rr,scrubberBarType:fc.WallClock,stopButton:Pr,ff15sButton:Wa,rw15sButton:Wa,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!0,previousChapterButton:x(),nextChapterButton:P(),restartShowButton:N}:{...Qi,playButton:Pr,scrubberBarType:fc.WallClock,stopButton:Rr,ff15sButton:Wa,rw15sButton:Wa,scrubberIsDisabled:!0,shouldDisplayLiveIndicator:!0,previousChapterButton:x(),nextChapterButton:P(),restartShowButton:N};default:return Qi}return Qi},mrt=(t,e)=>{switch(e){case JA.BOTH:return{...t,nextTrackButton:Pr,prevTrackButton:Pr};case JA.NONE:return{...t,nextTrackButton:Rr,prevTrackButton:Rr};case JA.ONLY_NEXT:return{...t,nextTrackButton:Pr,prevTrackButton:Rr};case JA.ONLY_PREV:return{...t,nextTrackButton:Rr,prevTrackButton:Pr};default:return t}},Kfe=(t,e,n,{i18n:r,playlistCountKey:i,playlistDurationKey:s})=>{let a=`${r.t(i,{count:t})}`;if(!e)return a;const{hours:o,minutes:l}=Yce(e);return a+=`${n==="comma"?",":" •"} ${r.t(s,{hours:o,minutes:l})}`,a},u4=async(t,e)=>{var u;const n=lr.getDataServices(),r=await n.getContentObject(t),i=(u=r.getItems)==null?void 0:u.call(r),s=await n.getContentObjects(i??[]);
222if(!Object.keys(s.content).length||!i)return{itemToPlay:void 0,orderedContent:[],noneToPlay:!0};const a=Object.values(s.content).map(c=>c),o=irt(i,a);return{itemToPlay:o.find(c=>c.getId()===e),orderedContent:o,itemIds:i}},Yfe=(t,e)=>{var a;const n=(a=e==null?void 0:e.dataObject)==null?void 0:a.id,r=t.findIndex(o=>"getId"in o?o.getId()===n:o.id===n),i=r===0,s=r===t.length-1;return{isFirst:i,isLast:s,currentIdx:r}},pMt=(t,e)=>`${t?`By ${t}`:""}${t&&e?" • ":""}${e?`Updated ${qce(e)}`:""}`,zZ=t=>{let e;const n=new Set,r=(u,c)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const f=e;e=c??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(h=>h(e,f))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=e=t(r,i,o);return o},vrt=t=>t?zZ(t):zZ,yrt=t=>t;function brt(t,e=yrt){const n=mt.useSyncExternalStore(t.subscribe,mt.useCallback(()=>e(t.getState()),[t,e]),mt.useCallback(()=>e(t.getInitialState()),[t,e]));return mt.useDebugValue(n),n}const Srt=t=>{const e=vrt(t),n=r=>brt(e,r);return Object.assign(n,e),n},Zfe=t=>Srt,Sx=Zfe()(t=>({offset:0,playbackFraction:0,remaining:0,setProgress:(e,n,r)=>t({offset:e,playbackFraction:n,remaining:r})})),Oa=Zfe()(t=>({artist:"",duration:0,start:0,isLiveShow:!1,isAd:!1,isLive:!1,playState:Hi.Idle,currentContentId:void 0,currentEpisodeId:void 0,setArtist:e=>t({artist:e}),setDuration:e=>t({duration:e}),setStart:e=>t({start:e}),setIsLiveShow:e=>t({isLiveShow:e}),setIsAd:e=>t({isAd:e}),setIsLive:e=>t({isLive:e}),setPlayState:e=>t({playState:e}),setCurrentContentId:e=>t({currentContentId:e}),setCurrentEpisodeId:e=>t({currentEpisodeId:e})})),Qfe=Aa({get:t=>({get:e})=>{var n;if(t)try{const r=(n=e(gT(t)))==null?void 0:n.getDataObject();return r?Zce(r):void 0}catch{}},key:"CollectionQuery"}),{useWrappedCachedValue:Xfe}=hx({get:t=>async()=>{if(!t.length)return[];const{content:e}=await lr.getDataServices().getContentSummaries(t),n=Object.values(e);return srt(t,n).map(px)},key:"CollectionItems",refreshEverySeconds:I1.every30s}),U2=Yn({default:void 0,key:"CollectionPlaybackModeState"}),Jfe=Yn({default:[],key:"ActiveCollectionState"}),vV=Yn({default:void 0,key:"SelectedPlaylistIdState"}),ro=Yn({default:void 0,key:"PlayerMetadataState"}),Tb=Yn({default:{},key:"PlayerTimeState"}),mo=Yn({default:{playState:Hi.Idle},key:"PlayerState"}),uw=Yn({default:!1,key:"PlayButtonDisabledState"}),c4=Yn({default:{isMuted:!1,volume:1},key:"PlayerVolumeState"}),eD=Yn({default:{availableRates:[],currentRate:1,savedRate:0},key:"PlayerSpeedState"}),yV=Yn({default:!1,key:"PlayerLoadingState"}),J0=hb({key:"isAdState",get:({get:t})=>{const e=t(ro);return Qh(e==null?void 0:e.contentType)}}),ws=U7({get:({get:t})=>{const e=t(ro);if(!e)return;const{dataObject:n,artist:r,image:i,standaloneChapterDataObject:s,episodeDataObject:a,station:o,songOrShow:l,stop:u,start:c,skips:d,id:f}=e,h=a??((n==null?void 0:n.type)===gt.EPISODE?n:void 0),g=s??((n==null?void 0:n.type)===gt.STANDALONE_CHAPTER?n:void 0),v=(n==null?void 0:n.image)||(n==null?void 0:n.parentImage),b={src:i?encodeURI(i):void 0,srcFallback:v&&v!==i?encodeURI(v):void 0},S=l||(h==null?void 0:h.title)||(h==null?void 0:h.parentTitle)||(n==null?void 0:n.title);return{artist:r,dataObject:n,endTime:u,episodeDataObject:h,standaloneChapterDataObject:g,image:b,startTime:c,station:o,title:S,duration:n==null?void 0:n.duration,id:(h==null?void 0:h.id)||(n==null?void 0:n.id)||f,skips:d}},key:"NowPlaying"}),Ert=ss({get:({get:t})=>{var e;return(e=t(ro))==null?void 0:e.skips},key:"PlayerPlayerSkipsStateState"});ss({get:({get:t})=>{var e,n,r;return{id:(n=(e=t(ro))==null?void 0:e.dataObject)==null?void 0:n.id,duration:(r=t(ro))==null?void 0:r.duration}},key:"PlayerDurationState"});const ehe=ss({get:({get:t})=>{var e;return(e=t(ro))==null?void 0:e.companionAdIframeUrl},key:"PlayerCompanionAdIframeUrlState"});ss({get:({get:t})=>t(Tb).playbackLiveFraction,key:"PlayerLiveFractionState"});const bV=ss({get:({get:t})=>{const e=t(ro);return(e==null?void 0:e.isLive)||!1},key:"PlayerContentIsLiveState"});ss({get:({get:t})=>{const{episodeDataObject:e,isRewindable:n}=t(ro)||{};return!!n&&Cet(e)},key:"PlayerContentIsRewindableState"});const Trt=ss({get:({get:t})=>{const{offset:e}=Sx.getState(),{duration:n}=Oa.getState(),r=t(ro);return e<RK?lg.Start:n!==void 0&&e+RK>=n||r!=null&&r.isLive?lg.End:lg.Middle},key:"PlayerFractionPositionTypeState"}),Bv=U7({get:({get:t})=>{var w;const{playState:e,contentType:n,listState:r}=t(mo),i=t(U2),s=t(Jfe),a=t(ws),o=t(ro),{skips:l=0}=o||{},u=(o==null?void 0:o.isAudioPreroll)||!1,c=t(Trt),d=t(Ort),f=t(bV),{isFirst:h,isLast:g}=Yfe(s,a),v=t(ws),b=((w=v==null?void 0:v.dataObject)==null?void 0:w.type)===gt.STANDALONE_CHAPTER,S=mrt(grt({chapterPositionType:d,playState:e,contentType:n,fractionPositionType:c,skipsRemaining:l,isLive:f,isAd:Qh(o==null?void 0:o.contentType),collectionPlaybackMode:i,isFirst:h,isLast:g,isStandaloneChapter:b,
222isAudioPreroll:u}),r),A=S.scrubberIsUserControlled;return{...S,scrubberIsUserControlled:A}},key:"PlayerControlsState"}),V2=Aa({get:({contentId:t})=>({get:e})=>{var c,d;const{playState:n}=e(mo),r=e(ro),i=e(vV),s=e(U2),a=(c=r==null?void 0:r.dataObject)==null?void 0:c.id,o=(d=r==null?void 0:r.episodeDataObject)==null?void 0:d.id,l=n===Hi.Playing,u=s===tu.Playlist;return l?u&&i===t?!0:a||o?a===t||o===t:!1:!1},key:"CheckPlayingById"});Aa({get:t=>async({get:e})=>{var s;const{playState:n}=e(mo),r=e(ro),i=await lr.getDataServices().getContentObject(t);return prt(n,(s=i.getItems)==null?void 0:s.call(i),r)},key:"CheckPlayingBydId"});Aa({get:t=>({get:e})=>{var a,o;const{playState:n}=e(mo),r=e(ro),i=(a=r==null?void 0:r.dataObject)==null?void 0:a.id,s=(o=r==null?void 0:r.episodeDataObject)==null?void 0:o.id;return i||s?n===Hi.Loading&&(i===t||s===t):!1},key:"CheckPlayerLoadingById"});Aa({get:t=>({get:e})=>{const{playState:n}=e(mo),r=e(ro);return r!=null&&r.dataObject?n===Hi.Ended&&r.dataObject.id===t:!1},key:"CheckPlayedById"});const Art=U7({get:({get:t})=>{let e;const n=t(Tb),r=t(ws);return(r!=null&&r.standaloneChapterDataObject||r!=null&&r.episodeDataObject)&&(n!=null&&n.remaining)&&(e=H7(n==null?void 0:n.remaining)),{duration:{hours:e==null?void 0:e.duration.hours,minutes:e==null?void 0:e.duration.minutes},label:e==null?void 0:e.label}},key:"PlayerFormattedHoursMinutesRemaining"}),SV=Aa({get:t=>({get:e})=>{var r,i;const n=e(ro);return((r=n==null?void 0:n.dataObject)==null?void 0:r.id)===t||((i=n==null?void 0:n.episodeDataObject)==null?void 0:i.id)===t},key:"IsInPlayer"});Aa({get:t=>({get:e})=>{const{playState:n}=e(mo),r=e(ro);return r!=null&&r.dataObject?n===Hi.Paused&&(r==null?void 0:r.dataObject.id)===t:!1},key:"CheckPausedBydId"});const the=ss({get:({get:t})=>{const e=t(ro),n=t(wrt);return!!e||n},key:"ShouldShowPlayerState"}),wrt=ss({get:({get:t})=>{const{playState:e}=t(mo),n=t(yV);return e===Hi.Loading||n},key:"shouldShowPlayerLoadingState"}),_rt=()=>Hk(({set:t,reset:e})=>(n=!1)=>{e(ro),e(mo),e(Tb),t(yV,n)},[]),Crt=(t,e)=>({index:e,duration:t==null?void 0:t.getDuration(),startOffset:t.getStartOffset(),title:t.getTitle(),transcript:t.getTranscript()}),d4=t=>t.map(Crt),eb=Yn({default:-1,key:"ChapterIndexState"}),EV=X1({key:"AudioServicesProvidedChapters",default:[]}),{selector:xrt}=hx({get:t=>async()=>{const e=await lr.getDataServices().getChapters(t);return e.length<1?[]:d4(e)},key:"ClientLoadedChapters"}),H2=Mv({key:"Chapters",get:({episodeId:t,live:e})=>({get:n})=>n(Gfe("chapters"))?n(e?EV(t):xrt(t)):[]}),nhe=t=>Ht(H2(t)),Irt=(t,e=[])=>{const{endTime:n,startTime:r}=t,[i,s]=$.useState(-1),a=$.useRef(),o=t.subtype===Vn.BROADCAST_SHOW_EPISODE,l=$.useCallback(()=>{if(e.length&&r&&n){const u=new Date,c=new Date(r),d=new Date(n);if(eZ(u,c)&&K0(u,d)){const f=e.findIndex(v=>{const{duration:b,startOffset:S}=v,A=dL(S),w=dL(S+b);return eZ(u,A)&&K0(u,w)}),h=f!==-1,g=f<e.length-1;if(s(f),h&&g){const v=e[f],{duration:b,startOffset:S}=v,A=S+b,w=RQe(u);a.current&&clearTimeout(a.current),a.current=setTimeout(l,A-w)}}}},[e,n,r]);return $.useEffect(()=>(a.current&&clearTimeout(a.current),l(),()=>{a.current&&clearTimeout(a.current)}),[l]),$.useMemo(()=>o?e.length-1:i,[o,e,i])},rhe=t=>{const e=Ht(eb),n=Ht(ws);if(!n)return-1;const{dataObject:r,episodeDataObject:i}=n;return((i==null?void 0:i.id)??(r==null?void 0:r.id))===t?e:-1},Ort=ss({get:({get:t})=>{const{episodeDataObject:e}=t(ws)||{},n=t(eb),r=t(EV((e==null?void 0:e.id)??""));return r.length===1||r.length===0||!r?kh.StartAndEnd:n===r.length-1?kh.End:n===0?kh.Start:kh.Middle},key:"CurrentChapterPositionType"}),Prt=Mv({key:"CurrentChapter",get:({live:t})=>({get:e})=>{const{episodeDataObject:n}=e(ws)??{},r=e(eb);return e(H2({episodeId:(n==null?void 0:n.id)??"",live:t})).find(s=>s.index===r)}}),ihe=({live:t})=>Ht(Prt({live:t})),Rrt=Yn({default:0,key:"RecoilSleepUntilState"}),Lrt=Yn({default:!1,key:"RecoilSleepUntilEndOfEpisodeState"}),she=$.createContext(void 0),Drt=$.createContext(void 0),GZ=({children:t})=>
222{const[e,n]=$.useState({dateTime:Date.now(),state:"active",lastUpdateTimestamp:Date.now()});return I(she.Provider,{value:e,children:I(Drt.Provider,{value:n,children:t})})},krt=()=>{const t=$.useContext(she);if(t===void 0)throw new Error("useAppStatus must be used within an AppStatusProvider");return t},Nrt=(t,e)=>{const n=new Set([...Object.keys(t),...Object.keys(e)]),r={};for(const i of n)k7(e[i],t[i])||(r[i]=!0);return r},mF=()=>{const t=$.useRef({});return e=>{const n=e??{},r=Nrt(t.current,n);return t.current=Object.assign({},n),r}},fE=t=>!xle(t),WZ=t=>{switch(t){case"PLAY_REQUESTED":case"SKIP_REQUESTED":case"LOADING":case"FAILURE_WITH_RETRY":case"BUFFERING":case"TRANSITION_TO_BUFFERING":return Hi.Loading;case"PLAYING":return Hi.Playing;case"PAUSED":case"PAUSE_REQUESTED":case"LOADED":return Hi.Paused;case"ENDED":return Hi.Ended;case"DESTROYED":return Hi.Idle;case"FAILURE":default:return Hi.Error}},Mrt=6e4,qZ="ResumePointSetTime",f4=({onPlaybackError:t,resetPlayerStateOnError:e,onEvent:n})=>{const r=Oa(j=>j.setArtist),i=Oa(j=>j.setDuration),s=Oa(j=>j.setIsLiveShow),a=Oa(j=>j.setStart),o=Oa(j=>j.setIsAd),l=Oa(j=>j.setIsLive),u=Oa(j=>j.setPlayState),c=Oa(j=>j.setCurrentContentId),d=Oa(j=>j.setCurrentEpisodeId),f=Sx(j=>j.setProgress),h=mF(),g=mF(),v=krt(),b=$.useRef(),S=$.useRef(),A=$.useRef({}),w=mF(),x=Eb("chapters"),P=IR(mo),N=IR(Tb),k=1e3,U=$.useCallback(j=>{if(v.state=="active")return!0;const X=Date.now(),G=A.current[j]||0;return X-G>=k?(A.current[j]=X,!0):!1},[v.state]),H=$.useCallback(j=>{e&&(P(),N(),i(0)),t&&t(j)},[t,P,N,e,i]),B=$.useCallback(j=>{var lt,ot,se;const{context:X}=j??{},G=X==null?void 0:X.metadata,ie=X==null?void 0:X.episode,ae=G==null?void 0:G.artist,ue=G==null?void 0:G.duration,Q=G==null?void 0:G.start,de=ie==null?void 0:ie.isLiveOnAir(),le=G==null?void 0:G.isAd,ye=G==null?void 0:G.isLive,fe=j!=null&&j.value?WZ(j.value):void 0,We=(ot=(lt=X==null?void 0:X.item)==null?void 0:lt.data)==null?void 0:ot.id,Le=(se=ie==null?void 0:ie.data)==null?void 0:se.id;let Ve=X==null?void 0:X.elapsed,at=fE(ue)&&fE(Ve)?Ve/ue:void 0;const Et=cF(ae)??"";r(Et),ue&&i(ue),Q&&a(Q),s(de??!1),l(ye??!1),o(le??!1),fe!==void 0&&u(fe),c(We),d(Le),at&&at>1&&(at=1);let ne=fE(ue)&&fE(Ve)?ue-Ve:void 0;ne&&ne<0&&(ne=0),Ve&&ue&&Ve>ue&&(Ve=ue);const Ze=g(X);(Ze.elapsed||Ze.metadata)&&f(Ve||0,at||0,ne||0)},[]),q=Hk(({set:j,reset:X,get:G})=>{const ie=ne=>Ze=>j(ne,Ze),ae=ie(ro),ue=ie(mo),Q=ie(eD),de=ie(eb),le=()=>X(eb),ye=ie(c4),fe=ie(yV),We=ie(Rrt),Le=ie(Lrt),Ve=ie(Cd),at=ie(Jfe),Et=ie(U2);return({audioServicesState:ne,streamerState:Ze})=>{const lt=h(ne.context),ot=ne.value.MAIN!==b.current;if(b.current=ne.value.MAIN,ot&&ne.value.MAIN==="FAILURE"&&(fe(!1),setTimeout(()=>H({type:"error",error:tU.UNKNOWN_ERROR}),10)),(lt.volume||lt.isMuted)&&ye(pt=>
222({...pt,volume:ne.context.volume,isMuted:ne.context.isMuted})),lt.rate&&Q(pt=>({...pt,currentRate:ne.context.rate})),U("playbacks")&&lt.playbacks){const pt=G(Cd),me=Date.now(),De=pt[qZ];if(!De||me-De>=Mrt){const Me=ne.context.playbacks;Me[qZ]=me,Ve(Me)}}U("collectionPlaybackMode")&&lt.collectionPlaybackMode&&Et(ne.context.collectionPlaybackMode),U("activeCollection")&&lt.activeCollection&&at(ne.context.activeCollection);const{value:se,context:Fe}=Ze??{},ht=se!==S.current;if(S.current=se,!se||!Fe)return;const Ct=w(Fe);if(Ct.metadata||Ct.episode||Ct.item||Ct.skipsCount){const pt=Fe.metadata;ae({...pt,skips:pt==null?void 0:pt.skips,songOrShow:cF(pt==null?void 0:pt.songOrShow),station:cF(pt==null?void 0:pt.station),dataObject:pT(Fe.item),episodeDataObject:Fe.episode?Cv(Fe.episode):void 0,standaloneChapterDataObject:Fe.standaloneChapter?C2(Fe.standaloneChapter):void 0})}if(Ct.currentChapterIndex&&(Fe.currentChapterIndex!==void 0?de(Fe.currentChapterIndex):le()),Ct.chapters&&Fe.episode&&x){const pt=EV(Fe.episode.getId());if(Fe.chapters){const me=G(pt),De=d4(Fe.chapters);Mi.isEqual(me,De)||j(pt,d4(Fe.chapters))}else X(pt)}if(ht&&fe(se==="LOADING"),(ht||Ct.contentType)&&ue(pt=>({...pt,contentType:Fe.contentType,playState:WZ(se)})),ht&&se==="FAILURE"&&(fe(!1),setTimeout(()=>H({type:"error",error:tU.UNKNOWN_ERROR,msg:"Playback failed"}),10)),Ct.contentType&&Q(pt=>{var me,De;return{...pt,availableRates:x7((me=ne.context.activePlayableObject)==null?void 0:me.getEntityType(),(De=ne.context.activePlayableObject)==null?void 0:De.getEntitySubtype())?DP:[]}}),lt.sleepTimerState)switch(ne.context.sleepTimerState){case wf.Idle:Le(!1),We(0);break;case wf.EndOfEpisode:Le(!0);break;default:Le(!1),We(ne.context.sleepTimerState)}}},[S]),Z=$.useCallback(({audioServicesState:j,streamerState:X})=>{B(X),q({audioServicesState:j,streamerState:X})},[B,q]),{loading:C,clientServices:L}=Fa(),V=Qs(c4);return $.useEffect(()=>{if(C)return;const j=L.getAudioServices();V({isMuted:j.getMuted(),volume:j.getVolume()})},[L,C,V]),$.useEffect(()=>{if(C)return;const j=L.getAudioServices().addEventListener(Z);return()=>j()},[L,Z,C,n]),null},Frt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Account"}),I("path",{opacity:".2",d:"M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Z",fill:"currentColor"}),I("path",{d:"M12.06 12.625a3.938 3.938 0 1 0 7.874 0 3.938 3.938 0 0 0-7.875 0Z",fill:"currentColor"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m9.514 22.628-.548-.44-.549-.441h.001l.001-.002.003-.004.009-.01a2.273 2.273 0 0 1 .124-.141c.083-.09.203-.213.361-.359.3
22216-.29.784-.672 1.41-1.051 1.255-.76 3.138-1.508 5.67-1.508 2.534 0 4.416.747 5.672 1.508a8.87 8.87 0 0 1 1.41 1.051 6.332 6.332 0 0 1 .485.5l.008.01.003.004.002.001v.001l-.548.44-.548.44v.001l-.012-.014a4.941 4.941 0 0 0-.344-.349 7.455 7.455 0 0 0-1.185-.882c-1.066-.646-2.7-1.305-4.942-1.305-2.243 0-3.876.659-4.942 1.305a7.454 7.454 0 0 0-1.186.882 4.942 4.942 0 0 0-.343.349l-.013.014Zm0 0-.001.001Zm12.966 0 .002.002h-.001v-.002Z",fill:"currentColor"})]}),$rt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Advertisement"}),I("path",{d:"M19 25H3V5H28V16",stroke:"currentColor",strokeWidth:"1.5"}),be("mask",{id:"path-2-inside-1_5430_1614",fill:"white",children:[I("path",{d:"M15.0112 19L12.2552 11H10.756L8 19H9.6205L10.0284 17.7543H12.9828L13.3907 19H15.0112ZM11.4946 13.32H11.5166L12.4867 16.2686H10.5245L11.4946 13.32Z"}),I("path",{d:"M18.6047 19C20.6661 19 22 17.5143 22 15C22 12.5086 20.6661 11 18.6157 11H15.9369V19H18.6047ZM17.5684 12.5543H18.6047C19.685 12.5543 20.3685 13.3771 20.3685 15C20.3685 16.6343 19.685 17.4457 18.6047 17.4457H17.5684V12.5543Z"})]}),I("path",{d:"M15.0112 19L12.2552 11H10.756L8 19H9.6205L10.0284 17.7543H12.9828L13.3907 19H15.0112ZM11.4946 13.32H11.5166L12.4867 16.2686H10.5245L11.4946 13.32Z",fill:"currentColor"}),I("path",{d:"M18.6047 19C20.6661 19 22 17.5143 22 15C22 12.5086 20.6661 11 18.6157 11H15.9369V19H18.6047ZM17.5684 12.5543H18.6047C19.685 12.5543 20.3685 13.3771 20.3685 15C20.3685 16.6343 19.685 17.4457 18.6047 17.4457H17.5684V12.5543Z",fill:"currentColor"}),I("path",{d:"M15.0112 19L12.2552 11H10.756L8 19H9.6205L10.0284 17.7543H12.9828L13.3907 19H15.0112ZM11.4946 13.32H11.5166L12.4867 16.2686H10.5245L11.4946 13.32Z",stroke:"currentColor",strokeWidth:"3",mask:"url(#path-2-inside-1_5430_1614)"}),I("path",{d:"M18.6047 19C20.6661 19 22 17.5143 22 15C22 12.5086 20.6661 11 18.6157 11H15.9369V19H18.6047ZM17.5684 12.5543H18.6047C19.685 12.5543 20.3685 13.3771 20.3685 15C20.3685 16.6343 19.685 17.4457 18.6047 17.4457H17.5684V12.5543Z",stroke:"currentColor",strokeWidth:"3",mask:"url(#path-2-inside-1_5430_1614)"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 19.25H22.25V20V25.8H23.75L23.75 21.8105L27.4697 25.5303L28 26.0606L29.0607 25L28.5303 24.4696L24.8108 20.75L28 20.75H28.75V19.25H28H23Z",fill:"currentColor"})]}),Brt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Apple logo"}),I("path",{d:"M25.904 21.141c-.515 1.145-.764 1.657-1.427 2.668-.929 1.412-2.238 3.176-3.856 3.187-1.44.013-1.812-.94-3.768-.923-1.954.01-2.362.942-3.804.927-1.62-.015-2.858-1.603-3.787-3.014-2.597-3.954-2.871-8.591-1.266-11.057 1.135-1.749 2.93-2.777 4.618-2.777 1.718 0 2.798.944 4.218.944 1.379 0 2.218-.945 4.206-.945 1.502 0 3.09.818 4.225 2.23-3.714 2.037-3.11 7.34.641 8.76ZM19.528 8.572C20.251 7.643 20.8 6.334 20.6 5c-1.178.08-2.557.833-3.362 1.808-.73.89-1.336 2.209-1.1 3.485 1.286.04 2.618-.727 3.39-1.721Z",fill:"currentColor"})]}),Urt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Arrow down"}),I("path",{d:"M4.852 17.652 16 28.8l11.148-11.148M16 28.8V3.2",stroke:"currentColor",strokeWidth:"1.5"})]}),Vrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Back"}),I("path",{d:"M14.348 4.852 3.2 16l11.148 11.148M3.2 16h25.6",stroke:"currentColor",strokeWidth:"1.5"})]}),Hrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Back 15 seconds"}),I("path",{d:"M16 4c6.627 0 12 5.373 12 12s-5.373 12-12 12S4 22.627 4 16a11.97 11.97 0 0 1 4-8.944",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"m11 4 5 3V1l-5 3ZM12.621 11.406h.69l-1.125-.535.435.535Zm-2.386 2.831 2.822-2.297-.87-1.069-2.822 2.297.87 1.07Zm1.697-2.831v9.188h1.379v-9.188h-1.379ZM16.604 11.724v-.69h-.505l-.152.482.657.208Zm-1.29 4.077-.658-.208 1.078.754-.42-.546Zm5.808 1.678-.69-.01.69.01Zm-.403-6.444h-4.115v1.378h4.115v-1.378Zm-4.772.481-1.29 4.077 1.313.416 1.291-4.077-1.314-.416Zm-.213 4.83c.709-.545 1.405-1.028 2.484-1.028v-1.379c-1.568 0-2.582.743-3.325 1.316l.84 1.092Zm2.484-1.028c1.444 0 2.231 1.007 2.215 2.151l1.378.02c.027-1.86-1.327-3.55-3.593-3.55v1.379Zm2.215 2.151a2.228 2.228 0 0 1-.54 1.413c-.346.391-.896.705-1.756.705v1.378c1.238 0 2.17-.47 2.789-1.17a3.606 3.606 0 0 0 .885-2.306l-1.378-.02Zm-2.296 2.118c-1.686 0-2.135-1.15-2.135-1.549h-1.378c0 1.095 1.003 2.927 3.513 2.927v-1.378Z",fill:"currentColor"})]}),jrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Bell"}),I("path",{d:"m18.97 6.57-.743.106.062.429.402.16.278-.696ZM24 18.6h-.75v.39l.32.224.43-.614Zm2 1.4h.75v-.39l-.32-.224L26 20Zm0 3v.75h.75V23H26ZM6 23h-.75v.75H6V23Zm0-3-.43-.614-.32.224V20H6Zm2-1.4.43.614.32-.223V18.6H8Zm5.03-12.03.28.696.401-.161.062-.43-.742-.106ZM24.75 14a8.753 8.753 0 0 0-5.502-8.127l-.557 1.393A7.253 7.253 0 0 1 23.25 14h1.5Zm0 4.6V14h-1.5v4.6h1.5Zm1.68.786-2-1.4-.86 1.228 2 1.4.86-1.228ZM26.75 23v-3h-1.5v3h1.5ZM6 23.75h20v-1.5H6v1.5ZM5.25 20v3h1.5v-3h-1.5Zm2.32-2.014-2 1.4.86 1.228 2-1.4-.86-1.228ZM7.25 14v4.6h1.5V14h-1.5Zm5.502-8.127A8.753 8.753 0 0 0 7.25 14h1.5a7.253 7.253 0 0 1 4.56-6.734l-.558-1.393Zm1.021.803A2.25 2.25 0 0 1 16 4.75v-1.5a3.75 3.75 0 0 0-3.712 3.212l1.485.214ZM16 4.75a2.25 2.25 0 0 1 2.227 1.926l1.485-.214A3.75 3.75 0 0 0 16 3.25v1.5ZM20 25c0 1.657-1.79 3-4 3s-4-1.343-4-3h8Z",fill:"currentColor"})]}),zrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Bell"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.97 6.57A8.003 8.003 0 0 1 24 14v4.6l2 1.4v3H6v-3l2-1.4V14a8.003 8.003 0 0 1 5.03-7.43 3 3 0 0 1 5.94 0Z",fill:"currentColor"}),I("path",{d:"M20 25c0 1.657-1.79 3-4 3s-4-1.343-4-3h8Z",fill:"currentColor"}),I("circle",{cx:"23",cy:"9",r:"4",fill:"#FE5000"})]}),Grt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Bluetooth"}),I("path",{d:"m10 22.611 13-11.555L16.5 6v20.222l6.5-5.055-13-10.111",stroke:"currentColor",strokeWidth:"1.5"})]}),Wrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Broadcast"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 15C4.25 8.51 9.51 3.25 16 3.25S27.75 8.51 27.75 15c0 3.912-1.911 7.377-4.851 9.512l.94 2.39c3.863-2.55 6.411-6.928 6.411-11.902C30.25 7.13 23.87.75 16 .75S1.75 7.13 1.75 15c0 4.974 2.548 9.352 6.41 11.901l.941-2.389A11.734 11.734 0 0 1 4.25 15Zm7 0a4.75 4.75 0 1 1 8.848 2.403l1.06 2.691a7.25 7.25 0 1 0-10.317 0l1.06-2.69A4.729 4.729 0 0 1 11.25 15Zm4.716-.851L21.914 31h-2.651l-3.23-9.148L12.985 31H10.35l5.617-16.852Z",fill:"currentColor"})]}),qrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Calendar"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M6 7h20v20H6zM10.75 4v6M6 13.25h20M21.25 4v6"})]}),Krt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Call"}),I("path",{d:"m4.954 7.747-.53-.53-.16.16-.045.223.735.147ZM8.49 4.211l.53-.53-.53-.53-.53.53.53.53Zm16.263 23.335.147.735.223-.044.16-.16-.53-.531Zm3.536-3.536.53.53.53-.53-.53-.53-.53.53Zm-6.364-6.364.53-.53-.53-.53-.53.53.53.53Zm-3.536 3.536-.53.53.53.53.53-.53-.53-.53Zm-7.071-7.071-.53-.53-.53.53.53.53.53-.53Zm3.536-3.536.53.53.53-.53-.53-.53-.53.53Zm-9.37-2.298L9.02 4.742l-1.06-1.06-3.536 3.535 1.06 1.06Zm5.657 13.082c-3.422-3.422-4.771-6.82-5.275-9.34a13.603 13.603 0 0 1-.273-3.035 9.243 9.243 0 0 1 .087-1.036l.008-.047.002-.008v-.001.001l-.736-.146a58.337 58.337 0 0 0-.736-.145v.003l-.002.007a2.685 2.685 0 0 0-.017.097c-.01.063-.023.152-.037.266-.027.228-.056.555-.068.966a15.1 15.1 0 0 0 .301 3.372c.557 2.785 2.037 6.458 5.686 10.106l1.06-1.06Zm13.612 6.187c-.147-.735-.147-.735-.146-.736h.001l-.009.002-.047.008a9.284 9.284 0 0 1-1.036.087c-.724.02-1.772-.02-3.035-.273-2.52-.504-5.918-1.853-9.34-5.275l-1.06 1.06c3.648 3.65 7.321 5.129 10.106 5.686 1.388.277 2.55.325 3.372.301.411-.012.738-.041.966-.068a6.886 6.886 0 0 0 .363-.054l.007-.002h.004l-.146-.736Zm3.005-4.066-3.535 3.536 1.06 1.06 3.536-3.535-1.06-1.06Zm-6.364-5.303 6.364 6.364 1.06-1.06-6.363-6.365-1.06 1.06Zm0-1.06-3.535 3.535 1.06 1.06 3.536-3.535-1.06-1.06Zm-2.475 3.535-7.07-7.071-1.061 1.06 7.07 7.071 1.061-1.06Zm-7.07-6.01 3.535-3.536-1.06-1.06-3.536 3.535 1.06 1.06Zm-3.89-9.9 6.364 6.364 1.06-1.06L9.02 3.68l-1.06 1.06Z",fill:"currentColor"})]}),Yrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Caret"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12Zm0-9.91-4.688-4.687-.909.91L16 19.909l5.597-5.596-.91-.91L16 18.091Z",fill:"currentColor"})]}),Zrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Caret down"}),I("path",{d:"M3.5 11.5 16 24l12.5-12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",vectorEffect:"non-scaling-stroke"})]}),Qrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Caret left"}),I("path",{d:"M20 5 9 16l11 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",vectorEffect:"non-scaling-stroke"})]}),Xrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Caret right"}),I("path",{d:"m12 5 11 11-11 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",vectorEffect:"non-scaling-stroke"})]}),Jrt=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Caret up"}),I("path",{d:"M3 21 15.5 8.5 28 21",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",vectorEffect:"non-scaling-stroke"})]}),eit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Checkmark"}),I("path",{d:"m4.31 17.323 9.72 8.394L29.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",vectorEffect:"non-scaling-stroke"})]}),tit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Close"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m26.563 6.593.53-.531L26.033 5l-.53.53-9.512 9.534-9.494-9.533L5.967 5 4.91 6.063l.53.531 9.492 9.532-9.33 9.35-.53.531 1.06 1.062.53-.53 9.329-9.35 9.332 9.37.529.531 1.058-1.063-.529-.531-9.33-9.369 9.513-9.534Z",fill:"currentColor"})]}),nit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Close"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16Zm0-17.06-4.5-4.5-1.06 1.06 4.5 4.5-4.5 4.5 1.06 1.06 4.5-4.5 4.5 4.5 1.06-1.06-4.5-4.5 4.5-4.5-1.06-1.06-4.5 4.5Z",fill:"currentColor"})]}),rit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Code"}),I("path",{d:"M13.724 6.373a1.091 1.091 0 0 0-.75-.371 1.073 1.073 0 0 0-.79.279L2.366 15.17A1.111 1.111 0 0 0 2 16a1.129 1.129 0 0 0 .366.83l9.818 8.89a1.079 1.079 0 0 0 1.54-.093 1.124 1.124 0 0 0-.09-1.569L4.733 16l8.9-8.058a1.123 1.123 0 0 0 .09-1.569ZM29.634 15.17l-9.818-8.89a1.079 1.079 0 0 0-1.54.093 1.124 1.124 0 0 0 .09 1.569L27.267 16l-8.9 8.058a1.109 1.109 0 0 0-.365.766 1.13 1.13 0 0 0 .274.803 1.095 1.095 0 0 0 .75.371 1.073 1.073 0 0 0 .79-.279l9.818-8.889A1.112 1.112 0 0 0 30 16a1.13 1.13 0 0 0-.366-.83Z",fill:"currentColor"})]}),iit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Completed"}),I("circle",{cx:"16",cy:"16",r:"12",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"m10.768 16.105 3.987 3.443 6.344-7.472",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),sit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Computer"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M3 7h26v15H3zM13 22h6l1 5h-8l1-5ZM9 27h14"})]}),ait=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Copy link"}),I("path",{d:"m18.298 23.573-2.145 2.145a6.672 6.672 0 0 1-9.435-9.435l2.144-2.145M23.444 18.427l2.144-2.144a6.672 6.672 0 0 0-9.435-9.436l-2.145 2.145M11.864 20.571l8.577-8.577",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"square"})]}),oit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Detail"}),I("path",{d:"M25 9.5V29H7V3h12m6 6.5h-6V3m6 6.5L19 3M11.75 19.25h8.5M11.75 23.25h8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),lit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Download"}),I("path",{d:"M22 21.23h1.891c3.185 0 5.109-1.927 5.109-4.481 0-2.147-1.25-3.887-3.272-4.712C25.75 7.369 22.435 4 18.196 4c-2.772 0-4.783 1.486-6.033 3.336-2.38-.639-5.304 1.21-5.38 4.14C4.457 11.86 3 13.797 3 16.275c0 2.752 2.043 4.953 5.424 4.953h2.701",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m16.256 28.126.53.53.53-.53 3.298-3.298.53-.53-1.06-1.06-.53.53-2.018 2.017V16.25h-1.5v9.535l-2.017-2.018-.53-.53-1.061 1.06.53.531 3.298 3.298Z",fill:"currentColor"})]}),uit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Downloaded"}),I("path",{d:"M23.891 24.23H8.424C5.044 24.23 3 22.027 3 19.274c0-2.477 1.457-4.414 3.783-4.8.076-2.928 3-4.778 5.38-4.14C13.413 8.487 15.423 7 18.196 7c4.239 0 7.554 3.369 7.532 8.037C27.75 15.862 29 17.602 29 19.749c0 2.554-1.924 4.48-5.109 4.48Z",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"m11.717 16.97 3.398 2.992 5.046-6.069",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),cit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Email"}),I("path",{d:"m3.61 5.917 12.835 11.916L29.277 5.918",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M3.75 5.75h25.389v20.5H3.75z"})]}),dit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Exit full screen"}),I("path",{d:"M27 11h-6V5M5 21h6v6M21 27v-6h6M11 5v6H5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),fit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Facebook logo"}),I("path",{d:"M28 16.073C28 9.405 22.627 4 16 4S4 9.405 4 16.073C4 22.1 8.388 27.094 14.125 28v-8.437h-3.047v-3.49h3.047v-2.66c0-3.026 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.971H19.83c-1.491 0-1.956.93-1.956 1.887v2.263h3.328l-.532 3.49h-2.796V28C23.612 27.094 28 22.1 28 16.073Z",fill:"currentColor"})]}),hit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Forward 15 seconds"}),I("path",{d:"M16 4C9.373 4 4 9.373 4 16s5.373 12 12 12 12-5.373 12-12a11.97 11.97 0 0 0-4-8.944",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"m21 4-5 3V1l5 3ZM12.821 11.406h.69l-1.125-.535.435.535Zm-2.386 2.831 2.822-2.297-.87-1.069-2.822 2.297.87 1.07Zm1.697-2.831v9.188h1.379v-9.188h-1.379ZM16.804 11.724v-.69h-.505l-.152.482.657.208Zm-1.29 4.077-.658-.208 1.078.754-.42-.546Zm5.808 1.678-.69-.01.69.01Zm-.403-6.444h-4.115v1.378h4.115v-1.378Zm-4.772.481-1.29 4.077 1.313.416 1.29-4.077-1.313-.416Zm-.213 4.83c.709-.545 1.405-1.028 2.484-1.028v-1.379c-1.569 0-2.582.743-3.325 1.316l.84 1.092Zm2.484-1.028c1.444 0 2.231 1.007 2.215 2.151l1.378.02c.027-1.86-1.327-3.55-3.593-3.55v1.379Zm2.215 2.151a2.229 2.229 0 0 1-.54 1.413c-.346.391-.896.705-1.756.705v1.378c1.238 0 2.17-.47 2.789-1.17a3.606 3.606 0 0 0 .885-2.306l-1.378-.02Zm-2.296 2.118c-1.686 0-2.135-1.15-2.135-1.549h-1.378c0 1.095 1.003 2.927 3.513 2.927v-1.378Z",fill:"currentColor"})]}),pit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Enter fullscreen"}),I("path",{d:"M21 5h6v6M11 27H5v-6M27 21v6h-6M5 11V5h6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),git=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Settings"}),I("path",{d:"M15.083 4.708a1.5 1.5 0 0 1 1.834 0l2.526 1.952a1.5 1.5 0 0 0 .726.3l3.167.407a1.5 1.5 0 0 1 1.297 1.297l.406 3.167a1.5 1.5 0 0 0 .3.726l1.953 2.526a1.5 1.5 0 0 1 0 1.834l-1.952 2.526a1.5 1.5 0 0 0-.3.726l-.407 3.167a1.5 1.5 0 0 1-1.297 1.297l-3.166.406a1.5 1.5 0 0 0-.727.3l-2.526 1.953a1.5 1.5 0 0 1-1.834 0l-2.526-1.952a1.5 1.5 0 0 0-.726-.3l-3.167-.407a1.5 1.5 0 0 1-1.297-1.297l-.406-3.166a1.5 1.5 0 0 0-.3-.727l-1.953-2.526a1.5 1.5 0 0 1 0-1.834l1.952-2.526a1.5 1.5 0 0 0 .3-.726l.407-3.167a1.5 1.5 0 0 1 1.297-1.297l3.167-.406a1.5 1.5 0 0 0 .726-.3l2.526-1.953Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"1",strokeLinejoin:"bevel"}),I("circle",{cx:"16",cy:"16",r:"4",stroke:"currentColor",strokeWidth:"1.5"})]}),mit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Google logo"}),I("path",{d:"M16 14.425h10.384c.115.64.172 1.25.172 1.833 0 2.072-.434 3.922-1.303 5.55a9.41 9.41 0 0 1-3.717 3.817C19.926 26.542 18.082 27 16 27c-1.5 0-2.927-.289-4.283-.866-1.356-.578-2.525-1.359-3.509-2.342-.983-.984-1.764-2.154-2.341-3.51A10.814 10.814 0 0 1 5 16c0-1.5.289-2.927.867-4.283.577-1.356 1.358-2.525 2.341-3.509.984-.983 2.153-1.764 3.51-2.341A10.814 10.814 0 0 1 16 5c2.865 0 5.323.96 7.376 2.879l-2.993 2.879C19.208 9.622 17.747 9.053 16 9.053c-1.232 0-2.37.31-3.416.931a6.86 6.86 0 0 0-2.485 2.528A6.884 6.884 0 0 0 9.182 16c0 1.26.306 2.423.917 3.488a6.86 6.86 0 0 0 2.485 2.528 6.572 6.572 0 0 0 3.416.93c.83 0 1.595-.114 2.292-.343.697-.23 1.27-.516 1.718-.86a6.22 6.22 0 0 0 1.175-1.174c.334-.44.58-.855.738-1.246a5.26 5.26 0 0 0 .322-1.117H16v-3.781Z",fill:"currentColor"})]}),vit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Go to"}),I("path",{d:"M11 5h16v16M6 26 25.765 6.235",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),yit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Go to"}),I("path",{d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M13.5 12.5h6v6M13 19l6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),bit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Handle"}),I("rect",{opacity:".4",y:"14",width:"32",height:"4",rx:"2",fill:"currentColor"})]}),Sit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Headphone"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 5.75C10.34 5.75 5.75 10.34 5.75 16v2.25h6v8.5h-7.5V16C4.25 9.51 9.51 4.25 16 4.25S27.75 9.51 27.75 16v10.75h-7.5v-8.5h6V16c0-5.66-4.59-10.25-10.25-10.25Zm10.25 14h-4.5v5.5h4.5v-5.5Zm-20.5 5.5v-5.5h4.5v5.5h-4.5Z",fill:"currentColor"})]}),Eit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Headset"}),I("path",{d:"M27 15.143v8.571a4.335 4.335 0 0 1-1.232 3.03A4.165 4.165 0 0 1 22.798 28h-6.034a.832.832 0 0 1-.594-.251.866.866 0 0 1 0-1.212.832.832 0 0 1 .594-.251h6.035c.668-.001 1.309-.272 1.781-.754a2.601 2.601 0 0 0 .74-1.818v-.147c-.27.098-.555.147-.84.147h-1.681a2.5 2.5 0 0 1-1.782-.754 2.601 2.601 0 0 1-.74-1.817v-4.286c.002-.682.267-1.335.74-1.817a2.5 2.5 0 0 1 1.782-.754h2.483a9.5 9.5 0 0 0-3-6.13 9.142 9.142 0 0 0-6.288-2.441 9.142 9.142 0 0 0-6.276 2.44 9.5 9.5 0 0 0-3 6.13H9.2a2.5 2.5 0 0 1 1.782.755c.473.482.738 1.135.74 1.817v4.286c-.002.682-.267 1.335-.74 1.817a2.5 2.5 0 0 1-1.782.754h-1.
22268a2.5 2.5 0 0 1-1.782-.754A2.6 2.6 0 0 1 5 21.143v-6c0-1.47.285-2.925.839-4.282a11.159 11.159 0 0 1 2.387-3.625 10.91 10.91 0 0 1 3.57-2.41A10.736 10.736 0 0 1 16.077 4c2.897 0 5.675 1.174 7.724 3.264A11.257 11.257 0 0 1 27 15.143Z",fill:"currentColor"})]}),Tit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Favorite"}),I("path",{d:"m16 29 .737-.142a.75.75 0 0 0-1.473 0L16 29Zm0 0-.476.58a.75.75 0 0 0 1.213-.442L16 29Zm-1.223-.995.472-.583-.472.583ZM16 8.534l-.619.423a.75.75 0 0 0 1.238 0L16 8.534Zm1.223 19.471-.471-.583.471.583ZM16 29l-.737.138a.75.75 0 0 0 1.214.441L16 29Zm-.736-.142v.002l-.001.002L16 29l.737.138v.003l-1.473-.283Zm1.213-.437c-.377-.31-.79-.644-1.229-.999l-.943 1.166c.44.356.848.686 1.219.991l.953-1.158Zm-1.229-.999c-2.234-1.809-5.135-4.157-7.478-6.708-2.375-2.585-4.02-5.213-4.02-7.571h-1.5c0 2.973 2.016 5.974 4.415 8.586 2.43 2.645 5.419 5.062 7.64 6.859l.944-1.166ZM3.75 13.142c0-4.157 2.863-7.392 6.75-7.392v-1.5c-4.858 0-8.25 4.056-8.25 8.893h1.5ZM10.5 5.75c1.881 0 3.603 1.34 4.881 3.207l1.238-.847c-1.39-2.03-3.505-3.86-6.119-3.86v1.5Zm11-1.5c-2.614 0-4.73 1.83-6.119 3.86l1.238.847c1.278-1.867 3-3.207 4.881-3.207v-1.5Zm8.25 8.893c0-4.837-3.392-8.893-8.25-8.893v1.5c3.887 0 6.75 3.235 6.75 7.393h1.5ZM17.695 28.588c2.221-1.797 5.21-4.214 7.64-6.86 2.4-2.61 4.415-5.612 4.415-8.585h-1.5c0 2.358-1.645 4.986-4.02 7.57-2.343 2.552-5.244 4.9-7.478 6.709l.943 1.166Zm-1.218.991c.37-.305.779-.635 1.218-.991l-.943-1.166c-.438.355-.852.69-1.228.999l.953 1.158Zm-1.213-.438v-.002h-.001v-.001L16 29l.737-.138v-.004l-1.473.283Z",fill:"currentColor"})]}),Ait=be("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Favorite filled"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21.75C11.7199 21.5195 11.4116 21.27 11.0825 21.0037C7.74048 18.2993 2.25 13.8562 2.25 9.85714C2.25 6.48426 4.59581 3.75 7.875 3.75C9.56055 3.75 10.9995 4.93894 12 6.40013C13.0005 4.93894 14.4395 3.75 16.125 3.75C19.4042 3.75 21.75 6.48426 21.75 9.85714C21.75 13.8562 16.2595 18.2993 12.9175 21.0037C12.5884 21.27 12.2801 21.5195 12 21.75Z",fill:"currentColor"})]}),wit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"History"}),I("path",{d:"M16 10v6M21.196 19 16 16M8.98 12.465h-5v-5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),I("path",{d:"M8.222 23.778a11 11 0 1 0 0-15.556l-4.243 4.242",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),_it=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Home"}),I("path",{d:"M16 4 5 13v14h8v-9h6v9h8V13L16 4Z",fill:"currentColor"})]}),Cit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Information"}),I("path",{d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M15 15h1v7h1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),I("path",{d:"M15.75 12.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z",fill:"currentColor"})]}),xit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Information"}),I("path",{d:"M16 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",fill:"currentColor"}),I("path",{d:"M14.2 13.421h2v12h2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Iit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Instagram logo"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.999 6.164c3.204 0 3.583.012 4.849.07 1.17.053 1.805.248 2.228.413.522.192.994.499 1.381.898.4.387.706.86.898 1.38.164.424.36 1.06.413 2.23.058 1.265.07 1.644.07 4.848 0 3.204-.012 3.583-.07 4.849-.053 1.17-.249 1.805-.413 2.228a3.98 3.98 0 0 1-2.277 2.277c-.423.164-1.058.36-2.228.413-1.265.058-1.645.07-4.85.07-3.203 0-3.583-.012-4.848-.07-1.17-.053-1.805-.249-2.228-.413a3.716 3.716 0 0 1-1.381-.898 3.716 3.716 0 0 1-.898-1.381c-.164-.423-.36-1.058-.413-2.228-.058-1.266-.07-1.645-.07-4.849s.012-3.583.07-4.849c.053-1.17.249-1.805.413-2.228.192-.522.499-.994.898-1.381.387-.4.86-.706 1.381-.898.423-.164 1.058-.36 2.228-.413 1.266-.058 1.645-.07 4.849-.07l-.002.002ZM16.001 4c-3.259 
2220-3.668.014-4.947.072-1.28.059-2.152.263-2.914.56a5.89 5.89 0 0 0-2.126 1.384A5.891 5.891 0 0 0 4.63 8.142c-.297.762-.5 1.636-.558 2.913C4.014 12.332 4 12.742 4 16c0 3.259.014 3.668.072 4.947.059 1.28.261 2.15.558 2.912a5.89 5.89 0 0 0 1.384 2.125c.6.61 1.325 1.084 2.126 1.385.762.297 1.636.5 2.913.558C12.33 27.986 12.74 28 16 28c3.259 0 3.668-.014 4.947-.072 1.28-.059 2.149-.261 2.911-.558a6.131 6.131 0 0 0 3.51-3.51c.297-.762.5-1.636.558-2.913.058-1.277.072-1.688.072-4.947 0-3.259-.014-3.668-.072-4.947-.059-1.28-.261-2.149-.558-2.911a5.883 5.883 0 0 0-1.384-2.125 5.89 5.89 0 0 0-2.126-1.385c-.762-.297-1.636-.5-2.913-.558-1.276-.058-1.687-.072-4.946-.072L16.001 4Zm-.003 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324Zm0 10.163a4 4 0 1 1 0-8.001 4 4 0 0 1 0 8Zm7.846-10.406a1.44 1.44 0 1 1-2.88 0 1.44 1.44 0 0 1 2.88 0Z",fill:"currentColor"})]}),Oit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Key"}),I("path",{d:"m19.207 22.397.65-.375-.65.375Zm-2.179-3.773.65-.375-.375-.65-.65.375.375.65Zm-1.856 1.071-.375-.65-.324.188-.045.372.744.09Zm-.32 2.66-.295.69.92.392.12-.993-.745-.09Zm-2.463-1.053.294-.69-.345-.147-.324.188.375.65Zm-.928.536-.375-.65-.325.188-.045.372.745.09Zm-.32 2.66-.295.689.92.393.12-.993-.745-.09Zm-2.464-1.053.295-.69-.011-.004-.01-.005-.274.7Zm-3.195-1.248-.741-.113-.09.593.558.218.273-.698ZM6 18.806l-.375-.65-.313.18-.054.357.742.113Zm8.35-4.822.376.65.65-.375-.376-.65-.65.375Zm-1.651-4.86a1.75 1.75 0 0 0-.64 2.39l1.298-.75a.25.25 0 0 1 .092-.342l-.75-1.299Zm9.526-5.5-9.526 5.5.75 1.298 9.526-5.5-.75-1.299Zm2.39.64a1.75 1.75 0 0 0-2.39-.64l.75 1.298a.25.25 0 0 1 .341.092l1.3-.75Zm6.5 11.258-6.5-11.258-1.299.75 6.5 11.258 1.3-.75Zm-.64 2.39a1.75 1.75 0 0 0 .64-2.39l-1.299.75a.25.25 0 0 1-.091.341l.75 1.3Zm-9.526 5.5 9.526-5.5-.75-1.299-9.526 5.5.75 1.3Zm-2.39-.64a1.75 1.75 0 0 0 2.39.64l-.75-1.299a.25.25 0 0 1-.342-.091l-1.299.75Zm-2.18-3.773 2.18 3.773 1.298-.75-2.178-3.773-1.3.75Zm-.83 1.346 1.855-1.072-.75-1.299-1.856 1.072.75 1.299Zm-1.12-.74-.32 2.66 1.489.18.32-2.66-1.49-.18Zm.719 2.06-2.464-1.052-.589 1.379 2.463 1.052.59-1.38Zm-3.311.822.928-.535-.75-1.3-.928.536.75 1.3Zm.05 2.1.32-2.66-1.49-.179-.32 2.66 1.49.179Zm-3.503-.452 2.463 1.052.59-1.38-2.464-1.052-.59 1.38Zm-3.174-1.24 3.195 1.249.546-1.397-3.195-1.249-.546 1.397Zm.048-4.202-.516 3.39 1.483.227.516-3.391-1.483-.226Zm8.718-5.358-8.351 4.821.75 1.3 8.35-4.822-.75-1.3Zm-1.918-1.821 1.643 2.845 1.3-.75-1.644-2.845-1.299.75Z",fill:"currentColor"}),I("circle",{cx:"21.524",cy:"13.554",r:"2.143",transform:"rotate(-30 21.524 13.554)",fill:"currentColor"})]}),Pit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Leave"}),I("path",{d:"M15.9 5h13v22h-13M9.95 11 5 15.95l4.95 4.95M5 15.95l15.9.05",stroke:"currentColor",strokeWidth:"1.5"})]}),Rit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"List handle"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M9 13.25h15M9 18.25h15"})]}),Lit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Live"}),I("rect",{x:"2",y:"8",width:"28",height:"16",rx:"4",fill:"currentColor"}),I("path",{d:"M11.629 19v-1.224H8.965V12.7H7.633V19h3.996Zm2.08 0v-6.3h-1.332V19h1.332Zm4.105 0 2.277-6.3h-1.413l-1.521 4.437h-.018l-1.53-4.437h-1.404l2.268 6.3h1.34Zm6.818 0v-1.224h-2.736v-1.404h2.484v-1.17h-2.484v-1.278h2.727V12.7h-4.059V19h4.068Z",fill:"#090527"})]}),Dit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Live"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 28V4h-1.5v24H13Zm-8 0V17H3.5v11H5Zm16-17v17h-1.5V11H21Zm8 17v-9h-1.5v9H29Z",fill:"currentColor"})]}),kit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Live"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 25V7H12v18h1.5Zm-6 0v-8.25H6V25h1.5Zm12-12.75V25H18V12.25h1.5Zm6 12.75v-6.75H24V25h1.5Z",stroke:"currentColor",strokeWidth:"2"})]}),Nit=be("svg",{width:"47",height:"14",viewBox:"0 0 47 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Live Tag"}),I("rect",{width:"47",height:"14",rx:"3",fill:"#FE5000"}),I("line",{x1:"5.5",y1:"10",x2:"5.5",y2:"7",stroke:"white"}),I("line",{x1:"7.5",y1:"10",x2:"7.5",y2:"4",stroke:"white"}),I("line",{x1:"9.5",y1:"10",x2:"9.5",y2:"6",stroke:"white"}),I("line",{x1:"11.5",y1:"10",x2:"11.5",y2:"8",stroke:"white"}),I("path",{d:"M17.2107 10.135C15.5277 10.135 14.4297 8.839 14.4297 6.85C14.4297 4.861 15.5277 3.565 17.2107 3.565C18.8937 3.565 20.0007 4.861 20.0007 6.85C20.0007 8.839 18.8937 10.135 17.2107 10.135ZM17.2107 8.92C18.1197 8.92 18.6687 8.146 18.6687 6.85C18.6687 5.563 18.1107 4.78 17.2107 4.78C16.3197 4.78 15.7617 5.563 15.7617 6.85C15.7617 8.146 16.3017 8.92 17.2107 8.92ZM21.9425 10H20.6105V3.7H21.9785L24.1115 7.705H24.1295V3.7H25.4615V10H24.0935L21.9605 5.995H21.9425V10ZM28.6453 7.939H26.1613V6.778H28.6453V7.939ZM34.2252 10H32.9022L32.5692 9.019H30.1572L29.8242 10H28.5012L30.7512 3.7H31.9752L34.2252 10ZM31.3542 5.527L30.5622 7.849H32.1642L31.3722 5.527H31.3542ZM35.8629 10H34.5309V3.7H35.8629V10ZM40.3279 7.633V7.642L41.6059 10H40.1749L38.9869 7.786H38.1769V10H36.8449V3.7H39.4099C40.7419 3.7 41.5609 4.474 41.5609 5.734C41.5609 6.661 41.1019 7.336 40.3279 7.633ZM38.1769 4.915V6.571H39.2479C39.8869 6.571 40.2289 6.274 40.2289 5.725C40.2289 5.185 39.8959 4.915 39.2479 4.915H38.1769Z",fill:"white"})]}),Mit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Location"}),I("path",{d:"m7.09 18.222.665-.347-.665.347Zm17.82 0-.665-.347.665.347ZM6.75 13.778c0-4.97 4.125-9.028 9.25-9.028v-1.5c-5.921 0-10.75 4.698-10.75 10.528h1.5ZM16 4.75c5.125 0 9.25 4.058 9.25 9.028h1.5C26.75 7.948 21.921 3.25 16 3.25v1.5Zm0 22.5c.112 0 .155.037.081 0a2.088 2.088 0 0 1-.256-.157c-.234-.162-.542-.41-.908-.736-.729-.648-1.638-1.555-2.576-2.568-1.891-2.045-3.808-4.427-4.586-5.914l-1.33.695c.878 1.678 2.916 4.185 4.815 6.238.958 1.035 1.904 1.98 2.68 2.67.387.344.745.637 1.05.848.153.105.307.201.455.273.129.063.338.151.575.151v-1.5Zm-8.245-9.375a8.811 8.811 0 0 1-1.005-4.097h-1.5c0 1.725.424 3.354 1.176 4.792l1.329-.695Zm17.495-4.097a8.812 8.812 0 0 1-1.005 4.097l1.33.695a10.312 10.312 0 0 0 1.175-4.792h-1.5Zm-1.005 4.097c-.778 1.487-2.695 3.87-4.586 5.914-.938 1.013-1.847 1.92-2.576 2.568-.366.325-.673.574-.908.736a2.088 2.088 0 0 1-.256.157c-.074.037-.031 0 .081 0v1.5c.237 0 .446-.088.575-.15.148-.073.302-.169.454-.274a11.67 11.67 0 0 0 1.05-.848c.777-.69 1.723-1.635 2.68-2.67 1.9-2.053 3.938-4.56 4.815-6.238l-1.329-.695Z",fill:"currentColor"}),I("circle",{cx:"16",cy:"13",r:"3",fill:"currentColor"})]}),Fit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Location"}),I("path",{d:"M28 4 16.387 28l-2.322-10.065L4 15.613 28 4Z",fill:"currentColor"})]}),$it=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Lock"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4.25A6.75 6.75 0 0 0 9.25 11v1.25h-2v14.5h17.5v-14.5h-2V11A6.75 6.75 0 0 0 16 4.25Zm5.25 8V11a5.25 5.25 0 1 0-10.5 0v1.25h10.5Zm-12 1.5h-.5v11.5h14.5v-11.5h-14Z",fill:"currentColor"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M16.05 17v5"})]}),Bit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Logo"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.51192 5.51917H18.4063L29.6465 26.5192H20.7522L9.51192 5.51917ZM14.4611 20.2886C14.4611 23.7296 11.6716 26.5191 8.23054 26.5191C4.78951 26.5191 2 23.7296 2 20.2886C2 16.8476 4.78951 14.058 8.23054 14.058C11.6716 14.058 14.4611 16.8476 14.4611 20.2886Z",fill:"currentColor"})]}),Uit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Markets"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.5 28.5v-24h-15v15.205L9.504 16.63 3.5 21.246V28.5h25ZM19.977 8H17v3.976h2.977V8ZM17 15h2.977v3.977H17V15Zm7.977-7H22v3.976h2.977V8ZM22 15h2.977v3.977H22V15ZM8.004 22h3v3h-3v-3Z",fill:"currentColor"})]}),Vit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Menu"}),I("path",{vectorEffect:"non-scaling-stroke",stroke:"currentColor",strokeWidth:"1.5",d:"M4 10.25h24M4 21.25h24"})]}),Hit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Message"}),I("path",{d:"M8.948 18 4 22V6a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H8.948Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),I("path",{d:"M10 18v5a1 1 0 0 0 1 1h12.052L28 28V12a1 1 0 0 0-1-1h-5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),jit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Mic"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 2C12.4735 2 9.55612 4.60771 9.07089 8H13V10H9V13H13V15H9.07089C9.55612 18.3923 12.4735 21 16 21C19.866 21 23 17.866 23 14V9C23 5.13401 19.866 2 16 2ZM26.9941 18.2579C26.9938 18.2583 26.9936 18.2587 28 19C29.0065 19.7413 29.0061 19.7418 29.0058 19.7422L29.0051 19.7432L29.0033 19.7457L28.9984 19.7522L28.9838 19.7716C28.9718 19.7874 28.9555 19.8088 28.9348 19.8354C28.8934 19.8885 28.8346 19.9625 28.7587 20.0543C28.6069 20.2379 28.386 20.4936 28.0986 20.7971C27.5246 21.403 26.6791 22.2061 25.5803 23.0092C23.6122 24.4476 20.7923 25.9128 17.25 26.1996V30.2156H14.75V26.1996C11.2077 25.9128 8.38783 24.4476 6.41975 23.0092C5.32093 22.2061 4.47541 21.403 3.90146 20.7971C3.61399 20.4936 3.39318 20.2379 3.24137 20.0543C3.16542 19.9625 3.10662 19.8885 3.06525 19.8354C3.04456 19.8088 3.02822 19.7874 3.01626 19.7716L3.00162 19.7522L2.99677 19.7457L2.99496 19.7432L2.99421 19.7422C2.99388 19.7418 2.99357 19.7413 4.00002 19C5.00646 18.2587 5.00618 18.2583 5.00592 18.2579L5.00959 18.2628C5.01482 18.2697 5.02422 18.282 5.03775 18.2994C5.06482 18.3342 5.10837 18.3891 5.16807 18.4613C5.28756 18.6058 5.47125 18.8189 5.71654 19.0779C6.20814 19.597 6.94127 20.2939 7.89488 20.9908C9.80544 22.3871 12.5522 23.75 16 23.75C19.4478 23.75 22.1946 22.3871 24.1051 20.9908C25.0588 20.2939 25.7919 19.597 26.2835 19.0779C26.5288 18.8189 26.7125 18.6058 26.832 18.4613C26.8917 18.3891 26.9352 18.3342 26.9623 18.2994C26.9692 18.2906 26.975 18.283 26.9797 18.2768C26.9843 18.2709 26.9879 18.2662 26.9904 18.2628L26.9941 18.2579Z",fill:"currentColor"})]}),zit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Muted mic"}),I("path",{d:"M11 8a5 5 0 0 1 10 0v7a5 5 0 0 1-10 0V8Z",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M7 14v5a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5v-5M15.95 24v5M5.476 24.463l21-20.5",stroke:"currentColor",strokeWidth:"1.5"})]}),Git=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Unmuted mic"}),I("path",{d:"M11 8a5 5 0 0 1 10 0v7a5 5 0 0 1-10 0V8Z",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M7 14v5a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5v-5M15.95 24v5",stroke:"currentColor",strokeWidth:"1.5"})]}),Wit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Minus"}),I("path",{d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M11.333 16h9.334",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]}),qit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"More"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 16a2 2 0 1 0-4 0 2 2 0 0 0 4 0Zm10.4 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Zm8.4-2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z",fill:"currentColor"})]}),Kit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Music"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 7L29 2L29 8L29 9L29 20H28.9725C28.9907 20.1642 29 20.331 29 20.5C29 22.9853 26.9853 25 24.5 25C22.0147 25 20 22.9853 20 20.5C20 18.0147 22.0147 16 24.5 16C25.2184 16 25.8975 16.1684 26.5 16.4678V9.6579L12.5 13.3421V23H12.478C12.4926 23.1471 12.5 23.2964 12.5 23.4473C12.5 25.9326 10.4853 27.9473 8 27.9473C5.51472 27.9473 3.5 25.9326 3.5 23.4473C3.5 20.962 5.51472 18.9473 8 18.9473C8.71842 18.9473 9.39752 19.1157 10 19.4151V12H10V7Z",fill:"currentColor"})]}),Yit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Newsletter"}),I("path",{d:"M11 12h13M11 16h13M11 20h13",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M4 26a2 2 0 0 0 2-2V6h23v18a2 2 0 0 1-2 2H4Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),I("path",{d:"M4 26a2 2 0 0 1-2-2V10",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})]}),Zit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Next"}),I("path",{d:"M26 3v26",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M25 16 5.5 27.258V4.742L25 16Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),Qit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Pause"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 5H7v22h7V5Zm11 0h-7v22h7V5Z",fill:"currentColor"})]}),Xit=be("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",focu
222sable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Pause"}),I("rect",{width:"20",height:"20",rx:"10",fill:"currentColor"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.25 5.875H6.625V14.125H9.25V5.875ZM13.375 5.875H10.75V14.125H13.375V5.875Z",fill:"white"})]}),Jit=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"People"}),I("circle",{cx:"16",cy:"11",r:"6",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M27 27v-6H5v6",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"})]}),est=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Phone"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M8 4h16v24H8zM12 25.25h8"})]}),tst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Placeholder"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",d:"M5 5h22v22H5z"}),I("path",{d:"m12.464 12.464 7.072 7.071m-7.072 0 7.072-7.07",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),nst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Play"}),I("path",{d:"M29 16L9.5 27.2583L9.5 4.74167L29 16Z",fill:"currentColor"})]}),rst=be("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",focu
222sable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Play"}),I("rect",{y:"0.5",width:"20",height:"20",rx:"10",fill:"currentColor"}),I("path",{d:"M14.875 10.5L7.5625 14.7219L7.5625 6.27813L14.875 10.5Z",fill:"white"})]}),ist=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Plus"}),I("path",{d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M16 11v10m-5-5h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),sst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Previous"}),I("path",{d:"M5.5 3v26",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M6.5 16 26 27.258V4.742L6.5 16Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),ast=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Profile"}),I("path",{d:"M8.994 10a7 7 0 1 0 14 0 7 7 0 0 0-14 0Z",fill:"currentColor"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.469 27.783 3.494 27c-.975-.782-.974-.782-.974-.783l.001-.001.002-.003.006-.007.015-.018a4.734 4.734 0 0 1 .22-.25c.148-.16.362-.38.642-.638a15.751 15.751 0 0 1 2.507-1.87c2.232-1.35 5.578-2.68 10.081-2.68 4.504 0 7.85 1.33 10.082 2.68a15.75 15.75 0 0 1 2.506 1.87 11.339 11.339 0 0 1 .814.83l.049.058.015.018.006.007.002.003c.001.002.002.002-.974.784-.975.782-.974.782-.974.783a8.81 8.81 0 0 0-.632-.646 13.245 13.245 0 0 0-2.107-1.568c-1.896-1.148-4.8-2.319-8.787-2.319-3.987 0-6.89 1.17-8.786 2.32a13.247 13.247 0 0 0-2.107 1.568 8.78 8.78 0 0 0-.611.62 1.864 1.864 0 0 0-.022.026v-.001Zm0 0-.002.002v.001l.001-.002Zm23.051 0a.051.051 0 0 0 .003.003h-.001l-.001-.002Z",fill:"currentColor"})]}),ost=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Progress"}),be("g",{children:[I("path",{d:"M16 29c7.18 0 13-5.82 13-13S23.18 3 16 3 3 8.82 3 16s5.82 13 13 13Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square",d:"M13.75 11.75v8.5M18.75 11.75v8.5"})]}),I("path",{d:"M16 29C8.82 29 3 23.18 3 16S8.82 3 16 3",opacity:".6",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"square"})]}),lst=be("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Queue"}),I("line",{x1:"3.75",y1:"5.0625",x2:"20.25",y2:"5.0625",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("line",{x1:"3.75",y1:"11.8125",x2:"10.5",y2:"11.8125",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("line",{x1:"3.75",y1:"18.5625",x2:"10.125",y2:"18.5625",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("path",{d:"M22.5 15.375L15.75 20.25L15.75 10.5L22.5 15.375Z",fill:"currentColor"})]}),ust=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Add to queue"}),I("path",{d:"M24 16V26M19 21H29",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"square"}),I("line",{x1:"4.75",y1:"7",x2:"27.25",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("line",{x1:"4.75",y1:"16",x2:"14.25",y2:"16",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("line",{x1:"4.75",y1:"25",x2:"13.75",y2:"25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),cst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Remove from queue"}),I("path",{d:"M21.4642 17.4645L28.5353 24.5355M21.4642 24.5355L28.5353 17.4645",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"square"}),I("line",{x1:"4.75",y1:"7",x2:"27.25",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("line",{x1:"4.75",y1:"16",x2:"14.25",y2:"16",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("line",{x1:"4.75",y1:"25",x2:"13.75",y2:"25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),dst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Reaction"}),I("path",{d:"M26.912 21A11.956 11.956 0 0 0 28 16c0-6.627-5.373-12-12-12S4 9.373 4 16s5.373 12 12 12c.985 0 1.943-.119 2.86-.343",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M21 17a5 5 0 0 1-10 0",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM20 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"currentColor"}),I("path",{d:"M24 22.5v5M21.5 25h5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),fst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Report"}),I("path",{d:"m4 11 7-7h10l7 7v10l-7 7H11l-7-7V11ZM16 9.5v8",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("circle",{cx:"16",cy:"21",r:"1",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"})]}),hst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Search"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.022 19.264A8.1 8.1 0 1 0 20.041 8.402 8.1 8.1 0 0 0 8.022 19.264Zm12.172 1.93A9.6 9.6 0 0 1 7.594 6.71a9.6 9.6 0 0 1 13.56.685c3.298 3.65 3.272 9.137.112 12.75l5.795 5.794L26 27l-5.806-5.806Z",fill:"currentColor"})]}),pst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Search"}),I("circle",{cx:"15.5",cy:"15.5",r:"11.25",stroke:"currentColor",strokeWidth:"2.5"}),I("path",{d:"m24 24 4 4",stroke:"currentColor",strokeWidth:"2.5"})]}),gst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Share"}),I("path",{d:"M13 11H7v16h18V11h-6",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m16.578 2.22-.53-.53-.53.53-3.65 3.649-.53.53 1.06 1.06.531-.53 2.368-2.367-.047 12.435-.003.75 1.5.006.003-.75.047-12.443 2.322 2.322.53.53 1.06-1.06-.53-.531-3.6-3.601Z",fill:"currentColor"})]}),mst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Shield"}),I("path",{d:"M4.515 8.515S10.675 7.03 16 3.03c5.326 4 11.485 5.485 11.485 5.485S29.711 25 16 28C2.289 25 4.515 8.515 4.515 8.515Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"m11.452 15.72 3.639 3.143 5.79-6.82",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),vst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Sort"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m8.47 23.697.53.53.53-.53 4.834-4.833.53-.53-1.06-1.061-.531.53-3.553 3.553V7.25h-1.5v14.106l-3.553-3.553-.53-.53-1.061 1.06.53.53 4.834 4.834ZM22.47 7.47l.53-.53.53.53 4.834 4.833.53.53-1.06 1.061-.531-.53L23.75 9.81v14.106h-1.5V9.811l-3.553 3.553-.53.53-1.061-1.06.53-.531L22.47 7.47Z",fill:"currentColor"})]}),yst=be("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Sort Arrows"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.96945 10.1142L3.49978 10.6445L4.03011 10.1142L6.44676 7.69754L6.97709 7.16721L5.91643 6.10655L5.3861 6.63688L4.24978 7.77321L4.24978 2.00053L4.24978 1.25053L2.74978 1.25053L2.74978 2.00053L2.74978 7.77321L1.61345 6.63688L1.08312 6.10655L0.0224608 7.16721L0.552791 7.69754L2.96945 10.1142Z",fill:"white",fillOpacity:"0.6"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.96945 1.46978L10.4998 0.939453L11.0301 1.46978L13.4468 3.88644L13.9771 4.41677L12.9164 5.47743L12.3861 4.9471L11.2498 3.81077L11.2498 9.58381L11.2498 10.3338L9.74978 10.3338L9.74978 9.58381L9.74978 3.81077L8.61345 4.9471L8.08312 5.47743L7.02246 4.41677L7.55279 3.88644L9.96945 1.46978Z",fill:"white",fillOpacity:"0.6"})]}),bst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Sound system"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M7 4h18v24H7z"}),I("circle",{cx:"16",cy:"9",r:"2",fill:"currentColor"}),I("circle",{cx:"16",cy:"19",r:"5",stroke:"currentColor",strokeWidth:"1.5"})]}),Sst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Sports"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.5418 5.43043C27.5418 5.43043 28.2492 8.64383 27.8455 12.6654C24.6103 11.0043 21.964 8.35839 20.3024 5.12355C24.326 4.72117 27.5418 5.43043 27.5418 5.43043ZM18.2928 5.41452C20.2061 9.47537 23.4927 12.7617 27.5538 14.6745C26.9902 17.6052 25.7486 20.7376 23.2201 23.2662C20.6844 25.802 17.552 27.0398 14.6273 27.5966C12.7174 23.5437 9.43949 20.2624 5.38901 18.3482C5.93707 15.4163 7.1673 12.2797 9.70051 9.74637C12.2287 7.21807 15.3614 5.97725 18.2928 5.41452ZM12.6157 27.8838C10.9596 24.6622 8.3267 22.0252 5.10822 20.3639C4.73156 24.368 5.45906 27.5618 5.45906 27.5618C5.45906 27.5618 8.63135 28.2724 12.6157 27.8838ZM19.1323 12.4736L12.5005 19.154L13.8682 20.5177L20.5 13.8373L19.1323 12.4736Z",fill:"currentColor"})]}),Est=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Stop"}),I("path",{fill:"currentColor",d:"M5 5h22v22H5z"})]}),Tst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Thumbs down"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m15.421 26.541-.526.132-.29-.459-5.524-8.746H3V5h23.421l.093.644 1.915 13.361.122.857H19.82v5.58l-.568.142-3.83.957ZM10.245 6.5H25.12l1.7 11.862H18.319v5.909l-2.735.684-5.34-8.454V6.5Zm-1.5 0v9.468H4.5V6.5h4.245Z",fill:"currentColor"})]}),Ast=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Thumbs down"}),I("path",{d:"M3.75 16.827h4.5V5.86h-4.5v10.968ZM15.24 25.923l-5.745-9.096V5.86H25.77l1.915 13.362H19.07v5.744l-3.83.958Z",fill:"currentColor"})]}),wst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Thumbs up"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.421 5.132 14.895 5l-.29.459-5.524 8.746H3v12.468h23.421l.093-.644 1.915-13.361.122-.857H19.82v-5.58l-.568-.142-3.83-.957Zm-5.176 20.041H25.12l1.7-11.862H18.319V7.402l-2.735-.684-5.34 8.454v10.001Zm-1.5 0v-9.468H4.5v9.468h4.245Z",fill:"currentColor"})]}),_st=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Thumbs up"}),I("path",{d:"M3.75 14.955h4.5v10.968h-4.5V14.955ZM15.24 5.86l-5.745 9.095v10.968H25.77l1.915-13.362H19.07V6.817l-3.83-.958Z",fill:"currentColor"})]}),Cst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Ticket"}),I("path",{d:"M28 8h.75v-.75H28V8ZM4 8v-.75h-.75V8H4Zm24 4.126.187.726.563-.145v-.581H28Zm0 7.748h.75v-.581l-.563-.145-.187.726ZM28 24v.75h.75V24H28ZM4 24h-.75v.75H4V24Zm0-4.064-.133-.738-.617.111v.627H4Zm0-7.872h-.75v.627l.617.11.133-.737ZM28 7.25H4v1.5h24v-1.5Zm.75 4.876V8h-1.5v4.126h1.5Zm-3 3.874a3.252 3.252 0 0 1 2.437-3.148l-.374-1.452A4.752 4.752 0 0 0 24.25 16h1.5Zm2.437 3.148A3.252 3.252 0 0 1 25.75 16h-1.5a4.752 4.752 0 0 0 3.563 4.6l.374-1.452ZM28.75 24v-4.126h-1.5V24h1.5ZM4 24.75h24v-1.5H4v1.5Zm-.75-4.814V24h1.5v-4.064h-1.5ZM6.536 16a3.251 3.251 0 0 1-2.67 3.198l.267 1.476A4.751 4.751 0 0 0 8.036 16h-1.5Zm-2.67-3.198A3.251 3.251 0 0 1 6.537 16h1.5a4.751 4.751 0 0 0-3.903-4.675l-.266 1.477ZM3.25 8v4.064h1.5V8h-1.5Z",fill:"currentColor"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M11.75 8v16"})]}),xst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Time"}),I("path",{d:"M16 28c6.627 0 12-5.373 12-12S22.627 4 16 4 4 9.373 4 16s5.373 12 12 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10"}),I("path",{d:"M16.75 10v-.75h-1.5V10h1.5ZM16 16h-.75v.75H16V16Zm6 .75h.75v-1.5H22v1.5ZM15.25 10v6h1.5v-6h-1.5Zm.75 6.75h6v-1.5h-6v1.5Z",fill:"currentColor"})]}),Ist=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Trash"}),I("path",{d:"M8 9.5v18h16v-18M14 15v6M18 15v6M5.75 9.25h20.5M11 8.5V5h10v3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})]}),Ost=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Trending"}),I("path",{d:"M29 7 17 19l-5-5-9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),I("path",{d:"M29 15V7h-8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Pst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Twitter logo"}),I("path",{d:"M26.198 11.228c.016.228.016.456.016.686C26.214 18.92 20.88 27 11.128 27v-.004A15.01 15.01 0 0 1 3 24.619a10.647 10.647 0 0 0 7.847-2.198 5.309 5.309 0 0 1-4.953-3.682 5.286 5.286 0 0 0 2.393-.091 5.303 5.303 0 0 1-4.253-5.197v-.068a5.27 5.27 0 0 0 2.407.664A5.309 5.309 0 0 1 4.8 6.967a15.049 15.049 0 0 0 10.927 5.54 5.308 5.308 0 0 1 9.036-4.836 10.64 10.64 0 0 0 3.367-1.287 5.323 5.323 0 0 1-2.33 2.932 10.545 10.545 0 0 0 3.044-.835 10.771 10.771 0 0 1-2.646 2.747Z",fill:"currentColor"})]}),Rst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Upload"}),I("path",{d:"M22 21.23h1.891c3.185 0 5.109-1.927 5.109-4.481 0-2.147-1.25-3.887-3.272-4.712C25.75 7.369 22.435 4 18.196 4c-2.772 0-4.783 1.486-6.033 3.336-2.38-.639-5.304 1.21-5.38 4.14C4.457 11.86 3 13.797 3 16.275c0 2.752 2.043 4.953 5.424 4.953h2.701",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m16.256 13.78.53-.53.53.53 3.298 3.298.53.53-1.06 1.061-.53-.53-2.018-2.018v10.956h-1.5V16.121l-2.017 2.018-.53.53-1.061-1.06.53-.53 3.298-3.299Z",fill:"currentColor"})]}),Lst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Video"}),I("path",{fill:"currentColor",d:"M4 7h16.5v18H4zM28 10l-7.5 3v6l7.5 3V10Z"})]}),Dst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Volume"}),I("path",{d:"m7 12 8-7v23l-8-7H2v-9h5ZM18 19c1.5 0 2.5-1.12 2.5-2.5S19.5 14 18 14",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M18 23.5c3.5 0 7-2.5 7-7s-3.5-7-7-7",stroke:"currentColor",strokeWidth:"1.5"}),I("path",{d:"M18 28c5.35 0 11.5-4.619 11.5-11.5S23.35 5 18 5",stroke:"currentColor",strokeWidth:"1.5"})]}),kst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Volume muted"}),be("g",{opacity:".6",stroke:"currentColor",strokeWidth:"1.5",children:[I("path",{d:"m7 12 8-7v23l-8-7H2v-9h5ZM18 19c1.5 0 2.5-1.12 2.5-2.5S19.5 14 18 14"}),I("path",{d:"M18 23.5c3.5 0 7-2.5 7-7s-3.5-7-7-7"}),I("path",{d:"M18 28c5.35 0 11.5-4.619 11.5-11.5S23.35 5 18 5"})]}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"m1.47 30.47 29-29"})]}),Nst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"Website"}),I("path",{d:"M27.25 16c0 6.213-5.037 11.25-11.25 11.25v1.5c7.042 0 12.75-5.708 12.75-12.75h-1.5ZM16 27.25C9.787 27.25 4.75 22.213 4.75 16h-1.5c0 7.042 5.708 12.75 12.75 12.75v-1.5ZM4.75 16C4.75 9.787 9.787 4.75 16 4.75v-1.5C8.958 3.25 3.25 8.958 3.25 16h1.5ZM16 4.75c6.213 0 11.25 5.037 11.25 11.25h1.5c0-7.042-5.708-12.75-12.75-12.75v1.5Z",fill:"currentColor"}),I("path",{d:"M20.5 16c0 3.235-.575 6.128-1.475 8.185-.45 1.029-.967 1.815-1.503 2.333-.532.514-1.045.732-1.522.732v1.5c.973 0 1.84-.454 2.565-1.154.72-.696 1.335-1.668 1.834-2.81C21.4 22.499 22 19.392 22 16h-1.5ZM16 27.25c-.477 0-.99-.218-1.522-.732-.536-.518-1.053-1.304-1.503-2.333-.9-2.057-1.475-4.95-1.475-8.185H10c0 3.392.6 6.499 1.6 8.786.5 1.142 1.115 2.114 1.835 2.81.724.7 1.592 1.154 2.565 1.154v-1.5ZM11.5 16c0-3.235.575-6.128 1.475-8.185.45-1.029.967-1.815 1.503-2.333.532-.514 1.045-.732 1.522-.732v-1.5c-.973 0-1.84.454-2.565 1.154-.72.696-1.335 1.668-1.834 2.81C10.6 9.501 10 12.608 10 16h1.5ZM16 4.75c.477 0 .99.218 1.522.732.536.518 1.053 1.304 1.503 2.333.9 2.057 1.475 4.95 1.475 8.185H22c0-3.392-.6-6.499-1.6-8.786-.5-1.142-1.115-2.114-1.835-2.81-.724-.7-1.592-1.154-2.565-1.154v1.5Z",fill:"currentColor"}),I("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M4.923 12.481h22.154M4.923 19.866h22.154"})]}),Mst=be("svg",{width:"32",height:"33",viewBox:"0 0 32 32",fill:"none",role:"img",focu
222sable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"X logo"}),I("path",{d:"M 17.640625 14.921875 L 25.078125 6.25 L 23.316406 6.25 L 16.859375 13.78125 L 11.699219 6.25 L 5.75 6.25 L 13.550781 17.636719 L 5.75 26.730469 L 7.511719 26.730469 L 14.332031 18.777344 L 19.78125 26.730469 L 25.730469 26.730469 Z M 15.226562 17.738281 L 14.4375 16.601562 L 8.148438 7.582031 L 10.855469 7.582031 L 15.929688 14.863281 L 16.71875 15.996094 L 23.316406 25.460938 L 20.609375 25.460938 Z M 15.226562 17.738281 ",fill:"currentColor"})]}),Fst=be("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",children:[I("title",{children:"YouTube logo"}),I("path",{d:"M25.39 6H6.64a5.656 5.656 0 0 0-3.986 1.607A5.481 5.481 0 0 0 1 11.524v8.123a5.48 5.48 0 0 0 1.633 3.925A5.654 5.654 0 0 0 6.61 25.2h18.75a5.656 5.656 0 0 0 3.986-1.607A5.481 5.481 0 0 0 31 19.675v-8.123a5.48 5.48 0 0 0-1.633-3.925A5.655 5.655 0 0 0 25.39 6ZM22 15.94l-9.12 4.563a.418.418 0 0 1-.419.01.405.405 0 0 1-.211-.357v-9.112c0-.148.08-.285.211-.357a.418.418 0 0 1 .419.01L22 15.238a.412.412 0 0 1 0 .702Z",fill:"currentColor"})]});var en=(t=>(t.Account="Account",t.Advertisement="Advertisement",t.Apple="Apple",t.ArrowDown="ArrowDown",t.Back15="Back15",t.Back="Back",t.BellFilled="BellFilled",t.Bell="Bell",t.Bluetooth="Bluetooth",t.Broadcast="Broadcast",t.Calendar="Calendar",t.Call="Call",t.CaretContained="CaretContained",t.CaretDown="CaretDown",t.CaretLeft="CaretLeft",t.CaretRight="CaretRight",t.CaretUp="CaretUp",t.Check="Check",t.CloseCircle="CloseCircle",t.Close="Close",t.Code="Code",t.Completed="Completed",t.Computer="Computer",t.CopyLink="CopyLink",t.Detail="Detail",t.Download="Download",t.Downloaded="Downloaded",t.Email="Email",t.ExitFullScreen="ExitFullScreen",t.Facebook="Facebook",t.Forward15="Forward15",t.FullScreen="FullScreen",t.Gear="Gear",t.Google="Google",t.GotoBig="GotoBig",t.GotoCircle="GotoCircle",t.Handle="Handle",t.Headphone="Headphone",t.Headset="Headset",t.Heart="Heart",t.HeartFilled="HeartFilled",t.History="History",t.Home="Home",t.Info="Info",t.InfoBig="InfoBig",t.Instagram="Instagram",t.Key="Key",t.Leave="Leave",t.ListHandle="ListHandle",t.LiveLG="LiveLG",t.LiveSM="LiveSM",t.Live="Live",t.LiveTag="LiveTag",t.Location="Location",t.Location2="Location2",t.Lock="Lock",t.Logo="Logo",t.Markets="Markets",t.Menu="Menu",t.Message="Message",t.MicMuted="MicMuted",t.MicUnmuted="MicUnmuted",t.Mic="Mic",t.MinusCircle="MinusCircle",t.More="More",t.Music="Music",t.Newsletter="Newsletter",t.Next="Next",t.Pause="Pause",t.PauseCircle="PauseCircle",t.People="People",t.Phone="Phone",t.Placeholder="Placeholder",t.PlayMini="PlayMini",t.Play="Play",t.PlusCircle="PlusCircle",t.Previous="Previous",t.Profile="Profile",t.Progress="Progress",t.QueueAdd="QueueAdd",t.QueueRemove="QueueRemove",t.Queue="Queue",t.Reaction="Reaction",t.Report="Report",t.Search="Search",t.SearchNav="SearchNav",t.Share="Share",t.Shield="Shield",t.Sort="Sort",t.SortArrows="SortArrows",t.SoundSystem="SoundSystem",t.Sports="Sports",t.Stop="Stop",t.ThumbsDownFilled="ThumbsDownFilled",t.ThumbsDown="ThumbsDown",t.ThumbsUpFilled="ThumbsUpFilled",t.ThumbsUp="ThumbsUp",t.Ticket="Ticket",t.Time="Time",t.Trash="Trash",t.Trending="Trending",t.Twitter="Twitter",t.Upload="Upload",t.Video="Video",t.VolumeMuted="VolumeMuted",t.Volume="Volume",t.Website="Website",t.XLogo="XLogo",t.YouTube="YouTube",t))(en||{});const $st=t=>Object.values(en).includes(t),Bst={Broadcast:Wrt,Home:_it,Logo:Bit,Music:Kit,Mic:jit,Profile:ast,Sports:Sst,SearchNav:pst},Ust={Play:nst,Stop:Est,Pause:Qit,Previous:sst,Next:Zit,Back15:Hrt,Forward15:hit},Vst={Account:Frt,Advertisement:$rt,Apple:Brt,ArrowDown:Urt,Back:Vrt,BellFilled:zrt,Bell:jrt,Bluetooth:Grt,Calendar:qrt,Call:Krt,CaretContained:Yrt,CaretDown:Zrt,CaretLeft:Qrt,CaretRight:Xrt,CaretUp:Jrt,Check:eit,CloseCircle:nit,Close:tit,Code:rit,Completed:iit,Computer:sit,CopyLink:ait,Detail:oit,Download:lit,Downloaded:uit,Email:cit,ExitFullScreen:dit,Facebook:fit,FullScreen:pit,Gear:git,Google:mit,GotoBig:vit,GotoCircle:yit,Handle:bit,Headphone:Sit,Headset:Eit,Heart:Tit,HeartFilled:Ait,History:wit,Info:Cit,InfoBig:xit,Instagram:Iit,Key:Oit,Leave:Pit,ListHandle:Rit,LiveLG:Dit,LiveSM:kit,Live:Lit,LiveTag:Nit,Location:Mit,Location2:Fit,Lock:$it,Markets:Uit,Menu:Vit,Message:Hit,MicMuted:zit,MicUnmuted:Git,MinusCircle:Wit,More:qit,Newsletter:Yit,PauseCircle:Xit,People:Jit,Phone:est,Placeholder:tst,PlayMini:rst,PlusCircle:ist,Progress:ost,QueueAdd:u
222st,QueueRemove:cst,Queue:lst,Reaction:dst,Report:fst,Search:hst,Share:gst,Shield:mst,Sort:vst,SortArrows:yst,SoundSystem:bst,ThumbsDownFilled:Ast,ThumbsDown:Tst,ThumbsUpFilled:_st,ThumbsUp:wst,Ticket:Cst,Time:xst,Trash:Ist,Trending:Ost,Twitter:Pst,Upload:Rst,Video:Lst,VolumeMuted:kst,Volume:Dst,Website:Nst,XLogo:Mst,YouTube:Fst},Hst={...Bst,...Ust,...Vst},jst=t=>({"& svg":{height:t,width:t}}),zst={iconContainer:{display:"flex",alignItems:"center",justifyContent:"center"}},Gst=t=>t?Hst[t]:null,Yr=({ariaHidden:t=!1,iconColor:e,iconCss:n,iconCssDimensions:r,name:i,sizeInPx:s=20})=>{const a=Gst(i);return I("span",{css:[zst.iconContainer,jst(s),n,r],style:{color:e&&`${e}`,width:r?void 0:`${s}px`,height:r?void 0:`${s}px`},"aria-hidden":t,children:a})},Wst=t=>t.charAt(0).toLowerCase()+t.slice(1),j2=t=>`${t} ›`,qst=t=>`cubic-bezier(${t.join(", ")})`,Kst=t=>!(t.startsWith("http://")||t.startsWith("https://")),Yst=({children:t,href:e,linkCss:n,...r},i)=>{if(!e)return null;const s=!Kst(e),a=s?{rel:"noopener noreferrer",target:"_blank"}:{},o={css:n,ref:i,...r};return s?I("a",{href:e,...a,...o,children:t}):I(kFe,{to:e,...o,children:t})},Ww=$.forwardRef(Yst);var ahe=(t=>(t.Button="button",t.Submit="submit",t))(ahe||{}),Fi=(t=>(t.Anchor="Anchor",t.Button="Button",t))(Fi||{});const xd=({props:t,children:e,styles:n,ref:r})=>{const{ariaControls:i,ariaDescribedBy:s,ariaExpanded:a,ariaHasPopup:o,ariaHidden:l,ariaPosInSet:u,ariaPressed:c,ariaLabel:d,ariaSelected:f,ariaSetSize:h,as:g,className:v,id:b,onClick:S,onFocus:A,onKeyDown:w,onPointerDown:x,role:P,tabIndex:N,title:k,...U}=t,{href:H}=U,{isDisabled:B,type:q}=U,Z=g===Fi.Anchor,C={"aria-controls":i,"aria-describedby":s,"aria-hidden":l,"aria-label":d,"aria-posinset":u,"aria-selected":f,"aria-setsize":h,className:v,id:b,onClick:S,onFocus:A,onKeyDown:w,onPointerDown:x,role:P,tabIndex:N},L={...C,href:H,linkCss:n,ref:r},V={...C,"aria-controls":i,"aria-disabled":B,"aria-expanded":a,"aria-haspopup":o,"aria-pressed":c,css:n,disabled:B,type:q||ahe.Button,ref:r,title:k};return Z&&"href"in t?I(Ww,{...L,children:e}):I("button",{...V,children:e})};var ve=(t=>(t[t.Small=0]="Small",t[t.SmallMax=1]="SmallMax",t[t.Medium=2]="Medium",t[t.MediumMax=3]="MediumMax",t[t.Large=4]="Large",t[t.LargeMax=5]="LargeMax",t[t.ExtraLarge=6]="ExtraLarge",t[t.XXLarge=7]="XXLarge",t[t.XXXLarge=8]="XXXLarge",t))(ve||{});const Oi={0:0,1:599,2:600,3:1119,4:1120,5:1439,6:1440,7:1920,8:2560},Be=t=>`@media (min-width: ${Oi[t]}px)`,eu=t=>`@media (max-width: ${Oi[t]}px)`,h4=(t,e)=>`@media (min-width: ${Oi[t]}px) and (max-width: ${Oi[e]}px)`,Zst=t=>`@media (min-width: ${t}px) and (orientation: portrait)`,Dr=(t,e="&:hover")=>({"@media (hover: hover)":{[e]:t}}),tD=t=>({"@media (prefers-reduced-motion: reduce)":{...t}}),vF={mediumAndAbove:{[eu(1)]:{display:"none"},[Be(2)]:{display:"inherit"}},largeAndAbove:{[eu(3)]:{},[Be(4)]:{}},belowLarge:{[Be(4)]:{}},smallOnly:{[eu(1)]:{display:"inherit"},[Be(2)]:{display:"none"}},mediumOnly:{[eu(1)]:{},[h4(2,3)]:{},[Be(4)]:{}},largeOnly:{[eu(3)]:{},[h4(4,5)]:{},[Be(6)]:{}},extraLargeOnly:{[eu(5)]:{},[Be(6)]:{}}};function Qst(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function Xst(t,e,n){if(Lce())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&r1(i,n.prototype),i}function p4(t){var e=typeof Map=="function"?new Map:void 0;return p4=function(r){if(r===null||!Qst(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return Xst(r,arguments,$f(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r1(i,r)},p4(t)}var Bh=function(t){Moe(e,t);function e(n){var r;return r=t.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this,hg(r)}return e}(p4(Error));function yF(t){return Math.round(t*255)}function Jst(t,e,n){return yF(t)+","+yF(e)+","+yF(n)}function nD(t,e,n,r){if(r===void 0&&(r=Jst),e===0)return r(n,n,n);var i=(t%360+360)%360/60,s=(1-Math.abs(2*n-1))*e,a=s*(1-Math.abs(i%2-1)),o=0,l=0,u=0;i>=0&&i<1?(o=s,l=a):i>=1&&i<2?(o=a,l=s):i>=2&&i<3?(l=s,u=a):i>=3&&i<4?(l=a,u=s):i>=4&&i<5?(o=a,u=s):i>=5&&i<6&&(o=s,u=a);var c=n-s/2,d=o+c,f=l+c,h=u+c;return r(d,f,h)}var KZ={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
2220",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function eat(t){if(typeof t!="string")return t;var e=t.toLowerCase();return KZ[e]?"#"+KZ[e]:t}var tat=/^#[a-fA-F0-9]{6}$/,nat=/^#[a-fA-F0-9]{8}$/,rat=/^#[a-fA-F0-9]{3}$/,iat=/^#[a-fA-F0-9]{4}$/,bF=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,sat=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,aat=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,oat=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function iC(t){if(typeof t!="string")throw new Bh(3);var e=eat(t);if(e.match(tat))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(nat)){var n=parseFloat((parseInt(""+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16),alph
vendor: 1,139 bytes, line 222
222a:n}}if(e.match(rat))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};if(e.match(iat)){var r=parseFloat((parseInt(""+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16),alpha:r}}var i=bF.exec(e);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var s=sat.exec(e.substring(0,50));if(s)return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10),alpha:parseFloat(""+s[4])>1?parseFloat(""+s[4])/100:parseFloat(""+s[4])};var a=aat.exec(e);if(a){var o=parseInt(""+a[1],10),l=parseInt(""+a[2],10)/100,u=parseInt(""+a[3],10)/100,c="rgb("+nD(o,l,u)+")",d=bF.exec(c);if(!d)throw new Bh(4,e,c);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10)}}var f=oat.exec(e.substring(0,50));if(f){var h=parseInt(""+f[1],10),g=parseInt(""+f[2],10)/100,v=parseInt(""+f[3],10)/100,b="rgb("+nD(h,g,v)+")",S=bF.exec(b);if(!S)throw new Bh(4,e,b);return{red:parseInt(""+S[1],10),green:parseInt(""+S[2],10),blue:parseInt(""+S[3],10),alph
222a:parseFloat(""+f[4])>1?parseFloat(""+f[4])/100:parseFloat(""+f[4])}}throw new Bh(5)}function lat(t){var e=t.red/255,n=t.green/255,r=t.blue/255,i=Math.max(e,n,r),s=Math.min(e,n,r),a=(i+s)/2;if(i===s)return t.alpha!==void 0?{hue:0,saturation:0,lightness:a,alpha:t.alpha}:{hue:0,saturation:0,lightness:a};var o,l=i-s,u=a>.5?l/(2-i-s):l/(i+s);switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;default:o=(e-n)/l+4;break}return o*=60,t.alpha!==void 0?{hue:o,saturation:u,lightness:a,alpha:t.alpha}:{hue:o,saturation:u,lightness:a}}function Uv(t){return lat(iC(t))}var uat=function(e){return e.length===7&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e},g4=uat;function Uy(t){var e=t.toString(16);return e.length===1?"0"+e:e}function SF(t){return Uy(Math.round(t*255))}function cat(t,e,n){return g4("#"+SF(t)+SF(e)+SF(n))}function ohe(t,e,n){return nD(t,e,n,cat)}function dat(t,e,n){if(typeof t=="object"&&e===void 0&&n===void 0)return ohe(t.hue,t.saturation,t.lightness);throw new Bh(1)}function fat(t,e,n,r){if(typeof t=="object"&&e===void 0&&n===void 0&&r===void 0)return t.alpha>=1?ohe(t.hue,t.saturation,t.lightness):"rgba("+nD(t.hue,t.saturation,t.lightness)+","+t.alpha+")";throw new Bh(2)}function lhe(t,e,n){if(typeof t=="number"&&typeof e=="number"&&typeof n=="number")return g4("#"+Uy(t)+Uy(e)+Uy(n));if(typeof t=="object"&&e===void 0&&n===void 0)return g4("#"+Uy(t.red)+Uy(t.green)+Uy(t.blue));throw new Bh(6)}function z2(t,e,n,r){if(typeof t=="object"&&e===void 0&&n===void 0&&r===void 0)return t.alpha>=1?lhe(t.red,t.green,t.blue):"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")";throw new Bh(7)}var hat=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},pat=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},gat=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},mat=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function Vv(t){if(typeof t!="object")throw new Bh(8);if(pat(t))return z2(t);if(hat(t))return lhe(t);if(mat(t))return fat(t);if(gat(t))return dat(t);throw new Bh(8)}function uhe(t,e,n){return function(){var i=n.concat(Array.prototype.slice.call(arguments));return i.length>=e?t.apply(this,i):uhe(t,e,i)}}function Vc(t){return uhe(t,t.length,[])}function vat(t,e){if(e==="transparent")return e;var n=Uv(e);return Vv(lu({},n,{hue:n.hue+parseFloat(t)}))}Vc(vat);function ST(t,e,n){return Math.max(t,Math.min(e,n))}function yat(t,e){if(e==="transparent")return e;var n=Uv(e);return Vv(lu({},n,{lightness:ST(0,1,n.lightness-parseFloat(t))}))}Vc(yat);function bat(t,e){if(e==="transparent")return e;var n=Uv(e);return Vv(lu({},n,{saturation:ST(0,1,n.saturation-parseFloat(t))}))}Vc(bat);function Sat(t,e){if(e==="transparent")return e;var n=Uv(e);return Vv(lu({},n,{lightness:ST(0,1,n.lightness+parseFloat(t))}))}Vc(Sat);function Eat(t,e,n){if(e==="transparent")return n;if(n==="transparent")return e;if(t===0)return n;var r=iC(e),i=lu({},r,{alpha:typeof r.alpha=="number"?r.alpha:1}),s=iC(n),a=lu({},s,{alpha:typeof s.alpha=="number"?s.alpha:1}),o=i.alpha-a.alpha,l=parseFloat(t)*2-1,u=l*o===-1?l:l+o,c=1+l*o,d=(u/c+1)/2,f=1-d,h={red:Math.floor(i.red*d+a.red*f),green:Math.floor(i.green*d+a.green*f),blue:Math.floor(i.blue*d+a.blue*f),alpha:i.alpha*parseFloat(t)+a.alpha*(1-parseFloat(t))};return z2(h)}var Tat=Vc(Eat),TV=Tat;function Aat(t,e){if(e==="transparent")return e;var n=iC(e),r=typeof n.alpha=="number"?n.alpha:1,i=lu({},n,{alpha:ST(0,1,(r*100+parseFloat(t)*100)/100)});return z2(i)}Vc(Aat);function wat(t,e){if(e==="transparent")return e;var n=Uv(e);return Vv(lu({},n,{saturation:ST(0,1,n.saturation+parseFloat(t))}))}Vc(wat);function _at(t,e){return e==="transparent"?e:Vv(lu({},Uv(e),{hue:parseFloat(t)}))}Vc(_at);function Cat(t,e){return e==="transparent"?e:Vv(lu({},Uv(e),{lightness:parseFloat(t)}))}Vc(Cat);function xat(t,e){return e==="transparent"?e:Vv(lu({},Uv(e),{saturation:parseFloat(t)}))}Vc(xat);function Iat(t,e){return e==="transparent"?e:TV(parseFloat(t),"rgb(0, 0, 0)",e)}Vc(Iat);function Oat(t,e){return e==="transparent"?e:TV(parseFloat(t),"rgb(255, 255, 255)",e)}Vc(Oat);function Pat(t,e){if(e==="transparent")return e;var n=iC(e),r=typeof n.alpha=="number"?n.alpha:1,i=lu({}
222,n,{alpha:ST(0,1,+(r*100-parseFloat(t)*100).toFixed(2)/100)});return z2(i)}var Rat=Vc(Pat),Za=Rat;const Wl={black:"#000000",transparent:"transparent",transparentWhite:"#ffffff00",semitransparentWhite30:"#ffffff4D",white:"#ffffff"},cw={grey33:"#333333",grey66:"#666666",grey75:"#757575",grey80:"#808080",greyA6:"#A6A6A6",greyAA:"#aaaaaa",greyC5:"#C5C4C1",greyDF:"#DFDEDD",greyEB:"#EBEBEB"},m4={black08:Za(.92,Wl.black),black15:Za(.85,Wl.black),black40:Za(.6,Wl.black),black50:Za(.5,Wl.black),black60:Za(.4,Wl.black),white15:Za(.85,Wl.white),white18:Za(.82,Wl.white),white25:Za(.75,Wl.white),white30:Za(.7,Wl.white),white50:Za(.5,Wl.white),white60:Za(.4,Wl.white),white70:Za(.3,Wl.white),white80:Za(.2,Wl.white)},Ph={audacyCioccolato:"#673F2E",audacyDarkNavy:"#090527",audacyDarkPurple:"#0D0C24",audacyMatisse:"#395773",audacyOrange:"#FE5000",audacyOrange2:"#FE7333",audacyOrange3:"#FFB999",audacyBlue:"#3333C3",error:"#FA4949",audacyCrimson:"#E21C39",lines:m4.white15,mediumGray:cw.greyA6,secondaryBrightSpruceGreen:"#2EC5A6",secondaryCopy:m4.white60,secondaryDeepBlue:"#11076F",secondaryDeepBlue2:"#0F0FA1",secondaryDeepBlue2_5:"#003594",secondaryDeepBlue3:"#0068B2",secondaryDusk:"#1F2772",secondaryDusk2:"#363FB2",secondaryDusk3:"#6879E0",secondaryDusk4:"#0267B2",secondaryEndeavour:"#0062B8",secondaryError:"#E12727",secondaryGrannySmithApple:"#99E18B",secondaryLightGrey:cw.greyC5,secondaryLightGrey2:cw.greyDF,secondaryLilac:"#9E9EDD",secondaryLilac2:"#B3B0E2",secondaryLilac3:"#D2D1ED",secondaryMartinique:"#2f2949",secondaryMediumBlue:"#005FAE",secondaryMediumGrey:cw.grey80,secondaryMustard:"#CDB300",secondaryMustard2:"#DFC746",secondaryPurple:"#7A3BCB",secondaryPurple2:"#9466DD",secondarySilicaSea:"#6FE2DE",secondarySpruceGreen:"#024239",secondarySpruceGreen2:"#078574",secondarySpruceGreen3:"#2EC5A6",success:"#57DC94",liked:"#FC659C"},Lat={audacyDarkNavy10:Za(.9,Ph.audacyDarkNavy),audacyDarkNavy15:Za(.85,Ph.audacyDarkNavy),audacyDarkNavy20:Za(.8,Ph.audacyDarkNavy),audacyDarkNavy60:Za(.4,Ph.audacyDarkNavy),audacyDarkNavy70:Za(.3,Ph.audacyDarkNavy),audacyDarkNavy95:Za(.05,Ph.audacyDarkNavy),white07:Za(.93,Wl.white)},_e={...m4,...Ph,...Wl,...Lat,...cw},Ng={fullWhite:`1px solid ${_e.white}`,input:`1px solid ${_e.white30}`,separator:`1px solid ${_e.white15}`},Dat={coarsePointer:44,finePointer:24},kat=4,vc={minButtonSize:Dat,borderRadius:kat},che={cb1:[.19,1,.22,1]},Nat={ease:"ease",cb1:qst(che.cb1)},AV={default:Nat.ease},Mat={navigation:che.cb1},yv={playerContainer:`linear-gradient(180deg, ${_e.transparent} 0%, ${_e.audacyDarkNavy} 100%)`,playerOverflowText:`linear-gradient(to right, ${_e.black} 70%, ${_e.transparent} 100%)`,premium:`linear-gradient(0deg, ${_e.audacyDarkNavy10}, ${_e.audacyDarkNavy10}), linear-gradient(90deg, ${_e.secondaryPurple2} 5.46%, ${_e.audacyOrange} 100%)`,premiumHover:`linear-gradient(0deg, ${_e.audacyDarkNavy20}, ${_e.audacyDarkNavy20}), linear-gradient(90deg, ${_e.secondaryPurple2} 5.46%, ${_e.audacyOrange2} 100%)`,premiumSecondary:`linear-gradient(to right, ${_e.secondaryPurple2}, ${_e.audacyOrange2})`,primaryHover:`linear-gradient(0deg, ${_e.audacyDarkNavy15}, ${_e.audacyDarkNavy15}), ${_e.audacyOrange}`},nv={[ve.Small]:{columnCount:5,gap:10},[ve.Medium]:{columnCount:8,gap:20},[ve.Large]:{columnCount:12,gap:20},[ve.ExtraLarge]:{columnCount:12,gap:20}},Iy={sm:20,md:42,lgLeft:38,lgRight:58},Fat=t=>100/t,jf={focus:`1px solid ${_e.white}`,focusDark:`1px solid ${_e.audacyDarkNavy}`},sC=2,Oy={ms0:0,ms250:.25,ms400:.4,ms500:.5},cu={none:Oy.ms0,default:Oy.ms250,navigationMenuOpen:Oy.ms400,navigationPanel:Oy.ms250,menuTooltip:Oy.ms500,drawer:Oy.ms500,pageTransitionIn:Oy.ms250},zs=[-1,0,100,200,300,400,500,600,700,800,900],$at=99999,Ai={hidden:zs[0],transitionBackgroundAfter:zs[0],carouselNav:zs[2],siblingOverlay:zs[2],optionsMenu:zs[2],stickyNav:zs[2],transitionBackground:zs[2],fullPlayerQueueHeader:zs[2],fullPlayerCloseButton:zs[2],editCta:zs[2],fullPlayerPanel:zs[3],transcriptContainer:zs[3],headerWithStickyNav:zs[4]+1,navigationBar:zs[5],miniPlayer:zs[6],navOverlay:zs[7],navigation:zs[8],navigationBarSmall:zs[5],navigationWithBranchJourney:$at+1,fullPlayer:zs[8],drawer:zs[9],skipToMainContent:zs[9],toast:zs[9],horizontalEntityCardPlayStateContainer:zs[1],liveIndicator:zs[4]},Bat=()=>
222({position:"relative","&::before":{content:'""',display:"block",height:"100%",left:"50%",minHeight:vc.minButtonSize.coarsePointer,minWidth:vc.minButtonSize.coarsePointer,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"100%","@media (pointer: fine)":{minHeight:vc.minButtonSize.finePointer,minWidth:vc.minButtonSize.finePointer}}}),Uat=t=>({position:"relative","&:before":{content:'""',display:"block",paddingTop:`${Fat(t)}%`,width:"100%"},"> *":{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}}),Vat=t=>({maskImage:`linear-gradient(${t}, rgba(0, 0, 0, 1.0) 25%, transparent)`,overflow:"hidden"}),dhe=(t,e=cu.default,n=AV.default)=>({transitionProperty:Array.isArray(t)?t.join(", "):t,transitionDuration:`${e}s`,transitionTimingFunction:n}),Hat=(t,e=_e.audacyDarkNavy,n=.15)=>({backgroundColor:t,...Dr({backgroundColor:TV(n,e,t)})}),jat=(t,e)=>({"&":{background:t||"transparent",zIndex:Ai.transitionBackground},"&::after":{...dhe("opacity"),background:e||"transparent",borderRadius:"inherit",content:'""',height:"100%",left:"0",opacity:"0",position:"absolute",top:"0",width:"100%",zIndex:Ai.transitionBackgroundAfter},...Dr({opacity:1},"&:hover::after")}),zat=({selector:t="",outlineOffset:e,outline:n}
222)=>({[`&:focus ${t}`]:{outline:n||jf.focus,outlineOffset:e||sC},[`&:focus:not(:focus-visible) ${t}`]:{outline:"none"},[`&:focus-visible ${t}`]:{outline:n||jf.focus,outlineOffset:e||sC}}),Gat=()=>({"&:focus":{outline:"none"},"&:focus-visible":{outline:"none"}}),Wat=()=>({width:"100%",height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"}),qat=(t=!1)=>({paddingLeft:Iy.sm,paddingRight:Iy.sm,[Be(ve.Medium)]:{paddingLeft:Iy.md,paddingRight:Iy.md},[Be(ve.Large)]:{paddingLeft:t?Iy.lgRight:Iy.lgLeft,paddingRight:Iy.lgRight}}),Kat={":hover":{"::-webkit-scrollbar-thumb":{border:"solid 4px transparent",borderRadius:14,boxShadow:`inset 0 0 14px 14px ${_e.white15}`}},"::-webkit-scrollbar-track":{boxShadow:"inset 0 0 14px 14px transparent",border:"solid 4px transparent"},"::-webkit-scrollbar":{width:14}},Yat=t=>({visibility:t?"visible":"hidden"}),Zat=t=>({display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",overflow:"hidden"}),Qat=(t,e,n)=>({backgroundColor:t,borderRadius:"50%",boxShadow:`0 0 ${n}px ${n}px ${t}`,height:1,opacity:e,width:1}),Xat=()=>({...tD({animationDelay:"-1ms !important",animationDuration:"1ms !important",animationIterationCount:"1 !important",backgroundAttachment:"initial !important",transitionDuration:"0s !important",transitionDelay:"0s !important"})}),Bt={accessibleMinButtonSize:Bat,aspectRatio:Uat,backgroundGradientStyle:Qat,focusOutline:zat,focusReset:Gat,fullScreenContainer:Wat,horizontalModulePadding:qat,overflowGradient:Vat,reduceMotion:Xat,transition:dhe,transitionMixBackgroundColor:Hat,transitionGradientBackground:jat,truncateText:Zat,verticalScrollBar:Kat,visibility:Yat},v4=t=>`linear-gradient(90deg, ${_e.white} 0%, ${_e.white} ${t}%, ${_e.white30} ${t}%, ${_e.white30} 100%)`,y4=12,Jat=t=>({"&::-webkit-slider-runnable-track":{background:v4(t)},"&::-moz-range-track":{background:v4(t)}}),mO={thumb:{appearance:"none",backgroundColor:_e.white,border:"none",borderRadius:"50%",height:y4,marginTop:-5,width:y4},track:{height:2,backgroundColor:_e.white30}},eot=({isThumbHidden:t})=>({"&::-webkit-slider-thumb":{...mO.thumb,opacity:t?0:1,transition:"opacity 0.3s ease"},"&::-moz-range-thumb":{...mO.thumb,opacity:t?0:1},"&::-webkit-slider-runnable-track":{...mO.track},"&::-moz-range-track":{...mO.track}}),D1={sliderBackground:Jat,sliderStyles:eot,getTrackBackground:v4,THUMB_WIDTH:y4},Ks={fontFamily:{maisonNeue:"Maison Neue, Helvetica Neue, Helvetica, Arial, sans-serif",maisonNeueExtended:"Maison Neue Extended, Helvetica Neue, Helvetica, Arial, sans-serif"},fontWeight:{normal:400,semi:600,bold:700}},Ls=(t,e,n=0)=>({fontSize:`${t/10}rem`,lineHeight:e/t,letterSpacing:`${n/100}em`}),tot={headlineLarge:{fontFamily:Ks.fontFamily.maisonNeueExtended,fontWeight:Ks.fontWeight.bold,...Ls(42,46),[Be(ve.Medium)]:{...Ls(52,57,-1)},[Be(ve.Large)]:{...Ls(80,80,-2)},[Be(ve.ExtraLarge)]:{...Ls(96,91,-2)}},headlineMedium:{fontFamily:Ks.fontFamily.maisonNeueExtended,fontWeight:Ks.fontWeight.bold,...Ls(34,37),[Be(ve.Medium)]:{...Ls(42,50,-1)},[Be(ve.Large)]:{...Ls(56,62,-2)},[Be(ve.ExtraLarge)]:{...Ls(64,70,-2)}},headlineSmall:{fontFamily:Ks.fontFamily.maisonNeueExtended,fontWeight:Ks.fontWeight.bold,...Ls(24,29),[Be(ve.Medium)]:{...Ls(32,38,-1)},[Be(ve.Large)]:{...Ls(36,43,-1)},[Be(ve.ExtraLarge)]:{...Ls(40,48,-1)}}},not={titleMisc:{fontFamily:Ks.fontFamily.maisonNeueExtended,fontWeight:Ks.fontWeight.bold,...Ls(15,18,1),[Be(ve.Medium)]:{...Ls(20,23,1)},[Be(ve.Large)]:{...Ls(22,25,1)},[Be(ve.ExtraLarge)]:{...Ls(32,37,1)}},titleSection:{fontFamily:Ks.fontFamily.maisonNeueExtended,fontWeight:Ks.fontWeight.semi,...Ls(18,20,3),[Be(ve.ExtraLarge)]:{...Ls(24,26,3)}},titleMainNav:{fontFamily:Ks.fontFamily.maisonNeueExtended,fontWeight:Ks.fontWeight.semi,...Ls(14,19,4)}},rot={bodyLarge:{fontFamily:Ks.fontFamily.maisonNeue,fontWeight:Ks.fontWeight.normal,...Ls(18,29,1)},bodySmall:{fontFamily:Ks.fontFamily.maisonNeue,fontWeight:Ks.fontWeight.normal,...Ls(15,24,1)}},iot={metadataLarge:{fontFamily:Ks.fontFamily.maisonNeue,fontWeight:Ks.fontWeight.normal,...Ls(15,18,1)},metadataSmall:{fontFamily:Ks.fontFamily.maisonNeue,fontWeight:Ks.fontWeight.normal,...Ls(12,16,2)}},sot={buttonLarge:{fontFamily:Ks.fontFamily.maisonNeue,fontWeight:Ks.fontWeight.bold,...Ls(15,20,2)},buttonSmall:{fontFamily:Ks.fontFamily.maisonNeue,fontWeight:Ks.fontWeight.bold,...Ls(12,16,2)}},cn={...tot,...not,...rot,...iot,...sot},aot={position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",height:1,width:1,margin:-1,padding:0,border:0},aC={visHidden:aot},EF={buttonBorder:"1px solid"},dw={default:`${EF.buttonBorder}
222 ${_e.white30}`,disabled:`${EF.buttonBorder} ${_e.white15}`,hover:`${EF.buttonBorder} ${_e.white15}`},fhe={...Bt.transition(["border","background-color"]),alignItems:"center",display:"inline-flex",justifyContent:"center",position:"relative"},hhe={"&":{background:"transparent"},"& span":{WebkitTextFillColor:"inherit"},border:dw.disabled,pointerEvents:"none",color:_e.greyC5},phe={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},oot={background:_e.white,color:_e.audacyDarkNavy,...Bt.transitionMixBackgroundColor(_e.white)},Sh={carouselNav:30,default:44,extended:52,large:64,small:28},Mp={baseButton:fhe,button:{...cn.buttonLarge,borderRadius:100,color:_e.white},disabled:hhe,iconContainer:{marginRight:5},iconContainerExtended:{left:20,position:"absolute"},label:phe,sizeDefault:{height:Sh.default,maxHeight:Sh.default,padding:"0 20px"},sizeExtended:{height:Sh.extended,maxHeight:Sh.extended,width:"100%"},sizeLarge:{height:Sh.large,maxHeight:Sh.large,padding:"0 32px"},sizeSmall:{...Bt.accessibleMinButtonSize(),...cn.buttonSmall,height:Sh.small,maxHeight:Sh.small,padding:"0 14px"},themePremium:Bt.transitionGradientBackground(yv.premium,yv.premiumHover),themePrimary:Bt.transitionMixBackgroundColor(_e.audacyOrange),themePrimaryDarkNavi70:Bt.transitionMixBackgroundColor(_e.audacyDarkNavy70),themeSecondary:{background:"transparent",border:dw.default,color:_e.white,...Dr({background:"transparent",border:dw.hover})},themeSecondaryPremium:{border:dw.default,...Dr({border:dw.hover})},themeSecondaryPremiumLabel:{background:yv.premiumSecondary,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},themeWhite:oot},xv=({as:t=Fi.Button,buttonCss:e,label:n="",icon:r,labelCss:i,size:s="Default",theme:a="Primary",...o})=>{const l=t===Fi.Button,u=s==="Extended"?Mp.iconContainerExtended:Mp.iconContainer,c=a==="SecondaryPremium"&&Mp.themeSecondaryPremiumLabel,d=be(Dn,{children:[r&&I("div",{css:u,children:I(Yr,{name:r,ariaHidden:!r,sizeInPx:s==="Extended"?20:12})}),I("span",{css:[Mp.label,c,i],children:n})]}),f=[Mp.baseButton,Mp.button,Mp[`size${s}`],Mp[`theme${a}`],e,l&&"isDisabled"in o&&o.isDisabled?Mp.disabled:{}];return xd({children:d,styles:f,props:{as:t,...o}})},YZ={container:{display:"flex",alignItems:"center",flexDirection:"column",gap:20},copy:{...cn.buttonLarge}},ghe=()=>{const{t}=dn(),e=()=>{window.location.reload()};return be("div",{role:"alert",css:YZ.container,children:[I("p",{css:YZ.copy,children:t("global.error")}),I(xv,{onClick:e,size:"Default",theme:"Secondary",label:t("global.retry")})]})};var b4=(t=>(t.Episode="episode",t.ExclusiveStation="exclusivestations",t.Genre="genre",t.Home="home",t.Music="music",t.Newstalk="newstalk",t.Podcast="podcast",t.Podcasts="podcasts",t.Shows="shows",t.Sports="sports",t.SportsTeams="sportsteams",t.Station="station",t.Stations="stations",t.Tag="tag",t))(b4||{});const fw={MyAudio:"/account/myaudio",Registration:"/account/registration"},bi={Account:"/account/settings",Dev:"/dev",DeleteAccountConfirmation:"/delete-confirmation",ReactivateAccount:"/reactivate",Home:"/",MyAudio:`${fw.MyAudio}/*`,MyAudioTab:":tab/:subTab?",Registration:`${fw.Registration}`,RegistrationStepOne:`${fw.Registration}/step-two`,RegistrationStepTwo:`${fw.Registration}/step-three`,Search:"/search",Loading:"/loading"},lot=[bi.Registration,bi.DeleteAccountConfirmation,bi.ReactivateAccount];var Ia=(t=>(t.LandingPage="LandingPage",t.PlaylistPage="PlaylistPage",t.PodcastPage="PodcastPage",t.PodcastEpisodesPage="PodcastEpisodesPage",t.EpisodePage="EpisodePage",t.ShowPage="ShowPage",t.StationPage="StationPage",t.StationSchedulePage="StationSchedulePage",t.StationsSongHistoryPage="StationsSongHistoryPage",t.SportsLeaguePage="SportsLeaguePage",t.SportsTeamPage="SportsTeamPage",t.GenericContentPage="GenericContentPage",t.SearchResultsPage="SearchResultsPage",t.TopicPage="TopicPage",t.StandaloneChapterPage="StandaloneChapterPage",t))(Ia||{});const ZZ=(t,e,n)=>{if(t){switch(t){case Vi.SEARCH:return"SearchResultsPage";case Vi.SCHEDULE:return"StationSchedulePage";case Vi.ALL_EPISODE:return"PodcastEpisodesPage";case Vi.TOPIC:return"TopicPage";case Vi.STANDALONE_CHAPTER:return"StandaloneChapterPage"}switch(n){case ui.PODCAST:return"PodcastPage";case Ol.LEAGUE:return"SportsLeaguePage";case Ol.TEAM:return"SportsTeamPage"}switch(e){case gt.SHOW:return"ShowPage";case gt.STANDALONE_CHAPTER:case gt.EPISODE:return"EpisodePage";case gt.STATION:return location.pathname.includes("song-history")?"StationsSongHistoryPage":"StationPage";case gt.COLLECTION:return"PlaylistPage";case gt.TAG:case gt.TOPIC:return;default:return"LandingPage"}}},gMt=t=>`${t}/episodes`,uot=t=>`${t}/shows/show-schedule`,cot=t=>{const e=t.match(/(^\/podcast\/(.*))\/episodes\/(.*)/);return e&&e.length>=1?e[1]:void 0},s0={errorContainer:{display:"flex",alignItems:"center",flexDirection:"column",gap:20},homeButton:{...cn.buttonLarge},title:{...cn.titleMisc},text:{flex:"none",textAlign:"center",...cn.bodySmall,[Be(ve.Small)]:{paddingLeft:85.5,paddingRight:85.5}},gradientContainer:{height:200,width:365,right:0,bottom:0,position:"fixed"},gradient:{height:"100%",width:"100%",display:"none",left:0,top:0,[Be(ve.Large)]:{dis
222play:"flex"}},gradientColor:{position:"absolute",display:"flex","&:nth-of-type(1)":{right:"70%",bottom:"-100%"},"&:nth-of-type(2)":{right:"0%",bottom:"-40%"}}},dot=()=>I(Dn,{children:I("div",{css:[s0.gradientContainer],children:be("div",{css:s0.gradient,children:[I("div",{css:[s0.gradientColor],style:Bt.backgroundGradientStyle(_e.audacyOrange,.3,200)}),I("div",{css:[s0.gradientColor],style:Bt.backgroundGradientStyle(_e.secondaryPurple,.3,190)})]})})}),fot=()=>{const{t}=dn();return be(Dn,{children:[be(Fw,{children:[I("meta",{name:"prerender-status-code",content:"404"}),I("script",{children:"window.prerenderReady = true;"})]}),be("div",{css:Bt.fullScreenContainer,children:[be("div",{role:"alert",css:s0.errorContainer,children:[I("h1",{css:s0.title,children:t("global.404.title")}),I("p",{css:s0.text,children:t("global.404.errorText")}),I(xv,{as:Fi.Anchor,size:"Default",theme:"Secondary",label:t("global.404.home"),href:bi.Home})]}),I(dot,{})]})]})},wV=({error:t})=>{var n;const e=!!t&&("audacyErrorJson"in t&&((n=t==null?void 0:t.audacyErrorJson)==null?void 0:n.code)===404||typeof t.message=="string"&&t.message.includes("status: 404"));return be("div",{css:Bt.fullScreenContainer,children:[!e&&I(Fw,{children:I("script",{children:"window.prerenderReady = true;"})}),e?I(fot,{}):I(ghe,{})]})},qp={barCount:4,barDelay:.12,barWidth:7,duration:2.8,durationReducedMotion:8.4},hot=J8`
223  0% {
224    opacity: 1;
225    transform: scaleY(0);
226  }
227  12.5% {
228    transform: scaleY(20);
229  }
230  25%, 50% {
231    transform: scaleY(7);
232  }
233  62.5% {
234    transform: scaleY(25);
235  }
236  75%, 87.5% {
237    opacity: 1;
238    transform: scaleY(7);
239  }
240  87.51%, 100% {
241    opacity: 0;
242    transform: scaleY(0);
243  }
244`,pot=J8`
245  0%, 25% {
246    opacity: 1;
247    transform: scaleY(0);
248  }
249  25.1% {
250    transform: scaleY(7);
251  }
252  37.5% {
253    transform: scaleY(25);
254  }
255  50%, 75% {
256    transform: scaleY(7);
257  }
258  81% {
259    transform: scaleY(15);
260  }
261  87.5% {
262    transform: scaleY(7);
263  }
264  99.9% {
265    opacity: 1;
266    transform: scaleY(0);
267  }
268  100% {
269    opacity: 0;
270  }
271`,QZ=t=>({animationDelay:`${-2.8-t*qp.barDelay}s`}),Vy={center:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"inherit"},container:{display:"flex",justifyContent:"space-between",flexDirection:"row-reverse",height:50,width:qp.barWidth*(qp.barCount*2-1)},barContainer:{position:"relative",width:qp.barWidth},barBase:{backgroundColor:_e.white,position:"absolute",left:0,width:"100%",height:1,opacity:0},barUpper:{bottom:25,transformOrigin:"bottom",animationName:hot,animationDuration:`${qp.duration}s`,animationIterationCount:"infinite",...tD({animationDuration:`${qp.durationReducedMotion}s`})},barLower:{top:18,transformOrigin:"top",animationName:pot,animationDuration:`${qp.duration}s`,animationIterationCount:"infinite",...tD({animationDuration:`${qp.durationReducedMotion}s`})}},_V=()=>{const t=Array.from(Array(qp.barCount).keys());return I("div",{"aria-label":"Loading",css:Vy.container,children:t.map(e=>be("div",{css:Vy.barContainer,children:[I("div",{css:[Vy.barBase,Vy.barUpper,QZ(e)]}),I("div",{css:[Vy.barBase,Vy.barLower,QZ(e)]})]},e))})},mhe=()=>I("div",{"aria-label":"Full Screen Loading",css:Bt.fullScreenContainer,children:I(_V,{})});var bd=(t=>(t[t.LandingPage=0]="LandingPage",t[t.ContentPage=1]="ContentPage",t[t.PathPage=2]="PathPage",t))(bd||{}),got=function(e,n){if(n=n.split(":")[0],e=+e,!e)return!1;switch(n){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0},CV={},mot=Object.prototype.hasOwnProperty,vot;function XZ(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function JZ(t){try{return encodeURIComponent(t)}catch{return null}}function yot(t){for(var e=/([^=?#&]+)=?([^&]*)/g,n={},r;r=e.exec(t);){var i=XZ(r[1]),s=XZ(r[2]);i===null||s===null||i in n||(n[i]=s)}return n}function bot(t,e){e=e||"";var n=[],r,i;typeof e!="string"&&(e="?");for(i in t)if(mot.call(t,i)){if(r=t[i],!r&&(r===null||r===vot||isNaN(r))&&(r=""),i=JZ(i),r=JZ(r),i===null||r===null)continue;n.push(i+"="+r)}return n.length?e+n.join("&"):""}CV.stringify=bot;CV.parse=yot;var vhe=got,G2=CV,Sot=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,yhe=/[\n\r\t]/g,Eot=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,bhe=/:\d+$/,Tot=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Aot=/^[a-zA-Z]:/;function xV(t){return(t||"").toString().replace(Sot,"")}var S4=[["#","hash"],["?","query"],function(e,n){return Kh(n.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],eQ={hash:1,query:1};function She(t){var e;typeof window<"u"?e=window:typeof Ys<"u"?e=Ys:typeof self<"u"?e=self:e={};var n=e.location||{};t=t||n;var r={},i=typeof t,s;if(t.protocol==="blob:")r=new tp(unescape(t.pathname),{});else if(i==="string"){r=new tp(t,{});for(s in eQ)delete r[s]}else if(i==="object"){for(s in t)s in eQ||(r[s]=t[s]);r.slashes===void 0&&(r.slashes=Eot.test(t.href))}return r}function Kh(t){return t==="file:"||t==="ftp:"||t==="http:"||t==="https:"||t==="ws:"||t==="wss:"}function Ehe(t,e){t=xV(t),t=t.replace(yhe,""),e=e||{};var n=Tot.exec(t),r=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],a=0,o;return i?s?(o=n[2]+n[3]+n[4],a=n[2].length+n[3].length):(o=n[2]+n[4],a=n[2].length):s?(o=n[3]+n[4],a=n[3].length):o=n[4],r==="file:"?a>=2&&(o=o.slice(2)):Kh(r)?o=n[4]:r?i&&(o=o.slice(2)):a>=2&&Kh(e.protocol)&&(o=n[4]),{protocol:r,slashes:i||Kh(r),slashesCount:a,rest:o}}function wot(t,e){if(t==="")return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],s=!1,a=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),a++):a&&(r===0&&(s=!0),n.splice(r,1),a--);return s&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function tp(t,e,n){if(t=xV(t),t=t.replace(yhe,""),!(this instanceof tp))return new tp(t,e,n);var r,i,s,a,o,l,u=S4.slice(),c=typeof e,d=this,f=0;for(c!=="object"&&c!=="string"&&(n=e,e=null),n&&typeof n!="function"&&(n=G2.parse),e=She(e),i=Ehe(t||"",e),r=!i.protocol&&!i.slashes,d.slashes=i.slashes||r&&e.slashes,d.protocol=i.protocol||e.protocol||"",t=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||Aot.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!Kh(d.protocol)))&&(u[3]=[/(.*)/,"pathname"]);f<u.length;f++){if(a=u[f],typeof a=="function"){t=a(t,d);continue}s=a[0],l=a[1],s!==s?d[l]=t:typeof s=="string"?(o=s==="@"?t.lastIndexOf(s):t.indexOf(s),~o&&(typeof a[2]=="number"?(d[l]=t.slice(0,o),t=t.slice(o+a[2])):(d[l]=t.slice(o),t=t.slice(0,o)))):(o=s.exec(t))&&(d[l]=o[1],t=t.slice(0,o.index)),d[l]=d[l]||r&&a[3]&&e[l]||"",a[4]&&(d[l]=d[l].toLowerCase())}n&&(d.query=n(d.query)),r&&e.slashes&&d.pathname.charAt(0)!=="/"&&(d.pathname!==""||e.pathname!=="")&&(d.pathname=wot(d.pathname,e.pathname)),d.pathname.charAt(0)!=="/"&&Kh(d.protocol)&&(d.pathname="/"+d.pathname),vhe(d.port,d.protocol)||(d.host=d.hostname,d.port=""),d.username=d.password="",d.auth&&(o=d.auth.indexOf(":"),~o?(d.username=d.auth.slice(0,o),d.username=encodeURIComponent(decodeURIComponent(d.username)),d.password=d.auth.slice(o+1),d.password=encodeURIComponent(decodeURIComponent(d.password))):d.username=encodeURIComponent(decodeURIComponent(d.auth)),d.auth=d.password?d.username+":"+d.password:d.username),d.origin=d.protocol!=="file:"&&Kh(d.protocol)&&d.host?d.protocol+"//"+d.host:"null",d.href=d.toString()}function _ot(t,e,n){var r=this;switch(t){case"query":typeof e=="string"&&e.length&&(e=(n||G2.parse)(e)),r[t]=e;break;case"port":r[t]=e,vhe(e,r.protocol)?e&&(r.host=r.hostname+":"+e):(r.host=r.hostname,r[t]="");break;case"hostname":r[t]=e,r.port&&(e+=":"+r.port),r.host=e;break;case"host":r[t]=e,bhe.test(e)?(e=e.split(":"),r.port=e.pop(),r.hostname=e.join(":")):(r.hostname=e,r.port="");break;case"protocol":r.protocol=e.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(e){var i=t==="pathname"?"/":"#";r[t]=e.charAt(0)!==i?i+e:e}else r[t]=e;break;case"username":case"password":r[t]=encodeURIComponent(e);break;case"auth":var s=e.indexOf(":");~s?(r.username=e.slice(0,s),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=e.slice(s+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(e))}for(var a=0;a<S4.length;a++){var o=S4[a];o[4]&&(r[o[1]]=r[o[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin=r.protocol!=="file:"&&Kh(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function Cot(t){(!t||typeof t!="function")&&(t=G2.stringify);var e,n=this,r=n.host,i=n.protocol;i&&i.charAt(i.length-1)!==":"&&(i+=":");var s=i+(n.protocol&&n.slashes||Kh(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):n.protocol!=="file:"&&Kh(n.protocol)&&!r&&n.pathname!=="/"&&(s+="@"),(r[r.length-1]===":"||bhe.test(n.hostname)&&!n.port)&&(r+=":"),s+=r+n.pathname,e=typeof n.query=="object"?t(n.query):n.query,e&&(s+=e.charAt(0)!=="?"?"?"+e:e),n.hash&&(s+=n.hash),s}tp.prototype={set:_ot,toString:Cot};tp.extractProtocol=Ehe;tp.location=She;tp.trimLeft=xV;tp.qs=G2;var xot=tp;const The=pi(xot),Iot=t=>{const e=new The(t,!0),{viewId:n,contentId:r}=e.query;return{viewId:n,contentId:r}},Oot=()=>{const{pathname:t,search:e}=Rd(),n=decodeURIComponent(t);return $.useMemo(()=>{const{viewId:r,contentId:i}=Iot(e);let s;return r&&i?s={type:bd.ContentPage,contentId:i,viewId:r}:r?s={type:bd.LandingPage,viewId:r}:s={path:n,type:bd.PathPage},s},[e,n])},tQ=async(t,e,n)=>{try{if(t.type===bd.LandingPage||t.type===bd.ContentPage)switch(t.type){case bd.ContentPage:return await e.getView(t.viewId,t.contentId,n);case bd.LandingPage:return await e.getView(t.viewId,void 0,n)}return await e.getPage(t.path,n)}catch(r){if(r instanceof Error){if(console.error(r),r.message.includes("status: 404"))throw r}else console.error("Unknown error type:",r)}},nQ=async(t,e)=>{if(t)return await e.getFeaturedPlayable(t)},Pot=async(t,e,n)=>{if(t.type===bd.LandingPage||t.type===bd.ContentPage){const[r,i]=await Promise.all([tQ(t,e,n),t.type===bd.ContentPage?nQ(t.contentId,e):void 0]);return r?CZ(r,i):void 0}else{const r=await tQ(t,e,n),i=pT(r==null?void 0:r.contentObj),s=i!=null&&i.id?await nQ(i.id,e):void 0;return r?CZ(r,s):void 0}},{selector:Ahe,useRefreshCache:Rot}=hx({get:t=>async({get:e})=>{const{markets:n,isLoading:r}=e(V7),i=zce(n),s={type:Vi.MODULES,getContent:()=>{},id:"empty-module-placeholder",modules:[],uniqueId:Date.now().toString()};return r?s:await Pot(t,lr.getDataServices(),i)||s},key:"Modules",cacheLimit:B7.limit10m}),Lot=t=>Ht(Ahe(t)),Dot=t=>Ht(Ahe(t)),kot=$.lazy(()=>Cr(()=>import("./index-t2WuuVb2.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),Not=$.lazy(()=>Cr(()=>import("./index-Bwi3Hb6I.js"),__vite__mapDeps([7,2,4,5,6]))),E4=$.lazy(()=>Cr(()=>import("./index-DuDjacTp.js"),__vite__mapDeps([8,2,4,5,6]))),Mot=$.lazy(()=>Cr(()=>import("./index-Cv8vmYLN.js"),__vite__mapDeps([9,1,2,3,4,5,6]))),Fot=$.lazy(()=>Cr(()=>import("./index-De6biPFp.js"),__vite__mapDeps([10,1,2,3,11,4,5,6]))),$ot=$.lazy(()=>Cr(()=>import("./index-CRdMnSkl.js"),__vite__mapDeps([12,13,3,11,2,4,5,6]))),whe=$.lazy(()=>Cr(()=>import("./index-CGk-ltrF.js"),__vite__mapDeps([14,2,4,15,5]))),Bot=$.lazy(()=>Cr(()=>import("./index-BKIq0KbQ.js"),__vite__mapDeps([16,1,2,3,4,5,6]))),Uot=$.lazy(()=>Cr(()=>import("./index-8vlDA2lM.js"),__vite__mapDeps([17,1,2,3,4,5,6]))),Vot=$.lazy(()=>Cr(()=>import("./index-BSQQz_h3.js"),__vite__mapDeps([18,1,2,3,4,5,6]))),Hot=$.lazy(()=>Cr(()=>import("./index-h3zCa9a3.js"),__vite__mapDeps([19,1,2,3,4,5,6]))),jot=$.lazy(()=>Cr(()=>import("./index-hgx_D8hr.js"),__vite__mapDeps([20,1,2,3,4,5,6]))),zot=$.lazy(()=>Cr(()=>
271import("./index-DA_DkvA0.js"),__vite__mapDeps([21,13,3,2,4,15,5,6]))),Got=$.lazy(()=>Cr(()=>import("./index-CrxkcTB-.js"),__vite__mapDeps([22,13,3,2,4,5,6]))),Wot=$.lazy(()=>Cr(()=>import("./index-mpKAeCKW.js"),__vite__mapDeps([23,1,2,3,4,5,6]))),qot={[Ia.LandingPage]:E4,[Ia.PlaylistPage]:Mot,[Ia.PodcastPage]:Fot,[Ia.PodcastEpisodesPage]:$ot,[Ia.EpisodePage]:kot,[Ia.ShowPage]:Bot,[Ia.StationPage]:jot,[Ia.StationSchedulePage]:zot,[Ia.StationsSongHistoryPage]:Got,[Ia.SportsLeaguePage]:Uot,[Ia.SportsTeamPage]:Vot,[Ia.GenericContentPage]:Not,[Ia.SearchResultsPage]:whe,[Ia.TopicPage]:Wot,[Ia.StandaloneChapterPage]:Hot},Kot=({request:t})=>{var i,s,a,o;const e=Dot(t);let n=Ia.LandingPage;if((i=e==null?void 0:e.rootObject)!=null&&i.type&&((s=e==null?void 0:e.rootObject)!=null&&s.subtype)){const{type:l,subtype:u}=e.rootObject;n=ZZ(e.type,l,u)||Ia.GenericContentPage}else e!=null&&e.type&&(n=ZZ(e.type)||Ia.LandingPage);const r=qot[n];return n===Ia.LandingPage?I(E4,{request:t,seoMetadata:e.meta}):n===Ia.SearchResultsPage?I(whe,{request:t,seoMetadata:e.meta}):e!=null&&e.id&&((a=e==null?void 0:e.rootObject)!=null&&a.id)?I(r,{contentId:e.rootObject.id,viewId:e.id,request:t,seoMetadata:e.meta}):((o=e==null?void 0:e.modules)==null?void 0:o.length)>0?I(E4,{request:t,seoMetadata:e.meta}):(console.error("PageLoadError: not a landing page, no viewId and contentId, no modules",{pageTemplateName:n,view:e}),I(wV,{}))},Yot=()=>{const t=Oot();return I(Zk,{FallbackComponent:({error:e})=>I(wV,{error:e}),children:I($.Suspense,{fallback:I(mhe,{}),children:I(Kot,{request:t})})})};/*!
272* tabbable 5.3.3
273* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
274*/var _he=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],rD=_he.join(","),Che=typeof Element>"u",tb=Che?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,T4=!Che&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},xhe=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(rD));return n&&tb.call(e,rD)&&i.unshift(e),i=i.filter(r),i},Ihe=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var a=s.shift();if(a.tagName==="SLOT"){var o=a.assignedElements(),l=o.length?o:a.children,u=t(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:a,candidates:u})}else{var c=tb.call(a,rD);c&&r.filter(a)&&(n||!e.includes(a))&&i.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!r.shadowRootFilter||r.shadowRootFilter(a);if(d&&f){var h=t(d===!0?a.children:d.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scope:a,candidates:h})}else s.unshift.apply(s,a.children)}}return i},Ohe=function(e,n){return e.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},Zot=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Phe=function(e){return e.tagName==="INPUT"},Qot=function(e){return Phe(e)&&e.type==="hidden"},Xot=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Jot=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},elt=function(e){if(!e.name)return!0;var n=e.form||T4(e),r=function(o){return n.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var s=Jot(i,e.form);return!s||s===e},tlt=function(e){return Phe(e)&&e.type==="radio"},nlt=function(e){return tlt(e)&&!elt(e)},rQ=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},rlt=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=tb.call(e,"details>summary:first-of-type"),a=s?e.parentElement:e;if(tb.call(a,"details:not([open]) *"))return!0;var o=T4(e).host,l=(o==null?void 0:o.ownerDocument.contains(o))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i=="function"){for(var u=e;e;){var c=e.parentElement,d=T4(e);if(c&&!c.shadowRoot&&i(c)===!0)return rQ(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=u}if(l)return!e.getClientRects().length}else if(r==="non-zero-area")return rQ(e);return!1}
vendor: 5,548 bytes, lines 274-277
274,ilt=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return tb.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},iD=function(e,n){return!(n.disabled||Qot(n)||rlt(n,e)||Xot(n)||ilt(n))},A4=function(e,n){return!(nlt(n)||Ohe(n)<0||!iD(e,n))},slt=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},alt=function t(e){var n=[],r=[];return e.forEach(function(i,s){var a=!!i.scope,o=a?i.scope:i,l=Ohe(o,a),u=a?t(i.candidates):o;l===0?a?n.push.apply(n,u):n.push(o):r.push({documentOrder:s,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(Zot).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},olt=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Ihe([e],n.includeContainer,{filter:A4.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:slt}):r=xhe(e,n.includeContainer,A4.bind(null,n)),alt(r)},llt=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Ihe([e],n.includeContainer,{filter:iD.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=xhe(e,n.includeContainer,iD.bind(null,n)),r},vO=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return tb.call(e,rD)===!1?!1:A4(n,e)},ult=_he.concat("iframe").join(","),TF=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return tb.call(e,ult)===!1?!1:iD(n,e)};/*!
275* focus-trap 6.9.4
276* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
277*/function iQ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?iQ(Object(n),!0).forEach(function(r){clt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function clt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var aQ=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),dlt=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},flt=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},hlt=function(e){return e.key==="Tab"||e.keyCode===9},oQ=function(e){return setTimeout(e,0)},lQ=function(e,n){var r=-1;return e.every(function(i,s){return n(i)?(r=s,!1):!0}),r},NA=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},yO=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},plt=function(e,n){var r=(n==null?void 0:n.document)||document,i=sQ({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a,o=function(N,k,U){return N&&N[k]!==void 0?N[k]:i[U||k]},l=function(N){return s.containerGroups.findIndex(function(k){var U=k.container,H=k.tabbableNodes;return U.contains(N)||H.find(function(B){return B===N})})},u=function(N){var k=i[N];if(typeof k=="function"){for(var U=arguments.length,H=new Array(U>1?U-1:0),B=1;B<U;B++)H[B-1]=arguments[B];k=k.apply(void 0,H)}if(k===!0&&(k=void 0),!k){if(k===void 0||k===!1)return k;throw new Error("`".concat(N,"` was specified but was not a node, or did not return a node"))}var q=k;if(typeof k=="string"&&(q=r.querySelector(k),!q))throw new Error("`".concat(N,"` as selector refers to no known node"));return q},c=function(){var N=u("initialFocus");if(N===!1)return!1;if(N===void 0)if(l(r.activeElement)>=0)N=r.activeElement;else{var k=s.tabbableGroups[0],U=k&&k.firstTabbableNode;N=U||u("fallbackFocus")}if(!N)throw new Error("Your focus-trap needs to have at least one focusable element");return N},d=function(){if(s.containerGroups=s.containers.map(function(N){var k=olt(N,i.tabbableOptions),U=llt(N,i.tabbableOptions);return{container:N,tabbableNodes:k,focusableNodes:U,firstTabbableNode:k.length>0?k[0]:null,lastTabbableNode:k.length>0?k[k.length-1]:null,nextTabbableNode:function(B){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Z=U.findIndex(function(C){return C===B});if(!(Z<0))return q?U.slice(Z+1).find(function(C){return vO(C,i.tabbableOptions)}):U.slice(0,Z).reverse().find(function(C){return vO(C,i.tabbableOptions)})}}}),s.tabbableGroups=s.containerGroups.filter(function(N){return N.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},f=function P(N){if(N!==!1&&N!==r.activeElement){if(!N||!N.focus){P(c());return}N.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=N,dlt(N)&&N.select()}},h=function(N){var k=u("setReturnFocus",N);return k||(k===!1?!1:N)},g=function(N){var k=yO(N);if(!(l(k)>
277=0)){if(NA(i.clickOutsideDeactivates,N)){a.deactivate({returnFocus:i.returnFocusOnDeactivate&&!TF(k,i.tabbableOptions)});return}NA(i.allowOutsideClick,N)||N.preventDefault()}},v=function(N){var k=yO(N),U=l(k)>=0;U||k instanceof Document?U&&(s.mostRecentlyFocusedNode=k):(N.stopImmediatePropagation(),f(s.mostRecentlyFocusedNode||c()))},b=function(N){var k=yO(N);d();var U=null;if(s.tabbableGroups.length>0){var H=l(k),B=H>=0?s.containerGroups[H]:void 0;if(H<0)N.shiftKey?U=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:U=s.tabbableGroups[0].firstTabbableNode;else if(N.shiftKey){var q=lQ(s.tabbableGroups,function(X){var G=X.firstTabbableNode;return k===G});if(q<0&&(B.container===k||TF(k,i.tabbableOptions)&&!vO(k,i.tabbableOptions)&&!B.nextTabbableNode(k,!1))&&(q=H),q>=0){var Z=q===0?s.tabbableGroups.length-1:q-1,C=s.tabbableGroups[Z];U=C.lastTabbableNode}}else{var L=lQ(s.tabbableGroups,function(X){var G=X.lastTabbableNode;return k===G});if(L<0&&(B.container===k||TF(k,i.tabbableOptions)&&!vO(k,i.tabbableOptions)&&!B.nextTabbableNode(k))&&(L=H),L>=0){var V=L===s.tabbableGroups.length-1?0:L+1,j=s.tabbableGroups[V];U=j.firstTabbableNode}}}else U=u("fallbackFocus");U&&(N.preventDefault(),f(U))},S=function(N){if(flt(N)&&NA(i.escapeDeactivates,N)!==!1){N.preventDefault(),a.deactivate();return}if(hlt(N)){b(N);return}},A=function(N){var k=yO(N);l(k)>=0||NA(i.clickOutsideDeactivates,N)||NA(i.allowOutsideClick,N)||(N.preventDefault(),N.stopImmediatePropagation())},w=function(){if(s.active)return aQ.activateTrap(a),s.delayInitialFocusTimer=i.delayInitialFocus?oQ(function(){f(c())}):f(c()),r.addEventListener("focusin",v,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",A,{capture:!0,passive:!1}),r.addEventListener("keydown",S,{capture:!0,passive:!1}),a},x=function(){if(s.active)return r.removeEventListener("focusin",v,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",A,!0),r.removeEventListener("keydown",S,!0),a};return a={get active(){return s.active},get paused(){return s.paused},activate:function(N){if(s.active)return this;var k=o(N,"onActivate"),U=o(N,"onPostActivate"),H=o(N,"checkCanFocusTrap");H||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,k&&k();var B=function(){H&&d(),w(),U&&U()};return H?(H(s.containers.concat()).then(B,B),this):(B(),this)},deactivate:function(N){if(!s.active)return this;var k=sQ({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},N);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,x(),s.active=!1,s.paused=!1,aQ.deactivateTrap(a);var U=o(k,"onDeactivate"),H=o(k,"onPostDeactivate"),B=o(k,"checkCanReturnFocus"),q=o(k,"returnFocus","returnFocusOnDeactivate");U&&U();var Z=function(){oQ(function(){q&&f(h(s.nodeFocusedBeforeActivation)),H&&H()})};return q&&B?(B(h(s.nodeFocusedBeforeActivation)).then(Z,Z),this):(Z(),this)},pause:function(){return s.paused||!s.active?this:(s.paused=!0,x(),this)},unpause:function(){return!s.paused||!s.active?this:(s.paused=!1,d(),w(),this)},updateContainerElements:function(N){var k=[].concat(N).filter(Boolean);return s.containers=k.map(function(U){return typeof U=="string"?r.querySelector(U):U}),s.active&&d(),this}},a.updateContainerElements(e),a};const glt=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:plt},Symbol.toStringTag,{value:"Module"})),mlt=Xte(glt);var Rhe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],w4=Rhe.join(","),IV=typeof Element>"u"?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function OV(t,e){e=e||{};var n=[],r=[],i=t.querySelectorAll(w4);e.includeContainer&&IV.call(t,w4)&&(i=Array.prototype.slice.apply(i),i.unshift(t));var s,a,o;for(s=0;s<i.length;s++)a=i[s],Lhe(a)&&(o=khe(a),o===0?n.push(a):r.push({documentOrder:s,tabIndex:o,node:a}));var l=r.sort(Slt).map(function(u){return u.node}).concat(n);return l}OV.isTabbable=vlt;OV.isFocusable=blt;function Lhe(t){return!(!Dhe(t)||wlt(t)||khe(t)<0)}function vlt(t){if(!t)throw new Error("No node provided");return IV.call(t,w4)===!1?!1:Lhe(t)}function Dhe(t){return!(t.disabled||Tlt(t)||xlt(t))}var ylt=Rhe.concat("iframe").join(",");function blt(t){if(!t)throw new Error("No node provided");return IV.call(t,ylt)===!1?!1:Dhe(t)}function khe(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?Elt(t)?0:t.tabIndex:e}function Slt(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function Elt(t){return t.contentEditable==="true"}function Nhe(t){return t.tagName==="INPUT"}function Tlt(t){return Nhe(t)&&t.type==="hidden"}function Alt(t){return Nhe(t)&&t.type==="radio"}function wlt(t){return Alt(t)&&!Clt(t)}function _lt(t){for(var e=0;e<t.length;e++)if(t[e].checked)return t[e]}function Clt(t){if(!t.name)return!0;var e=t.ownerDocument.querySelectorAll('input[type="radio"][name="'+t.name+'"]'),n=_lt(e);return!n||n===t}function xlt(t){return t.offsetParent===null||getComputedStyle(t).visibility==="hidden"}var Mhe=OV;const mMt=pi(Mhe);function _4(t){"@babel/helpers - typeof";return _4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_4(t)}function Ilt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Olt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Plt(t,e,n){return e&&Olt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Rlt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C4(t,e)}function C4(t,e){return C4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},C4(t,e)}function Llt(t){var e=klt();return function(){var r=sD(t),i;if(e){var s=sD(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return Dlt(this,i)}}function Dlt(t,e){if(e&&(_4(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hw(t)}function hw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function klt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}
vendor: 6,204 bytes, line 277
277function sD(t){return sD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sD(t)}function Nlt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bO=$,Mlt=og,sr=Uoe,Flt=mlt,$lt=Flt.createFocusTrap,Blt=Mhe,Ult=Blt.isFocusable,PV=function(t){Rlt(n,t);var e=Llt(n);function n(r){var i;Ilt(this,n),i=e.call(this,r),Nlt(hw(i),"getNodeForOption",function(o){var l,u=(l=this.internalOptions[o])!==null&&l!==void 0?l:this.originalOptions[o];if(typeof u=="function"){for(var c=arguments.length,d=new Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];u=u.apply(void 0,d)}if(u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var h=u;if(typeof u=="string"){var g;if(h=(g=this.getDocument())===null||g===void 0?void 0:g.querySelector(u),!h)throw new Error("`".concat(o,"` as selector refers to no known node"))}return h}),i.handleDeactivate=i.handleDeactivate.bind(hw(i)),i.handlePostDeactivate=i.handlePostDeactivate.bind(hw(i)),i.handleClickOutsideDeactivates=i.handleClickOutsideDeactivates.bind(hw(i)),i.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:i.handleDeactivate,onPostDeactivate:i.handlePostDeactivate,clickOutsideDeactivates:i.handleClickOutsideDeactivates},i.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var s=r.focusTrapOptions;for(var a in s)if(Object.prototype.hasOwnProperty.call(s,a)){if(a==="returnFocusOnDeactivate"||a==="onDeactivate"||a==="onPostDeactivate"||a==="checkCanReturnFocus"||a==="clickOutsideDeactivates"){i.originalOptions[a]=s[a];continue}i.internalOptions[a]=s[a]}return i.outsideClick=null,i.focusTrapElements=r.containerElements||[],i.updatePreviousElement(),i}return Plt(n,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var i=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return i||(i===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var i=this.getDocument();i&&(this.previouslyFocusedElement=i.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(i){var s=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,i):this.originalOptions.clickOutsideDeactivates;return s&&(this.outsideClick={target:i.target,allowDeactivation:s}),s}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var i=this,s=function(){var o=i.getReturnFocusNode(),l=!!(i.originalOptions.returnFocusOnDeactivate&&o!==null&&o!==void 0&&o.focus&&(!i.outsideClick||i.outsideClick.allowDeactivation&&!Ult(i.outsideClick.target,i.internalOptions.tabbableOptions))),u=i.internalOptions.preventScroll,c=u===void 0?!1:u;l&&o.focus({preventScroll:c}),i.originalOptions.onPostDeactivate&&i.originalOptions.onPostDeactivate.call(null),i.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(s,s):s()}},{key:"setupFocusTrap",value:function(){if(!this.focusTrap){var i=this.focusTrapElements.map(Mlt.findDOMNode),s=i.some(Boolean);s&&(this.focusTrap=this.props._createFocusTrap(i,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(i){if(this.focusTrap){i.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var s=!i.active&&this.props.active,a=i.active&&!this.props.active,o=!i.paused&&this.props.paused,l=i.paused&&!this.props.paused;if(s&&(this.updatePreviousElement(),this.focusTrap.activate()),a){this.deactivateTrap();return}o&&this.focusTrap.pause(),l&&this.focusTrap.unpause()}else i.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var i=this,s=this.props.children?bO.Children.only(this.props.children):void 0;if(s){if(s.type&&s.type===bO.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var a=function(u){var c=i.props.containerElements;s&&(typeof s.ref=="function"?s.ref(u):s.ref&&(s.ref.current=u)),i.focusTrapElements=c||[u]},o=bO.cloneElement(s,{ref:a});return o}return null}}]),n}(bO.Component),MA=typeof Element>"u"?Function:Element;PV.propTypes={active:sr.bool,paused:sr.bool,focusTrapOptions:sr.shape({document:sr.object,onActivate:sr.func,onPostActivate:sr.func,checkCanFocusTrap:sr.func,onDeactivate:sr.func,onPostDeactivate:sr.func,checkCanReturnFocus:sr.func,initialFocus:sr.oneOfType([sr.instanceOf(MA),sr.string,sr.bool,sr.func]),fallbackFocus:sr.oneOfType([sr.instanceOf(MA),sr.string,sr.func]),escapeDeactivates:sr.oneOfType([sr.bool,sr.func]),clickOutsideDeactivates:sr.oneOfType([sr.bool,sr.func]),returnFocusOnDeactivate:sr.bool,setReturnFocus:sr.oneOfType([sr.instanceOf(MA),sr.string,sr.bool,sr.func]),allowOutsideClick:sr.oneOfType([sr.bool,sr.func]),preventScroll:sr.bool,tabbableOptions:sr.shape({displayCheck:sr.oneOf(["full","non-zero-area","none"]),getShadowRoot:sr.oneOfType([sr.bool,sr.func])})}),containerElements:sr.arrayOf(sr.instanceOf(MA)),children:sr.oneOfType([sr.element,sr.instanceOf(MA)])};PV.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:$lt};var Vlt=PV;
277const W2=pi(Vlt),q2=Yn({key:"scrollableClass",default:""}),fi={initial:"initial",animate:"animate",exit:"exit"},k1=({durationIn:t,durationOut:e}={durationIn:cu.ms250,durationOut:cu.ms250})=>({[fi.initial]:{opacity:0},[fi.animate]:{opacity:1,transition:{duration:t}},[fi.exit]:{opacity:0,transition:{duration:e}}}),bv=({children:t,isVisible:e,motionCss:n,...r})=>I(Yh,{children:e&&I(Il.div,{...r,css:n,children:t})}),Hlt=({children:t,isVisible:e,...n})=>I(bv,{isVisible:e,...k1(),...n,children:t}),jlt=({children:t})=>I(Il.div,{...k1({durationIn:cu.pageTransitionIn,durationOut:0}),children:t});bv.FadeInOut=Hlt;bv.FadeInOnMount=jlt;const aD=()=>I("div",{"aria-label":"Centered Loading",css:Vy.center,children:I(_V,{})}),Fhe=Yn({default:!1,key:"shouldDisplaySquareAd"}),$he=Yn({default:!1,key:"isFullPlayerOpen"});var zlt=Math.floor,Glt=Math.random;function Wlt(t,e){return t+zlt(Glt()*(e-t+1))}var qlt=Wlt,Klt=t2,Ylt=tx,Zlt=o2,Qlt=Dg;function Xlt(t,e,n){if(!Qlt(n))return!1;var r=typeof e;return(r=="number"?Ylt(n)&&Zlt(e,n.length):r=="string"&&e in n)?Klt(n[e],t):!1}var Jlt=Xlt,eut=C7,uQ=1/0,tut=17976931348623157e292;function nut(t){if(!t)return t===0?t:0;if(t=eut(t),t===uQ||t===-uQ){var e=t<0?-1:1;return e*tut}return t===t?t:0}var Bhe=nut,rut=qlt,iut=Jlt,cQ=Bhe,sut=parseFloat,aut=Math.min,out=Math.random;function lut(t,e,n){if(n&&typeof n!="boolean"&&iut(t,e,n)&&(e=n=void 0),n===void 0&&(typeof e=="boolean"?(n=e,e=void 0):typeof t=="boolean"&&(n=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=cQ(t),e===void 0?(e=t,t=0):e=cQ(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=out();return aut(t+i*(e-t+sut("1e-"+((i+"").length-1))),e)}return rut(t,e)}var uut=lut;const cut=pi(uut);var qw=(t=>(t.Thin="Thin",t.Medium="Medium",t.Thick="Thick",t))(qw||{});const dut=J8`
278  0% {
279    transform: scaleY(1);
280  }
281  20% {
282    transform: scaleY(0.6);
283  }
284  40% {
285    transform: scaleY(1.4);
286  }
287  60% {
288    transform: scaleY(0.9);
289  }
290  80% {
291    transform: scaleY(1.2);
292  }
293  100% {
294    transform: scaleY(1);
295  }
296`,fut=t=>({height:t*60,top:t*60,animationDelay:`${t-1}s`,[Be(ve.Large)]:{height:t*80,top:`${t*15}%`}}),hut=t=>{let e;switch(t){case qw.Thin:e=3;break;case qw.Medium:e=8;break;case qw.Thick:e=12;break}return{width:e}},pS={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:Ai.hidden},gradient:{height:"100%",left:"50%",maxWidth:400,position:"fixed",transform:"translateX(-50%)",width:"100%",[Be(ve.Large)]:{maxWidth:450}},gradientColor:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute","&:nth-of-type(1)":{left:0,top:"-10%",[Be(ve.Medium)]:{left:"30%",top:"-10%"},[Be(ve.Large)]:{top:"-5%"}},"&:nth-of-type(2)":{right:"-10%",top:"5%",[Be(ve.Medium)]:{right:"-20%"},[Be(ve.Large)]:{right:"15%",top:"15%"}}},lines:{display:"flex",height:"100%",justifyContent:"space-around",left:"50%",maxWidth:"90%",position:"absolute",transform:"translateX(-50%)",width:"100%",...tD({display:"none"})},line:{backgroundColor:_e.white15,position:"relative",height:70,animation:`${dut} 10s ease-in-out infinite`}},put=({colors:t=[_e.secondaryDusk2,_e.white],lineWidth:e=qw.Thin})=>{const[n,r]=$.useState();return $.useEffect(()=>{const i=[...Array(4)];i.forEach((s,a)=>{i[a]=cut(.5,2,!0)}),r(i)},[]),be("div",{css:pS.container,children:[be("div",{css:pS.gradient,children:[I("div",{css:pS.gradientColor,children:I("div",{style:Bt.backgroundGradientStyle(t[0],.7,200)})}),I("div",{css:pS.gradientColor,children:I("div",{style:Bt.backgroundGradientStyle(t[1],.3,220)})})]}),I("div",{css:pS.lines,children:n==null?void 0:n.map(i=>I("div",{css:[pS.line,hut(e),fut(i)]},`bar_${i}`))})]})},ET=$.createContext({isFullscreenPlayer:!1,setIsFullscreenPlayer:()=>{}}),Ab=$.createContext({isQueueHead:!1,setIsQueueHeadPlayer:()=>{}}),gut=({children:t})=>{const[e,n]=$.useState(!1),[r,i]=$.useState(!1);return I(ET.Provider,{value:{isFullscreenPlayer:e,setIsFullscreenPlayer:n},children:I(Ab.Provider,{value:{isQueueHead:r,setIsQueueHeadPlayer:i},children:t})})},Uhe={[ve.Small]:26,[ve.SmallMax]:26,[ve.Medium]:32,[ve.MediumMax]:32,[ve.Large]:35,[ve.LargeMax]:35,[ve.ExtraLarge]:35,[ve.XXLarge]:40,[ve.XXXLarge]:50},mut={[ve.Small]:28,[ve.SmallMax]:28,[ve.Medium]:32,[ve.MediumMax]:32,[ve.Large]:32,[ve.LargeMax]:32,[ve.ExtraLarge]:32,[ve.XXLarge]:40,[ve.XXXLarge]:50};var vut=function(t){return{display:t?"flex":"none"}}
vendor: 11,004 bytes, lines 296-304
296,dQ="#4fa94d",yut={"aria-busy":!0,role:"status"};var Vhe={exports:{}},qi={};/**
297 * @license React
298 * react-is.production.min.js
299 *
300 * Copyright (c) Facebook, Inc. and its affiliates.
301 *
302 * This source code is licensed under the MIT license found in the
303 * LICENSE file in the root directory of this source tree.
304 */var RV=Symbol.for("react.element"),LV=Symbol.for("react.portal"),K2=Symbol.for("react.fragment"),Y2=Symbol.for("react.strict_mode"),Z2=Symbol.for("react.profiler"),Q2=Symbol.for("react.provider"),X2=Symbol.for("react.context"),but=Symbol.for("react.server_context"),J2=Symbol.for("react.forward_ref"),eN=Symbol.for("react.suspense"),tN=Symbol.for("react.suspense_list"),nN=Symbol.for("react.memo"),rN=Symbol.for("react.lazy"),Sut=Symbol.for("react.offscreen"),Hhe;Hhe=Symbol.for("react.module.reference");function Nd(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case RV:switch(t=t.type,t){case K2:case Z2:case Y2:case eN:case tN:return t;default:switch(t=t&&t.$$typeof,t){case but:case X2:case J2:case rN:case nN:case Q2:return t;default:return e}}case LV:return e}}}qi.ContextConsumer=X2;qi.ContextProvider=Q2;qi.Element=RV;qi.ForwardRef=J2;qi.Fragment=K2;qi.Lazy=rN;qi.Memo=nN;qi.Portal=LV;qi.Profiler=Z2;qi.StrictMode=Y2;qi.Suspense=eN;qi.SuspenseList=tN;qi.isAsyncMode=function(){return!1};qi.isConcurrentMode=function(){return!1};qi.isContextConsumer=function(t){return Nd(t)===X2};qi.isContextProvider=function(t){return Nd(t)===Q2};qi.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===RV};qi.isForwardRef=function(t){return Nd(t)===J2};qi.isFragment=function(t){return Nd(t)===K2};qi.isLazy=function(t){return Nd(t)===rN};qi.isMemo=function(t){return Nd(t)===nN};qi.isPortal=function(t){return Nd(t)===LV};qi.isProfiler=function(t){return Nd(t)===Z2};qi.isStrictMode=function(t){return Nd(t)===Y2};qi.isSuspense=function(t){return Nd(t)===eN};qi.isSuspenseList=function(t){return Nd(t)===tN};qi.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===K2||t===Z2||t===Y2||t===eN||t===tN||t===Sut||typeof t=="object"&&t!==null&&(t.$$typeof===rN||t.$$typeof===nN||t.$$typeof===Q2||t.$$typeof===X2||t.$$typeof===J2||t.$$typeof===Hhe||t.getModuleId!==void 0)};qi.typeOf=Nd;Vhe.exports=qi;var jhe=Vhe.exports;function Eut(t){function e(Q,de,le,ye,fe){for(var We=0,Le=0,Ve=0,at=0,Et,ne,Ze=0,lt=0,ot,se=ot=Et=0,Fe=0,ht=0,Ct=0,pt=0,me=le.length,De=me-1,Me,qe="",ut="",Tt="",jt="",on;Fe<me;){if(ne=le.charCodeAt(Fe),Fe===De&&Le+at+Ve+We!==0&&(Le!==0&&(ne=Le===47?10:47),at=Ve=We=0,me++,De++),Le+at+Ve+We===0){if(Fe===De&&(0<ht&&(qe=qe.replace(f,"")),0<qe.trim().length)){switch(ne){case 32:case 9:case 59:case 13:case 10:break;default:qe+=le.charAt(Fe)}ne=59}switch(ne){case 123:for(qe=qe.trim(),Et=qe.charCodeAt(0),ot=1,pt=++Fe;Fe<me;){switch(ne=le.charCodeAt(Fe)){case 123:ot++;break;case 125:ot--;break;case 47:switch(ne=le.charCodeAt(Fe+1)){case 42:case 47:e:{for(se=Fe+1;se<De;++se)switch(le.charCodeAt(se)){case 47:if(ne===42&&le.charCodeAt(se-1)===42&&Fe+2!==se){Fe=se+1;break e}break;case 10:if(ne===47){Fe=se+1;break e}}Fe=se}}break;case 91:ne++;case 40:ne++;case 34:case 39:for(;Fe++<De&&le.charCodeAt(Fe)!==ne;);}if(ot===0)break;Fe++}switch(ot=le.substring(pt,Fe),Et===0&&(Et=(qe=qe.replace(d,"").trim()).charCodeAt(0)),Et){case 64:switch(0<ht&&(qe=qe.replace(f,"")),ne=qe.charCodeAt(1),ne){case 100:case 109:case 115:case 45:ht=de;break;default:ht=j}if(ot=e(de,ht,ot,ne,fe+1),pt=ot.length,0<G&&(ht=n(j,qe,Ct),on=o(3,ot,ht,de,C,Z,pt,ne,fe,ye),qe=ht.join(""),on!==void 0&&(pt=(ot=on.trim()).length)===0&&(ne=0,ot="")),0<pt)switch(ne){case 115:qe=qe.replace(N,a);case 100:case 109:case 45:ot=qe+"{"+ot+"}";break;case 107:qe=qe.replace(A,"$1 $2"),ot=qe+"{"+ot+"}",ot=V===1||V===2&&s("@"+ot,3)?"@-webkit-"+ot+"@"+ot:"@"+ot;break;default:ot=qe+ot,ye===112&&(ot=(ut+=ot,""))}else ot="";break;default:ot=e(de,n(de,qe,Ct),ot,ye,fe+1)}Tt+=ot,ot=Ct=ht=se=Et=0,qe="",ne=le.charCodeAt(++Fe);break;case 125:case 59:if(qe=(0<ht?qe.replace(f,""):qe).trim(),1<(pt=qe.length))switch(se===0&&(Et=qe.charCodeAt(0),Et===45||96<Et&&123>Et)&&(pt=(qe=qe.replace(" ",":")).length),0<G&&(on=o(1,qe,de,Q,C,Z,ut.length,ye,fe,ye))!==void 0&&(pt=(qe=on.trim()).length)===0&&(qe="\0\0"),Et=qe.charCodeAt(0),ne=qe.charCodeAt(1),Et){case 0:break;case 64:if(ne===105||ne===99){jt+=qe+le.charAt(Fe);break}default:qe.charCodeAt(pt-1)!==58&&(ut+=i(qe,Et,ne,qe.charCodeAt(2)))}Ct=ht=se=Et=0,qe="",ne=le.charCodeAt(++Fe)}}switch(ne){case 13:case 10:Le===47?Le=0:1+Et===0&&ye!==107&&0<qe.length&&(ht=1,qe+="\0"),0<G*ae&&o(0,qe,de,Q,C,Z,ut.length,ye,fe,ye),Z=1,C++;break;case 59:case 125:if(Le+at+Ve+We===0){Z++;break}default:switch(Z++,Me=le.charAt(Fe),ne){case 9:case 32:if(at+We+Le===0)switch(Ze){case 44:case 58:case 9:case 32:Me="";break;default:ne!==32&&(Me=" ")}break;case 0:Me="\\0";break;case 12:Me="\\f";break;case 11:Me="\\v";break;case 38:at+Le+We===0&&(ht=Ct=1,Me="\f"+Me);break;case 108:if(at+Le+We+L===0&&0<se)switch(Fe-se){case 2:Ze===112&&le.charCodeAt(Fe-3)===58&&(L=Ze);case 8:lt===111&&(L=lt)}break;case 58:at+Le+We===0&&(se=Fe);break;case 44:Le+Ve+at+We===0&&(ht=1,Me+="\r");break;case 34:case 39:Le===0&&(at=at===ne?0:at===0?ne:at);break;case 91:at+Le+Ve===0&&We++;break;case 93:at+Le+Ve===0&&We--;break;case 41:at+Le+We===0&&Ve--;break;case 40:if(at+Le+We===0){if(Et===0)switch(2*Ze+3*lt){case 533:break;default:Et=1}Ve++}break;case 64:Le+Ve+at+We+se+ot===0&&(ot=1);break;case 42:case 47:if(!(0<at+We+Ve))switch(Le){case 0:switch(2*ne+3*le.charCodeAt(Fe+1)){case 235:Le=47;break;case 220:pt=Fe,Le=42}break;case 42:ne===47&&Ze===42&&pt+2!==Fe&&(le.charCodeAt(pt+2)===33&&(ut+=le.substring(pt,Fe+1)),Me="",Le=0)}}Le===0&&(qe+=Me)}lt=Ze,Ze=ne,Fe++}if(pt=ut.length,0<pt){if(ht=de,0<G&&(on=o(2,ut,ht,Q,C,Z,pt,ye,fe,ye),on!==void 0&&(ut=on).length===0))return jt+ut+Tt;if(ut=ht.join(",")+"{"+ut+"}",V*L!==0){switch(V!==2||s(ut,2)||(L=0),L){case 111:ut=ut.replace(x,":-moz-$1")+ut;break;case 112:ut=ut.replace(w,"::-webkit-input-$1")+ut.replace(w,"::-moz-$1")+ut.replace(w,":-ms-input-$1")+ut}L=0}}return jt+ut+Tt}function n(Q,de,le){var ye=de.trim().split(b);de=ye;var fe=ye.length,We=Q.length;switch(We){case 0:case 1:var Le=0;for(Q=We===0?"":Q[0]+" ";Le<fe;++Le)de[Le]=r(Q,de[Le],le).trim();break;default:var Ve=Le=0;for(de=[];Le<fe;++Le)for(var at=0;at<We;++at)de[Ve++]=r(Q[at]+" ",ye[Le],le).trim()}return de}function r(Q,de,le){var ye=de.charCodeAt(0);switch(33>ye&&(ye=(de=de.trim()).charCodeAt(0)),ye){case 38:return de.replace(S,"$1"+Q.trim());case 58:return Q.trim()+de.replace(S,"$1"+Q.trim());default:if(0<1*le&&0<de.indexOf("\f"))return de.replace(S,(Q.charCodeAt(0)===58?"":"$1")+Q.trim())}return Q+de}function i(Q,de,le,ye){var fe=Q+";",We=2*de+3*le+4*ye;if(We===944){Q=fe.indexOf(":",9)+1;var Le=fe.substring(Q,fe.length-1).trim();return Le=fe.substring(0,Q).trim()+Le+";",V===1||V===2&&s(Le,1)?"-webkit-"+Le+Le:Le}if(V===0||V===2&&!s(fe,1))return fe;switch(We){case 1015:return fe.charCodeAt(10)===97?"-webkit-"+fe+fe:fe;case 951:return fe.charCodeAt(3)===116?"-webkit-"+fe+fe:fe;case 963:return fe.charCodeAt(5)===110?"-webkit-"+fe+fe:fe;case 1009:if(fe.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+fe+fe;case 978:return"-webkit-"+fe+"-moz-"+fe+fe;case 1019:case 983:return"-webkit-"+fe+"-moz-"+fe+"-ms-"+fe+fe;case 883:if(fe.charCodeAt(8)===45)return"-webkit-"+fe+fe;if(0<fe.indexOf("image-set(",11))return fe.replace(q,"$1-webkit-$2")+fe;break;case 932:if(fe.charCodeAt(4)===45)switch(fe.charCodeAt(5)){case 103:return"-webkit-box-"+fe.replace("-grow","")+"-webkit-"+fe+"-ms-"+fe.replace("grow","positive")+fe;case 115:return"-webkit-"+fe+"-ms-"+fe.replace("shrink","negative")+fe;case 98:return"-webkit-"+fe+"-ms-"+fe.replace("basis","preferred-size")+fe}return"-webkit-"+fe+"-ms-"+fe+fe;case 964:return"-webkit-"+fe+"-ms-flex-"+fe+fe;case 1023:if(fe.charCodeAt(8)!==99)break;return Le=fe.substring(fe.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+Le+"-webkit-"+fe+"-ms-flex-pack"+Le+fe;case 1005:return g.test(fe)?fe.replace(h,":-webkit-")+fe.replace(h,":-moz-")+fe:fe;case 1e3:switch(Le=fe.substring(13).trim(),de=Le.indexOf("-")+1,Le.charCodeAt(0)+Le.charCodeAt(de)){case 226:Le=fe.replace(P,"tb");break;case 232:Le=fe.replace(P,"tb-rl");break;case 220:Le=fe.replace(P,"lr");break;default:return fe}return"-webkit-"+fe+"-ms-"+Le+fe;case 1017:if(fe.indexOf("sticky",9)===-1)break;case 975:switch(de=(fe=Q).length-10,Le=(fe.charCodeAt(de)===33?fe.substring(0,de):fe).substring(Q.indexOf(":",7)+1).trim(),We=Le.charCodeAt(0)+(Le.charCodeAt(7)|0)){case 203:if(111>Le.charCodeAt(8))break;case 115:fe=fe.replace(Le,"-webkit-"+Le)+";"+fe;break;case 207:case 102:fe=fe.replace(Le,"-webkit-"+(102<We?"inline-":"")+"box")+";"+fe.replace(Le,"-webkit-"+Le)+";"+fe.replace(Le,"-ms-"+Le+"box")+";"+fe}return fe+";";case 938:if(fe.charCodeAt(5)===45)switch(fe.charCodeAt(6)){case 105:return Le=fe.replace("-items",""),"-webkit-"+fe+"-webkit-box-"+Le+"-ms-flex-"+Le+fe;case 115:return"-webkit-"+fe+"-ms-flex-item-"+fe.replace(U,"")+fe;default:return"-webkit-"+fe+"-ms-flex-line-pack"+fe.replace("align-content","").replace(U,"")+fe}break;case 973:case 989:if(fe.charCodeAt(3)!==45||fe.charCodeAt(4)===122)break;case 931:case 953:if(B.test(Q)===!0)return(Le=Q.substring(Q.indexOf(":")+1)).charCodeAt(0)===115?i(Q.replace("stretch","fill-available"),de,le,ye).replace(":fill-available",":stretch"):fe.replace(Le,"-webkit-"+Le)+fe.replace(Le,"-moz-"+Le.replace("fill-",""))+fe;break;case 962:if(fe="-webkit-"+fe+(fe.charCodeAt(5)===102?"-ms-"+fe:"")+fe,le+ye===211&&fe.charCodeAt(13)===105&&0<fe.indexOf("transform",10))return fe.substring(0,fe.indexOf(";",27)+1).replace(v,"$1-webkit-$2")+fe}return fe}function s(Q,de){var le=Q.indexOf(de===1?":":"{"),ye=Q.substring(0,de!==3?le:10);return le=Q.substring(le+1,Q.length-1),ie(de!==2?ye:ye.replace(H,"$1"),le,de)}function a(Q,de){var le=i(de,de.charCodeAt(0),de.charCodeAt(1),de.charCodeAt(2));return le!==de+";"?le.replace(k," or ($1)").substring(4):"("+de+")"}function o(Q,de,le,ye,fe,We,Le,Ve,at,Et){for(var ne=0,Ze=de,lt;ne<G;++ne)switch(lt=X[ne].call(c,Q,Ze,le,ye,fe,We,Le,Ve,at,Et)){case void 0:case!1:case!0:case null:break;default:Ze=lt}if(Ze!==de)return Ze}function l(Q){switch(Q){case void 0:case null:G=X.length=0;break;default:if(typeof Q=="function")X[G++]=Q;else if(typeof Q=="object")for(var de=0,le=Q.length;de<le;++de)l(Q[de]);else ae=!!Q|0}return l}function u(Q){return Q=Q.prefix,Q!==void 0&&(ie=null,Q?typeof Q!="function"?V=1:(V=2,ie=Q):V=0),u}function c(Q,de){var le=Q;if(33>le.charCodeAt(0)&&(le=le.trim()),ue=le,le=[ue],0<G){var ye=o(-1,de,le,le,C,Z,0,0,0,0);ye!==void 0&&typeof ye=="string"&&(de=ye)}var fe=e(j,le,de,0,0);return 0<G&&(ye=o(-2,fe,le,le,C,Z,fe.length,0,0,0),ye!==void 0&&(fe=ye)),ue="",L=0,Z=C=1,fe}var d=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,g=/zoo|gra/,v=/([,: ])(transform)/g,b=/,\r+?/g,S=/([\t\r\n ])*\f?&/g,A=/@(k\w+)\s*(\S*)\s*/,w=/::(place)/g,x=/:(read-only)/g,P=/[svh]\w+-[tblr]{2}
304/,N=/\(\s*(.*)\s*\)/g,k=/([\s\S]*?);/g,U=/-self|flex-/g,H=/[^]*?(:[rp][el]a[\w-]+)[^]*/,B=/stretch|:\s*\w+\-(?:conte|avail)/,q=/([^-])(image-set\()/,Z=1,C=1,L=0,V=1,j=[],X=[],G=0,ie=null,ae=0,ue="";return c.use=l,c.set=u,t!==void 0&&u(t),c}var Tut={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Aut=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,fQ=mne(function(t){return Aut.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),ud={};function fg(){return(fg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var hQ=function(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n},x4=function(t){return t!==null&&typeof t=="object"&&(t.toString?t.toString():Object.prototype.toString.call(t))==="[object Object]"&&!jhe.typeOf(t)},oD=Object.freeze([]),Sv=Object.freeze({});function oC(t){return typeof t=="function"}function pQ(t){return t.displayName||t.name||"Component"}function DV(t){return t&&typeof t.styledComponentId=="string"}var N1=typeof process<"u"&&ud!==void 0&&(ud.REACT_APP_SC_ATTR||ud.SC_ATTR)||"data-styled",kV=typeof window<"u"&&"HTMLElement"in window,wut=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&ud!==void 0&&(ud.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&ud.REACT_APP_SC_DISABLE_SPEEDY!==""?ud.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&ud.REACT_APP_SC_DISABLE_SPEEDY:ud.SC_DISABLE_SPEEDY!==void 0&&ud.SC_DISABLE_SPEEDY!==""&&ud.SC_DISABLE_SPEEDY!=="false"&&ud.SC_DISABLE_SPEEDY));function Ex(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+t+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var _ut=function(){function t(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var e=t.prototype;return e.indexOfGroup=function(n){for(var r=0,i=0;i<n;i++)r+=this.groupSizes[i];return r},e.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var i=this.groupSizes,s=i.length,a=s;n>=a;)(a<<=1)<0&&Ex(16,""+n);this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var o=s;o<a;o++)this.groupSizes[o]=0}for(var l=this.indexOfGroup(n+1),u=0,c=r.length;u<c;u++)this.tag.insertRule(l,r[u])&&(this.groupSizes[n]++,l++)},e.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],i=this.indexOfGroup(n),s=i+r;this.groupSizes[n]=0;for(var a=i;a<s;a++)this.tag.deleteRule(i)}},e.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var i=this.groupSizes[n],s=this.indexOfGroup(n),a=s+i,o=s;o<a;o++)r+=this.tag.getRule(o)+`/*!sc*/
305`;return r},t}(),FP=new Map,lD=new Map,Kw=1,SO=function(t){if(FP.has(t))return FP.get(t);for(;lD.has(Kw);)Kw++;var e=Kw++;return FP.set(t,e),lD.set(e,t),e},Cut=function(t){return lD.get(t)},xut=function(t,e){e>=Kw&&(Kw=e+1),FP.set(t,e),lD.set(e,t)},Iut="style["+N1+'][data-styled-version="5.3.11"]',Out=new RegExp("^"+N1+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Put=function(t,e,n){for(var r,i=n.split(","),s=0,a=i.length;s<a;s++)(r=i[s])&&t.registerName(e,r)},Rut=function(t,e){for(var n=(e.textContent||"").split(`/*!sc*/
306`),r=[],i=0,s=n.length;i<s;i++){var a=n[i].trim();if(a){var o=a.match(Out);
vendor: 4,850 bytes, lines 306-307
306if(o){var l=0|parseInt(o[1],10),u=o[2];l!==0&&(xut(u,l),Put(t,u,o[3]),t.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}},Lut=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},zhe=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(o){for(var l=o.childNodes,u=l.length;u>=0;u--){var c=l[u];if(c&&c.nodeType===1&&c.hasAttribute(N1))return c}}(n),s=i!==void 0?i.nextSibling:null;r.setAttribute(N1,"active"),r.setAttribute("data-styled-version","5.3.11");var a=Lut();return a&&r.setAttribute("nonce",a),n.insertBefore(r,s),r},Dut=function(){function t(n){var r=this.element=zhe(n);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var s=document.styleSheets,a=0,o=s.length;a<o;a++){var l=s[a];if(l.ownerNode===i)return l}Ex(17)}(r),this.length=0}var e=t.prototype;return e.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},e.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},e.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},t}(),kut=function(){function t(n){var r=this.element=zhe(n);this.nodes=r.childNodes,this.length=0}var e=t.prototype;return e.insertRule=function(n,r){if(n<=this.length&&n>=0){var i=document.createTextNode(r),s=this.nodes[n];return this.element.insertBefore(i,s||null),this.length++,!0}return!1},e.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},e.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},t}(),Nut=function(){function t(n){this.rules=[],this.length=0}var e=t.prototype;return e.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},e.deleteRule=function(n){this.rules.splice(n,1),this.length--},e.getRule=function(n){return n<this.length?this.rules[n]:""},t}(),gQ=kV,Mut={isServer:!kV,useCSSOMInjection:!wut},Ghe=function(){function t(n,r,i){n===void 0&&(n=Sv),r===void 0&&(r={}),this.options=fg({},Mut,{},n),this.gs=r,this.names=new Map(i),this.server=!!n.isServer,!this.server&&kV&&gQ&&(gQ=!1,function(s){for(var a=document.querySelectorAll(Iut),o=0,l=a.length;o<l;o++){var u=a[o];u&&u.getAttribute(N1)!=="active"&&(Rut(s,u),u.parentNode&&u.parentNode.removeChild(u))}}(this))}t.registerId=function(n){return SO(n)};var e=t.prototype;return e.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new t(fg({},this.options,{},n),this.gs,r&&this.names||void 0)},e.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},e.getTag=function(){return this.tag||(this.tag=(i=(r=this.options).isServer,s=r.useCSSOMInjection,a=r.target,n=i?new Nut(a):s?new Dut(a):new kut(a),new _ut(n)));var n,r,i,s,a},e.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},e.registerName=function(n,r){if(SO(n),this.names.has(n))this.names.get(n).add(r);else{var i=new Set;i.add(r),this.names.set(n,i)}},e.insertRules=function(n,r,i){this.registerName(n,r),this.getTag().insertRules(SO(n),i)},e.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},e.clearRules=function(n){this.getTag().clearGroup(SO(n)),this.clearNames(n)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(n){for(var r=n.getTag(),i=r.length,s="",a=0;a<i;a++){var o=Cut(a);if(o!==void 0){var l=n.names.get(o),u=r.getGroup(a);if(l&&u&&l.size){var c=N1+".g"+a+'[id="'+o+'"]',d="";l!==void 0&&l.forEach(function(f){f.length>0&&(d+=f+",")}),s+=""+u+c+'{content:"'+d+`"}/*!sc*/
307`}}}return s}(this)},t}(),Fut=/(a)(d)/gi,mQ=function(t){return String.fromCharCode(t+(t>25?39:97))};function I4(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=mQ(e%52)+n;return(mQ(e%52)+n).replace(Fut,"$1-$2")}var hE=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},Whe=function(t){return hE(5381,t)};function $ut(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(oC(n)&&!DV(n))return!1}return!0}var But=Whe("5.3.11"),Uut=function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&$ut(e),this.componentId=n,this.baseHash=hE(But,n),this.baseStyle=r,Ghe.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.componentId,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(i,this.staticRulesId))s.push(this.staticRulesId);else{var a=M1(this.rules,e,n,r).join(""),o=I4(hE(this.baseHash,a)>>>0);if(!n.hasNameForId(i,o)){var l=r(a,"."+o,void 0,i);n.insertRules(i,o,l)}s.push(o),this.staticRulesId=o}else{for(var u=this.rules.length,c=hE(this.baseHash,r.hash),d="",f=0;f<u;f++){var h=this.rules[f];if(typeof h=="string")d+=h;else if(h){var g=M1(h,e,n,r),v=Array.isArray(g)?g.join(""):g;c=hE(c,v+f),d+=v}}if(d){var b=I4(c>
307>>0);if(!n.hasNameForId(i,b)){var S=r(d,"."+b,void 0,i);n.insertRules(i,b,S)}s.push(b)}}return s.join(" ")},t}(),Vut=/^\s*\/\/.*$/gm,Hut=[":","[",".","#"];function jut(t){var e,n,r,i,s=Sv,a=s.options,o=a===void 0?Sv:a,l=s.plugins,u=l===void 0?oD:l,c=new Eut(o),d=[],f=function(v){function b(S){if(S)try{v(S+"}")}catch{}}return function(S,A,w,x,P,N,k,U,H,B){switch(S){case 1:if(H===0&&A.charCodeAt(0)===64)return v(A+";"),"";break;case 2:if(U===0)return A+"/*|*/";break;case 3:switch(U){case 102:case 112:return v(w[0]+A),"";default:return A+(B===0?"/*|*/":"")}case-2:A.split("/*|*/}").forEach(b)}}}(function(v){d.push(v)}),h=function(v,b,S){return b===0&&Hut.indexOf(S[n.length])!==-1||S.match(i)?v:"."+e};function g(v,b,S,A){A===void 0&&(A="&");var w=v.replace(Vut,""),x=b&&S?S+" "+b+" { "+w+" }":w;return e=A,n=b,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),c(S||!b?"":b,x)}return c.use([].concat(u,[function(v,b,S){v===2&&S.length&&S[0].lastIndexOf(n)>0&&(S[0]=S[0].replace(r,h))},f,function(v){if(v===-2){var b=d;return d=[],b}}])),g.hash=u.length?u.reduce(function(v,b){return b.name||Ex(15),hE(v,b.name)},5381).toString():"",g}var qhe=mt.createContext();qhe.Consumer;var Khe=mt.createContext(),zut=(Khe.Consumer,new Ghe),O4=jut();function Gut(){return $.useContext(qhe)||zut}function Wut(){return $.useContext(Khe)||O4}var Yhe=function(){function t(e,n){var r=this;this.inject=function(i,s){s===void 0&&(s=O4);var a=r.name+s.hash;i.hasNameForId(r.id,a)||i.insertRules(r.id,a,s(r.rules,a,"@keyframes"))},this.toString=function(){return Ex(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=n}return t.prototype.getName=function(e){return e===void 0&&(e=O4),this.name+e.hash},t}(),qut=/([A-Z])/,Kut=/([A-Z])/g,Yut=/^ms-/,Zut=function(t){return"-"+t.toLowerCase()};function vQ(t){return qut.test(t)?t.replace(Kut,Zut).replace(Yut,"-ms-"):t}var yQ=function(t){return t==null||t===!1||t===""};function M1(t,e,n,r){if(Array.isArray(t)){for(var i,s=[],a=0,o=t.length;a<o;a+=1)(i=M1(t[a],e,n,r))!==""&&(Array.isArray(i)?s.push.apply(s,i):s.push(i));return s}if(yQ(t))return"";if(DV(t))return"."+t.styledComponentId;if(oC(t)){if(typeof(u=t)!="function"||u.prototype&&u.prototype.isReactComponent||!e)return t;var l=t(e);return M1(l,e,n,r)}var u;return t instanceof Yhe?n?(t.inject(n,r),t.getName(r)):t:x4(t)?function c(d,f){var h,g,v=[];for(var b in d)d.hasOwnProperty(b)&&!yQ(d[b])&&(Array.isArray(d[b])&&d[b].isCss||oC(d[b])?v.push(vQ(b)+":",d[b],";"):x4(d[b])?v.push.apply(v,c(d[b],b)):v.push(vQ(b)+": "+(h=b,(g=d[b])==null||typeof g=="boolean"||g===""?"":typeof g!="number"||g===0||h in Tut||h.startsWith("--")?String(g).trim():g+"px")+";"));return f?[f+" {"].concat(v,["}"]):v}(t):t.toString()}var bQ=function(t){return Array.isArray(t)&&(t.isCss=!0),t};function Zhe(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oC(t)||x4(t)?bQ(M1(hQ(oD,[t].concat(n)))):n.length===0&&t.length===1&&typeof t[0]=="string"?t:bQ(M1(hQ(t,n)))}var Qut=function(t,e,n){return n===void 0&&(n=Sv),t.theme!==n.theme&&t.theme||e||n.theme},Xut=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Jut=/(^-|-$)/g;function AF(t){return t.replace(Xut,"-").replace(Jut,"")}var Qhe=function(t){return I4(Whe(t)>>>0)};function EO(t){return typeof t=="string"&&!0}var P4=function(t){return typeof t=="function"||typeof t=="object"&&t!==null&&!Array.isArray(t)},ect=function(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"};function tct(t,e,n){var r=t[n];P4(e)&&P4(r)?Xhe(r,e):t[n]=e}function Xhe(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,s=n;i<s.length;i++){var a=s[i];if(P4(a))for(var o in a)ect(o)&&tct(t,a[o],o)}return t}var Jhe=mt.createContext();Jhe.Consumer;var wF={};function epe(t,e,n){var r=DV(t),i=!EO(t),s=e.attrs,a=s===void 0?oD:s,o=e.componentId,l=o===void 0?function(A,w){var x=typeof A!="string"?"sc":AF(A);wF[x]=(wF[x]||0)+1;var P=x+"-"+Qhe("5.3.11"+x+wF[x]);return w?w+"-"+P:P}(e.displayName,e.parentComponentId):o,u=e.displayName,c=u===void 0?function(A){return EO(A)?"styled."+A:"Styled("+pQ(A)+")"}(t):u,d=e.displayName&&e.componentId?AF(e.displayName)+"-"+e.componentId:e.componentId||l,f=r&&t.attrs?Array.prototype.concat(t.attrs,a).filter(
307Boolean):a,h=e.shouldForwardProp;r&&t.shouldForwardProp&&(h=e.shouldForwardProp?function(A,w,x){return t.shouldForwardProp(A,w,x)&&e.shouldForwardProp(A,w,x)}:t.shouldForwardProp);var g,v=new Uut(n,d,r?t.componentStyle:void 0),b=v.isStatic&&a.length===0,S=function(A,w){return function(x,P,N,k){var U=x.attrs,H=x.componentStyle,B=x.defaultProps,q=x.foldedComponentIds,Z=x.shouldForwardProp,C=x.styledComponentId,L=x.target,V=function(ye,fe,We){ye===void 0&&(ye=Sv);var Le=fg({},fe,{theme:ye}),Ve={};return We.forEach(function(at){var Et,ne,Ze,lt=at;for(Et in oC(lt)&&(lt=lt(Le)),lt)Le[Et]=Ve[Et]=Et==="className"?(ne=Ve[Et],Ze=lt[Et],ne&&Ze?ne+" "+Ze:ne||Ze):lt[Et]}),[Le,Ve]}(Qut(P,$.useContext(Jhe),B)||Sv,P,U),j=V[0],X=V[1],G=function(ye,fe,We,Le){var Ve=Gut(),at=Wut(),Et=fe?ye.generateAndInjectStyles(Sv,Ve,at):ye.generateAndInjectStyles(We,Ve,at);return Et}(H,k,j),ie=N,ae=X.$as||P.$as||X.as||P.as||L,ue=EO(ae),Q=X!==P?fg({},P,{},X):P,de={};for(var le in Q)le[0]!=="$"&&le!=="as"&&(le==="forwardedAs"?de.as=Q[le]:(Z?Z(le,fQ,ae):!ue||fQ(le))&&(de[le]=Q[le]));return P.style&&X.style!==P.style&&(de.style=fg({},P.style,{},X.style)),de.className=Array.prototype.concat(q,C,G!==C?G:null,P.className,X.className).filter(Boolean).join(" "),de.ref=ie,$.createElement(ae,de)}(g,A,w,b)};return S.displayName=c,(g=mt.forwardRef(S)).attrs=f,g.componentStyle=v,g.displayName=c,g.shouldForwardProp=h,g.foldedComponentIds=r?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):oD,g.styledComponentId=d,g.target=r?t.target:t,g.withComponent=function(A){var w=e.componentId,x=function(N,k){if(N==null)return{};var U,H,B={},q=Object.keys(N);for(H=0;H<q.length;H++)U=q[H],k.indexOf(U)>=0||(B[U]=N[U]);return B}(e,["componentId"]),P=w&&w+"-"+(EO(A)?A:AF(pQ(A)));return epe(A,fg({},x,{attrs:f,componentId:P}),n)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(A){this._foldedDefaultProps=r?Xhe({},t.defaultProps,A):A}}),Object.defineProperty(g,"toString",{value:function(){return"."+g.styledComponentId}}),i&&BAe(g,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var nb=function(t){return function e(n,r,i){if(i===void 0&&(i=Sv),!jhe.isValidElementType(r))return Ex(1,String(r));var s=function(){return n(r,i,Zhe.apply(void 0,arguments))};return s.withConfig=function(a){return e(n,r,fg({},i,{},a))},s.attrs=function(a){return e(n,r,fg({},i,{attrs:Array.prototype.concat(i.attrs,a).filter(Boolean)}))},s}(epe,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(t){nb[t]=nb(t)});function NV(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=Zhe.apply(void 0,[t].concat(n)).join(""),s=Qhe(i);return new Yhe(s,i)}var tpe=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},cf=242.776657104492,nct=1.6,rct=NV(SQ||(SQ=tpe([`
308  12.5% {
309    stroke-dasharray: `,"px, ",`px;
310    stroke-dashoffset: -`,`px;
311  }
312  43.75% {
313    stroke-dasharray: `,"px, ",`px;
314    stroke-dashoffset: -`,`px;
315  }
316  100% {
317    stroke-dasharray: `,"px, ",`px;
318    stroke-dashoffset: -`,`px;
319  }
320`],[`
321  12.5% {
322    stroke-dasharray: `,"px, ",`px;
323    stroke-dashoffset: -`,`px;
324  }
325  43.75% {
326    stroke-dasharray: `,"px, ",`px;
327    stroke-dashoffset: -`,`px;
328  }
329  100% {
330    stroke-dasharray: `,"px, ",`px;
331    stroke-dashoffset: -`,`px;
332  }
333`])),cf*.14,cf,cf*.11,cf*.35,cf,cf*.35,cf*.01,cf,cf*.99);nb.path(EQ||(EQ=tpe([`
334  stroke-dasharray: `,"px, ",`;
335  stroke-dashoffset: 0;
336  animation: `," ",`s linear infinite;
337`],[`
338  stroke-dasharray: `,"px, ",`;
339  stroke-dashoffset: 0;
340  animation: `," ",`s linear infinite;
341`])),cf*.01,cf,rct,nct);var SQ,EQ;var Yw=function(){return Yw=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yw.apply(this,arguments)},_F=20,ict=function(t){return["M"+t+" 0c0-9.94-8.06",t,t,t].join("-")},sct=function(t,e,n){var r=Math.max(t,e),i=-n-r/2+1,s=n*2+r;return[i,i,s,s].join(" ")},act=function(t){var e=t.height,n=e===void 0?80:e,r=t.width,i=r===void 0?80:r,s=t.color,a=s===void 0?dQ:s,o=t.secondaryColor,l=o===void 0?dQ:o,u=t.ariaLabel,c=u===void 0?"oval-loading":u,d=t.wrapperStyle,f=t.wrapperClass,h=t.visible,g=h===void 0?!0:h,v=t.strokeWidth,b=v===void 0?2:v,S=t.strokeWidthSecondary;return mt.createElement("div",Yw({style:Yw(Yw({},vut(g)),d),className:f,"data-testid":"oval-loading","aria-label":c},yut),mt.createElement("svg",{width:i,height:n,viewBox:sct(Number(b),Number(S||b),_F),xmlns:"http://www.w3.org/2000/svg",stroke:a,"data-testid":"oval-svg"},mt.createElement("g",{fill:"none",fillRule:"evenodd"},mt.createElement("g",{transform:"translate(1 1)",strokeWidth:Number(S||b),"data-testid":"oval-secondary-group"},mt.createElement("circle",{strokeOpacity:".5",cx:"0",cy:"0",r:_F,stroke:l,strokeWidth:b}),mt.createElement("path",{d:ict(_F)},mt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 0 0",to:"360 0 0",dur:"1s",repeatCount:"indef
341inite"}))))))};var oct=function(e,n){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof r[e]<"u")return r[e];if(e.indexOf(".")>0){for(var i=e.split("."),s=i.length,a=r[i[0]],o=1;a!=null&&o<s;)a=a[i[o]],o+=1;if(typeof a<"u")return a}return n}},MV=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};var lct=NV(TQ||(TQ=MV([`
342 to {
343    transform: rotate(360deg);
344  }
345`],[`
346 to {
347    transform: rotate(360deg);
348  }
349`])));nb.svg(AQ||(AQ=MV([`
350  animation: `,` 0.75s steps(12, end) infinite;
351  animation-duration: `,`s;
352`],[`
353  animation: `,` 0.75s steps(12, end) infinite;
354  animation-duration: `,`s;
355`])),lct,oct("speed","0.75"));nb.polyline(wQ||(wQ=MV([`
356  stroke-width: `,`px;
357  stroke-linecap: round;
358
359  &:nth-child(12n + 0) {
360    stroke-opacity: 0.08;
361  }
362
363  &:nth-child(12n + 1) {
364    stroke-opacity: 0.17;
365  }
366
367  &:nth-child(12n + 2) {
368    stroke-opacity: 0.25;
369  }
370
371  &:nth-child(12n + 3) {
372    stroke-opacity: 0.33;
373  }
374
375  &:nth-child(12n + 4) {
376    stroke-opacity: 0.42;
377  }
378
379  &:nth-child(12n + 5) {
380    stroke-opacity: 0.5;
381  }
382
383  &:nth-child(12n + 6) {
384    stroke-opacity: 0.58;
385  }
386
387  &:nth-child(12n + 7) {
388    stroke-opacity: 0.66;
389  }
390
391  &:nth-child(12n + 8) {
392    stroke-opacity: 0.75;
393  }
394
395  &:nth-child(12n + 9) {
396    stroke-opacity: 0.83;
397  }
398
399  &:nth-child(12n + 11) {
400    stroke-opacity: 0.92;
401  }
402`],[`
403  stroke-width: `,`px;
404  stroke-linecap: round;
405
406  &:nth-child(12n + 0) {
407    stroke-opacity: 0.08;
408  }
409
410  &:nth-child(12n + 1) {
411    stroke-opacity: 0.17;
412  }
413
414  &:nth-child(12n + 2) {
415    stroke-opacity: 0.25;
416  }
417
418  &:nth-child(12n + 3) {
419    stroke-opacity: 0.33;
420  }
421
422  &:nth-child(12n + 4) {
423    stroke-opacity: 0.42;
424  }
425
426  &:nth-child(12n + 5) {
427    stroke-opacity: 0.5;
428  }
429
430  &:nth-child(12n + 6) {
431    stroke-opacity: 0.58;
432  }
433
434  &:nth-child(12n + 7) {
435    stroke-opacity: 0.66;
436  }
437
438  &:nth-child(12n + 8) {
439    stroke-opacity: 0.75;
440  }
441
442  &:nth-child(12n + 9) {
443    stroke-opacity: 0.83;
444  }
445
446  &:nth-child(12n + 11) {
447    stroke-opacity: 0.92;
448  }
449`])),function(t){return t.width});var TQ,AQ,wQ;var FV=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};var uct=NV(_Q||(_Q=FV([`
450 to {
451    stroke-dashoffset: 136;
452  }
453`],[`
454 to {
455    stroke-dashoffset: 136;
456  }
457`])));nb.polygon(CQ||(CQ=FV([`
458  stroke-dasharray: 17;
459  animation: `,` 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;
460`],[`
461  stroke-dasharray: 17;
462  animation: `,` 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;
463`])),uct);nb.svg(xQ||(xQ=FV([`
464  transform-origin: 50% 65%;
465`],[`
466  transform-origin: 50% 65%;
467`])));var _Q,CQ,xQ;const npe=Yn({key:"windowSize",default:{height:0,width:0}}),cct=(t=0)=>{let e=ve.Small;return Object.entries(Oi).forEach(([n,r])=>{t>=r&&(e=Number.parseInt(n,10))}),e};function Fs(){const{width:t}=Ht(npe),[e,n]=$.useState(ve.Small),[r,i]=$.useState(!0);return $.useEffect(()=>{t&&(n(cct(t)),i(!1))},[t]),{bk:e,greaterThan:{SM:Oi[e]>Oi[ve.SmallMax],MD:Oi[e]>Oi[ve.MediumMax],LG:Oi[e]>Oi[ve.LargeMax]},is:{SM:e===ve.Small||e===ve.SmallMax,MD:e===ve.Medium||e===ve.MediumMax,LG:e===ve.Large||e===ve.LargeMax,XL:e===ve.ExtraLarge},isLoading:r,lessThan:{MD:Oi[e]<Oi[ve.Medium],LG:Oi[e]<Oi[ve.Large],XL:Oi[e]<Oi[ve.ExtraLarge]}}}const dct=22,fct=()=>{const{isFullscreenPlayer:t}=$.useContext(ET),{bk:e}=Fs(),n=t?Uhe[e]*1.2:dct;return I(act,{visible:!0,ariaLabel:"oval-loading",color:_e.greyEB,height:n,width:n,secondaryColor:_e.greyA6,strokeWidth:2,strokeWidthSecondary:2})},yc={container:{alignItems:"center",display:"flex",flexShrink:0,justifyContent:"center"},primaryActionBtn:{borderRadius:"50%"},primaryActionBtnInner:{...Bt.transition("background-color"),...Dr({backgroundColor:_e.white60}),"button:disabled &":{backgroundColor:_e.white30}},primaryActionButtonInnerLoading:{backgroundColor:_e.white30,[Be(ve.Medium)]:{backgroundColor:_e.white30}},secondaryActionBtn:{...Bt.transition("color"),...Bt.focusOutline({outlineOffset:1}),...Dr({color:_e.white60}),borderRadius:"50%",position:"relative","&:disabled":{color:_e.white30}},skipsRemaining:{...cn.buttonSmall,backgroundColor:_e.secondaryMediumGrey,border:"2px s
467olid",borderColor:_e.audacyDarkNavy,alignItems:"center",borderRadius:"50%",color:_e.white,display:"flex",height:22,justifyContent:"center",left:2,position:"absolute",top:2,width:22}},$V={container:{...yc.container,paddingRight:15,[Be(ve.Medium)]:{paddingRight:30},[Be(ve.Large)]:{paddingRight:15,paddingLeft:15}},queueHeaderContainer:{paddingRight:0,[Be(ve.Medium)]:{paddingRight:0}},primaryActionBtn:{...yc.primaryActionBtn,padding:5,[Be(ve.Medium)]:{padding:10,color:_e.audacyDarkNavy},[Be(ve.Large)]:{padding:5}},primaryActionBtnInner:{...yc.primaryActionBtnInner,[Be(ve.Medium)]:{alignItems:"center",backgroundColor:_e.white,display:"flex",height:40,justifyContent:"center",width:40},borderRadius:"50%"},primaryActionBtnInnerQueue:{...yc.primaryActionBtnInner,[Be(ve.Medium)]:{padding:0,color:_e.white}},primaryActionButtonInnerLoading:{...yc.primaryActionButtonInnerLoading},secondaryActionBtn:{...yc.secondaryActionBtn,padding:10,[Be(ve.Large)]:{padding:5}},skipsRemaining:yc.skipsRemaining},BV={container:{...yc.container,marginTop:20,marginBottom:3,[Be(ve.Large)]:{marginTop:40},alignSelf:"start"},queueHeaderContainer:{},primaryActionBtn:{...yc.primaryActionBtn,color:_e.audacyDarkNavy,margin:"0 12px",[Be(ve.Medium)]:{margin:"0 27px"},[Be(ve.Large)]:{margin:"0 12px"}},primaryActionBtnInner:{...yc.primaryActionBtnInner,alignItems:"center",backgroundColor:_e.white,borderRadius:"50%",display:"flex",height:60,justifyContent:"center",width:60,[Be(ve.Medium)]:{height:70,width:70}},primaryActionBtnInnerQueue:{},primaryActionButtonInnerLoading:{...yc.primaryActionButtonInnerLoading},secondaryActionBtn:{...yc.secondaryActionBtn,padding:12,[Be(ve.Medium)]:{margin:"0 15px"},[Be(ve.Large)]:{margin:0}},skipsRemaining:yc.skipsRemaining},IQ=t=>Symbol.iterator in t,OQ=t=>"entries"in t,PQ=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),r=e instanceof Map?e:new Map(e.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!r.has(i)||!Object.is(s,r.get(i)))return!1;return!0},hct=(t,e)=>{const n=t[Symbol.iterator](),r=e[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function pct(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:IQ(t)&&IQ(e)?OQ(t)&&OQ(e)?PQ(t,e):hct(t,e):PQ({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function rpe(t){const e=mt.useRef(void 0);return n=>{const r=t(n);return pct(e.current,r)?e.current:e.current=r}}const gct=t=>{var n,r,i,s,a,o;const e={artist:t==null?void 0:t.artist,title:t==null?void 0:t.title,station:t==null?void 0:t.station,startTime:t==null?void 0:t.startTime,endTime:t==null?void 0:t.endTime,category:(n=t==null?void 0:t.dataObject)==null?void 0:n.category,contentType:(r=t==null?void 0:t.dataObject)==null?void 0:r.subtype,publishDate:(i=t==null?void 0:t.dataObject)==null?void 0:i.publishDate,isLive:t==null?void 0:t.isLive,isBroadcastShow:!1};switch((s=t==null?void 0:t.dataObject)==null?void 0:s.subtype){case Fr.BROADCAST:return{...e,publishDate:(a=t==null?void 0:t.episodeDataObject)==null?void 0:a.publishDate,isBroadcastShow:((o=t==null?void 0:t.episodeDataObject)==null?void 0:o.subtype)===Vn.BROADCAST_SHOW_EPISODE};case sT.BROADCAST_EPISODE_CHAPTER:{const l=t!=null&&t.duration?` · ${KQe(t==null?void 0:t.duration)}m`:"";return{...e,title:`${e.title} ${l}`}}default:return e}},mct=t=>{const{artist:e,isAd:n}=Oa(rpe(x=>({artist:x.artist,isAd:x.isAd}))),{category:r="",contentType:i,endTime:s,isBroadcastShow:a=!1,publishDate:o,startTime:l,station:u="",title:c=""}=gct(t),d=(x,P,N,k)=>N&&k?`${x} • ${P}`:N&&!k?`${x}`:`${P}`,f=!!e&&e!==c;let h=f;(i==Fr.EXCLUSIVE||i==Fr.BROADCAST&&r==="Music")&&(h=!1);const g=e!==u&&u.length>0;let v=c,b=d(e,u,h,g),S=c,A=d(e,u,f,g);const w=o?` • ${qce(o)}`:"";switch(i){case Fr.EXCLUSIVE:{v+=f?` • ${e}`:"";break}case Fr.PODCAST:{b=e+w,A=e;break}case Fr.BROADCAST:{a&&!Mi.isUndefined(l)&&!Mi.isUndefined(s)&&(b+=` •  ${w2(l,s)}`),r==="Music"&&(v+=f?` • ${e}`:"");break}case sT.BROADCAST_EPISODE_CHAPTER:{b=u+w,A=u;break}}return n&&(S=si.t("global.ad"),b=`${u} • ${si.t("global.ad")}`),{miniPlayerSubtitle:A,miniPlayerTitle:S,playerSubtitle:b,playerTitle:v}};var mg=(t=>(t.AppTrackingPrompt="PROMPT_APP_TRACKING",t.AutoplayFull="AUTOPLAY_FULL",t.AutoplayMini="AUTOPLAY_MINI",t.Follow="FOLLOW",t.LocationPrompt="PROMPT_LOCATION",t.Login="LOGIN",t.OpenAppSettings="OPEN_APP_SETTINGS",t.PushNotificationPrompt="PROMPT_PUSH_NOTIFICATIONS",t.Reauthenticate="REAUTHENTICATE",t.OpenDevMenu="ODM",t))(mg||{}),vf=(t=>(t.Action="action",t.ActionContentId="actionContentId",t.ActionContentIds="actionContentIds",t.ActionOffset="actionOffset",t.ContentId="contentId",t.utmCampaign="utm_campaign",t.utmContent="utm_content",t.utmMedium="utm_medium",t.utmSource="utm_source",t.utmTerm="utm_term",t.ViewId="viewId",t.ViewType="viewType",t.Key="key",t.DevToolsAction="devtoolsAction",t))(vf||{});const Hc=()=>{var h,g,v,b,S,A,w,x,P,N,k,U,H,B;const t=Ht(ws),{playState:e}
467=Ht(mo),[n,r]=Xk(),i=$.useCallback(()=>{var Z;const q=((Z=t==null?void 0:t.dataObject)==null?void 0:Z.id)||"";r({action:mg.AutoplayFull,actionContentId:q})},[t,r]),s=$.useCallback(()=>{var Z;const q=((Z=t==null?void 0:t.dataObject)==null?void 0:Z.id)||"";r({action:mg.AutoplayMini,actionContentId:q})},[r,(h=t==null?void 0:t.dataObject)==null?void 0:h.id]),a=((g=t==null?void 0:t.episodeDataObject)==null?void 0:g.imageAlt)||((v=t==null?void 0:t.episodeDataObject)==null?void 0:v.parentImageAlt)||((b=t==null?void 0:t.dataObject)==null?void 0:b.imageAlt)||((S=t==null?void 0:t.dataObject)==null?void 0:S.parentImageAlt)||"",{playerTitle:o,playerSubtitle:l,miniPlayerTitle:u,miniPlayerSubtitle:c}=mct({artist:(t==null?void 0:t.artist)??"",category:(A=t==null?void 0:t.dataObject)==null?void 0:A.category,contentType:(w=t==null?void 0:t.dataObject)==null?void 0:w.subtype,dataObject:t==null?void 0:t.dataObject,endTime:t==null?void 0:t.endTime,isBroadcastShow:((x=t==null?void 0:t.episodeDataObject)==null?void 0:x.subtype)===Vn.BROADCAST_SHOW_EPISODE,publishDate:(P=t==null?void 0:t.episodeDataObject)==null?void 0:P.publishDate,startTime:t==null?void 0:t.startTime,station:t==null?void 0:t.station,title:t==null?void 0:t.title}),d=((N=t==null?void 0:t.episodeDataObject)==null?void 0:N.description)||((k=t==null?void 0:t.standaloneChapterDataObject)==null?void 0:k.description)||((U=t==null?void 0:t.dataObject)==null?void 0:U.description),f=((H=t==null?void 0:t.episodeDataObject)==null?void 0:H.parentShowUrl)||((B=t==null?void 0:t.standaloneChapterDataObject)==null?void 0:B.parentShowUrl);return $.useMemo(()=>{var q,Z,C,L,V,j,X,G,ie,ae;return{imageUrl:(q=t==null?void 0:t.image)==null?void 0:q.src,srcFallback:(Z=t==null?void 0:t.image)==null?void 0:Z.srcFallback,imageAlt:a,playerTitle:o,playerSubtitle:l,miniPlayerTitle:u,miniPlayerSubtitle:c,station:t==null?void 0:t.station,description:d,contentId:(C=t==null?void 0:t.dataObject)==null?void 0:C.id,episodeId:((L=t==null?void 0:t.episodeDataObject)==null?void 0:L.episodeId)||((V=t==null?void 0:t.episodeDataObject)==null?void 0:V.id),isLoading:e===Hi.Loading,hasMetaData:!!t,isOpen:n.get(vf.Action)===mg.AutoplayFull,onOpen:i,onClose:s,isIdle:e===Hi.Idle,episode:t==null?void 0:t.episodeDataObject,standaloneChapter:t==null?void 0:t.standaloneChapterDataObject,type:(j=t==null?void 0:t.dataObject)==null?void 0:j.type,subtype:(X=t==null?void 0:t.dataObject)==null?void 0:X.subtype,url:(G=t==null?void 0:t.dataObject)==null?void 0:G.url,duration:(ie=t==null?void 0:t.dataObject)==null?void 0:ie.duration,parentShowUrl:f,showContentId:(ae=t==null?void 0:t.episodeDataObject)==null?void 0:ae.showContentId}},[t,d,a,o,l,u,c,e,n,i,s,f])},vct=({action:t})=>{const{playButton:e}=Ht(Bv)||{},{hasMetaData:n,isLoading:r}=Hc(),{t:i}=dn(),{bk:s}=Fs(),{isQueueHead:a}=$.useContext(Ab),{isFullscreenPlayer:o}=$.useContext(ET),l=fo(e),u=o?Uhe[s]:22,c=o?BV:$V,d=!n||r;return I("button",{type:"button",css:c.primaryActionBtn,onClick:t.onClick,"aria-label":i(...t.accessibilityLabel),disabled:t.name==="play"&&!l,children:be("div",{css:[a?c.primaryActionBtnInnerQueue:c.primaryActionBtnInner,d&&c.primaryActionButtonInnerLoading],children:[n&&!r&&I(Yr,{ariaHidden:!0,name:t.icon,sizeInPx:u}),r&&I(fct,{})]})})},TO=({action:t,children:e})=>{const{isFullscreenPlayer:n}=$.useContext(ET),{t:r}=dn(),{bk:i}=Fs(),s=n?BV:$V,a=n?mut[i]:20;return be("button",{type:"button","aria-label":r(...t.accessibilityLabel),css:s.secondaryActionBtn,disabled:t.isDisabled,onClick:t.onClick,children:[I(Yr,{ariaHidden:!0,name:t.icon,sizeInPx:a}),e]})},pE={skip15:15},yct=({canScrub:t,canSkip:e,canSwitchTracks:n,isRewindDisabled:r,isForwardDisabled:i,isLiked:s,isLikeDisabled:a,isSkipDisabled:o,isNextDisabled:l,isPrevDisabled:u,onLike:c,onSendNext:d,onSkip:f,onNext:h,onPrev:g})=>{let v,b,S,A;return e?(v={name:"like",accessibilityLabel:s?["playerControls.accessibilityLabels.thumbsFilled"]:["playerControls.accessibilityLabels.thumbs"],icon:s?en.ThumbsUpFilled:en.ThumbsUp,isDisabled:a,onClick:c},b={name:"next",accessibilityLabel:["playerControls.accessibilityLabels.skip"],icon:en.Next,isDisabled:o,onClick:d}):t&&f&&(v={name:"back15",accessibilityLabel:["playerControls.accessibilityLabels.rewind",{seconds:pE.skip15}],icon:en.Back15,isDisabled:r,onClick:()=>f(pE.skip15*-1)},b={name:"forward15",accessibilityLabel:["playerControls.accessibilityLabels.forward",{seconds:pE.skip15}],icon:en.Forward15,isDisabled:i,onClick:()=>f(pE.skip15)}),n&&(S={name:"previous",accessibilityLabel:["playerControls.accessibilityLabels.previous"],icon:en.Previous,isDisabled:u,onClick:g},A={name:"next",accessibilityLabel:["playerControls.accessibilityLabels.next"],icon:en.Next,isDisabled:l,onClick:h}),{leftControl:v,rightControl:b,prevBtn:S,nextBtn:A}},bct=({onPause:t,onPlay:e,onStop:n,hasPause:r,hasStop:i})=>r?{name:"pause",accessibilityLabel:["playerControls.accessibilityLabels.pause"],icon:en.Pause,onClick:t}:i?{name:"stop",accessibilityLabel:["playerControls.accessibilityLabels.stop"],icon:en.Stop,onClick:n}:{name:"play",accessibilityLabel:["playerControls.accessibilityLabels.play"],icon:en.Play,onClick:e},Sct="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAB2m1kYXTeBABMYXZjNTguMTM0LjEwMAAByGYHzjgA5DKDJjYIhAQhYahAO+gDQJ9PBLkd//rI7KgNRXfOTZiGgB8vifIADEXy2Z5iULc1WSFCp8vTOvfN/y2ySjsemXP/mnPPp0ujvoI5bgimXvmFOx+emLKlroz+v+n9/y1sAAAOAOQzAyZQEg2CYQD+3tUrXMzAEkDqux6+Zfx57G9rf9zm9v0TseJ4NA7u4pqxgZoxxy6irtbouMmhqnKK2QX/j1kIro/FZNarrrr73TpfS6oZkMzUomn0rxwAOADkMwMGcAiFBmEA/s+Hv7VdbQEgUGvg7/Sev676vhaPyfD1wDts2dnhLxObpNIAFenqzq0v3tjiQ6ALBuHrNgriboYv8fvuQkv2XeaWDtm9//93v/38K5Bxb+hp3QAcAOQzA0hAEIUEwTCAfEqKrcCw6hzW8s67ie/tRGr0i+uBQRXFDru/BnQKR/76ogeKwb3RPMyL41zTfSWpYwAuVjTdXtosaE6AZI1GV42PE0yxpMvy9AADgADkM4NCQBoMwgL9j2mVYIgAAwFPE9sVRBWbvWCgpq6qqpxt3aiutvjf1Y9+FdQLqviLNFFuX/UG2fjcIAHAAOQzg+gcAAADK21vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAAA+gAAALQAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAJVdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAQAAAAAAAALQAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAC0AAABAAAAQAAAAABzW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAH0AAABqAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAXhtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRy
467ZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAATxzdGJsAAAAfnN0c2QAAAAAAAAAAQAAAG5tcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAAH0AAAAAAADZlc2RzAAAAAAOAgIAlAAEABICAgBdAFQAAAAAAFDkAABEsBYCAgAUViFblAAaAgIABAgAAABRidHJ0AAAAAAAAFDkAABEsAAAAIHN0dHMAAAAAAAAAAgAAAAYAAAQAAAAAAQAAAoAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAcAAAABAAAAMHN0c3oAAAAAAAAAAAAAAAcAAAAYAAAAZAAAAFsAAABfAAAAWAAAAD4AAAAGAAAAFHN0Y28AAAAAAAAAAQAAACwAAAAac2dwZAEAAAByb2xsAAAAAgAAAAH//wAAABxzYmdwAAAAAHJvbGwAAAABAAAABwAAAAEAAABidWR0YQAAAFptZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAAC1pbHN0AAAAJal0b28AAAAdZGF0YQAAAAEAAAAATGF2ZjU5LjI3LjEwMA==",Ect="National",Tct=(t,e=Date.now().toString())=>{const n=t==null?void 0:t.data,r=new URLSearchParams({aud_category:(n==null?void 0:n.category)??"",aud_market:(n==null?void 0:n.marketTitle)??"",aud_station:(n==null?void 0:n.callsign)||Ect});return ule.VIDEO_URL.replace("cust_params=",`cust_params=${encodeURIComponent(r.toString())}`).replace("correlator=",`correlator=${e}`)},{IMA3_LIBRARY_URL:Act,VIDEO_URL:wct,AD_LOAD_TIMEOUT:RQ,VIDEO_AD_COOLDOWN_MS:_ct}=ule;let CF=null;const UV=()=>(CF||(CF=Promise.all([Cr(()=>import("./video.es-BjAfamXU.js").then(t=>t.a),[]),Cr(()=>import("./videojs-contrib-ads.es-AyIxpok4.js"),__vite__mapDeps([24,25])),Cr(()=>import("./videojs.ima.es-BBTmRBOo.js"),__vite__mapDeps([26,25])),Cr(()=>Promise.resolve({}),__vite__mapDeps([27])),Cr(()=>Promise.resolve({}),__vite__mapDeps([28])),Cr(()=>Promise.resolve({}),__vite__mapDeps([29])),Tr.loadScript(Act)]).then(([t])=>t.default)),CF);typeof document<"u"&&UV();const Cct=async(t,e)=>{const n=await UV(),r=document.createElement("video-js");t.appendChild(r);const i=n(r);return i.fluid(!0),i.aspectRatio(e),i.playsinline(!0),i};let LQ=0;const xct=async(t={})=>{var h,g,v;const{logger:e}=Zh;if(typeof document>"u"||LQ+_ct>Date.now())return;try{await UV()}catch{return}(h=t.eventListener)==null||h.call(t,"VIDEO_AD_LOAD"),await new Promise(b=>setTimeout(()=>b(),0));const n=t.containerId||"videoAdContainer",r=document.getElementById(n);let i=null,s=!1;const a=new URL(wct),o=new URLSearchParams(a.search),[l,u]=(g=o.get("sz"))==null?void 0:g.split("|")[0].split("x"),c=new Promise(b=>{i=S=>{var A;s||(S&&(e==null||e.error(S)),clearTimeout(f),setTimeout(()=>d==null?void 0:d.dispose(),5e3),r&&(r.style.opacity="0",r.style.pointerEvents="none"),(A=t.eventListener)==null||A.call(t,"VIDEO_AD_END"),s=!0,b())}});if(!r)return e==null||e.warn(`Failed to play video ad: no container #${n}`),i();const d=await Cct(r,`${l}:${u}`),f=setTimeout(()=>{e==null||e.warn("IMA ad did not start in time, skipping to content."),i()},RQ);try{d.src({src:Sct,type:"video/mp4"}),d.on("ads-loader",({adsLoader:b})=>{b.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,S=>{var P;const{errorCode:A,errorMessage:w}=((P=S==null?void 0:S.error)==null?void 0:P.data)||{},x=A?`${A} ${w}`:"";x.includes("1009")?(e==null||e.error(`IMA load fatal error, skipping to content: ${x}`),i()):e==null||e.warn("IMA load possible fatal error: ",x||S)})}),d.ima({adTagUrl:Tct(t.dataObj),vastLoadTimeout:3500,adsRenderingSettings:{loadVideoTimeout:RQ,bitrate:1024},adsManagerLoadedCallback:()=>{d.ima.addEventListener(google.ima.AdEvent.Type.STARTED,()=>{var b;if(s){setTimeout(()=>d==null?void 0:d.dispose(),0);return}r.style.opacity="1",r.style.pointerEvents="auto",r.style.width=`${l}px`,r.style.height=`${u}px`,r.style.aspectRatio=`${l} / ${u}`,clearTimeout(f),(b=t.eventListener)==null||b.call(t,"VIDEO_AD_START")}),d.on("adserror",b=>{var A,w,x;const S=JSON.stringify((x=(w=(A=b==null?void 0:b.data)==null?void 0:A.AdError)==null?void 0:w.data)==null?void 0:x.innerError)||"";S.includes("301")||S.includes("303")||S.includes("1205")?(e==null||e.error(`IMA ad fatal error, skipping to content: ${S}`),i()):e==null||e.warn("IMA ad possible fatal error: ",S||b)}),d.ima.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,()=>i())}}),(v=d.play())==null||v.catch(b=>{const S=b.name?`${b.name}: ${b.message}`:"";S.includes("NotAllowedError")?(e==null||e.error(`IMA play fatal error, skipping to content: ${S}`),i()):e==null||e.warn("IMA play possible fatal error: ",S||b)})}catch(b){i(b)}LQ=Date.now(),await c},VV=Yn({default:!1,key:"QueueHadExpiredItems"}),iN=Yn({default:!0,key:"QueueIsLoading"}),ipe=Yn({default:0,key:"QueueLastUpdate"}),sN=Yn({default:{currentId:"",items:[]},key:"Queue"}),HV=t=>{const{clientServices:e,loading:n}=Fa(),r=_rt(),i=Ht(Ert),s=Qs(vV),[{currentRate:a,savedRate:o,availableRates:l}]=Fo(eD),u=Qs(eD),c=(L,V)=>{u({savedRate:L,currentRate:a,availableRates:l}),e.getAudioServices().setPlaybackRate(V)},d=$.useCallback(L=>{e==null||e.getAudioServices().stop(),r(L)},[e,r]),f=$.useCallback(({playContext:L,playAssistantProps:V,viewId:j})=>{const X=t==null?void 0:t();X&&(j&&(X.viewId=j),!X.contentId&&L.contentId?X.contentId=L.contentId:!L.contentId&&X.contentId&&(L.contentId=X.contentId),e==null||e.getAnalyticServices().sendPlayClickEvent(X,L,V))},[e,t]),h=$.useCallback(({playContext:L})=>{const V=t==null?void 0:t();V&&(L.contentId===void 0&&V.contentId&&(L.contentId=V.contentId),e==null||e.getAnalyticServices().sendStopClickEvent(V,L))},[e,t]),g=$.useCallback(({playContext:L})=>{const V=t==null?void 0:t();V&&(L.contentId===void 0&&V.contentId&&(L.contentId=V.contentId),e==null||e.getAnalyticServices().sendSkipByTimeClickEvent(V,L))},[e,t]),v=$.useCallback(async(L,V,j)=>{var G,ie;if(!_f(uw)&&!n){const ae={contentId:L==null?void 0:L.getId(),...V},ue=ae.voiceEventData||{audacyAssistantFlag:"No",audacyAssistantSessionId:"",audacyAssistantUserId:""};if(ae.voiceEventData=void 0,f({playContext:ae,playAssistantProps:ue,viewId:j==null?void 0:j.viewId}),L&&e.getAudioServices().setCollectionPlaybackMode(tu.SingleItem),(ie=(G=e.getAudioServices().getPlayer()).silentAudioHack)==null||ie.call(G),(j==null?void 0:j.autoPlay)!==!1&&(L==null?void 0:L.getEntityType())===gt.STATION&&(j==null?void 0:j.viewId)!==_n.Player&&(e==null||e.getAudioServices().stop(),await xct({eventListener:Q=>{Q==="VIDEO_AD_LOAD"&&(xc(uw,!0),xc(mo,{..._f(mo),playState:Hi.Loading})),Q==="VIDEO_AD_START"&&(xc(ro,{songOrShow:"Advertisement",station:L==null?void 0:L.data.title,image:L==null?void 0:L.data.images.square,dataObject:pT(L)}),xc(mo,{..._f(mo),playState:Hi.Idle})),Q==="VIDEO_AD_END"&&xc(uw,!1)},dataObj:L})),L!=null&&L.data){const Q=e.getAudioServices().getIsLive(),de=x7(L==null?void 0:L.data.entityType,L==null?void 0:L.data.entitySubtype,(L==null?void 0:L.data.isRewind)||(L==null?void 0:L.data.rewindable));Q||!de?c(o||a,1):c(0,o||a)}e.getAudioServices().play(L,j==null?void 0:j.autoPlay,j==null?void 0:j.startOffset,j==null?void 0:j.playLive)}},[c,a,o,n,f,e]),b=$.useCallback((L,V,j,X)=>{const G={contentId:L,...V};e==null||e.getDataServices().getContentObject(L).then(ie=>v(ie,G,j)).finally(()=>X&&X())},[e,v]),S=$.useCallback((L,V,j)=>{const X={contentId:L,...V},G=_f(Xce({id:L,fromCompletedDownloads:!0}
467));G!=null&&G.episode&&(v(new au(G.episode),X,j),e.getPersonalizationServices().dataStore.setDataSync(tr.COLLECTION_ID,void 0))},[e,v]),A=$.useCallback((L,V)=>{var ie;const j=L.getDataObject(),X=(ie=L.parentStationIds)==null?void 0:ie[0],G={contentId:L.id,...V};if(!X){v(j,G);return}b(X,G)},[b,v]),w=$.useCallback(async({collectionId:L,playContext:V,itemId:j})=>{var le;const X=e.getAudioServices();V.playlistId=L;const{itemToPlay:G,orderedContent:ie,noneToPlay:ae,itemIds:ue}=await u4(L,j);if(ae){X.stop();return}e.getPersonalizationServices().dataStore.setDataSync(tr.ACTIVE_PLAYLIST_ITEMS,ue);const Q=e.getPersonalizationServices().localCollectionId,de=e.getPersonalizationServices().localActivePlaylistItems;Q?j&&!(de!=null&&de.includes(j))&&(e.getPersonalizationServices().dataStore.setDataSync(tr.COLLECTION_ID,void 0),e.getPersonalizationServices().dataStore.setDataSync(tr.ACTIVE_PLAYLIST_ITEMS,void 0)):V.feature===Ei.PLAYLIST&&(e.getPersonalizationServices().dataStore.setDataSync(tr.COLLECTION_ID,L),e.getPersonalizationServices().dataStore.setDataSync(tr.ACTIVE_PLAYLIST_ITEMS,ue)),G?(V.contentId=G==null?void 0:G.data.id,X.playCollection(ie,G),X.setCollectionPlaybackMode(tu.Playlist)):(V.contentId=(le=ie[0])==null?void 0:le.data.id,X.playCollection(ie,ie[0]),X.setCollectionPlaybackMode(tu.Playlist)),s(L),f({playContext:V})},[e,f,s]),x=Cc(({snapshot:L})=>async(V,j)=>{if(_f(uw))return;const G=await L.getPromise(sN);d(!0);const ie=G.items.find(ae=>ae.id===V);ie&&(e.getAudioServices().setCollectionPlaybackMode(tu.Queue),e.getAudioServices().playCollection(G.items.map(ae=>ae.getDataObject()),ie.getDataObject()),f({playContext:j}))},[]),P=$.useCallback(L=>{const V=(L==null?void 0:L.feature)===Ei.QUEUE_NEXT;e.getAudioServices().next(V),f({playContext:L})},[e,f]),N=$.useCallback(L=>{const V=(L==null?void 0:L.feature)===Ei.QUEUE_PREVIOUS;e.getAudioServices().previous(V),f({playContext:L})},[e,f]),k=$.useCallback((L,V)=>{e.getAudioServices().goToLive(),L&&(e==null||e.getAnalyticServices().sendJumpToLive(L,V))},[e]),U=$.useCallback((L,V)=>{e.getAudioServices().seekToProgress(0),e.getAnalyticServices().sendAutoPlayClickEvent(zn.RESTART_EPISODE,L,V)},[e]),H=$.useCallback(L=>{(i??0)>0&&(e.getAudioServices().skip(),e==null||e.getAnalyticServices().sendPlayerEvent({type:As.SKIP_SONG,contentId:(L==null?void 0:L.contentId)??"",...L}))},[e,i]),B=$.useCallback(L=>{h({playContext:L}),e.getAudioServices().stop()},[e,h]),q=$.useCallback(L=>{h({playContext:L}),e.getAudioServices().pause()},[e,h]),Z=$.useCallback(async L=>{const V=e.getAudioServices();if(!L.playlistId||!L.contentId)return;const{orderedContent:j}=await u4(L.playlistId,L.contentId);v(void 0,L),V.updateCollection(j),V.setCollectionPlaybackMode(tu.Playlist)},[e,v]),C=$.useCallback((L,V,j)=>{e.getAudioServices().skipByTime(L,j),g({playContext:V})},[e,g]);return $.useMemo(()=>({getIsLive:()=>e.getAudioServices().getIsLive(),getVolume:()=>e.getAudioServices().getVolume(),incrementRate:()=>e.getAudioServices().incrementRate(),pause:q,play:v,playEpisodeLive:A,playFromId:b,playFromDownloads:S,playPlaylist:w,playQueue:x,resume:L=>v(void 0,L),resumeCollection:Z,seekToTime:L=>e.getAudioServices().seekToTime(L),scrubbed:()=>e.getAudioServices().scrubbed(),seekToProgress:L=>e.getAudioServices().seekToProgress(L),seekToLivePosition:k,next:P,previous:N,skip:H,sendPreference:L=>e.getAudioServices().sendPreference(L),setMuted:L=>e.getAudioServices().setMuted(L),setVolume:L=>e.getAudioServices().setVolume(L),skipByTime:C,stop:B,reset:d,restartShow:U}),[v,A,b,S,w,x,Z,k,P,N,H,d,U,C,B,q,e])};class Ict{constructor(e){et(this,"object");et(this,"listeners",{});this.object=e,this.listeners={}}setValue(e,n){var r;this.object[e]=n,this.listeners[e]||(this.listeners[e]=[]),(r=this.listeners[e])==null||r.forEach(i=>i(n))}addListener(e,n){var r;this.listeners[e]||(this.listeners[e]=[]),(r=this.listeners[e])==null||r.push(n)}removeListener(e,n){var i,s;if(!this.listeners[e])return;const r=((i=this.listeners[e])==null?void 0:i.indexOf(n))??-1;r>-1&&((s=this.listeners[e])==null||s.splice(r,1))}getValue(e){const n=this.object[e];if(n instanceof Map)return new Map(n);if(n===void 0)return console.warn("The following key has an undefined value in WatchableObject:",e),{};try{return JSON.parse(JSON.stringify(n))}catch(r){return console.error("Error parsing value in WatchableObject:",r),{}}}}`${Vi.MODULES}`,Vi.MODULES,`${Vi.MODULES}`,Vi.MODULES,`${Vi.MODULES}`,Vi.MODULES,`${Vi.MODULES}`,Vi.MODULES,`${Vi.MODULES}`,Vi.MODULES;class Oct extends Ict{constructor(){super({subNavigationConfigurationMap:new Map})}setModuleInformation(e){const{viewId:n,viewType:r,module:i}=e;if(!(n&&r&&i.config.name))return;const s={viewId:n,viewType:r,route:i.config.name,module:i},a=this.getValue("subNavigationConfigurationMap"),o=a.get(n);(!o||JSON.stringify(o)!==JSON.stringify(s))&&(a.set(n,s),this.setValue("subNavigationConfigurationMap",a))}reset(){this.setValue("subNavigationConfigurationMap",new Map)}}Object.freeze(new Oct);function Pct(){return[D9.REMOTE_NAVIGATION]}function Rct(){return[D9.REMOTE_SUB_NAVIGATION]}const Lct={remoteNavigation:Pct,remoteSubNavigation:Rct},Dct=F7({iconRef:Tc(),label:Tc(),tabKey:Tc(),viewId:Tc(),viewType:$7(Vi)});Vce(Dct);const kct=F7({viewId:Tc(),viewType:$7(Vi)});mZ(Tc(),mZ(Tc(),kct));const spe={[gt.EPISODE]:{[Vn.BROADCAST_SHOW_EPISODE]:{viewId:"episode",viewType:Vi.EPISODE},[Vn.HOST_CREATED_EPISODE]:{viewId:"episode",viewType:Vi.EPISODE},[Vn.PODCAST_EPISODE]:{viewId:"episode",viewType:Vi.EPISODE}},[gt.SHOW]:{[ui.BROADCAST]:{viewId:"shows",viewType:Vi.SHOW},[ui.DIGITAL]:{viewId:"shows",viewType:Vi.SHOW},[ui.HOST_CREATED]:{viewId:"shows",viewType:Vi.SHOW},[ui.PODCAST]:{viewId:"podcasts",viewType:Vi.SHOW}}
467,[gt.COLLECTION]:{[iT.PLAYLIST]:{viewId:"playlists",viewType:Vi.PLAYLIST}}},Nct=async()=>{const t=await Uf().then(n=>n.getDataServices().getClientNavigationTwo());return{tabs:(t.tabs||[]).map(n=>({iconRef:n.iconRef,label:n.label,tabKey:`tab:${n.viewType}:${n.viewId}`,viewId:n.viewId,viewType:n.viewType})),viewMap:{...spe,...t.viewMap||{}}}},ape=ss({get:()=>Nct(),key:"WebClientNavigation"}),ope=(t,e)=>{if(t===gt.EPISODE){if(e===Vn.BROADCAST_SHOW_EPISODE||e===Vn.HOST_CREATED_EPISODE)return[gt.SHOW,ui.BROADCAST];if(e===Vn.PODCAST_EPISODE)return[gt.SHOW,ui.PODCAST]}if(t===gt.STANDALONE_CHAPTER)return[gt.SHOW,ui.BROADCAST]},Mct={tabs:[{iconRef:"Logo",label:"Home",tabKey:"tab:MODULES:home",viewId:"home",viewType:Vi.MODULES}],viewMap:{...spe}},Fct=()=>{const t=aae(),{viewMap:e}=t.getQueryData(Lct.remoteNavigation())??Mct;return $.useCallback((n,r,{shouldGetInfoForParent:i}={})=>{var o,l;let[s,a]=[n,r];if(i&&([s,a]=ope(n,r)||[]),!(!s||!a))return((o=e[s])==null?void 0:o[a])||((l=e[s])==null?void 0:l.default)},[e])},wb=Yn({default:{viewId:"",contentId:""},key:"ViewContext"}),lpe=Yn({default:void 0,key:"View"}),jV=()=>{const{viewMap:t}=Ht(ape);return e=>{var n;if(e){let r="",i="";if(e.rootObject){const{id:s,type:a,subtype:o}=e.rootObject;i=s,r=((n=t[a][o])==null?void 0:n.viewId)||e.id}else r=e.id;return{viewId:r,contentId:i}}}},$ct=()=>{const t=Qs(wb),e=Qs(lpe),n=jV();return r=>{if(r){e(r);const i=n(r);i&&t(i)}}},TT=()=>{const t=Ht(wb);return()=>t},Bct=()=>Ht(lpe),Yu=()=>{const t=Ht(wb),e=$.useCallback(()=>({...t}),[t]);return HV(e)},upe=Yn({default:{},key:"UserTimeState"}),Uct=Yn({default:!1,key:"LikeState"}),Vct=Yn({default:{queue:[]},key:"Toasts"});function Hct(t){return t&&t.length?t[0]:void 0}var jct=Hct,zct=jct;const Gct=pi(zct);function gu(){const[t,e]=Fo(Vct),n=Gct(t.queue),r=$.useCallback(s=>{const a={...s,id:new Date().getUTCMilliseconds().toString()};e(o=>({...o,queue:[...o.queue,a]}))},[e]),i=()=>{e(s=>{if(s.queue.length){const a=[...s.queue];return a.shift(),{...s,queue:a}}return s})};return{amountQueued:t.queue.length,currentToast:n,popToast:i,showToast:r}}const zV=()=>{const{skipsRemaining:t}=Ht(Bv)||{},[e,n]=Fo(upe),[r,i]=Fo(Uct),{episodeId:s,isOpen:a,miniPlayerTitle:o,imageUrl:l,contentId:u,isIdle:c,playerTitle:d}=Hc(),f=Yu(),h=Oa(L=>L.artist),{showToast:g}=gu(),{t:v}=dn(),b=$.useRef(!1),A=Ht(U2)===tu.Playlist,w=Ht(vV)??"",{userPlaybackFraction:x}=e;$.useEffect(()=>{b.current&&i(!1)},[o,l]),$.useEffect(()=>{b.current=!0},[]);const P={contentId:s||u,feature:a?Ei.FULL_PLAYER:Ei.MINI_PLAYER},N=()=>{r?(i(!1),f.sendPreference(JB.DISLIKE),u&&o&&h&&lr.getAnalyticServices().sendSongLikeEvent(u,o,h,!1)):(i(!0),f.sendPreference(JB.LIKE),g({title:v("playerControls.toast.thumbsUp")}),u&&o&&h&&lr.getAnalyticServices().sendSongLikeEvent(u,o,h,!0))},k=()=>{typeof x=="number"&&(!c&&f.seekToProgress(x),n({})),f.resume(P)},U=L=>f.skipByTime(L,P),H=()=>{t?(f.skip({...P,artist:h,songTitle:d}),g({title:v("playerControls.toast.skipMessage",{skips:t-1})})):g({title:v("playerControls.toast.skipReachedLimitMessage")})},B=()=>f.stop(P);return{onPlay:k,onSkip:U,onNext:()=>f.next({contentId:s||u,...A?{playlistId:w,feature:Ei.PLAYLIST_NEXT}:{feature:Ei.QUEUE_NEXT}}),onPrev:()=>f.previous({contentId:s||u,...A?{playlistId:w,feature:Ei.PLAYLIST_PREVIOUS}:{feature:Ei.QUEUE_PREVIOUS}}),onPause:()=>f.pause(P),onSkipToLive:f.seekToLivePosition,onStop:B,onLike:N,onSendNext:H,skipsRemaining:t,isLiked:r}},cpe=()=>{const t=zV(),{isLiked:e,onPlay:n,onStop:r,onPause:i,onLike:s,onSendNext:a,onSkip:o,onNext:l,onPrev:u}=t,{ff15sButton:c,pauseButton:d,rw15sButton:f,skipButton:h,stopButton:g,thumbsUpButton:v,nextTrackButton:b,prevTrackButton:S}=Ht(Bv)||{},A=fo(h),w=fo(c)&&fo(f),x=fo(b)||fo(S),P=fo(d,!0),N=fo(g,!0),k=hS(c),U=hS(v),H=hS(f),B=hS(h),q=hS(b),Z=hS(S),C=bct({onPause:i,onPlay:n,onStop:r,hasPause:P,hasStop:N})||{},{leftControl:L,rightControl:V,prevBtn:j,nextBtn:X}=yct({canScrub:w,canSkip:A,canSwitchTracks:x,isRewindDisabled:H,isForwardDisabled:k,isLiked:e,isSkipDisabled:B,isLikeDisabled:U,isNextDisabled:q,isPrevDisabled:Z,onLike:s,onSendNext:a,onSkip:o,onNext:l,onPrev:u});return{primaryControl:C,leftControl:L,rightControl:V,prevBtn:j,nextBtn:X}},GV=()=>{const{skipButton:t,prevTrackButton:e,nextTrackButton:n}=Ht(Bv)||{},{skipsRemaining:r}=zV(),{greaterThan:i}=Fs(),{primaryControl:s,rightControl:a,leftControl:o,prevBtn:l,nextBtn:u}=cpe(),{isQueueHead:c}
467=$.useContext(Ab),{isFullscreenPlayer:d}=$.useContext(ET),f=fo(t),h=fo(n)||fo(e),g=d?BV:$V,v=(i.SM||d)&&!c;return be("div",{css:[g.container,c&&g.queueHeaderContainer],children:[l&&h&&I(TO,{action:l}),o&&v&&I(TO,{action:o}),I(vct,{action:s}),a&&v&&I(TO,{action:a,children:f&&d&&I("span",{css:g.skipsRemaining,children:r})}),u&&h&&I(TO,{action:u})]})},F1=t=>{const e=Math.abs(t),n=Math.floor(e/3600),r=e/60-60*n,i=Math.floor(r),a=Math.floor((r-i)*60).toString().padStart(2,"0"),o=i.toString().padStart(n!==0?2:1,"0"),l=t<0?"-":"";return n?`${l}${n}:${o}:${a}`:`${l}${o}:${a}`},AT={...Bt.transition("color"),alignItems:"center",color:_e.white,...Dr({color:_e.white60}),display:"inline-flex",position:"relative"},MS={inline:{...cn.bodyLarge,textDecoration:"underline"},label:{...cn.buttonLarge},link:{...AT},iconBefore:{marginRight:5},iconAfter:{marginLeft:5},tiny:{...cn.buttonSmall}},Wct={...AT,...MS.inline},qct=({as:t=Fi.Anchor,children:e,hasIconAfter:n=!1,icon:r,isInline:i=!1,isTiny:s=!1,label:a,labelCss:o,...l},u)=>{const c=!i&&r&&I(Yr,{iconCss:n?MS.iconAfter:MS.iconBefore,name:r,sizeInPx:s?5:14,ariaHidden:!0}),d=be(Dn,{children:[!n&&c,I("span",{css:[MS.label,!i&&s&&MS.tiny,i&&MS.inline,o],children:a||e}),n&&c]});return xd({props:{as:t,...l},children:d,styles:AT,ref:u})},Mg=$.forwardRef(qct),Kct=(t=!1)=>{const e=$.useRef(t),n=$.useCallback(()=>{e.current=!0},[]);return $.useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}),[n]),[e,i=>{e.current=i}]},a0={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",Enter:"Enter",Space:" "},Ko={root:{alignItems:"center",display:"flex",flexWrap:"wrap",gap:"0 20px",justifyContent:"space-between",position:"relative",[Be(ve.Large)]:{flexWrap:"nowrap"}},time:{...cn.metadataSmall,color:_e.white60,flexShrink:0,minWidth:55,"&:last-of-type":{textAlign:"right"},[Be(ve.Large)]:{"&:first-of-type":{order:"0",textAlign:"right"},"&:last-of-type":{order:"2",textAlign:"left"}}},inputWrapper:{flexBasis:"100%",position:"relative",[Be(ve.Large)]:{order:1}},scrubBar:{appearance:"none",background:"transparent",display:"block",height:2,opacity:1,padding:"10px 0",width:"100%",...D1.sliderStyles({isThumbHidden:!0}),"&:is(:hover:not(:disabled), :focus:not(:disabled))":{"&::-webkit-slider-thumb":{opacity:1,transition:"opacity 0.3s ease"},"&::-moz-range-thumb":{opacity:1,transition:"opacity 0.3s ease"}},[Be(ve.Large)]:{padding:"15px 0"}},scrubPill:{opacity:0,backgroundColor:"#3C3853",borderRadius:"100px",color:"white",padding:"6px 14px",fontSize:"12px",textAlign:"center",transition:"opacity 0.3s ease",position:"relative",left:"-50%",fontVariantNumeric:"tabular-nums"},scrubPillContainer:{width:"auto",position:"absolute",left:D1.THUMB_WIDTH/2},scrubPillVisible:{opacity:1},darken:{opacity:0},bar:{height:"100%",alignItems:"center",pointerEvents:"none",position:"absolute",display:"flex",top:0,left:0,width:"100%"},barInner:{position:"relative",width:"100%",height:2,"& > span":{position:"absolute",top:0,left:0,height:"100%",width:"100%","&:first-of-type":{backgroundColor:_e.white30},"&:last-of-type":{backgroundColor:_e.white}}},liveContent:{zIndex:Ai.liveIndicator,opacity:1,position:"absolute",right:0,top:0,transform:"translateY(-100%)",[Be(ve.Large)]:{minWidth:55},transition:"opacity 0.7s ease"},liveIndicatorCenter:{[Be(ve.Large)]:{transform:"translateY(30%)"}},skipButton:{...Bt.accessibleMinButtonSize()},liveIndicator:{...cn.buttonSmall,display:"flex",gap:5,color:_e.audacyOrange}},Yct=(t,e)=>{const n=o=>Math.floor(o/3600),r=o=>Math.floor(o/60)%60,i=o=>o%60,s=$U({hours:n(t),minutes:r(t),seconds:i(t)}),a=$U({hours:n(e),minutes:r(e),seconds:i(e)});return`${s} of ${a}`},AO={timeMin:0,timeMax:1,timeStep:.001},Zct=t=>{const{bufferedValue:e=0,currentTime:n=0,customEnd:r="",inputCss:i,isFullPlayer:s,onScrubAction:a,onScrubActionEnd:o,onScrubActionStart:l,onSkipBack:u,onSkipForward:c,onSkipToLive:d,playProgressValue:f=1,scrubberIsUserControlled:h=!1,shouldDisplayTime:g=!1,shouldDisplayBackToLive:v=!1,shouldDisplayLiveIndicator:b,scrubToTime:S,shouldDisplayScrubber:A}=t,w=$.useRef(null),[x,P]=Kct(),N=Oa(ue=>ue.duration)||0,k=()=>
467{if(x.current)return P(!1);B(!0)},{t:U}=dn(),[H,B]=$.useState(!1),q=$.useRef(0),Z=({key:ue})=>{switch(ue){case a0.ArrowDown:case a0.ArrowLeft:u();break;case a0.ArrowUp:case a0.ArrowRight:c();break}},C=ue=>{const Q=Number.parseFloat(ue.target.value);q.current=Q,a(Q),w.current&&w.current.focus()},L=ue=>`${ue/AO.timeMax*100}%`,V=Math.round(n),j=Math.round(N),X=Yct(V,j),G=`${U("playerControls.accessibilityLabels.skipToLive")} ${VL.rightAngleQuotation}`,ie=`${U("playerControls.accessibilityLabels.liveLabel")}`,ae=F1(n);return be("div",{css:Ko.root,children:[be("div",{css:Ko.inputWrapper,children:[I("input",{"aria-label":U("playerControls.labels.scrubber.changeProgress"),"aria-valuemin":0,"aria-valuemax":j,"aria-valuenow":V,"aria-valuetext":X,css:[Ko.scrubBar,i],disabled:!h,type:"range",min:AO.timeMin,max:AO.timeMax,step:AO.timeStep,value:f,onKeyDown:Z,onMouseDown:l,onMouseUp:()=>{o(q.current)},onMouseOver:()=>B(!0),onMouseOut:()=>B(!1),onFocus:k,onBlur:()=>B(!1),onTouchStart:l,onTouchEnd:()=>{o(q.current)},onChange:C,ref:w}),(w==null?void 0:w.current)&&I("div",{css:[Ko.scrubPillContainer,{bottom:w.current.offsetHeight+D1.THUMB_WIDTH/2,transform:`translateX(${f*w.current.offsetWidth-f*D1.THUMB_WIDTH}px)`},H&&A&&{zIndex:Ai.miniPlayer}],children:I("span",{css:[Ko.scrubPill,H&&A&&Ko.scrubPillVisible],children:S})}),I("div",{css:Ko.bar,children:be("div",{css:Ko.barInner,children:[I("span",{style:{width:L(e)}}),I("span",{style:{width:L(f)}})]})})]}),g&&be(Dn,{children:[I("span",{css:Ko.time,children:ae}),I("span",{css:Ko.time,children:r})]}),v&&s&&I(Mg,{css:[Ko.skipButton,Ko.liveContent,H&&A&&Ko.darken],label:G,onClick:d,isTiny:!0}),!v&&s&&b&&be("div",{css:[Ko.liveIndicator,Ko.liveContent,!r&&Ko.liveIndicatorCenter,H&&A&&Ko.darken],children:[I(Yr,{name:en.LiveSM,sizeInPx:16}),I("span",{children:ie})]})]})},DQ={timeFormat:"h:mm:ssaaa"},Qct=({playProgress:t})=>{const e=Yu(),{scrubberBarType:n}=Ht(Bv)||{},{offset:r,playbackFraction:i}=Sx(),s=Oa(k=>k.duration)||0,a=Ht(ws),[o,l]=Fo(upe),{userOffset:u,userPlaybackFraction:c}=o,[d,f]=$.useState(!1),h=typeof u=="number",g=h?u||0:r,v=h&&typeof c=="number";let b=F1(d?r-s:g-s),S=F1(g),A=v?c:t??i;switch(n){case fc.Live:b="",A=1;break;case fc.WallClock:if(a!=null&&a.endTime&&(a!=null&&a.startTime)){b=Xh(a.endTime,DQ.timeFormat);const k=a.startTime+A*s*1e3;S=Xh(k||0,DQ.timeFormat)}break}const w=$.useCallback(k=>{if(d){const U=k*s;l({userOffset:U,userPlaybackFraction:k,userRemaining:s-U})}},[s,d,l]),x=$.useCallback(()=>{f(!1),e.scrubbed(),e.seekToProgress(A),l({})},[e,l,A]),P=$.useCallback(()=>{f(!0)},[]);return{scrubToTime:S,currentTime:g,customEnd:b,onScrubAction:w,onScrubActionEnd:x,onScrubActionStart:P,isScrubbing:d,playProgressValue:A}},WV=({bufferProgress:t,inputCss:e,isFullPlayer:n,playProgress:r,shouldDisplayTime:i,shouldDisplayScrubber:s=!0,hideBackToLiveButton:a=!1})=>{const{onSkip:o,onSkipToLive:l}=zV(),{customEnd:u,onScrubActionEnd:c,onScrubActionStart:d,onScrubAction:f,playProgressValue:h,scrubToTime:g,currentTime:v,isScrubbing:b}=Qct({playProgress:r}),S=Ht(J0),{backToLiveButton:A,ff15sButton:w,rw15sButton:x,scrubberIsUserControlled:P,shouldDisplayLiveIndicator:N}=Ht(Bv)??{},k=s&&fo(w)&&fo(x)&&!S,U=fo(A,!0)&&!S,H=()=>{},{offset:B,remaining:q}=Sx(),{playbackLiveFraction:Z=0}=Ht(Tb),{isLiveShow:C,start:L,duration:V}=Oa(rpe(X=>({isLiveShow:X.isLiveShow,start:X.start,duration:X.duration})));return I(Zct,{bufferedValue:t??Z,currentTime:b?B:v,customEnd:u,duration:V,inputCss:e,isFullPlayer:n,playProgressValue:h,onSkipForward:()=>o(pE.skip15),onSkipBack:()=>o(pE.skip15*-1),onSkipToLive:l,onScrubActionEnd:k?c:H,onScrubActionStart:k?d:H,onScrubAction:f,scrubberIsUserControlled:P,shouldDisplayTime:i&&!S,shouldDisplayBackToLive:U&&!a,shouldDisplayLiveIndicator:N&&!S,scrubToTime:g,shouldDisplayScrubber:k})},Xct=t=>({height:t,width:t}),gS={baseButton:fhe,iconButton:{...Bt.accessibleMinButtonSize(),...Bt.transition(["color","background-color"]),alignSelf:"center",borderRadius:"100%"},defaultDarkTheme:{color:_e.white,...Dr({color:_e.white60})},defaultLightTheme:{color:_e.audacyDarkNavy,...Dr({color:_e.audacyDarkNavy60})},fillDarkTheme:{backgroundColor:_e.white,color:_e.audacyDarkNavy,...Dr({color:_e.audacyDarkNavy60})},fillLightTheme:{backgroundColor:_e.audacyDarkNavy,color:_e.white,...Dr({color:_e.white60})},hoverFillDarkTheme:{backgroundColor:"transparent",color:_e.white,...Dr({backgroundColor:_e.white15,color:_e.white60})},hoverFillLightTheme:{backgroundColor:"transparent",color:_e.audacyDarkNavy,...Dr({backgroundColor:_e.audacyDarkNavy,color:_e.white60})},outlineDarkTheme:{background:"transparent",boxShadow:`0 0 0 1px ${_e.white30}`,color:_e.white,...Dr({color:_e.white60})},outlineLightTheme:{background:"transparent",boxShadow:`0 0 0 1px ${_e.audacyDarkNavy60}`,color:_e.audacyDarkNavy,...Dr({color:_e.audacyDarkNavy60})},disabled:hhe,children:{display:"flex",alignItems:"center",gap:"0.5rem"},label:{...phe,overflow:"visible",fontWeight:"700",fontSize:"1.5rem",lineHeight:"1.3",[eu(ve.Medium)]:{fontSize:"1rem"}}};var qV=(t=>(t.Dark="Dark",t.Light="Light",t))(qV||{}),Um=(t=>(t.Fill="Fill",t.HoverFill="HoverFill",t.Outline="Outline",t.Default="Default",t))(Um||{});const Jct=({as:t=Fi.Button,buttonCss:e,buttonSizeInPx:n=20,colorTheme:r="Dark",icon:i,iconSizeInPx:s=20,theme:a="Default",color:o,textToRender:l,...u},c)=>{const d=t===Fi.Button,f=[gS.baseButton,gS.iconButton,Xct(n),d&&"isDisabled"in u&&u.isDisabled?gS.disabled:{},gS[`${Wst(a)}${r}Theme`],e,gS.label],h=be("div",{css:gS.children,children:[I(Yr,{name:i,sizeInPx:s,iconColor:o,ariaHidden:!0}),l&&I("span",{children:l})]});return xd({children:h,styles:f,props:{as:t,...u},ref:c})},Mc=$.forwardRef(Jct),edt={attributeKey:"REWIND_SPEED_CONTROLS",attributeValue:"TRUE"},dpe={attributeKey:"USER_MARKET_IDS"},tdt=async()=>{const t=await lr.getPersonalizationServices().getIncompleteProfileData();return!!(t!=null&&t.length)},KV=Yn({default:!1,key:"appInitializationState"}),fpe=t=>window.open(t,"RadioDotComAuthWindow","width=375,height=685,toolbar=1,menubar=1,location=1,status=1,scrollbars=1,resizable=0,"),kQ=async(t,e,n)=>new Promise((r,i)=>{let s=n,a=!1;function o(l){var c,d;a=!0;const u=l.data.accessToken??l.data.isLoggedOut;(d=(c=l.data)==null?void 0:c.source)!=null&&d.includes("react-devtools")||!u||(s&&u&&(s.close(),s=void 0),e(l)?(window.removeEventListener("message",o,!1),r(l)):i(new Error(`Login failed: ${JSON.stringify(l.data)}`)))}if(s?s.location.href=t:s=fpe(t),s){const l=setInterval(()=>{s!=null&&s.closed&&(clearInterval(l),a||r(null))},100);window.addEventListener("message",o,!1)}}),hpe={async clearToken(t,e){return kQ(t,n=>n.data.isLoggedOut,e)},async getToken(t){return kQ(t,e=>e.data.userId)}};function Pt(t,e,n){function r(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(t))return;o._zod.traits.add(t),e(o,l);const u=a.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in o||(o[f]=u[f].bind(o))}}const i=(n==null?void 0:n.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function a(o){var l;const u=n!=null&&n.Parent?new s:this;r(u,o),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>{var l,u;return n!=null&&n.Parent&&o instanceof n.Parent?!0:(u=(l=o==null?void 0:o._zod)==null?void 0:l.traits)==null?void 0:u.has(t)}}),Object.defineProperty(a,"name",{value:t}),a}
vendor: 4,144 bytes, line 467
467class NE extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ppe extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const gpe={};function rb(t){return gpe}function mpe(t){const e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,i])=>e.indexOf(+r)===-1).map(([r,i])=>i)}function R4(t,e){return typeof e=="bigint"?e.toString():e}function YV(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function ZV(t){return t==null}function QV(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function ndt(t,e){const n=(t.toString().split(".")[1]||"").length,r=e.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(i=Number.parseInt(l[1]))}const s=n>i?n:i,a=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return a%o/10**s}const NQ=Symbol("evaluating");function zi(t,e,n){let r;Object.defineProperty(t,e,{get(){if(r!==NQ)return r===void 0&&(r=NQ,r=n()),r},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function _b(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Hv(...t){const e={};for(const n of t){const r=Object.getOwnPropertyDescriptors(n);Object.assign(e,r)}return Object.defineProperties({},e)}function MQ(t){return JSON.stringify(t)}function rdt(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const vpe="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function uD(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const idt=YV(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lC(t){if(uD(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!(uD(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ype(t){return lC(t)?{...t}:Array.isArray(t)?[...t]:t}const sdt=new Set(["string","number","symbol"]);function aN(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jv(t,e,n){const r=new t._zod.constr(e??t._zod.def);return(!e||n!=null&&n.parent)&&(r._zod.parent=t),r}function Fn(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function adt(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const odt={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ldt(t,e){const n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Hv(t._zod.def,{get shape(){const a={};for(const o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(a[o]=n.shape[o])}return _b(this,"shape",a),a},checks:[]});return jv(t,s)}function udt(t,e){const n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Hv(t._zod.def,{get shape(){const a={...t._zod.def.shape};for(const o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete a[o]}return _b(this,"shape",a),a},checks:[]});return jv(t,s)}function cdt(t,e){if(!lC(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0){const s=t._zod.def.shape;for(const a in e)if(Object.getOwnPropertyDescriptor(s,a)!==void 0)throw new Error("Cannot over
467write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Hv(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return _b(this,"shape",s),s}});return jv(t,i)}function ddt(t,e){if(!lC(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Hv(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e};return _b(this,"shape",r),r}});return jv(t,n)}function fdt(t,e){const n=Hv(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return _b(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:[]});return jv(t,n)}function hdt(t,e,n){const i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Hv(e._zod.def,{get shape(){const o=e._zod.def.shape,l={...o};if(n)for(const u in n){if(!(u in o))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=t?new t({type:"optional",innerType:o[u]}):o[u])}else for(const u in o)l[u]=t?new t({type:"optional",innerType:o[u]}):o[u];return _b(this,"shape",l),l},checks:[]});return jv(e,a)}function pdt(t,e,n){const r=Hv(e._zod.def,{get shape(){const i=e._zod.def.shape,s={...i};if(n)for(const a in n){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(s[a]=new t({type:"nonoptional",innerType:i[a]}))}else for(const a in i)s[a]=new t({type:"nonoptional",innerType:i[a]});return _b(this,"shape",s),s}});return jv(e,r)}function gE(t,e=0){var n;if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(((n=t.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function bpe(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function wO(t){return typeof t=="string"?t:t==null?void 0:t.message}function ib(t,e,n){var i,s,a,o,l,u;const r={...t,path:t.path??[]};if(!t.message){const c=wO((a=(s=(i=t.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:a.call(s,t))??wO((o=e==null?void 0:e.error)==null?void 0:o.call(e,t))??wO((l=n.customError)==null?void 0:l.call(n,t))??wO((u=n.localeError)==null?void 0:u.call(n,t))??"Invalid input";r.message=c}return delete r.inst,delete r.continue,e!=null&&e.reportInput||delete r.input,r}function XV(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function uC(...t){const[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}const Spe=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,R4,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Epe=Pt("$ZodError",Spe),Tpe=Pt("$ZodError",Spe,{Parent:Error});function gdt(t,e=n=>n.message){const n={},r=[];for(const i of t.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}function mdt(t,e=n=>n.message){const n={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>r({issues:a}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(e(s));else{let a=n,o=0;for(;o<s.path.length;){const l=s.path[o];o===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(e(s))):a[l]=a[l]||{_errors:[]},a=a[l],o++}}};return r(t),n}const JV=t=>(e,n,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},a=e._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new NE;if(a.issues.length){const o=new((i==null?void 0:i.Err)??t)(a.issues.map(l=>ib(l,s,rb())));throw vpe(o,i==null?void 0:i.callee),o}return a.value},eH=t=>async(e,n,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let a=e._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new((i==null?void 0:i.Err)??t)(a.issues.map(l=>ib(l,s,rb())));throw vpe(o,i==null?void 0:i.callee),o}return a.value},oN=t=>(e,n,r)=>{const i=r?{...r,async:!1}:{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new NE;return s.issues.length?{success:!1,error:new(t??Epe)(s.issues.map(a=>ib(a,i,rb())))}:{success:!0,data:s.value}},vdt=oN(Tpe),lN=t=>async(e,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=e._zod.run({value:n,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(a=>ib(a,i,rb())))}:{success:!0,data:s.value}},ydt=lN(Tpe),bdt=t=>(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return JV(t)(e,n,i)},Sdt=t=>(e,n,r)=>JV(t)(e,n,r),Edt=t=>async(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return eH(t)(e,n,i)},Tdt=t=>async(e,n,r)=>eH(t)(e,n,r),Adt=t=>(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return oN(t)(e,n,i)},wdt=t=>(e,n,r)=>oN(t)(e,n,r),_dt=t=>async(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return lN(t)(e,n,i)},Cdt=t=>async(e,n,r)=>lN(t)(e,n,r),xdt=/^[cC][^\s-]{8,}
vendor: 32,966 bytes, lines 467-503
467$/,Idt=/^[0-9a-z]+$/,Odt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pdt=/^[0-9a-vA-V]{20}$/,Rdt=/^[A-Za-z0-9]{27}$/,Ldt=/^[a-zA-Z0-9_-]{21}$/,Ddt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kdt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,FQ=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ndt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Mdt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fdt(){return new RegExp(Mdt,"u")}const $dt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bdt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Udt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vdt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hdt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ape=/^[A-Za-z0-9_-]*$/,jdt=/^\+[1-9]\d{6,14}$/,wpe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zdt=new RegExp(`^${wpe}$`);function _pe(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Gdt(t){return new RegExp(`^${_pe(t)}$`)}function Wdt(t){const e=_pe({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${wpe}T(?:${r})$`)}const qdt=t=>{const e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Kdt=/^-?\d+$/,Ydt=/^-?\d+(?:\.\d+)?$/,Zdt=/^(?:true|false)$/i,Qdt=/^[^A-Z]*$/,Xdt=/^[^a-z]*$/,Zu=Pt("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Cpe={number:"number",bigint:"bigint",object:"date"},xpe=Pt("$ZodCheckLessThan",(t,e)=>{Zu.init(t,e);const n=Cpe[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ipe=Pt("$ZodCheckGreaterThan",(t,e)=>{Zu.init(t,e);const n=Cpe[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Jdt=Pt("$ZodCheckMultipleOf",(t,e)=>{Zu.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):ndt(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),eft=Pt("$ZodCheckNumberFormat",(t,e)=>{var a;Zu.init(t,e),e.format=e.format||"float64";const n=(a=e.format)==null?void 0:a.includes("int"),r=n?"int":"number",[i,s]=odt[e.format];t._zod.onattach.push(o=>{const l=o._zod.bag;l.format=e.format,l.minimum=i,l.maximum=s,n&&(l.pattern=Kdt)}),t._zod.check=o=>{const l=o.value;if(n){if(!Number.isInteger(l)){o.issues.push({expected:r,format:e.format,code:"invalid_type",continue:!1,input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort});return}}l<i&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),l>s&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}}),tft=Pt("$ZodCheckMaxLength",(t,e)=>{var n;Zu.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!ZV(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const i=r.value;if(i.length<=e.maximum)return;const a=XV(i);r.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),nft=Pt("$ZodCheckMinLength",(t,e)=>{var n;Zu.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!ZV(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const i=r.value;if(i.length>=e.minimum)return;const a=XV(i);r.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),rft=Pt("$ZodCheckLengthEquals",(t,e)=>{var n;Zu.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!ZV(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=r=>{const i=r.value,s=i.length;if(s===e.length)return;const a=XV(i),o=s>e.length;r.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),uN=Pt("$ZodCheckStringFormat",(t,e)=>{var n,r;Zu.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),ift=Pt("$ZodCheckRegex",(t,e)=>{uN.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),sft=Pt("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Qdt),uN.init(t,e)}),aft=Pt("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Xdt),uN.init(t,e)}),oft=Pt("$ZodCheckIncludes",(t,e)=>{Zu.init(t,e);const n=aN(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),lft=Pt("$ZodCheckStartsWith",(t,e)=>{Zu.init(t,e);const n=new RegExp(`^${aN(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),uft=Pt("$ZodCheckEndsWith",(t,e)=>{Zu.init(t,e);const n=new RegExp(`.*${aN(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),cft=Pt("$ZodCheckOverwrite",(t,e)=>{Zu.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class dft{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
468`).filter(a=>a),i=Math.min(...r.map(a=>a.length-a.trimStart().length)),s=r.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const e=Function,n=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(s=>`  ${s}`)];return new e(...n,i.join(`
469`))}}const fft={major:4,minor:3,patch:5},$a=Pt("$ZodType",(t,e)=>{var i;var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=fft;const r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(const s of r)for(const a of s._zod.onattach)a(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),(i=t._zod.deferred)==null||i.push(()=>{t._zod.run=t._zod.parse});else{const s=(o,l,u)=>{let c=gE(o),d;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,g=f._zod.check(o);if(g instanceof Promise&&(u==null?void 0:u.async)===!1)throw new NE;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,o.issues.length!==h&&(c||(c=gE(o,h)))});else{if(o.issues.length===h)continue;c||(c=gE(o,h))}}return d?d.then(()=>o):o},a=(o,l,u)=>{if(gE(o))return o.aborted=!0,o;const c=s(l,r,u);if(c instanceof Promise){if(u.async===!1)throw new NE;return c.then(d=>t._zod.parse(d,u))}return t._zod.parse(c,u)};t._zod.run=(o,l)=>{if(l.skipChecks)return t._zod.parse(o,l);if(l.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(d=>a(d,o,l)):a(c,o,l)}const u=t._zod.parse(o,l);if(u instanceof Promise){if(l.async===!1)throw new NE;return u.then(c=>s(c,r,l))}return s(u,r,l)}}zi(t,"~standard",()=>({validate:s=>{var a;try{const o=vdt(t,s);return o.success?{value:o.data}:{issues:(a=o.error)==null?void 0:a.issues}}catch{return ydt(t,s).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),tH=Pt("$ZodString",(t,e)=>{var n;$a.init(t,e),t._zod.pattern=[...((n=t==null?void 0:t._zod.bag)==null?void 0:n.patterns)??[]].pop()??qdt(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),Js=Pt("$ZodStringFormat",(t,e)=>{uN.init(t,e),tH.init(t,e)}),hft=Pt("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=kdt),Js.init(t,e)}),pft=Pt("$ZodUUID",(t,e)=>{if(e.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=FQ(r))}else e.pattern??(e.pattern=FQ());Js.init(t,e)}),gft=Pt("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Ndt),Js.init(t,e)}),mft=Pt("$ZodURL",(t,e)=>{Js.init(t,e),t._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),vft=Pt("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Fdt()),Js.init(t,e)}),yft=Pt("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Ldt),Js.init(t,e)}),bft=Pt("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=xdt),Js.init(t,e)}),Sft=Pt("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Idt),Js.init(t,e)}),Eft=Pt("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Odt),Js.init(t,e)}),Tft=Pt("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Pdt),Js.init(t,e)}),Aft=Pt("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Rdt),Js.init(t,e)}),wft=Pt("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Wdt(e)),Js.init(t,e)}),_ft=Pt("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=zdt),Js.init(t,e)}),Cft=Pt("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Gdt(e)),Js.init(t,e)}),xft=Pt("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ddt),Js.init(t,e)}),Ift=Pt("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=$dt),Js.init(t,e),t._zod.bag.format="ipv4"}),Oft=Pt("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Bdt),Js.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),Pft=Pt("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Udt),Js.init(t,e)}),Rft=Pt("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Vdt),Js.init(t,e),t._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,s]=r;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Ope(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Lft=Pt("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Hdt),Js.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{Ope(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function Dft(t){if(!Ape.test(t))return!1;const e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Ope(n)}const kft=Pt("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ape),Js.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{Dft(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),Nft=Pt("$ZodE164",(t,e)=>{e.pattern??(e.pattern=jdt),Js.init(t,e)});function Mft(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const Fft=Pt("$ZodJWT",(t,e)=>{Js.init(t,e),t._zod.check=n=>{Mft(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),Ppe=Pt("$ZodNumber",(t,e)=>{$a.init(t,e),t._zod.pattern=t._zod.bag.pattern??Ydt,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...s?{received:s}:{}}),n}}),$ft=Pt("$ZodNumberFormat",(t,e)=>{eft.init(t,e),Ppe.init(t,e)}),Bft=Pt("$ZodBoolean",(t,e)=>{$a.init(t,e),t._zod.pattern=Zdt,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),n}}),Uft=Pt("$ZodUnknown",(t,e)=>{$a.init(t,e),t._zod.parse=n=>n}),Vft=Pt("$ZodNever",(t,e)=>{$a.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function $Q(t,e,n){t.issues.length&&e.issues.push(...bpe(n,t.issues)),e.value[n]=t.value}const Hft=Pt("$ZodArray",(t,e)=>{$a.init(t,e),t._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),n;n.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],l=e.element._zod.run({value:o,issues:[]},r);l instanceof Promise?s.push(l.then(u=>$Q(u,n,a))):$Q(l,n,a)}return s.length?Promise.all(s).then(()=>n):n}});function cD(t,e,n,r,i){if(t.issues.length){if(i&&!(n in r))return;e.issues.push(...bpe(n,t.issues))}t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}function Rpe(t){var r,i,s,a;const e=Object.keys(t.shape);for(const o of e)if(!((a=(s=(i=(r=t.shape)==null?void 0:r[o])==null?void 0:i._zod)==null?void 0:s.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=adt(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function Lpe(t,e,n,r,i,s){const a=[],o=i.keySet,l=i.catchall._zod,u=l.def.type,c=l.optout==="optional";for(const d in e){if(o.has(d))continue;if(u==="never"){a.push(d);continue}const f=l.run({value:e[d],issues:[]},r);f instanceof Promise?t.push(f.then(h=>cD(h,n,d,e,c))):cD(f,n,d,e,c)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:s}),t.length?Promise.all(t).then(()=>n):n}const jft=Pt("$ZodObject",(t,e)=>{$a.init(t,e);const n=Object.getOwnPropertyDescriptor(e,"shape");if(!(n!=null&&n.get)){const o=e.shape;Object.defineProperty(e,"shape",{get:()=>{const l={...o};return Object.defineProperty(e,"shape",{value:l}),l}})}const r=YV(()=>Rpe(e));zi(t._zod,"propValues",()=>{const o=e.shape,l={};for(const u in o){const c=o[u]._zod;if(c.values){l[u]??(l[u]=new Set);for(const d of c.values)l[u].add(d)}}return l});const i=uD,s=e.catchall;let a;t._zod.parse=(o,l)=>{a??(a=r.value);const u=o.value;if(!i(u))return o.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),o;o.value={};const c=[],d=a.shape;for(const f of a.keys){const h=d[f],g=h._zod.optout==="optional",v=h._zod.run({value:u[f],issues:[]},l);v instanceof Promise?c.push(v.then(b=>cD(b,o,f,u,g))):cD(v,o,f,u,g)}return s?Lpe(c,u,o,l,r.value,t):c.length?Promise.all(c).then(()=>o):o}}),zft=Pt("$ZodObjectJIT",(t,e)=>{jft.init(t,e);const n=t._zod.parse,r=YV(()=>Rpe(e)),i=f=>{var w;const h=new dft(["shape","payload","ctx"]),g=r.value,v=x=>{const P=MQ(x);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};h.write("const input = payload.value;");const b=Object.create(null);let S=0;for(const x of g.keys)b[x]=`key_${S++}`;h.write("const newResult = {};");for(const x of g.keys){const P=b[x],N=MQ(x),k=f[x],U=((w=k==null?void 0:k._zod)==null?void 0:w.optout)==="optional";h.write(`const ${P} = ${v(x)};`),U?h.write(`
470        if (${P}.issues.length) {
471          if (${N} in input) {
472            payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
473              ...iss,
474              path: iss.path ? [${N}, ...iss.path] : [${N}]
475            })));
476          }
477        }
478        
479        if (${P}.value === undefined) {
480          if (${N} in input) {
481            newResult[${N}] = undefined;
482          }
483        } else {
484          newResult[${N}] = ${P}.value;
485        }
486        
487      `):h.write(`
488        if (${P}.issues.length) {
489          payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
490            ...iss,
491            path: iss.path ? [${N}, ...iss.path] : [${N}]
492          })));
493        }
494        
495        if (${P}.value === undefined) {
496          if (${N} in input) {
497            newResult[${N}] = undefined;
498          }
499        } else {
500          newResult[${N}] = ${P}.value;
501        }
502        
503      `)}h.write("payload.value = newResult;"),h.write("return payload;");const A=h.compile();return(x,P)=>A(f,x,P)};let s;const a=uD,o=!gpe.jitless,u=o&&idt.value,c=e.catchall;let d;t._zod.parse=(f,h)=>{d??(d=r.value);const g=f.value;return a(g)?o&&u&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(s||(s=i(e.shape)),f=s(f,h),c?Lpe([],g,f,h,d,t):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),f)}});function BQ(t,e,n,r){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!gE(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(s=>s.issues.map(a=>ib(a,r,rb())))}),e)}const Gft=Pt("$ZodUnion",(t,e)=>{$a.init(t,e),zi(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),zi(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),zi(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),zi(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>QV(s.source)).join("|")})$`)}});const n=e.options.length===1,r=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(n)return r(i,s);let a=!1;const o=[];for(const l of e.options){const u=l._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)o.push(u),a=!0;else{if(u.issues.length===0)return u;o.push(u)}}return a?Promise.all(o).then(l=>BQ(l,i,t,s)):BQ(o,i,t,s)}}),Wft=Pt("$ZodIntersection",(t,e)=>{$a.init(t,e),t._zod.parse=(n,r)=>{const i=n.value,s=e.left._zod.run({value:i,issues:[]},r),a=e.right._zod.run({value:i,issues:[]},r);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([l,u])=>UQ(n,l,u)):UQ(n,s,a)}});function L4(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(lC(t)&&lC(e)){const n=Object.keys(e),r=Object.keys(t).filter(s=>n.indexOf(s)!==-1),i={...t,...e};for(const s of r){const a=L4(t[s],e[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<t.length;r++){const i=t[r],s=e[r],a=L4(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function UQ(t,e,n){const r=new Map;let i;for(const o of e.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else t.issues.push(o);for(const o of n.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else t.issues.push(o);const s=[...r].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&t.issues.push({...i,keys:s}),gE(t))return t;const a=L4(e.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return t.value=a.data,t}const qft=Pt("$ZodEnum",(t,e)=>{$a.init(t,e);const n=mpe(e.entries),r=new Set(n);t._zod.values=r,t._zod.pattern=new RegExp(`^(${n.filter(i=>sdt.has(typeof i)).map(i=>typeof i=="string"?aN(i):i.toString()).join("|")})$`),t._zod.parse=(i,s)=>{const a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:n,input:a,inst:t}),i}}),Kft=Pt("$ZodTransform",(t,e)=>{$a.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ppe(t.constructor.name);const i=e.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(n.value=a,n));if(i instanceof Promise)throw new NE;return n.value=i,n}});function VQ(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const Dpe=Pt("$ZodOptional",(t,e)=>{$a.init(t,e),t._zod.optin="optional",t._zod.optout="optional",zi(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),zi(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${QV(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>VQ(s,n.value)):VQ(i,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,r)}}),Yft=Pt("$ZodExactOptional",(t,e)=>{Dpe.init(t,e),zi(t._zod,"values",()=>e.innerType._zod.values),zi(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,r)=>e.innerType._zod.run(n,r)}),Zft=Pt("$ZodNullable",(t,e)=>{$a.init(t,e),zi(t._zod,"optin",()=>e.innerType._zod.optin),zi(t._zod,"optout",()=>e.innerType._zod.optout),zi(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${QV(n.source)}|null)$`):void 0}),zi(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),Qft=Pt("$ZodDefault",(t,e)=>{$a.init(t,e),t._zod.optin="optional",zi(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);if(n.value===void 0)return n.value=e.defaultValue,n;const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>HQ(s,e)):HQ(i,e)}});function HQ(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const Xft=Pt("$ZodPrefault",(t,e)=>{$a.init(t,e),t._zod.optin="optional",zi(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),Jft=Pt("$ZodNonOptional",(t,e)=>{$a.init(t,e),zi(t._zod,"values",()=>{const n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>jQ(s,t)):jQ(i,t)}});function jQ(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const eht=Pt("$ZodCatch",(t,e)=>{$a.init(t,e),zi(t._zod,"optin",()=>e.innerType._zod.optin),zi(t._zod,"optout",()=>e.innerType._zod.optout),zi(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.value,s.issues.length&&(n.value=e.catchValue({...n,error:{issues:s.issues.map(a=>ib(a,r,rb()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>ib(s,r,rb()))},input:n.value}),n.issues=[]),n)}}),tht=Pt("$ZodPipe",(t,e)=>{$a.init(t,e),zi(t._zod,"values",()=>e.in._zod.values),zi(t._zod,"optin",()=>e.in._zod.optin),zi(t._zod,"optout",()=>e.out._zod.optout),zi(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=e.out._zod.run(n,r);return s instanceof Promise?s.then(a=>_O(a,e.in,r)):_O(s,e.in,r)}const i=e.in._zod.run(n,r);return i instanceof Promise?i.then(s=>_O(s,e.out,r)):_O(i,e.out,r)}});function _O(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}const nht=Pt("$ZodReadonly",(t,e)=>{$a.init(t,e),zi(t._zod,"propValues",()=>e.innerType._zod.propValues),zi(t._zod,"values",()=>e.innerType._zod.values),zi(t._zod,"optin",()=>{var n,r;return(r=(n=e.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),zi(t._zod,"optout",()=>{var n,r;return(r=(n=e.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(zQ):zQ(i)}});function zQ(t){return t.value=Object.freeze(t.value),t}const rht=Pt("$ZodCustom",(t,e)=>{Zu.init(t,e),$a.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{const r=n.value,i=e.fn(r);if(i instanceof Promise)return i.then(s=>GQ(s,n,r,t));GQ(i,n,r,t)}});function GQ(t,e,n,r){if(!t){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),e.issues.push(uC(i))}}var WQ;class iht{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){const r=n[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){const n=e._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function sht(){return new iht}(WQ=globalThis).__zod_globalRegistry??(WQ.__zod_globalRegistry=sht());const pw=globalThis.__zod_globalRegistry;function aht(t,e){return new t({type:"string",...Fn(e)})}function oht(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Fn(e)})}function qQ(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Fn(e)})}function lht(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Fn(e)})}function uht(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Fn(e)})}function cht(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Fn(e)})}function dht(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Fn(e)})}function fht(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Fn(e)})}function hht(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Fn(e)})}function pht(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Fn(e)})}function ght(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Fn(e)})}function mht(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Fn(e)})}function vht(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Fn(e)})}function yht(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Fn(e)})}function bht(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Fn(e)})}function Sht(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Fn(e)})}function Eht(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Fn(e)})}function Tht(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Fn(e)})}function Aht(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Fn(e)})}function wht(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Fn(e)})}function _ht(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Fn(e)})}function Cht(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Fn(e)})}function xht(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Fn(e)})}function Iht(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Fn(e)})}function Oht(t,e){return new t({type:"string",format:"date",check:"string_format",...Fn(e)})}function Pht(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Fn(e)})}function Rht(t,e){return new t({type:"string",format:"duration",check:"string_format",...Fn(e)})}function Lht(t,e){return new t({type:"number",checks:[],...Fn(e)})}function Dht(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...Fn(e)})}function kht(t,e){return new t({type:"boolean",...Fn(e)})}function Nht(t){return new t({type:"unknown"})}function Mht(t,e){return new t({type:"never",...Fn(e)})}function KQ(t,e){return new xpe({check:"less_than",...Fn(e),value:t,inclusive:!1})}function xF(t,e){return new xpe({check:"less_than",...Fn(e),value:t,inclusive:!0})}function YQ(t,e){return new Ipe({check:"greater_than",...Fn(e),value:t,inclusive:!1})}function IF(t,e){return new Ipe({check:"greater_than",...Fn(e),value:t,inclusive:!0})}function ZQ(t,e){return new Jdt({check:"multiple_of",...Fn(e),value:t})}function kpe(t,e){return new tft({check:"max_length",...Fn(e),maximum:t})}function dD(t,e){return new nft({check:"min_length",...Fn(e),minimum:t})}function Npe(t,e){return new rft({check:"length_equals",...Fn(e),length:t})}function Fht(t,e){return new ift({check:"string_format",format:"regex",...Fn(e),pattern:t})}function $ht(t){return new sft({check:"string_format",format:"lowercase",...Fn(t)})}function Bht(t){return new aft({check:"string_format",format:"up
503percase",...Fn(t)})}function Uht(t,e){return new oft({check:"string_format",format:"includes",...Fn(e),includes:t})}function Vht(t,e){return new lft({check:"string_format",format:"starts_with",...Fn(e),prefix:t})}function Hht(t,e){return new uft({check:"string_format",format:"ends_with",...Fn(e),suffix:t})}function wT(t){return new cft({check:"overwrite",tx:t})}function jht(t){return wT(e=>e.normalize(t))}function zht(){return wT(t=>t.trim())}function Ght(){return wT(t=>t.toLowerCase())}function Wht(){return wT(t=>t.toUpperCase())}function qht(){return wT(t=>rdt(t))}function Kht(t,e,n){return new t({type:"array",element:e,...Fn(n)})}function Yht(t,e,n){return new t({type:"custom",check:"custom",fn:e,...Fn(n)})}function Zht(t){const e=Qht(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(uC(r,n.value,e._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),n.issues.push(uC(i))}},t(n.value,n)));return e}function Qht(t,e){const n=new Zu({check:"custom",...Fn(e)});return n._zod.check=t,n}function Mpe(t){let e=(t==null?void 0:t.target)??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:(t==null?void 0:t.metadata)??pw,target:e,unrepresentable:(t==null?void 0:t.unrepresentable)??"throw",override:(t==null?void 0:t.override)??(()=>{}),io:(t==null?void 0:t.io)??"output",counter:0,seen:new Map,cycles:(t==null?void 0:t.cycles)??"ref",reused:(t==null?void 0:t.reused)??"inline",external:(t==null?void 0:t.external)??void 0}}function ul(t,e,n={path:[],schemaPath:[]}){var c,d;var r;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,n.schemaPath.includes(t)&&(s.cycle=n.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,a);const o=(d=(c=t._zod).toJSONSchema)==null?void 0:d.call(c);if(o)a.schema=o;else{const f={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,a.schema,f);else{const g=a.schema,v=e.processors[i.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);v(t,e,g,f)}const h=t._zod.parent;h&&(a.ref||(a.ref=h),ul(h,e,f),e.seen.get(h).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(a.schema,l),e.io==="input"&&Gl(t)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(t).schema}function Fpe(t,e){var a,o,l,u;const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of t.seen.entries()){const d=(a=t.metadataRegistry.get(c[0]))==null?void 0:a.id;if(d){const f=r.get(d);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,c[0])}}const i=c=>{var v;const d=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const b=(v=t.external.registry.get(c[0]))==null?void 0:v.id,S=t.external.uri??(w=>w);if(b)return{ref:S(b)};const A=c[1].defId??c[1].schema.id??`schema${t.counter++}`;return c[1].defId=A,{defId:A,ref:`${S("__shared")}#/${d}/${A}`}}if(c[1]===n)return{ref:"#"};const h=`#/${d}/`,g=c[1].schema.id??`__schema${t.counter++}`;return{defId:g,ref:h+g}},s=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);const g=d.schema;for(const v in g)delete g[v];g.$ref=f};if(t.cycles==="throw")for(const c of t.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${(o=d.cycle)==null?void 0:o.join("/")}/<root>
504
505Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of t.seen.entries()){const d=c[1];if(e===c[0]){s(c);continue}if(t.external){const h=(l=t.external.registry.get(c[0]))==null?void 0:l.id;if(e!==c[0]&&h){s(c);continue}}if((u=t.metadataRegistry.get(c[0]))==null?void 0:u.id){s(c);continue}if(d.cycle){s(c);continue}if(d.count>1&&t.reused==="ref"){s(c);continue}}}function $pe(t,e){var a,o,l;const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=t.seen.get(u);if(c.ref===null)return;const d=c.def??c.schema,f={...d},h=c.ref;if(c.ref=null,h){r(h);const v=t.seen.get(h),b=v.schema;if(b.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,f),u._zod.parent===h)for(const A in d)A==="$ref"||A==="allOf"||A in f||delete d[A];if(b.$ref)for(const A in d)A==="$ref"||A==="allOf"||A in v.def&&JSON.stringify(d[A])===JSON.stringify(v.def[A])&&delete d[A]}const g=u._zod.parent;if(g&&g!==h){r(g);const v=t.seen.get(g);if(v!=null&&v.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}t.override({zodSchema:u,jsonSchema:d,path:c.path??[]})};for(const u of[...t.seen.entries()].reverse())r(u[0]);const i={};
vendor: 15,478 bytes, line 505
505if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,(a=t.external)!=null&&a.uri){const u=(o=t.external.registry.get(e))==null?void 0:o.id;if(!u)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(u)}Object.assign(i,n.def??n.schema);const s=((l=t.external)==null?void 0:l.defs)??{};for(const u of t.seen.entries()){const c=u[1];c.def&&c.defId&&(s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const u=JSON.parse(JSON.stringify(i));return Object.defineProperty(u,"~standard",{value:{...e["~standard"],jsonSchema:{input:fD(e,"input",t.processors),output:fD(e,"output",t.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Gl(t,e){const n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Gl(r.element,n);if(r.type==="set")return Gl(r.valueType,n);if(r.type==="lazy")return Gl(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Gl(r.innerType,n);if(r.type==="intersection")return Gl(r.left,n)||Gl(r.right,n);if(r.type==="record"||r.type==="map")return Gl(r.keyType,n)||Gl(r.valueType,n);if(r.type==="pipe")return Gl(r.in,n)||Gl(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Gl(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Gl(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Gl(i,n))return!0;return!!(r.rest&&Gl(r.rest,n))}return!1}const Xht=(t,e={})=>n=>{const r=Mpe({...n,processors:e});return ul(t,r),Fpe(r,t),$pe(r,t)},fD=(t,e,n={})=>r=>{const{libraryOptions:i,target:s}=r??{},a=Mpe({...i??{},target:s,io:e,processors:n});return ul(t,a),Fpe(a,t),$pe(a,t)},Jht={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ept=(t,e,n,r)=>{const i=n;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:u}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=Jht[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?i.pattern=c[0].source:c.length>1&&(i.allOf=[...c.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},tpt=(t,e,n,r)=>{const i=n,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=t._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number",typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c),typeof s=="number"&&(i.minimum=s,typeof c=="number"&&e.target!=="draft-04"&&(c>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof a=="number"&&(i.maximum=a,typeof u=="number"&&e.target!=="draft-04"&&(u<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},npt=(t,e,n,r)=>{n.type="boolean"},rpt=(t,e,n,r)=>{n.not={}},ipt=(t,e,n,r)=>{},spt=(t,e,n,r)=>{const i=t._zod.def,s=mpe(i.entries);s.every(a=>typeof a=="number")&&(n.type="number"),s.every(a=>typeof a=="string")&&(n.type="string"),n.enum=s},apt=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},opt=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},lpt=(t,e,n,r)=>{const i=n,s=t._zod.def,{minimum:a,maximum:o}=t._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=ul(s.element,e,{...r,path:[...r.path,"items"]})},upt=(t,e,n,r)=>{var u;const i=n,s=t._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=ul(a[c],e,{...r,path:[...r.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const d=s.shape[c]._zod;return e.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=ul(s.catchall,e,{...r,path:[...r.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},cpt=(t,e,n,r)=>{const i=t._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>ul(o,e,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=a:n.anyOf=a},dpt=(t,e,n,r)=>{const i=t._zod.def,s=ul(i.left,e,{...r,path:[...r.path,"allOf",0]}),a=ul(i.right,e,{...r,path:[...r.path,"allOf",1]}),o=u=>"allOf"in u&&Object.keys(u).length===1,l=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]];n.allOf=l},fpt=(t,e,n,r)=>{const i=t._zod.def,s=ul(i.innerType,e,r),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},hpt=(t,e,n,r)=>{const i=t._zod.def;ul(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType},ppt=(t,e,n,r)=>{const i=t._zod.def;ul(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},gpt=(t,e,n,r)=>{const i=t._zod.def;ul(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},mpt=(t,e,n,r)=>{const i=t._zod.def;ul(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},vpt=(t,e,n,r)=>{const i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;ul(s,e,r);const a=e.seen.get(t);a.ref=s},ypt=(t,e,n,r)=>{const i=t._zod.def;ul(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType,n.readOnly=!0},Bpe=(t,e,n,r)=>{const i=t._zod.def;ul(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType},bpt=Pt("ZodISODateTime",(t,e)=>{wft.init(t,e),ua.init(t,e)});function Spt(t){return Iht(bpt,t)}const Ept=Pt("ZodISODate",(t,e)=>{_ft.init(t,e),ua.init(t,e)});function Tpt(t){return Oht(Ept,t)}const Apt=Pt("ZodISOTime",(t,e)=>{Cft.init(t,e),ua.init(t,e)});function wpt(t){return Pht(Apt,t)}const _pt=Pt("ZodISODuration",(t,e)=>{xft.init(t,e),ua.init(t,e)});function Cpt(t){return Rht(_pt,t)}const xpt=(t,e)=>{Epe.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>mdt(t,n)},flatten:{value:n=>gdt(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,R4,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,R4,2)}},isEmpty:{get(){return t.issues.length===0}}})},Md=Pt("ZodError",xpt,{Parent:Error}),Ipt=JV(Md),Opt=eH(Md),Ppt=oN(Md),Rpt=lN(Md),Lpt=bdt(Md),Dpt=Sdt(Md),kpt=Edt(Md),Npt=Tdt(Md),Mpt=Adt(Md),Fpt=wdt(Md),$pt=_dt(Md),Bpt=Cdt(Md),Ba=Pt("ZodType",(t,e)=>($a.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:fD(t,"input"),output:fD(t,"output")}}),t.toJSONSchema=Xht(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(Hv(e,{checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),t.with=t.check,t.clone=(n,r)=>jv(t,n,r),t.brand=()=>t,t.register=(n,r)=>(n.add(t,r),t),t.parse=(n,r)=>Ipt(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>Ppt(t,n,r),t.parseAsync=async(n,r)=>Opt(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>Rpt(t,n,r),t.spa=t.safeParseAsync,t.encode=(n,r)=>Lpt(t,n,r),t.decode=(n,r)=>Dpt(t,n,r),t.encodeAsync=async(n,r)=>kpt(t,n,r),t.decodeAsync=async(n,r)=>Npt(t,n,r),t.safeEncode=(n,r)=>Mpt(t,n,r),t.safeDecode=(n,r)=>Fpt(t,n,r),t.safeEncodeAsync=async(n,r)=>$pt(t,n,r),t.safeDecodeAsync=async(n,r)=>Bpt(t,n,r),t.refine=(n,r)=>t.check(Dgt(n,r)),t.superRefine=n=>t.check(kgt(n)),t.overwrite=n=>t.check(wT(n)),t.optional=()=>eX(t),t.exactOptional=()=>Sgt(t),t.nullable=()=>tX(t),t.nullish=()=>eX(tX(t)),t.nonoptional=n=>Cgt(t,n),t.array=()=>dgt(t),t.or=n=>Tm([t,n]),t.and=n=>mgt(t,n),t.transform=n=>nX(t,ygt(n)),t.default=n=>Agt(t,n),t.prefault=n=>_gt(t,n),t.catch=n=>Igt(t,n),t.pipe=n=>nX(t,n),t.readonly=()=>Rgt(t),t.describe=n=>{const r=t.clone();return pw.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){var n;return(n=pw.get(t))==null?void 0:n.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return pw.get(t);const r=t.clone();return pw.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=n=>n(t),t)),Upe=Pt("_ZodString",(t,e)=>{tH.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(r,i,s)=>ept(t,r,i);const n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(Fht(...r)),t.includes=(...r)=>t.check(Uht(...r)),t.startsWith=(...r)=>t.check(Vht(...r)),t.endsWith=(...r)=>t.check(Hht(...r)),t.min=(...r)=>t.check(dD(...r)),t.max=(...r)=>t.check(kpe(...r)),t.length=(...r)=>t.check(Npe(...r)),t.nonempty=(...r)=>t.check(dD(1,...r)),t.lowercase=r=>t.check($ht(r)),t.uppercase=r=>t.check(Bht(r)),t.trim=()=>t.check(zht()),t.normalize=(...r)=>t.check(jht(...r)),t.toLowerCase=()=>t.check(Ght()),t.toUpperCase=()=>t.check(Wht()),t.slugify=()=>t.check(qht())}),Upt=Pt("ZodString",(t,e)=>{tH.init(t,e),Upe.init(t,e),t.email=n=>t.check(oht(Vpt,n)),t.url=n=>t.check(fht(Hpt,n)),t.jwt=n=>t.check(xht(rgt,n)),t.emoji=n=>t.check(hht(jpt,n)),t.guid=n=>t.check(qQ(QQ,n)),t.uuid=n=>t.check(lht(CO,n)),t.uuidv4=n=>t.check(uht(CO,n)),t.uuidv6=n=>t.check(cht(CO,n)),t.uuidv7=n=>t.check(dht(CO,n)),t.nanoid=n=>t.check(pht(zpt,n)),t.guid=n=>t.check(qQ(QQ,n)),t.cuid=n=>t.check(ght(Gpt,n)),t.cuid2=n=>t.check(mht(Wpt,n)),t.ulid=n=>t.check(vht(qpt,n)),t.base64=n=>t.check(wht(egt,n)),t.base64url=n=>t.check(_ht(tgt,n)),t.xid=n=>t.check(yht(Kpt,n)),t.ksuid=n=>t.check(bht(Ypt,n)),t.ipv4=n=>t.check(Sht(Zpt,n)),t.ipv6=n=>t.check(Eht(Qpt,n)),t.cidrv4=n=>t.check(Tht(Xpt,n)),t.cidrv6=n=>t.check(Aht(Jpt,n)),t.e164=n=>t.check(Cht(ngt,n)),t.datetime=n=>t.check(Spt(n)),t.date=n=>t.check(Tpt(n)),t.time=n=>t.check(wpt(n)),t.duration=n=>t.check(Cpt(n))});function df(t){return aht(Upt,t)}const ua=Pt("ZodStringFormat",(t,e)=>{Js.init(t,e),Upe.init(t,e)}),Vpt=Pt("ZodEmail",(t,e)=>{gft.init(t,e),ua.init(t,e)}),QQ=Pt("ZodGUID",(t,e)=>{hft.init(t,e),ua.init(t,e)}),CO=Pt("ZodUUID",(t,e)=>{pft.init(t,e),ua.init(t,e)}),Hpt=Pt("ZodURL",(t,e)=>{mft.init(t,e),ua.init(t,e)}),jpt=Pt("ZodEmoji",(t,e)=>{vft.init(t,e),ua.init(t,e)}),zpt=Pt("ZodNanoID",(t,e)=>{yft.init(t,e),ua.init(t,e)}),Gpt=Pt("ZodCUID",(t,e)=>{bft.init(t,e),ua.init(t,e)}),Wpt=Pt("ZodCUID2",(t,e)=>{Sft.init(t,e),ua.init(t,e)}),qpt=Pt("ZodULID",(t,e)=>{Eft.init(t,e),ua.init(t,e)}),Kpt=Pt("ZodXID",(t,e)=>{Tft.init(t,e),ua.init(t,e)}),Ypt=Pt("ZodKSUID",(t,e)=>{Aft.init(t,e),ua.init(t,e)}),Zpt=Pt("ZodIPv4",(t,e)=>{Ift.init(t,e),ua.init(t,e)}),Qpt=Pt("ZodIPv6",(t,e)=>{Oft.init(t,e),ua.init(t,e)}),Xpt=Pt("ZodCIDRv4",(t,e)=>{Pft.init(t,e),ua.init(t,e)}),Jpt=Pt("ZodCIDRv6",(t,e)=>{Rft.init(t,e),ua.init(t,e)}),egt=Pt("ZodBase64",(t,e)=>{Lft.init(t,e),ua.init(t,e)}),tgt=Pt("ZodBase64URL",(t,e)=>{kft.init(t,e),ua.init(t,e)}),ngt=Pt("ZodE164",(t,e)=>{Nft.init(t,e),ua.init(t,e)}),rgt=Pt("ZodJWT",(t,e)=>{Fft.init(t,e),ua.init(t,e)}),Vpe=Pt("ZodNumber",(t,e)=>{Ppe.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(r,i,s)=>tpt(t,r,i),t.gt=(r,i)=>t.check(YQ(r,i)),t.gte=(r,i)=>t.check(IF(r,i)),t.min=(r,i)=>t.check(IF(r,i)),t.lt=(r,i)=>t.check(KQ(r,i)),t.lte=(r,i)=>t.check(xF(r,i)),t.max=(r,i)=>t.check(xF(r,i)),t.int=r=>t.check(XQ(r)),t.safe=r=>t.check(XQ(r)),t.positive=r=>t.check(YQ(0,r)),t.nonnegative=r=>t.check(IF(0,r)),t.negative=r=>t.check(KQ(0,r)),t.nonpositive=r=>t.check(xF(0,r)),t.multipleOf=(r,i)=>t.check(ZQ(r,i)),t.step=(r,i)=>t.check(ZQ(r,i)),t.finite=()=>t;const n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function igt(t){return Lht(Vpe,t)}const sgt=Pt("ZodNumberFormat",(t,e)=>{$ft.init(t,e),Vpe.init(t,e)});function XQ(t){return Dht(sgt,t)}const agt=Pt("ZodBoolean",(t,e)=>{Bft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>npt(t,n,r)});function mS(t){return kht(agt,t)}const ogt=Pt("ZodUnknown",(t,e)=>{Uft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ipt()});function JQ(){return Nht(ogt)}const lgt=Pt("ZodNever",(t,e)=>{Vft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>rpt(t,n,r)});function ugt(t){return Mht(lgt,t)}const cgt=Pt("ZodArray",(t,e)=>{Hft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>lpt(t,n,r,i),t.element=e.element,t.min=(n,r)=>t.check(dD(n,r)),t.nonempty=n=>t.check(dD(1,n)),t.max=(n,r)=>t.check(kpe(n,r)),t.length=(n,r)=>t.check(Npe(n,r)),t.unwrap=()=>t.element});function dgt(t,e){return Kht(cgt,t,e)}const fgt=Pt("ZodObject",(t,e)=>{zft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>upt(t,n,r,i),zi(t,"shape",()=>e.shape),t.keyof=()=>nH(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:JQ()}),t.loose=()=>t.clone({...t._zod.def,catchall:JQ()}),t.strict=()=>t.clone({...t._zod.def,catchall:ugt()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>cdt(t,n),t.safeExtend=n=>ddt(t,n),t.merge=n=>fdt(t,n),t.pick=n=>ldt(t,n),t.omit=n=>udt(t,n),t.partial=(...n)=>hdt(Hpe,t,n[0]),t.required=(...n)=>pdt(jpe,t,n[0])});function hgt(t,e){const n={type:"object",shape:t??{},...Fn(e)};return new fgt(n)}const pgt=Pt("ZodUnion",(t,e)=>{Gft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>cpt(t,n,r,i),t.options=e.options});function Tm(t,e){return new pgt({type:"union",options:t,...Fn(e)})}const ggt=Pt("ZodIntersection",(t,e)=>{Wft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>dpt(t,n,r,i)});function mgt(t,e){return new ggt({type:"intersection",left:t,right:e})}const D4=Pt("ZodEnum",(t,e)=>{qft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(r,i,s)=>spt(t,r,i),t.enum=e.entries,t.options=Object.values(e.entries);const n=new Set(Object.keys(e.entries));t.extract=(r,i)=>{const s={};for(const a of r)if(n.has(a))s[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new D4({...e,checks:[],...Fn(i),entries:s})},t.exclude=(r,i)=>{const s={...e.entries};for(const a of r)if(n.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new D4({...e,checks:[],...Fn(i),entries:s})}});function nH(t,e){const n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new D4({type:"enum",entries:n,...Fn(e)})}const vgt=Pt("ZodTransform",(t,e)=>{Kft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>opt(t,n),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ppe(t.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(uC(s,n.value,e));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),n.issues.push(uC(a))}};
505const i=e.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n)):(n.value=i,n)}});function ygt(t){return new vgt({type:"transform",transform:t})}const Hpe=Pt("ZodOptional",(t,e)=>{Dpe.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Bpe(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function eX(t){return new Hpe({type:"optional",innerType:t})}const bgt=Pt("ZodExactOptional",(t,e)=>{Yft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Bpe(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Sgt(t){return new bgt({type:"optional",innerType:t})}const Egt=Pt("ZodNullable",(t,e)=>{Zft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>fpt(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function tX(t){return new Egt({type:"nullable",innerType:t})}const Tgt=Pt("ZodDefault",(t,e)=>{Qft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ppt(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Agt(t,e){return new Tgt({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ype(e)}})}const wgt=Pt("ZodPrefault",(t,e)=>{Xft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>gpt(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function _gt(t,e){return new wgt({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ype(e)}})}const jpe=Pt("ZodNonOptional",(t,e)=>{Jft.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>hpt(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Cgt(t,e){return new jpe({type:"nonoptional",innerType:t,...Fn(e)})}const xgt=Pt("ZodCatch",(t,e)=>{eht.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>mpt(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Igt(t,e){return new xgt({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const Ogt=Pt("ZodPipe",(t,e)=>{tht.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>vpt(t,n,r,i),t.in=e.in,t.out=e.out});function nX(t,e){return new Ogt({type:"pipe",in:t,out:e})}const Pgt=Pt("ZodReadonly",(t,e)=>{nht.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ypt(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Rgt(t){return new Pgt({type:"readonly",innerType:t})}const Lgt=Pt("ZodCustom",(t,e)=>{rht.init(t,e),Ba.init(t,e),t._zod.processJSONSchema=(n,r,i)=>apt(t,n)});function Dgt(t,e={}){return Yht(Lgt,t,e)}function kgt(t){return Zht(t)}var zpe={NODE_ENV:"production",API_ENV:"PROD",APP_VERSION:"2026.08.01",APP_MODE:"production",BASE_NAME:"/",BRAZE_API_KEY:"7db8fe11-bcd7-4943-995f-8c0238ab9742",BRAZE_SDK_ENDPOINT:"sdk.iad-03.braze.com",BRANCH_API_KEY:"key_live_ll3dzMaGWEEKCTJT94kaYnmlCCo2DVzp",GTM_ID:"GTM-P578B4Z",GTM_AUTH:"IfIvijNBOZKjZ6_PXOzRsQ",GTM_PREVIEW:"env-1",DISABLE_BRAZE:!1,LOG_LEVEL:0,DISABLE_XSTATE_INSPECTOR:!0,ENABLE_DEBUG:!1,USER_COOKIE_SYNC_URL:"https://sync.amperwave.net/sync/sync-cookies-lib.js"};const rX=nH(["production","development","test"]),Ngt=nH(["DEV","QA","STG","PROD"]),vS=df().refine(t=>t==="true"||t==="false",{message:"Value must be a boolean"}).transform(t=>t==="true"),Mgt=df().refine(t=>!Number.isNaN(Number(t)),{message:"Value must be a number"}).transform(t=>Number(t)),Gpe=hgt({NODE_ENV:rX,API_ENV:Ngt.default("STG"),APP_VERSION:df().default(""),APP_MODE:rX.optional(),BASE_NAME:df().default("/"),BRAZE_API_KEY:df().default("194a36b8-c85b-4186-8c05-44ac56b6b031"),BRAZE_SDK_ENDPOINT:df().default("sdk.iad-03.braze.com"),BRANCH_API_KEY:df().default("key_test_egXpBHlV0yEQBJLIZ9kLuclnwtn9yRzu"),GTM_ID:df(),GTM_AUTH:df(),GTM_PREVIEW:df(),DISABLE_BRAZE:Tm([vS,mS()]).default(!1),LOG_LEVEL:Tm([Mgt,igt()]).default(0),DISABLE_XSTATE_INSPECTOR:Tm([vS,mS()]).default(!1),ENABLE_DEBUG:Tm([vS,mS()]).default(!1),USER_COOKIE_SYNC_URL:df().default("https://user-sync.amperwave-qa.int.audacy.com/sync/sync-cookies-lib.js"),BUILD_VISUALIZE:Tm([vS,mS()]).default(!1),BUILD_MINIFY:Tm([vS,mS()]).default(!1),BUILD_SOURCEMAP:Tm([vS,mS()]).default(!1)});function Fgt(t){const e=Gpe.safeParse(zpe);if(e.success===!1)throw console.error("❌ Invalid environment variables:",e.error.flatten().fieldErrors),new Error("Invalid environment variables")}
505function $gt(t){const e=zpe;return Gpe.parse({NODE_ENV:e.NODE_ENV,API_ENV:e.API_ENV,APP_VERSION:e.APP_VERSION??e.npm_package_version,APP_MODE:e.APP_MODE??e.NODE_ENV,BASE_NAME:e.BASE_NAME,BRAZE_API_KEY:e.BRAZE_API_KEY,BRAZE_SDK_ENDPOINT:e.BRAZE_SDK_ENDPOINT,BRANCH_API_KEY:e.BRANCH_API_KEY,GTM_ID:e.GTM_ID,GTM_AUTH:e.GTM_AUTH,GTM_PREVIEW:e.GTM_PREVIEW,DISABLE_BRAZE:e.DISABLE_BRAZE,LOG_LEVEL:e.LOG_LEVEL,DISABLE_XSTATE_INSPECTOR:e.DISABLE_XSTATE_INSPECTOR,ENABLE_DEBUG:e.ENABLE_DEBUG,USER_COOKIE_SYNC_URL:e.USER_COOKIE_SYNC_URL,BUILD_VISUALIZE:e.BUILD_VISUALIZE,BUILD_MINIFY:e.BUILD_MINIFY,BUILD_SOURCEMAP:e.BUILD_SOURCEMAP})}const ol=$gt(),Bgt=()=>{Object.keys(localStorage).filter(t=>t.startsWith("ab.")).forEach(t=>localStorage.removeItem(t))},Wpe=t=>{hV(t)},Ugt=()=>new Promise(t=>{Wpe(()=>{Bgt(),t()})}),Vgt=()=>{setTimeout(async()=>{await Ugt(),Wpe()},500)};var qpe=(t=>(t.FlushAndClear="flushandclearbrazecache",t.Location="RequestLocationPermission",t.Login="login",t))(qpe||{}),Kpe=(t=>(t.Braze="Audacy::Braze",t))(Kpe||{});const Hgt=()=>{window.addEventListener("message",t=>{switch(t.data){case"flushandclearbrazecache":return Vgt();case"login":return void Ype()}})},jgt=({dateOfBirth:t})=>{const[e,n,r]=Mi.split(t,"-").map(i=>Number.parseInt(i,10));return{year:e,month:n,day:r}},zgt=t=>{switch(t){case T0.MALE:return"m";case T0.FEMALE:return"f";case T0.NON_BINARY:return"o";default:return"u"}},rH=({attributeKey:t,attributeValue:e})=>{var n;Tx||(n=md())==null||n.setCustomUserAttribute(t,e)},vMt=({emailAddress:t,firstName:e,lastName:n,zipCode:r,gender:i,dateOfBirth:s})=>{var a,o,l,u,c,d;if(!Tx&&(t&&((a=md())==null||a.setEmail(t)),e&&((o=md())==null||o.setFirstName(e)),n&&((l=md())==null||l.setLastName(n)),i&&((u=md())==null||u.setGender(zgt(i))),r&&((c=md())==null||c.setHomeCity(r)),s)){const f=jgt({dateOfBirth:s}),{year:h,month:g,day:v}=f;(d=md())==null||d.setDateOfBirth(h,g,v)}},Tx=ol.DISABLE_BRAZE&&ol.NODE_ENV!=="production",Ax=()=>{const t=Ht(KV),e=pb(kg),{clientServices:n}=Fa(),r=rT(),i=$.useCallback(async()=>{r(bi.Loading),Pn.info(`[${Rn.Auth}] state/auth/index.ts: onLogIn called`);const{hasIncompleteProfileData:a,incompleteProfileData:o}=await Ype();if(a){const c=(o==null?void 0:o.includes("firstName"))||(o==null?void 0:o.includes("lastName"))?bi.RegistrationStepOne:bi.RegistrationStepTwo;r(c)}else r(bi.Home);const l=n.getPersonalizationServices().dataStore.getDataSync(tr.PLAYBACKS);l&&xc(Cd,l)},[n,r]);let s=!1;switch(Pn.info(`[${Rn.Auth}] state/auth/index.ts: onLogIn: loggedInLoadable.state: ${e.state}`),e.state){case"hasValue":s=e.contents;break;case"loading":s=!1;break;case"hasError":s=!1;break}return{isLoggedIn:!!(t&&s),logIn:i,logInAnonymous:Zpe,logOut:Ggt}},Ype=async()=>{var c,d;Pn.info(`[${Rn.Auth}] state/auth/index.ts: logIn called`);const t={hasIncompleteProfileData:!1},e=await Uf(),n=e.getPersonalizationServices().authUrl,r=await hpe.getToken(n);if(!r)return await e.getPersonalizationServices().setAuthState({state:Bn.NONE}),t;cce(),e.getPersonalizationServices().setIsSoftDeleted((c=r.data)==null?void 0:c.isSoftDeleted),await e.getPersonalizationServices().setAuthState({state:Bn.AUTH,data:r.data,isTrusted:r.isTrusted,origin:r.origin});const i=e.getPersonalizationServices().getAuthState();xc(z7,i);const s=await e.getPersonalizationServices().getIsSoftDeleted();xc(Sde,s);const a=await e.getDataServices().getUserMarkets(void 0,void 0,!0);xc(A2,{markets:a});const o=JSON.parse(localStorage.getItem("locationMarketsState")||'{ "markets": [] }'),l=a.map(f=>f.marketId),u=o==null?void 0:o.markets.map(f=>f.marketId);return l.length&&!Mi.isEqual(l,u)&&rH({attributeKey:dpe.attributeKey,attributeValue:l}),localStorage.setItem("locationMarketsState",JSON.stringify({markets:a})),t.incompleteProfileData=await lr.getPersonalizationServices().getIncompleteProfileData(),t.hasIncompleteProfileData=!!((d=t.incompleteProfileData)!=null&&d.length),e.getAnalyticServices().sendLoginLogout(_f(wb),t.hasIncompleteProfileData,r.data.loginMethod,!0),t},Ggt=async()=>{let t=null;U9(navigator.userAgent)&&(t=fpe("about:blank"));const e=await Uf();try{const r=await e.getPersonalizationServices().executeLogout();r?await hpe.clearToken(r,t||void 0):t==null||t.close()}catch{t==null||t.close()}const n=await tdt();e.getAnalyticServices().sendLoginLogout(_f(wb),n),xc(A2,{markets:[]}),localStorage.removeItem("locationMarketsState"),localStorage.removeItem(tr.BRAZE_DEVICE_ID),cce(),await Zpe(),window.location.href=bi.Home,FLe(P2)},Zpe=async()=>{const t=await Uf();await t.getPersonalizationServices().setAuthState({state:Bn.ANON});const e=t.getPersonalizationServices().dataStore.getDataSync(tr.USER_TOKEN);t.getPersonalizationServices().dataStore.setDataSync(tr.BRAZE_DEVICE_ID,e),xc(z7,t.getPersonalizationServices().getAuthState())},Qpe={container:{position:"relative"},overlay:{backgroundColor:_e.audacyDarkNavy70,height:"100%",left:0,position:"fixed",top:0,width:"100%"}},iX=({onClick:t})=>{const e={css:Qpe.overlay,className:"overlay"};return t?I("button",{...e,"aria-hidden":!0,onClick:t,tabIndex:-1}):I("div",{...e})},Xpe=({isAnimated:t,isVisible:e,motionTransition:n,zIndex:r=0,...i})=>t?I(bv.FadeInOut,{isVisible:e,motionCss:{...Qpe.container,zIndex:r},transition:n,children:I(iX,{...i})}):I(iX,{...i}),OF={drawerContainer:{position:"fixed",bottom:0,left:0,overflow:"auto",width:"100%",zIndex:Ai.drawer}
505,drawer:{background:_e.white,borderRadius:"15px 15px 0 0",padding:"30px 30px 50px",width:"100vw",[Be(ve.Medium)]:{padding:"30px 42px 35px"}},portal:{position:"relative",zIndex:Ai.drawer}},sX={[fi.initial]:{y:"100%"},[fi.animate]:{y:0},[fi.exit]:{y:"100%"},transition:{duration:cu.drawer,ease:"easeInOut",type:"tween"}},Wgt=({children:t,renderDrawerHeader:e,onClose:n,contentContainerStyle:r,fullHeight:i})=>($.useEffect(()=>{const s=a=>{a.key==="Escape"&&n()};return window.addEventListener("keyup",s,!1),()=>{window.addEventListener("keyup",s,!1)}}),I(W2,{children:be("div",{css:OF.portal,role:"menu",children:[I(Il.div,{...sX,css:[OF.drawerContainer,i?{height:"100%"}:{maxHeight:"calc(100vh - 30px)"}],children:be("div",{css:r??OF.drawer,children:[e==null?void 0:e(n),t]})}),I(Il.div,{...k1(),transition:sX.transition,children:I(Xpe,{onClick:n})})]})})),Jpe=({isOpen:t,...e})=>I(Yh,{children:t&&I(Wgt,{...e})}),aX="data:image/svg+xml,%3csvg%20width='375'%20height='375'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23CCC'%20fill-opacity='.2'%20d='M0%200h375v375H0z'%20/%3e%3cg%20opacity='.25'%20fill='%23B8B8B8'%3e%3cpath%20d='M152.254%20237.433c16.2%200%2029.333-13.133%2029.333-29.333s-13.133-29.333-29.333-29.333c-16.199%200-29.332%2013.133-29.332%2029.333s13.133%2029.333%2029.332%2029.333ZM200.161%20138.567h-41.874l52.918%2098.866h41.873l-52.917-98.866Z'%20/%3e%3c/g%3e%3c/svg%3e",qgt=(t,e)=>{const n=[];for(let r=0;r<t.length;r+=e){const i=t.slice(r,r+e);n.push(i)}return n},Kgt=t=>t[Math.floor(Math.random()*t.length)],oX={gridContainer:{width:"100%",display:"flex",flexWrap:"wrap",borderRadius:4,overflow:"hidden"},gridItem:{flex:"0 0 50%"}},Ygt=[_e.audacyOrange,_e.audacyOrange3],Zgt=t=>{const e={type:0,uri:""},n=t.map(r=>({type:1,uri:r}));return t.length===2?(n.splice(1,0,e,e),n):t.length===3?(n.splice(3,0,e),n):(t.length>4&&n.splice(4),n)},Qgt=({imageURICollection:t,sizes:e,alt:n})=>{const r=Zgt(t);return I("div",{css:oX.gridContainer,children:r.map(({uri:i})=>I("div",{css:oX.gridItem,children:I(zf,{alt:n||"",aspectRatio:1,entityImageCss:i?{}:{background:Kgt(Ygt)},entityImageShape:Ad.GridImage,imageURIBase:i||"",sizes:e})},i))})};var _T=TypeError;const Xgt={},Jgt=Object.freeze(Object.defineProperty({__proto__:null,default:Xgt},Symbol.toStringTag,{value:"Module"})),emt=Xte(Jgt);var iH=typeof Map=="function"&&Map.prototype,PF=Object.getOwnPropertyDescriptor&&iH?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hD=iH&&PF&&typeof PF.get=="function"?PF.get:null,lX=iH&&Map.prototype.forEach,sH=typeof Set=="function"&&Set.prototype,RF=Object.getOwnPropertyDescriptor&&sH?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,pD=sH&&RF&&typeof RF.get=="function"?RF.get:null,uX=sH&&Set.prototype.forEach,tmt=typeof WeakMap=="function"&&WeakMap.prototype,Zw=tmt?WeakMap.prototype.has:null,nmt=typeof WeakSet=="function"&&WeakSet.prototype,Qw=nmt?WeakSet.prototype.has:null,rmt=typeof WeakRef=="function"&&WeakRef.prototype,cX=rmt?WeakRef.prototype.deref:null,imt=Boolean.prototype.valueOf,smt=Object.prototype.toString,amt=Function.prototype.toString,omt=String.prototype.match,aH=String.prototype.slice,rv=String.prototype.replace,lmt=String.prototype.toUpperCase,dX=String.prototype.toLowerCase,ege=RegExp.prototype.test,fX=Array.prototype.concat,Rh=Array.prototype.join,umt=Array.prototype.slice,hX=Math.floor,k4=typeof BigInt=="function"?BigInt.prototype.valueOf:null,LF=Object.getOwnPropertySymbols,N4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,$1=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Xw=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$1||!0)?Symbol.toStringTag:null,tge=Object.prototype.propertyIsEnumerable,pX=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function gX(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||ege.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-hX(-t):hX(t);if(r!==t){var i=String(r),s=aH.call(e,i.length+1);return rv.call(i,n,"$&_")+"."+rv.call(rv.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return rv.call(e,n,"$&_")}var M4=emt,mX=M4.custom,vX=ige(mX)?mX:null,nge={__proto__:null,double:'"',single:"'"},cmt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},cN=function t(e,n,r,i){var s=n||{};if(Kp(s,"quoteStyle")&&!Kp(nge,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kp(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Kp(s,"customInspect")?s.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
vendor: 6,666 bytes, lines 505-508
505if(Kp(s,"indent")&&s.indent!==null&&s.indent!=="	"&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Kp(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return age(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?gX(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return o?gX(e,u):u}var c=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof e=="object")return F4(e)?"[Array]":"[Object]";var d=Imt(s,r);if(typeof i>"u")i=[];else if(sge(i,e)>=0)return"[Circular]";function f(C,L,V){if(L&&(i=umt.call(i),i.push(L)),V){var j={depth:s.depth};return Kp(s,"quoteStyle")&&(j.quoteStyle=s.quoteStyle),t(C,j,r+1,i)}return t(C,s,r+1,i)}if(typeof e=="function"&&!yX(e)){var h=bmt(e),g=xO(e,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(g.length>0?" { "+Rh.call(g,", ")+" }":"")}if(ige(e)){var v=$1?rv.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):N4.call(e);return typeof e=="object"&&!$1?FA(v):v}if(_mt(e)){for(var b="<"+dX.call(String(e.nodeName)),S=e.attributes||[],A=0;A<S.length;A++)b+=" "+S[A].name+"="+rge(dmt(S[A].value),"double",s);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+dX.call(String(e.nodeName))+">",b}if(F4(e)){if(e.length===0)return"[]";var w=xO(e,f);return d&&!xmt(w)?"["+$4(w,d)+"]":"[ "+Rh.call(w,", ")+" ]"}if(hmt(e)){var x=xO(e,f);return!("cause"in Error.prototype)&&"cause"in e&&!tge.call(e,"cause")?"{ ["+String(e)+"] "+Rh.call(fX.call("[cause]: "+f(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Rh.call(x,", ")+" }"}if(typeof e=="object"&&a){if(vX&&typeof e[vX]=="function"&&M4)return M4(e,{depth:c-r});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Smt(e)){var P=[];return lX&&lX.call(e,function(C,L){P.push(f(L,e,!0)+" => "+f(C,e))}),bX("Map",hD.call(e),P,d)}if(Amt(e)){var N=[];return uX&&uX.call(e,function(C){N.push(f(C,e))}),bX("Set",pD.call(e),N,d)}if(Emt(e))return DF("WeakMap");if(wmt(e))return DF("WeakSet");if(Tmt(e))return DF("WeakRef");if(gmt(e))return FA(f(Number(e)));if(vmt(e))return FA(f(k4.call(e)));if(mmt(e))return FA(imt.call(e));if(pmt(e))return FA(f(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Ys<"u"&&e===Ys)return"{ [object globalThis] }";if(!fmt(e)&&!yX(e)){var k=xO(e,f),U=pX?pX(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",B=!U&&Xw&&Object(e)===e&&Xw in e?aH.call(zv(e),8,-1):H?"Object":"",q=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Z=q+(B||H?"["+Rh.call(fX.call([],B||[],H||[]),": ")+"] ":"");return k.length===0?Z+"{}":d?Z+"{"+$4(k,d)+"}":Z+"{ "+Rh.call(k,", ")+" }"}return String(e)};function rge(t,e,n){var r=n.quoteStyle||e,i=nge[r];return i+t+i}function dmt(t){return rv.call(String(t),/"/g,"&quot;")}function Cb(t){return!Xw||!(typeof t=="object"&&(Xw in t||typeof t[Xw]<"u"))}function F4(t){return zv(t)==="[object Array]"&&Cb(t)}function fmt(t){return zv(t)==="[object Date]"&&Cb(t)}function yX(t){return zv(t)==="[object RegExp]"&&Cb(t)}function hmt(t){return zv(t)==="[object Error]"&&Cb(t)}function pmt(t){return zv(t)==="[object String]"&&Cb(t)}function gmt(t){return zv(t)==="[object Number]"&&Cb(t)}function mmt(t){return zv(t)==="[object Boolean]"&&Cb(t)}function ige(t){if($1)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!N4)return!1;try{return N4.call(t),!0}catch{}return!1}function vmt(t){if(!t||typeof t!="object"||!k4)return!1;try{return k4.call(t),!0}catch{}return!1}var ymt=Object.prototype.hasOwnProperty||function(t){return t in this};function Kp(t,e){return ymt.call(t,e)}function zv(t){return smt.call(t)}function bmt(t){if(t.name)return t.name;var e=omt.call(amt.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function sge(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function Smt(t){if(!hD||!t||typeof t!="object")return!1;try{hD.call(t);try{pD.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function Emt(t){if(!Zw||!t||typeof t!="object")return!1;try{Zw.call(t,Zw);try{Qw.call(t,Qw)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function Tmt(t){if(!cX||!t||typeof t!="object")return!1;try{return cX.call(t),!0}catch{}return!1}function Amt(t){if(!pD||!t||typeof t!="object")return!1;try{pD.call(t);try{hD.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function wmt(t){if(!Qw||!t||typeof t!="object")return!1;try{Qw.call(t,Qw);try{Zw.call(t,Zw)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function _mt(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function age(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return age(aH.call(t,0,e.maxStringLength),e)+r}var i=cmt[e.quoteStyle||"single"];i.lastIndex=0;var s=rv.call(rv.call(t,i,"\\$1"),/[\x00-\x1f]/g,Cmt);return rge(s,"single",e)}function Cmt(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+lmt.call(e.toString(16))}function FA(t){return"Object("+t+")"}function DF(t){return t+" { ? }"}function bX(t,e,n,r){var i=r?$4(n,r):Rh.call(n,", ");return t+" ("+e+") {"+i+"}"}function xmt(t){for(var e=0;e<t.length;e++)if(sge(t[e],`
506`)>=0)return!1;return!0}function Imt(t,e){var n;if(t.indent==="	")n="	";else if(typeof t.indent=="number"&&t.indent>0)n=Rh.call(Array(t.indent+1)," ");else return null;return{base:n,prev:Rh.call(Array(e+1),n)}}function $4(t,e){if(t.length===0)return"";var n=`
507`+e.prev+e.base;return n+Rh.call(t,","+n)+`
508`+e.prev}function xO(t,e){var n=F4(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=Kp(t,i)?e(t[i],t):""}var s=typeof LF=="function"?LF(t):[],a;if($1){a={};for(var o=0;o<s.length;o++)a["$"+s[o]]=s[o]}for(var l in t)Kp(t,l)&&(n&&String(Number(l))===l&&l<t.length||$1&&a["$"+l]instanceof Symbol||(ege.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if(typeof LF=="function")for(var u=0;u<s.length;u++)tge.call(t,s[u])&&r.push("["+e(s[u])+"]: "+e(t[s[u]],t));return r}var Omt=cN,Pmt=_T,dN=function(t,e,n){for(var r=t,i;
508(i=r.next)!=null;r=i)if(i.key===e)return r.next=i.next,n||(i.next=t.next,t.next=i),i},Rmt=function(t,e){if(t){var n=dN(t,e);return n&&n.value}},Lmt=function(t,e,n){var r=dN(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},Dmt=function(t,e){return t?!!dN(t,e):!1},kmt=function(t,e){if(t)return dN(t,e,!0)},Nmt=function(){var e,n={assert:function(r){if(!n.has(r))throw new Pmt("Side channel does not contain "+Omt(r))},delete:function(r){var i=e&&e.next,s=kmt(e,r);return s&&i&&i===s&&(e=void 0),!!s},get:function(r){return Rmt(e,r)},has:function(r){return Dmt(e,r)},set:function(r,i){e||(e={next:void 0}),Lmt(e,r,i)}};return n},oge=Object,Mmt=Error,Fmt=EvalError,$mt=RangeError,Bmt=ReferenceError,Umt=SyntaxError,Vmt=URIError,Hmt=Math.abs,jmt=Math.floor,zmt=Math.max,Gmt=Math.min,Wmt=Math.pow,qmt=Math.round,Kmt=Number.isNaN||function(e){return e!==e},Ymt=Kmt,Zmt=function(e){return Ymt(e)||e===0?e:e<0?-1:1},Qmt=Object.getOwnPropertyDescriptor,$P=Qmt;if($P)try{$P([],"length")}catch{$P=null}var lge=$P,BP=Object.defineProperty||!1;if(BP)try{BP({},"a",{value:1})}catch{BP=!1}var Xmt=BP,kF,SX;function Jmt(){return SX||(SX=1,kF=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),kF}var NF,EX;function evt(){if(EX)return NF;EX=1;var t=typeof Symbol<"u"&&Symbol,e=Jmt();return NF=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},NF}var MF,TX;function uge(){return TX||(TX=1,MF=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),MF}var FF,AX;function cge(){if(AX)return FF;AX=1;var t=oge;return FF=t.getPrototypeOf||null,FF}var tvt="Function.prototype.bind called on incompatible ",nvt=Object.prototype.toString,rvt=Math.max,ivt="[object Function]",wX=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var s=0;s<n.length;s+=1)r[s+e.length]=n[s];return r},svt=function(e,n){for(var r=[],i=n,s=0;i<e.length;i+=1,s+=1)r[s]=e[i];return r},avt=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},ovt=function(e){var n=this;if(typeof n!="function"||nvt.apply(n)!==ivt)throw new TypeError(tvt+n);for(var r=svt(arguments,1),i,s=function(){if(this instanceof i){var c=n.apply(this,wX(r,arguments));return Object(c)===c?c:this}return n.apply(e,wX(r,arguments))},a=rvt(0,n.length-r.length),o=[],l=0;l<a;l++)o[l]="$"+l;if(i=Function("binder","return function ("+avt(o,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i},lvt=ovt,fN=Function.prototype.bind||lvt,oH=Function.prototype.call,$F,_X;function dge(){return _X||(_X=1,$F=Function.prototype.apply),$F}var uvt=typeof Reflect<"u"&&Reflect&&Reflect.apply,cvt=fN,dvt=dge(),fvt=oH,hvt=uvt,pvt=hvt||cvt.call(fvt,dvt),gvt=fN,mvt=_T,vvt=oH,yvt=pvt,fge=function(e){if(e.length<1||typeof e[0]!="function")throw new mvt("a function is required");return yvt(gvt,vvt,e)},BF,CX;function bvt(){if(CX)return BF;CX=1;var t=fge,e=lge,n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&e&&e(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return BF=r&&typeof r.get=="function"?t([r.get]):typeof s=="function"?function(o){return s(o==null?o:i(o))}:!1,BF}var UF,xX;function Svt(){if(xX)return UF;xX=1;var t=uge(),e=cge(),n=bvt();return UF=t?function(i){return t(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:n?function(i){return n(i)}:null,UF}var VF,IX;function Evt(){if(IX)return VF;IX=1;const t=(async function(){}).constructor;return VF=()=>t,VF}var HF,OX;function Tvt(){if(OX)return HF;OX=1;const t=(function*(){}).constructor;return HF=()=>t,HF}var jF,PX;
508function Avt(){if(PX)return jF;PX=1;const t=(async function*(){}).constructor;return jF=()=>t,jF}var zF,RX;function wvt(){if(RX)return zF;RX=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=fN;return zF=n.call(t,e),zF}var Er,_vt=oge,Cvt=Mmt,xvt=Fmt,Ivt=$mt,Ovt=Bmt,B1=Umt,ME=_T,Pvt=Vmt,Rvt=Hmt,Lvt=jmt,Dvt=zmt,kvt=Gmt,Nvt=Wmt,Mvt=qmt,Fvt=Zmt,cC=lge,$vt=Xmt,GF=function(){throw new ME},Bvt=cC?function(){try{return arguments.callee,GF}catch{try{return cC(arguments,"callee").get}catch{return GF}}}():GF,yS=evt()(),Po=Svt(),Uvt=cge(),Vvt=uge(),hge=dge(),wx=oH,FS={},Hvt=typeof Uint8Array>"u"||!Po?Er:Po(Uint8Array),x0={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Er:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Er:ArrayBuffer,"%ArrayIteratorPrototype%":yS&&Po?Po([][Symbol.iterator]()):Er,"%AsyncFromSyncIteratorPrototype%":Er,"%AsyncFunction%":FS,"%AsyncGenerator%":FS,"%AsyncGeneratorFunction%":FS,"%AsyncIteratorPrototype%":FS,"%Atomics%":typeof Atomics>"u"?Er:Atomics,"%BigInt%":typeof BigInt>"u"?Er:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Er:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Er:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Er:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Cvt,"%eval%":eval,"%EvalError%":xvt,"%Float16Array%":typeof Float16Array>"u"?Er:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Er:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Er:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Er:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":FS,"%Int8Array%":typeof Int8Array>"u"?Er:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Er:Int16Array,"%Int32Array%":typeof Int32Array>
vendor: 5,085 bytes, line 508
508"u"?Er:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":yS&&Po?Po(Po([][Symbol.iterator]())):Er,"%JSON%":typeof JSON=="object"?JSON:Er,"%Map%":typeof Map>"u"?Er:Map,"%MapIteratorPrototype%":typeof Map>"u"||!yS||!Po?Er:Po(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_vt,"%Object.getOwnPropertyDescriptor%":cC,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Er:Promise,"%Proxy%":typeof Proxy>"u"?Er:Proxy,"%RangeError%":Ivt,"%ReferenceError%":Ovt,"%Reflect%":typeof Reflect>"u"?Er:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Er:Set,"%SetIteratorPrototype%":typeof Set>"u"||!yS||!Po?Er:Po(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Er:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":yS&&Po?Po(""[Symbol.iterator]()):Er,"%Symbol%":yS?Symbol:Er,"%SyntaxError%":B1,"%ThrowTypeError%":Bvt,"%TypedArray%":Hvt,"%TypeError%":ME,"%Uint8Array%":typeof Uint8Array>"u"?Er:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Er:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Er:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Er:Uint32Array,"%URIError%":Pvt,"%WeakMap%":typeof WeakMap>"u"?Er:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Er:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Er:WeakSet,"%Function.prototype.call%":wx,"%Function.prototype.apply%":hge,"%Object.defineProperty%":$vt,"%Object.getPrototypeOf%":Uvt,"%Math.abs%":Rvt,"%Math.floor%":Lvt,"%Math.max%":Dvt,"%Math.min%":kvt,"%Math.pow%":Nvt,"%Math.round%":Mvt,"%Math.sign%":Fvt,"%Reflect.getPrototypeOf%":Vvt};if(Po)try{null.error}catch(t){var jvt=Po(Po(t));x0["%Error.prototype%"]=jvt}var zvt=Evt(),Gvt=Tvt(),Wvt=Avt(),qvt=function t(e){var n;if(e==="%AsyncFunction%")n=zvt()||void 0;else if(e==="%GeneratorFunction%")n=Gvt()||void 0;else if(e==="%AsyncGeneratorFunction%")n=Wvt()||void 0;else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Po&&(n=Po(i.prototype))}return x0[e]=n,n},LX={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_x=fN,gD=wvt(),Kvt=_x.call(wx,Array.prototype.concat),Yvt=_x.call(hge,Array.prototype.splice),DX=_x.call(wx,String.prototype.replace),mD=_x.call(wx,String.prototype.slice),Zvt=_x.call(wx,RegExp.prototype.exec),Qvt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xvt=/\\(\\)?/g,Jvt=function(e){var n=mD(e,0,1),r=mD(e,-1);if(n==="%"&&r!=="%")throw new B1("invalid intrinsic syntax, expected closing `%`");
508if(r==="%"&&n!=="%")throw new B1("invalid intrinsic syntax, expected opening `%`");var i=[];return DX(e,Qvt,function(s,a,o,l){i[i.length]=o?DX(l,Xvt,"$1"):a||s}),i},eyt=function(e,n){var r=e,i;if(gD(LX,r)&&(i=LX[r],r="%"+i[0]+"%"),gD(x0,r)){var s=x0[r];if(s===FS&&(s=qvt(r)),typeof s>"u"&&!n)throw new ME("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new B1("intrinsic "+e+" does not exist!")},lH=function(e,n){if(typeof e!="string"||e.length===0)throw new ME("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new ME('"allowMissing" argument must be a boolean');if(Zvt(/^%?[^%]*%?$/,e)===null)throw new B1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Jvt(e),i=r.length>0?r[0]:"",s=eyt("%"+i+"%",n),a=s.name,o=s.value,l=!1,u=s.alias;u&&(i=u[0],Yvt(r,Kvt([0,1],u)));for(var c=1,d=!0;c<r.length;c+=1){var f=r[c],h=mD(f,0,1),g=mD(f,-1);if((h==='"'||h==="'"||h==="`"||g==='"'||g==="'"||g==="`")&&h!==g)throw new B1("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),i+="."+f,a="%"+i+"%",gD(x0,a))o=x0[a];else if(o!=null){if(!(f in o)){if(!n)throw new ME("base intrinsic for "+e+" exists, but the property is not available.");return}if(cC&&c+1>=r.length){var v=cC(o,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?o=v.get:o=o[f]}else d=gD(o,f),o=o[f];d&&!l&&(x0[a]=o)}}return o},pge=lH,gge=fge,tyt=gge([pge("%String.prototype.indexOf%")]),mge=function(e,n){var r=pge(e,!!n);return typeof r=="function"&&tyt(e,".prototype.")>-1?gge([r]):r},nyt=lH,Cx=mge,ryt=cN,iyt=_T,kX=nyt("%Map%",!0),syt=Cx("Map.prototype.get",!0),ayt=Cx("Map.prototype.set",!0),oyt=Cx("Map.prototype.has",!0),lyt=Cx("Map.prototype.delete",!0),uyt=Cx("Map.prototype.size",!0),vge=!!kX&&function(){var e,n={assert:function(r){if(!n.has(r))throw new iyt("Side channel does not contain "+ryt(r))},delete:function(r){if(e){var i=lyt(e,r);return uyt(e)===0&&(e=void 0),i}return!1},get:function(r){if(e)return syt(e,r)},has:function(r){return e?oyt(e,r):!1},set:function(r,i){e||(e=new kX),ayt(e,r,i)}};return n},cyt=lH,hN=mge,dyt=cN,IO=vge,fyt=_T,bS=cyt("%WeakMap%",!0),hyt=hN("WeakMap.prototype.get",!0),pyt=hN("WeakMap.prototype.set",!0),gyt=hN("WeakMap.prototype.has",!0),myt=hN("WeakMap.prototype.delete",!0),vyt=bS?function(){var e,n,r={assert:function(i){if(!r.has(i))throw new fyt("Side channel does not contain "+dyt(i))},delete:function(i){if(bS&&i&&(typeof i=="object"||typeof i=="function")){if(e)return myt(e,i)}else if(IO&&n)return n.delete(i);return!1},get:function(i){return bS&&i&&(typeof i=="object"||typeof i=="function")&&e?hyt(e,i):n&&n.get(i)},has:function(i){return bS&&i&&(typeof i=="object"||typeof i=="function")&&e?gyt(e,i):!!n&&n.has(i)},set:function(i,s){bS&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new bS),pyt(e,i,s)):IO&&(n||(n=IO()),n.set(i,s))}};return r}:IO,yyt=_T,byt=cN,Syt=Nmt,Eyt=vge,Tyt=vyt,Ayt=Tyt||Eyt||Syt,yge=function(){var e,n={assert:function(r){if(!n.has(r))throw new yyt("Side channel does not contain "+byt(r))},delete:function(r){return!!e&&e.delete(r)},get:function(r){return e&&e.get(r)},has:function(r){return!!e&&e.has(r)},set:function(r,i){e||(e=Ayt()),e.set(r,i)}};return n},wyt=String.prototype.replace,_yt=/%20/g,WF={RFC1738:"RFC1738",RFC3986:"RFC3986"},uH={default:WF.RFC3986,formatters:{RFC1738:function(t){return wyt.call(t,_yt,"+")},RFC3986:function(t){return String(t)}},RFC1738:WF.RFC1738,RFC3986:WF.RFC3986},Cyt=uH,xyt=yge,qF=Object.prototype.hasOwnProperty,Yy=Array.isArray,pN=xyt(),bge=function(e,n){return pN.set(e,n),e},vD=function(e){return pN.has(e)},B4=function(e){return pN.get(e)},Sge=function(e,n){pN.set(e,n)},sh=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Iyt=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(Yy(r)){for(var i=[],s=0;s<r.length;++s)typeof r[s]<"u"&&i.push(r[s]);n.obj[n.prop]=i}}},cH=function(e,n){for(var r=n&&n.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},Oyt=function t(e,n,r){if(!n)return e;if(typeof n!="object"&&typeof n!="function"){if(Yy(e))e.push(n);else if(e&&typeof e=="object")if(vD(e)){var i=B4(e)+1;e[i]=n,Sge(e,i)}else(r&&(r.plainObjects||r.allowPrototypes)||!qF.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object"){if(vD(n)){for(var s=Object.keys(n),a=r&&r.plainObjects?{__proto__:null,0:e}:{0:e},o=0;o<s.length;o++){var l=parseInt(s[o],10);a[l+1]=n[s[o]]}return bge(a,B4(n)+1)}return[e].concat(n)}var u=e;return Yy(e)&&!Yy(n)&&(u=cH(e,r)),Yy(e)&&Yy(n)?(n.forEach(function(c,d){if(qF.call(e,d)){var f=e[d];f&&typeof f=="object"&&c&&typeof c=="object"?e[d]=t(f,c,r):e.push(c)}else e[d]=c}),e):Object.keys(n).reduce(function(c,d){var f=n[d];return qF.call(c,d)?c[d]=t(c[d],f,r):c[d]=f,c},u)},Pyt=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},Ryt=function(t,e,n){var r=t.replace(/\+/g," ");
vendor: 8,501 bytes, line 508
508if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},KF=1024,Lyt=function(e,n,r,i,s){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var o="",l=0;l<a.length;l+=KF){for(var u=a.length>=KF?a.slice(l,l+KF):a,c=[],d=0;d<u.length;++d){var f=u.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===Cyt.RFC1738&&(f===40||f===41)){c[c.length]=u.charAt(d);continue}if(f<128){c[c.length]=sh[f];continue}if(f<2048){c[c.length]=sh[192|f>>6]+sh[128|f&63];continue}if(f<55296||f>=57344){c[c.length]=sh[224|f>>12]+sh[128|f>>6&63]+sh[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|u.charCodeAt(d)&1023),c[c.length]=sh[240|f>>18]+sh[128|f>>12&63]+sh[128|f>>6&63]+sh[128|f&63]}o+=c.join("")}return o},Dyt=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.length;++i)for(var s=n[i],a=s.obj[s.prop],o=Object.keys(a),l=0;l<o.length;++l){var u=o[l],c=a[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:a,prop:u}),r.push(c))}return Iyt(n),e},kyt=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Nyt=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Myt=function(e,n,r,i){if(vD(e)){var s=B4(e)+1;return e[s]=n,Sge(e,s),e}var a=[].concat(e,n);return a.length>r?bge(cH(a,{plainObjects:i}),a.length-1):a},Fyt=function(e,n){if(Yy(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(n(e[i]));return r}return n(e)},Ege={arrayToObject:cH,assign:Pyt,combine:Myt,compact:Dyt,decode:Ryt,encode:Lyt,isBuffer:Nyt,isOverflow:vD,isRegExp:kyt,maybeMap:Fyt,merge:Oyt},Tge=yge,UP=Ege,Jw=uH,$yt=Object.prototype.hasOwnProperty,Age={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},Ah=Array.isArray,Byt=Array.prototype.push,wge=function(t,e){Byt.apply(t,Ah(e)?e:[e])},Uyt=Date.prototype.toISOString,NX=Jw.default,so={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:UP.encode,encodeValuesOnly:!1,filter:void 0,format:NX,formatter:Jw.formatters[NX],indices:!1,serializeDate:function(e){return Uyt.call(e)},skipNulls:!1,strictNullHandling:!1},Vyt=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},YF={},Hyt=function t(e,n,r,i,s,a,o,l,u,c,d,f,h,g,v,b,S,A){for(var w=e,x=A,P=0,N=!1;(x=x.get(YF))!==void 0&&!N;){var k=x.get(e);if(P+=1,typeof k<"u"){if(k===P)throw new RangeError("Cyclic object value");N=!0}typeof x.get(YF)>"u"&&(P=0)}if(typeof c=="function"?w=c(n,w):w instanceof Date?w=h(w):r==="comma"&&Ah(w)&&(w=UP.maybeMap(w,function(ae){return ae instanceof Date?h(ae):ae})),w===null){if(a)return u&&!b?u(n,so.encoder,S,"key",g):n;w=""}if(Vyt(w)||UP.isBuffer(w)){if(u){var U=b?n:u(n,so.encoder,S,"key",g);return[v(U)+"="+v(u(w,so.encoder,S,"value",g))]}return[v(n)+"="+v(String(w))]}var H=[];if(typeof w>"u")return H;var B;if(r==="comma"&&Ah(w))b&&u&&(w=UP.maybeMap(w,u)),B=[{value:w.length>0?w.join(",")||null:void 0}];else if(Ah(c))B=c;else{var q=Object.keys(w);B=d?q.sort(d):q}var Z=l?String(n).replace(/\./g,"%2E"):String(n),C=i&&Ah(w)&&w.length===1?Z+"[]":Z;if(s&&Ah(w)&&w.length===0)return C+"[]";for(var L=0;L<B.length;++L){var V=B[L],j=typeof V=="object"&&V&&typeof V.value<"u"?V.value:w[V];if(!(o&&j===null)){var X=f&&l?String(V).replace(/\./g,"%2E"):String(V),G=Ah(w)?typeof r=="function"?r(C,X):C:C+(f?"."+X:"["+X+"]");A.set(e,P);var ie=Tge();ie.set(YF,A),wge(H,t(j,G,r,i,s,a,o,l,r==="comma"&&b&&Ah(w)?null:u,c,d,f,h,g,v,b,S,ie))}}return H},jyt=function(e){if(!e)return so;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||so.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Jw.default;if(typeof e.format<"u"){if(!$yt.call(Jw.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var i=Jw.formatters[r],s=so.filter;(typeof e.filter=="function"||Ah(e.filter))&&(s=e.filter);var a;if(e.arrayFormat in Age?a=e.arrayFormat:"indices"in e?a=e.indices?"indices":"repeat":a=so.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var o=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:so.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:so.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:so.allowEmptyArrays,arrayFormat:a,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:so.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?so.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:so.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:so.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:so.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:so.encodeValuesOnly,filter:s,format:r,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:so.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:so.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:so.strictNullHandling}},zyt=function(t,e){var n=t,r=jyt(e),i,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Ah(r.filter)&&(s=r.filter,i=s);var a=[];if(typeof n!="object"||n===null)return"";var o=Age[r.arrayFormat],l=o==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var u=Tge(),c=0;c<i.length;++c){var d=i[c],f=n[d];r.skipNulls&&f===null||wge(a,Hyt(f,d,o,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var h=a.join(r.delimiter),g=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),h.length>0?g+h:""},Iv=Ege,VP=Object.prototype.hasOwnProperty,MX=Array.isArray,ya={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Iv.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},Gyt=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},_ge=function(t,e,n){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&n>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},Wyt="utf8=%26%2310003%3B",qyt="utf8=%E2%9C%93",Kyt=function(e,n){var r={__proto__:null},i=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,a=i.split(n.delimiter,n.throwOnLimitExceeded?s+1:s);if(n.throwOnLimitExceeded&&a.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var o=-1,l,u=n.charset;if(n.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===qyt?u="utf-8":a[l]===Wyt&&(u="iso-8859-1"),o=l,l=a.length);for(l=0;l<a.length;++l)if(l!==o){var c=a[l],d=c.indexOf("]="),f=d===-1?c.indexOf("="):d+1,h,g;if(f===-1?(h=n.decoder(c,ya.decoder,u,"key"),g=n.strictNullHandling?null:""):(h=n.decoder(c.slice(0,f),ya.decoder,u,"key"),h!==null&&(g=Iv.maybeMap(_ge
508(c.slice(f+1),n,MX(r[h])?r[h].length:0),function(b){return n.decoder(b,ya.decoder,u,"value")}))),g&&n.interpretNumericEntities&&u==="iso-8859-1"&&(g=Gyt(String(g))),c.indexOf("[]=")>-1&&(g=MX(g)?[g]:g),h!==null){var v=VP.call(r,h);v&&n.duplicates==="combine"?r[h]=Iv.combine(r[h],g,n.arrayLimit,n.plainObjects):(!v||n.duplicates==="last")&&(r[h]=g)}}return r},Yyt=function(t,e,n,r){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var a=r?e:_ge(e,n,i),o=t.length-1;o>=0;--o){var l,u=t[o];if(u==="[]"&&n.parseArrays)Iv.isOverflow(a)?l=a:l=n.allowEmptyArrays&&(a===""||n.strictNullHandling&&a===null)?[]:Iv.combine([],a,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var c=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,d=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,f=parseInt(d,10);!n.parseArrays&&d===""?l={0:a}:!isNaN(f)&&u!==d&&String(f)===d&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(l=[],l[f]=a):d!=="__proto__"&&(l[d]=a)}a=l}return a},Zyt=function(e,n){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(n.depth<=0)return!n.plainObjects&&VP.call(Object.prototype,r)&&!n.allowPrototypes?void 0:[r];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,a=i.exec(r),o=a?r.slice(0,a.index):r,l=[];if(o){if(!n.plainObjects&&VP.call(Object.prototype,o)&&!n.allowPrototypes)return;l.push(o)}for(var u=0;(a=s.exec(r))!==null&&u<n.depth;){u+=1;var c=a[1].slice(1,-1);if(!n.plainObjects&&VP.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(a[1])}if(a){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");l.push("["+r.slice(a.index)+"]")}return l},Qyt=function(e,n,r,i){if(e){var s=Zyt(e,r);if(s)return Yyt(s,n,r,i)}},Xyt=function(e){if(!e)return ya;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var n=typeof e.charset>"u"?ya.charset:e.charset,r=typeof e.duplicates>"u"?ya.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:ya.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:ya.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ya.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ya.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ya.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ya.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ya.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:ya.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:ya.decoder,delimiter:typeof e.delimiter=="string"||Iv.isRegExp(e.delimiter)?e.delimiter:ya.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ya.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ya.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ya.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ya.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:ya.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ya.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},Jyt=function(t,e){var n=Xyt(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?{__proto__:null}:{};for(var r=typeof t=="string"?Kyt(t,n):t,i=n.plainObjects?{__proto__:null}:{},s=Object.keys(r),a=0;a<s.length;++a){var o=s[a],l=Qyt(o,r[o],n,typeof t=="string");i=Iv.merge(i,l,n)}return n.allowSparse===!0?i:Iv.compact(i)},e0t=zyt,t0t=Jyt,n0t=uH,r0t={formats:n0t,parse:t0t,stringify:e0t};
508const i0t=pi(r0t),s0t={auto:"webp"},a0t=new Set(["images.radio.com","images.audacy2-stg.int.audacy.com","images.audacy2-prod.ext.audacy.com","stg-images.radio.com","radioimg.audacy.com","radioimg-nonprod.audacy.com"]);var U4=(t=>(t[t.Thumb=0]="Thumb",t[t.Full=1]="Full",t))(U4||{});const FX=(t,e,n)=>{if(t.startsWith("data:image/"))return t;const i=new The(t,!0);if(a0t.has(i==null?void 0:i.host))return i.set("protocol","https"),i.toString(o=>(o.height&&delete o.height,i0t.stringify({...s0t,...o,width:e})));if(n===0)return;const a=`?auto=webp&width=${e}`;return t+a},o0t=(t,e)=>{const n=FX(t,e||100,U4.Full),r=FX(t,2*e||200,U4.Full);return`${n} 1x, ${r} 2x`},l0t=({children:t,sizes:e=[],src:n})=>e.length?be("picture",{children:[e==null?void 0:e.map(({maxWidth:r,size:i},s)=>{const a=`${n}-${i}-${s}`,o=o0t(n,i);return r?I("source",{srcSet:o,media:`(max-width: ${r}px)`},a):I("source",{srcSet:o},a)}),t]}):I(Dn,{children:t}),u0t={Lazy:"lazy"},$X={img:{...Bt.transition("opacity"),opacity:"0"},loaded:{opacity:"1"}},V4=({alt:t,src:e,imgCss:n,loading:r=u0t.Lazy,onError:i,onLoad:s,sizes:a,isLoading:o})=>{const[l,u]=$.useState(!1),c=()=>{u(!0),s==null||s()};return I(l0t,{sizes:a,src:e,children:I("img",{alt:t,css:[$X.img,l&&!o&&$X.loaded,n],loading:r,onLoad:c,onError:i,src:e})})},SS={container:{overflow:"hidden",backgroundColor:_e.white30,width:"100%",...Bt.transition("background")},circle:{borderRadius:"50%"},gridImage:{borderRadius:0},image:{objectFit:"cover",width:"100%",height:"100%"},loaded:{background:"transparent"},withRadius:{borderRadius:"4px"}},zf=({alt:t,aspectRatio:e=1,entityImageShape:n=Ad.Square,entityImageCss:r,hasRadius:i=!0,imageURIBase:s,sizes:a,isLoading:o,fallbackImage:l})=>{const[u,c]=$.useState(!1),d=n===Ad.Circular,f=u?l||aX:s||l||aX,h=n===Ad.GridImage,[g,v]=$.useState(!1),b=()=>{v(!0)},S=()=>{c(!0)};return Array.isArray(f)?I(Qgt,{imageURICollection:f,sizes:a,alt:t}):I("div",{css:[SS.container,i&&SS.withRadius,d&&[SS.circle,Bt.aspectRatio(1)],e&&!d&&Bt.aspectRatio(e),h&&SS.gridImage,g&&!o&&SS.loaded,r],children:I(V4,{alt:t||"",imgCss:SS.image,onError:S,onLoad:b,sizes:a,src:f,isLoading:o})})},dm={wrapper:{color:_e.audacyDarkNavy,display:"flex",alignItems:"center",marginBottom:15,gap:15,paddingBottom:30,position:"relative"},seperator:{content:'""',display:"block",height:1,width:"calc(100% + 60px)",backgroundColor:_e.greyEB,position:"absolute",left:-30,bottom:0,[Be(ve.Medium)]:{left:-42,width:"calc(100% + 84px)"}},entityImage:{flexShrink:0,height:32,width:32},textContainer:{display:"flex",flexDirection:"column"},title:{...Bt.truncateText(2),color:_e.audacyDarkNavy,fontSize:15},subtitle:{...Bt.truncateText(2),color:_e.audacyDarkNavy,fontSize:12},closeButton:{...Bt.focusOutline({outlineOffset:0,outline:`${jf.focusDark}`}),color:_e.greyA6,marginLeft:"auto",...Dr({color:_e.greyC5}),span:{margin:"0 auto"}},closeIcon:{height:28,width:28}},Cge=({id:t,image:e,onClose:n,headerContainerStyle:r,title:i,titleStyle:s,subtitle:a,subtitleStyle:o,seperator:l})=>{const{t:u}=dn();return be("div",{css:[dm.wrapper,r],children:[e&&I(zf,{imageURIBase:e.imageURIBase,entityImageCss:dm.entityImage}),be("div",{css:dm.textContainer,children:[I("h1",{css:[dm.title,s],children:i}),I("h2",{css:[dm.subtitle,o],children:a})]}),l??I("div",{css:dm.seperator}),I(Mc,{ariaControls:t,buttonCss:dm.closeButton,icon:en.CloseCircle,ariaLabel:u("drawer.close"),iconSizeInPx:28,onClick:n,css:dm.closeIcon})]})},c0t=`${cu.menuTooltip}s ${AV.default}`,BX=`opacity ${c0t}`,d0t=`visibility ${cu.none}s ${AV.default} ${cu.menuTooltip}s`,f0t=(t,e)=>{const n=e+10;switch(t){case I0.BottomLeft:return{right:0,top:n};case I0.TopLeft:return{right:0,bottom:n};case I0.TopRight:return{left:0,bottom:n};default:return{left:0,top:n}}},ZF={menuContainer:{backgroundColor:_e.white,borderRadius:4,boxShadow:"0px -1px 0px rgba(0, 0, 0, 0.08)",color:_e.audacyDarkNavy,minWidth:185,padding:"10px 0",position:"absolute",display:"flex",flexDirection:"column",zIndex:Ai.optionsMenu},menuOpen:{opacity:1,transition:BX,visibility:"visible",zIndex:Ai.overlay},menuClosed:{opacity:0,transition:`${BX}, ${d0t}`,visibility:"hidden"}};var I0=(t=>(t.BottomLeft="BottomLeft",t.BottomRight="BottomRight",t.TopLeft="TopLeft",t.TopRight="TopRight",t))(I0||{});const h0t=({buttonSizeInPx:t=24,children:e,containerCss:n,id:r,isOpen:i,menuPosition:s="BottomRight"},a)=>I("div",{css:[ZF.menuContainer,f0t(s,t),i?ZF.menuOpen:ZF.menuClosed,n],id:r,ref:a,role:"menu",children:e}),p0t=$.forwardRef(h0t);function g0t(){if(typeof window>"u"||typeof navigator>"u"||/Windows NT|Macintosh|Linux x86|Linux i686|Linux x86_64/i.test(navigator.userAgent)&&!/iPad|Android/i.test(navigator.userAgent)||!!(navigator.userAgent.includes("Macintosh")&&"ontouchend"in document||/iPad/.test(navigator.userAgent)))return!1;const n=/Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),r="telep
508hone"in navigator;let i=!1;try{const c=document.createElement("a");c.href="tel:+123456789",c.style.display="none",document.body.appendChild(c),i=typeof c.protocol<"u"&&c.protocol.indexOf("tel")!==-1,document.body.removeChild(c)}catch(c){console.warn("Couldn't test tel: protocol:",c)}const s=/Android/i.test(navigator.userAgent),a=/Mobile/i.test(navigator.userAgent);if(s&&!a&&!i)return!1;const l=window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches;return!("ontouchstart"in window)&&!n&&!/iPad|Android/i.test(navigator.userAgent)?!1:n||r||i||l&&n}const QF="9rem",UX="5.8rem",vg={contactSheetContainer:{alignItems:"flex-start",borderRadius:"10rem",display:"flex",flexDirection:"column",justifyContent:"space-evenly",paddingLeft:"1.5rem",paddingRight:"1.5rem",top:"80px",minWidth:280,[eu(ve.Large)]:{width:"100%",paddingLeft:"0"},[eu(ve.Medium)]:{width:"100%",paddingLeft:"0",paddingRight:"0"}},socialMediaLinksContainer:{alignItems:"center",display:"flex",flexDirection:"row",height:UX,justifyContent:"space-between",width:"75%",[eu(ve.Large)]:{height:QF,width:"25%"},[eu(ve.Medium)]:{justifyContent:"space-around",width:"100%"}},socialMediaLinkClickableIcon:{cursor:"pointer",transition:"transform 0.2s ease-in-out","&:hover":{transform:"scale(1.25)"},"&:active":{transform:"scale(2)"}},utterancePhraseContainer:{alignItems:"flex-start",display:"flex",flexDirection:"column",height:QF,justifyContent:"center",[eu(ve.Medium)]:{width:"100%"}},utterancePhraseText:{color:"black",height:"3rem",whiteSpace:"nowrap"},phoneNumberContainer:{alignItems:"center",color:"black",display:"flex",flexDirection:"row",gap:"1rem",height:UX,[eu(ve.Large)]:{gap:"1.25rem",height:QF},[eu(ve.Medium)]:{width:"100%"}},phoneNumberText:{whiteSpace:"nowrap",display:"flex",gap:"12px"},divider:{height:1,width:"100%",backgroundColor:_e.greyEB}},m0t=({phoneNumber:t})=>{const{t:e}=dn(),n=g0t();let r=t;t.startsWith("+")||(r=`+${t}`);const i=be("div",{css:vg.phoneNumberContainer,children:[I(Yr,{iconColor:"black",name:en.Call}),be("div",{css:vg.phoneNumberText,children:[be("span",{children:[e("entity.entityLabel.station.callUs"),":"]}),I("span",{children:t})]})]});return n?I("a",{href:`tel:${r}`,children:i}):i};var gw=(t=>(t.FACEBOOK="facebook",t.TWITTER="twitter",t.INSTAGRAM="instagram",t.YOUTUBE="youtube",t))(gw||{});function v0t(t){switch(t){case gw.FACEBOOK:return en.Facebook;case gw.INSTAGRAM:return en.Instagram;case gw.TWITTER:return en.XLogo;case gw.YOUTUBE:return en.YouTube;default:return null}}function y0t(t,e){return I("a",{href:t,target:"_blank",rel:"noopener noreferrer",css:vg.socialMediaLinkClickableIcon,children:I(Yr,{iconColor:"black",sizeInPx:26,name:e})})}const b0t=({socialMediaLinks:t})=>{const e=[];for(const n of t){const r=v0t(n.platform);r&&e.push(y0t(n.url,r))}return I("div",{css:vg.socialMediaLinksContainer,children:e})},S0t=({utterancePhrase:t})=>{const{t:e}=dn();return be("div",{css:vg.utterancePhraseContainer,children:[I("div",{css:vg.utterancePhraseText,children:e("global.askSpeakerToPlay")}),I("div",{css:vg.utterancePhraseText,children:be("b",{children:[t," ",e("global.onAudacy")]})})]})},E0t=()=>I("div",{css:vg.divider}),T0t=t=>t.flatMap((e,n,r)=>n<r.length-1?[e,I(E0t,{},`${e.key} Divider`)]:[e]),A0t=({contactInformation:t})=>{const e=[];Array.isArray(t.socialMediaLinks)&&t.socialMediaLinks.length>0&&e.push(I(b0t,{socialMediaLinks:t.socialMediaLinks})),t.utterancePhrase&&e.push(I(S0t,{utterancePhrase:t.utterancePhrase})),t.phoneNumber&&e.push(I(m0t,{phoneNumber:t.phoneNumber}));const n=T0t(e);return I("div",{css:vg.contactSheetContainer,children:n})},xge=$.createContext({}),Dl=()=>$.useContext(xge),Ige=xge.Provider,Oge=t=>Hce(t)?C2(t):Cv(t),w0t=t=>{const{clientServices:e}=Fa(),n=t==null?void 0:t(),r=$.useCallback(s=>{n&&(e==null||e.getAnalyticServices().sendQueueAddRemove(n,s,!0))},[e,n]),i=$.useCallback(s=>{n&&s.forEach(a=>e==null?void 0:e.getAnalyticServices().sendQueueAddRemove(n,a,!1))},[e,n]);return{onAdd:r,onRemove:i}},_0t=t=>{const{clientServices:e}=Fa(),[n,r]=Fo(ipe),i=Qs(VV),s=Qs(iN),[{currentId:a,items:o},l]=Fo(sN),u=w0t(t),c=$.useCallback(()=>{Date.now()-n>B7.limit60s&&(s(!0),e.getPersonalizationServices().getQueue().then(b=>{var S;r(Date.now()),l({currentId:b.currentId??"",items:((S=b.items)==null?void 0:S.map(A=>Oge(A)))||[]}),i(!!b.itemsRemoved)}).finally(()=>{s(!1)}))},[e,n,i,s,r,l]),d=$.useCallback(v=>o.some(b=>b.id===v),[o]),f=$.useCallback(async v=>{l(v);const b=o.reduce((S,A)=>(!v.items.some(x=>x.id===A.id)&&S.push(A.id),S),[]);b.length&&u.onRemove(b),await e.getPersonalizationServices().setQueue({currentId:v.currentId,items:v.items.map(S=>S.getDataObject())})},[e,o,u,l]),h=$.useCallback(async(v,b={})=>{const{onError:S,onSuccess:A}=b;u.onRemove(v),e.getPersonalizationServices().removeFromQueue(v).then(()=>{A==null||A(async()=>{await f({currentId:a,items:o})})}).catch(()=>{S==null||S(()=>h(v))})},[e,a,o,u,f]),g=$.useCallback(async(v,b={})=>{const{onSuccess:S,onError:A}=b;u.onAdd(v),e.getPersonalizationServices().addToQueue(v).then(()=>{S==null||S(async()=>{await h([v])})}).catch(()=>{A==null||A(()=>g(v))})},[e,u,h]);return{add:g,contains:d,remove:h,request:c,set:f}},Pge=(t,e)=>{const n=$.useRef(e);return $.useEffect(()=>{n.current=t},[t]),n.current};let VX=!1;const gN=()=>{const t=Ht(iN),{showToast:e}=gu(),{t:n}=dn(),r=Ht(sN),{add:i,remove:s,...a}=_0t(TT()),[o,l]=$.useState(r),{currentId:u,items:c}=o,[d,f]=$.useState([]),h=$.useRef(),g=Pge(r.items,o.items);$.useMemo(()=>
508{if(!VX)try{a.request()}catch(A){console.error(A)}finally{VX=!0}},[a.request]),$.useEffect(()=>{l(r)},[r]);const v=A=>{f([]),h.current=[],e({cta:{action:()=>{A()},title:n("queueActions.removeFromQueue.toast.cta.title")},title:n("queueActions.removeFromQueue.toast.title")})},b=()=>{l({...o,items:g}),f(h.current||[]),e({title:n("queueActions.removeFromQueue.error.title")}),h.current=[]},S=A=>{e({cta:{action:()=>{A()},title:n("queueActions.addToQueue.toast.cta.title")},title:n("queueActions.addToQueue.toast.title")})};return{...a,add:A=>i(A,{onSuccess:S}),remove:A=>{f([]),l({...o,items:c.filter(w=>!A.find(x=>w.id===x))}),h.current=A,s(A,{onSuccess:v,onError:b})},isLoading:t,items:c,currentId:u,selectedItems:d}},dH=({isLive:t=!1,isPlayable:e=!1,isPlayerQueue:n=!1,item:r,parentId:i,playContext:s,collectionId:a,playOrPause:o,onPlayLiveItem:l})=>{var U;const u=Yu(),{clientServices:c}=Fa(),d=Ht(ws),f=(U=d==null?void 0:d.dataObject)==null?void 0:U.id,h=Ht(mo),g=Ht(V2({contentId:r==null?void 0:r.id})),v=g&&h.playState===Hi.Loading,{playbackResumePointStartOffset:b,fixedPlaybackResumePointSeconds:S}=ede(r),{contains:A}=gN(),w=Oa(H=>H.duration)||0,x={resumePoint:S,isPlayed:xg(r==null?void 0:r.duration,S),isPlaying:g,href:r==null?void 0:r.url,isScrubbing:v,nowPlayingDuration:w};if(!r||!(r!=null&&r.entitySubtype))return x;const P=e&&!l?()=>{o==null||o(s,{startOffset:b})}:void 0,N=e&&!l?()=>{if(r.id)return g?u.pause(s):f===r.id?u.resume(s):u.playQueue(r.id,s)}:void 0,k=e&&!l?()=>{if(r.id)return g?u.pause(s):f===r.id?u.resume(s):a?(c.getPersonalizationServices().dataStore.setDataSync(tr.COLLECTION_ID,a),u.playPlaylist({collectionId:a,itemId:r.id,playContext:s})):(c.getPersonalizationServices().dataStore.setDataSync(tr.COLLECTION_ID,a),u.playPlaylist({collectionId:r.id,playContext:s}))}:void 0;if(n)return{...x,href:void 0,onClick:N};if(A(r.id))return{...x,onClick:N,onPlayStateClick:N};switch(r==null?void 0:r.entitySubtype){case iT.PLAYLIST:return{...x,isPlayList:!0,onClick:k,onPlayStateClick:()=>o==null?void 0:o(s)};case Vn.BROADCAST_SHOW_EPISODE:case sT.BROADCAST_EPISODE_CHAPTER:case ui.BROADCAST:if(e||t){const H=r!=null&&r.startDateTime&&(r!=null&&r.duration)?{playingUntil:j7(r.startDateTime,r.duration)}:void 0;return{...x,liveUntil:H,onPlayStateClick:()=>{if(r.id)return g?u.pause(s):t?(u.pause(s),u.seekToLivePosition(),l==null?void 0:l()):f&&(f===r.id||f===i)?u.resume(s):s.feature===Ei.PLAYLIST?P==null?void 0:P():l?l():u.playFromId(r.id,s,{startOffset:b})}}}return{href:x.href};case Vn.PODCAST_EPISODE:case Vn.HOST_CREATED_EPISODE:return{...x,onPlayStateClick:P};case Fr.BROADCAST:return{...x,isLive:!0,onPlayStateClick:()=>{if(r!=null&&r.id){if(g)return u.stop(s);u.pause(s),u.playFromId(r==null?void 0:r.id,s)}}};case Fr.EXCLUSIVE:return{...x,isExclusiveStation:!0,onPlayStateClick:()=>{if(r.id)return g?u.pause(s):f===r.id?u.resume(s):(u.pause(s),u.playFromId(r.id,s))}};case Ol.GENRE:case Ol.LEAGUE:case Ol.TEAM:case ui.PODCAST:return{href:x.href};default:return x}},C0t=t=>Object.values(Ei).filter(e=>e.includes("PLAYLIST")).includes(t),mN=(t,e)=>{const n=Yu(),{clientServices:r}=Fa();return Cc(({snapshot:i})=>async(s,a)=>{var c;if(!t)return;const o=C0t(s.feature),[l,u]=await Promise.all([i.getPromise(V2({contentId:t})),i.getPromise(SV(t))]);l?n.pause(s):u&&!(a!=null&&a.playLive)?n.resume(s):s.feature===Ei.QUEUE?n.playQueue(t,s):o?(r.getPersonalizationServices().dataStore.setDataSync(tr.COLLECTION_ID,e??t),s.playlistId=e,s.contentId=t,n.playPlaylist({collectionId:e??t,itemId:t,playContext:s})):(c=a==null?void 0:a.episode)!=null&&c.isLive?n.playEpisodeLive(a.episode,s):a!=null&&a.episode?n.play(a.episode.getDataObject(),s):(n.pause(s),n.playFromId(t,s,a))},[n,e,t])},Rge={background:_e.white60,borderRadius:3,height:2,minWidth:2},vN={...cn.metadataSmall,alignItems:"center",color:_e.white60,display:"inline-flex",gap:10,width:"100%"},fH={color:"white",...cn.buttonSmall},x0t={bullet:Rge,container:vN,text:fH},XF={bullet:Rge,container:{...vN,gap:7,overflow:"hidden",whiteSpace:"nowrap"},text:{whiteSpace:"nowrap"}},U1=({bulletedCss:t,title:e=[]})=>I("div",{css:[XF.container,t],children:e.map((n,r)=>be($.Fragment,{children:[I("span",{css:XF.text,children:n}),r!==e.length-1&&I("div",{css:XF.bullet})]},n))}),Xi={...x0t,gapContainer:{...vN,gap:5,marginTop:5,[Be(ve.Medium)]:{marginTop:6},[Be(ve.Large)]:{marginTop:10},separatorDot:{borderRadius:4,height:2,marginBottom:0,marginHorizontal:6,width:2}}},I0t=t=>{const e=t.hours?Qp("durationSummary.accessibility.hour",{count:t.hours}):"",n=t.minutes?Qp("durationSummary.accessibility.minute",{count:t.minutes}):"";return`${e} ${n}`.trim()},O0t=(t,e)=>{var i,s,a,o;const n=I0t(t.duration),r=((i=t==null?void 0:t.duration)==null?void 0:i.hours)!==void 0&&((s=t==null?void 0:t.duration)==null?void 0:s.hours)<1&&((a=t==null?void 0:t.duration)==null?void 0:a.minutes)!==void 0&&((o=t==null?void 0:t.duration)==null?void 0:o.minutes)<1;return{accessibilityLabel:Qp("durationSummary.accessibility.progress",{time:r?Qp("durationSummary.accessibility.underMin"):n}),text:e?Qp("durationSummary.playing",{time:r?Qp("durationSummary.underMin"):`${t==null?void 0:t.label}`}):Qp("durationSummary.duration",{time:r?Qp("durationSummary.underMin"):`${t==null?void 0:t.label}`})}},P0t=({duration:t,_isChapter:e,isExclusiveStation:n,_isEpisode:r,isPlayable:i,isPlayed:s,isPlaying:a,isPlayList:o,isScheduleItem:l,isScrubbing:u,itemsCount:c,resumePoint:d=0})=>{const{t:f}=dn(),h=Ht(Art),g=a||u;if(n)return be("div",{css:Xi.gapContainer,children:[I(Yr,{iconColor:_e.white15,name:a?en.PauseCircle:en.PlayMini,iconCss:Xi.icon}),I("p",{css:Xi.text,children:f(a?"durationSummary.playingLive":"durationSummary.unplayed")})]});if(o){const S=c!==void 0,{hours:A,minutes:w}=Yce(t??0);return I("div",{css:Xi.container,children:I("div",{css:Xi.gapContainer,children:a?be(Dn,{children:[I(Yr,{iconColor:_e.white15,name:en.PauseCircle,iconCss:Xi.icon}),I("p",{css:Xi.text,children:f("durationSummary.playListPlaying")})]}):be(Dn,{children:[I(Yr,{iconColor:_e.white15,name:en.PlayMini,iconCss:Xi.icon}),S&&I("p",{css:Xi.text,children:f("durationSummary.playListItems",{items:c})}),!!t&&I("p",{css:Xi.text,children:f("durationSummary.playlistDuration",{hours:A,minutes:w})})]})})})}if(!t||!i)return null;
508const v=H7(t-d),{text:b}=O0t(a&&h.label?h:v,g);return l&&!a?be("div",{css:Xi.gapContainer,children:[I(Yr,{iconColor:_e.white15,name:en.PlayMini,iconCss:Xi.icon}),I("p",{css:Xi.text,children:f("global.rewind")})]}):g?be("div",{css:Xi.gapContainer,children:[I(Yr,{iconColor:_e.white15,name:en.PauseCircle,iconCss:Xi.icon}),I("p",{css:Xi.text,children:!h.label||l?f("durationSummary.playingLive"):b})]}):s?I("div",{css:Xi.container,children:be("div",{css:Xi.gapContainer,children:[I(Yr,{iconColor:_e.white15,name:en.PlayMini,iconCss:Xi.icon}),I("p",{css:Xi.text,children:f("durationSummary.played")}),I(Yr,{name:en.Check,sizeInPx:10})]})}):a?I("div",{css:Xi.container,children:be("div",{css:Xi.gapContainer,children:[I(Yr,{iconColor:_e.white15,name:en.PlayMini,iconCss:Xi.icon}),I("p",{css:Xi.text,children:`${b} ${f("durationSummary.accessibility.left")}`})]})}):I("div",{css:Xi.container,children:be("div",{css:Xi.gapContainer,children:[I(Yr,{iconColor:_e.white15,name:en.PlayMini,iconCss:Xi.icon}),I("p",{css:Xi.text,children:b})]})})},Py={container:{...vN,gap:4,color:_e.audacyOrange,marginTop:5,[Be(ve.Medium)]:{marginTop:6},[Be(ve.Large)]:{marginTop:10}},text:{...fH,color:_e.audacyOrange},gapContainer:{alignItems:"center",display:"inline-flex",gap:5}},R0t=({ctaColor:t,liveUntil:e,isPlaying:n,resumePoint:r,isScheduleItem:i})=>{const{t:s}=dn(),a=e==null?void 0:e.playingUntil,{is:o}=Fs(),l=o.LG?24:20;return be("div",{css:[Py.container,t&&{color:t}],children:[n?be("div",{css:Py.gapContainer,children:[I(Yr,{name:en.PauseCircle,sizeInPx:l}),I("p",{css:Py.text,children:s("durationSummary.playingLive")})]}):be("div",{css:Py.gapContainer,children:[I(Yr,{name:en.PlayMini,sizeInPx:l}),r?I("span",{css:Py.text,children:s(i?"entity.entitySummary.live.listen":"entity.entitySummary.live.resume")}):I(Dn,{children:a?I("span",{css:Py.text,children:s("entity.entitySummary.live.playingUntil",{time:tJe(a)})}):I("span",{css:Py.text,children:s("entity.entitySummary.live.listen")})})]}),I(Yr,{name:en.LiveSM,sizeInPx:16})]})},yN=({ctaColor:t,duration:e,hasOverflowGradient:n,_isChapter:r,isExclusiveStation:i,_isEpisode:s,isLive:a,isPlayed:o,isPlaying:l,liveUntil:u,resumePoint:c,title:d,isScrubbing:f,isScheduleItem:h,isPlayable:g,isPlayList:v,itemsCount:b})=>{if(Array.isArray(d))return I(U1,{title:d,hasOverflowGradient:n});const S=(u==null?void 0:u.playingUntil)&&new Date(u==null?void 0:u.playingUntil).getTime()>Date.now();return a||S?I(R0t,{isPlaying:l,ctaColor:t,liveUntil:u,hasOverflowGradient:n,resumePoint:c,isScheduleItem:h}):I(P0t,{isPlayList:v,_isChapter:r,duration:e,isExclusiveStation:i,_isEpisode:s,isPlayed:o,isPlaying:l,hasOverflowGradient:n,resumePoint:c,isScrubbing:f,isScheduleItem:h,isPlayable:g,itemsCount:b})},JF={gridGapSm:10,gridGapMd:20},Ji={bottomActionsContainer:{display:"flex",justifyContent:"space-between",flex:1},bulletedContainer:{display:"grid",order:-1,...Bt.overflowGradient("to right")},cardContent:{display:"flex",flexDirection:"column",gap:2,flex:1},cardContentFixed:{flex:"0 0 45%"},container:{display:"flex",alignItems:"center",gap:JF.gridGapSm,flex:1,borderRadius:5,textAlign:"left",position:"relative",width:"100%",...Bt.transition("background-color"),[Be(ve.Medium)]:{gap:JF.gridGapMd}},containerFixed:{flex:"0 0 50%"},elementRight:{display:"flex",alignItems:"center",marginRight:0},elementRightContainer:{display:"flex",justifyContent:"flex-end",gap:JF.gridGapMd},singleActionElement:{alignItems:"flex-end"},multipleActionElements:{alignItems:"center"},imageContainer:{width:76,position:"relative",[Be(ve.Medium)]:{width:80},[Be(ve.Large)]:{width:88}},imageContainerFixed:{flex:"0 0 45%"},entityImage:{...Bt.transition("opacity")},imageOverlay:{position:"absolute",bottom:0,left:0,right:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:_e.audacyDarkNavy20,opacity:0},played:{opacity:.6},playIconContainer:{transform:"scale(0.75)",width:"55%",height:"55%",borderRadius:"50%",backgroundColor:_e.white30,display:"flex",alignItems:"center",justifyContent:"center",...Bt.transition(["transform"]),"@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{backdropFilter:"blur(8px)"}},linkOrButtonContainer:{textAlign:"left","&::after":{content:'""',position:"absolute",left:0,top:0,bottom:0,right:0,...Bt.transition(["background-color"])},...Bt.focusReset(),"&:focus::after":{outline:jf.focus,outlineOffset:-1},"&:focus:not(:focus-visible)::after":{outline:"none"},"&:focus-visible::after":{outline:jf.focus,outlineOffset:-1},...Dr({"&::after":{backgroundColor:_e.white07}})},playStateContainerNested:{zIndex:Ai.horizontalEntityCardPlayStateContainer,...Bt.focusOutline({outlineOffset:-1})},playStateButton:{display:"flex",...Bt.transition(["opacity"]),...Dr({opacity:.6})},subtitle:{...cn.metadataSmall,...Bt.truncateText(2)},title:{color:_e.white,...cn.metadataLarge,...Bt.truncateText(2),...Bt.transition("c
508olor")},titleContainer:{display:"flex",flexDirection:"column"},titleContainerFixed:{wordBreak:"break-word"}},dC=t=>Dce(t)?si.t("global.today"):Nce(t)?si.t("global.yesterday"):Xh(t,"MMM d, yyyy"),L0t=({publishDate:t,updateDate:e,subtitle:n,entityType:r})=>{let i=[];return t&&r!==gt.COLLECTION&&i.push(dC(t)),r===gt.COLLECTION&&e&&i.push(dC(e)),n&&(KR(n)?i=[...i,...n]:i.push(n)),i};function D0t(t){const e=new Date().getTime(),r=new Date(t).getTime()-e,i=Math.ceil(r/(1e3*60*60*24));return i===0?si.t("global.expiresToday"):i>0?si.t("global.expires",{days:i}):""}const Lge=({aspectRatio:t=1,containerCss:e,contentCss:n,ctaColor:r,duration:i,entityImageShape:s=Ad.Square,entityLeftColumn:a,entityLeftColumnCss:o,entityRightColumn:l,entityRightColumnCss:u,entityType:c,entitySubtype:d,eyebrow:f,href:h,imageAlt:g,imageContainerCss:v,imageURIBase:b,isEditMode:S,isEditModeSelected:A,isExclusiveStation:w,isFixed:x,isLive:P,isPlayable:N,isPlayed:k,isPlayerQueue:U,isPlaying:H,isPlayList:B,isReplayable:q,isRewindable:Z,isScheduleItem:C,isScrubbing:L,itemsIdList:V,liveUntil:j,optionsMenu:X,publishDate:G,resumePoint:ie,rightImageUrl:ae,sizes:ue=[{maxWidth:600,size:60},{maxWidth:1120,size:120},{size:180}],subtitle:Q,title:de,titleCss:le,updateDate:ye,onClick:fe,onHrefClick:We,onOptionsMenuClick:Le,onPlayStateClick:Ve,renderCheckbox:at})=>{const{t:Et}=dn(),ne=i||P||w||q||B,Ze=(l||X)&&be(Dn,{children:[Z&&!U&&!!l&&I("div",{css:[Ji.elementRight,u],children:l}),Z&&!U&&X?I("div",{css:[Ji.elementRight,u],children:I(pH,{ariaLabel:`${de} ${Et("horizontalEntityCard.entityImage.optionsCta.accessibilityLabel")}`,menuPosition:I0.BottomLeft,menuTitle:de,isQueueEnabled:cde(c,d),menuImage:b?{imageURIBase:b,alt:de,aspectRatio:t,entityImageShape:s}:void 0,onClickCallback:Le,optionsMenu:X})}):void 0]}),lt=I(yN,{ctaColor:r,_isChapter:c===gt.STANDALONE_CHAPTER,duration:i,isExclusiveStation:w,_isEpisode:c===gt.EPISODE,isLive:P,isPlayed:k,isPlaying:H,liveUntil:j,resumePoint:ie,isScrubbing:L,isScheduleItem:C,isPlayable:N,isPlayList:B,itemsCount:V==null?void 0:V.length}),ot=xd({children:lt,props:{as:Fi.Button,ariaLabel:Et(`horizontalEntityCard.ariaLabel.${ie?"resume":"play"}`,{title:de}),tabIndex:S?-1:0,onClick:ht=>{ht.preventDefault(),Ve==null||Ve()}},styles:Ji.playStateButton}),se=be("div",{css:[Ji.titleContainer,x&&Ji.titleContainerFixed,k&&!H&&Ji.played],children:[!!de&&I("span",{css:[Ji.title,le],className:"title",children:de}),I("div",{css:Ji.bulletedContainer,children:I(U1,{title:L0t({publishDate:G,updateDate:ye,subtitle:f,entityType:c}),hasOverflowGradient:!0})})]}),Fe=xd({children:se,props:{ariaLabel:h?Et("horizontalEntityCard.ariaLabel.link",{title:de}):de,ariaPressed:A,as:h?Fi.Anchor:Fi.Button,href:h,onClick:fe||We},styles:Ji.linkOrButtonContainer});return be("div",{css:[Ji.container,x&&Ji.containerFixed,e],children:[at==null?void 0:at(),a?I("div",{css:[Ji.leftColumn,o],children:a}):be("div",{css:[Ji.imageContainer,x&&Ji.imageContainerFixed,v,k&&!H&&Ji.played],children:[I(zf,{alt:g,aspectRatio:t,entityImageCss:Ji.entityImage,entityImageShape:s,imageURIBase:b,sizes:ue}),N&&I("div",{css:Ji.imageOverlay,className:"imageOverlay",children:I("div",{css:Ji.playIconContainer,className:"playIconContainer",children:I(Yr,{name:en.Play,ariaHidden:!0,sizeInPx:18})})})]}),be("div",{css:[Ji.cardContent,x&&Ji.cardContentFixed,n],children:[h||fe?Fe:se,!!Q&&Q,be("div",{css:Ji.bottomActionsContainer,children:[ne&&I("div",{css:[Ji.playStateContainerNested,k&&!H&&Ji.played],children:Ve?ot:lt}),!U&&ne&&!S?I("div",{css:[Ji.elementRightContainer,l?Ji.multipleActionElements:Ji.singleActionElement],children:Ze}):void 0]})]}),!!ae&&I("div",{css:[Ji.imageContainer,Ji.elementRight,u],children:I(zf,{alt:de||"",entityImageShape:s,imageURIBase:ae,aspectRatio:t,sizes:ue})}),!ne&&!S?Ze:void 0]})};var k0t=qle;function N0t(t){return k0t(t).toLowerCase()}var M0t=N0t;const Dge=pi(M0t),F0t=(t,e)=>{var s,a,o,l,u;const{t:n}=dn(),r=(c,d,f)=>f&&`${f}${d?VL.spaceSingle+Dge(n(`horizontalEntityCard.eyebrow.${c}`)):""}`;if(t.subType===k9.UNFINISHED_EPISODES&&t.replayableUntilDateTime)return D0t(t.replayableUntilDateTime);let i;switch(t==null?void 0:t.entitySubtype){case Ol.GENRE:i=n("horizontalEntityCard.eyebrow.topic");break;case Ol.LEAGUE:i=n("horizontalEntityCard.eyebrow.league");break;case sT.BROADCAST_EPISODE_CHAPTER:case Vn.BROADCAST_SHOW_EPISODE:case Vn.PODCAST_EPISODE:i=t.parentTitle;break;case ui.PODCAST:i=[r("podcast",e,(s=t.genres)==null?void 0:s[0]),t.author];break;case Fr.EXCLUSIVE:i=[r("station",e,(a=t.genres)==null?void 0:a[0]),t.parentTitle];break;case Fr.BROADCAST:i=[r("station",e,(o=t.genres)==null?void 0:o[0]),t.parentTitle,t.marketTitle];break;case ui.BROADCAST:i=[r("show",e,((l=t.genres)==null?void 0:l[0])||((u=t.parentGenres)==null?void 0:u[0])),t.parentTitle];break;case ui.PLAYLIST:i=t.author;break;default:i=[];break}return KR(i)?i.filter(c=>!!c):i},fC=({isPlayable:t,contentId:e="",entitySubtype:n,entityType:r,isEditMode:i,isEditModeSelected:s,isPlayerQueue:a,isRewindable:o=!0,startDateTime:l,duration:u,clickFeature:c=void 0,onPlayLiveItem:d,parentId:f,href:h,shouldShowEntityType:g=!0,playContext:v,renderEntityRightColumn:b,collectionId:S,...A})=>{const w=mN(e,S),{href:x,isExclusiveStation:P,isLive:N,isPlayed:k,isPlaying:U,liveUntil:H,onClick:B,onPlayStateClick:q,resumePoint:Z,isScrubbing:C,nowPlayingDuration:L,isPlayList:V}=dH({isLive:A.isLive,isPlayable:t,isPlayerQueue:a,item:{id:e,entityType:r,entitySubtype:n,startDateTime:l,duration:u,url:h},playContext:v,onPlayLiveItem:d,parentId:f,title:A.title,collectionId:S,playOrPause:w}),j=F0t({entitySubtype:n,...A},g),X=b?b(e):void 0;return I(Lge,{...A,isPlayList:V,clickFeature:c,href:x,isEditMode:i,isExclusiveStation:P,isLive:A.isLive||N,isPlayed:k,isPlaying:U,liveUntil:A.liveUntil||H,isEditModeSelected:s,onClick:A.onClick||B,onPlayStateClick:A.onPlayStateClick||q,resumePoint:Z,duration:U?L:u,entitySubtype:n,eyebrow:j,isScrubbing:C,entityType:r,isPlayable:t,entityRightColumn:X,isRewindable:o})},$0t=(t,e,n,r=!1)=>{e.forEach(i=>
508lr==null?void 0:lr.getAnalyticServices().sendFollow(t,i,r,n))},HX=async(t,e,n,r=!1)=>{const i=lr.getPersonalizationServices();await(n?i.addFollows(t):i.bulkUnfollow(t)),$0t(e,t,n,r)},B0t=(t,e)=>t.reduce((n,r)=>(n[e(r)]=r,n),{}),U0t=(t,e,n)=>{const r=Mi.isFunction(n)?n:()=>n;return t.reduce((i,s)=>(i[e(s)]=r(s),i),{})},V0t=(t,e)=>U0t(t,n=>n,e);function H0t(t,e,n,r){for(var i=t.length,s=n+(r?1:-1);r?s--:++s<i;)if(e(t[s],s,t))return s;return-1}var j0t=H0t;function z0t(t){return t!==t}var G0t=z0t;function W0t(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var q0t=W0t,K0t=j0t,Y0t=G0t,Z0t=q0t;function Q0t(t,e,n){return e===e?Z0t(t,e,n):K0t(t,Y0t,n)}var X0t=Q0t,J0t=Bhe;function ebt(t){var e=J0t(t),n=e%1;return e===e?n?e-n:e:0}var tbt=ebt,nbt=Q9;function rbt(t,e){return nbt(e,function(n){return t[n]})}var ibt=rbt,sbt=ibt,abt=l2;function obt(t){return t==null?[]:sbt(t,abt(t))}var lbt=obt,ubt=X0t,cbt=tx,dbt=wce,fbt=tbt,hbt=lbt,pbt=Math.max;function gbt(t,e,n,r){t=cbt(t)?t:hbt(t),n=n&&!r?fbt(n):0;var i=t.length;return n<0&&(n=pbt(i+n,0)),dbt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ubt(t,e,n)>-1}var mbt=gbt;const vbt=pi(mbt);function ybt(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var l=a[t?o:++i];if(n(s[l],l,s)===!1)break}return e}}var bbt=ybt,Sbt=bbt,Ebt=Sbt(),Tbt=Ebt,Abt=Tbt,wbt=l2;function _bt(t,e){return t&&Abt(t,e,wbt)}var Cbt=_bt,xbt=Qle,Ibt=Cbt,Obt=J9;function Pbt(t,e){var n={};return e=Obt(e),Ibt(t,function(r,i,s){xbt(n,i,e(r,i,s))}),n}var Rbt=Pbt;const Lbt=pi(Rbt);Yn({default:void 0,key:"LocalPreferences"});const kge=Yn({default:void 0,key:"Preferences"});Yn({default:"Idle",key:"AutoplayConnectorState"});const Dbt=()=>{const{clientServices:t}=Fa(),[e,n]=Fo(kge);return async({preferences:r,callbacks:i})=>{const{notifications:s,...a}=r,{notifications:o,...l}=e;n({...l,...a,notifications:{...o,...s}}),await t.getPersonalizationServices().setPreferences(r).then(()=>{var u;(u=i==null?void 0:i.onSuccess)==null||u.call(i)}).catch(()=>{var u;(u=i==null?void 0:i.onError)==null||u.call(i)})}},hs={stationIds:[],podcastIds:[]},jX=t=>{const{removeFromBrazeAttributeArray:e}=lr.getPersonalizationServices();e&&e("podcastNotifications",t)},zX=t=>{const{removeFromBrazeAttributeArray:e}=lr.getPersonalizationServices();e&&e("stationNotifications",t)},GX=t=>{const{addToBrazeAttributeArray:e}=lr.getPersonalizationServices();e&&e("podcastNotifications",t)},WX=t=>{const{addToBrazeAttributeArray:e}=lr.getPersonalizationServices();e&&e("stationNotifications",t)},kbt=()=>{const t=Dbt(),e=Ht(kge),n=(o,l)=>{const u=o.filter(d=>!l.includes(d)),c=o.filter(d=>l.includes(d));return[u,c]},r=(o,l)=>o?[...o,...l.filter(u=>!o.includes(u))]:l,i=o=>{const l={notifications:{...o}};t({preferences:l})},s=$.useCallback(o=>{const l=(e==null?void 0:e.notifications.stationIds)||[],u=(e==null?void 0:e.notifications.podcastIds)||[],c=Array.isArray(o)?o:[o];if(l!=null&&l.some(d=>c.includes(d))&&(u!=null&&u.some(d=>c.includes(d)))){const[d,f]=n(l,c),[h,g]=n(u,c);hs.stationIds=f,hs.stationIds.forEach(v=>zX(v)),hs.podcastIds=g,hs.podcastIds.forEach(v=>jX(v)),i({stationIds:d,podcastIds:h})}else if(l!=null&&l.some(d=>c.includes(d))){const[d,f]=n(l,c);hs.stationIds=f,hs.stationIds.forEach(h=>zX(h)),hs.podcastIds=[],i({stationIds:d})}else if(u!=null&&u.some(d=>c.includes(d))){const[d,f]=n(u,c);hs.podcastIds=f,hs.podcastIds.forEach(h=>jX(h)),hs.stationIds=[],i({podcastIds:d})}},[t,e]),a=$.useCallback(()=>{const o=(e==null?void 0:e.notifications.stationIds)||[],l=(e==null?void 0:e.notifications.podcastIds)||[];if(hs.stationIds.length>0&&hs.podcastIds.length>0){const u=r(o,hs.stationIds),c=r(l,hs.podcastIds);hs.stationIds.forEach(d=>WX(d)),hs.podcastIds.forEach(d=>GX(d)),hs.stationIds=[],hs.podcastIds=[],i({stationIds:u,podcastIds:c})}else if(hs.stationIds.length>0){const u=r(o,hs.stationIds);hs.stationIds.forEach(c=>WX(c)),hs.stationIds=[],i({stationIds:u})}else if(hs.podcastIds.length>0){const u=r(l,hs.podcastIds);hs.podcastIds.forEach(c=>GX(c)),hs.podcastIds=[],i({podcastIds:u})}},[t,e]);return{onUnfollow:s,onUndo:a}},{useRefreshCache:Nge,useWrappedCachedValue:Nbt}=fx({get:async({get:t})=>t(kg)?await lr.getPersonalizationServices().getFollowsWithSummaries().then(r=>r.map(px)):[],key:"RawFollows"}
508),Mbt={onDemands:[gt.SHOW],stations:[gt.STATION],topics:[gt.TAG,gt.PERSON,gt.ORGANIZATION,gt.GEOGRAPHY,gt.TOPIC],playlists:[gt.COLLECTION]},H4=Yn({default:{},key:"FollowsOverrideValues"}),Fbt=(t,e)=>(t==null?void 0:t.filter(n=>e[n.id]??!0))||[],$bt=t=>Lbt(Mbt,e=>t.filter(n=>vbt(e,n.entityType))),Bbt=()=>{const t=Nge(),{clientServices:e}=Fa(),n=e.getOnlineStatus(),r=Nbt(),i=Ht(H4),s=Fbt(r??[],i),a=$bt(s),o=Mi.reduce(a,(u,c)=>u+(c.length?1:0),0)>1,l=B0t(s,u=>u.id);return $.useEffect(()=>{n&&!(r!=null&&r.length)&&t(!0)},[r==null?void 0:r.length,n,t]),{isMoreThanOneTab:o,follows:s,categorizedFollows:a,followsMap:l}},Hy={},qX=t=>Promise.all(t.reduce((e,n)=>[...e,...Hy[n]||[]],[])),KX=async(t,e)=>{t.forEach(n=>{Hy[n]=Hy[n]?[...Hy[n],e]:[e]}),await e,t.forEach(n=>{if(Hy[n]){const r=Hy[n].indexOf(e);r!==-1&&Hy[n].splice(r,1)}})},Mge=(t,e=!1)=>{const n=Nge(),{categorizedFollows:r,followsMap:i,follows:s}=Bbt(),a=Qs(H4),o=Ht(H4),l=t(),{onUnfollow:u,onUndo:c}=kbt(),d=$.useCallback((A,w,x)=>{a(P=>{if(x){const k={...P};return A.forEach(U=>delete k[U]),k}const N=V0t(A,w);return{...P,...N}})},[a]),f=$.useCallback(A=>!!i[A]||!!o[A],[i,o]),h=$.useCallback(async(A,w,x)=>{const{beforeAnyAction:P,onUndo:N,onUndoError:k}=w;P==null||P(),d(A,x);try{N==null||N(A),c(),await qX(A).catch(()=>{}),await KX(A,HX(A,l,x,e))}catch{P==null||P(),d(A,!x,!0),k==null||k(()=>h(A,w,x))}finally{x&&n(!0)}},[l,e,n,d]),g=$.useCallback(async(A,w={},x)=>{const{beforeAnyAction:P,onSuccess:N,onError:k}=w;let U=!1;const H=Mi.isArray(A)?A:[A];P==null||P(),d(H,x);try{await qX(H).catch(()=>{}),await KX(H,HX(H,l,x,e)),N==null||N(()=>{U=!0,h(H,w,!x)})}catch{U||(P==null||P(),d(H,!x,!0),k==null||k(()=>g(H,w,x)))}finally{x?n(!0):x||u(H)}},[e,l,n,d,h]),v=$.useCallback((A,w)=>g(A,w,!0),[g]),b=$.useCallback((A,w)=>g(A,w,!1),[g]),S=$.useCallback((A,w)=>{const x=f(A);return x?b(A,w):v(A,w),!x},[f,v,b]);return $.useMemo(()=>({followsMap:i,categorizedFollows:r,follows:s,checkIsFollowing:f,follow:v,toggleFollowing:S,unfollow:b,refreshFollows:n}),[i,r,s,f,v,S,b,n])},Fge=({contentId:t,isShowUnfollowToast:e=!1,title:n})=>{const{t:r}=dn(),{showToast:i}=gu(),{checkIsFollowing:s,toggleFollowing:a}=Mge(TT()),o=s(t),[l,u]=$.useState(o),c=n.length>50?`${n.substring(0,50)}...`:n,h=l?{onSuccess:v=>{u(!1),e&&i({cta:{action:()=>{u(!0),v()},title:r("global.undo")},title:r("entityHeader.unfollowSuccess",{title:c})})},onError:v=>{u(!0),i({cta:{action:v,title:r("global.retry")},title:r("entityHeader.unFollowError",{title:c})})}}:{onSuccess:v=>{u(!0),i({cta:{action:()=>{u(!1),v()},title:r("global.undo")},title:r("entityHeader.followSuccess",{title:c})})},onError:v=>{u(!1),i({cta:{action:v,title:r("global.retry")},title:r("entityHeader.followError",{title:c})})},onUndoError:v=>{u(!0),i({cta:{action:v,title:r("global.retry")},title:r("entityHeader.undoError")})}};return{isFollowing:l,toggleFollow:()=>a(t,h)}},Ubt=(t,e,n,r,i,s,a)=>{const{t:o}=dn();let l,u;switch(e){case Fr.BROADCAST:case Fr.INTERNET:case Fr.TOPIC:case Fr.PERSONALIZED:u=o("horizontalEntityCard.eyebrow.station"),l=r;break;case Fr.EXCLUSIVE:u=o("horizontalEntityCard.eyebrow.station"),l=n!=null&&n[0]?n[0]:"";break;case ui.BROADCAST:case ui.DIGITAL:case ui.HOST_CREATED:u=o("horizontalEntityCard.eyebrow.show"),l=i;break;case ui.PODCAST:u=o("horizontalEntityCard.eyebrow.podcast"),l=i;break;case ui.PLAYLIST:l=Kfe(s??0,a??0,"dot",{i18n:si,playlistCountKey:"playlistScreen.playlistCount",playlistDurationKey:"playlistScreen.playlistDuration"});break;case Ol.TEAM:u=`${t} ${Dge(o("horizontalEntityCard.eyebrow.team"))}`;break;case Ol.LEAGUE:u=o("horizontalEntityCard.eyebrow.league");break}return{title:t,subtitle:l,headerTitle:u}},xu={containerWrapper:{...Dr({cursor:"initial"})},cardContent:{display:"flex",flexDirection:"column",gap:2},container:{display:"flex",flexDirection:"column",gap:10},linkContainer:{position:"relative",...Dr({".imageOpacityLayout":{opacity:.85},".title":{color:_e.white60}})},linkInImage:{fontSize:"14px",lineHeight:"14px",fontWeight:700,opacity:.6,...Dr({opacity:1})},link:{display:"block",...Bt.focusReset(),"&:focus::after":{outline:jf.focus,outlineOffset:sC},"&:focus:not(:focus-visible)::after":{outline:"none"},"&:focus-visible::after":{outline:jf.focus,outlineOffset:sC}},imageWrapper:{...cn.metadataLarge,...Bt.transition("opacity"),position:"relative",...Dr({".hoverCardLayout":{display:"block"}}),"&:focus":{".hoverCardLayout":{display:"block"}},"&:focus-within":{".hoverCardLayout":{display:"block"}}}
508,title:{...cn.metadataLarge,color:_e.white,...Bt.transition("color"),...Bt.truncateText(2)},contentType:{...cn.metadataSmall,color:_e.white60},subtitle:{...cn.metadataSmall,color:_e.white60,...Bt.truncateText(2)},hoverCardLayout:{display:"none",zIndex:2,pointerEvents:"fill",position:"absolute",left:0,top:0,bottom:0,right:0,flex:1},hoverCardWrapper:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%",alignItems:"center",padding:"8px"},hoverCardWrapperExtraPadding:{paddingBottom:"45%"},playIconContainer:{transform:"scale(0.75)",width:"55%",height:"55%",borderRadius:"50%",backgroundColor:_e.white,display:"flex",alignItems:"center",justifyContent:"center",...Dr({"& > span":{color:`${_e.audacyDarkNavy} !important`}})}},Vbt={"&::after":{content:'""',position:"absolute",left:0,top:0,bottom:0,right:0}},Hbt=({aspectRatio:t=1,ctaColor:e,duration:n,entityImageShape:r=Ad.Square,href:i,imageAlt:s,imageURIBase:a,isLive:o,isPlayed:l,liveUntil:u,onClick:c,publishDate:d,resumePoint:f,sizes:h=[{maxWidth:600,size:125},{maxWidth:1120,size:250},{size:400}],subtitle:g,title:v,entitySubtype:b,genres:S,marketTitle:A,author:w,itemsCount:x,contentId:P,isPlayable:N,entityType:k})=>{const U=Ubt(v,b,S,A,w,x,n),H=lr.getPersonalizationServices().getAuthState();Bn.AUTH;const{primaryControl:B}=cpe(),q=Ht(V2({contentId:P})),Z={contentId:P,feature:Ei.MINI_PLAYER},C=be(Dn,{children:[U.headerTitle&&I("span",{css:xu.contentType,children:U.headerTitle}),!!v&&I("span",{css:xu.title,className:"title",children:v})]}),L=mN(P),V=()=>{L==null||L(Z,{playLive:!0})};Fge({contentId:P??"",title:v??""});const j="Go to station >",X=k===QB.TAG,G=k===QB.STATION,ie=Q=>{G&&Q.preventDefault()},ae=$.useRef(null),ue=Q=>{var de,le;(de=Q.relatedTarget)!=null&&de.contains(Q.target)&&((le=ae.current)==null||le.focus())};return I(Ww,{href:G?" ":i,onClick:ie,css:[G&&xu.containerWrapper],children:be("div",{css:[xu.container,!!i&&xu.linkContainer],children:[be("div",{css:xu.imageWrapper,className:"imageWrapper",onClick:c,onBlur:ue,ref:ae,tabIndex:0,children:[I("div",{className:"imageOpacityLayout",children:I(zf,{alt:s??v??"",aspectRatio:t,entityImageShape:r,imageURIBase:a,sizes:h})}),G&&I("div",{css:xu.hoverCardLayout,className:"hoverCardLayout",children:be("div",{css:[xu.hoverCardWrapper,!N&&xu.hoverCardWrapperExtraPadding],children:[I("div",{}),N&&I("button",{type:"button",css:xu.playIconContainer,className:"playIconContainer",onClick:V,children:I(Yr,{name:q?B.icon:en.Play,iconColor:_e.greyA6,ariaHidden:!1,sizeInPx:52})}),I(Ww,{href:i,linkCss:xu.linkInImage,onClick:c,children:j})]})})]}),be("div",{css:xu.cardContent,children:[i?I(Ww,{href:i,linkCss:[xu.link,X?Vbt:{}],onClick:c,children:C}):C,U.subtitle&&I("span",{css:xu.subtitle,children:U.subtitle}),!g&&I(yN,{ctaColor:e,duration:n,isLive:o,isPlayed:l,liveUntil:u,publishDate:d,resumePoint:f})]})]})})},jbt={highlightText:{...cn.buttonSmall,backgroundColor:Ph.secondaryError,borderRadius:3,padding:"1px 5px",textAlign:"center",fontSize:9,letterSpacing:"-0.03em",textTransform:"uppercase"}},zbt=({text:t,containerCss:e})=>{const{t:n}=dn();return I("span",{css:[jbt.highlightText,e],children:n(t)})},ah={container:{width:"100%",display:"flex",flexDirection:"column"},titleSubtitleContainer:{marginBottom:12},playStateButton:{zIndex:Ai.siblingOverlay},eyebrow:{...cn.metadataSmall,color:Ph.secondaryCopy,marginBottom:5},linkContainer:{"&::after":{content:'""',position:"absolute",left:0,top:0,bottom:0,right:0,zIndex:1,...Bt.transition(["background-color"])},...Dr({"&::after":{backgroundColor:_e.white07}})},title:{...Bt.truncateText(3),...cn.titleMisc,fontSize:30,fontWeight:800,[Be(ve.Medium)]:{fontSize:30},[Be(ve.Large)]:{fontSize:38},[Be(ve.ExtraLarge)]:{fontSize:38},[Be(ve.XXLarge)]:{fontSize:48}},subtitle:{...Bt.truncateText(3),...cn.metadataLarge,color:Ph.secondaryCopy,marginTop:8},linkText:{...cn.metadataSmall,...Dr({color:_e.white60}),...Bt.transition("color"),fontWeight:700,marginTop:10}},Gbt=({ctaHref:t,duration:e,entityURL:n,eyebrow:r,isExclusiveStation:i,isExternalUrl:s,isLive:a,isPlayable:o,isPlaying:l,isScrubbing:u,linkText:c="",liveUntil:d,publishDate:f,resumePoint:h,subtitle:g,title:v,titleCss:b,onPlayStateClick:S})=>{const{t:A}=dn(),w=be("div",{css:ah.titleSubtitleContainer,children:[I("div",{css:[ah.title,b],children:v}),!!g&&I("div",{css:ah.subtitle,children:g})]}),x=xd({children:w,props:{ariaLabel:A("horizontalEntityCard.ariaLabel.link",{title:v}),as:Fi.Anchor,href:n},styles:ah.linkContainer}),N=xd({children:I(yN,{duration:e,publishDate:f,resumePoint:h,isLive:a,isPlayable:o,isPlaying:l,isScrubbing:u,liveUntil:d,isExclusiveStation:i}),props:{as:Fi.Button,ariaLabel:A(`horizontalEntityCard.ariaLabel.${h?"resume":"play"}`,{title:v}),onClick:H=>{H.preventDefault(),S==null||S()}},styles:ah.playStateButton}),k=!s&&(o||i||a),U=!!r;return be("div",{css:ah.container,children:[U&&(Array.isArray(r)?I(U1,{hasOverflowGradient:!0,bulletedCss:ah.eyebrow,title:r}):I("span",{css:ah.eyebrow,children:r})),k?be(Dn,{children:[n?x:w,N]}):be(Dn,{children:[w,I(Ww,{href:t,css:[ah.linkText,ah.linkContainer],children:j2(c)})]})]})},ps={container:{flexDirection:"column",width:"100%",height:365,backgroundColor:"#1F2772",borderRadius:vc.borderRadius,display:"flex",padding:0,position:"relative",justifyContent:"flex-end",[Be(ve.Medium)]:{flexDirection:"row"},[Be(ve.Large)]:{height:360},[Be(ve.XXLarge)]:{height:600}},verticalContainer:{width:"100%",flexDirection:"column",[Be(ve.Medium)]:{flexDirection:"column"},[Be(ve.Large)]:{height:360},[Be(ve.XXLarge)]:{height:600}},imageContentArea:{display:"flex",height:"100%",order:1,flexGrow:1,position:"relative",overflow:"hidden"},horizontalImgContainer:{[Be(ve.Medium)]:{width:"50%"}}
508,backgroundImage:{width:"100%",height:"calc(100% - 10px)",borderTopRightRadius:vc.borderRadius,borderTopLeftRadius:vc.borderRadius,objectFit:"cover",objectPosition:"center 15%",[Be(ve.Medium)]:{height:"100%",borderTopLeftRadius:vc.borderRadius,borderBottomLeftRadius:vc.borderRadius,borderTopRightRadius:0}},backgroundImageVertical:{borderTopRightRadius:vc.borderRadius,borderBottomLeftRadius:0,[Be(ve.Medium)]:{height:"calc(100% - 10px)",borderBottomLeftRadius:0,borderTopRightRadius:vc.borderRadius}},textContentArea:{justifyContent:"flex-end",display:"flex",flexDirection:"column",padding:"10px 20px 20px 20px",order:2,[Be(ve.Medium)]:{width:"50%",justifyContent:"center"},[Be(ve.XXLarge)]:{padding:"40px",width:"50%"}},textContentEnd:{[Be(ve.Medium)]:{justifyContent:"flex-end"}},fullWidthText:{[Be(ve.Medium)]:{width:"auto"}},thumbnailTopRight:{position:"absolute",top:20,right:20,[Be(ve.Large)]:{top:25,right:25},[Be(ve.XXLarge)]:{top:40,right:40}},hideThumbnail:{[Be(ve.Medium)]:{display:"none"}},thumbnailOverlay:{position:"absolute",right:20,bottom:0,[Be(ve.Medium)]:{display:"none"}},thumbnailOverlayVertical:{[Be(ve.Medium)]:{display:"initial"}},thumbnailCover:{display:"none",[Be(ve.Medium)]:{height:"100%",backgroundColor:"rgba(9, 5, 39, 0.5);",justifyContent:"center",alignItems:"center",display:"flex",flexGrow:1}},thumbnailLarge:{margin:"auto",[Be(ve.Medium)]:{width:220,height:220,borderRadius:4},[Be(ve.Large)]:{width:240,height:240}},thumbnailSmall:{width:60,height:60,borderRadius:4,[Be(ve.XXLarge)]:{width:70,height:70},[Be(ve.XXXLarge)]:{width:80,height:80}},highlightTextMedLargeBP:{position:"absolute",top:20,left:20,zIndex:1,[Be(ve.Medium)]:{top:20,left:"calc(50% + 20px)"},[Be(ve.Large)]:{padding:"3px 7px 1px",fontSize:11,top:25,left:"calc(50% + 25px)"},[Be(ve.XXLarge)]:{padding:"3px 7px 1px",fontSize:11,top:40,left:"calc(50% + 40px)"}},highlightTextSmallBP:{position:"absolute",top:20,left:20,zIndex:1,[Be(ve.XXLarge)]:{top:40,left:40}},title:{fontSize:16,[Be(ve.Medium)]:{fontSize:30},[Be(ve.Large)]:{fontSize:38}},titleWithoutImageSm:{fontSize:30},titleVerticalWithImage:{fontSize:16,[Be(ve.Medium)]:{fontSize:16},[Be(ve.Large)]:{fontSize:18},[Be(ve.XXLarge)]:{fontSize:24,maxWidth:"560px"}},titleVerticalWithoutImage:{fontSize:30,[Be(ve.Medium)]:{fontSize:30},[Be(ve.Large)]:{fontSize:38},[Be(ve.XXLarge)]:{fontSize:48,maxWidth:"560px"}},titleMaxChars:{fontSize:22,[Be(ve.Medium)]:{fontSize:22},[Be(ve.Large)]:{fontSize:22},[Be(ve.XXLarge)]:{fontSize:30,maxWidth:"560px"}}},Wbt=({imageURIBase:t,thumbnailURI:e,forceVertical:n,highlightText:r="",thumbnailAltText:i="",imageAltText:s="",hideThumbnail:a,...o})=>{const l=()=>{const d=o.title.length>50;return n?t?ps.titleVerticalWithImage:d?ps.titleMaxChars:ps.titleVerticalWithoutImage:t?ps.title:d?ps.titleMaxChars:[ps.title,ps.titleWithoutImageSm]},u=e&&I(V4,{sizes:[{maxWidth:599,size:60},{maxWidth:1119,size:220},{maxWidth:1439,size:240},{size:240}],src:e,alt:i,imgCss:[ps.thumbnailSmall,!t&&!n?ps.thumbnailLarge:{}]}),c=!n&&I("div",{css:ps.thumbnailCover,children:u});return be("div",{css:[ps.container,n&&ps.verticalContainer],children:[be("div",{css:[ps.textContentArea,(t||r&&!n)&&ps.textContentEnd,n&&ps.fullWidthText],children:[!a&&I("div",{css:[ps.thumbnailTopRight,t&&n&&ps.hideThumbnail,!n&&!t&&ps.hideThumbnail],children:u}),I(Gbt,{titleCss:l(),...o})]}),t?be("div",{css:[ps.imageContentArea,!n&&ps.horizontalImgContainer],children:[I(V4,{sizes:[{maxWidth:599,size:579},{maxWidth:1119,size:550},{maxWidth:1439,size:710},{size:950}],src:t,alt:s||"",imgCss:[ps.backgroundImage,n?ps.backgroundImageVertical:{}]}),!a&&I("div",{css:[ps.thumbnailOverlay,n&&ps.thumbnailOverlayVertical],children:u})]}):c,r.length>0&&r.trim().length!==0&&I(zbt,{containerCss:n?ps.highlightTextSmallBP:ps.highlightTextMedLargeBP,text:r})]})},qbt=({contentId:t="",playContext:e,entityType:n,entitySubtype:r,replayableUntilDateTime:i,...s})=>{const{showToast:a}=gu(),o=Yu(),{t:l}=dn(),u=mN(t),c=()=>{i&&new Date(i)>new Date?o.playFromId(t,e):a({title:l("featuredCard.expiredError")})},d=dH({isLive:s.isLive,isPlayable:s.isPlayable,item:{id:t,entityType:n,entitySubtype:r,duration:s.duration},playContext:e,onPlayLiveItem:r===Vn.BROADCAST_SHOW_EPISODE?c:void 0,playOrPause:u}),f=g=>{switch(g){case Vn.PODCAST_EPISODE:case Vn.BROADCAST_SHOW_EPISODE:return l("featuredCard.goToEpisodePage");case ui.PODCAST:return l("featuredCard.goToPodcastPage");case ui.BROADCAST:return l("featuredCard.goToShowPage");case Fr.BROADCAST:case Fr.EXCLUSIVE:return l("featuredCard.goToStationPage");case Ol.LEAGUE:return l("featuredCard.goToLeaguePage");case Ol.TEAM:return l("featuredCard.goToTeamPage");case Ol.GENRE:return l("featuredCard.goToGenrePage");default:return l("featuredCard.goToPage",{text:g==null?void 0:g.toLowerCase().split("_").join(" ")})}},h=!s.isPlayable&&!d.isExclusiveStation?{ctaHref:s.ctaHref||s.entityURL,linkText:s.linkText||f(r)}:{};return I(Wbt,{...s,...d,...h})};var Sn=(t=>(t[t.AudioItem=0]="AudioItem",t[t.Location=1]="Location",t[t.MyAudio=2]="MyAudio",t[t.MyAudioExclusiveStation=3]="MyAudioExclusiveStation",t[t.MyAudioPodcast=4]="MyAudioPodcast",t[t.MyAudioQueue=5]="MyAudioQueue",t[t.MyAudioRadioShow=6]="MyAudioRadioShow",t[t.MyAudioRadioStation=7]="MyAudioRadioStation",t[t.MyAudioTopic=8]="MyAudioTopic",t[t.PodcastEntity=9]="PodcastEntity",t[t.PodcastEpisode=10]="PodcastEpisode",t[t.RadioShowClip=11]="RadioShowClip",t[t.RadioShowEntity=12]="RadioShowEntity",t[t.RadioShowEpisode=13]="RadioShowEpisode",t[t.RadioShowSegment=14]="RadioShowSegment",t[t.RadioStationEntity=15]="RadioStationEntity",t[t.RecentExclusiveStation=16]="RecentExclusiveStation",t[t.RecentPodcast=17]="RecentPodcast",t[t.RecentRadioShow=18]="RecentRadioShow",t[t.RecentRadioStation=19]="RecentRadioStation",t[t.SearchPodcastEntity=20]="SearchPodcastEntity",t[t.FullPlayerExclusiveStation=21]="FullPlayerExclusiveStation",t[t.FullPlayerStation=22]="FullPlayerStation",t[t.FullPlayerBroadcastEpisode=23]="FullPlayerBroadcastEpisode",t[t.FullPlayerPodcastEpisode=24]="FullPlayerPodcastEpisode",t[t.TopicEntity=25]="TopicEntity",t[t.ContinueListeningPodcastEpisode=26]="ContinueListeningPodcastEpisode",t[t.ContinueListeningBroadcastEpisode=27]="ContinueListeningBroadcastEpisode",t[t.SearchPodcastEpisode=28]="SearchPodcastEpisode",t[t.SearchStation=29]="SearchStation",t[t.BroadcastEpisode=30]="BroadcastEpisode",t[t.Playlist=31]="Playlist",t[t.StandaloneChapter=32]="StandaloneChapter",t[t.ContactSheet=33]="ContactSheet",t))(Sn||{});const Kbt=Yn({default:"recents",key:"selectedTab"}),Ybt=(t,e,n,r,i)=>{const s=Ht(Kbt),a=r==null?void 0:r.includes(gn.CONTINUE_LISTENING);switch(t){case _n.MyAudioFollowed:case _n.MyAudioPodcastsAndShows:case _n.MyAudioQueue:case _n.MyAudioRecent:case _n.MyAudioStations:case _n.MyAudioTopics:switch(s){case"myQueue":return Sn.MyAudioQueue;case"stations":return n===Fr.EXCLUSIVE?Sn.MyAudioExclusiveStation:Sn.MyAudioRadioStation;case"onDemands":return n===ui.PODCAST?Sn.MyAudioPodcast:Sn.MyAudioRadioShow;case"topics":return Sn.MyAudioTopic;
508case"recents":return e===gt.STATION?n===Fr.EXCLUSIVE?Sn.RecentExclusiveStation:Sn.RecentRadioStation:e===gt.SHOW||e===gt.EPISODE?n===ui.PODCAST||n===Vn.PODCAST_EPISODE?Sn.RecentPodcast:Sn.RecentRadioShow:e===gt.STANDALONE_CHAPTER?Sn.StandaloneChapter:null;default:return null}case _n.Playlist:return Sn.Playlist;case _n.Player:switch(e){case gt.STATION:return n===Fr.EXCLUSIVE?Sn.FullPlayerExclusiveStation:Sn.FullPlayerStation;case gt.EPISODE:return n===Vn.PODCAST_EPISODE?Sn.FullPlayerPodcastEpisode:Sn.FullPlayerBroadcastEpisode;default:return null}case b4.ExclusiveStation:return null;case b4.Stations:switch(e){case gt.EPISODE:return Sn.BroadcastEpisode;default:return Sn.RadioStationEntity}case _n.Search:switch(e){case gt.STATION:return Sn.SearchStation;case gt.SHOW:switch(n){case ui.PODCAST:return Sn.SearchPodcastEntity;default:return null}case gt.COLLECTION:switch(n){case iT.PLAYLIST:return Sn.Playlist;default:return null}case gt.EPISODE:switch(n){case Vn.PODCAST_EPISODE:return Sn.SearchPodcastEpisode;default:return null}}return null;default:switch(e){case gt.STANDALONE_CHAPTER:return Sn.StandaloneChapter;case gt.CLIP:return Sn.RadioShowClip;case gt.EPISODE:switch(n){case Vn.BROADCAST_SHOW_EPISODE:return a?Sn.ContinueListeningBroadcastEpisode:Sn.RadioShowEpisode;case Vn.PODCAST_EPISODE:return i?Sn.SearchPodcastEpisode:a?Sn.ContinueListeningPodcastEpisode:Sn.PodcastEpisode;default:return null}case gt.SHOW:switch(n){case ui.PODCAST:return Sn.PodcastEntity;default:return null}case gt.STATION:return n===Fr.EXCLUSIVE?Sn.RecentExclusiveStation:Sn.RecentRadioStation;case gt.TAG:case gt.TOPIC:return Sn.TopicEntity;default:return null}}},xx=({contentId:t="",entityType:e,entitySubtype:n,image:r,isLive:i,showContentId:s,title:a,url:o,isFullPlayer:l,moduleId:u,hasExternalActions:c,parentShowUrl:d,parentEpisodeUrl:f,episode:h})=>{const{viewId:g}=Ht(wb);let v=e===gt.EPISODE&&n===Vn.PODCAST_EPISODE?s??t:t;(h==null?void 0:h.entityType)===gt.EPISODE&&(h==null?void 0:h.entitySubtype)===Vn.BROADCAST_SHOW_EPISODE&&(v=s??t);const{isFollowing:b,toggleFollow:S}=Fge({contentId:v,isShowUnfollowToast:!0,title:a??""}),A=Ybt(l?_n.Player:g,e,n,u,c);if(t)return{contentId:t,data:{image:r,parentEntity:{contentId:s},url:o,title:a},toggleFollow:()=>S==null?void 0:S(),isFollowing:b,isLive:i,entityType:(h==null?void 0:h.entityType)||e,subtype:(h==null?void 0:h.entitySubtype)||n,type:A,parentShowUrl:d,parentEpisodeUrl:f,moduleId:u}},Zbt=t=>{const{viewContext:e,...n}=t,r={feature:t.feature,...Mi.omitBy(n,Mi.isNil)};lr.getAnalyticServices().sendNavigationClickEvent(e,r)},bN=t=>{var o,l;const{entityType:e,entitySubtype:n,...r}=t,i=TT()(),{viewMap:s}=Ht(ape),a=e&&n&&((l=(o=s[e])==null?void 0:o[n])==null?void 0:l.viewId);return()=>{Zbt({viewContext:i,viewId:a,...r})}};var ig=(t=>(t[t.Small=0]="Small",t[t.Featured=1]="Featured",t[t.Vertical=2]="Vertical",t[t.Horizontal=3]="Horizontal",t))(ig||{});const Qbt=({data:t})=>{const{replayableUntilDateTime:e,contentId:n,entitySubtype:r,entityType:i,type:s,...a}=t,{carousel:o,sectionId:l,moduleId:u,moduleSubType:c}=Dl(),d=$.useMemo(()=>n??l??u,[n,u,l]),f=bN({contentId:n,entitySubtype:r,entityType:i,feature:Ei.MODULE,itemsList:o==null?void 0:o.cardContentIds,moduleId:d}),h=xx({contentId:n,entityType:i,entitySubtype:r,showContentId:a.showContentId,url:a.href,moduleId:u,parentShowUrl:a.showHref,parentEpisodeUrl:a.episodeHref});let g=null;switch(s){case 1:g=I(qbt,{contentId:n,entitySubtype:r,entityType:i,...t});break;case 3:g=I(fC,{...a,imageURIBase:a.image,entityImageShape:a.imageShape,contentId:n,onHrefClick:f,optionsMenu:h,entitySubtype:r,entityType:i,subType:c,replayableUntilDateTime:e});break;default:g=I(Hbt,{...a,entityImageShape:a.imageShape??(s===0?Ad.Circular:Ad.Square),entityType:i,entitySubtype:r,contentId:n,imageURIBase:a.image,onClick:f})}return g},Xbt=[gt.STATION,gt.EPISODE,gt.CLIP,gt.STANDALONE_CHAPTER,gt.PLAYLIST],Ix=t=>Xbt.includes(t),Jbt={[gn.ENTITY_CARD_FEATURED]:ig.Featured,[gn.ENTITY_CARD_HORIZONTAL]:ig.Horizontal,[gn.ENTITY_CARD_IMAGE_GROUP]:ig.Vertical,[gn.ENTITY_CARD_VERTICAL]:ig.Vertical,[gn.COLLECTION_PLAYLIST_CARD]:ig.Vertical},eSt=(t,e,{isLowercase:n}={})=>{const r=n?"lowercase":"capitalized";switch(t){case gt.STATION:return si.t(`entity.entityLabel.station.${r}`);case gt.COLLECTION:return si.t(`entity.entityLabel.collection.playlist.${r}`);case gt.SHOW:switch(e){case ui.PODCAST:return si.t(`entity.entityLabel.podcast.${r}`);default:return si.t(`entity.entityLabel.show.${r}`)}case gt.PLAYLIST:return(e==null?void 0:e.toLowerCase().includes("podcast"))?si.t(`entity.entityLabel.podcast.${r}`):si.t(`entity.entityLabel.show.${r}`);case gt.TAG:switch(e){case Ol.GENRE:return si.t("entity.genreAndEntityLabel",{genre:e});default:return si.t(`entity.entityLabel.topic.${r}`)}default:return""}},tSt=(t,e)=>{var n;return(n=e.carousel)!=null&&n.isStacked?ig.Horizontal:Jbt[t]},nSt=(t,e,n,r,i)=>{var l,u;const s=(l=e.config)!=null&&l.hideEyebrow?void 0:(u=e.config)!=null&&u.eyebrow?e.config.eyebrow:r!=null&&r.publishDate?[`${dC(r.publishDate)}`,r.parentTitle||""].filter(c=>!!c):(r==null?void 0:r.parentTitle)||(r==null?void 0:r.title),a=(r==null?void 0:r.entityType)===gt.EPISODE?r==null?void 0:r.parentImage:void 0,o=e.config.thumbnail&&!e.config.hideThumbnail?e.config.thumbnail:void 0;return{contentId:r==null?void 0:r.id,ctaHref:e.config.url,duration:r==null?void 0:r.duration,entitySubtype:r==null?void 0:r.entitySubtype,entityType:r==null?void 0:r.entityType,entityURL:r==null?void 0:r.url,eyebrow:s,forceVertical:!!(i!=null&&i.carousel)&&(i==null?void 0:i.carousel.numberOfItems)>1,hideThumbnail:e.config.hideThumbnail,highlightText:e.config.highlight,imageAltText:e.config.imageAlt,imageURIBase:e.config.image,isExternalUrl:e.config.isExternalUrl,isPlayable:r!=null&&r.entityType?Ix(r.entityType):!1,linkText:e.config.ctaText,playContext:n,replayableUntilDateTime:r==null?void 0:r.replayableUntilDateTime,subtitle:e.config.subtitle,thumbnailURI:o||a||(r==null?void 0:r.image),title:e.config.title||"",type:t}},rSt=(t,e,n,r,i)=>{var d,f,h;const s=r==null?void 0:r.url,a=r==null?void 0:r.showUrl,o=(r==null?void 0:r.entitySubtype)===iT.PLAYLIST&&((d=e.config)!=null&&d.totalDurationInSeconds)?+e.config.totalDurationInSeconds:r==null?void 0:r.duration,l=t===ig.Horizontal&&!!(i!=null&&i.carousel)&&!i.carousel.isStacked,[u,c]=I2(r);return{contentId:r==null?void 0:r.id,duration:o,isPlayable:r!=null&&r.entityType?Ix(r.entityType):!1,liveUntil:{playingUntil:j7(r==null?void 0:r.startDateTime,r==null?void 0:r.duration)},publishDate:r==null?void 0:r.publishDate,entityType:r==null?void 0:r.entityType,entitySubtype:r==null?void 0:r.entitySubtype,href:s,episodeHref:r==null?void 0:r.episodeUrl,showHref:a,image:c,imageAlt:u,imageShape:e.config.entityImageShape||Ad.Square,showContentId:r==null?void 0:r.showContentId,startDateTime:r==null?void 0:r.startDateTime,title:u,type:t,isFixed:l,playContext:n,parentTitle:r==null?void 0:r.parentTitle,genres:r==null?void 0:r.genres,marketTitle:r==null?void 0:r.marketTitle,author:r==null?void 0:r.author,itemsCount:(h=(f=e.config)==null?void 0:f.idList)==null?void 0:h.length,replayableUntilDateTime:r==null?void 0:r.replayableUntilDateTime}},e5={item:{...Bt.focusOutline({outline:`${jf.focusDark}`,outlineOffset:-1}),...Bt.transition("background-color"),...cn.bodySmall,alignItems:"center",backgroundColor:_e.white,color:_e.audacyDarkNavy,display:"flex",padding:"15px 0",position:"relative",flex:1,width:"100%",...Dr({backgroundColor:_e.greyC5}),"> span":{whiteSpace:"nowrap"},[Be(ve.Large)]:{padding:"5px 15px",width:"auto"}},disabled:{color:_e.audacyDarkNavy60,pointerEvents:"none",...Dr({backgroundColor:_e.white})},icon:{marginRight:18}},CT=({as:t=Fi.Anchor,icon:e,itemCss:n={},text:r,...i})=>{const s=t===Fi.Anchor,a=be(Dn,{children:[e&&I(Yr,{name:e,sizeInPx:24,iconCss:e5.icon,ariaHidden:!0}),I("span",{children:r})]}),o=[e5.item,n],l=s?o:[o,"isDisabled"in i&&i.isDisabled?e5.disabled:{}];return xd({props:{as:t,...i},children:a,styles:l})},ES=t=>{const{t:e}=dn(),{href:n,isExternal:r,linkType:i,text:s,icon:a}=t;let o;switch(i){case Sc.EPISODE_DETAILS:o=e("optionsMenu.episodeDetails");break;case Sc.EPISODE_GO_TO:o=e("optionsMenu.goToEpisode");break;case Sc.SHOW_GO_TO:o=e("optionsMenu.goToShow");break;case Sc.PODCAST:o=e("optionsMenu.goToPodcast");break;case Sc.STATION:o=e("optionsMenu.goToStationWebsite");break;case Sc.TOPIC:o=e("optionsMenu.goToTopic",{text:s});break}const l=r?en.Website:en.GotoCircle;return I(CT,{as:Fi.Anchor,isDisabled:!n,isExternal:r,href:n,icon:a||l,onClick:t.onClick,text:o||""})},iSt=t=>{const e=Qs(Cd),{showToast:n}=t();return $.useCallback((r,i)=>{const s=i||r.duration;r.id&&s&&(e(a=>({...a,[r.id]:s})),lr.getPersonalizationServices().setPlayback(r.id,s).catch(()=>{e(a=>(delete a[r.id],{...a})),n({title:"Error marking item as played"})}))},[e,n])},sSt=Aa({get:t=>({get:e})=>{var r;const n=(r=e(gT(t)))==null?void 0:r.getDataObject();if(n)return C2(n)},key:"StandaloneChapter"}),aSt=t=>{const e=Qs(Cd),{showToast:n}=t();return $.useCallback(r=>{const i=r.duration;r.id&&i&&(e(s=>({...s,[r.id]:i})),lr.getPersonalizationServices().setPlayback(r.id,i).catch(()=>{e(s=>(delete s[r.id],{...s})),n({title:"Error marking chapter as played"})}))},[e,n])},oSt=({id:t,onClickCallback:e})=>{const{t:n}=dn(),r=Ht(_et(t)),i=iSt(gu),s=$.useCallback(()=>{r&&i(r),e==null||e()},[r,e,i]);return I(CT,{icon:en.Completed,onClick:s,text:n("optionsMenu.markAsPlayed")})},lSt=({id:t,onClickCallback:e})=>{const{t:n}=dn(),r=Ht(sSt(t)),i=aSt(gu),s=$.useCallback(()=>{r&&i(r),e==null||e()},[r,e,i]);return I(CT,{icon:en.Completed,onClick:s,text:n("optionsMenu.markAsPlayed")})},uSt=({id:t,isDisabled:e=!1,onClickCallback:n})=>{const{t:r}
508=dn(),i=gN(),s=i.contains(t),a=s?en.QueueRemove:en.QueueAdd,o=()=>{s?i.remove([t]):i.add(t),n==null||n()},l=r(s?"optionsMenu.removeFromQueue":"optionsMenu.addToQueue");return I(CT,{icon:a,isDisabled:e,onClick:o,text:l})},cSt=t=>{const{t:e}=dn(),{href:n,isExternal:r,linkType:i}=t,s={station:e("optionsMenu.shareStation"),show:e("optionsMenu.shareShow"),episode:e("optionsMenu.shareEpisode"),podcast:e("optionsMenu.sharePodcast"),topic:e("optionsMenu.shareTopic"),genre:e("optionsMenu.shareGenre")};return I(CT,{as:Fi.Anchor,isDisabled:!n,isExternal:r,href:n,icon:en.CopyLink,onClick:t.onClick,text:s[i]})},dSt=(t,e)=>{const{t:n}=dn(),{showToast:r}=gu();async function i(o){if("clipboard"in navigator&&o)return await navigator.clipboard.writeText(o)}const s=o=>I(cSt,{href:t.data.url,isExternal:!!t.data.url,linkType:o,onClick:a}),a=async o=>{var l;o.preventDefault(),o.stopPropagation(),e==null||e(),i(`${window.location.origin}${(l=t.data)==null?void 0:l.url}`),r({title:n("toast.linkCopied")})};switch(t.subtype){case Fr.BROADCAST:case Fr.INTERNET:case Fr.PERSONALIZED:case Fr.EXCLUSIVE:return s("station");case ui.DIGITAL:case ui.BROADCAST:return s("show");case Fr.PODCAST:case Vn.BROADCAST_SHOW_EPISODE:case Vn.PODCAST_EPISODE:return s("episode");case ui.PODCAST:return s("podcast");case Ol.GENRE:return s("genre");case Ol.TEAM:case Fr.TOPIC:return s("topic")}},fSt=({isFollowing:t,onClickCallback:e,toggleFollow:n,parentEntityLabel:r})=>{const{t:i}=dn(),s=r?i(t?"optionsMenu.unfollow":"optionsMenu.follow",{parentEntityLabel:r}):i(t?"optionsMenu.unfollowLabel":"optionsMenu.followLabel");return I(CT,{icon:t?en.MinusCircle:en.PlusCircle,onClick:()=>{n==null||n(),e==null||e()},text:s})},hSt=(t,e,n,r)=>{const i=[];dSt(t,n);const{pathname:s}=Rd(),o=decodeURIComponent(s)===t.data.url,l=t.contentId;if(!l)return[];let u;t.type===Sn.FullPlayerStation||t.type===Sn.FullPlayerExclusiveStation||t.type===Sn.MyAudioRadioStation||t.type===Sn.MyAudioExclusiveStation||t.type===Sn.RecentRadioStation||t.type===Sn.RecentExclusiveStation||t.type===Sn.SearchStation?u=t.data.url||"":t.type===Sn.FullPlayerBroadcastEpisode&&(u=t==null?void 0:t.parentShowUrl);const c=o?I(Dn,{}):I(ES,{href:t.data.url,icon:en.Detail,linkType:Sc.EPISODE_DETAILS}),d=I(ES,{href:t.parentEpisodeUrl,icon:en.GotoCircle,linkType:Sc.EPISODE_GO_TO}),f=I(ES,{href:t.parentShowUrl,icon:en.GotoCircle,linkType:Sc.SHOW_GO_TO}),h=t.data.url?I(ES,{href:cot(t.data.url),linkType:Sc.PODCAST}):I(Dn,{}),g=I(ES,{href:t.data.website||u,isExternal:!!t.data.website,linkType:Sc.STATION,text:t.data.title}),v=I(ES,{icon:en.GotoCircle,href:t.data.url,linkType:Sc.TOPIC,text:t.data.title}),b=r&&e?I(uSt,{id:l,isDisabled:!e,onClickCallback:n}):I(Dn,{}),[S,A]=[t.entityType,t.subtype],w=ope(S,A)||[S,A],x=eSt(w==null?void 0:w[0],w==null?void 0:w[1],{isLowercase:!0}),P=r?I(fSt,{isFollowing:t.isFollowing,toggleFollow:t.toggleFollow,onClickCallback:n,parentEntityLabel:x}):I(Dn,{}),N=r?t.entityType===gt.STANDALONE_CHAPTER?I(lSt,{id:l,onClickCallback:n}):I(oSt,{id:l,onClickCallback:n}):I(Dn,{}),k=I(A0t,{contactInformation:{phoneNumber:t.data.phoneNumber,socialMediaLinks:t.data.socialMediaLinks,utterancePhrase:t.data.utterancePhrase}}),U=[g,P],H=[b,N,c,h],B=t.isLive?[b,c]:[b,N,c],q=[P,v],Z=[N,...H],C=[N,...U],L=[b,d,f],V=[...H,P],j=[k];switch(t.type){case Sn.FullPlayerExclusiveStation:case Sn.FullPlayerStation:case Sn.FullPlayerBroadcastEpisode:case Sn.MyAudioExclusiveStation:case Sn.MyAudioRadioStation:case Sn.SearchStation:i.unshift(...U);break;case Sn.MyAudioPodcast:case Sn.MyAudioRadioShow:case Sn.Playlist:case Sn.SearchPodcastEntity:i.unshift(P);break;case Sn.FullPlayerPodcastEpisode:i.unshift(...V);break;case Sn.MyAudioQueue:case Sn.PodcastEpisode:i.unshift(...H);break;case Sn.BroadcastEpisode:i.unshift(...B);break;case Sn.MyAudioTopic:i.unshift(...q);break;case Sn.SearchPodcastEpisode:case Sn.RecentPodcast:i.unshift(h);break;case Sn.RecentExclusiveStation:case Sn.RecentRadioStation:i.unshift(g);break;case Sn.RadioStationEntity:t.data.website&&i.unshift(g);break;case Sn.ContinueListeningPodcastEpisode:i.unshift(...Z);break;case Sn.ContinueListeningBroadcastEpisode:i.unshift(...C);break;case Sn.StandaloneChapter:return L;case Sn.ContactSheet:return j}return i},hH=({children:t})=>{const[e,n]=$.useState(!1);return $.useEffect(()=>(n(!0),()=>n(!1)),[]),e?og.createPortal(t,document.querySelector("#portal")):null},pSt=(t,e)=>{$.useEffect(()=>{const n=r=>{!t.current||t.current.contains(r.target)||e(r)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[t,e])},YX={container:{alignItems:"center",display:"flex",justifyContent:"center",position:"relative"},activeButton:{backgroundColor:_e.white15,color:_e.white}},gSt=({ariaLabel:t,buttonCss:e,buttonSizeInPx:n=24,colorTheme:r=qV.Dark,icon:i=en.More,iconSizeInPx:s=18,isQueueEnabled:a=!1,isLoggedIn:o=!1,menuPosition:l,menuTitle:u,menuImage:c,onClickCallback:d,optionsMenu:f,theme:h=Um.HoverFill,textToRender:g})=>{const[v,b]=$.useState(!1),{lessThan:S}=Fs(),A=$.useRef(nde()),w=$.useRef(null),{t:x}=dn(),P=$.useCallback(()=>{d==null||d(),b(!0)},[d]),N=$.useCallback(()=>{b(!1)},[]);pSt(w,N);const k={height:n,width:n}
508,U=I(Mc,{ariaControls:A.current,ariaExpanded:v,ariaHasPopup:"menu",ariaLabel:t||x("menuTooltip.moreOptions"),buttonCss:[v?YX.activeButton:{},e||{}],buttonSizeInPx:n,colorTheme:r,icon:i,onClick:B=>{B.stopPropagation(),v?N():P()},iconSizeInPx:s,theme:h,textToRender:g}),H=hSt(f,a,N,o);return H.length?S.LG?be(Dn,{children:[U,I(hH,{children:I(Jpe,{onClose:N,isOpen:v,renderDrawerHeader:B=>I(Cge,{image:c,onClose:B,id:A.current,title:u}),children:I(Zk,{FallbackComponent:()=>null,children:I($.Suspense,{fallback:null,children:H.map(B=>I(mt.Fragment,{children:B},`options_${A.current}`))})})})})]}):I(W2,{active:v,children:be("div",{css:[YX.container,k],ref:w,children:[U,I($.Suspense,{fallback:null,children:I(p0t,{buttonSizeInPx:n,id:A.current,isOpen:v,menuPosition:l,ref:w,children:H.map((B,q)=>I(mt.Fragment,{children:B},`${q}-${A.current}`))})})]})}):null},pH=t=>{const e=Eb("queue")&&t.isQueueEnabled,{isLoggedIn:n}=Ax();return I(gSt,{...t,isLoggedIn:n,isQueueEnabled:e})},mSt=()=>{const[t,e]=$.useState(!1),[n,r]=$.useState(!1),[i,s]=$.useState(!1),{isOpen:a}=Hc();return $.useEffect(()=>{a?s(!0):e(!1)},[a]),{handlePlayerContentVisibleComplete:u=>{u===fi.animate?r(!0):u===fi.exit&&(s(!1),r(!1))},handlePlayerVisibleComplete:u=>{u===fi.animate&&e(!0)},isPlayerContentVisible:t,isPlayerContentAnimationComplete:n,isPlayerVisible:i}},vSt=()=>{const{greaterThan:t}=Fs(),[e,n]=$.useState(t.MD),[r,i]=$.useState(!1);$.useEffect(()=>{i(!1),n(t.MD)},[t.MD]);const{isQueueHead:s,setIsQueueHeadPlayer:a}=$.useContext(Ab),o=$.useCallback(()=>{e?(i(!1),a(!1)):(n(!0),a(!t.MD))},[t.MD,e,a]);return $.useEffect(()=>{a(s&&!t.MD&&e)},[t.MD,s,e,a]),{handleQueueAnimationComplete:c=>{c!==fi.animate&&n(!1)},handleQueueClick:o,handleQueueContainerAnimationComplete:c=>{c===fi.animate&&i(!0)},isQueueTransitioned:r,isQueueVisible:e}},ZX=(t,e)=>{const[n,r]=$.useState(!1);return $.useEffect(()=>{let i;return t&&(i=setTimeout(()=>r(!0),e*1e3)),()=>{i&&clearTimeout(i)}},[e,t]),{isVisibleAfterDelay:n,setIsVisibleAfterDelay:r}},ySt=()=>{const{contentId:t,imageUrl:e,parentShowUrl:n,playerTitle:r,showContentId:i,subtype:s,type:a,url:o,episodeId:l,episode:u}=Hc();return xx({contentId:t,entityType:a,entitySubtype:s,image:e,isFullPlayer:!0,parentShowUrl:n,showContentId:i,title:r,url:o,episode:u})},bSt=()=>{const[{currentRate:t,savedRate:e,availableRates:n}]=Fo(eD);return{playbackSpeed:t,savedPlaybackSpeed:e,availableRates:n}},t5={wrapper:{position:"relative",height:28},button:{...Bt.accessibleMinButtonSize(),...Bt.transition(["color","background-color"]),height:28,padding:"0 8px",[Be(ve.Large)]:{border:`1px solid ${_e.white30}`,borderRadius:40,position:"absolute",transform:"translateX(-50%)"},...Dr({color:_e.white60})},buttonLeft:{[Be(ve.Large)]:{transform:"none"}}},SSt=({playbackSpeed:t,onClick:e,isLeftAligned:n})=>I(Il.div,{css:t5.wrapper,whileTap:{scale:1.2},children:be("button",{type:"button",onClick:e,css:[t5.button,n&&t5.buttonLeft],children:[t,"x"]})}),ESt=t=>{var S,A;const e=Ht(ws),{playbackSpeed:n}=bSt(),r=Yu(),i=qfe(),{showToast:s}=gu(),{t:a}=dn(),o=r.incrementRate,l=((S=e==null?void 0:e.episodeDataObject)==null?void 0:S.subtype)===Vn.BROADCAST_SHOW_EPISODE,u=((A=e==null?void 0:e.episodeDataObject)==null?void 0:A.subtype)===Vn.PODCAST_EPISODE,c=!!(e!=null&&e.standaloneChapterDataObject),d=r.getIsLive(),f=Ht(J0),h=i[vce],g=$.useCallback(()=>{s({title:a("global.rewindSpeedControlsMessage")}),rH(edt)},[a,s]),v=!h&&l?g:o;return!(l||u||c)||d||f?null:I(SSt,{playbackSpeed:n,onClick:v,...t})},QX={height:"auto",opacity:1,overflow:"visible",padding:"12px 8px 12px 0",width:"auto"},oh={root:{padding:6,position:"relative",width:"fit-content","&:is(:focus-within)":{backgroundColor:_e.audacyDarkNavy,borderRadius:"0 0 8px 8px","& > div":{...QX}},"&:only-child":{marginLeft:"auto"}},rootSliderVisible:{backgroundColor:_e.audacyDarkNavy,borderRadius:"0 0 8px 8px"},fullPlayer:{border:`1px solid ${_e.white30}`,borderRadius:"50%",padding:0,margin:"0 6px","&:is(:hover, :focus-within)":{borderRadius:"0 0 10px 10px",borderTopColor:"transparent",padding:6,margin:0},"& > div":{border:`1px solid ${_e.white30}`,borderLeft:"none",borderRadius:"0 10px 10px 0"},"&:only-child":{marginLeft:"auto"}},volumeButton:{...Bt.accessibleMinButtonSize(),borderRadius:"50%",color:_e.white,padding:6,...Dr({color:_e.white60}),"& svg":{width:14,height:14}},miniPlayerVolumeButton:{"& svg":{width:20,height:20}},lowVolume:{"& svg > path:nth-last-of-type(-n + 2)":{color:_e.white60}},midVolume:{"& svg > path:nth-last-of-type(-n + 1)":{color:_e.white60}},volumeSliderWrapper:{alignItems:"center",backgroundColor:_e.audacyDarkNavy,borderRadius:"0 8px 8px 0",display:"flex",height:0,left:"50%",opacity:0,overflow:"hidden",padding:0,position:"absolute",top:-20,transform:"rotate(270deg)",transformOrigin:"left center",width:0},volumeSliderVisible:{...QX},volumeSlider:{appearance:"none",background:"transparent",borderRadius:10,cursor:"pointer",height:20,padding:"8px 6px",width:72,...D1.sliderStyles({isThumbHidden:!1})}}
508,Fp={volumeMin:0,volumeMax:1,volumeStep:.05,lowVolumeMax:.33,midVolumeMax:.66},TSt=t=>(t*100).toFixed(0),ASt=({isFullPlayer:t,isMuted:e,onMuteChange:n,onVolumeChange:r,volume:i})=>{const[s,a]=$.useState(!1),[o,l]=$.useState(i),[u,c]=$.useState(!1),{t:d}=dn(),f=()=>{u&&(r(o),c(!1)),n(!e)},h=A=>{const w=Number.parseFloat(A.target.value);c(w===0),r(w)},g=A=>{"value"in A.target&&l(Number.parseFloat(A.target.value))},v=e?0:i/Fp.volumeMax*100,b=i<=Fp.lowVolumeMax,S=i>Fp.lowVolumeMax&&i<Fp.midVolumeMax;return be("div",{css:[oh.root,t&&oh.fullPlayer,s&&oh.rootSliderVisible],onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[I("button",{type:"button",css:[oh.volumeButton,!t&&oh.miniPlayerVolumeButton,b&&oh.lowVolume,S&&oh.midVolume],onClick:f,"aria-label":d(e?"playerControls.accessibilityLabels.unmuteLabel":"playerControls.accessibilityLabels.muteLabel"),children:I(Yr,{name:e||i===Fp.volumeMin?en.VolumeMuted:en.Volume,ariaHidden:!0})}),I("div",{css:[oh.volumeSliderWrapper,s&&oh.volumeSliderVisible],children:I("input",{"aria-valuetext":e?d("playerControls.accessibilityLabels.volumeMuted"):`${TSt(i)}% ${d("playerControls.labels.volumeSlider.volume")}`,"aria-label":d("playerControls.accessibilityLabels.volumeSliderLabel"),min:Fp.volumeMin,max:Fp.volumeMax,step:Fp.volumeStep,css:[oh.volumeSlider,D1.sliderBackground(v)],type:"range",value:e?Fp.volumeMin:i,onMouseDown:g,onTouchStart:g,onChange:h})})]})},$ge=({isFullPlayer:t})=>{const e=Yu(),{volume:n,isMuted:r}=Ht(c4);return I(ASt,{isFullPlayer:t,isMuted:r,volume:n,onMuteChange:i=>e.setMuted(i),onVolumeChange:i=>e.setVolume(i)})};ve.Small+"",ve.Medium+"";const XX={container:{display:"grid",gridTemplateColumns:"[start] 40px [queue-button] auto [more-button] 50px [end]",alignItems:"center",justifyItems:"center"},middleOptions:{display:"flex",justifyContent:"space-evenly",alignItems:"center",width:"100%",gridColumnStart:"queue-button",gridColumnEnd:"more-button"}},Bge=({isQueueVisible:t,onQueueClick:e})=>{const n=Ht(kg),r=Eb("queue")&&n,{greaterThan:i}=Fs(),{t:s}=dn(),a=ySt(),o={buttonSizeInPx:i.MD?28:24,iconSizeInPx:i.MD?14:24},l=i.MD?t?Um.Fill:Um.Outline:Um.Default;return be("div",{css:XX.container,children:[r&&I(Mc,{ariaLabel:s(`playerControls.accessibilityLabels.${t?"closeQueue":"openQueue"}`),onClick:e,icon:en.Queue,theme:l,...o}),be("div",{css:XX.middleOptions,children:[I(ESt,{isLeftAligned:!r}),i.SM&&I($ge,{isFullPlayer:!0})]}),a?I(pH,{ariaLabel:s("playerControls.accessibilityLabels.options"),menuPosition:I0.TopLeft,optionsMenu:a,theme:i.MD?Um.Outline:Um.Default,...o}):null]})},Uge={url:"",title:""},wSt=Yn({default:!1,key:"ScrubbingState"}),_St=Mv({get:({type:t,id:e})=>({get:n})=>{var a,o;if(t!==gt.EPISODE||!e)return!0;const r=n(H2({episodeId:e,live:!1})),i=n(eb),s=r[i];return mH(s)?!!((o=(a=r[i+1])==null?void 0:a.transcript)!=null&&o.isNavigableTranscript):!1},key:"isNextTranscriptAvailable"}),CSt=t=>Ht(_St(t)),xSt=Mv({get:({episodeId:t,live:e})=>({get:n})=>{try{const r=n(H2({episodeId:t,live:e})),i=n(eb);return r[i]}catch(r){console.error("Transcript error: ",r)}},key:"transcriptChapterMetaDataSelector"}),ISt=Mv({get:t=>({get:e})=>{try{const n=e(xSt({episodeId:t,live:!1}));if(n&&mH(n)){const{title:r,transcript:i,startOffset:s,duration:a}=n;return{url:i==null?void 0:i.url,title:r,startOffset:s,duration:a}}else return Uge}catch(n){console.error("Transcript error: ",n)}},key:"transcriptChapterMetaDataSelector"}),OSt=hb({get:({get:t})=>{try{const e=t(ws),{episodeDataObject:n}=e??{};return n!=null&&n.episodeId&&lde(n==null?void 0:n.type,n==null?void 0:n.subtype)?t(ISt(n==null?void 0:n.id)):Uge}catch(e){console.error("Transcript error: ",e)}},key:"chaptersTranscriptQueryUrl"}),PSt=hb({get:async({get:t})=>{try{const{url:e,...n}=t(OSt)??{};return e?{...await lr.getDataServices().getTranscript(e),...n}:void 0}catch(e){console.error("Transcript error: ",e)}},key:"chaptersTranscriptQuery"}),RSt=hb({get:({get:t})=>{var e;try{const n=t(ws),{episodeDataObject:r,standaloneChapterDataObject:i}=n??{},s=r??i;return gH(s)?(e=s==null?void 0:s.transcript)==null?void 0:e.url:void 0}catch(n){console.error("Transcript error: ",n)}},key:"transcriptQueryUrl"}),LSt=hb({get:async({get:t})=>{try{const e=t(RSt);return e?{...await lr.getDataServices().getTranscript(e)}:void 0}catch(e){console.error("Transcript error: ",e)}},key:"transcriptQuery"}),DSt=t=>{const e=pb(t===Vn.BROADCAST_SHOW_EPISODE?PSt:LSt);return{transcript:e.valueMaybe(),loading:e.state==="loading",hasError:e.state==="hasError"}},mw={noIndexFounded:-1,defaultSpeakerName:"Speaker",chapterTranscriptItemTimeFormat:"h:mm:ssaaa"},kSt=t=>{const[e,n]=$.useState(mw.noIndexFounded),[r,i]=$.useState(!1),{offset:s}=Sx(),a=Oa(P=>P.duration)||0,o=Ht(wSt),l=CSt({type:t==null?void 0:t.type,id:t==null?void 0:t.id}),u=$.useRef(null),c=tZ(s),d=c===0,{transcript:f,loading:h,hasError:g}=DSt(t==null?void 0:t.subtype),{startOffset:v,title:b,duration:S=0}=f??{},A=tZ(v??0),w=t==null?void 0:t.startTime,x=$.useMemo(()=>f==null?void 0:f.transcript.map(P=>{const N=P.speaker.split(" ")[0]===mw.defaultSpeakerName&&P.speaker.split(" ").length===2?`${P.speaker.split(" ")[0]} ${Number(P.speaker.split(" ")[1])+1}`:P.speaker;return{...P,speaker:N}}),[f==null?void 0:f.transcript]);return $.useEffect(()=>{o&&i(!0)},[o,i]),$.useEffect(()=>{if(!x)return;let P=mw.noIndexFounded;if((t==null?void 0:t.subtype)===Vn.BROADCAST_SHOW_EPISODE){const N=t==null?void 0:t.startTime;P=x.findIndex(k=>c>=j4(A,OO(k.start_time),N)&&c<j4(A,OO(k.end_time),N))}else P=x.findIndex(N=>c>=OO(N.start_time)&&c<OO(N.end_time));P===mw.noIndexFounded&&u.current!==null?n(u.current):(u.current=P,n(P))},[x,c,t,v,A,w]),{loading:h,hasError:g,transcript:x,currentIndex:e,setCurrentIndex:n,duration:(t==null?void 0:t.subtype)===Vn.BROADCAST_SHOW_EPISODE?S:a,offsetEqualToZero:d,startOffset:v,title:b,isNextTranscriptAvailable:l,wasScrubbed:r}},OO=t=>Math.floor(t/1e3)*1e3,gH=(t,e)=>mH(t,e)&&NSt(t==null?void 0:t.subtype),NSt=t=>{switch(t){case Vn.BROADCAST_SHOW_EPISODE:case Vn.PODCAST_EPISODE:case sT.BROADCAST_EPISODE_CHAPTER:return!0;default:return!1}},mH=(t,e)=>{const n=(t==null?void 0:t.subtype)===Vn.BROADCAST_SHOW_EPISODE?e:t,{transcript:r}=n??{},{isNavigableTranscript:i,url:s}=r??{};return!!i&&!!s},j4=(t=0,e=0,n=0)=>t+e-n,MSt=(t=0,e="")=>e?`${F1(t/1e3)} - ${e}`:"",FSt=(t=0,e="",n=0)=>e?`${Vge(n+t/1e3)} - ${e}`:"",Vge=(t=0,e=mw.chapterTranscriptItemTimeFormat)=>Xh(dL(t),e),JX={container:{borderRadius:4,height:250,overflow:"hidden",
508width:300,pointerEvents:"auto"},iframe:{height:"100%",width:"100%"}},Hge=({containerCss:t,title:e="Advertisement",url:n})=>I("div",{css:[JX.container,t],children:I("iframe",{css:JX.iframe,src:n,title:e,scrolling:"no"})});var yD=(t=>(t.Large="Large",t.Small="Small",t))(yD||{});const z4={container:{marginBottom:45,[Be(ve.Medium)]:{marginBottom:60}},title:{...cn.headlineSmall,color:_e.white},titleLarge:{...cn.headlineLarge,color:_e.white}},$St={[yD.Small]:z4.title,[yD.Large]:z4.titleLarge},jge=({as:t="h1",children:e,title:n,titleCss:r={},variant:i=yD.Small})=>{const s=$St[i];return I(t,{css:[s,r],children:n||e})},BSt=({containerCss:t={},hasHorizontalPadding:e=!0,...n})=>I("div",{css:[e&&Bt.horizontalModulePadding(),z4.container,t],children:I(jge,{...n})}),eJ={sm:45,md:60},lh={container:{marginBottom:eJ.sm,[Be(ve.Medium)]:{marginBottom:eJ.md},...Dr({".swiper-button, .swiper-slide":{opacity:1}})},lastSection:{marginBottom:0},overflowHidden:{overflow:"hidden"},footer:{borderTop:Ng.separator,marginTop:20,paddingTop:20},header:{marginBottom:20},title:{[Be(ve.Small)]:{...cn.titleSection}},titleContainer:{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:20},hasSubtitle:{marginBottom:5},subtitle:{...cn.metadataLarge,color:_e.white60,marginBottom:20}},Gv=({children:t,containerCss:e,content:n,contentCss:r,footerContent:i,href:s,isLast:a,isOverflowHidden:o,headerContent:l,subtitle:u,subtitleAs:c="h3",title:d,titleAs:f="h2",titleCta:h,...g})=>{const{isSideColumn:v}=Dl(),b=c;return be("section",{css:[Bt.horizontalModulePadding(v),lh.container,o&&lh.overflowHidden,a&&lh.lastSection,e],children:[(d||h)&&be("div",{css:[lh.titleContainer,u&&lh.hasSubtitle],children:[d&&I(jge,{as:f,titleCss:lh.title,children:s?I(Mg,{...g,href:s,label:j2(d),labelCss:lh.title}):d}),h]}),u&&I(b,{css:lh.subtitle,children:u}),l&&I("header",{css:lh.header,children:l}),(t||n)&&I("div",{css:r,children:t||n}),i&&I("footer",{css:lh.footer,children:i})]})};/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */function Vm(t){"@babel/helpers - typeof";return Vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vm(t)}function G4(t,e){return G4=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},G4(t,e)}function USt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function HP(t,e,n){return USt()?HP=Reflect.construct:HP=function(i,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(i,o),u=new l;return a&&G4(u,a.prototype),u},HP.apply(null,arguments)}function lf(t){return VSt(t)||HSt(t)||jSt(t)||zSt()}function VSt(t){if(Array.isArray(t))return W4(t)}function HSt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jSt(t,e){if(t){if(typeof t=="string")return W4(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W4(t,e)}}function W4(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zSt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
509In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var GSt=Object.hasOwnProperty,tJ=Object.setPrototypeOf,WSt=Object.isFrozen,qSt=Object.getPrototypeOf,KSt=Object.getOwnPropertyDescriptor,du=Object.freeze,Id=Object.seal,YSt=Object.create,zge=typeof Reflect<"u"&&Reflect,bD=zge.apply,q4=zge.construct;bD||(bD=function(e,n,r){return e.apply(n,r)});du||(du=function(e){return e});Id||(Id=function(e){return e});q4||(q4=function(e,n){return HP(e,lf(n))});var ZSt=Od(Array.prototype.forEach),nJ=Od(Array.prototype.pop),$A=Od(Array.prototype.push),jP=Od(String.prototype.toLowerCase),n5=Od(String.prototype.toString),rJ=Od(String.prototype.match),Jd=Od(String.prototype.replace),QSt=Od(String.prototype.indexOf),XSt=Od(String.prototype.trim),Yo=Od(RegExp.prototype.test),r5=JSt(TypeError);function Od(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return bD(t,e,r)}}
509function JSt(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return q4(t,n)}}function Sr(t,e,n){var r;n=(r=n)!==null&&r!==void 0?r:jP,tJ&&tJ(t,null);for(var i=e.length;i--;){var s=e[i];if(typeof s=="string"){var a=n(s);a!==s&&(WSt(e)||(e[i]=a),s=a)}t[s]=!0}return t}function Ry(t){var e=YSt(null),n;for(n in t)bD(GSt,t,[n])===!0&&(e[n]=t[n]);return e}function PO(t,e){for(;t!==null;){var n=KSt(t,e);if(n){if(n.get)return Od(n.get);if(typeof n.value=="function")return Od(n.value)}t=qSt(t)}function r(i){return console.warn("fallback value for",i),null}return r}var iJ=du(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),i5=du(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),s5=du(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),eEt=du(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),a5=du(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),tEt=du(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sJ=du(["#text"]),aJ=du(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),o5=du(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),oJ=du(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","
509subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),RO=du(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nEt=Id(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rEt=Id(/<%[\w\W]*|[\w\W]*%>/gm),iEt=Id(/\${[\w\W]*}/gm),sEt=Id(/^data-[\-\w.\u00B7-\uFFFF]+$/),aEt=Id(/^aria-[\-\w]+$/),oEt=Id(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lEt=Id(/^(?:\w+script|data):/i),uEt=Id(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cEt=Id(/^html$/i),dEt=Id(/^[a-z][.\w]*(-[.\w]+)+$/i),fEt=function(){return typeof window>"u"?null:window},hEt=function(e,n){if(Vm(e)!=="object"||typeof e.createPolicy!="function")return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Gge(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fEt(),e=function($e){return Gge($e)};if(e.version="2.5.8",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var n=t.document,r=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,c=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,d=t.HTMLFormElement,f=t.DOMParser,h=t.trustedTypes,g=o.prototype,v=PO(g,"cloneNode"),b=PO(g,"nextSibling"),S=PO(g,"childNodes"),A=PO(g,"parentNode");if(typeof s=="function"){var w=r.createElement("template");w.content&&w.content.ownerDocument&&(r=w.content.ownerDocument)}var x=hEt(h,n),P=x?x.createHTML(""):"",N=r,k=N.implementation,U=N.createNodeIterator,H=N.createDocumentFragment,B=N.getElementsByTagName,q=n.importNode,Z={};try{Z=Ry(r).documentMode?r.documentMode:{}}catch{}var C={};e.isSupported=typeof A=="function"&&k&&k.createHTMLDocument!==void 0&&Z!==9;var L=nEt,V=rEt,j=iEt,X=sEt,G=aEt,ie=lEt,ae=uEt,ue=dEt,Q=oEt,de=null,le=Sr({},[].concat(lf(iJ),lf(i5),lf(s5),lf(a5),lf(sJ))),ye=null,fe=Sr({},[].concat(lf(aJ),lf(o5),lf(oJ),lf(RO))),We=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Ve=null,at=!0,Et=!0,ne=!1,Ze=!0,lt=!1,ot=!0,se=!1,Fe=!1,ht=!1,Ct=!1,pt=!1,me=!1,De=!0,Me=!1,qe="user-content-",ut=!0,Tt=!1,jt={},on=null,wn=Sr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),kr=null,Ir=Sr({},["audio","video","img","source","image","track"]),gi=null,Ln=Sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ua="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",Ue="http://www.w3.org/1999/xhtml",Rt=Ue,Ut=!1,zt=null,Yt=Sr({},[Ua,Qe,Ue],n5),vn,nn=["application/xhtml+xml","text/html"],fn="text/html",tn,$n=null,Hr=r.createElement("form"),dr=function($e){return $e instanceof RegExp||$e instanceof Function},jr=function($e){$n&&$n===$e||((!$e||Vm($e)!=="object")&&($e={}),$e=Ry($e),vn=nn.indexOf($e.PARSER_MEDIA_TYPE)===-1?vn=fn:vn=$e.PARSER_MEDIA_TYPE,tn=vn==="application/xhtml+xml"?n5:jP,de="ALLOWED_TAGS"in $e?Sr({},$e.ALLOWED_TAGS,tn):le,ye="ALLOWED_ATTR"in $e?Sr({},$e.ALLOWED_ATTR,tn):fe,zt="ALLOWED_NAMESPACES"in $e?Sr({},$e.ALLOWED_NAMESPACES,n5):Yt,gi="ADD_URI_SAFE_ATTR"in $e?Sr(Ry(Ln),$e.ADD_URI_SAFE_ATTR,tn):Ln,kr="ADD_DATA_URI_TAGS"in $e?Sr(Ry(Ir),$e.ADD_DATA_URI_TAGS,tn):Ir,on="FORBID_CONTENTS"in $e?Sr({},$e.FORBID_CONTENTS,tn):wn,Le="FORBID_TAGS"in $e?Sr({},$e.FORBID_TAGS,tn):{},Ve="FORBID_ATTR"in $e?Sr({},$e.FORBID_ATTR,tn):{},jt="USE_PROFILES"in $e?$e.USE_PROFILES:!1,at=$e.ALLOW_ARIA_ATTR!==!1,Et=$e.ALLOW_DATA_ATTR!==!1,ne=$e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ze=$e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,lt=$e.SAFE_FOR_TEMPLATES||!1,ot=$e.SAFE_FOR_XML!==!1,se=$e.WHOLE_DOCUMENT||!1,Ct=$e.RETURN_DOM||!1,pt=$e.RETURN_DOM_FRAGMENT||!1,me=$e.RETURN_TRUSTED_TYPE||!1,ht=$e.FORCE_BODY||!1,De=$e.SANITIZE_DOM!==!1,Me=$e.SANITIZE_NAMED_PROPS||!1,ut=$e.KEEP_CONTENT!==!1,Tt=$e.IN_PLACE||!1,Q=$e.ALLOWED_URI_REGEXP||Q,Rt=$e.NAMESPACE||Ue,We=$e.CUSTOM_ELEMENT_HANDLING||{},$e.CUSTOM_ELEMENT_HANDLING&&dr($e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(We.tagNameCheck=$e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$e.CUSTOM_ELEMENT_HANDLING&&dr($e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(We.attributeNameCheck=$e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$e.CUSTOM_ELEMENT_HANDLING&&typeof $e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=$e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),lt&&(Et=!1),pt&&(Ct=!0),jt&&(de=Sr({},lf(sJ)),ye=[],jt.html===!0&&(Sr(de,iJ),Sr(ye,aJ)),jt.svg===!0&&(Sr(de,i5),Sr(ye,o5),Sr(ye,RO)),jt.svgFilters===!0&&(Sr(de,s5),Sr(ye,o5),Sr(ye,RO)),jt.mathMl===!0&&(Sr(de,a5),Sr(ye,oJ),Sr(ye,RO))),$e.ADD_TAGS&&(de===le&&(de=Ry(de)),Sr(de,$e.ADD_TAGS,tn)),$e.ADD_ATTR&&(ye===fe&&(ye=Ry(ye)),Sr(ye,$e.ADD_ATTR,tn)),$e.ADD_URI_SAFE_ATTR&&Sr(gi,$e.ADD_URI_SAFE_ATTR,tn),$e.FORBID_CONTENTS&&(on===wn&&(on=Ry(on)),Sr(
vendor: 6,101 bytes, line 509
509on,$e.FORBID_CONTENTS,tn)),ut&&(de["#text"]=!0),se&&Sr(de,["html","head","body"]),de.table&&(Sr(de,["tbody"]),delete Le.tbody),du&&du($e),$n=$e)},as=Sr({},["mi","mo","mn","ms","mtext"]),ci=Sr({},["annotation-xml"]),yt=Sr({},["title","style","font","a","script"]),_i=Sr({},i5);Sr(_i,s5),Sr(_i,eEt);var $i=Sr({},a5);Sr($i,tEt);var vu=function($e){var $t=A($e);(!$t||!$t.tagName)&&($t={namespaceURI:Rt,tagName:"template"});var Zt=jP($e.tagName),fr=jP($t.tagName);return zt[$e.namespaceURI]?$e.namespaceURI===Qe?$t.namespaceURI===Ue?Zt==="svg":$t.namespaceURI===Ua?Zt==="svg"&&(fr==="annotation-xml"||as[fr]):!!_i[Zt]:$e.namespaceURI===Ua?$t.namespaceURI===Ue?Zt==="math":$t.namespaceURI===Qe?Zt==="math"&&ci[fr]:!!$i[Zt]:$e.namespaceURI===Ue?$t.namespaceURI===Qe&&!ci[fr]||$t.namespaceURI===Ua&&!as[fr]?!1:!$i[Zt]&&(yt[Zt]||!_i[Zt]):!!(vn==="application/xhtml+xml"&&zt[$e.namespaceURI]):!1},$s=function($e){$A(e.removed,{element:$e});try{$e.parentNode.removeChild($e)}catch{try{$e.outerHTML=P}catch{$e.remove()}}},Va=function($e,$t){try{$A(e.removed,{attribute:$t.getAttributeNode($e),from:$t})}catch{$A(e.removed,{attribute:null,from:$t})}if($t.removeAttribute($e),$e==="is"&&!ye[$e])if(Ct||pt)try{$s($t)}catch{}else try{$t.setAttribute($e,"")}catch{}},cs=function($e){var $t,Zt;if(ht)$e="<remove></remove>"+$e;else{var fr=rJ($e,/^[\r\n\t ]+/);Zt=fr&&fr[0]}vn==="application/xhtml+xml"&&Rt===Ue&&($e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$e+"</body></html>");var ca=x?x.createHTML($e):$e;if(Rt===Ue)try{$t=new f().parseFromString(ca,vn)}catch{}if(!$t||!$t.documentElement){$t=k.createDocument(Rt,"template",null);try{$t.documentElement.innerHTML=Ut?P:ca}catch{}}var $r=$t.body||$t.documentElement;return $e&&Zt&&$r.insertBefore(r.createTextNode(Zt),$r.childNodes[0]||null),Rt===Ue?B.call($t,se?"html":"body")[0]:se?$t.documentElement:$r},jc=function($e){return U.call($e.ownerDocument||$e,$e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null,!1)},op=function($e){return $e instanceof d&&(typeof $e.nodeName!="string"||typeof $e.textContent!="string"||typeof $e.removeChild!="function"||!($e.attributes instanceof c)||typeof $e.removeAttribute!="function"||typeof $e.setAttribute!="function"||typeof $e.namespaceURI!="string"||typeof $e.insertBefore!="function"||typeof $e.hasChildNodes!="function")},Qu=function($e){return Vm(a)==="object"?$e instanceof a:$e&&Vm($e)==="object"&&typeof $e.nodeType=="number"&&typeof $e.nodeName=="string"},cl=function($e,$t,Zt){C[$e]&&ZSt(C[$e],function(fr){fr.call(e,$t,Zt,$n)})},lp=function($e){var $t;if(cl("beforeSanitizeElements",$e,null),op($e)||Yo(/[\u0080-\uFFFF]/,$e.nodeName))return $s($e),!0;var Zt=tn($e.nodeName);if(cl("uponSanitizeElement",$e,{tagName:Zt,allowedTags:de}),$e.hasChildNodes()&&!Qu($e.firstElementChild)&&(!Qu($e.content)||!Qu($e.content.firstElementChild))&&Yo(/<[/\w]/g,$e.innerHTML)&&Yo(/<[/\w]/g,$e.textContent)||Zt==="select"&&Yo(/<template/i,$e.innerHTML)||$e.nodeType===7||ot&&$e.nodeType===8&&Yo(/<[/\w]/g,$e.data))return $s($e),!0;if(!de[Zt]||Le[Zt]){if(!Le[Zt]&&zc(Zt)&&(We.tagNameCheck instanceof RegExp&&Yo(We.tagNameCheck,Zt)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Zt)))return!1;if(ut&&!on[Zt]){var fr=A($e)||$e.parentNode,ca=S($e)||$e.childNodes;if(ca&&fr)for(var $r=ca.length,_s=$r-1;_s>=0;--_s){var kl=v(ca[_s],!0);kl.__removalCount=($e.__removalCount||0)+1,fr.insertBefore(kl,b($e))}}return $s($e),!0}return $e instanceof o&&!vu($e)||(Zt==="noscript"||Zt==="noembed"||Zt==="noframes")&&Yo(/<\/no(script|embed|frames)/i,$e.innerHTML)?($s($e),!0):(lt&&$e.nodeType===3&&($t=$e.textContent,$t=Jd($t,L," "),$t=Jd($t,V," "),$t=Jd($t,j," "),$e.textContent!==$t&&($A(e.removed,{element:$e.cloneNode()}),$e.textContent=$t)),cl("afterSanitizeElements",$e,null),!1)},Fg=function($e,$t,Zt){if(De&&($t==="id"||$t==="name")&&(Zt in r||Zt in Hr))return!1;if(!(Et&&!Ve[$t]&&Yo(X,$t))){if(!(at&&Yo(G,$t))){if(!ye[$t]||Ve[$t]){if(!(zc($e)&&(We.tagNameCheck instanceof RegExp&&Yo(We.tagNameCheck,$e)||We.tagNameCheck instanceof Function&&We.tagNameCheck($e))&&(We.attributeNameCheck instanceof RegExp&&Yo(We.attributeNameCheck,$t)||We.attributeNameCheck instanceof Function&&We.attributeNameCheck($t))||$t==="is"&&We.allowCustomizedBuiltInElements&&(We.tagNameCheck instanceof RegExp&&Yo(We.tagNameCheck,Zt)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Zt))))return!1}else if(!gi[$t]){if(!Yo(Q,Jd(Zt,ae,""))){if(!(($t==="src"||$t==="xlink:href"||$t==="href")&&$e!=="script"&&QSt(Zt,"data:")===0&&kr[$e])){if(!(ne&&!Yo(ie,Jd(Zt,ae,"")))){if(Zt)return!1}}}}}}return!0},zc=function($e){return $e!=="annotation-xml"&&rJ($e,ue)},yo=function($e){var $t,Zt,fr,ca;cl("beforeSanitizeAttributes",$e,null);var $r=$e.attributes;if(!(!$r||op($e))){var _s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};for(ca=$r.length;ca--;){$t=$r[ca];var kl=$t,Zn=kl.name,wa=kl.namespaceURI;if(Zt=Zn==="value"?$t.value:XSt($t.value),fr=tn(Zn),_s.attrName=fr,_s.attrValue=Zt,_s.keepAttr=!0,_s.forceKeepAttr=void 0,cl("uponSanitizeAttribute",$e,_s),Zt=_s.attrValue,!_s.forceKeepAttr&&(Va(Zn,$e),!!_s.keepAttr)){if(!Ze&&Yo(/\/>/i,Zt)){Va(Zn,$e);continue}lt&&(Zt=Jd(Zt,L," "),Zt=Jd(Zt,V," "),Zt=Jd(Zt,j," "));var dl=tn($e.nodeName);if(Fg(dl,fr,Zt)){if(Me&&(fr==="id"||fr==="name")&&(Va(Zn,$e),Zt=qe+Zt),ot&&Yo(/((--!?|])>)|<\/(style|title)/i,Zt)){Va(Zn,$e);continue}if(x&&Vm(h)==="object"&&typeof h.getAttributeType=="function"&&!wa)switch(h.getAttributeType(dl,fr)){case"TrustedHTML":{Zt=x.createHTML(Zt);break}case"TrustedScriptURL":{Zt=x.createScriptURL(Zt);break}}try{wa?$e.setAttributeNS(wa,Zn,Zt):$e.setAttribute(Zn,Zt),op($e)?$s($e):nJ(e.removed)}catch{}}}}cl("afterSanitizeAttributes",$e,null)}},up=function An($e){var $t,Zt=jc($e);for(cl("beforeSanitizeShadowDOM",$e,null);$t=Zt.nextNode();)cl("uponSanitizeShadowNode",$t,null),lp($t),yo($t),$t.content instanceof i&&An($t.content);cl("afterSanitizeShadowDOM",$e,null)};return e.sanitize=function(An){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$t,Zt,fr,ca,$r;if(Ut=!An,Ut&&(An="<!-->
509"),typeof An!="string"&&!Qu(An))if(typeof An.toString=="function"){if(An=An.toString(),typeof An!="string")throw r5("dirty is not a string, aborting")}else throw r5("toString is not a function");if(!e.isSupported){if(Vm(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof An=="string")return t.toStaticHTML(An);if(Qu(An))return t.toStaticHTML(An.outerHTML)}return An}if(Fe||jr($e),e.removed=[],typeof An=="string"&&(Tt=!1),Tt){if(An.nodeName){var _s=tn(An.nodeName);if(!de[_s]||Le[_s])throw r5("root node is forbidden and cannot be sanitized in-place")}}else if(An instanceof a)$t=cs("<!---->"),Zt=$t.ownerDocument.importNode(An,!0),Zt.nodeType===1&&Zt.nodeName==="BODY"||Zt.nodeName==="HTML"?$t=Zt:$t.appendChild(Zt);else{if(!Ct&&!lt&&!se&&An.indexOf("<")===-1)return x&&me?x.createHTML(An):An;if($t=cs(An),!$t)return Ct?null:me?P:""}$t&&ht&&$s($t.firstChild);for(var kl=jc(Tt?An:$t);fr=kl.nextNode();)fr.nodeType===3&&fr===ca||(lp(fr),yo(fr),fr.content instanceof i&&up(fr.content),ca=fr);if(ca=null,Tt)return An;if(Ct){if(pt)for($r=H.call($t.ownerDocument);$t.firstChild;)$r.appendChild($t.firstChild);else $r=$t;return(ye.shadowroot||ye.shadowrootmod)&&($r=q.call(n,$r,!0)),$r}var Zn=se?$t.outerHTML:$t.innerHTML;return se&&de["!doctype"]&&$t.ownerDocument&&$t.ownerDocument.doctype&&$t.ownerDocument.doctype.name&&Yo(cEt,$t.ownerDocument.doctype.name)&&(Zn="<!DOCTYPE "+$t.ownerDocument.doctype.name+`>
510`+Zn),lt&&(Zn=Jd(Zn,L," "),Zn=Jd(Zn,V," "),Zn=Jd(Zn,j," ")),x&&me?x.createHTML(Zn):Zn},e.setConfig=function(An){jr(An),Fe=!0},e.clearConfig=function(){$n=null,Fe=!1},e.isValidAttribute=function(An,$e,$t){$n||jr({});var Zt=tn(An),fr=tn($e);return Fg(Zt,fr,$t)},e.addHook=function(An,$e){typeof $e=="function"&&(C[An]=C[An]||[],$A(C[An],$e))},e.removeHook=function(An){if(C[An])return nJ(C[An])},e.removeHooks=function(An){C[An]&&(C[An]=[])},e.removeAllHooks=function(){C={}},e}var pEt=Gge(),gEt=mEt;function FE(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function mEt(t){if(t=t||{},t.circles)return vEt(t);const e=new Map;if(e.set(Date,a=>new Date(a)),e.set(Map,(a,o)=>new Map(r(Array.from(a),o))),e.set(Set,(a,o)=>new Set(r(Array.from(a),o))),t.constructorHandlers)for(const a of t.constructorHandlers)e.set(a[0],a[1]);let n=null;return t.proto?s:i;function r(a,o){const l=Object.keys(a),u=new Array(l.length);for(let c=0;c<l.length;c++){const d=l[c],f=a[d];typeof f!="object"||f===null?u[d]=f:f.constructor!==Object&&(n=e.get(f.constructor))?u[d]=n(f,o):ArrayBuffer.isView(f)?u[d]=FE(f):u[d]=o(f)}return u}function i(a){if(typeof a!="object"||a===null)return a;
510if(Array.isArray(a))return r(a,i);if(a.constructor!==Object&&(n=e.get(a.constructor)))return n(a,i);const o={};for(const l in a){if(Object.hasOwnProperty.call(a,l)===!1)continue;const u=a[l];typeof u!="object"||u===null?o[l]=u:u.constructor!==Object&&(n=e.get(u.constructor))?o[l]=n(u,i):ArrayBuffer.isView(u)?o[l]=FE(u):o[l]=i(u)}return o}function s(a){if(typeof a!="object"||a===null)return a;if(Array.isArray(a))return r(a,s);if(a.constructor!==Object&&(n=e.get(a.constructor)))return n(a,s);const o={};for(const l in a){const u=a[l];typeof u!="object"||u===null?o[l]=u:u.constructor!==Object&&(n=e.get(u.constructor))?o[l]=n(u,s):ArrayBuffer.isView(u)?o[l]=FE(u):o[l]=s(u)}return o}}function vEt(t){const e=[],n=[],r=new Map;if(r.set(Date,l=>new Date(l)),r.set(Map,(l,u)=>new Map(s(Array.from(l),u))),r.set(Set,(l,u)=>new Set(s(Array.from(l),u))),t.constructorHandlers)for(const l of t.constructorHandlers)r.set(l[0],l[1]);let i=null;return t.proto?o:a;function s(l,u){const c=Object.keys(l),d=new Array(c.length);for(let f=0;f<c.length;f++){const h=c[f],g=l[h];if(typeof g!="object"||g===null)d[h]=g;else if(g.constructor!==Object&&(i=r.get(g.constructor)))d[h]=i(g,u);else if(ArrayBuffer.isView(g))d[h]=FE(g);else{const v=e.indexOf(g);v!==-1?d[h]=n[v]:d[h]=u(g)}}return d}function a(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return s(l,a);if(l.constructor!==Object&&(i=r.get(l.constructor)))return i(l,a);const u={};e.push(l),n.push(u);for(const c in l){if(Object.hasOwnProperty.call(l,c)===!1)continue;const d=l[c];if(typeof d!="object"||d===null)u[c]=d;else if(d.constructor!==Object&&(i=r.get(d.constructor)))u[c]=i(d,a);else if(ArrayBuffer.isView(d))u[c]=FE(d);else{const f=e.indexOf(d);f!==-1?u[c]=n[f]:u[c]=a(d)}}return e.pop(),n.pop(),u}function o(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return s(l,o);if(l.constructor!==Object&&(i=r.get(l.constructor)))return i(l,o);const u={};e.push(l),n.push(u);for(const c in l){const d=l[c];if(typeof d!="object"||d===null)u[c]=d;else if(d.constructor!==Object&&(i=r.get(d.constructor)))u[c]=i(d,o);else if(ArrayBuffer.isView(d))u[c]=FE(d);else{const f=e.indexOf(d);f!==-1?u[c]=n[f]:u[c]=o(d)}}return e.pop(),n.pop(),u}}const Wge=pi(gEt);/**
511 * @name codsen-utils
512 * @fileoverview Various utility functions
513 * @version 1.7.0
514 * @author Roy Revelt
515 * @license MIT
516 * {@link https://codsen.com/os/codsen-utils/}
517 */Wge();function K4(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function $S(t){return typeof t=="string"}function yEt(t){return Number.isFinite(t)}function TS(t){return Number.isSafeInteger(t)&&t>=0}function fm(t){return t!=null}function bEt(t,e){return K4(t)&&$S(e)&&e in t}var SEt=typeof global=="object"&&global&&global.Object===Object&&global,EEt=typeof self=="object"&&self&&self.Object===Object&&self,vH=SEt||EEt||Function("return this")(),V1=vH.Symbol,qge=Object.prototype,TEt=qge.hasOwnProperty,AEt=qge.toString,BA=V1?V1.toStringTag:void 0;function wEt(t){var e=TEt.call(t,BA),n=t[BA];try{t[BA]=void 0;var r=!0}catch{}var i=AEt.call(t);return r&&(e?t[BA]=n:delete t[BA]),i}var _Et=Object.prototype,CEt=_Et.toString;function xEt(t){return CEt.call(t)}var IEt="[object Null]",OEt="[object Undefined]",lJ=V1?V1.toStringTag:void 0;function Kge(t){return t==null?t===void 0?OEt:IEt:lJ&&lJ in Object(t)?wEt(t):xEt(t)}function Yge(t){return t!=null&&typeof t=="object"}var PEt="[object Symbol]";function REt(t){return typeof t=="symbol"||Yge(t)&&Kge(t)==PEt}function LEt(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var DEt=Array.isArray,uJ=V1?V1.prototype:void 0,cJ=uJ?uJ.toString:void 0;function yH(t){if(typeof t=="string")return t;if(DEt(t))return LEt(t,yH)+"";if(REt(t))return cJ?cJ.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var kEt=/\s/;function NEt(t){for(var e=t.length;e--&&kEt.test(t.charAt(e)););return e}var MEt=/^\s+/;function FEt(t){return t&&t.slice(0,NEt(t)+1).replace(MEt,"")}function Zge(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Qge(t){return t}var $Et="[object AsyncFunction]",BEt="[object Function]",UEt="[object GeneratorFunction]",VEt="[object Proxy]";function Xge(t){if(!Zge(t))return!1;var e=Kge(t);return e==BEt||e==UEt||e==$Et||e==VEt}var l5=vH["__core-js_shared__"],dJ=function(){var t=/[^.]+$/.exec(l5&&l5.keys&&l5.keys.IE_PROTO||"");
517return t?"Symbol(src)_1."+t:""}();function HEt(t){return!!dJ&&dJ in t}var jEt=Function.prototype,zEt=jEt.toString;function GEt(t){if(t!=null){try{return zEt.call(t)}catch{}try{return t+""}catch{}}return""}var WEt=/[\\^$.*+?()[\]{}|]/g,qEt=/^\[object .+?Constructor\]$/,KEt=Function.prototype,YEt=Object.prototype,ZEt=KEt.toString,QEt=YEt.hasOwnProperty,XEt=RegExp("^"+ZEt.call(QEt).replace(WEt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JEt(t){if(!Zge(t)||HEt(t))return!1;var e=Xge(t)?XEt:qEt;return e.test(GEt(t))}function e1t(t,e){return t==null?void 0:t[e]}function bH(t,e){var n=e1t(t,e);return JEt(n)?n:void 0}function t1t(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var n1t=800,r1t=16,i1t=Date.now;function s1t(t){var e=0,n=0;return function(){var r=i1t(),i=r1t-(r-n);if(n=r,i>0){if(++e>=n1t)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function a1t(t){return function(){return t}}var fJ=function(){try{var t=bH(Object,"defineProperty");return t({},"",{}),t}catch{}}(),o1t=fJ?function(t,e){return fJ(t,"toString",{configurable:!0,enumerable:!1,value:a1t(e),writable:!0})}:Qge,l1t=s1t(o1t);function u1t(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function c1t(t){return t!==t}function d1t(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function SH(t,e,n){return e===e?d1t(t,e,n):u1t(t,c1t,n)}function f1t(t,e){var n=t==null?0:t.length;return!!n&&SH(t,e,0)>-1}function h1t(t,e){return t===e||t!==t&&e!==e}var hJ=Math.max;function p1t(t,e,n){return e=hJ(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=hJ(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=r[i];return o[e]=n(a),t1t(t,this,o)}}function g1t(t,e){return l1t(p1t(t,e,Qge),t+"")}var m1t=9007199254740991;function v1t(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=m1t}function y1t(t){return t!=null&&v1t(t.length)&&!Xge(t)}var hC=bH(Object,"create");function b1t(){this.__data__=hC?hC(null):{},this.size=0}function S1t(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var E1t="__lodash_hash_undefined__",T1t=Object.prototype,A1t=T1t.hasOwnProperty;function w1t(t){var e=this.__data__;if(hC){var n=e[t];return n===E1t?void 0:n}return A1t.call(e,t)?e[t]:void 0}var _1t=Object.prototype,C1t=_1t.hasOwnProperty;function x1t(t){var e=this.__data__;return hC?e[t]!==void 0:C1t.call(e,t)}var I1t="__lodash_hash_undefined__";function O1t(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hC&&e===void 0?I1t:e,this}function sb(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}sb.prototype.clear=b1t;sb.prototype.delete=S1t;sb.prototype.get=w1t;sb.prototype.has=x1t;sb.prototype.set=O1t;function P1t(){this.__data__=[],this.size=0}function SN(t,e){for(var n=t.length;n--;)if(h1t(t[n][0],e))return n;return-1}var R1t=Array.prototype,L1t=R1t.splice;function D1t(t){var e=this.__data__,n=SN(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():L1t.call(e,n,1),--this.size,!0}function k1t(t){var e=this.__data__,n=SN(e,t);return n<0?void 0:e[n][1]}function N1t(t){return SN(this.__data__,t)>-1}function M1t(t,e){var n=this.__data__,r=SN(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function xT(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}xT.prototype.clear=P1t;xT.prototype.delete=D1t;xT.prototype.get=k1t;xT.prototype.has=N1t;xT.prototype.set=M1t;var F1t=bH(vH,"Map");function $1t(){this.size=0,this.__data__={hash:new sb,map:new(F1t||xT),string:new sb}}function B1t(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function EN(t,e){var n=t.__data__;return B1t(e)?n[typeof e=="string"?"string":"hash"]:n.map}function U1t(t){var e=EN(this,t).delete(t);return this.size-=e?1:0,e}function V1t(t){return EN(this,t).get(t)}function H1t(t){return EN(this,t).has(t)}function j1t(t,e){var n=EN(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function IT(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}IT.prototype.clear=$1t;IT.prototype.delete=U1t;IT.prototype.get=V1t;IT.prototype.has=H1t;IT.prototype.set=j1t;function z1t(t){return t==null?"":yH(t)}function G1t(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function W1t(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:G1t(t,e,n)}var q1t="\\ud800-\\udfff",K1t="\\u0300-\\u036f",Y1t="\\ufe20-\\ufe2f",Z1t="\\u20d0-\\u20ff",Q1t=K1t+Y1t+Z1t,X1t="\\ufe0e\\ufe0f",J1t="\\u200d",eTt=RegExp("["+J1t+q1t+Q1t+X1t+"]");function tTt(t){return eTt.test(t)}function nTt(t){return t.split("")}var Jge="\\ud800-\\udfff",rTt="\\u0300-\\u036f",iTt="\\ufe20-\\ufe2f",sTt="\\u20d0-\\u20ff",aTt=rTt+iTt+sTt,oTt="\\ufe0e\\ufe0f",lTt="["+Jge+"]",Y4="["+aTt+"]",Z4="\\ud83c[\\udffb-\\udfff]",uTt="(?:"+Y4+"|"+Z4+")",eme="[^"+Jge+"]",tme="(?:\\ud83c[\\udde6-\\uddff]){2}",nme="[\\ud800-\\udbff][\\udc00-\\udfff]",cTt="\\u200d",rme=uTt+"?",ime="["+oTt+"]?",dTt="(?:"+cTt+"(?:"+[eme,tme,nme].join("|")+")"+ime+rme+")*",fTt=ime+rme+dTt,hTt="(?:"+[eme+Y4+"?",Y4,tme,nme,lTt].join("|")+")",pTt=RegExp(Z4+"(?="+Z4+")|"+hTt+fTt,"g");function gTt(t){return t.match(pTt)||[]}function pJ(t){return tTt(t)?gTt(t):nTt(t)}var mTt="__lodash_hash_undefined__";function vTt(t){return this.__data__.set(t,mTt),this}function yTt(t){return this.__data__.has(t)}function SD(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new IT;++e<n;)this.add(t[e])}SD.prototype.add=SD.prototype.push=vTt;SD.prototype.has=yTt;function bTt(t,e){return t.has(e)}function STt(t){return Yge(t)&&y1t(t)}var ETt=200;function TTt(t,e,n,r){var i=-1,s=f1t,a=!0,o=t.length,l=[],u=e.length;if(!o)return l;e.length>=ETt&&(s=bTt,a=!1,e=new SD(e));e:for(;++i<o;){var c=t[i],d=c;if(c=c!==0?c:0,a&&d===d){for(var f=u;f--;)if(e[f]===d)continue e;l.push(c)}else s(e,d,r)||l.push(c)}return l}function ATt(t,e){for(var n=t.length;n--&&SH(e,t[n],0)>-1;);return n}function wTt(t,e){for(var n=-1,r=t.length;++n<r&&SH(e,t[n],0)>-1;);return n}function gJ(t,e,n){if(t=z1t(t),t&&e===void 0)return FEt(t);if(!t||!(e=yH(e)))return t;var r=pJ(t),i=pJ(e),s=wTt(r,i),a=ATt(r,i)+1;return W1t(r,s,a).join("")}var _Tt=g1t(function(t,e){return STt(t)?TTt(t,e):[]});/**
518 * @name ranges-sort
519 * @fileoverview Sort string index ranges
520 * @version 6.1.0
521 * @author Roy Revelt
522 * @license MIT
523 * {@link https://codsen.com/os/ranges-sort/}
524 */var CTt={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function ED(t,e){if(!Array.isArray(t)||!t.length)return t;let n={...CTt,...e},r,i;if(n.strictlyTwoElementsInRangeArrays&&!t.every((o,l)=>!Array.isArray(o)||o.length!==2?(r=l,i=o.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${r}th range (${JSON.stringify(t[r],null,4)}) has not two but ${i} elements!`);if(!t.every((o,l)=>!Array.isArray(o)||!Number.isInteger(o[0])||o[0]<0||!Number.isInteger(o[1])||o[1]<0?(r=l,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${r}th range (${JSON.stringify(t[r],null,4)}
524) does not consist of only natural numbers!`);let s=t.length**2,a=0;return Array.from(t).sort((o,l)=>(n.progressFn&&(a+=1,n.progressFn(Math.floor(a*100/s))),o[0]===l[0]?o[1]<l[1]?-1:o[1]>l[1]?1:0:o[0]<l[0]?-1:1))}/**
525 * @name ranges-merge
526 * @fileoverview Merge and sort string index ranges
527 * @version 9.1.0
528 * @author Roy Revelt
529 * @license MIT
530 * {@link https://codsen.com/os/ranges-merge/}
531 */var mJ={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function xTt(t,e){function n(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}if(!Array.isArray(t)||!t.length)return null;let r;if(e)if(n(e)){if(r={...mJ,...e},r.progressFn&&n(r.progressFn)&&!Object.keys(r.progressFn).length)r.progressFn=null;else if(r.progressFn&&typeof r.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof r.progressFn}", equal to ${JSON.stringify(r.progressFn,null,4)}`);if(![1,2,"1","2"].includes(r.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof r.mergeType}", equal to ${JSON.stringify(r.mergeType,null,4)}`);if(typeof r.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof r.joinRangesThatTouchEdges}", equal to ${JSON.stringify(r.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
532${JSON.stringify(e,null,4)} (type ${typeof e})`);else r={...mJ};let i=t.filter(u=>Array.isArray(u)).map(u=>[...u]).filter(u=>u[2]!==void 0||u[0]!==u[1]),s,a,o;r.progressFn?s=ED(i,{progressFn:u=>{o=Math.floor(u/5),o!==a&&(a=o,r.progressFn(o))}}):s=ED(i);let l=s.length-1;for(let u=l;u>0;u--)r.progressFn&&(o=Math.floor((1-u/l)*78)+21,o!==a&&o>a&&(a=o,r.progressFn(o))),(s[u][0]<=s[u-1][0]||!r.joinRangesThatTouchEdges&&s[u][0]<s[u-1][1]||r.joinRangesThatTouchEdges&&s[u][0]<=s[u-1][1])&&(s[u-1][0]=Math.min(s[u][0],s[u-1][0]),s[u-1][1]=Math.max(s[u][1],s[u-1][1]),s[u][2]!==void 0&&(s[u-1][0]>=s[u][0]||s[u-1][1]<=s[u][1])&&s[u-1][2]!==null&&(s[u][2]===null&&s[u-1][2]!==null?s[u-1][2]=null:s[u-1][2]!=null?+r.mergeType==2&&s[u-1][0]===s[u][0]?s[u-1][2]=s[u][2]:s[u-1][2]+=s[u][2]:s[u-1][2]=s[u][2]),s.splice(u,1),u=s.length);return s.length?s:null}var ITt="Invariant failed";function OTt(t,e){if(!t)throw new Error(ITt)}/**
533 * @name ranges-apply
534 * @fileoverview Take an array of string index ranges, delete/replace the string according to them
535 * @version 7.1.0
536 * @author Roy Revelt
537 * @license MIT
538 * {@link https://codsen.com/os/ranges-apply/}
539 */function PTt(t,e,n){if(arguments.length===0)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if(typeof t!="string")throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(e&&!Array.isArray(e))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(!(e!=null&&e.filter(a=>a).length))return t;let r;Array.isArray(e)&&Number.isInteger(e[0])&&Number.isInteger(e[1])?r=[Array.from(e)]:r=Array.from(e),r.length,r.filter(a=>a).forEach((a,o)=>{if(!Array.isArray(a))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${o}th element not an array: ${JSON.stringify(a,null,4)}, which is ${typeof a}`);if(!Number.isInteger(a[0])){if(!Number.isInteger(+a[0])||+a[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${o}th element, array ${JSON.stringify(a,null,0)}. Its first element is not an integer, string index, but ${typeof a[0]}, equal to: ${JSON.stringify(a[0],null,4)}.`);r[o][0]=+r[o][0]}if(!Number.isInteger(a[1])){if(!Number.isInteger(+a[1])||+a[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${o}th element, array ${JSON.stringify(a,null,0)}. Its second element is not an integer, string index, but ${typeof a[1]}, equal to: ${JSON.stringify(a[1],null,4)}.`);r[o][1]=+r[o][1]}});let i=xTt(r,{progressFn:a=>{}});OTt(i);let s=i.length;if(s>0){let a=t.slice(i[s-1][1]);t=i.reduce((o,l,u,c)=>{let d=u===0?0:c[u-1][1],f=c[u][0];return`${o}${t.slice(d,f)}${c[u][2]||""}`},""),t+=a}return t}/**
540 * @name string-collapse-leading-whitespace
541 * @fileoverview Collapse the leading and trailing whitespace of a string
542 * @version 7.1.0
543 * @author Roy Revelt
544 * @license MIT
545 * {@link https://codsen.com/os/string-collapse-leading-whitespace/}
546 */function u5(t,e=1){let n=" ";function r(s){return Array.from(s).reverse().join("")}function i(s,a,o){let l=o?`
547`:"\r",u=o?"\r":`
548`;if(!s)return s;let c=0,d="";for(let f=0,h=s.length;f<h;f++)(s[f]===l||s[f]===u&&s[f-1]!==l)&&c++,`\r
549`.includes(s[f])||s[f]===n?s[f]===n?d+=s[f]:s[f]===l?c<=a&&(d+=s[f],s[f+1]===u&&(d+=s[f+1],f++)):s[f]===u&&(s==null?void 0:s[f-1])!==l&&c<=a&&(d+=s[f]):!s[f+1]&&!c&&(d+=" ");return d}if(typeof t=="string"&&t.length){let s=1;typeof+e=="number"&&Number.isInteger(+e)&&+e>=0&&(s=+e);let a="",o="";if(!t.trim())a=t;else if(!t[0].trim()){for(let l=0,u=t.length;l<u;l++)if(t[l].trim()){a=t.slice(0,l);break}}if(t.trim()&&(t.slice(-1).trim()===""||t.slice(-1)===n)){for(let l=t.length;l--;)if(t[l].trim()){o=t.slice(l+1);break}}return`${i(a,s,!1)}${t.trim()}${r(i(r(o),s,!0))}`}return t}/**
550 * @name ranges-push
551 * @fileoverview Gather string index ranges
552 * @version 7.1.0
553 * @author Roy Revelt
554 * @license MIT
555 * {@link https://codsen.com/os/ranges-push/}
556 */var vJ={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function RTt(t,e){var u;function n(c){return!!c&&typeof c=="object"&&!Array.isArray(c)}if(!Array.isArray(t)||!t.length)return null;let r;if(e)if(n(e)){if(r={...vJ,...e}
556,r.progressFn&&n(r.progressFn)&&!Object.keys(r.progressFn).length)r.progressFn=null;else if(r.progressFn&&typeof r.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof r.progressFn}", equal to ${JSON.stringify(r.progressFn,null,4)}`);if(![1,2,"1","2"].includes(r.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof r.mergeType}", equal to ${JSON.stringify(r.mergeType,null,4)}`);if(typeof r.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof r.joinRangesThatTouchEdges}", equal to ${JSON.stringify(r.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`ranges-merge: [THROW_ID_03] the second input argument must be a plain object. It was given as:
557${JSON.stringify(e,null,4)} (type ${typeof e})`);else r={...vJ};let i=t.filter(c=>Array.isArray(c)).map(c=>[...c]).filter(c=>c[2]!==void 0||c[0]!==c[1]),s,a,o;r.progressFn?s=ED(i,{progressFn:c=>{o=Math.floor(c/5),o!==a&&(a=o,r.progressFn!=null&&r.progressFn(o))}}):s=ED(i);let l=s.length-1;for(let c=l;c>0;c--)r.progressFn&&(o=Math.floor((1-c/l)*78)+21,o!==a&&o>a&&(a=o,r.progressFn(o))),(s[c][0]<=s[c-1][0]||!r.joinRangesThatTouchEdges&&s[c][0]<s[c-1][1]||r.joinRangesThatTouchEdges&&s[c][0]<=s[c-1][1])&&(s[c-1][0]=Math.min(s[c][0],s[c-1][0]),s[c-1][1]=Math.max(s[c][1],s[c-1][1]),s[c][2]!==void 0&&(s[c-1][0]>=s[c][0]||s[c-1][1]<=s[c][1])&&s[c-1][2]!==null&&(s[c][2]===null&&s[c-1][2]!==null?s[c-1][2]=null:s[c-1][2]!=null?+((u=r||{})==null?void 0:u.mergeType)==2&&s[c-1][0]===s[c][0]?s[c-1][2]=s[c][2]:s[c-1][2]+=s[c][2]:s[c-1][2]=s[c][2]),s.splice(c,1),c=s.length);return s.length?s:null}var LTt={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1},DTt=class{constructor(t){et(this,"ranges");et(this,"opts");let e={...LTt,...t};if(e.mergeType&&e.mergeType!==1&&e.mergeType!==2)if($S(e.mergeType)&&e.mergeType.trim()==="1")e.mergeType=1;else if($S(e.mergeType)&&e.mergeType.trim()==="2")e.mergeType=2;else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof e.mergeType}", equal to ${JSON.stringify(e.mergeType,null,4)}`);this.opts=e,this.ranges=[]}add(t,e,n){var s;if(t==null&&e==null)return;if(fm(t)&&!fm(e)){if(Array.isArray(t)){if(t.length){if(t.some(a=>Array.isArray(a))){t.forEach(a=>{Array.isArray(a)&&this.add(...a)});return}t.length&&TS(+t[0])&&TS(+t[1])&&this.add(...t)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(t,null,0)}) but second-one, "to" is not (${JSON.stringify(e,null,0)})`)}else if(!fm(t)&&fm(e))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(e,null,0)}) but first-one, "from" is not (${JSON.stringify(t,null,0)})`);let r=+t,i=+e;if(TS(r)&&TS(i)){if(fm(n)&&!$S(n)&&!yEt(n))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof n}, equal to:
558${JSON.stringify(n,null,4)}`);if(fm(this.ranges)&&Array.isArray(this.last())&&r===this.last()[1]){if(this.last()[1]=i,this.last()[2],this.last()[2]!==null&&fm(n)){let a=this.last()[2]&&this.last()[2].length&&(!((s=this.opts)!=null&&s.mergeType)||this.opts.mergeType===1)?`${this.last()[2]}${n}`:n;this.opts.limitToBeAddedWhitespace&&(a=u5(a,this.opts.limitLinebreaksCount)),$S(a)&&!a.length||(this.last()[2]=a)}}else{this.ranges||(this.ranges=[]);let a=n!==void 0&&!($S(n)&&!n.length)?[r,i,n&&this.opts.limitToBeAddedWhitespace?u5(n,this.opts.limitLinebreaksCount):n]:[r,i];this.ranges.push(a)}}else throw TS(r)&&r>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof i}" equal to: ${JSON.stringify(i,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof r}" equal to: ${JSON.stringify(r,null,4)}`)}push(t,e,n){this.add(t,e,n)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=RTt(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(t=>fm(t[2])?[t[0],t[1],u5(t[2],this.opts.limitLinebreaksCount)]:t):this.ranges):null}wipe(){this.ranges=[]}replace(t){if(Array.isArray(t)&&t.length)if(Array.isArray(t[0])&&TS(t[0][0]))this.ranges=Array.from(t);else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(t[0],null,4)} should be an array and its first element should be an integer, a string index.`);else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};/**
559 * @name string-left-right
560 * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
561 * @version 6.1.0
562 * @author Roy Revelt
563 * @license MIT
564 * {@link https://codsen.com/os/string-left-right/}
565 */Wge();var c5=" ";function kTt({str:t,idx:e=0,stopAtNewlines:n=!1,stopAtRawNbsp:r=!1}){if(typeof t!="string"||!t.length||((!e||typeof e!="number")&&(e=0),!t[e+1]))return null;if(t[e+1]&&(t[e+1].trim()||n&&`
566\r`.includes(t[e+1])||r&&t[e+1]===c5))return e+1;if(t[e+2]&&(t[e+2].trim()||n&&`
567\r`.includes(t[e+2])||r&&t[e+2]===c5))return e+2;for(let i=e+1,s=t.length;i<s;i++)if(t[i].trim()||n&&`
568\r`.includes(t[i])||r&&t[i]===c5)return i;return null}function uh(t,e=0){return kTt({str:t,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}/**
569 * @name string-strip-html
570 * @fileoverview Strip HTML tags from strings. No parser, accepts mixed sources.
571 * @version 13.5.0
572 * @author Roy Revelt
573 * @license MIT
574 * {@link https://codsen.com/os/string-strip-html/}
575 */function NTt(t){return/[-_A-Za-z0-9]/.test(t)}function yJ(t,e){if(!t)return[];if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim());if(typeof t=="string")return t.trim()?[t]:[];throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] ${e} must be array containing zero or more strings or something falsey. Currently it's equal to: ${t}, that a type of ${typeof t}.`)}function LO(t,e,n,r){for(let i=e,s=t.length;i<s;i++){if(t.startsWith(n,i))return!0;
575if(t.startsWith(r,i))return!1}return!1}function bJ(t,e,n){var r,i,s,a,o,l,u;return t!=null&&t.quotes,(r=t==null?void 0:t.quotes)!=null&&r.value&&LO(e,n+1,t.quotes.value,">"),(i=t==null?void 0:t.quotes)==null||i.next,LO(e,((s=t==null?void 0:t.quotes)==null?void 0:s.next)-1,(a=t==null?void 0:t.quotes)==null?void 0:a.value,">"),!(t!=null&&t.quotes)||!LO(e,n+1,t.quotes.value,">")&&((o=t==null?void 0:t.quotes)==null?void 0:o.next)!==-1&&LO(e,((l=t==null?void 0:t.quotes)==null?void 0:l.next)-1,(u=t==null?void 0:t.quotes)==null?void 0:u.value,">")}function MTt(t,e){return(e.match(new RegExp(t,"g"))||[]).length}var UA=new Set(["!doctype","abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"]),d5=new Set(["a","b","i","p","q","s","u"]),f5=new Set([".",",",";","!","?"]),SJ=new Set([".",",","?",";",")","…",'"',"»"]),FTt=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]),EJ={ignoreTags:[],ignoreTagsWithTheirContents:[],onlyStripTags:[],stripTogetherWithTheirContents:["script","style","xml"],skipHtmlDecoding:!1,trimOnlySpaces:!1,stripRecognisedHTMLOnly:!1,dumpLinkHrefsNearby:{enabled:!1,putOnNewLine:!1,wrapHeads:"",wrapTails:""},ignoreIndentations:!1,cb:null,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100};function vw(t,e){var ue,Q,de,le,ye,fe,We,Le,Ve,at,Et;let n=Date.now(),r=[],i=[],s=[],a=[],o={};function l(){o={attributes:[]}}l();let u=null,c=null,d=null,f=!1,h={},g={tagName:"",hrefValue:"",openingTagEnds:void 0},v="",b=!1,S=null,A=!0;function w(ne,Ze,lt){if(Array.isArray(Ze.stripTogetherWithTheirContents)&&(Ze.stripTogetherWithTheirContents.includes(o.name)||Ze.stripTogetherWithTheirContents.includes("*")))if(o.slashPresent&&Array.isArray(r)&&r.some(ot=>ot.name===o.name)){for(let ot=r.length;ot--;)if(r[ot].name===o.name){a=a.filter(([Fe,ht])=>(Fe<r[ot].lastOpeningBracketAt||Fe>=ne+1)&&(ht<=r[ot].lastOpeningBracketAt||ht>ne+1));let se=ne+1;o.lastClosingBracketAt&&(se=o.lastClosingBracketAt+1),a.push([r[ot].lastOpeningBracketAt,se]),SJ.has(t[ne])&&Ze.cb?Ze.cb({tag:o,deleteFrom:r[ot].lastOpeningBracketAt,deleteTo:ne+1,insert:null,rangesArr:lt,proposedReturn:[r[ot].lastOpeningBracketAt,ne,null]}):Ze.cb&&Ze.cb({tag:o,deleteFrom:r[ot].lastOpeningBracketAt,deleteTo:ne,insert:"",rangesArr:lt,proposedReturn:[r[ot].lastOpeningBracketAt,ne,""]}),r.splice(ot,1);break}}else o.slashPresent||r.push(o);else Array.isArray(Ze.ignoreTagsWithTheirContents)&&U(ne,Ze,o)&&(A=!1)}function x(ne,Ze,lt,ot,se,Fe){var Me;if(Array.isArray(C.current())&&typeof lt=="number"&&C.current()[0][0]===0&&C.current()[0][1]>=lt)return"";if(t.length===ot&&Fe&&!((Me=B==null?void 0:B.dumpLinkHrefsNearby)!=null&&Me.enabled))return null;let ht="";if(Number.isInteger(lt)&&lt<se&&(ht+=ne.slice(lt,se)),Number.isInteger(ot)&&ot>Fe+1){let qe=ne.slice(Fe+1,ot);ot&&!uh(t,ot-1)&&(qe=qe.trimEnd()),qe.includes(`
576`)&&N(ot,ne)?ht+=" ":ht+=qe}let Ct=!SJ.has(ne[Ze]),pt=ne[ot-1]!==">"||!ne[lt].trim(),me=!['"',"("].includes(ne[se-1]),De=![";",".",":","!"].includes(ne[Ze]);if((Ct||pt&&me&&De)&&(pt||me)&&ne[Ze]!=="!"&&(!FTt.has(o.name)||typeof lt=="number"&&lt<se||typeof ot=="number"&&ot>Fe+1)){let qe=ht.match(/\n/g);return Array.isArray(qe)&&qe.length?qe.length===1?`
577`:qe.length===2?`
578
579`:`
580
581
582`:" "}return""}function P(ne,Ze){var lt,ot;if((lt=ne.dumpLinkHrefsNearby)!=null&&lt.enabled&&g.tagName&&g.tagName===o.name&&o.lastOpeningBracketAt&&(g.openingTagEnds&&o.lastOpeningBracketAt>g.openingTagEnds||!g.openingTagEnds)&&(b=!0),b){let se=(ot=ne.dumpLinkHrefsNearby)!=null&&ot.putOnNewLine?`
583
584`:"";v=`${se}${g.hrefValue}`,(typeof Ze!="number"||uh(t,Ze-1))&&(v+=se)}}function N(ne,Ze){return Ze?Ze[ne]==="<"&&Ze[ne+1]!=="%":t[ne]==="<"&&t[
584ne+1]!=="%"}function k(ne){return t[ne]===">"&&t[ne-1]!=="%"}function U(ne,Ze,lt){if(Ze.ignoreTagsWithTheirContents.includes("*"))return!0;let ot=t.indexOf(`<${lt.name}`,ne),se=t.indexOf(`</${lt.name}`,ne);return!lt.slashPresent&&se===-1||lt.slashPresent&&!i.some(Fe=>Fe.name===lt.name)||se>-1&&ot>-1&&ot<se?!1:Ze.ignoreTagsWithTheirContents.includes(lt.name)}if(typeof t!="string")throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof t).toLowerCase()}, equal to:
585${JSON.stringify(t,null,4)}`);if(e)if(K4(e)){if(e.reportProgressFunc&&typeof e.reportProgressFunc!="function")throw new Error(`string-strip-html/stripHtml(): [THROW_ID_03] The Optional Options Object's key reportProgressFunc, callback function, should be a function but it was given as type ${typeof e.reportProgressFunc}, equal to ${JSON.stringify(e.reportProgressFunc,null,4)}`);if(typeof e.dumpLinkHrefsNearby=="boolean"&&e.dumpLinkHrefsNearby!=null)throw new Error(`string-strip-html/stripHtml(): [THROW_ID_04] The Optional Options Object's key should be a plain object but it was given as type ${typeof e.dumpLinkHrefsNearby}, equal to ${JSON.stringify(e.dumpLinkHrefsNearby,null,4)}`)}else throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof e).toLowerCase()}, equal to:
586${JSON.stringify(e,null,4)}`);function H(){b&&(g={tagName:"",hrefValue:"",openingTagEnds:void 0},b=!1)}let B={...EJ,...e,dumpLinkHrefsNearby:Object.assign({},EJ.dumpLinkHrefsNearby,e==null?void 0:e.dumpLinkHrefsNearby)};if(bEt(B,"returnRangesOnly"))throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_05] The Optional Options Object's key returnRangesOnly has been removed from the API since v.5 release.");if(B.reportProgressFunc){if(typeof B.reportProgressFuncFrom!="number")throw new Error(`string-strip-html/stripHtml(): [THROW_ID_06] The Optional Options Object's key reportProgressFuncFrom, callback function's "from" range, should be a number but it was given as type ${typeof B.reportProgressFuncFrom}, equal to ${JSON.stringify(B.reportProgressFuncFrom,null,4)}`);if(typeof B.reportProgressFuncTo!="number")throw new Error(`string-strip-html/stripHtml(): [THROW_ID_07] The Optional Options Object's key reportProgressFuncTo, callback function's "to" range, should be a number but it was given as type ${typeof B.reportProgressFuncTo}, equal to ${JSON.stringify(B.reportProgressFuncTo,null,4)}`)}B.ignoreTags=yJ(B.ignoreTags,"resolvedOpts.ignoreTags"),B.onlyStripTags=yJ(B.onlyStripTags,"resolvedOpts.onlyStripTags");let q=!!B.onlyStripTags.length;B.onlyStripTags.length&&B.ignoreTags.length&&(B.onlyStripTags=_Tt(B.onlyStripTags,...B.ignoreTags)),B.stripTogetherWithTheirContents?typeof B.stripTogetherWithTheirContents=="string"&&B.stripTogetherWithTheirContents.length&&(B.stripTogetherWithTheirContents=[B.stripTogetherWithTheirContents]):B.stripTogetherWithTheirContents=[];let Z={};if(B.stripTogetherWithTheirContents&&Array.isArray(B.stripTogetherWithTheirContents)&&B.stripTogetherWithTheirContents.length&&!B.stripTogetherWithTheirContents.every((ne,Ze)=>typeof ne!="string"?(Z.el=ne,Z.i=Ze,!1):!0))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_08] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${Z.i} has a value ${Z.el} which is not string but ${(typeof Z.el).toLowerCase()}.`);B.cb||(B.cb=({rangesArr:ne,proposedReturn:Ze})=>{Ze&&ne.push(...Ze)});let C=new DTt({limitToBeAddedWhitespace:!0,limitLinebreaksCount:2});if(!B.skipHtmlDecoding)for(;t!==PZ(t,{scope:"strict"});)t=PZ(t,{scope:"strict"});let L=!1,V=!1,j=0,X=0,G=t.length,ie=Math.floor(G/2);for(let ne=0;ne<G;ne++){if(B.reportProgressFunc&&(G>1e3&&G<2e3?ne===ie&&B.reportProgressFunc(Math.floor((B.reportProgressFuncTo-B.reportProgressFuncFrom)/2)):G>=2e3&&(j=B.reportProgressFuncFrom+Math.floor(ne/G*(B.reportProgressFuncTo-B.reportProgressFuncFrom)),j!==X&&(X=j,B.reportProgressFunc(j)))),Object.keys(o).length>1&&o.lastClosingBracketAt&&o.lastClosingBracketAt<ne&&t[ne]!==" "&&S===null&&(S=ne),!L&&t[ne]==="
586%"&&t[ne-1]==="{"&&t.includes("%}",ne+1)){d=null;let Ze=t.indexOf("%}",ne)-1;if(Ze>ne){ne=Ze;continue}}if(!L&&k(ne)&&(!o||Object.keys(o).length<2)&&ne>1){for(let Ze=ne;Ze--;)if(t[Ze-1]===void 0||k(Ze)){let lt=t[Ze-1]===void 0?Ze:Ze+1,ot=t.slice(lt,ne+1)||"";if((ot.includes("/>")||ot.includes("/ >")||ot.includes('="')||ot.includes("='"))&&t!==`<${gJ(ot.trim(),"/>")}>`&&[...UA].some(se=>gJ(ot.trim().split(/\s+/).filter(Fe=>Fe.trim()).filter((Fe,ht)=>ht===0),"/>").toLowerCase()===se)&&vw(`<${ot.trim()}>`,B).result===""){(!s.length||s[s.length-1][0]!==o.lastOpeningBracketAt)&&s.push([lt,ne+1]),(!a.length||a[a.length-1][0]!==o.lastOpeningBracketAt)&&a.push([lt,ne+1]);let se=x(t,ne,lt,ne+1,lt,ne+1),Fe=ne+1;if(t[Fe]&&!t[Fe].trim()){for(let ht=Fe;ht<G;ht++)if(t[ht].trim()){Fe=ht;break}}B.cb({tag:o,deleteFrom:lt,deleteTo:Fe,insert:se,rangesArr:C,proposedReturn:[lt,Fe,se]})}break}}if(!V&&t[ne]==="/"&&!((ue=o.quotes)!=null&&ue.value)&&Number.isInteger(o.lastOpeningBracketAt)&&!Number.isInteger(o.lastClosingBracketAt)&&(o.slashPresent=ne),t[ne]==='"'||t[ne]==="'")if(!V&&o.nameStarts&&((Q=o==null?void 0:o.quotes)==null?void 0:Q.value)===t[ne])if(h.valueStarts===void 0)h={},delete o.quotes;else{h.valueEnds=ne,h.value=t.slice(h.valueStarts,ne),o.attributes.push(h),h={},delete o.quotes;let Ze;(de=B.dumpLinkHrefsNearby)!=null&&de.enabled&&!r.length&&o.attributes.some(lt=>{var ot,se;if(typeof lt.name=="string"&&lt.name.toLowerCase()==="href")return Ze=`${((ot=B.dumpLinkHrefsNearby)==null?void 0:ot.wrapHeads)||""}${lt.value}${((se=B.dumpLinkHrefsNearby)==null?void 0:se.wrapTails)||""}`,!0})&&(g={tagName:o.name,hrefValue:Ze,openingTagEnds:void 0})}else!V&&!o.quotes&&o.nameStarts&&(o.quotes={},o.quotes.value=t[ne],o.quotes.start=ne,o.quotes.next=t.indexOf(t[ne],ne+1),h.nameStarts&&h.nameEnds&&h.nameEnds<ne&&h.nameStarts<ne&&!h.valueStarts&&(h.name=t.slice(h.nameStarts,h.nameEnds)));if(o.nameStarts!==void 0&&o.nameEnds===void 0&&(!t[ne].trim()||!NTt(t[ne]))){if(o.nameEnds=ne,o.name=t.slice(o.nameStarts,o.nameEnds+(!k(ne)&&t[ne]!=="/"&&t[ne+1]===void 0?1:0)),t[o.nameStarts-1]!=="!"&&!o.name.replace(/-/g,"").length||/^\d+$/.test(o.name[0])){o={};continue}if(typeof o.name=="string"&&o.name.toLowerCase()==="doctype"&&(V=!0),N(ne)){P(B);let Ze=x(t,ne,o.leftOuterWhitespace,ne,o.lastOpeningBracketAt,ne);(B.stripTogetherWithTheirContents.includes(o.name)||B.stripTogetherWithTheirContents.includes("*"))&&(a=a.filter(([lt,ot])=>!(lt===o.leftOuterWhitespace&&ot===ne))),B.cb({tag:o,deleteFrom:o.leftOuterWhitespace,deleteTo:ne,insert:`${Ze}${v}${Ze}`,rangesArr:C,proposedReturn:[o.leftOuterWhitespace,ne,`${Ze}${v}${Ze}`]}),H(),w(ne,B,C)}}if((le=o.quotes)!=null&&le.start&&o.quotes.start<ne&&!o.quotes.end&&h.nameEnds&&h.equalsAt&&!h.valueStarts&&(h.valueStarts=ne),!o.quotes&&h.nameEnds&&t[ne]==="="&&!h.valueStarts&&!h.equalsAt&&(h.equalsAt=ne),!o.quotes&&h.nameStarts&&h.nameEnds&&!h.valueStarts&&t[ne].trim()&&t[ne]!=="="&&(o.attributes.push(h),h={}),!o.quotes&&h.nameStarts&&!h.nameEnds&&(V&&`'"`.includes(t[h.nameStarts])?h.nameStarts<ne&&t[ne]===t[h.nameStarts]&&(h.nameEnds=ne+1,h.name=t.slice(h.nameStarts,h.nameEnds)):t[ne].trim()?t[ne]==="="?h.equalsAt||(h.nameEnds=ne,h.equalsAt=ne,h.name=t.slice(h.nameStarts,h.nameEnds)):t[ne]==="/"||k(ne)?(h.nameEnds=ne,h.name=t.slice(h.nameStarts,h.nameEnds),o.attributes.push(h),h={}):N(ne)&&(h.nameEnds=ne,h.name=t.slice(h.nameStarts,h.nameEnds),o.attributes.push(h),h={}):(h.nameEnds=ne,h.name=t.slice(h.nameStarts,h.nameEnds))),!o.quotes&&o.nameEnds<ne&&!t[ne-1].trim()&&t[ne].trim()&&!"<>/!".includes(t[ne])&&!h.nameStarts&&!o.lastClosingBracketAt&&(h.nameStarts=ne),o.lastOpeningBracketAt!==null&&o.lastOpeningBracketAt<ne&&t[ne]==="/"&&o.onlyPlausible&&(o.onlyPlausible=!1),o.lastOpeningBracketAt!==null&&o.lastOpeningBracketAt<ne&&t[ne]!=="/"&&(o.onlyPlausible===void 0&&((!t[ne].trim()||N(ne))&&!o.slashPresent?o.onlyPlausible=!0:o.onlyPlausible=!1),t[ne].trim()&&o.nameStarts===void 0&&!N(ne)&&t[ne]!=="/"&&!k(ne)&&t[ne]!=="!"&&(o.nameStarts=ne,o.nameContainsLetters=!1)),o.nameStarts&&!o.quotes&&typeof t[ne]=="string"&&t[ne].toLowerCase()!==t[ne].toUpperCase()&&(o.nameContainsLetters=!0),k(ne)&&(bJ(o,t,ne)||o.quotes.value&&typeof o.lastOpeningBracketAt=="number"&&MTt(o.quotes.value,t.slice(o.lastOpeningBracketAt,ne))%2===1&&!t.slice(o.lastOpeningBracketAt+1,ne).includes("<")&&!t.slice(o.lastOpeningBracketAt+1,ne).includes(">"))&&o.lastOpeningBracketAt!==void 0&&(o.lastClosingBracketAt=ne,S=null,Object.keys(h).length&&(o.attributes.push(h),h={}),(ye=B.dumpLinkHrefsNearby)!=null&&ye.enabled&&g.tagName&&!g.openingTagEnds&&(g.openingTagEnds=ne)),(!V||t[ne]===">")&&o.lastOpeningBracketAt!==void 0){if(o.lastClosingBracketAt===void 0){if(o.lastOpeningBracketAt<ne&&!N(ne)&&(t[ne+1]===void 0||N(ne+1)&&!((fe=o==null?void 0:o.quotes)!=null&&fe.value))&&o.nameContainsLetters&&typeof o.nameStarts=="number"){if(o.name=t.slice(o.nameStarts,o.nameEnds||ne+1).toLowerCase(),(!s.length||s[s.length-1][0]!==o.lastOpeningBracketAt)&&s.push([o.lastOpeningBracketAt,ne+1]),B.ignoreTags.includes(o.name)||U(ne,B,o)||!UA.has(o.name)&&(o.onlyPlausible||B.stripRecognisedHTMLOnly)){o={},h={};continue}if((UA.has(o.name)||d5.has(o.name))&&(o.onlyPlausible===!1||o.onlyPlausible===!0&&o.attributes.length)||t[ne+1]===void 0){P(B);let Ze=x(t,ne,o.leftOuterWhitespace,ne+1,o.lastOpeningBracketAt,o.lastClosingBracketAt);L&&o.name==="script"&&o.slashPresent&&(L=!1);let lt;Ze===null||v===null?lt=null:lt=`${Ze}${v}${Ze}`,B.cb({tag:o,deleteFrom:o.leftOuterWhitespace,deleteTo:ne+1,insert:lt,rangesArr:C,proposedReturn:[o.leftOuterWhitespace,ne+1,lt]}),H(),w(ne,B,C)}if(!a.length||a[a.length-1][0]!==o.lastOpeningBracketAt&&a[a.length-1][1]!==ne+1)if(B.stripTogetherWithTheirContents.includes(o.name)||B.stripTogetherWithTheirContents.includes("*")){let Ze;for(let lt=r.length;lt--;)r[lt].name===o.name&&(Ze=r[lt]);Ze?(a=a.filter(([lt])=>lt!==Ze.lastOpeningBracketAt),a.push([Ze.lastOpeningBracketAt,ne+1])):a.push([o.lastOpeningBracketAt,ne+1])}else a.push([o.lastOpeningBracketAt,ne+1])}}else if(ne>o.lastClosingBracketAt&&t[ne].trim()||t[ne+1]===void 0||B.ignoreIndentations&&`\r
587`.includes(t[ne])){let Ze=o.lastClosingBracketAt===ne?ne+1:ne;B.trimOnlySpaces&&Ze===G-1&&S!==null&&S<ne&&(Ze=S),(!s.length||s[s.length-1][0]!==o.lastOpeningBracketAt)&&s.push([o.lastOpeningBracketAt,o.lastClosingBracketAt+1]);let lt=B.ignoreTags.includes(o.name),ot=U(ne,B,o);if(!A||B.stripRecognisedHTMLOnly&&typeof o.name=="string"&&!UA.has(o.name.toLowerCase())&&!d5.has(o.name.toLowerCase())||!q&&(lt||ot)||q&&!B.onlyStripTags.includes(o.name)||B.ignoreTagsWithTheirContents.includes(o.name)){if(ot)if(o.slashPresent){for(let se=i.length;se--;)if(i[se].name===o.name){i.splice(se,1);break}i.length||(A=!0)}else A&&(A=!1),i.push(o);B.cb({tag:o,deleteFrom:null,deleteTo:null,insert:null,rangesArr:C,proposedReturn:null}),o={},h={}}else if(!o.onlyPlausible||o.attributes.length===0&&o.name&&(UA.has(o.name.toLowerCase())||d5.has(o.name.toLowerCase()))||(We=o.attributes)!=null&&We.some(se=>se.equalsAt)){(!a.length||a[a.length-1][0]!==o.lastOpeningBracketAt)&&a.push([o.lastOpeningBracketAt,o.lastClosingBracketAt+1]);let se=x(t,ne,o.leftOuterWhitespace,Ze,o.lastOpeningBracketAt,o.lastClosingBracketAt);v="",b=!1,P(B,Ze);let Fe;typeof v=="string"&&v.length?(Fe=`${se}${v}${se===`
588
589`?`
590`:se}`,Ze===o.lastClosingBracketAt+1&&(!t[Ze]||!f5.has(t[Ze]))&&(Fe+=" "),o.leftOuterWhitespace===o.lastOpeningBracketAt&&C.last()&&C.last()[1]<o.lastOpeningBracketAt&&(!((Le=B==null?void 0:B.dumpLinkHrefsNearby)!=null&&Le.putOnNewLine)||!f5.has(t[Ze]))&&(Fe=" "+Fe)):Fe=se,Fe!==null&&(o.leftOuterWhitespace===0||!uh(t,Ze-1))&&(!((Ve=B.dumpLinkHrefsNearby)!=null&&Ve.enabled)||o.name!=="a")&&(Fe=void 0);let ht=0;if(b&&f5.has(t[Ze])){(at=B.dumpLinkHrefsNearby)!=null&&at.putOnNewLine&&(Fe=`${t[Ze]}${Fe||""}`);let Ct=uh(t,Ze);Ct&&(Fe!=null&&Fe.endsWith(`
591`))?ht+=Ct-ne:(!Ct||Ct>ne)&&ht++}B.cb({tag:o,deleteFrom:o.leftOuterWhitespace,deleteTo:Ze+ht,insert:Fe,rangesArr:C,proposedReturn:[o.leftOuterWhitespace,Ze+ht,Fe]}),H(),w(ne,B,C)}else o={};k(ne)||(o={})}V&&(V=!1)}if((!L||t[ne]==="<"&&uh(t,uh(t,ne))&&t[uh(t,ne)]==="/"&&t.startsWith("script",uh(t,uh(t,ne))))&&N(ne)&&!N(ne-1)&&!`'"`.includes(t[ne+1])&&(!`'"`.includes(t[ne+2])||/\w/.test(t[ne+1]))&&!(t[ne+1]==="c"&&t[
591ne+2]===":")&&!(t[ne+1]==="f"&&t[ne+2]==="m"&&t[ne+3]==="t"&&t[ne+4]===":")&&!(t[ne+1]==="s"&&t[ne+2]==="q"&&t[ne+3]==="l"&&t[ne+4]===":")&&!(t[ne+1]==="x"&&t[ne+2]===":")&&!(t[ne+1]==="f"&&t[ne+2]==="n"&&t[ne+3]===":")&&bJ(o,t,ne)){if(k(uh(t,ne)))continue;if(o.nameEnds&&o.nameEnds<ne&&!o.lastClosingBracketAt&&(o.onlyPlausible===!0&&((Et=o.attributes)!=null&&Et.length)||o.onlyPlausible===!1)){let Ze=x(t,ne,o.leftOuterWhitespace,ne,o.lastOpeningBracketAt,ne);B.cb({tag:o,deleteFrom:o.leftOuterWhitespace,deleteTo:ne,insert:Ze,rangesArr:C,proposedReturn:[o.leftOuterWhitespace,ne,Ze]}),w(ne,B,C),o={},h={}}if(o.lastOpeningBracketAt!==void 0&&o.onlyPlausible&&o.name&&!o.quotes&&(o.lastOpeningBracketAt=void 0,o.name=void 0,o.onlyPlausible=!1),(o.lastOpeningBracketAt===void 0||!o.onlyPlausible)&&!o.quotes&&(o.lastOpeningBracketAt=ne,o.slashPresent=!1,o.attributes=[],u===null?o.leftOuterWhitespace=ne:B.trimOnlySpaces&&u===0?o.leftOuterWhitespace=c||ne:o.leftOuterWhitespace=u,`${t[ne+1]}${t[ne+2]}${t[ne+3]}`=="!--"||`${t[ne+1]}${t[ne+2]}${t[ne+3]}${t[ne+4]}${t[ne+5]}${t[ne+6]}${t[ne+7]}${t[ne+8]}`=="![CDATA[")){let Ze=!0;t[ne+2]==="-"&&(Ze=!1);let lt;for(let ot=ne;ot<G;ot++)if((!lt&&Ze&&`${t[ot-2]}${t[ot-1]}${t[ot]}`=="]]>"||!Ze&&`${t[ot-2]}${t[ot-1]}${t[ot]}`=="-->")&&(lt=ot),lt&&(lt<ot&&t[ot].trim()||t[ot+1]===void 0)){let se=ot;(t[ot+1]===void 0&&!t[ot].trim()||t[ot]===">")&&(se+=1),(!s.length||s[s.length-1][0]!==o.lastOpeningBracketAt)&&s.push([o.lastOpeningBracketAt,lt+1]),(!a.length||a[a.length-1][0]!==o.lastOpeningBracketAt)&&a.push([o.lastOpeningBracketAt,lt+1]);let Fe=x(t,ot,o.leftOuterWhitespace,se,o.lastOpeningBracketAt,lt);B.cb({tag:o,deleteFrom:o.leftOuterWhitespace,deleteTo:se,insert:Fe,rangesArr:C,proposedReturn:[o.leftOuterWhitespace,se,Fe]}),ne=ot-1,t[ot]===">"&&(ne=ot),o={},h={};break}}}!t[ne].trim()||t[ne].charCodeAt(0)===847?(u===null&&(u=ne,o.lastOpeningBracketAt!==void 0&&o.lastOpeningBracketAt<ne&&o.nameStarts&&o.nameStarts<o.lastOpeningBracketAt&&ne===o.lastOpeningBracketAt+1&&!r.some(Ze=>Ze.name===o.name)&&(o.onlyPlausible=!0,o.name=void 0,o.nameStarts=void 0)),(t[ne]===`
592`||t[ne]==="\r")&&(d=ne,f&&(f=!1))):(u!==null&&(!o.quotes&&h.equalsAt>u-1&&h.nameEnds&&h.equalsAt>h.nameEnds&&t[ne]!=='"'&&t[ne]!=="'"&&(K4(h)&&o.attributes.push(h),h={},o.equalsSpottedAt=void 0),u=null),f||(f=!0,A&&!L&&typeof d=="number"&&ne&&d<ne-1&&(t.slice(d+1,ne).trim()?d=null:B.ignoreIndentations||C.push([d+1,ne])))),t[ne]===" "?c===null&&(c=ne):c!==null&&(c=null),o.name==="script"&&(L=!o.slashPresent)}if(t&&!B.ignoreIndentations&&(B.trimOnlySpaces&&t[0]===" "||!B.trimOnlySpaces&&!t[0].trim()))for(let ne=0;ne<G;ne++)if(B.trimOnlySpaces&&t[ne]!==" "||!B.trimOnlySpaces&&t[ne].trim()){C.push([0,ne]);break}else t[ne+1]||C.push([0,ne+1]);if(t&&(B.trimOnlySpaces&&t[~-t.length]===" "||!B.trimOnlySpaces&&!t[~-t.length].trim())){for(let ne=t.length;ne--;)if(B.trimOnlySpaces&&t[ne]!==" "||!B.trimOnlySpaces&&t[ne].trim()){C.push([ne+1,G]);break}}let ae=C.current();if(!(e!=null&&e.cb)&&ae&&(ae[0]&&!ae[0][0]&&(ae[0][1],C.ranges[0]=[C.ranges[0][0],C.ranges[0][1]]),ae[ae.length-1]&&ae[ae.length-1][1]===t.length&&(ae[ae.length-1][0],C.ranges))){let ne=C.ranges[C.ranges.length-1][0];t[ne-1]&&(B.trimOnlySpaces&&t[ne-1]===" "||!B.trimOnlySpaces&&!t[ne-1].trim())&&(ne-=1);let Ze=C.ranges[C.ranges.length-1][2];C.ranges[C.ranges.length-1]=[ne,C.ranges[C.ranges.length-1][1]],Ze!=null&&Ze.trim()&&C.ranges[C.ranges.length-1].push(Ze.trimEnd())}return{log:{timeTakenInMilliseconds:Date.now()-n},result:PTt(t,C.current()),ranges:C.current(),allTagLocations:s,filteredTagLocations:a}}const $Tt={text:{...cn.bodyLarge,color:_e.white,"& a":{...Wct,display:"inline",fontSize:"inherit"},"& p, & ul, & ol":{marginBottom:29},"& p:only-child, & p:last-child, & ul:only-child, & ul:last-child, & ol:only-child, & ol:last-child, & li p":{marginBottom:0},"& li":{listStyleType:"initial",marginLeft:20}}},BTt=({shouldStripImages:t=!0,shouldStripTags:e=!1,shouldStripInteractiveTags:n=!1,text:r="",textCss:i})=>{let s=r;return t&&(s=vw(r,{onlyStripTags:["img"]}).result),e?s=vw(s).result:n?s=vw(s,{onlyStripTags:["a","button"]}).result:s=vw(s,{cb:({tag:a,deleteFrom:o,deleteTo:l,rangesArr:u})=>
592{if(a.name==="a"){const c=a.attributes.find(d=>d.name==="href");c&&o&&l&&u.push([o,l,` <a href="${c.value}" target="_blank" rel="noopener noreferrer">`])}}}).result,I("div",{css:[$Tt.text,i],dangerouslySetInnerHTML:{__html:pEt.sanitize(s,{ADD_ATTR:["target","rel"]})}})},UTt={text:{...cn.bodyLarge,color:_e.white}},VTt=({description:t,render:e,shouldStripTags:n=!1,shouldStripInteractiveTags:r=!1,shouldDecodeHtml:i=!1,textCss:s})=>{if(!Fce(t)){const a=_de(t)||i?I(BTt,{shouldStripTags:n,shouldStripInteractiveTags:r,text:t,textCss:s}):I("p",{css:[UTt.text,s],children:t});return e?e(a):a}return I(Dn,{})},h5={truncated:{...Bt.truncateText(3)},masked:{maskImage:"linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 33%)"},toggleButton:{marginTop:10}},TD=({containerCss:t,displayShowMore:e=!0,numberOfLines:n=3,shouldStripTags:r=!1,shouldStripInteractiveTags:i=!1,shouldShowMaskImage:s=!1,shouldDecodeHtml:a=!1,text:o,textCss:l,textId:u="truncated-desc",maskImageDirection:c="to top"})=>{const[d,f]=$.useState(!1),[h,g]=$.useState(!0),v=$.useCallback(C=>{const L=new ResizeObserver(()=>{C.scrollHeight&&C.clientHeight&&(f(C.scrollHeight!==C.clientHeight),L.disconnect())});C&&L.observe(C)},[]),b=()=>{g(C=>!C)},{t:S}=dn(),A=S("collapsible.readMore"),w=S("collapsible.readLess"),x=h?A:w,P=S("collapsible.visuallyExpand"),N=S("collapsible.visuallyShrink"),k=h?P:N,U=1/n*100,H=[],B={},q=e&&d,Z=q?i&&h:!1;return h&&(H.push(h5.truncated),B.WebkitLineClamp=n,(q||s)&&(H.push(h5.masked),B.WebkitMaskImage=`linear-gradient(${c}, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) ${U}%)`)),be("div",{css:t,children:[I("div",{css:H,id:u,ref:v,style:B,children:I(VTt,{description:o,shouldStripInteractiveTags:Z,shouldStripTags:r&&h,shouldDecodeHtml:a,textCss:l})}),q&&I("div",{css:h5.toggleButton,children:I(Mg,{as:Fi.Button,ariaExpanded:!h,ariaControls:u,ariaLabel:k,hasIconAfter:!0,icon:h?en.CaretDown:en.CaretUp,isTiny:!0,onClick:b,children:x})})]})},HTt={sectionWrapper:{marginTop:40}},jTt=({containerCss:t,text:e,textCss:n})=>{const{t:r}=dn(),{greaterThan:i}=Fs();return I(Gv,{title:r("showScreen.about.header"),containerCss:[HTt.sectionWrapper,t||{}],content:I(TD,{numberOfLines:i.MD?4:3,shouldStripInteractiveTags:!0,text:e,textCss:n})})},hm={item:{marginBottom:20,"&:last-of-type":{marginBottom:0}},button:{display:"inline-flex",flexDirection:"row",alignItems:"start"},label:{...cn.metadataLarge,textAlign:"left",marginTop:5},labelPlaying:{color:_e.white60},duration:{color:_e.white60,position:"relative",paddingLeft:16,"&::before":{content:'""',display:"inline",position:"absolute",top:"50%",left:8,background:_e.white60,borderRadius:3,height:2,width:2}},pill:{...cn.metadataSmall,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:_e.white15,borderRadius:100,minWidth:65,height:28,marginRight:12},pillPlaying:{backgroundColor:"transparent",border:`1px solid ${_e.white15}`},liveIcon:{position:"relative",marginLeft:12,top:3,display:"inline-block"}},zTt=({chapter:t,episode:e,accessibilityLabelIndex:n,onClick:r,isPlaying:i,isLiveChapter:s})=>{const{t:a}=dn(),{duration:o,startOffset:l,title:u}=t,{startTime:c,subtype:d,isLive:f}=e,h=d===Vn.BROADCAST_SHOW_EPISODE;let g="",v=u,b=l,S=F1(b);const A=H7(o),w=!!(s&&f),x=w?a("global.onNow"):A.label;if(h){const P=c/1e3,N=w2(l*1e3,(l+o)*1e3);(u==null?void 0:u.substring(0,4))==="Part"?v=w?u:`${u} ${VL.bullet} ${N}`:u||(v=a("chapters.chapterWithoutTitle",{index:t.index+1,separator:VL.bullet,fromToString:N})),S=EL(dL(l),!1),g=`- ${a("accessibilityLabels.duration",{from:S,to:N.split("-")[1]})}`,b=l-P}return I("li",{css:hm.item,children:be("button",{type:"button",css:hm.button,onClick:()=>r(t),"aria-label":`${u} - ${n} ${g}`,children:[I("span",{css:[hm.pill,i&&hm.pillPlaying],children:S}),be("div",{css:[hm.label,i&&hm.labelPlaying],children:[v,I("span",{css:hm.duration,children:x}),w&&I(Yr,{name:en.LiveSM,sizeInPx:16,iconCss:hm.liveIcon})]})]})})},DO={showAll:{...cn.buttonSmall,display:"flex",flexDirection:"row",alignItems:"center"},showAllIcon:{marginLeft:10},container:{marginTop:20},footer:{borderTop:Ng.separator,marginTop:20,paddingTop:20}},GTt=(t,e,n,r,i)=>{let s=r,a=i;if(!t&&n!==0){const o=n-1;let l=0,u=n;return r>o?(u=r+1,l=u-n,a=i<l||i>r?-1:i-l,s=r-l):r===-1&&i>o&&(u=i+1,l=u-n,a=i-l),{chaptersToShow:e.slice(l,u),relativeLiveIndex:a,relativePlayingIndex:s}}return{chaptersToShow:e,relativeLiveIndex:a,relativePlayingIndex:s}},WTt=({chapters:t,episode:e,hasSectionWrapper:n=!0,onItemClick:r,liveChapterIndex:i=-1,maxItems:s=4,playingChapterIndex:a=-1,containerCss:o})=>{const{t:l}=dn(),[u,c]=$.useState(!1),{chaptersToShow:d,relativeLiveIndex:f,relativePlayingIndex:h}=GTt(u,t,s,a,i),g=I("ol",{children:d.map((b,S)=>I(zTt,{accessibilityLabelIndex:`${l("chapters.accessibilityPrefix")} ${l("accessibilityLabels.countLabel",{index:S+1,total:t.length})}`,chapter:b,episode:e,onClick:r,isLiveChapter:S===f,isPlaying:S===h},b.startOffset))}),v=be("button",{type:"button",onClick:()=>c(!u),css:DO.showAll,children:[l(u?"chapters.collapsible.seeLess":"chapters.collapsible.seeAll"),I(Yr,{name:u?en.Caret
592Up:en.CaretDown,sizeInPx:12,iconCss:DO.showAllIcon,ariaHidden:!0})]});return n?I(Gv,{title:l("chapters.title"),footerContent:s>0&&t.length>s?v:void 0,containerCss:o,children:g}):be("div",{css:DO.container,children:[g,I("div",{css:DO.footer,children:v})]})},sme=({episode:t,live:e,hasSectionWrapper:n,containerCss:r})=>{const{showToast:i}=gu(),{t:s}=dn(),a=nhe({episodeId:t.id,live:e}),o=Yu(),l=rhe(t.id),u=Irt(t,a),{clientServices:c,loading:d}=Fa(),f=jV(),h=Cc(({snapshot:g})=>async v=>{const b=_f(J0),S=_f(bV);if(b&&!S){i({title:s("chapters.disabledDuringAd")});return}const A=await g.getPromise(SV(t.id)),w={chapter:v.title,contentId:t.id,feature:Ei.CHAPTER};if(t.startTime,A&&!d){const x=(t.startTime||0)/1e3;o.seekToTime(v.startOffset-x);return}o.play(t.getDataObject(),w,{autoPlay:!0,startOffset:v.startOffset})},[o,c,t,f,s,d,i]);return!a||a.length===0?null:I(WTt,{episode:t,chapters:a,hasSectionWrapper:n,playingChapterIndex:l,liveChapterIndex:u,onItemClick:h,containerCss:r})};/**
593 * react-virtual
594 *
595 * Copyright (c) TanStack
596 *
597 * This source code is licensed under the MIT license found in the
598 * LICENSE.md file in the root directory of this source tree.
599 *
600 * @license MIT
601 */function AD(){return AD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},AD.apply(this,arguments)}/**
602 * virtual-core
603 *
604 * Copyright (c) TanStack
605 *
606 * This source code is licensed under the MIT license found in the
607 * LICENSE.md file in the root directory of this source tree.
608 *
609 * @license MIT
610 */function wD(){return wD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},wD.apply(this,arguments)}/**
611 * virtual-core
612 *
613 * Copyright (c) TanStack
614 *
615 * This source code is licensed under the MIT license found in the
616 * LICENSE.md file in the root directory of this source tree.
617 *
618 * @license MIT
619 */function AS(t,e,n){var r,i=(r=n.initialDeps)!=null?r:[],s;return function(){var a;n.key&&n.debug!=null&&n.debug()&&(a=Date.now());var o=t(),l=o.length!==i.length||o.some(function(g,v){return i[v]!==g});if(!l)return s;i=o;var u;if(n.key&&n.debug!=null&&n.debug()&&(u=Date.now()),s=e.apply(void 0,o),n.key&&n.debug!=null&&n.debug()){var c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,h=function(v,b){for(v=String(v);v.length<b;)v=" "+v;return v};console.info("%c⏱ "+h(d,5)+" /"+h(c,5)+" ms",`
620            font-size: .6rem;
621            font-weight: bold;
622            color: hsl(`+Math.max(0,Math.min(120-120*f,120))+"deg 100% 31%);",n==null?void 0:n.key)}return n==null||n.onChange==null||n.onChange(s),s}}function p5(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}var qTt=function(e,n){return Math.abs(e-n)<1};/**
623 * virtual-core
624 *
625 * Copyright (c) TanStack
626 *
627 * This source code is licensed under the MIT license found in the
628 * LICENSE.md file in the root directory of this source tree.
629 *
630 * @license MIT
631 */var KTt=function(e){return e},YTt=function(e){for(var n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),i=[],s=n;s<=r;s++)i.push(s);return i},ZTt=function(e,n){var r=e.scrollElement;if(r){var i=function(){n({width:r.innerWidth,height:r.innerHeight})};return i(),r.addEventListener("resize",i,{passive:!0}),function(){r.removeEventListener("resize",i)}}},QTt=function(e,n){var r=e.scrollElement;if(r){var i=function(){n(r[e.options.horizontal?"scrollX":"scrollY"])};return i(),r.addEventListener("scroll",i,{passive:!0}),function(){r.removeEventListener("scroll",i)}}},XTt=function(e,n,r){if(n!=null&&n.borderBoxSize){var i=n.borderBoxSize[0];if(i){var s=Math.round(i[r.options.horizontal?"inlineSize":"blockSize"]);return s}}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])},JTt=function(e,n,r){var i,s,a=n.adjustments,o=a===void 0?0:a,l=n.behavior,u=e+o;(i=r.scrollElement)==null||i.scrollTo==null||i.scrollTo((s={}
631,s[r.options.horizontal?"left":"top"]=u,s.behavior=l,s))},eAt=function(e){var n=this;this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=function(){var r=null,i=function(){return r||(typeof ResizeObserver<"u"?r=new ResizeObserver(function(a){a.forEach(function(o){n._measureElement(o.target,o)})}):null)};return{disconnect:function(){var a;return(a=i())==null?void 0:a.disconnect()},observe:function(a){var o;return(o=i())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:function(a){var o;return(o=i())==null?void 0:o.unobserve(a)}}}(),this.range=null,this.setOptions=function(r){Object.entries(r).forEach(function(i){var s=i[0],a=i[1];typeof a>"u"&&delete r[s]}),n.options=wD({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:KTt,rangeExtractor:YTt,onChange:function(){},measureElement:XTt,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},r)},this.notify=function(r){n.options.onChange==null||n.options.onChange(n,r)},this.maybeNotify=AS(function(){return n.calculateRange(),[n.isScrolling,n.range?n.range.startIndex:null,n.range?n.range.endIndex:null]},function(r){n.notify(r)},{key:!1,debug:function(){return n.options.debug},initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=function(){n.unsubs.filter(Boolean).forEach(function(r){return r()}),n.unsubs=[],n.scrollElement=null},this._didMount=function(){return n.measureElementCache.forEach(n.observer.observe),function(){n.observer.disconnect(),n.cleanup()}},this._willUpdate=function(){var r=n.options.getScrollElement();n.scrollElement!==r&&(n.cleanup(),n.scrollElement=r,n._scrollToOffset(n.scrollOffset,{adjustments:void 0,behavior:void 0}),n.unsubs.push(n.options.observeElementRect(n,function(i){n.scrollRect=i,n.maybeNotify()})),n.unsubs.push(n.options.observeElementOffset(n,function(i){n.scrollAdjustments=0,n.scrollOffset!==i&&(n.isScrollingTimeoutId!==null&&(clearTimeout(n.isScrollingTimeoutId),n.isScrollingTimeoutId=null),n.isScrolling=!0,n.scrollDirection=n.scrollOffset<i?"forward":"backward",n.scrollOffset=i,n.maybeNotify(),n.isScrollingTimeoutId=setTimeout(function(){n.isScrollingTimeoutId=null,n.isScrolling=!1,n.scrollDirection=null,n.maybeNotify()},n.options.scrollingDelay))})))},this.getSize=function(){return n.scrollRect[n.options.horizontal?"width":"height"]},this.memoOptions=AS(function(){return[n.options.count,n.options.paddingStart,n.options.scrollMargin,n.options.getItemKey]},function(r,i,s,a){return n.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:i,scrollMargin:s,getItemKey:a}},{key:!1}),this.getFurthestMeasurement=function(r,i){for(var s=new Map,a=new Map,o=i-1;o>=0;o--){var l=r[o];if(!s.has(l.lane)){var u=a.get(l.lane);if(u==null||l.end>u.end?a.set(l.lane,l):l.end<u.end&&s.set(l.lane,!0),s.size===n.options.lanes)break}}return a.size===n.options.lanes?Array.from(a.values()).sort(function(c,d){return c.end-d.end})[0]:void 0},this.getMeasurements=AS(function(){return[n.memoOptions(),n.itemSizeCache]},function(r,i){var s=r.count,a=r.paddingStart,o=r.scrollMargin,l=r.getItemKey,u=n.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,n.pendingMeasuredCacheIndexes):0;n.pendingMeasuredCacheIndexes=[];for(var c=n.measurementsCache.slice(0,u),d=u;d<s;d++){var f=l(d),h=n.options.lanes===1?c[d-1]:n.getFurthestMeasurement(c,d),g=h?h.end:a+o,v=i.get(f),b=typeof v=="number"?v:n.options.estimateSize(d),S=g+b,A=h?h.lane:d%n.options.lanes;c[d]={index:d,start:g,size:b,end:S,key:f,lane:A}}return n.measurementsCache=c,c},{key:!1,debug:function(){return n.options.debug}}),this.calculateRange=AS(function(){return[n.getMeasurements(),n.getSize(),n.scrollOffset]},function(r,i,s){return n.range=r.length>0&&i>0?tAt({measurements:r,outerSize:i,scrollOffset:s}):null},{key:!1,debug:function(){return n.options.debug}}),this.getIndexes=AS(function(){return[n.options.rangeExtractor,n.calculateRange(),n.options.overscan,n.options.count]},function(r,i,s,a){return i===null?[]:r(wD({},i,{overscan:s,count:a}))},{key:!1,debug:function(){return n.options.debug}}),this.indexFromElement=function(r){var i=n.options.indexAttribute,s=r.getAttribute(i);return s?parseInt(s,10):(console.warn("Missing attribute name '"+i+"={index}' on measured element."),-1)},this._measureElement=function(r,i){var s=n.measurementsCache[n.indexFromElement(r)];if(!s||!r.isConnected){n.measureElementCache.forEach(function(l,u){l===r&&(n.observer.unobserve(r),n.measureElementCache.delete(u))});return}var a=n.measureElementCache.get(s.key);a!==r&&(a&&n.observer.unobserve(a),n.observer.observe(r),n.measureElementCache.set(s.key,r));var o=n.options.measureElement(r,i,n);n.resizeItem(s,o)},this.resizeItem=function(r,i){var s,a=(s=n.itemSizeCache.get(r.key))!=null?s:r.size,o=i-a;o!==0&&(r.start<n.scrollOffset&&n._scrollToOffset(n.scrollOffset,{adju
631stments:n.scrollAdjustments+=o,behavior:void 0}),n.pendingMeasuredCacheIndexes.push(r.index),n.itemSizeCache=new Map(n.itemSizeCache.set(r.key,i)),n.notify(!1))},this.measureElement=function(r){r&&n._measureElement(r,void 0)},this.getVirtualItems=AS(function(){return[n.getIndexes(),n.getMeasurements()]},function(r,i){for(var s=[],a=0,o=r.length;a<o;a++){var l=r[a],u=i[l];s.push(u)}return s},{key:!1,debug:function(){return n.options.debug}}),this.getVirtualItemForOffset=function(r){var i=n.getMeasurements();return p5(i[ame(0,i.length-1,function(s){return p5(i[s]).start},r)])},this.getOffsetForAlignment=function(r,i){var s=n.getSize();i==="auto"&&(r<=n.scrollOffset?i="start":r>=n.scrollOffset+s?i="end":i="start"),i==="start"?r=r:i==="end"?r=r-s:i==="center"&&(r=r-s/2);var a=n.options.horizontal?"scrollWidth":"scrollHeight",o=n.scrollElement?"document"in n.scrollElement?n.scrollElement.document.documentElement[a]:n.scrollElement[a]:0,l=o-n.getSize();return Math.max(Math.min(l,r),0)},this.getOffsetForIndex=function(r,i){i===void 0&&(i="auto"),r=Math.max(0,Math.min(r,n.options.count-1));var s=p5(n.getMeasurements()[r]);if(i==="auto")if(s.end>=n.scrollOffset+n.getSize()-n.options.scrollPaddingEnd)i="end";else if(s.start<=n.scrollOffset+n.options.scrollPaddingStart)i="start";else return[n.scrollOffset,i];var a=i==="end"?s.end+n.options.scrollPaddingEnd:s.start-n.options.scrollPaddingStart;return[n.getOffsetForAlignment(a,i),i]},this.isDynamicMode=function(){return n.measureElementCache.size>0},this.cancelScrollToIndex=function(){n.scrollToIndexTimeoutId!==null&&(clearTimeout(n.scrollToIndexTimeoutId),n.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(r,i){var s=i===void 0?{}:i,a=s.align,o=a===void 0?"start":a,l=s.behavior;n.cancelScrollToIndex(),l==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n._scrollToOffset(n.getOffsetForAlignment(r,o),{adjustments:void 0,behavior:l})},this.scrollToIndex=function(r,i){var s=i===void 0?{}:i,a=s.align,o=a===void 0?"auto":a,l=s.behavior;r=Math.max(0,Math.min(r,n.options.count-1)),n.cancelScrollToIndex(),l==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var u=n.getOffsetForIndex(r,o),c=u[0],d=u[1];n._scrollToOffset(c,{adjustments:void 0,behavior:l}),l!=="smooth"&&n.isDynamicMode()&&(n.scrollToIndexTimeoutId=setTimeout(function(){n.scrollToIndexTimeoutId=null;var f=n.measureElementCache.has(n.options.getItemKey(r));if(f){var h=n.getOffsetForIndex(r,d),g=h[0];qTt(g,n.scrollOffset)||n.scrollToIndex(r,{align:d,behavior:l})}else n.scrollToIndex(r,{align:d,behavior:l})}))},this.scrollBy=function(r,i){var s=i===void 0?{}:i,a=s.behavior;n.cancelScrollToIndex(),a==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n._scrollToOffset(n.scrollOffset+r,{adjustments:void 0,behavior:a})},this.getTotalSize=function(){var r;return(((r=n.getMeasurements()[n.options.count-1])==null?void 0:r.end)||n.options.paddingStart)-n.options.scrollMargin+n.options.paddingEnd},this._scrollToOffset=function(r,i){var s=i.adjustments,a=i.behavior;n.options.scrollToFn(r,{behavior:a,adjustments:s},n)},this.measure=function(){n.itemSizeCache=new Map,n.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(r){n.itemSizeCache.set(r.key,r.size)}),this.maybeNotify()},ame=function(e,n,r,i){for(;e<=n;){var s=(e+n)/2|0,a=r(s);if(a<i)e=s+1;else if(a>i)n=s-1;else return s}return e>0?e-1:0};function tAt(t){for(var e=t.measurements,n=t.outerSize,r=t.scrollOffset,i=e.length-1,s=function(u){return e[u].start},a=ame(0,i,s,r),o=a;o<i&&e[o].end<r+n;)o++;return{startIndex:a,endIndex:o}}/**
632 * react-virtual
633 *
634 * Copyright (c) TanStack
635 *
636 * This source code is licensed under the MIT license found in the
637 * LICENSE.md file in the root directory of this source tree.
638 *
639 * @license MIT
640 */var nAt=typeof document<"u"?$.useLayoutEffect:$.useEffect;function rAt(t){var e=$.useReducer(function(){return{}},{})[1],n=AD({},t,{onChange:function(a,o){o?og.flushSync(e):e(),t.onChange==null||t.onChange(a,o)}}),r=$.useState(function(){return new eAt(n)}),i=r[0];return i.setOptions(n),$.useEffect(function(){return i._didMount()},[]),nAt(function(){return i._willUpdate()}),i}function iAt(t){return rAt(AD({getScrollElement:function(){return typeof document<"u"?window:null},observeElementRect:ZTt,observeElementOffset:QTt,scrollToFn:JTt,initialOffset:typeof document<"u"?window.scrollY:void 0},t))}const ome={defaultItemsCount:1},sAt=(t,e)=>{var o,l,u,c;if(t.type!==gn.CAROUSEL)return;const n=(o=t.modules)==null?void 0:o[0],{config:r}=t,i=((l=t.modules)==null?void 0:l.map(d=>d.config.contentId).filter(d=>!!d))||[],s=(d,f)=>{switch(d){case gt.STATION:return gt.STATION;case gt.SHOW:switch(f){case ui.PODCAST:return ui.PODCAST;default:return Vn.BROADCAST_SHOW_EPISODE}case gt.TAG:return gt.TAG;case gt.TOPIC:return gt.TOPIC;default:return""}},a=(u=t.modules)==null?void 0:u.map(d=>{var f,h;return s((f=e(d.config.contentId))==null?void 0:f.entityType,(h=e(d.config.contentId))==null?void 0:h.entitySubtype)});return{cardContentIds:i,hasMultipleEntitySubtypes:Mi.uniq(a).length>1,hasSearchPills:(n==null?void 0:n.type)===gn.SEARCH_PILL,isFeatured:(n==null?void 0:n.type)===gn.ENTITY_CARD_FEATURED,isStacked:!!(r!=null&&r.itemsPerColumn)&&r.itemsPerColumn>1||!!r.isStacked,itemsPerColumn:(r==null?void 0:r.itemsPerColumn)??ome.defaultItemsCount,numberOfItems:((c=t.modules)==null?void 0:c.length)||i.length,type:r==null?void 0:r.carouselType}},aAt=t=>{if(t.type===gn.LIST)return{itemsPerRow:t.config.itemsPerRow??ome.defaultItemsCount,isSelectable:t.config.selectable??!1}};function oAt(t,{module:e,isTopLevel:n,viewRootObjectId:r,viewRootObjectUrl:i,viewRootObjectRewindable:s,getData:a,isSideColumn:o,viewType:l}
640){return Mi.merge(Mi.cloneDeep(t),{carousel:sAt(e,a),list:aAt(e),moduleSubType:e.config.subType,moduleId:e.id,sectionId:n?e.id:void 0,viewRootObjectId:r,viewRootObjectUrl:i,viewRootObjectRewindable:s,isSideColumn:o,viewType:l})}const lAt=t=>{const{getData:e,isTopLevel:n,module:r,viewRootObjectId:i,viewRootObjectUrl:s,viewRootObjectRewindable:a,viewId:o,viewType:l}=t,u=Dl();return $.useMemo(()=>oAt(u,{module:r,isTopLevel:n,viewRootObjectId:i,viewRootObjectUrl:s,viewRootObjectRewindable:a,getData:e,isSideColumn:o===_n.Player,viewType:l}),[e,n,r,u,i,s,a,o,l])},uAt=({module:{modules:t},moduleMap:e,getData:n,moduleWrapper:r,navigation:i,onNavigate:s,viewId:a})=>t==null?void 0:t.map((o,l)=>I(EH,{getData:n,index:l,module:o,moduleMap:e,moduleWrapper:r,navigation:i,viewId:a,onNavigate:s},l)),EH=t=>{var v;const{getData:e,isTopLevel:n,module:r,moduleMap:i,moduleWrapper:s,viewId:a}=t,o=s,l=i.get(r.type),{logger:u,analyticServices:c}=Zh,d=XB[c.platform];l||u.warn("Unsupported module of type "+r.type+" encountered on "+d+" client on view "+a);const f=lAt(t),h=uAt(t),g=e((v=r.config)==null?void 0:v.contentId);return I(o,{isTopLevel:n,module:r,children:I(Ige,{value:f,children:l?I(l,{...t,data:g,moduleMap:i,moduleViewComponent:EH,children:h}):I(mt.Fragment,{})},r.uniqueId)})},cAt=$.memo(EH),dAt=({item:t})=>t.render(),fAt=({request:t,moduleMap:e,moduleWrapper:n,navigation:r,onNavigate:i})=>{const s=Lot(t),a=Eb("usePickupWhereYouLeftOff"),o=Fct(),l=$.useMemo(()=>{var h,g;return o((h=s==null?void 0:s.rootObject)==null?void 0:h.type,(g=s==null?void 0:s.rootObject)==null?void 0:g.subtype)},[o,s]),u="viewId"in t&&t.viewId||(l==null?void 0:l.viewId)||s.id,c=$.useMemo(()=>s.modules.flatMap((h,g)=>{var A;const v=h.type===gn.PICKUP_LEFT_OFF,b=h.type===gn.STATION_LIVE_NOW,S=(A=s.rootObject)==null?void 0:A.rewindable;return v&&S&&!a||b&&S&&a?[]:{module:h,render:()=>{var w,x,P;return I(cAt,{getData:s.getContent,isFirst:g===0,isLast:g===s.modules.length-1,isTopLevel:!0,module:h,moduleMap:e,moduleWrapper:n,navigation:r,rootObject:s.rootObject,viewId:u,viewRootObjectId:(w=s.rootObject)==null?void 0:w.id,viewRootObjectRewindable:((x=s.rootObject)==null?void 0:x.rewindable)??!1,viewRootObjectUrl:((P=s.rootObject)==null?void 0:P.url)??void 0,viewType:s.type,onNavigate:i},h.uniqueId)}}}),[e,n,r,i,s,u]),d=Rot(t),f=$.useCallback(()=>d(!0),[d]);return $.useMemo(()=>({modules:c,view:s,renderer:dAt,refresh:f}),[c,s,f])},hAt=({moduleMap:t,moduleWrapper:e,navigation:n,request:r,render:i,onNavigate:s,onViewLoaded:a,skipRendering:o,virtual:l})=>{const[u,c]=$.useState(!1),d=fAt({request:r,moduleMap:t,moduleWrapper:e,navigation:n,onNavigate:s});$.useEffect(()=>{a&&!u&&(a(d.view),c(!0))},[d,a,u]);let f=I(Dn,{});if(l){if(typeof window>"u")throw new Error("Virtual modules are only implemented for the browser.");const g=iAt({count:d.modules.length,estimateSize:()=>300,overscan:3});f=I("div",{style:{height:g.getTotalSize(),position:"relative"},children:g.getVirtualItems().map(v=>I("div",{"data-index":v.index,ref:g.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${v.start}px)`,zIndex:100-(v==null?void 0:v.index)},children:d.modules[v.index].render()},v.key))})}l||(f=I(Dn,{children:d.modules.map(g=>g.render())})),o&&(f=I(Dn,{}));const h=$.useMemo(()=>({refreshTopLevelModules:d.refresh}),[d.refresh]);return I(Ige,{value:h,children:(i==null?void 0:i(d.view,f))??f})},pAt=({moduleMap:t,moduleWrapper:e,navigation:n,onNavigate:r,onViewLoaded:i,render:s,request:a,viewContainer:o,shouldHandleErrorsSilently:l,skipRendering:u,virtual:c})=>I(o,{request:a,shouldHandleErrorsSilently:l,children:I(hAt,{moduleMap:t,moduleWrapper:e,navigation:n,render:s,request:a,skipRendering:u,virtual:c,onNavigate:r,onViewLoaded:i})});function gAt(){var t=new Map;
640function e(n){var r=n.root,i=n.rootMargin,s=n.threshold,a=t.get(r);a||(a=new Map,t.set(r,a));var o=JSON.stringify({rootMargin:i,threshold:s}),l=a.get(o);if(!l){var u=new Map,c=new IntersectionObserver(function(d){d.forEach(function(f){var h=u.get(f.target);h==null||h(f)})},{root:r,rootMargin:i,threshold:s});l={observer:c,entryCallbacks:u},a.set(o,l)}return{observe:function(f,h){var g,v;(g=l)==null||g.entryCallbacks.set(f,h),(v=l)==null||v.observer.observe(f)},unobserve:function(f){var h,g;(h=l)==null||h.entryCallbacks.delete(f),(g=l)==null||g.observer.unobserve(f)}}}return{getObserver:e}}var mAt="0px",vAt=[0],yAt=gAt();function bAt(t){var e,n,r=(e=void 0)!=null?e:mAt,i=(n=void 0)!=null?n:vAt,s=$.useRef(null),a=$.useRef(null),o=$.useRef(null),l=$.useState(),u=l[0],c=l[1],d=$.useCallback(function(){var v=s.current;if(!v){c(void 0);return}var b=yAt.getObserver({root:a.current,rootMargin:r,threshold:i});b.observe(v,function(S){c(S)}),o.current=b},[r,i]),f=$.useCallback(function(){var v=o.current,b=s.current;b&&(v==null||v.unobserve(b)),o.current=null},[]),h=$.useCallback(function(v){f(),s.current=v,d()},[d,f]),g=$.useCallback(function(v){f(),a.current=v,d()},[d,f]);return[h,{entry:u,rootRef:g}]}function Q4(){return Q4=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Q4.apply(this,arguments)}function SAt(t){var e,n=bAt(),r=n[0],i=n[1],s=!!((e=i.entry)!=null&&e.isIntersecting),a=$.useState(s),o=a[0],l=a[1];return s&&!o&&l(!0),[r,Q4({},i,{isVisible:s,wasEverVisible:o})]}const lme=({moduleId:t,contentId:e})=>{const{viewId:n,contentId:r}=Ht(wb),[i,{isVisible:s}]=SAt(),a=Pge(s,!1);return $.useEffect(()=>{!a&&s&&t&&lr.getAnalyticServices().sendModuleView({viewContext:{viewId:n,contentId:r},moduleId:t,contentId:e==null?void 0:e.toLowerCase()})},[s,t,e,a,r,n]),i},Ox=({children:t,isTopLevel:e,module:n})=>{const r=lme({moduleId:n.id,contentId:n.config.contentId});return e?I("div",{ref:r,children:t}):I(Dn,{children:t})},VA=({module:t,data:e})=>{var o,l;const n=Dl(),r=(o=t.config)==null?void 0:o.contentId,i=$.useMemo(()=>r&&n.sectionId||t.id,[r,t.id,n.sectionId]),s={feature:Ei.MODULE,itemsList:(l=n.carousel)==null?void 0:l.cardContentIds,moduleId:i},a=tSt(t.type,n);return a?I(Qbt,{data:a===ig.Featured?nSt(a,t,s,e,n):rSt(a,t,s,e,n)}):null};function ab(t){return typeof t=="object"&&t!==null&&t.constructor&&Object.prototype.toString.call(t).slice(8,-1)==="Object"}function iv(t,e){const n=["__proto__","constructor","prototype"];Object.keys(e).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof t[r]>"u"?t[r]=e[r]:ab(e[r])&&ab(t[r])&&Object.keys(e[r]).length>0?e[r].__swiper__?t[r]=e[r]:iv(t[r],e[r]):t[r]=e[r]})}function ume(t={}){return t.navigation&&typeof t.navigation.nextEl>"u"&&typeof t.navigation.prevEl>"u"}function cme(t={}){return t.pagination&&typeof t.pagination.el>"u"}function dme(t={}){return t.scrollbar&&typeof t.scrollbar.el>"u"}function fme(t=""){const e=t.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return e.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}const hme=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function EAt(t={},e=!0){const n={on:{}},r={},i={};iv(n,V0.defaults),iv(n,V0.extendedDefaults),n._emitClasses=!0,n.init=!1;const s={},a=hme.map(l=>l.replace(/_/,"")),o=Object.assign({},t);
640return Object.keys(o).forEach(l=>{typeof t[l]>"u"||(a.indexOf(l)>=0?ab(t[l])?(n[l]={},i[l]={},iv(n[l],t[l]),iv(i[l],t[l])):(n[l]=t[l],i[l]=t[l]):l.search(/on[A-Z]/)===0&&typeof t[l]=="function"?e?r[`${l[2].toLowerCase()}${l.substr(3)}`]=t[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=t[l]:s[l]=t[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:s,events:r}}function TAt({el:t,nextEl:e,prevEl:n,paginationEl:r,scrollbarEl:i,swiper:s},a){ume(a)&&e&&n&&(s.params.navigation.nextEl=e,s.originalParams.navigation.nextEl=e,s.params.navigation.prevEl=n,s.originalParams.navigation.prevEl=n),cme(a)&&r&&(s.params.pagination.el=r,s.originalParams.pagination.el=r),dme(a)&&i&&(s.params.scrollbar.el=i,s.originalParams.scrollbar.el=i),s.init(t)}const pme=(t,e)=>{let n=e.slidesPerView;if(e.breakpoints){const i=V0.prototype.getBreakpoint(e.breakpoints),s=i in e.breakpoints?e.breakpoints[i]:void 0;s&&s.slidesPerView&&(n=s.slidesPerView)}let r=Math.ceil(parseFloat(e.loopedSlides||n,10));return r+=e.loopAdditionalSlides,r>t.length&&e.loopedSlidesLimit&&(r=t.length),r};function AAt(t,e,n){const r=e.map((l,u)=>mt.cloneElement(l,{swiper:t,"data-swiper-slide-index":u}));function i(l,u,c){return mt.cloneElement(l,{key:`${l.key}-duplicate-${u}-${c}`,className:`${l.props.className||""} ${n.slideDuplicateClass}`})}if(n.loopFillGroupWithBlank){const l=n.slidesPerGroup-r.length%n.slidesPerGroup;if(l!==n.slidesPerGroup)for(let u=0;u<l;u+=1){const c=mt.createElement("div",{className:`${n.slideClass} ${n.slideBlankClass}`});r.push(c)}}n.slidesPerView==="auto"&&!n.loopedSlides&&(n.loopedSlides=r.length);const s=pme(r,n),a=[],o=[];for(let l=0;l<s;l+=1){const u=l-Math.floor(l/r.length)*r.length;o.push(i(r[u],l,"append")),a.unshift(i(r[r.length-u-1],l,"prepend"))}return t&&(t.loopedSlides=s),[...a,...r,...o]}function wAt(t,e,n,r,i){const s=[];if(!e)return s;const a=l=>{s.indexOf(l)<0&&s.push(l)};if(n&&r){const l=r.map(i),u=n.map(i);l.join("")!==u.join("")&&a("children"),r.length!==n.length&&a("children")}return hme.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in t&&l in e)if(ab(t[l])&&ab(e[l])){const u=Object.keys(t[l]),c=Object.keys(e[l]);u.length!==c.length?a(l):(u.forEach(d=>{t[l][d]!==e[l][d]&&a(l)}),c.forEach(d=>{t[l][d]!==e[l][d]&&a(l)}))}else t[l]!==e[l]&&a(l)}),s}function gme(t){return t.type&&t.type.displayName&&t.type.displayName.includes("SwiperSlide")}function mme(t){const e=[];return mt.Children.toArray(t).forEach(n=>{gme(n)?e.push(n):n.props&&n.props.children&&mme(n.props.children).forEach(r=>e.push(r))}),e}function _At(t){const e=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return mt.Children.toArray(t).forEach(r=>{if(gme(r))e.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=mme(r.props.children);i.length>0?i.forEach(s=>e.push(s)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:e,slots:n}}function CAt({swiper:t,slides:e,passedParams:n,changedParams:r,nextEl:i,prevEl:s,scrollbarEl:a,paginationEl:o}){const l=r.filter(P=>P!=="children"&&P!=="direction"),{params:u,pagination:c,navigation:d,scrollbar:f,virtual:h,thumbs:g}=t;let v,b,S,A,w;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&u.thumbs&&!u.thumbs.swiper&&(v=!0),r.includes("controller")&&n.controller&&n.controller.control&&u.controller&&!u.controller.control&&(b=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||o)&&(u.pagination||u.pagination===!1)&&c&&!c.el&&(S=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&f&&!f.el&&(A=!0),r.includes("navigation")&&n.navigation&&(n.navigation.prevEl||s)&&(n.navigation.nextEl||i)&&(u.navigation||u.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(w=!0);const x=P=>{t[P]&&(t[P].destroy(),P==="navigation"?(u[P].prevEl=void 0,u[P].nextEl=void 0,t[P].prevEl=void 0,t[P].nextEl=void 0):(u[P].el=void 0,t[P].el=void 0))};l.forEach(P=>{if(ab(u[P])&&ab(n[P]))iv(u[P],n[P]);else{const N=n[P];(N===!0||N===!1)&&(P==="navigation"||P==="pagination"||P==="scrollbar")?N===!1&&x(P):u[P]=n[P]}}),l.includes("controller")&&!b&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),r.includes("children")&&e&&h&&u.virtual.enabled?(h.slides=e,h.update(!0)):r.includes("children")&&t.lazy&&t.params.lazy.enabled&&t.lazy.load(),v&&g.init()&&g.update(!0),b&&(t.controller.control=u.controller.control),S&&(o&&(u.pagination.el=o),c.init(),c.render(),c.update()),A&&(a&&(u.scrollbar.el=a),f.init(),f.updateSize(),f.setTranslate()),w&&(i&&(u.navigation.nextEl=i),s&&(u.navigation.prevEl=s),d.init(),d.update()),r.includes("allowSlideNext")&&(t.allowSlideNext=n.allowSlideNext),r.includes("allowSlidePrev")&&(t.allowSlidePrev=n.allowSlidePrev),r.includes("direction")&&t.changeDirection(n.direction,!1),t.update(
640)}function xAt(t,e,n){if(!n)return null;const r=t.isHorizontal()?{[t.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`};return e.filter((i,s)=>s>=n.from&&s<=n.to).map(i=>mt.cloneElement(i,{swiper:t,style:r}))}const IAt=t=>{!t||t.destroyed||!t.params.virtual||t.params.virtual&&!t.params.virtual.enabled||(t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load(),t.parallax&&t.params.parallax&&t.params.parallax.enabled&&t.parallax.setTranslate())};function e_(t,e){return typeof window>"u"?$.useEffect(t,e):$.useLayoutEffect(t,e)}const OAt=$.createContext(null),PAt=$.createContext(null);function X4(){return X4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},X4.apply(this,arguments)}const vme=$.forwardRef(function(t,e){let{className:n,tag:r="div",wrapperTag:i="div",children:s,onSwiper:a,...o}=t===void 0?{}:t,l=!1;const[u,c]=$.useState("swiper"),[d,f]=$.useState(null),[h,g]=$.useState(!1),v=$.useRef(!1),b=$.useRef(null),S=$.useRef(null),A=$.useRef(null),w=$.useRef(null),x=$.useRef(null),P=$.useRef(null),N=$.useRef(null),k=$.useRef(null),{params:U,passedParams:H,rest:B,events:q}=EAt(o),{slides:Z,slots:C}=_At(s),L=()=>{g(!h)};Object.assign(U.on,{_containerClasses(ie,ae){c(ae)}});const V=()=>{if(Object.assign(U.on,q),l=!0,S.current=new V0(U),S.current.loopCreate=()=>{},S.current.loopDestroy=()=>{},U.loop&&(S.current.loopedSlides=pme(Z,U)),S.current.virtual&&S.current.params.virtual.enabled){S.current.virtual.slides=Z;const ie={cache:!1,slides:Z,renderExternal:f,renderExternalUpdate:!1};iv(S.current.params.virtual,ie),iv(S.current.originalParams.virtual,ie)}};b.current||V(),S.current&&S.current.on("_beforeBreakpoint",L);const j=()=>{l||!q||!S.current||Object.keys(q).forEach(ie=>{S.current.on(ie,q[ie])})},X=()=>{!q||!S.current||Object.keys(q).forEach(ie=>{S.current.off(ie,q[ie])})};$.useEffect(()=>()=>{S.current&&S.current.off("_beforeBreakpoint",L)}),$.useEffect(()=>{!v.current&&S.current&&(S.current.emitSlidesClasses(),v.current=!0)}),e_(()=>{if(e&&(e.current=b.current),!!b.current)return S.current.destroyed&&V(),TAt({el:b.current,nextEl:x.current,prevEl:P.current,paginationEl:N.current,scrollbarEl:k.current,swiper:S.current},U),a&&a(S.current),()=>{S.current&&!S.current.destroyed&&S.current.destroy(!0,!1)}},[]),e_(()=>{j();const ie=wAt(H,A.current,Z,w.current,ae=>ae.key);return A.current=H,w.current=Z,ie.length&&S.current&&!S.current.destroyed&&CAt({swiper:S.current,slides:Z,passedParams:H,changedParams:ie,nextEl:x.current,prevEl:P.current,scrollbarEl:k.current,paginationEl:N.current}),()=>{X()}}),e_(()=>{IAt(S.current)},[d]);function G(){return U.virtual?xAt(S.current,Z,d):!U.loop||S.current&&S.current.destroyed?Z.map(ie=>mt.cloneElement(ie,{swiper:S.current})):AAt(S.current,Z,U)}return mt.createElement(r,X4({ref:b,className:fme(`${u}${n?` ${n}`:""}`)},B),mt.createElement(PAt.Provider,{value:S.current},C["container-start"],mt.createElement(i,{className:"swiper-wrapper"},C["wrapper-start"],G(),C["wrapper-end"]),ume(U)&&mt.createElement(mt.Fragment,null,mt.createElement("div",{ref:P,className:"swiper-button-prev"}),mt.createElement("div",{ref:x,className:"swiper-button-next"})),dme(U)&&mt.createElement("div",{ref:k,className:"swiper-scrollbar"}),cme(U)&&mt.createElement("div",{ref:N,className:"swiper-pagination"}),C["container-end"]))});vme.displayName="Swiper";function J4(){return J4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},J4.apply(this,arguments)}const TH=$.forwardRef(function(t,e){let{tag:n="div",children:r,className:i="",swiper:s,zoom:a,virtualIndex:o,...l}=t===void 0?{}:t;const u=$.useRef(null),[c,d]=$.useState("swiper-slide");function f(v,b,S){b===u.current&&d(S)}e_(()=>{if(e&&(e.current=u.current),!(!u.current||!s)){if(s.destroyed){c!=="swiper-slide"&&d("swiper-slide");return}return s.on("_slideClass",f),()=>{s&&s.off("_slideClass",f)}}}),e_(()=>{s&&u.current&&!s.destroyed&&d(s.getSlideClasses(u.current))},[s]);const h={isActive:c.indexOf("swiper-slide-active")>=0||c.indexOf("swiper-slide-duplicate-active")>=0,isVisible:c.indexOf("swiper-slide-visible")>=0,isDuplicate:c.indexOf("swiper-slide-duplicate")>=0,isPrev:c.indexOf("swiper-slide-prev")>=0||c.indexOf("swiper-slide-duplicate-prev")>=0,isNext:c.indexOf("swiper-slide-next")>=0||c.indexOf("swiper-slide-duplicate-next")>=0},g=()=>typeof r=="function"?r(h):r;return mt.createElement(n,J4({ref:u,className:fme(`${c}${i?` ${i}`:""}`),"data-swiper-slide-index":o},l),mt.createElement(OAt.Provider,{value:h},a?mt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},g()):g()))});TH.displayName="SwiperSlide";const ou={small:4,mediumAndLarge:8,bigScreens:20},RAt=t=>({modules:[H$e,j$e,B$e,V$e],spaceBetween:ou.small,slidesPerView:2.5,speed:300,navigation:t,watchSlidesProgress:!0,mousewheel:{forceToAxis:!0},a11y:{slideLabelMessage:"Slide {{index}} of {{slidesLength}}"},freeMode:{enabled:!0,sticky:!0,momentumBounceRatio:.25,momentumRatio:1,momentumVelocityRatio:1.5},breakpoints:{[Oi[ve.Medium]]:{slidesPerView:4.25,spaceBetween:ou.mediumAndLarge},[Oi[ve.Large]]:{slidesPerView:6,spaceBetween:ou.mediumAndLarge}}}),LAt={slidesPerView:1.75,breakpoints:{[Oi[ve.Medium]]:{slidesPerView:2.75,spaceBetween:ou.mediumAndLarge},[Oi[ve.Large]]:{slidesPerView:4,spaceBetween:ou.mediumAndLarge}}}
640,DAt={slidesPerView:1,breakpoints:{[Oi[ve.Medium]]:{slidesPerView:2,spaceBetween:ou.mediumAndLarge},[Oi[ve.XXLarge]]:{slidesPerView:2,spaceBetween:ou.bigScreens}}},kAt={1:{slidesPerView:1,breakpoints:{[Oi[ve.Medium]]:{slidesPerView:1}}},2:{slidesPerView:1,breakpoints:{[Oi[ve.Medium]]:{slidesPerView:2,spaceBetween:ou.mediumAndLarge},[Oi[ve.XXLarge]]:{slidesPerView:2,spaceBetween:ou.bigScreens}}}},NAt={slidesPerView:1.1,breakpoints:{[Oi[ve.Medium]]:{slidesPerView:2.2,spaceBetween:ou.mediumAndLarge},[Oi[ve.Large]]:{slidesPerView:3,spaceBetween:ou.mediumAndLarge}},a11y:{slideLabelMessage:"",slideRole:""}},MAt={breakpoints:{[Oi[ve.Large]]:{slidesPerView:3,spaceBetween:ou.mediumAndLarge}}},FAt={slidesPerView:1.1,breakpoints:{[Oi[ve.Medium]]:{slidesPerView:2.2,spaceBetween:ou.mediumAndLarge},[Oi[ve.Large]]:{slidesPerView:1,spaceBetween:ou.mediumAndLarge}},a11y:{slideLabelMessage:"",slideRole:""}},mE={getDefaults:RAt,gridImage:LAt,featured:DAt,featuredSingleAndDouble:kAt,stacked:NAt,sideColumn:MAt,sideColumnStacked:FAt},Eh={container:{position:"relative",...Dr({".swiper-button":{opacity:1}}),"&:is(:focus-visible, :focus-within)":{".swiper-slide":{opacity:1}},...Bt.focusOutline({outlineOffset:3})},swiper:{overflow:"visible",".swiper-wrapper":{boxSizing:"border-box"},".swiper-slide":{opacity:0,'&[style*="width:"]':{opacity:1,[Be(ve.Large)]:{...Bt.transition("opacity"),"&:not(.swiper-slide-visible)":{opacity:.5}}}}},swiperStacked:{zIndex:50,".swiper-wrapper":{zIndex:50}},swiperButtonWrap:{position:"absolute",right:3,top:-45,zIndex:Ai.carouselNav,display:"flex",gap:8},swiperButtonWrapHidden:{display:"none"},swiperButton:{display:"flex",background:_e.white,boxShadow:`0px 3px 3px ${_e.audacyDarkNavy20}`,color:_e.audacyDarkNavy,borderRadius:"100%",height:Sh.carouselNav,width:Sh.carouselNav,"&:hover":{background:_e.white80},"&[disabled]":{border:`1px solid ${_e.white30}`,background:"none",color:_e.white30,"&:hover":{color:_e.white30}},opacity:0,...Bt.transition(["opacity","background"]),...Dr({color:_e.audacyDarkNavy})},stackedCardHolder:{display:"flex",flexDirection:"column",gap:ou.mediumAndLarge},stackedItem:{marginBottom:6,":nth-of-type(3)":{marginBottom:0}}},yme=({ariaLabel:t="Carousel",children:e,carouselViewCss:n,swiperParams:r,...i})=>{const s=eT(),[a,o]=$.useState(null),[l,u]=$.useState(null),[c,d]=$.useState(!0),f=$.useRef(null),h=$.useRef(null),{isSideColumn:g,carousel:v}=Dl(),b=mE.getDefaults({prevEl:l,nextEl:a}),S={...b,...r,speed:s?0:(r==null?void 0:r.speed)||(b==null?void 0:b.speed)},{t:A}=dn(),w=()=>{const C=h.current;C&&d(!(C.isBeginning&&C.isEnd))},x=C=>{h.current=C,w()};function P(C){for(const L of C)L.isIntersecting?(L.target.removeAttribute("tabindex"),L.target.removeAttribute("aria-hidden")):(L.target.setAttribute("tabindex","-1"),L.target.setAttribute("aria-hidden","true"))}const N=C=>{if(C.target===C.currentTarget){const{key:L}=C,V=h.current;if(V)switch(L){case a0.ArrowRight:V.slideNext(cu.default*1e3);break;case a0.ArrowLeft:V.slidePrev(cu.default*1e3);break}}},k=()=>{const C=h.current;if(C&&!f.current){const L=new IntersectionObserver(P,{root:C.el,threshold:.95});f.current=L;const V=C.el.querySelectorAll('.swiper-slide, .swiper-slide a:not([role="menu"] a),.swiper-slide button:not([role="menu"] button)');for(const j of V)L.observe(j)}},U=()=>{k()},H=()=>{w()},B=()=>{k()},q=()=>{const C=h.current;C!=null&&C.activeIndex&&C.params.slidesPerView&&typeof C.params.slidesPerView=="number"&&C.slideTo(C.activeIndex+Math.floor(C.params.slidesPerView)-1)},Z=()=>{const C=h.current;C!=null&&C.activeIndex&&C.params.slidesPerView&&typeof C.params.slidesPerView=="number"&&C.slideTo(C.activeIndex-Math.floor(C.params.slidesPerView)+1)};return $.useEffect(()=>()=>{var C;(C=f.current)==null||C.disconnect()},[]),be("div",{css:[Eh.container,g&&Eh.containerSideColumn,n],tabIndex:0,"aria-label":t,onFocus:U,onKeyUp:N,...i,children:[I(vme,{...S,css:[Eh.swiper,(v==null?void 0:v.isStacked)&&Eh.swiperStacked],onInit:x,onResize:H,onTransitionStart:B,virtual:{addSlidesBefore:5,addSlidesAfter:5},children:e}),be("div",{css:[Eh.swiperButtonWrap,c?{}:Eh.swiperButtonWrapHidden],children:[I(Mc,{buttonCss:Eh.swiperButton,className:"swiper-button",icon:en.CaretLeft,ariaLabel:A("carousel.ariaLabels.prevSlides"),ref:C=>u(C),iconSizeInPx:16,onClick:Z}),I(Mc,{buttonCss:Eh.swiperButton,className:"swiper-button",icon:en.CaretRight,ariaLabel:A("carousel.ariaLabels.nextSlides"),ref:C=>o(C),iconSizeInPx:16,onClick:q})]})]})},$At=({ariaLabel:t,children:e,carouselViewCss:n,swiperParams:r})=>{const i=$.useMemo(()=>{const s=(a,o)=>I(TH,{"aria-label":`Slide ${o+1} of ${e.length}`,virtualIndex:o,children:$.cloneElement(a)},o);return $.Children.map(e,s)},[e]);return I(yme,{ariaLabel:t,swiperParams:r,carouselViewCss:n,children:i})},BAt=({children:t})=>I("div",{css:Eh.stackedCardHolder,children:t}),UAt=({ariaLabel:t,children:e,carouselViewCss:n,stackSize:r=3,swiperParams:i}
640)=>{const s=$.useMemo(()=>qgt(e,r),[e,r]);let a=1;return I(yme,{ariaLabel:t,carouselViewCss:n,swiperParams:i??mE.stacked,children:s.map((o,l)=>I(TH,{virtualIndex:l,children:I(BAt,{children:$.Children.map(o,u=>I("div",{css:Eh.stackedItem,"aria-label":`Slide ${a++} of ${e.length}`,children:u}))})},l))})},VAt=({children:t})=>{const{carousel:e,isSideColumn:n}=Dl();if(!e)return null;if(e!=null&&e.isStacked)return I(UAt,{stackSize:e.itemsPerColumn,swiperParams:n?mE.sideColumnStacked:void 0,children:t});const r=t,i=n?mE.sideColumn:void 0,s=r.length>2?mE.featured:mE.featuredSingleAndDouble[r.length];return I($At,{swiperParams:e.isFeatured?s:i,children:r})},HAt=({moduleMap:t,moduleViewComponent:e})=>{const n=gde(Det);if(!(n!=null&&n.module))return null;const{module:r,getContent:i}=n;return I(e,{getData:i,module:r,moduleMap:t,moduleWrapper:Ox})},jAt=Yn({key:"refreshTrigger",default:Date.now()}),{useWrappedCachedValue:zAt}=hx({get:({stationId:t})=>({get:e})=>{if(e(jAt),!t)return r0;const n=e(vT(t));if(!n)return r0;const r=Date.now(),i=new Date().setHours(0,0,0,0),s=n.getAll().filter(u=>u.isReplayable&&u.startTime>=i&&u.endTime<r);if(s.length===0)return r0;const a={},o=s.map(u=>(a[u.id]=Cv(u.getDataObject()),{config:{contentId:u.id},moduleId:`CLIENT--ENTITY_CARD_HORIZONTAL--EARLIER_TODAY--${u.id}`,moduleType:gn.ENTITY_CARD_HORIZONTAL})),l=mT({moduleId:"CLIENT--SECTION_WRAPPER--EARLIER_TODAY",moduleType:gn.SECTION_WRAPPER,modules:[{config:{itemsPerColumn:3},moduleId:"CLIENT--CAROUSEL--EARLIER_TODAY",moduleType:gn.CAROUSEL,modules:o}]});return{getContent:u=>u?a[u]:void 0,module:l}},key:"EarlierToday",refreshEverySeconds:I1.every30s}),GAt=({module:{config:t},moduleMap:e,moduleViewComponent:n})=>{const{viewRootObjectId:r}=Dl(),i=zAt({stationId:r});if(!r||!i||!i.module)return null;const{module:s,getContent:a}=i;return I(n,{getData:a,module:{...s,config:t},moduleMap:e,moduleWrapper:Ox})},WAt={listItem:{position:"relative",marginBottom:20}},TN=({ariaLabel:t="List",isOrdered:e=!1,items:n,itemCss:r,renderItem:i})=>{const[s,a]=$.useState(0),o=$.useRef(null);$.useLayoutEffect(()=>{var c;!s&&((c=o==null?void 0:o.current)!=null&&c.clientHeight)&&a(o.current.clientHeight)},[s]);const l=n.map((c,d)=>{const f=()=>c!=null&&c.id?c.id:c!=null&&c.time&&(c!=null&&c.title)?c.title+(c==null?void 0:c.time):d.toString();return I("li",{css:[WAt.listItem,r],tabIndex:-1,children:i({item:c,isLast:d===n.length-1,isFirst:!d})},f())}),u=20;return e?I("ol",{style:{minHeight:s+u},ref:o,"aria-label":t,children:l}):I("ul",{ref:o,style:{minHeight:s+u},"aria-label":t,children:l})},qAt=({ariaLabel:t,children:e})=>I(TN,{ariaLabel:t,items:e,renderItem:({item:r})=>r}),KAt=({children:t})=>I(qAt,{isListModule:!0,children:t});let pm=null;async function YAt({contentId:t,isStation:e}){if(!t)return null;const n=Date.now();if(pm&&n<pm.endTime)return pm;const r=e?await lr.getDataServices().getSchedules(t):await lr.getDataServices().getCurrentEpisodes(t),i=_2(r).getAll();if(!i||i.length<=1)return null;const s=i.find(a=>n>a.startTime&&n<a.endTime&&ude(a)&&!a.isOnAirOnly)??null;return Mi.isEqual(pm==null?void 0:pm.getDataObject(),s==null?void 0:s.getDataObject())||(pm=s),pm}function bme({contentId:t,isStation:e}){const{data:n,isLoading:r}=EDe({queryKey:["liveEpisode",t,e],queryFn:()=>YAt({contentId:t,isStation:e}),enabled:!!t,staleTime:I1.every15s,refetchInterval:I1.every15s});return{liveEpisode:n,isLoading:r}}const TJ={link:{...AT,...cn.bodySmall,"&:active":{color:_e.white15},textAlign:"left"},secondaryLink:{...cn.metadataSmall,color:_e.white60,...Dr({color:_e.white}),textDecoration:"underline"}},AH=({useClickHandler:t,isSecondary:e,label:n,linkCss:r,...i})=>{const s=t?Fi.Button:Fi.Anchor,a=e?n:j2(n),o=[TJ.link,e?TJ.secondaryLink:{},r];return xd({props:{as:s,...i},children:a,styles:o})},g5={title:{...cn.titleSection,marginBottom:5},footerLink:{...cn.buttonSmall}},ZAt=({contentId:t,episode:e,isStation:n,liveUntil:r,scheduleHref:i,onClick:s,onFooterClick:a,onOptionsMenuClick:o,isPlaying:l,onPlayLiveItem:u,playContext:c,isRewindable:d})=>{var A;const{t:f}=dn(),{isSideColumn:h}=Dl(),g=xx({contentId:e.id,entityType:e.type,entitySubtype:e.subtype,image:e.image,isLive:e.isLive,title:e.title,url:e.url}),v=!(e!=null&&e.showContentId),[b,S]=$.useMemo(()=>e?v?[w2(e.startTime,e.endTime," - ",!1),e.parentImage]:I2(e,n):[void 0,void 0],[e,v,n]);return be(Gv,{containerCss:g5.container,title:f("entity.liveNow.header"),footerContent:i&&n&&I(AH,{href:i,label:f("entity.liveNow.schedule"),linkCss:g5.footerLink,onClick:a}),children:[I(fC,{ctaColor:_e.audacyOrange,imageURIBase:S,isLive:!0,liveUntil:r,onOptionsMenuClick:o,titleCss:h?void 0:g5.title,href:e.url,title:b,entitySubtype:e.entitySubtype,entityType:e.entityType,contentId:t,isPlayable:Ix(e.entityType),isPlaying:l,onClick:s,onPlayLiveItem:u,parentId:(A=e.parentStationIds)==null?void 0:A[0],playContext:c,optionsMenu:g,isRewindable:d}),!n&&I(sme,{episode:e,live:!0,hasSectionWrapper:!1})]})},Sme=({isStation:t,module:e})=>{const{viewRootObjectId:n,viewRootObjectUrl:r,viewRootObjectRewindable:i}=Dl(),s=Yu(),{liveEpisode:a}=bme({contentId:n,isStation:t}),o=bN({contentId:a==null?void 0:a.id,feature:Ei.CTA_BUTTON,moduleId:e.id}),l={feature:Ei.MODULE,moduleId:e.id};if(!n||!a)return null;const u=a!=null&&a.startDateTime&&(a!=null&&a.duration)?{playingUntil:j7(a.startDateTime,a.duration)}:void 0,c=()=>
640{s.playEpisodeLive(a,l)},d=r?uot(r):"";return I(Dn,{children:I(ZAt,{episode:a,isStation:t,onPlayLiveItem:c,onFooterClick:o,liveUntil:u,scheduleHref:d,contentId:a.id,playContext:l,isRewindable:i})})},QAt=({module:t})=>I(Sme,{isStation:!0,module:t}),AJ={sm:45,md:60},Eme={container:{marginBottom:AJ.sm,[Be(ve.Medium)]:{marginBottom:AJ.md},...Dr({".swiper-button, .swiper-slide":{opacity:1}})}},XAt={feature:Ei.PLAYLIST},JAt=({item:t,playlistId:e})=>I(fC,{...t,collectionId:e,href:t.url,imageURIBase:t.image??t.parentImage,entityImageShape:Ad.Square,contentId:t.id,entitySubtype:t.entitySubtype,entityType:t.entityType,playContext:XAt,isPlayable:!0}),wJ={separator:{borderBottom:Ng.separator,paddingTop:40,marginTop:13,marginBottom:15,[Be(ve.Medium)]:{paddingTop:0}},title:{...cn.bodyLarge,color:_e.white}},ewt=({itemIds:t,durationSeconds:e,playlistId:n})=>{const r="Playlist",i=Xfe(t);if(!(i!=null&&i.length))return null;const s=(i==null?void 0:i.length)??0,a=Kfe(s,e,"comma",{i18n:si,playlistCountKey:"playlistScreen.playlistCount",playlistDurationKey:"playlistScreen.playlistDuration"}),o=({item:l})=>I(JAt,{item:l,playlistId:n});return be("div",{children:[a&&I("p",{css:wJ.title,children:a}),I("div",{css:wJ.separator}),I(TN,{ariaLabel:r,items:i,renderItem:o})]})},twt=()=>{const{viewRootObjectId:t=""}=Dl(),{durationSeconds:e,itemsIdList:n}=Ht(Qfe(t))??{};return!e||!(n!=null&&n.length)?null:I("section",{css:[Bt.horizontalModulePadding(),Eme.container],children:I(ewt,{durationSeconds:e,itemIds:n,playlistId:t})})},nwt=({moduleMap:t,moduleViewComponent:e})=>{const n=gde(Ret);if(!(n!=null&&n.module))return null;const{module:r,getContent:i}=n;return I(e,{getData:i,module:r,moduleMap:t,moduleWrapper:Ox})},_J=({children:t,isLast:e,module:n})=>{var o,l,u,c,d,f,h,g,v,b,S,A;const r=((l=(o=n==null?void 0:n.config)==null?void 0:o.header)==null?void 0:l.label)||"",i=((c=(u=n==null?void 0:n.config)==null?void 0:u.footer)==null?void 0:c.label)||"",s=(f=(d=n==null?void 0:n.config)==null?void 0:d.footer)==null?void 0:f.url,a=s&&i&&I(AH,{label:i,linkCss:{...cn.buttonSmall},href:s});return I(Gv,{isLast:e,href:Jl((h=n==null?void 0:n.config)==null?void 0:h.title)||(v=(g=n==null?void 0:n.config)==null?void 0:g.title)==null?void 0:v.url,title:Jl((b=n==null?void 0:n.config)==null?void 0:b.title)?n.config.title:(A=(S=n==null?void 0:n.config)==null?void 0:S.title)==null?void 0:A.label,subtitle:r,footerContent:a,children:t})},CJ={container:{[Be(ve.Small)]:{width:300,height:250},[Be(ve.Large)]:{width:728,height:90},margin:"0 auto",marginBottom:60},hidden:{display:"none"}},Tme=()=>{const[t,e]=$.useState(0),n=Fs().bk,r=Ht($he);return t!==n&&Math.abs(n-t)===2&&e(n),I("div",{id:"google-ad-manager___inline-1",className:"rblad-aud_bottom",css:[CJ.container,r&&CJ.hidden]})},kO=t=>({columnGap:t.gap,display:"grid",gridTemplateColumns:`repeat(${t.columnCount}, 1fr)`,height:"100%"}),rwt={grid:{...kO(nv[ve.Small]),[Be(ve.Medium)]:kO(nv[ve.Medium]),[Be(ve.Large)]:kO(nv[ve.Large]),[Be(ve.ExtraLarge)]:kO(nv[ve.ExtraLarge])}},iwt=({children:t,gridCss:e})=>I("div",{css:[rwt.grid,e],children:t}),swt={defaultColumnStart:"1"},NO=t=>t.split("/"),yw=([t,e])=>({gridColumn:`${t} / span ${e}`}),MO=t=>yw([swt.defaultColumnStart,String(t)]),awt=({children:t,sm:e,md:n,lg:r,xl:i,gridItemCss:s,...a})=>{const o={[Be(ve.Small)]:e?yw(NO(e)):MO(nv[ve.Small].columnCount),[Be(ve.Medium)]:n?yw(NO(n)):!e&&MO(nv[ve.Medium].columnCount),[Be(ve.Large)]:r?yw(NO(r)):!n&&!e&&MO(nv[ve.Large].columnCount),[Be(ve.ExtraLarge)]:i?yw(NO(i)):!r&&!n&&!e&&MO(nv[ve.ExtraLarge].columnCount)};return I("div",{css:[o,s],...a,children:t})},owt=({children:t,moduleId:e,contentId:n})=>{const r=lme({moduleId:e,contentId:n});return I("div",{ref:r,children:t})},{useWrappedCachedValue:lwt}=hx({get:t=>({get:e})=>t?e(ade(t)).getAll().find(r=>r.isReplayable&&r.endTime<Date.now()):void 0,key:"PreviousEpisode",refreshEverySeconds:I1.every30s}),oc={listItem:{padding:"20px 0",position:"relative",...Bt.transition("opacity")},listItemHover:{[Be(ve.Large)]:{},"&::before":{...Bt.transition("opacity")}},played:{opacity:.6},container:{display:"block",width:"100%",textAlign:"left",...Dr({color:_e.white})},header:{display:"flex",marginBottom:20,alignItems:"center"},image:{width:76,height:76,marginRight:10,flexShrink:0,[Be(ve.Medium)]:{width:80,height:80,marginRight:20},[Be(ve.Large)]:{width:88,height:88}},eyebrow:{...cn.metadataSmall,marginBottom:6,color:_e.white60,flexWrap:"wrap"},title:{...cn.metadataLarge,...Dr({color:_e.white})},descriptionWrapper:{paddingBottom:20},description:{...cn.bodySmall,color:_e.white60,pointerEvents:"none"},bottomOptions:{alignItems:"center",display:"flex",justifyContent:"space-between",width:"100%"},playGroup:{alignItems:"center",display:"flex",gap:5,zIndex:0},actionsGroup:{alignItems:"center",display:"flex",gap:20}},uwt=(t,e=!0)=>{const{parentTitle:n,publishDate:r}=t,i=[];if(r){const s=dC(r);s&&i.push(s)}if(e&&n){const s=n.length>100?`${n.substring(0,100)}...`:n;i.push(s)}return i}
640,cwt=({duration:t,episode:e,isInQueue:n,isLoggedIn:r,isPlayed:i,isPlaying:s,onClick:a,onPlayStateClick:o,onQueueClick:l,resumePoint:u,isScrubbing:c,hasOptionsMenu:d=!0,isPlayable:f})=>{const h=xx({contentId:e.id,entityType:e.type,entitySubtype:e.subtype,image:e.image,title:e.title,url:e.url}),{t:g}=dn(),{description:v}=e,b=e.url,S=uwt(e,!1),[A,w]=I2(e),x=g(n?"optionsMenu.removeFromQueue":"optionsMenu.addToQueue"),P=be(Dn,{children:[be("div",{css:oc.header,children:[!!w&&I(zf,{entityImageCss:oc.image,alt:e.imageAlt,aspectRatio:1,entityImageShape:Ad.Square,imageURIBase:w}),be("div",{children:[S.length>0&&I(U1,{bulletedCss:oc.eyebrow,title:S}),I("h3",{css:oc.title,children:A})]})]}),!!v&&I("div",{css:oc.descriptionWrapper,children:I(TD,{displayShowMore:!1,numberOfLines:3,shouldStripTags:!0,textCss:oc.description,textId:`truncated-desc-${e.id}`,text:v})})]});return I("div",{css:oc.listItem,children:be("div",{css:i&&!s&&oc.played,children:[b?I(Mg,{as:Fi.Anchor,css:oc.container,href:b,onClick:a,children:P}):I("div",{css:oc.container,children:P}),be("div",{css:oc.bottomOptions,children:[I("button",{type:"button",css:oc.playGroup,onClick:()=>o==null?void 0:o(e.id),"aria-label":g("playerControls.accessibilityLabels.play"),children:I(yN,{duration:t,isPlayed:i,isPlaying:s,isScrubbing:c,resumePoint:u,isPlayable:f})}),be("div",{css:oc.actionsGroup,children:[r&&cde(e.type,e.subtype)&&I(Mc,{ariaLabel:x,buttonSizeInPx:18,icon:n?en.QueueRemove:en.QueueAdd,onClick:l,title:x}),d&&h?I(pH,{ariaLabel:g("playerControls.accessibilityLabels.options"),menuPosition:I0.BottomLeft,menuTitle:A,menuImage:w?{imageURIBase:w,alt:e.imageAlt}:void 0,optionsMenu:h,iconSizeInPx:14}):null]})]})]})})},dwt=({episode:t,onPlayClick:e,hasOptionsMenu:n})=>{const{isLoggedIn:r}=Ax(),{add:i,contains:s,remove:a}=gN(),o=mN(t.id),l=bN({contentId:t.id,entityType:t.type,entitySubtype:t.subtype,feature:Ei.LIST_ITEM}),u={feature:Ei.LIST_ITEM},{id:c}=t,d=s(c),f=()=>{d?a([c]):i(c)},{isPlayed:h,isPlaying:g,onPlayStateClick:v,resumePoint:b,isScrubbing:S,isNowPlaying:A,nowPlayingDuration:w}=dH({isPlayable:!0,item:{id:t.id,entityType:t.entityType,entitySubtype:t.entitySubtype,startDateTime:t.startDateTime,duration:t.duration},playContext:u,playOrPause:o});return I(cwt,{duration:A?w:t.duration,episode:t,isInQueue:d,isLoggedIn:r,isPlayed:h,isPlaying:g,onClick:l,onPlayStateClick:e||v,onQueueClick:f,resumePoint:b,isScrubbing:S,hasOptionsMenu:n,isPlayable:Ix(t.type)})},fwt=({episode:t,isShowLive:e,onPlayClick:n})=>{const{t:r}=dn();return I(Gv,{title:r(e?"showScreen.previousEpisode.header.previous":"showScreen.previousEpisode.header.latest"),content:I(dwt,{episode:t,onPlayClick:n})})},hwt=t=>{const e=Yu(),{viewRootObjectId:n}=Dl(),r=lwt(n),{liveEpisode:i}=bme({contentId:n}),{playbackResumePointStartOffset:s}=ede(r);if(!r)return null;const a=()=>{const l={feature:Ei.MODULE,moduleId:t.module.id};e.playFromId(r.id,l,{startOffset:s})},o=r.title||Kce(r.publishDate)||"";return I(fwt,{episode:{...r,title:o},isShowLive:!!i,onPlayClick:a})},pwt=t=>{var r;const e=Dl(),n=$.useMemo(()=>{var i,s;return{moduleId:(s=(i=t==null?void 0:t.module)==null?void 0:i.id)==null?void 0:s.replace(gn.SHOW_LIVE_NOW_AND_PREV,gn.BANNER_AD),contentId:e.viewRootObjectId}},[(r=t==null?void 0:t.module)==null?void 0:r.id,e]);return be(Dn,{children:[I(Sme,{isStation:!1,...t}),I(owt,{...n,children:I(Tme,{})}),I(iwt,{children:I(awt,{lg:"1/7",children:I(hwt,{...t})})})]})},Ame=({stationId:t,limit:e})=>lr.getDataServices().getSongHistory(t,e),gwt=6e4,mwt=Mv({key:"songHistoryDefault",get:({stationId:t,limit:e})=>async()=>{try{return await Ame({stationId:t,limit:e})}catch(n){return Pn.error(`[${Rn.Analytics}] Station: songHistory atom fetching failed event:
641${JSON.stringify(n,null,2)}`),[]}}}),vwt=X1({key:"SongHistory",default:mwt}),wme=({stationId:t,limit:e})=>{const[n,r]=Fo(vwt({stationId:t,limit:e})),i=$.useRef(null);return $.useEffect(()=>{const s=async l=>{try{return(await Ame({stationId:t,limit:l})).filter(({time:c})=>new Date(c).getTime()+gwt<Date.now())}catch(u){return Pn.error(`[${Rn.Analytics}] Station: songHistory fetching failed event:
642${JSON.stringify(u,null,2)}`),n||[]}},a=async()=>{let l=await s(e);const u=l.length;if(e&&u<e){const c=e+(e-u);l=await s(c)}Mi.isEqual(n,l)||r(l)};a();const o=setInterval(a,I1.every15s);return i.current=o,()=>{i.current&&clearInterval(i.current)}},[e,t,n]),n},m5={display:"inline-flex",alignItems:"center"},ch={container:{...m5,gap:20,flex:1,borderRadius:5,textAlign:"left",position:"relative",width:"100%",...Bt.transition("background-color")},contentContainer:{display:"flex",justifyContent:"space-between",flex:1},timeContainer:{...m5,marginRight:0},imageContainer:{width:62,position:"relative"}
642,entityImage:{...Bt.transition("opacity")},bulletedContainer:{display:"grid",order:-1,...Bt.overflowGradient("to right")},title:{color:_e.white,...cn.metadataLarge,...Bt.truncateText(2),...Bt.transition("color")},titleContainer:{display:"flex",flexDirection:"column",gap:2,flex:1},playingNowContainer:{...m5,gap:4,color:_e.audacyOrange},playingNowText:{...fH,color:_e.audacyOrange}},ywt=({artist:t,imageAlt:e,image:n,isFirst:r,title:i,time:s,sizes:a})=>{var g;const{t:o}=dn(),l=16,u=Bct(),c=((g=u==null?void 0:u.rootObject)==null?void 0:g.image)||"",d=be("div",{css:ch.playingNowContainer,children:[I("span",{css:ch.playingNowText,children:o("songHistory.playingNow")}),I(Yr,{name:en.LiveSM,sizeInPx:l})]}),f=be("div",{css:[ch.titleContainer],children:[I("span",{css:ch.title,className:"title",children:i}),I("div",{css:ch.bulletedContainer,children:I(U1,{title:[t]})})]}),h=I("div",{css:[ch.timeContainer],children:I(U1,{title:[Xh(fL(s),"h:mm aaa")]})});return be("div",{css:ch.container,children:[I("div",{css:ch.imageContainer,children:I(zf,{alt:e,entityImageCss:ch.entityImage,imageURIBase:n,sizes:a,fallbackImage:c})}),be("div",{css:ch.contentContainer,children:[f,r?d:h]})]})},_me=({ariaLabel:t="SongHistoryList",items:e})=>I(TN,{ariaLabel:t,items:e,renderItem:({item:r,isFirst:i})=>I(ywt,{isFirst:i,...r})}),bwt=()=>{const{viewRootObjectId:t}=Dl(),n=wme({stationId:t||"",limit:40});return n.length>0?I("section",{css:[Bt.horizontalModulePadding(),Eme.container],children:I(_me,{items:n})}):I(Dn,{})},xJ={sectionContainer:{display:"flex",flexDirection:"column",minHeight:"inherit"},footerlink:{...cn.buttonSmall}},Swt=()=>{const{t}=dn(),{viewRootObjectId:e}=Dl(),r=wme({stationId:e||"",limit:5}),i=location.pathname,s=i.endsWith("/")?"":"/",a=`${i}${s}song-history`;return r.length>0?I(Gv,{containerCss:xJ.sectionContainer,title:t("songHistory.title"),footerContent:I(AH,{href:a,label:t("songHistory.seeMore"),linkCss:xJ.footerlink,onClick:()=>{}}),children:I(_me,{items:r})}):I(Dn,{})},Ewt=({module:t})=>{var n,r,i,s;return((r=(n=t==null?void 0:t.config)==null?void 0:n.titleFragments)==null?void 0:r.find(a=>a.replace(/\s/g,"").length>0))?I(BSt,{children:(s=(i=t==null?void 0:t.config)==null?void 0:i.titleFragments)==null?void 0:s.join(" ")}):I(Dn,{})},Twt=()=>Dl().viewType===Vi.SHOW?I(Dn,{}):I(Tme,{}),Awt=()=>{const[t,e]=Fo(Fhe);return $.useEffect(()=>{t||e(!0)}),I(Dn,{})},wwt=({module:{config:t},moduleMap:e,moduleViewComponent:n})=>{const{viewRootObjectId:r}=Dl(),[i,s]=$.useState(null),o=pb(Tet({stationId:r})).valueMaybe();$.useEffect(()=>{o!=null&&o.module&&s(o)},[o]);const l=o!=null&&o.module?o:i;return l!=null&&l.module?I(n,{getData:l.getContent,module:{...l.module,config:t},moduleMap:e,moduleWrapper:Ox}):null},_wt=new Map([[gn.CONTINUE_LISTENING,HAt],[gn.CAROUSEL,VAt],[gn.RECENTLY_PLAYED_STATIONS,nwt],[gn.SECTION_WRAPPER,_J],[gn.SAFE_SECTION_WRAPPER,_J],[gn.STATION_LIVE_NOW,QAt],[gn.SHOW_LIVE_NOW_AND_PREV,pwt],[gn.EARLIER_TODAY,GAt],[gn.VIEW_TITLE,Ewt],[gn.ENTITY_CARD_FEATURED,VA],[gn.ENTITY_CARD_HORIZONTAL,VA],[gn.ENTITY_CARD_IMAGE_GROUP,VA],[gn.ENTITY_CARD_VERTICAL,VA],[gn.LIST,KAt],[gn.SONG_HISTORY,bwt],[gn.PREVIEW_SONG_HISTORY,Swt],[gn.PLAYLIST_ITEM_LIST,twt],[gn.COLLECTION_PLAYLIST_CARD,VA],[gn.BANNER_AD,Twt],[gn.SQUARE_AD,Awt],[gn.PICKUP_LEFT_OFF,wwt]]),Cwt=({children:t})=>I(Dn,{children:t}),xwt=t=>{const e=$ct();return I(pAt,{...t,moduleMap:_wt,moduleWrapper:Ox,viewContainer:Cwt,onViewLoaded:r=>{var i;e(r),(i=t.onViewLoaded)==null||i.call(t,r)},virtual:t.virtual??!0})},IJ={noIndexFounded:-1},Ly={button:{display:"flex",alignItems:"center",zIndex:Ai.transcriptContainer},buttonDisabled:{opacity:.3},buttonTitle:{color:_e.white,fontFamily:"Maison Neue",fontSize:"12px",fontWeight:"700",letterSpacing:"0.02px"},container:{display:"flex",width:"100%",justifyContent:"space-between"}},Cme=()=>{const{episodeDataObject:t}=Ht(ws)??{},e=Ht(J0),n=nhe({episodeId:(t==null?void 0:t.id)??"",live:!1}),r=rhe(t==null?void 0:t.id),{showToast:i}=gu(),s=Yu(),{loading:a}=Fa(),o=jV(),{t:l}=dn(),u=r-1,c=r+1,d=Cc(({snapshot:g})=>async v=>{if(!v||!t)return;const{startOffset:b,title:S}=v,A=_f(J0),w=_f(bV);if(A&&!w){i({title:l("chapters.disabledDuringAd")});return}const x=await g.getPromise(SV(t.id)),P={chapter:S,contentId:t.id,feature:Ei.CHAPTER};if(x&&!a){const N=t.startTime/1e3;s.seekToTime(b-N);return}s.play(t==null?void 0:t.getDataObject(),P,{autoPlay:!0,startOffset:b})},[o,a,s,i,l,t]),f=$.useCallback(()=>
642{if(r===IJ.noIndexFounded)return;const g=n.find(v=>v.index===c);d(g)},[n,d,r,c]),h=$.useCallback(()=>{if(r===IJ.noIndexFounded)return;const g=n.find(v=>v.index===u);d(g)},[n,d,r,u]);return be("div",{css:Ly.container,children:[be("button",{type:"button",css:[Ly.button,(u<0||e)&&Ly.buttonDisabled],onClick:h,disabled:e,children:[I(Yr,{name:en.CaretLeft,iconColor:_e.white,ariaHidden:!1,sizeInPx:14}),I("span",{css:Ly.buttonTitle,children:l("chapters.previous")})]}),be("button",{type:"button",css:[Ly.button,(c>=n.length||e)&&Ly.buttonDisabled],onClick:f,disabled:e,children:[I("span",{css:Ly.buttonTitle,children:l("chapters.next")}),I(Yr,{name:en.CaretRight,iconColor:_e.white,ariaHidden:!1,sizeInPx:14})]})]})},xme=t=>{const{clientServices:e,loading:n}=Fa(),r=t(),i=$.useCallback((o,l)=>{if(!l)return o;const u=Iwt(l);return{...o,featureText:u}},[]),s=$.useCallback((o,l,u)=>{const{contentId:c,viewId:d,...f}=r,h={...f,contentId:c??o.contentId,viewId:u??d},g=e==null?void 0:e.getAnalyticServices();g&&g.sendPlayClickEvent(h,o,l)},[e,r]),a=$.useCallback(o=>{if(n)return;const{viewId:l,...u}=r,c={...u,viewId:o??l},d=e==null?void 0:e.getAnalyticServices();d&&d.sendScreenView(c)},[e,n,r]);return{getAnalyticPlayContext:i,sendTranscriptPlayClickEvent:s,sendTranscriptScreenViewEvent:a}},Iwt=t=>{const{speaker:e,text:n,start_time:r}=t;return`${e} | ${F1(r/1e3)} | ${n}`},Owt=({onUserScroll:t,children:e,style:n})=>{const r=$.useRef(null),i=$.useRef(null),s=$.useRef(!1),a=$.useRef(!1),o=$.useCallback(()=>{s.current=!0},[]),l=d=>{d.target===r.current&&(a.current=!0)},u=d=>{d.target===r.current&&(a.current=!1)},c=()=>{(s.current||a.current)&&t(),i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{s.current=!1},100)};return $.useEffect(()=>{const d=r.current;return d&&(d.addEventListener("wheel",o),d.addEventListener("touchmove",o),d.addEventListener("mousedown",l),d.addEventListener("mouseup",u)),()=>{d&&(d.removeEventListener("wheel",o),d.removeEventListener("touchmove",o),d.removeEventListener("mousedown",l),d.removeEventListener("mouseup",u)),i.current&&window.clearTimeout(i.current)}},[o]),I("div",{ref:r,onScroll:c,css:{overflowY:"auto",height:"100%",...n},children:e})};function Pwt(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var AN=!1;if(typeof window<"u"){var OJ={get passive(){AN=!0}};window.addEventListener("testPassive",null,OJ),window.removeEventListener("testPassive",null,OJ)}var H1=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),yg=[],j1=!1,wH=-1,t_=void 0,Zy=void 0,n_=void 0,Ime=function(e){return yg.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},pC=function(e){var n=e||window.event;return Ime(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},Rwt=function(e){if(n_===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;if(n&&r>0){var i=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);n_=document.body.style.paddingRight,document.body.style.paddingRight=i+r+"px"}}t_===void 0&&(t_=document.body.style.overflow,document.body.style.overflow="hidden")},Ome=function(){n_!==void 0&&(document.body.style.paddingRight=n_,n_=void 0),t_!==void 0&&(document.body.style.overflow=t_,t_=void 0)},Lwt=function(){return window.requestAnimationFrame(function(){if(Zy===void 0){Zy={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,n=e.scrollY,r=e.scrollX,i=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-n,document.body.style.left=-r,setTimeout(function(){return window.requestAnimationFrame(function(){var s=i-window.innerHeight;s&&n>=i&&(document.body.style.top=-(n+s))})},300)}})},Pme=function(){if(Zy!==void 0){var e=-parseInt(document.body.style.top,10),n=-parseInt(document.body.style.left,10);document.body.style.position=Zy.position,document.body.style.top=Zy.top,document.body.style.left=Zy.left,window.scrollTo(n,e),Zy=void 0}},Dwt=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},kwt=function(e,n){var r=e.targetTouches[0].clientY-wH;return Ime(e.target)?!1:n&&n.scrollTop===0&&r>0||Dwt(n)&&r<0?pC(e):(e.stopPropagation(),!0)},Nwt=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!yg.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};yg=[].concat(Pwt(yg),[r]),H1?Lwt():Rwt(n),H1&&(e.ontouchstart=function(i){i.targetTouches.length===1&&(wH=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&kwt(i,e)},j1||(document.addEventListener("touchmove",pC,AN?{passive:!1}:void 0),j1=!0))}},Mwt=function(){H1&&(yg.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),j1&&(document.removeEventListener("touchmove",pC,AN?{passive:!1}:void 0),j1=!1),wH=-1),H1?Pme():Ome(),yg=[]},Fwt=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}yg=yg.filter(function(n){return n.targetElement!==e}),H1&&(e.ontouchstart=null,e.ontouchmove=null,j1&&yg.length===0&&(
642document.removeEventListener("touchmove",pC,AN?{passive:!1}:void 0),j1=!1)),H1?Pme():Ome()};const Rme=t=>e=>{const n=e.closest(`.${t}`);if(n===null)return!1;const{scrollHeight:r,clientHeight:i}=n,s=screen.height-300;return r>i||r>s},_D=(t,e,n)=>($.useEffect(()=>(e&&(t?Nwt(e,{allowTouchMove:n||(()=>!1)}):Fwt(e)),()=>{Mwt()}),[t,e,n]),null),Lme={noIndexFounded:-1,transcriptHeaderTimeFormat:"h:mmaaa"},PJ={color:_e.secondaryLilac2},Ja={transcriptContentContainer:{padding:"0px 20px",[h4(ve.Medium,ve.MediumMax)]:{padding:"0px 42px"}},item:{cursor:"pointer",padding:"15px 0px",[Be(ve.Large)]:{padding:"15px 0px"}},highlightedItem:{color:_e.white},resumeButton:{backgroundColor:_e.white,width:"70px",borderRadius:"20px"},resumeButtonContainer:{display:"flex",flexDirection:"column",position:"sticky",padding:"20px 0",justifyItems:"center",bottom:"5px",[Be(ve.Large)]:{bottom:"7px"}},speaker:{...cn.bodySmall,lineHeight:"18px",letterSpacing:"0.15px",...PJ},text:{...cn.bodyLarge,fontWeight:"bold",fontSize:"20px",lineHeight:"32px",letterSpacing:"0.2px",...PJ},loadContainer:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},listFooterComponent:{backgroundColor:_e.semitransparentWhite30,flexDirection:"row",alignItems:"center",margin:"15px 30px 40px",padding:"15px 30px",borderRadius:5,transcriptAdContainer:{height:"calc(100% - 30px)"}},transcriptAdBlock:{display:"flex",flexDirection:"column",marginLeft:"20px",marginRight:"20px",backgroundColor:"rgba(255, 255, 255, 0.3)",height:"100%",borderRadius:"8px",justifyContent:"center",alignItems:"center"},transcriptAdBlockTitle:{fontFamily:"Maison Neue",fontWeight:400,fontSize:"15px",letterSpacing:.01,color:_e.white,marginTop:"10px",marginBottom:"10px"},transcriptAdBlockSubtitle:{fontFamily:"Maison Neue",fontWeight:400,fontSize:"12px",letterSpacing:.02,color:"rgba(255, 255, 255, 0.6)"},transcriptHeaderContainer:{display:"flex",flexDirection:"column",marginBottom:"20px"},transcriptHeaderPillowContainer:{width:"fit-content",borderRadius:100,color:_e.black,backgroundColor:_e.white,padding:"6px 14px"},transcriptHeaderPillowText:{...cn.buttonLarge},transcriptHeaderText:{...cn.headlineSmall,marginTop:"10px",wordBreak:"break-word"}},$wt=$.forwardRef(({index:t,isActive:e,startTime:n,speaker:r,text:i,handleTranscriptPress:s,handleTranscriptRef:a,startOffset:o=0,entitySubtype:l,renderHeader:u},c)=>{let d;switch(l){case Vn.BROADCAST_SHOW_EPISODE:d=FSt(n,r,o);break;default:d=MSt(n,r)}return be("div",{ref:a(t),css:Ja.item,onClick:s(n,t),children:[u==null?void 0:u(),I("p",{css:OR(Ja.speaker,e&&Ja.highlightedItem),children:d}),I("p",{css:OR(Ja.text,e&&Ja.highlightedItem),children:i})]})}),Bwt=$.memo($wt),Uwt=()=>{const{t}=dn();return I("div",{css:Ja.transcriptAdContainer,children:be("div",{css:Ja.transcriptAdBlock,children:[I(Yr,{name:en.Advertisement,iconColor:_e.white,ariaHidden:!1,sizeInPx:24}),I("span",{css:Ja.transcriptAdBlockTitle,children:t("transcript.adBlockTitle")}),I("span",{css:Ja.transcriptAdBlockSubtitle,children:t("transcript.adBlockSubTitle")})]})})},Vwt=({startOffset:t,title:e})=>be("div",{css:Ja.transcriptHeaderContainer,children:[I("div",{css:Ja.transcriptHeaderPillowContainer,children:I("text",{css:Ja.transcriptHeaderPillowText,children:Vge(t,Lme.transcriptHeaderTimeFormat)})}),I("text",{css:Ja.transcriptHeaderText,children:e})]}),Hwt=({transcript:t,currentIndex:e,setCurrentIndex:n,duration:r,entitySubtype:i,startOffset:s=0,startTime:a=0,isNextTranscriptAvailable:o,title:l})=>{const u=Yu(),c=Ht(ws),{id:d}=c??{},f=Ht(V2({contentId:d})),h=Ht(J0),g=TT(),{sendTranscriptPlayClickEvent:v,getAnalyticPlayContext:b}=xme(g),{t:S}=dn(),[A,w]=$.useState(!0),x=$.useRef(null),P=$.useRef(null),N=Noe(0),k=i3e(N,[0,180],[0,180]),U="transcriptScrollableContent",H=Rme(U);_D(!0,null,H);const B=Qs(q2);$.useEffect(()=>{B(U)},[B]);const q=$.useCallback(()=>{var ae;if(!x.current)return;const ie=(ae=x.current)==null?void 0:ae.parentNode;ie&&ie.scrollTo({top:x.current.offsetTop-ie.offsetTop,behavior:"smooth"})},[]),Z=$.useMemo(()=>({contentId:d,feature:Ei.TRANSCRIPTION}),[d]),C=$.useCallback((ie,ae)=>
642()=>{w(!0),n(ae);const ue=ie/1e3;let Q=fE(r)&&fE(ue)?ue/r:void 0;if(Q&&Q>1&&(Q=1),v(b(Z,t==null?void 0:t[ae])),i===Vn.BROADCAST_SHOW_EPISODE)return u.seekToTime(j4(s,ie/1e3,a/1e3));if(f)return u.seekToProgress(Q??0);u.seekToProgress(Q??0),u.play(void 0,Z)},[r,u,f,n,b,v,t,Z,i,s,a]),L=$.useCallback(()=>{if(w(!1),!(x!=null&&x.current)||!P.current)return;const ie=x.current.getBoundingClientRect(),ae=P.current.getBoundingClientRect();ie.bottom>=ae.bottom?N.set(180):N.set(0)},[N]),V=$.useCallback(()=>{q(),w(!0)},[q]),j=$.useCallback(ie=>ae=>{e===ie&&(x.current=ae)},[e]),X=$.useCallback(()=>I(Dn,{children:i===Vn.BROADCAST_SHOW_EPISODE&&l&&I(Vwt,{title:l,startOffset:s})}),[l,s,i]),G=$.useCallback((ie,ae)=>{const{start_time:ue,speaker:Q,text:de}=ie,le=ae<=e&&e>=Lme.noIndexFounded;return I(Bwt,{index:ae,startTime:ue,isActive:le,speaker:Q,text:de,handleTranscriptPress:C,handleTranscriptRef:j,startOffset:s,entitySubtype:i,renderHeader:ae===0?X:void 0})},[C,j,e,i,s,X]);return $.useEffect(()=>{e<0||!A||q()},[e,A,q]),h?I(Uwt,{}):be(Owt,{onUserScroll:L,style:Ja.transcriptContentContainer,children:[t==null?void 0:t.map((ie,ae)=>I($.Fragment,{children:G(ie,ae)},`${ie.start_time}-${ae}`)),!o&&I("div",{css:Ja.listFooterComponent,children:I("p",{css:Ja.listFooterText,children:S("transcript.processing")})}),!A&&I(Il.div,{style:{rotate:k},css:Ja.resumeButtonContainer,children:I(Mc,{ref:P,icon:en.CaretUp,onClick:V,buttonCss:Ja.resumeButton,color:_e.black,buttonSizeInPx:26,iconSizeInPx:12})})]})},jwt=$.memo(Hwt),Dme=()=>{const t=Ht(ws),{episodeDataObject:e,standaloneChapterDataObject:n}=t??{},r=e??n,i=r==null?void 0:r.subtype,{transcript:s,currentIndex:a,setCurrentIndex:o,duration:l,loading:u,hasError:c,startOffset:d,isNextTranscriptAvailable:f,title:h}=kSt(r),g=TT(),{sendTranscriptScreenViewEvent:v}=xme(g);return $.useEffect(()=>{v()},[v]),u?I(Il.div,{...k1({durationIn:cu.pageTransitionIn,durationOut:1e3}),css:Ja.loadContainer,children:u&&I(_V,{})}):c?I("div",{css:Ja.loadContainer,children:c&&I(ghe,{})}):I(jwt,{transcript:s,currentIndex:a,setCurrentIndex:o,duration:l,entitySubtype:i,startOffset:d,startTime:e==null?void 0:e.startTime,isNextTranscriptAvailable:f,title:h})},v5={topOverlayContainer:{position:"sticky",top:0,pointerEvents:"none",zIndex:1,overflow:"visible"},topOverlay:{position:"absolute",top:0,left:0,right:0,background:`linear-gradient(to bottom, ${_e.secondaryDeepBlue}, transparent)`,padding:"10px"},bottomOverlay:{position:"sticky",bottom:-1,left:0,right:0,height:"30px",pointerEvents:"none",background:`linear-gradient(to top, ${_e.secondaryDeepBlue}, transparent)`,zIndex:1}},kme=({displayBottomOverlay:t=!0,containerStyle:e,children:n})=>be("div",{css:e,children:[I("div",{css:v5.topOverlayContainer,children:I("div",{css:v5.topOverlay})}),n,t&&I("div",{css:v5.bottomOverlay})]}),$p={transcriptContainer:{backgroundColor:_e.secondaryDeepBlue,zIndex:Ai.fullPlayerPanel,margin:"0 60px",borderRadius:"5px"},collapsedContainer:{height:"fit-content"},contentContainer:{overflow:"hidden",height:"100%"},transcriptContent:{height:"calc(85vh - 50px)"},disablePaddingBottom:{paddingBottom:"0px"},transcriptHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"24px 20px",backgroundColor:_e.secondaryDeepBlue,color:_e.white,borderRadius:"5px"},transcriptTitle:{fontSize:"24px",fontWeight:"bold",color:_e.white},toggleButton:{backgroundColor:"rgba(255, 255, 255, 0.15)",color:_e.white,padding:"6px 14px",borderRadius:"100px",fontSize:"12px",fontWeight:"700",textAlign:"center",fontFamily:"Maison Neue",lineHeight:"135%",letterSpacing:"0.24px",cursor:"pointer",border:"none",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.25)"}},transcriptChapterControlsContainer:{padding:"20px 10px",[Be(ve.Large)]:{padding:"20px 40px"},borderTopColor:"rgba(255, 255, 255, 0.25)",borderTopWidth:"1px",borderTopStyle:"solid"}},zwt=({hasChapter:t=!1})=>{const[e,n]=$.useState(!1),r=()=>{n(i=>!i)};return I(Dn,{children:be("div",{css:[$p.transcriptContainer,e?{}:$p.collapsedContainer],children:[be("div",{css:$p.transcriptHeader,children:[I("h2",{css:$p.transcriptTitle,children:"Transcript"}),I("button",{type:"button",css:$p.toggleButton,onClick:r,children:e?"Collapse":"Expand"})]}),e&&be(Dn,{children:[I("div",{css:[$p.transcriptContent,t&&$p.disablePaddingBottom],children:I(kme,{containerStyle:$p.contentContainer,children:I(Dme,{})})}),t&&I("div",{css:$p.transcriptChapterControlsContainer,children:I(Cme,{})})]})]})})},ef={container:{marginTop:20},contentWrapper:{display:"flex",flex:1,alignItems:"center",...Bt.transition("opacity"),...Dr({opacity:.6})},titleWrapper:{display:"flex",flexDirection:"column",flex:"1 1 64%",textOverflow:"ellipsis",overflowX:"hidden"},subtitle:{...cn.metadataSmall,color:_e.white60}
642,title:{color:_e.white,...cn.bodySmall,...Bt.transition("color")},sectionWrapper:{marginTop:40},imageWrapper:{width:62,marginRight:20},footer:{borderTop:Ng.separator,marginTop:20,paddingTop:20},caretRight:{flex:"1 1 auto",display:"flex",justifyContent:"flex-end"}},Gwt=({title:t,nextUpTitle:e,image:n,imageAlt:r,containerCss:i,navigateToPlaylistUrl:s,showSectionWrapper:a=!0})=>{const{t:o}=dn(),l=e?`${o("playlistBar.upNext")} ${e}`:"",u=be("div",{css:ef.contentWrapper,children:[I("div",{css:ef.imageWrapper,children:I(zf,{alt:r,entityImageCss:ef.entityImage,imageURIBase:n})}),be("div",{css:ef.titleWrapper,children:[I(TD,{numberOfLines:1,shouldStripInteractiveTags:!0,text:t||"",displayShowMore:!1,textCss:ef.title}),e&&I(TD,{numberOfLines:1,shouldStripInteractiveTags:!0,text:l||"",displayShowMore:!1,textCss:ef.subtitle})]}),I("div",{css:ef.caretRight,children:I(Yr,{ariaHidden:!0,name:en.CaretRight,sizeInPx:15})})]}),c=xd({children:u,props:{ariaLabel:s?o("horizontalEntityCard.ariaLabel.link",{title:t}):t,as:Fi.Anchor,href:s},styles:ef.link}),d=be(Dn,{children:[c,I("div",{css:ef.footer})]});return a?I(Gv,{title:o("playlistBar.sectionTitle"),containerCss:[ef.sectionWrapper,i||{}],content:e,children:d}):I("div",{css:[ef.container,i||{}],children:d})},Wwt=()=>{var f;const[t,e]=$.useState(null),{clientServices:n,loading:r}=Fa(),i=Ht(Cd);$.useEffect(()=>{let h=!0;return h&&!r&&(()=>{const v=n.getPersonalizationServices().dataStore.getDataSync(tr.COLLECTION_ID);v&&h&&e(v)})(),()=>{h=!1}},[n,r]);const s=Ht(ws),a=Ht(Qfe(t??"")),o=Xfe((a==null?void 0:a.itemsIdList)??[]),{isLast:l,currentIdx:u}=Yfe(o??[],s),c=$.useMemo(()=>o==null?void 0:o.findIndex((h,g)=>{const v=E2(i==null?void 0:i[h.id],h.startDateTime)??0;return g>u&&!xg(h.duration,v)}),[o,i,u]),d=l||c===void 0||(f=o==null?void 0:o[c])==null?void 0:f.title;return $.useMemo(()=>({showPlaylistBar:u!==-1,nextUpTitle:d,playlistImage:a==null?void 0:a.image,playlistImageAlt:a==null?void 0:a.imageAlt,playlistTitle:a==null?void 0:a.title,navigateToPlaylistUrl:a==null?void 0:a.url}),[a,d,u])},y5={container:{display:"flex",flexDirection:"column",borderBottom:Ng.separator},episodeLink:{marginTop:20,marginBottom:20},sectionWrapper:{marginTop:40}},qwt=({standaloneChapter:t,containerCss:e})=>{const{parentEpisodeUrl:n,parentImage:r,parentTitle:i,publishDate:s}=t;let a=i,o="";return s&&(o=`${dC(s)} · ${i}`,a=Xh(s,"EEEE - LLL d, yyyy")),I(Gv,{title:Qp("chapterScreen.playingFrom.header"),containerCss:[y5.sectionWrapper,e||{}],content:be("div",{css:[y5.container],children:[I(Lge,{imageURIBase:r,title:a,eyebrow:o}),I(Mg,{as:Fi.Anchor,hasIconAfter:!0,icon:en.CaretRight,isTiny:!0,css:[y5.episodeLink],href:n,children:"Go to full episode"})]})})},Kwt=$.memo(qwt,Ywt);function Ywt({standaloneChapter:t},{standaloneChapter:e}){var n,r;return(t==null?void 0:t.parentEpisodeUrl)===(e==null?void 0:e.parentEpisodeUrl)&&(t==null?void 0:t.parentImage)===(e==null?void 0:e.parentImage)&&(t==null?void 0:t.parentTitle)===(e==null?void 0:e.parentTitle)&&((n=t==null?void 0:t.publishDate)==null?void 0:n.toString())===((r=e==null?void 0:e.publishDate)==null?void 0:r.toString())}const wS={container:{padding:"20px 0",overflow:"hidden",[Be(ve.Medium)]:{padding:0},[Be(ve.Large)]:{height:"100%",overflowX:"hidden",overflowY:"auto",padding:"60px 0"}},module:{marginBottom:45,[Be(ve.Medium)]:{padding:0}},chapters:{marginTop:5,[Be(ve.Medium)]:{marginTop:40}},text:{...cn.bodySmall}},Nme=({isVisible:t})=>{const e=Eb("podcastTranscript"),{episodeDataObject:n,standaloneChapterDataObject:r}=Ht(ws)??{},i=n??r,s=ihe({live:!0}),a=gH(i,s),o=hrt(_n.Player),{contentId:l,description:u,episode:c,standaloneChapter:d}=Hc(),{nextUpTitle:f,playlistTitle:h,playlistImage:g,playlistImageAlt:v,navigateToPlaylistUrl:b,showPlaylistBar:S}=Wwt(),{greaterThan:A}=Fs();return!l||!o||!t?I(aD,{}):I($.Suspense,{fallback:I(aD,{}),children:be("div",{css:wS.container,children:[S&&I(Gwt,{title:h,nextUpTitle:f,navigateToPlaylistUrl:b,image:g,imageAlt:v,containerCss:Bt.horizontalModulePadding(!0),showSectionWrapper:A.MD}),c&&c.isRewind!==!1&&!d&&I(sme,{episode:c,live:!0,containerCss:[wS.chapters,Bt.horizontalModulePadding(!0)]}),A.MD&&e&&a&&I("div",{css:wS.module,children:I(zwt,{hasChapter:!!s})}),d&&I("div",{css:wS.module,children:I(Kwt,{standaloneChapter:d,containerCss:Bt.horizontalModulePadding(!0)})}),u&&I("div",{css:wS.module,children:I(jTt,{text:u,textCss:wS.text,containerCss:Bt.horizontalModulePadding(!0)})}),!d&&I(xwt,{request:{contentId:l,type:bd.ContentPage,viewId:o}})]})})},Zwt={container:{display:"block",height:"1em",marginBottom:"1em",backgroundColor:_e.white30,"&:last-child":{marginBottom:0}}},CD=({length:t=20,fontSize:e=8})=>I("span",{css:Zwt.container,style:{width:`${t}ch`,fontSize:`${e}px`}}),Qwt=t=>be("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",role:"img",focu
642sable:"false",xmlns:"http://www.w3.org/2000/svg",...t,children:[I("title",{children:"Bubble Quote"}),I("g",{id:"Bubble",children:I("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3.25C1.5 2.42157 2.17157 1.75 3 1.75H8C8.82843 1.75 9.5 2.42157 9.5 3.25V6.75C9.5 7.57843 8.82843 8.25 8 8.25H4.96429C4.84317 8.25 4.72618 8.29396 4.63503 8.37371L3.75 9.14812V8.75C3.75 8.47386 3.52614 8.25 3.25 8.25H3C2.17157 8.25 1.5 7.57843 1.5 6.75V3.25ZM3 0.75C1.61929 0.75 0.5 1.86929 0.5 3.25V6.75C0.5 8.04634 1.48667 9.11222 2.75 9.23766V10.25C2.75 10.4462 2.86474 10.6242 3.04339 10.7053C3.22205 10.7864 3.43161 10.7555 3.57925 10.6263L5.15215 9.25H8C9.38071 9.25 10.5 8.13071 10.5 6.75V3.25C10.5 1.86929 9.38071 0.75 8 0.75H3ZM3.32305 6.03409V6.875C4.60146 6.73864 5.25893 6.10227 5.25893 5V3.5H3.25V5.19318H3.96834C3.96834 5.68182 3.82224 5.89773 3.32305 6.03409ZM6.00162 6.03409V6.875C7.28003 6.73864 7.9375 6.10227 7.9375 5V3.5H5.92857V5.19318H6.64692C6.64692 5.68182 6.50081 5.89773 6.00162 6.03409Z",fill:"currentColor"})})]}),Xwt={transcriptButton:{display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:"#383e56",borderRadius:"25px",height:"40px",padding:"0 16px",color:"white",cursor:"pointer",border:"none",marginTop:"20px"}},Jwt=({onClick:t,text:e})=>be("button",{type:"button",onClick:t,style:Xwt.transcriptButton,children:[I(Qwt,{style:{marginRight:"8px"}}),I("span",{style:{fontSize:"12px",lineHeight:"16px",fontFamily:"Maison Neue Extended",fontWeight:"700"},children:e})]}),Dy={container:{display:"flex",justifyContent:"center"},drawerContainer:{backgroundColor:_e.secondaryDeepBlue,borderRadius:"15px 15px 0 0",width:"100vw",height:"100%",display:"flex",flexDirection:"column"},headerContainerStyle:{marginBottom:0,padding:"28px 30px"},headerSeperator:{height:1,backgroundColor:_e.white07,position:"absolute",bottom:0,left:"50%",right:"50%",marginLeft:"-50vw",marginRight:"-50vw",maxWidth:"100vw",width:"100vw"},contentContainer:{overflow:"hidden",height:"100%"},transcriptPlayer:{backgroundColor:_e.secondaryDeepBlue,padding:"28px 42px 42px",[eu(ve.Medium)]:{padding:"40px 20px 20px"}},transcriptChapterControlsContainer:{marginBottom:"6px"}},e_t=({isQueueVisible:t,onQueueClick:e,hasChapter:n=!1})=>{const[r,i]=$.useState(!1),{lessThan:s}=Fs(),a=Ht(ws),{t:o}=dn(),l=Ht(J0),u=()=>{i(!0)};return be("div",{css:Dy.container,children:[s.LG&&I(Jwt,{text:o("transcript.openTranscript"),onClick:u}),I(hH,{children:I(Jpe,{fullHeight:!0,contentContainerStyle:Dy.drawerContainer,onClose:()=>i(!1),isOpen:r,renderDrawerHeader:c=>{var d,f,h;return I(Cge,{headerContainerStyle:Dy.headerContainerStyle,image:{imageURIBase:(d=a==null?void 0:a.image)==null?void 0:d.src,alt:(f=a==null?void 0:a.image)==null?void 0:f.srcFallback},onClose:c,id:(a==null?void 0:a.id)??"",title:a==null?void 0:a.title,titleStyle:{color:_e.white},subtitle:(h=a==null?void 0:a.dataObject)==null?void 0:h.parentTitle,subtitleStyle:{color:_e.white60},seperator:I("div",{css:Dy.headerSeperator})})},children:I(Zk,{FallbackComponent:()=>null,children:be($.Suspense,{fallback:null,children:[I(kme,{displayBottomOverlay:!l,containerStyle:Dy.contentContainer,children:I(Dme,{})}),be("div",{css:Dy.transcriptPlayer,children:[n&&I("div",{css:Dy.transcriptChapterControlsContainer,children:I(Cme,{})}),I(WV,{shouldDisplayTime:!0,isFullPlayer:!0,hideBackToLiveButton:n}),I(GV,{}),I(Bge,{isQueueVisible:t,onQueueClick:e})]})]})})})})]})},dh={contentOverview:{overflowY:"scroll",alignSelf:"end",maxHeight:"100%"},contentOverviewHeader:{alignItems:"center",borderBottom:"1px solid",borderColor:_e.white15,display:"flex",flexDirection:"column",justifyContent:"center",margin:"0 auto",padding:"48px 0 40px",width:"calc(100% - 40px)",[Be(ve.Medium)]:{padding:"80px 0 60px",width:"calc(100% - 84px)"},[Be(ve.Large)]:{borderBottom:"none",padding:"0 0 60px",width:"calc(100% - 120px)"}},coverImg:{marginBottom:20,width:100,[Be(ve.Medium)]:{width:156},[Be(ve.Large)]:{marginBottom:40,width:178}},title:{...cn.titleSection,...Bt.truncateText(3),color:_e.white,marginBottom:5,textAlign:"center",width:"100%"},subtitle:{textAlign:"center",maskImage:yv.playerOverflowText,width:"100%",whiteSpace:"nowrap",overflow:"hidden"},label:{...cn.metadataLarge,color:_e.white60},link:{textDecoration:"underline"},adBanner:{marginBottom:20,width:120,height:100,[Be(ve.Medium)]:{width:300,height:250}},content:{flexGrow:1,paddingBottom:300,[Be(ve.Medium)]:{paddingBottom:290}}},t_t=({isInfoVisible:t,isQueueVisible:e,onQueueClick:n})=>{const{imageUrl:r,imageAlt:i,hasMetaData:s,playerTitle:a,parentShowUrl:o,srcFallback:l,playerSubtitle:u}=Hc(),c=Ht(ehe),d=Ht(q2),{lessThan:f}=Fs(),h=Ht(ws),g=ihe({live:!0}),v=Eb("podcastTranscript"),{episodeDataObject:b,standaloneChapterDataObject:S}=h??{},w=gH(b??S,g),x=()=>c?I(Hge,{containerCss:dh.adBanner,url:c,title:a}):I(zf,{entityImageCss:dh.coverImg,alt:i,imageURIBase:r,isLoading:!s,fallbackImage:l}),P=$.useMemo(()=>o?I(Mg,{label:u,labelCss:[dh.label,dh.link],href:o}):I("span",{css:dh.label,children:u}),[o,u]);return be("div",{css:dh.contentOverview,children:[be("div",{css:dh.contentOverviewHeader,children:[x(),s?be(Dn,{children:[I("span",{css:dh.title,children:a}),I("span",{css:dh.subtitle,children:P}),v&&w&&I(e_t,{isQueueVisible:e,onQueueClick:n,hasChapter:!!g})]}):be(Dn,{children:[I(CD,{length:30,fontSize:15}),I(CD,{length:20,fontSize:13})]})]}),f.LG&&I("div",{className:d,css:dh.content,children:I(Nme,{isVisible:t})})]})},RJ={container:{display:"grid",gridTemplateRows:"[top] 3fr [content] 1fr [bottom]",alignItems:"center",height:"100vh",[Be(ve.Large)]:{gridTemplateRows:"[top] 3fr [content] 2fr [bottom]"}},controlsContainer:{display:"grid",gridTemplateRows:"[content-overview] 50px [scrubber] auto [controls] 60px [bottom]",alignSelf:"stretch",backgroundColor:_e.audacyDarkNavy,bottom:0,padding:"0 20px",width:"100%",position:"fixed",zIndex:Ai.fullPlayerPanel,"&::before":{background:yv.playerContainer,content:'""',height:50,position:"absolute",top:-50,left:0,pointerEvents:"none",width:"100%",zIndex:Ai.fullPlayerPanel},[Be(ve.Medium)]:{position:"relative",padding:"0 42px 5px"},[Be(ve.Large)]:{backgroundColor:"transparent",position:"relative",padding:"0 60px 15px","&::before":{display:"none"}}}},n_t=({isInfoVisible:t,isQueueVisible:e,onQueueClick:n})=>{const{setIsFullscreenPlayer:r}=$.useContext(ET),i=Qs($he);return $.useEffect(()=>(r(!0),i(!0),()=>{r(!1),i(!1)}),[r,i]),be("div",{css:RJ.container,children:[I(put,{}),I(t_t,{isInfoVisible:t,isQueueVisible:e,onQueueClick:n}),be("div",{css:RJ.controlsContainer,children:[I(WV,{shouldDisplayTime:!0,isFullPlayer:!0}),I(GV,{}),I(Bge,{isQueueVisible:e,onQueueClick:n})]})]})},xD={[ve.Small]:70,[ve.Medium]:80},LJ={"&::before":{content:'""',height:20,width:1,backgroundColor:_e.white15,position:"absolute",top:"50%",transform:"translateY(-50%)",left:0}},Pa={container:{borderTop:"1px solid",borderColor:_e.white15,bottom:0,height:xD[ve.Small],left:0,position:"fixed",width:"100%",zIndex:Ai.miniPlayer,[Be(ve.Medium)]:{height:xD[ve.Medium]},[Be(ve.Large)]:{borderTop:"none",bottom:30,left:"auto",position:"fixed",right:30,width:500,"&::before":{background:_e.white,content:'""',position:"absolute",height:200,left:-10,opacity:.15,top:170,width:500,borderRadius:"50%",boxShadow:"0px -250px 150px 40px rgb(255 255 255)"}}},content:{alignItems:"center",background:_e.audacyDarkNavy,display:"flex",height:"100%",padding:"0 15px",position:"relative",width:"100%",[Be(ve.Medium)]:{padding:"0 15px"},[Be(ve.Large)]:{background:_e.audacyDarkNavy95,borderRadius:8}},dataContainer:{alignItems:"center",display:"flex",flexGrow:1,justifyContent:"center",maskImage:yv.playerOverflowText,minWidth:0,padding:5,[Be(ve.Medium)]:{padding:10},[Be(ve.Large)]:{padding:5}},imageContainer:{flexShrink:0}
642,imageInner:{borderRadius:4,height:30,overflow:"hidden",width:30,[Be(ve.Medium)]:{height:40,width:40}},contentContainer:{flexGrow:1,minWidth:0,paddingLeft:10,position:"relative",[Be(ve.Medium)]:{paddingLeft:12},[Be(ve.Large)]:{flexBasis:185}},contentContainerQueue:{flexGrow:0},textContainer:{width:"100%"},textInner:{overflow:"hidden",position:"relative",textAlign:"left",whiteSpace:"nowrap"},title:{...cn.metadataLarge,color:_e.white,display:"block"},subtitle:{...cn.metadataSmall,color:_e.white60,display:"block"},scrubberContainer:{width:150},scrubber:{[Be(ve.Large)]:{padding:"6px 0"}},volumeContainer:{...LJ,padding:"0 6px",position:"relative"},expandContainer:{alignItems:"center",display:"flex",flexShrink:0,justifyContent:"center",padding:"0 0 0 15px",position:"relative",...LJ,[Be(ve.Medium)]:{padding:"0 30px"},[Be(ve.Large)]:{padding:"0 5px 0 15px"}},expandBtn:{...Bt.accessibleMinButtonSize(),padding:5,"& path":{vectorEffect:"non-scaling-stroke"},[Be(ve.Medium)]:{padding:10},[Be(ve.Large)]:{backgroundColor:_e.white30,borderRadius:"50%",padding:5}},adBanner:{pointerEvents:"none",position:"absolute",bottom:"calc(100% + 20px)",right:20,[Be(ve.Large)]:{right:0}},disabled:{opacity:.5,pointerEvents:"none"},videoAdContainer:{pointerEvents:"none",opacity:0,width:445,maxWidth:"calc(100vw - 40px)"}},FO={[ve.Small]:xD[ve.Small],[ve.Medium]:xD[ve.Medium]},wl={container:{backgroundColor:_e.audacyDarkNavy,height:"100vh",left:0,position:"fixed",top:0,width:"100vw",zIndex:Ai.fullPlayer,[Be(ve.Large)]:{left:"auto",overflow:"visible",top:"auto"}},playerContent:{height:"100%",width:"100%"},mobileHeightFix:{height:"-webkit-fill-available"},fullPlayer:{height:"100%",width:"100%",[Be(ve.Large)]:{display:"flex"}},closeButton:{backgroundColor:_e.white15,position:"fixed",right:24,top:20,zIndex:Ai.fullPlayerCloseButton,"&:focus":{position:"fixed"},"& path":{vectorEffect:"non-scaling-stroke"},[Be(ve.Medium)]:{right:26,top:26},[Be(ve.Large)]:{backgroundColor:_e.white30}},mainContainer:{[Be(ve.Large)]:{display:"grid",gridTemplateColumns:"4fr 3fr",flexGrow:1}},playerContainer:{overflow:"hidden",position:"relative",width:"100%",[Be(ve.Large)]:{borderLeft:"1px solid",borderRight:"1px solid",borderColor:_e.white15,overflow:"visible",minWidth:0}},queueContainer:{backgroundColor:_e.audacyDarkNavy,minHeight:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:Ai.fullPlayerPanel,[Be(ve.Large)]:{backgroundColor:"transparent",position:"relative",flexBasis:"30%",flexShrink:0,width:"auto"}},queue:{height:`calc(100vh - ${FO[ve.Small]}px)`,overflow:"visible",padding:"40px 0 80px",margin:`${FO[ve.Small]}px 20px 0 20px`,[Be(ve.Medium)]:{height:`calc(100vh - ${FO[ve.Medium]}px)`,margin:`${FO[ve.Medium]}px 42px 0 42px`},[Be(ve.Large)]:{height:"calc(100vh - 100px)",padding:0,paddingTop:5,margin:"100px 58px 0 58px"}},queueListContainer:{padding:0,height:"100%"},queueEmpty:{maxWidth:240,[Be(ve.Medium)]:{maxWidth:240},[Be(ve.Large)]:{maxWidth:240}},infoContainer:{height:"100%",overflow:"auto",position:"relative"},queuePlayer:{backgroundColor:_e.audacyDarkNavy,left:0,padding:"0 20px",position:"fixed",top:0,width:"100%",zIndex:Ai.fullPlayerQueueHeader,[Be(ve.Medium)]:{padding:"0 42px"}},queuePlayerInner:{borderBottom:"1px solid",borderColor:_e.white15,display:"flex"},queueBackBtn:{marginRight:10},miniPlayer:{minWidth:0,padding:0,position:"relative",[Be(ve.Medium)]:{paddingRight:0}}},r_t=()=>{const{t}=dn(),{onClose:e}=Hc(),{is:n}=Fs();return I(Mc,{buttonCss:wl.closeButton,ariaLabel:t("playerControls.accessibilityLabels.closeFullPlayer"),icon:en.CaretDown,onClick:e,buttonSizeInPx:n.MD?36:28,iconSizeInPx:n.MD?18:12})},i_t=()=>{const t=Ht(ehe),{greaterThan:e}=Fs(),n=qfe(),{miniPlayerTitle:r}=Hc();return be(Dn,{children:[e.SM&&t&&I("div",{css:Pa.adBanner,children:I(Hge,{url:t,title:r})}),n.videoPreRoll&&I("div",{css:Pa.adBanner,children:I("div",{id:"videoAdContainer",css:Pa.videoAdContainer})})]})},s_t=()=>{const{imageAlt:t,imageUrl:e,onOpen:n,isLoading:r,srcFallback:i}=Hc(),{t:s}=dn();return I("button",{type:"button",css:Pa.imageContainer,onClick:n,"aria-label":s("playerControls.accessibilityLabels.openFullPlayer"),children:I("div",{css:Pa.imageInner,children:I(zf,{alt:t,imageURIBase:e,isLoading:r,fallbackImage:i})})})},a_t=()=>{const{onOpen:t,hasMetaData:e,miniPlayerTitle:n,miniPlayerSubtitle:r}=Hc(),{t:i}=dn(),{greaterThan:s}=Fs(),{isQueueHead:a}=$.useContext(Ab);return be("div",{css:[Pa.contentContainer,a&&Pa.contentContainerQueue],children:[I("button",{type:"button",css:Pa.textContainer,onClick:t,"aria-label":i("playerControls.accessibilityLabels.openFullPlayer"),children:e?be("div",{css:Pa.textInner,children:[!!n&&I("span",{css:Pa.title,children:n}),!!r&&I("span",{css:Pa.subtitle,children:r})]}):be("div",{css:Pa.textInner,children:[I(CD,{length:30}),I(CD,{length:20})]})}),s.MD&&I("div",{css:Pa.scrubberContainer,children:I(WV,{inputCss:Pa.scrubber})})]})},o_t=()=>{const{onOpen:t}=Hc(),{t:e}=dn();return I("button",{type:"button",css:Pa.expandBtn,onClick:t,"aria-label":e("playerControls.accessibilityLabels.openFullPlayer"),children:I(Yr,{ariaHidden:!0,name:en.CaretUp,sizeInPx:14})})},l_t=()=>{const e=Ht(uw)?Pa.disabled:{},{greaterThan:n}=Fs(),{isQueueHead:r}=$.useContext(Ab);return be(Dn,{children:[I("div",{css:e,children:I(GV,{})}),n.MD&&I("div",{css:[Pa.volumeContainer,e],children:I($ge,{})}),!r&&I("div",{css:[Pa.expandContainer,e],children:I(o_t,{})})]})},u_t=()=>{const t=Ht(the),{isOpen:e}=Hc(),n=t&&!e,{greaterThan:r}=Fs(),i=eT(),{isQueueHead:s}=$.useContext(Ab),a={initial:{opacity:0,y:0}
642,animate:{opacity:n?1:0,y:n||i?0:r.MD?-20:"100%"},exit:{opacity:0},transition:{bounce:.1,duration:r.MD?.2:.3}};return s?{}:a},Mme=({containerCss:t})=>{const e=Ht(the),{t:n}=dn(),r=u_t();return I(Yh,{children:e&&be(Il.section,{...r,css:[Pa.container,t],"aria-label":n("player.regionLabel"),children:[I(i_t,{}),be("div",{css:Pa.content,children:[be("div",{css:Pa.dataContainer,children:[I(s_t,{}),I(a_t,{})]}),I(l_t,{})]})]})})},c_t=({onBackButtonClick:t})=>{const{t:e}=dn();return I("div",{css:wl.queuePlayer,children:be("div",{css:wl.queuePlayerInner,children:[I(Mc,{css:wl.queueBackBtn,icon:en.Back,onClick:t,ariaLabel:e("playerControls.accessibilityLabels.closeQueue")}),I(Mme,{containerCss:wl.miniPlayer})]})})},Fme={myQueue:{isChanged:!1,isEditMode:!1,selectedItems:[]},followed:{isEditMode:!1,selectedItems:[]},onDemands:{isEditMode:!1,selectedItems:[]},recents:{isEditMode:!1,selectedItems:[]},stations:{isEditMode:!1,selectedItems:[]},topics:{isEditMode:!1,selectedItems:[]},playlists:{isEditMode:!1,selectedItems:[]},downloads:{isEditMode:!1,selectedItems:[]}},$me=Yn({default:Fme,key:"EditMode"});function d_t(){const[,t]=Fo($me);return{resetAllEditMode:$.useCallback(()=>{t(Fme)},[t])}}function f_t(t,e){const[n,r]=Fo($me),i=$.useCallback(l=>{r(u=>({...u,[t]:{...u[t],...l}}))},[t,r]);$.useEffect(()=>{e&&i({selectedItems:e})},[i,e]);const s=$.useCallback(l=>{i({isEditMode:l,selectedItems:[]})},[i]),a=$.useCallback(l=>{i({selectedItems:l})},[i]),o=$.useCallback(l=>{i({isChanged:l})},[i]);return{isChanged:n[t].isChanged,isEditMode:n[t].isEditMode,selectedItems:n[t].selectedItems,setIsChanged:o,setIsEditMode:s,setSelectedItems:a}}const gC=(t,e)=>{if(e){const n={...t};return Object.entries(n).forEach(([r,i])=>{n[r]={...i,transition:{delay:0,duration:0}}}),n}return t},Bme=t=>t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),DJ={visible:{opacity:1,height:"auto",transition:{delay:.3}},hidden:{opacity:0,height:0}},h_t={visible:{opacity:1,width:"auto",height:"auto",marginBottom:15},hidden:{opacity:0,height:1,marginBottom:0}},o0={checkmark:{...Bt.accessibleMinButtonSize(),border:Ng.input,borderRadius:"50%",color:_e.audacyDarkNavy,display:"flex",alignItems:"center",justifyContent:"center",height:28,width:28,...Bt.transition(["background","border-color"])},checked:{background:_e.white,borderColor:_e.white},icon:{opacity:0,...Bt.transition("opacity")},iconChecked:{opacity:1},inputContainer:{cursor:"pointer",display:"inline-flex",alignItems:"center",flexDirection:"row"},input:{...Bt.focusReset(),...Bt.focusOutline({selector:"~ span"}),appearance:"none",backgroundColor:_e.audacyDarkNavy,margin:0},label:{marginLeft:20}},Ume=({iconSizeInPx:t=10,isChecked:e,checkmarkCss:n={}})=>I("span",{css:[o0.checkmark,e&&o0.checked,n],children:I(Yr,{ariaHidden:!0,iconCss:[o0.icon,e?o0.iconChecked:[]],name:en.Check,sizeInPx:t})}),yMt=({isChecked:t,isLabelVisHidden:e=!0,label:n,name:r,onChange:i})=>be("label",{children:[I("input",{css:o0.input,type:"checkbox",name:r,checked:t,onChange:()=>{i(!t)}}),be("span",{css:o0.inputContainer,children:[I(Ume,{isChecked:t}),I("span",{css:[o0.label,e&&aC.visHidden],children:n})]})]});var _H=(t=>(t.MyQueue="myQueue",t.OnDemands="onDemands",t.Recents="recents",t.Stations="stations",t.Topics="topics",t.Playlists="playlists",t.Followed="followed",t))(_H||{});const kJ={checkmark:{height:16,flexShrink:0,marginRight:6,width:16,[Be(ve.Medium)]:{gap:-4}},editableContainer:{paddingRight:60,position:"unset"}},p_t=({contentId:t,entityType:e,entitySubtype:n,item:r,isEditMode:i,isSelected:s,isPlayerQueue:a,itemType:o,entityImageShape:l,shouldShowEntityType:u,onItemClick:c,onItemHrefClick:d,onToggleSelected:f,renderEntityRightColumn:h})=>{const g=eT(),{startDateTime:v,episodeUrl:b,duration:S,publishDate:A,showContentId:w,showUrl:x,url:P}=r;let N=r.image,k=r.title;e===gt.EPISODE?[k=r.title,N]=I2(r):e===gt.STANDALONE_CHAPTER&&(N=r.parentImage);const U=xx({contentId:t,entityType:e,entitySubtype:n,showContentId:w,title:k,url:P,parentShowUrl:x,parentEpisodeUrl:b,hasExternalActions:!!h}),H=bN({contentId:r.id,entityType:e,entitySubtype:n,feature:Ei.LIST_ITEM});let B;o===_H.Playlists||e===gt.COLLECTION?B={feature:Ei.PLAYLIST,playlistId:r==null?void 0:r.id}:B={feature:Ei.LIST_ITEM};const q={...r,isPlayable:Ix(r.entityType),duration:S,startDateTime:v,imageURIBase:N,entitySubtype:r.entitySubtype,publishDate:A,title:k,contentId:r.id,optionsMenu:U,isPlayerQueue:a,href:P,entityImageShape:l,shouldShowEntityType:u,renderEntityRightColumn:h},Z=()=>I(Yh,{children:i&&I(Il.span,{variants:gC(h_t,g),initial:"hidden",animate:"visible",exit:"hidden",children:I(Ume,{checkmarkCss:kJ.checkmark,iconSizeInPx:6,isChecked:s})})});return i?I(fC,{...q,href:void 0,isEditMode:!0,isEditModeSelected:s,onClick:f,containerCss:kJ.editableContainer,renderCheckbox:Z,playContext:B}):I(fC,{...q,onPlayStateClick:c?()=>c(t):void 0,onHrefClick:()=>{H(),d==null||d(r.id)},playContext:B})};function g_t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return $.useMemo(()=>r=>{e.forEach(i=>
642i(r))},e)}const wN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function OT(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function CH(t){return"nodeType"in t}function mu(t){var e,n;return t?OT(t)?t:CH(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function xH(t){const{Document:e}=mu(t);return t instanceof e}function Px(t){return OT(t)?!1:t instanceof mu(t).HTMLElement}function Vme(t){return t instanceof mu(t).SVGElement}function PT(t){return t?OT(t)?t.document:CH(t)?xH(t)?t:Px(t)||Vme(t)?t.ownerDocument:document:document:document}const Gf=wN?$.useLayoutEffect:$.useEffect;function _N(t){const e=$.useRef(t);return Gf(()=>{e.current=t}),$.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function m_t(){const t=$.useRef(null),e=$.useCallback((r,i)=>{t.current=setInterval(r,i)},[]),n=$.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mC(t,e){e===void 0&&(e=[t]);const n=$.useRef(t);return Gf(()=>{n.current!==t&&(n.current=t)},e),n}function Rx(t,e){const n=$.useRef();return $.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function ID(t){const e=_N(t),n=$.useRef(null),r=$.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}function OD(t){const e=$.useRef();return $.useEffect(()=>{e.current=t},[t]),e.current}let b5={};function Lx(t,e){return $.useMemo(()=>{if(e)return e;const n=b5[t]==null?0:b5[t]+1;return b5[t]=n,t+"-"+n},[t,e])}function Hme(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((s,a)=>{const o=Object.entries(a);for(const[l,u]of o){const c=s[l];c!=null&&(s[l]=c+t*u)}return s},{...e})}}const $E=Hme(1),vC=Hme(-1);function v_t(t){return"clientX"in t&&"clientY"in t}function CN(t){if(!t)return!1;const{KeyboardEvent:e}=mu(t.target);return e&&t instanceof e}function y_t(t){if(!t)return!1;const{TouchEvent:e}=mu(t.target);return e&&t instanceof e}function PD(t){if(y_t(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return v_t(t)?{x:t.clientX,y:t.clientY}:null}const Ov=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Ov.Translate.toString(t),Ov.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),NJ="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function b_t(t){return t.matches(NJ)?t:t.querySelector(NJ)}const S_t={display:"none"};function E_t(t){let{id:e,value:n}=t;return mt.createElement("div",{id:e,style:S_t},n)}function T_t(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return mt.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function A_t(){const[t,e]=$.useState("");return{announce:$.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const jme=$.createContext(null);function w_t(t){const e=$.useContext(jme);$.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function __t(){const[t]=$.useState(()=>new Set),e=$.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[$.useCallback(r=>{let{type:i,event:s}=r;t.forEach(a=>{var o;return(o=a[i])==null?void 0:o.call(a,s)})},[t]),e]}const C_t={draggable:`
643    To pick up a draggable item, press the space bar.
644    While dragging, use the arrow keys to move the item.
645    Press space again to drop the item in its new position, or press escape to cancel.
646  `},x_t={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function I_t(t){let{announcements:e=x_t,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=C_t}=t;const{announce:s,announcement:a}=A_t(),o=Lx("DndLiveRegion"),[l,u]=$.useState(!1);if($.useEffect(()=>{u(!0)},[]),w_t($.useMemo(()=>({onDragStart(d){let{active:f}=d;s(e.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;e.onDragMove&&s(e.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;s(e.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;s(e.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;s(e.onDragCancel({active:f,over:h}))}}),[s,e])),!l)return null;const c=mt.createElement(mt.Fragment,null,mt.createElement(E_t,{id:r,value:i.draggable}),mt.createElement(T_t,{id:o,announcement:a}));return n?og.createPortal(c,n):c}var ho;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(ho||(ho={}));function RD(){}function S5(t,e){return $.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function O_t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return $.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const Wf=Object.freeze({x:0,y:0});function zme(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function P_t(t,e){const n=PD(t);
646if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function Gme(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function R_t(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function MJ(t){let{left:e,top:n,height:r,width:i}=t;return[{x:e,y:n},{x:e+i,y:n},{x:e,y:n+r},{x:e+i,y:n+r}]}function Wme(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function FJ(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const L_t=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const i=FJ(e,e.left,e.top),s=[];for(const a of r){const{id:o}=a,l=n.get(o);if(l){const u=zme(FJ(l),i);s.push({id:o,data:{droppableContainer:a,value:u}})}}return s.sort(Gme)},D_t=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const i=MJ(e),s=[];for(const a of r){const{id:o}=a,l=n.get(o);if(l){const u=MJ(l),c=i.reduce((f,h,g)=>f+zme(u[g],h),0),d=Number((c/4).toFixed(4));s.push({id:o,data:{droppableContainer:a,value:d}})}}return s.sort(Gme)};function k_t(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),i=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),a=i-r,o=s-n;if(r<i&&n<s){const l=e.width*e.height,u=t.width*t.height,c=a*o,d=c/(l+u-c);return Number(d.toFixed(4))}return 0}const N_t=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const i=[];for(const s of r){const{id:a}=s,o=n.get(a);if(o){const l=k_t(o,e);l>0&&i.push({id:a,data:{droppableContainer:s,value:l}})}}return i.sort(R_t)};function M_t(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function qme(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Wf}function F_t(t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return i.reduce((a,o)=>({...a,top:a.top+t*o.y,bottom:a.bottom+t*o.y,left:a.left+t*o.x,right:a.right+t*o.x}),{...n})}}const $_t=F_t(1);function Kme(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function B_t(t,e,n){const r=Kme(e);if(!r)return t;const{scaleX:i,scaleY:s,x:a,y:o}=r,l=t.left-a-(1-i)*parseFloat(n),u=t.top-o-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,d=s?t.height/s:t.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}const U_t={ignoreTransform:!1};function RT(t,e){e===void 0&&(e=U_t);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=mu(t).getComputedStyle(t);u&&(n=B_t(n,u,c))}const{top:r,left:i,width:s,height:a,bottom:o,right:l}=n;return{top:r,left:i,width:s,height:a,bottom:o,right:l}}function $J(t){return RT(t,{ignoreTransform:!0})}function V_t(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function H_t(t,e){return e===void 0&&(e=mu(t).getComputedStyle(t)),e.position==="fixed"}function j_t(t,e){e===void 0&&(e=mu(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const s=e[i];return typeof s=="string"?n.test(s):!1})}function xN(t,e){const n=[];function r(i){if(e!=null&&n.length>=e||!i)return n;if(xH(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Px(i)||Vme(i)||n.includes(i))return n;const s=mu(t).getComputedStyle(i);return i!==t&&j_t(i,s)&&n.push(i),H_t(i,s)?n:r(i.parentNode)}return t?r(t):n}function Yme(t){const[e]=xN(t,1);return e??null}function E5(t){return!wN||!t?null:OT(t)?t:CH(t)?xH(t)||t===PT(t).scrollingElement?window:Px(t)?t:null:null}function Zme(t){return OT(t)?t.scrollX:t.scrollLeft}function Qme(t){return OT(t)?t.scrollY:t.scrollTop}function e6(t){return{x:Zme(t),y:Qme(t)}}var Do;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"}
646)(Do||(Do={}));function Xme(t){return!wN||!t?!1:t===document.scrollingElement}function Jme(t){const e={x:0,y:0},n=Xme(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},i=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,a=t.scrollTop>=r.y,o=t.scrollLeft>=r.x;return{isTop:i,isLeft:s,isBottom:a,isRight:o,maxScroll:r,minScroll:e}}const z_t={x:.2,y:.2};function G_t(t,e,n,r,i){let{top:s,left:a,right:o,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=z_t);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=Jme(t),h={x:0,y:0},g={x:0,y:0},v={height:e.height*i.y,width:e.width*i.x};return!u&&s<=e.top+v.height?(h.y=Do.Backward,g.y=r*Math.abs((e.top+v.height-s)/v.height)):!c&&l>=e.bottom-v.height&&(h.y=Do.Forward,g.y=r*Math.abs((e.bottom-v.height-l)/v.height)),!f&&o>=e.right-v.width?(h.x=Do.Forward,g.x=r*Math.abs((e.right-v.width-o)/v.width)):!d&&a<=e.left+v.width&&(h.x=Do.Backward,g.x=r*Math.abs((e.left+v.width-a)/v.width)),{direction:h,speed:g}}function W_t(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:a}=window;return{top:0,left:0,right:s,bottom:a,width:s,height:a}}const{top:e,left:n,right:r,bottom:i}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:i,width:t.clientWidth,height:t.clientHeight}}function eve(t){return t.reduce((e,n)=>$E(e,e6(n)),Wf)}function q_t(t){return t.reduce((e,n)=>e+Zme(n),0)}function K_t(t){return t.reduce((e,n)=>e+Qme(n),0)}function tve(t,e){if(e===void 0&&(e=RT),!t)return;const{top:n,left:r,bottom:i,right:s}=e(t);Yme(t)&&(i<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const Y_t=[["x",["left","right"],q_t],["y",["top","bottom"],K_t]];class IH{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=xN(n),i=eve(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,a,o]of Y_t)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=o(r),c=i[s]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class r_{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var i;(i=this.target)==null||i.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function Z_t(t){const{EventTarget:e}=mu(t);return t instanceof e?t:PT(t)}function T5(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var hd;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(hd||(hd={}));function BJ(t){t.preventDefault()}function Q_t(t){t.stopPropagation()}var ni;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ni||(ni={}));const nve={start:[ni.Space,ni.Enter],cancel:[ni.Esc],end:[ni.Space,ni.Enter,ni.Tab]},X_t=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case ni.Right:return{...n,x:n.x+25};case ni.Left:return{...n,x:n.x-25};case ni.Down:return{...n,y:n.y+25};case ni.Up:return{...n,y:n.y-25}}};class OH{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new r_(PT(n)),this.windowListeners=new r_(mu(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(hd.Resize,this.handleCancel),this.windowListeners.add(hd.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(hd.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&tve(r),n(Wf)}handleKeyDown(e){if(CN(e)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:s=nve,coordinateGetter:a=X_t,scrollBehavior:o="smooth"}=i,{code:l}=e;if(s.end.includes(l)){this.handleEnd(e);return}if(s.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:u}=r.current,c=u?{x:u.left,y:u.top}:Wf;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(e,{active:n,context:r.current,currentCoordinates:c});if(d){const f=vC(d,c),h={x:0,y:0},{scrollableAncestors:g}=r.current;for(const v of g){const b=e.code,{isTop:S,isRight:A,isLeft:w,isBottom:x,maxScroll:P,minScroll:N}
646=Jme(v),k=W_t(v),U={x:Math.min(b===ni.Right?k.right-k.width/2:k.right,Math.max(b===ni.Right?k.left:k.left+k.width/2,d.x)),y:Math.min(b===ni.Down?k.bottom-k.height/2:k.bottom,Math.max(b===ni.Down?k.top:k.top+k.height/2,d.y))},H=b===ni.Right&&!A||b===ni.Left&&!w,B=b===ni.Down&&!x||b===ni.Up&&!S;if(H&&U.x!==d.x){const q=v.scrollLeft+f.x,Z=b===ni.Right&&q<=P.x||b===ni.Left&&q>=N.x;if(Z&&!f.y){v.scrollTo({left:q,behavior:o});return}Z?h.x=v.scrollLeft-q:h.x=b===ni.Right?v.scrollLeft-P.x:v.scrollLeft-N.x,h.x&&v.scrollBy({left:-h.x,behavior:o});break}else if(B&&U.y!==d.y){const q=v.scrollTop+f.y,Z=b===ni.Down&&q<=P.y||b===ni.Up&&q>=N.y;if(Z&&!f.x){v.scrollTo({top:q,behavior:o});return}Z?h.y=v.scrollTop-q:h.y=b===ni.Down?v.scrollTop-P.y:v.scrollTop-N.y,h.y&&v.scrollBy({top:-h.y,behavior:o});break}}this.handleMove(e,$E(vC(d,this.referenceCoordinates),h))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}OH.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=nve,onActivation:i}=e,{active:s}=n;const{code:a}=t.nativeEvent;if(r.start.includes(a)){const o=s.activatorNode.current;return o&&t.target!==o?!1:(t.preventDefault(),i==null||i({event:t.nativeEvent}),!0)}return!1}}];function UJ(t){return!!(t&&"distance"in t)}function VJ(t){return!!(t&&"delay"in t)}class PH{constructor(e,n,r){var i;r===void 0&&(r=Z_t(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:s}=e,{target:a}=s;this.props=e,this.events=n,this.document=PT(a),this.documentListeners=new r_(this.document),this.listeners=new r_(r),this.windowListeners=new r_(mu(a)),this.initialCoordinates=(i=PD(s))!=null?i:Wf,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(hd.Resize,this.handleCancel),this.windowListeners.add(hd.DragStart,BJ),this.windowListeners.add(hd.VisibilityChange,this.handleCancel),this.windowListeners.add(hd.ContextMenu,BJ),this.documentListeners.add(hd.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(VJ(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(UJ(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:i}=this.props;i(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(hd.Click,Q_t,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(hd.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:i,props:s}=this,{onMove:a,options:{activationConstraint:o}}=s;if(!i)return;const l=(n=PD(e))!=null?n:Wf,u=vC(i,l);if(!r&&o){if(UJ(o)){if(o.tolerance!=null&&T5(u,o.tolerance))return this.handleCancel();if(T5(u,o.distance))return this.handleStart()}if(VJ(o)&&T5(u,o.tolerance))return this.handleCancel();this.handlePending(o,u);return}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===ni.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const J_t={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class rve extends PH{constructor(e){const{event:n}=e,r=PT(n.target);super(e,J_t,r)}}rve.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const eCt={move:{name:"mousemove"},end:{name:"mouseup"}};var t6;(function(t){t[t.RightClick=2]="RightClick"})(t6||(t6={}));class ive extends PH{constructor(e){super(e,eCt,PT(e.event.target))}}ive.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===t6.RightClick?!1:(r==null||r({event:n}),!0)}}];const A5={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class sve extends PH{constructor(e){super(e,A5)}static setup(){return window.addEventListener(A5.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(A5.move.name,e)};function e(){}}}sve.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var i_;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(i_||(i_={}));var LD;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="Rever
646sedTreeOrder"})(LD||(LD={}));function tCt(t){let{acceleration:e,activator:n=i_.Pointer,canScroll:r,draggingRect:i,enabled:s,interval:a=5,order:o=LD.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:d,threshold:f}=t;const h=rCt({delta:d,disabled:!s}),[g,v]=m_t(),b=$.useRef({x:0,y:0}),S=$.useRef({x:0,y:0}),A=$.useMemo(()=>{switch(n){case i_.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case i_.DraggableRect:return i}},[n,i,l]),w=$.useRef(null),x=$.useCallback(()=>{const N=w.current;if(!N)return;const k=b.current.x*S.current.x,U=b.current.y*S.current.y;N.scrollBy(k,U)},[]),P=$.useMemo(()=>o===LD.TreeOrder?[...u].reverse():u,[o,u]);$.useEffect(()=>{if(!s||!u.length||!A){v();return}for(const N of P){if((r==null?void 0:r(N))===!1)continue;const k=u.indexOf(N),U=c[k];if(!U)continue;const{direction:H,speed:B}=G_t(N,U,A,e,f);for(const q of["x","y"])h[q][H[q]]||(B[q]=0,H[q]=0);if(B.x>0||B.y>0){v(),w.current=N,g(x,a),b.current=B,S.current=H;return}}b.current={x:0,y:0},S.current={x:0,y:0},v()},[e,x,r,v,s,a,JSON.stringify(A),JSON.stringify(h),g,u,P,c,JSON.stringify(f)])}const nCt={x:{[Do.Backward]:!1,[Do.Forward]:!1},y:{[Do.Backward]:!1,[Do.Forward]:!1}};function rCt(t){let{delta:e,disabled:n}=t;const r=OD(e);return Rx(i=>{if(n||!r||!i)return nCt;const s={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[Do.Backward]:i.x[Do.Backward]||s.x===-1,[Do.Forward]:i.x[Do.Forward]||s.x===1},y:{[Do.Backward]:i.y[Do.Backward]||s.y===-1,[Do.Forward]:i.y[Do.Forward]||s.y===1}}},[n,e,r])}function iCt(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return Rx(i=>{var s;return e==null?null:(s=r??i)!=null?s:null},[r,e])}function sCt(t,e){return $.useMemo(()=>t.reduce((n,r)=>{const{sensor:i}=r,s=i.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,r)}));return[...n,...s]},[]),[t,e])}var yC;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(yC||(yC={}));var n6;(function(t){t.Optimized="optimized"})(n6||(n6={}));const HJ=new Map;function aCt(t,e){let{dragging:n,dependencies:r,config:i}=e;const[s,a]=$.useState(null),{frequency:o,measure:l,strategy:u}=i,c=$.useRef(t),d=b(),f=mC(d),h=$.useCallback(function(S){S===void 0&&(S=[]),!f.current&&a(A=>A===null?S:A.concat(S.filter(w=>!A.includes(w))))},[f]),g=$.useRef(null),v=Rx(S=>{if(d&&!n)return HJ;if(!S||S===HJ||c.current!==t||s!=null){const A=new Map;for(let w of t){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){A.set(w.id,w.rect.current);continue}const x=w.node.current,P=x?new IH(l(x),x):null;w.rect.current=P,P&&A.set(w.id,P)}return A}return S},[t,s,n,d,l]);return $.useEffect(()=>{c.current=t},[t]),$.useEffect(()=>{d||h()},[n,d]),$.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),$.useEffect(()=>{d||typeof o!="number"||g.current!==null||(g.current=setTimeout(()=>{h(),g.current=null},o))},[o,d,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:s!=null};function b(){switch(u){case yC.Always:return!1;case yC.BeforeDragging:return n;default:return!n}}}function RH(t,e){return Rx(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function oCt(t,e){return RH(t,e)}function lCt(t){let{callback:e,disabled:n}=t;const r=_N(e),i=$.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return $.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function IN(t){let{callback:e,disabled:n}=t;const r=_N(e),i=$.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return $.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function uCt(t){return new IH(RT(t),t)}function jJ(t,e,n){e===void 0&&(e=uCt);const[r,i]=$.useState(null);function s(){i(l=>{if(!t)return null;if(t.isConnected===!1){var u;return(u=l??n)!=null?u:null}const c=e(t);return JSON.stringify(l)===JSON.stringify(c)?l:c})}const a=lCt({callback(l){if(t)for(const u of l){const{type:c,target:d}=u;if(c==="childList"&&d instanceof HTMLElement&&d.contains(t)){s();break}}}}),o=IN({callback:s});return Gf(()=>{s(),t?(o==null||o.observe(t),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),a==null||a.disconnect())},[t]),r}function cCt(t){const e=RH(t);return qme(t,e)}const zJ=[];function dCt(t){const e=$.useRef(t),n=Rx(r=>t?r&&r!==zJ&&t&&e.current&&t.parentNode===e.current.parentNode?r:xN(t):zJ,[t]);return $.useEffect(()=>{e.current=t},[t]),n}function fCt(t){const[e,n]=$.useState(null),r=$.useRef(t),i=$.useCallback(s=>{const a=E5(s.target);a&&n(o=>
646o?(o.set(a,e6(a)),new Map(o)):null)},[]);return $.useEffect(()=>{const s=r.current;if(t!==s){a(s);const o=t.map(l=>{const u=E5(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,e6(u)]):null}).filter(l=>l!=null);n(o.length?new Map(o):null),r.current=t}return()=>{a(t),a(s)};function a(o){o.forEach(l=>{const u=E5(l);u==null||u.removeEventListener("scroll",i)})}},[i,t]),$.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,a)=>$E(s,a),Wf):eve(t):Wf,[t,e])}function GJ(t,e){e===void 0&&(e=[]);const n=$.useRef(null);return $.useEffect(()=>{n.current=null},e),$.useEffect(()=>{const r=t!==Wf;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?vC(t,n.current):Wf}function hCt(t){$.useEffect(()=>{if(!wN)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function pCt(t,e){return $.useMemo(()=>t.reduce((n,r)=>{let{eventName:i,handler:s}=r;return n[i]=a=>{s(a,e)},n},{}),[t,e])}function ave(t){return $.useMemo(()=>t?V_t(t):null,[t])}const WJ=[];function gCt(t,e){e===void 0&&(e=RT);const[n]=t,r=ave(n?mu(n):null),[i,s]=$.useState(WJ);function a(){s(()=>t.length?t.map(l=>Xme(l)?r:new IH(e(l),l)):WJ)}const o=IN({callback:a});return Gf(()=>{o==null||o.disconnect(),a(),t.forEach(l=>o==null?void 0:o.observe(l))},[t]),i}function ove(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Px(e)?e:t}function mCt(t){let{measure:e}=t;const[n,r]=$.useState(null),i=$.useCallback(u=>{for(const{target:c}of u)if(Px(c)){r(d=>{const f=e(c);return d?{...d,width:f.width,height:f.height}:f});break}},[e]),s=IN({callback:i}),a=$.useCallback(u=>{const c=ove(u);s==null||s.disconnect(),c&&(s==null||s.observe(c)),r(c?e(c):null)},[e,s]),[o,l]=ID(a);return $.useMemo(()=>({nodeRef:o,rect:n,setRef:l}),[n,o,l])}const vCt=[{sensor:rve,options:{}},{sensor:OH,options:{}}],yCt={current:{}},zP={draggable:{measure:$J},droppable:{measure:$J,strategy:yC.WhileDragging,frequency:n6.Optimized},dragOverlay:{measure:RT}};class s_ extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const bCt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new s_,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:RD},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zP,measureDroppableContainers:RD,windowRect:null,measuringScheduled:!1},lve={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:RD,draggableNodes:new Map,over:null,measureDroppableContainers:RD},Dx=$.createContext(lve),uve=$.createContext(bCt);function SCt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new s_}}}function ECt(t,e){switch(e.type){case ho.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case ho.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case ho.DragEnd:case ho.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ho.RegisterDroppable:{const{element:n}=e,{id:r}=n,i=new s_(t.droppable.containers);return i.set(r,n),{...t,droppable:{...t.droppable,containers:i}}}case ho.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const a=new s_(t.droppable.containers);return a.set(n,{...s,disabled:i}),{...t,droppable:{...t.droppable,containers:a}}}case ho.UnregisterDroppable:{const{id:n,key:r}=e,i=t.droppable.containers.get(n);if(!i||r!==i.key)return t;
646const s=new s_(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function TCt(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:i}=$.useContext(Dx),s=OD(r),a=OD(n==null?void 0:n.id);return $.useEffect(()=>{if(!e&&!r&&s&&a!=null){if(!CN(s)||document.activeElement===s.target)return;const o=i.get(a);if(!o)return;const{activatorNode:l,node:u}=o;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const c of[l.current,u.current]){if(!c)continue;const d=b_t(c);if(d){d.focus();break}}})}},[r,e,i,a,s]),null}function cve(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((i,s)=>s({transform:i,...r}),n):n}function ACt(t){return $.useMemo(()=>({draggable:{...zP.draggable,...t==null?void 0:t.draggable},droppable:{...zP.droppable,...t==null?void 0:t.droppable},dragOverlay:{...zP.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function wCt(t){let{activeNode:e,measure:n,initialRect:r,config:i=!0}=t;const s=$.useRef(!1),{x:a,y:o}=typeof i=="boolean"?{x:i,y:i}:i;Gf(()=>{if(!a&&!o||!e){s.current=!1;return}if(s.current||!r)return;const u=e==null?void 0:e.node.current;if(!u||u.isConnected===!1)return;const c=n(u),d=qme(c,r);if(a||(d.x=0),o||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=Yme(u);f&&f.scrollBy({top:d.y,left:d.x})}},[e,a,o,r,n])}const ON=$.createContext({...Wf,scaleX:1,scaleY:1});var Rm;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Rm||(Rm={}));const _Ct=$.memo(function(e){var n,r,i,s;let{id:a,accessibility:o,autoScroll:l=!0,children:u,sensors:c=vCt,collisionDetection:d=N_t,measuring:f,modifiers:h,...g}=e;const v=$.useReducer(ECt,void 0,SCt),[b,S]=v,[A,w]=__t(),[x,P]=$.useState(Rm.Uninitialized),N=x===Rm.Initialized,{draggable:{active:k,nodes:U,translate:H},droppable:{containers:B}}=b,q=k!=null?U.get(k):null,Z=$.useRef({initial:null,translated:null}),C=$.useMemo(()=>{var nn;return k!=null?{id:k,data:(nn=q==null?void 0:q.data)!=null?nn:yCt,rect:Z}:null},[k,q]),L=$.useRef(null),[V,j]=$.useState(null),[X,G]=$.useState(null),ie=mC(g,Object.values(g)),ae=Lx("DndDescribedBy",a),ue=$.useMemo(()=>B.getEnabled(),[B]),Q=ACt(f),{droppableRects:de,measureDroppableContainers:le,measuringScheduled:ye}=aCt(ue,{dragging:N,dependencies:[H.x,H.y],config:Q.droppable}),fe=iCt(U,k),We=$.useMemo(()=>X?PD(X):null,[X]),Le=vn(),Ve=oCt(fe,Q.draggable.measure);wCt({activeNode:k!=null?U.get(k):null,config:Le.layoutShiftCompensation,initialRect:Ve,measure:Q.draggable.measure});const at=jJ(fe,Q.draggable.measure,Ve),Et=jJ(fe?fe.parentElement:null),ne=$.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:de,draggableNodes:U,draggingNode:null,draggingNodeRect:null,droppableContainers:B,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ze=B.getNodeFor((n=ne.current.over)==null?void 0:n.id),lt=mCt({measure:Q.dragOverlay.measure}),ot=(r=lt.nodeRef.current)!=null?r:fe,se=N?(i=lt.rect)!=null?i:at:null,Fe=!!(lt.nodeRef.current&&lt.rect),ht=cCt(Fe?null:at),Ct=ave(ot?mu(ot):null),pt=dCt(N?Ze??fe:null),me=gCt(pt),De=cve(h,{transform:{x:H.x-ht.x,y:H.y-ht.y,scaleX:1,scaleY:1},activatorEvent:X,active:C,activeNodeRect:at,containerNodeRect:Et,draggingNodeRect:se,over:ne.current.over,overlayNodeRect:lt.rect,scrollableAncestors:pt,scrollableAncestorRects:me,windowRect:Ct}),Me=We?$E(We,H):null,qe=fCt(pt),ut=GJ(qe),Tt=GJ(qe,[at]),jt=$E(De,ut),on=se?$_t(se,De):null,wn=C&&on?d({active:C,collisionRect:on,droppableRects:de,droppableContainers:ue,pointerCoordinates:Me}):null,kr=Wme(wn,"id"),[Ir,gi]=$.useState(null),Ln=Fe?De:$E(De,Tt),Ua=M_t(Ln,(s=Ir==null?void 0:Ir.rect)!=null?s:null,at),Qe=$.useRef(null),Ue=$.useCallback((nn,fn)=>{let{sensor:tn,options:$n}=fn;if(L.current==null)return;const Hr=U.get(L.current);if(!Hr)return;const dr=nn.nativeEvent,jr=new tn({active:L.current,activeNode:Hr,event:dr,options:$n,context:ne,onAbort(ci){if(!U.get(ci))return;const{onDragAbort:_i}=ie.current,$i={id:ci};_i==null||_i($i),A({type:"onDragAbort",event:$i})},onPending(ci,yt,_i,$i){if(!U.get(ci))return;const{onDragPending:$s}=ie.current,Va={id:ci,constraint:yt,initialCoordinates:_i,offset:$i};$s==null||$s(Va),A({type:"onDragPending",event:Va})},onStart(ci){const yt=L.current;if(yt==null)return;const _i=U.get(yt);if(!_i)return;const{onDragStart:$i}=ie.current,vu={activatorEvent:dr,active:{id:yt,data:_i.data,rect:Z}};og.unstable_batchedUpdates(()=>{$i==null||$i(vu),P(Rm.Initializing),S({type:ho.DragStart,initialCoordinates:ci,active:yt}),A({type:"onDragStart",event:vu}),j(Qe.current),G(dr)})},onMove(ci){S({type:ho.DragMove,coordinates:ci})},onEnd:as(ho.DragEnd),onCancel:as(ho.DragCancel)});Qe.current=jr;
646function as(ci){return async function(){const{active:_i,collisions:$i,over:vu,scrollAdjustedTranslate:$s}=ne.current;let Va=null;if(_i&&$s){const{cancelDrop:cs}=ie.current;Va={activatorEvent:dr,active:_i,collisions:$i,delta:$s,over:vu},ci===ho.DragEnd&&typeof cs=="function"&&await Promise.resolve(cs(Va))&&(ci=ho.DragCancel)}L.current=null,og.unstable_batchedUpdates(()=>{S({type:ci}),P(Rm.Uninitialized),gi(null),j(null),G(null),Qe.current=null;const cs=ci===ho.DragEnd?"onDragEnd":"onDragCancel";if(Va){const jc=ie.current[cs];jc==null||jc(Va),A({type:cs,event:Va})}})}}},[U]),Rt=$.useCallback((nn,fn)=>(tn,$n)=>{const Hr=tn.nativeEvent,dr=U.get($n);if(L.current!==null||!dr||Hr.dndKit||Hr.defaultPrevented)return;const jr={active:dr};nn(tn,fn.options,jr)===!0&&(Hr.dndKit={capturedBy:fn.sensor},L.current=$n,Ue(tn,fn))},[U,Ue]),Ut=sCt(c,Rt);hCt(c),Gf(()=>{at&&x===Rm.Initializing&&P(Rm.Initialized)},[at,x]),$.useEffect(()=>{const{onDragMove:nn}=ie.current,{active:fn,activatorEvent:tn,collisions:$n,over:Hr}=ne.current;if(!fn||!tn)return;const dr={active:fn,activatorEvent:tn,collisions:$n,delta:{x:jt.x,y:jt.y},over:Hr};og.unstable_batchedUpdates(()=>{nn==null||nn(dr),A({type:"onDragMove",event:dr})})},[jt.x,jt.y]),$.useEffect(()=>{const{active:nn,activatorEvent:fn,collisions:tn,droppableContainers:$n,scrollAdjustedTranslate:Hr}=ne.current;if(!nn||L.current==null||!fn||!Hr)return;const{onDragOver:dr}=ie.current,jr=$n.get(kr),as=jr&&jr.rect.current?{id:jr.id,rect:jr.rect.current,data:jr.data,disabled:jr.disabled}:null,ci={active:nn,activatorEvent:fn,collisions:tn,delta:{x:Hr.x,y:Hr.y},over:as};og.unstable_batchedUpdates(()=>{gi(as),dr==null||dr(ci),A({type:"onDragOver",event:ci})})},[kr]),Gf(()=>{ne.current={activatorEvent:X,active:C,activeNode:fe,collisionRect:on,collisions:wn,droppableRects:de,draggableNodes:U,draggingNode:ot,draggingNodeRect:se,droppableContainers:B,over:Ir,scrollableAncestors:pt,scrollAdjustedTranslate:jt},Z.current={initial:se,translated:on}},[C,fe,wn,on,U,ot,se,de,B,Ir,pt,jt]),tCt({...Le,delta:H,draggingRect:on,pointerCoordinates:Me,scrollableAncestors:pt,scrollableAncestorRects:me});const zt=$.useMemo(()=>({active:C,activeNode:fe,activeNodeRect:at,activatorEvent:X,collisions:wn,containerNodeRect:Et,dragOverlay:lt,draggableNodes:U,droppableContainers:B,droppableRects:de,over:Ir,measureDroppableContainers:le,scrollableAncestors:pt,scrollableAncestorRects:me,measuringConfiguration:Q,measuringScheduled:ye,windowRect:Ct}),[C,fe,at,X,wn,Et,lt,U,B,de,Ir,le,pt,me,Q,ye,Ct]),Yt=$.useMemo(()=>({activatorEvent:X,activators:Ut,active:C,activeNodeRect:at,ariaDescribedById:{draggable:ae},dispatch:S,draggableNodes:U,over:Ir,measureDroppableContainers:le}),[X,Ut,C,at,S,ae,U,Ir,le]);return mt.createElement(jme.Provider,{value:w},mt.createElement(Dx.Provider,{value:Yt},mt.createElement(uve.Provider,{value:zt},mt.createElement(ON.Provider,{value:Ua},u)),mt.createElement(TCt,{disabled:(o==null?void 0:o.restoreFocus)===!1})),mt.createElement(I_t,{...o,hiddenTextDescribedById:ae}));function vn(){const nn=(V==null?void 0:V.autoScrollEnabled)===!1,fn=typeof l=="object"?l.enabled===!1:l===!1,tn=N&&!nn&&!fn;return typeof l=="object"?{...l,enabled:tn}:{enabled:tn}}}),CCt=$.createContext(null),qJ="button",xCt="Draggable";function ICt(t){let{id:e,data:n,disabled:r=!1,attributes:i}=t;const s=Lx(xCt),{activators:a,activatorEvent:o,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=$.useContext(Dx),{role:h=qJ,roleDescription:g="draggable",tabIndex:v=0}=i??{},b=(l==null?void 0:l.id)===e,S=$.useContext(b?ON:CCt),[A,w]=ID(),[x,P]=ID(),N=pCt(a,e),k=mC(n);Gf(()=>(d.set(e,{id:e,key:s,node:A,activatorNode:x,data:k}),()=>{const H=d.get(e);H&&H.key===s&&d.delete(e)}),[d,e]);const U=$.useMemo(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":b&&h===qJ?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[r,h,v,b,g,c.draggable]);return{active:l,activatorEvent:o,activeNodeRect:u,attributes:U,isDragging:b,listeners:r?void 0:N,node:A,over:f,setNodeRef:w,setActivatorNodeRef:P,transform:S}}function dve(){return $.useContext(uve)}const OCt="Droppable",PCt={timeout:25};function RCt(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const s=Lx(OCt),{active:a,dispatch:o,over:l,measureDroppableContainers:u}=$.useContext(Dx),c=$.useRef({disabled:n}),d=$.useRef(!1),f=$.useRef(null),h=$.useRef(null),{disabled:g,updateMeasurementsFor:v,timeout:b}={...PCt,...i},S=mC(v??r),A=$.useCallback(()=>
646{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(S.current)?S.current:[S.current]),h.current=null},b)},[b]),w=IN({callback:A,disabled:g||!a}),x=$.useCallback((U,H)=>{w&&(H&&(w.unobserve(H),d.current=!1),U&&w.observe(U))},[w]),[P,N]=ID(x),k=mC(e);return $.useEffect(()=>{!w||!P.current||(w.disconnect(),d.current=!1,w.observe(P.current))},[P,w]),$.useEffect(()=>(o({type:ho.RegisterDroppable,element:{id:r,key:s,disabled:n,node:P,rect:f,data:k}}),()=>o({type:ho.UnregisterDroppable,key:s,id:r})),[r]),$.useEffect(()=>{n!==c.current.disabled&&(o({type:ho.SetDroppableDisabled,id:r,key:s,disabled:n}),c.current.disabled=n)},[r,s,n,o]),{active:a,rect:f,isOver:(l==null?void 0:l.id)===r,node:P,over:l,setNodeRef:N}}function LCt(t){let{animation:e,children:n}=t;const[r,i]=$.useState(null),[s,a]=$.useState(null),o=OD(n);return!n&&!r&&o&&i(o),Gf(()=>{if(!s)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(e(u,s)).then(()=>{i(null)})},[e,r,s]),mt.createElement(mt.Fragment,null,n,r?$.cloneElement(r,{ref:a}):null)}const DCt={x:0,y:0,scaleX:1,scaleY:1};function kCt(t){let{children:e}=t;return mt.createElement(Dx.Provider,{value:lve},mt.createElement(ON.Provider,{value:DCt},e))}const NCt={position:"fixed",touchAction:"none"},MCt=t=>CN(t)?"transform 250ms ease":void 0,FCt=$.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:i,children:s,className:a,rect:o,style:l,transform:u,transition:c=MCt}=t;if(!o)return null;const d=i?u:{...u,scaleX:1,scaleY:1},f={...NCt,width:o.width,height:o.height,top:o.top,left:o.left,transform:Ov.Transform.toString(d),transformOrigin:i&&r?P_t(r,o):void 0,transition:typeof c=="function"?c(r):c,...l};return mt.createElement(n,{className:a,style:f,ref:e},s)}),$Ct=t=>e=>{let{active:n,dragOverlay:r}=e;const i={},{styles:s,className:a}=t;if(s!=null&&s.active)for(const[o,l]of Object.entries(s.active))l!==void 0&&(i[o]=n.node.style.getPropertyValue(o),n.node.style.setProperty(o,l));if(s!=null&&s.dragOverlay)for(const[o,l]of Object.entries(s.dragOverlay))l!==void 0&&r.node.style.setProperty(o,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},BCt=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:Ov.Transform.toString(e)},{transform:Ov.Transform.toString(n)}]},UCt={duration:250,easing:"ease",keyframes:BCt,sideEffects:$Ct({styles:{active:{opacity:"0"}}})};function VCt(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=t;return _N((s,a)=>
646{if(e===null)return;const o=n.get(s);if(!o)return;const l=o.node.current;if(!l)return;const u=ove(a);if(!u)return;const{transform:c}=mu(a).getComputedStyle(a),d=Kme(c);if(!d)return;const f=typeof e=="function"?e:HCt(e);return tve(l,i.draggable.measure),f({active:{id:s,data:o.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function HCt(t){const{duration:e,easing:n,sideEffects:r,keyframes:i}={...UCt,...t};return s=>{let{active:a,dragOverlay:o,transform:l,...u}=s;if(!e)return;const c={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},d={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/o.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/o.rect.height:1},f={x:l.x-c.x,y:l.y-c.y,...d},h=i({...u,active:a,dragOverlay:o,transform:{initial:l,final:f}}),[g]=h,v=h[h.length-1];if(JSON.stringify(g)===JSON.stringify(v))return;const b=r==null?void 0:r({active:a,dragOverlay:o,...u}),S=o.node.animate(h,{duration:e,easing:n,fill:"forwards"});return new Promise(A=>{S.onfinish=()=>{b==null||b(),A()}})}}let KJ=0;function jCt(t){return $.useMemo(()=>{if(t!=null)return KJ++,KJ},[t])}const zCt=mt.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:i,transition:s,modifiers:a,wrapperElement:o="div",className:l,zIndex:u=999}=t;const{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggableNodes:g,droppableContainers:v,dragOverlay:b,over:S,measuringConfiguration:A,scrollableAncestors:w,scrollableAncestorRects:x,windowRect:P}=dve(),N=$.useContext(ON),k=jCt(d==null?void 0:d.id),U=cve(a,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggingNodeRect:b.rect,over:S,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:x,transform:N,windowRect:P}),H=RH(f),B=VCt({config:r,draggableNodes:g,droppableContainers:v,measuringConfiguration:A}),q=H?b.setRef:void 0;return mt.createElement(kCt,null,mt.createElement(LCt,{animation:B},d&&k?mt.createElement(FCt,{key:k,id:d.id,ref:q,as:o,activatorEvent:c,adjustScale:e,className:l,transition:s,rect:H,style:{zIndex:u,...i},transform:U},n):null))}),GCt=t=>{let{transform:e}=t;return{...e,x:0}};function LH(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function WCt(t,e){return t.reduce((n,r,i)=>{const s=e.get(r);return s&&(n[i]=s),n},Array(t.length))}function $O(t){return t!==null&&t>=0}function qCt(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function KCt(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const fve=t=>{let{rects:e,activeIndex:n,overIndex:r,index:i}=t;const s=LH(e,r,n),a=e[i],o=s[i];return!o||!a?null:{x:o.left-a.left,y:o.top-a.top,scaleX:o.width/a.width,scaleY:o.height/a.height}},BO={scaleX:1,scaleY:1},YCt=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:i,rects:s,overIndex:a}=t;const o=(e=s[n])!=null?e:r;if(!o)return null;if(i===n){const u=s[a];return u?{x:0,y:n<a?u.top+u.height-(o.top+o.height):u.top-o.top,...BO}:null}const l=ZCt(s,i,n);return i>n&&i<=a?{x:0,y:-o.height-l,...BO}:i<n&&i>=a?{x:0,y:o.height+l,...BO}:{x:0,y:0,...BO}};function ZCt(t,e,n){const r=t[e],i=t[e-1],s=t[e+1];return r?n<e?i?r.top-(i.top+i.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const hve="Sortable",pve=mt.createContext({activeIndex:-1,containerId:hve,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:fve,disabled:{draggable:!1,droppable:!1}});function QCt(t){let{children:e,id:n,items:r,strategy:i=fve,disabled:s=!1}=t;const{active:a,dragOverlay:o,droppableRects:l,over:u,measureDroppableContainers:c}=dve(),d=Lx(hve,n),f=o.rect!==null,h=$.useMemo(()=>r.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),g=a!=null,v=a?h.indexOf(a.id):-1,b=u?h.indexOf(u.id):-1,S=$.useRef(h),A=!qCt(h,S.current),w=b!==-1&&v===-1||A,x=KCt(s);Gf(()=>{A&&g&&c(h)},[A,h,g,c]),$.useEffect(()=>{S.current=h},[h]);const P=$.useMemo(()=>({activeIndex:v,containerId:d,disabled:x,disableTransforms:w,items:h,overIndex:b,useDragOverlay:f,sortedRects:WCt(h,l),strategy:i}
646),[v,d,x.draggable,x.droppable,w,h,b,l,f,i]);return mt.createElement(pve.Provider,{value:P},e)}const XCt=t=>{let{id:e,items:n,activeIndex:r,overIndex:i}=t;return LH(n,r,i).indexOf(e)},JCt=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:i,items:s,newIndex:a,previousItems:o,previousContainerId:l,transition:u}=t;return!u||!r||o!==s&&i===a?!1:n?!0:a!==i&&e===l},ext={duration:200,easing:"ease"},gve="transform",txt=Ov.Transition.toString({property:gve,duration:0,easing:"linear"}),nxt={roleDescription:"sortable"};function rxt(t){let{disabled:e,index:n,node:r,rect:i}=t;const[s,a]=$.useState(null),o=$.useRef(n);return Gf(()=>{if(!e&&n!==o.current&&r.current){const l=i.current;if(l){const u=RT(r.current,{ignoreTransform:!0}),c={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(c.x||c.y)&&a(c)}}n!==o.current&&(o.current=n)},[e,n,r,i]),$.useEffect(()=>{s&&a(null)},[s]),s}function ixt(t){let{animateLayoutChanges:e=JCt,attributes:n,disabled:r,data:i,getNewIndex:s=XCt,id:a,strategy:o,resizeObserverConfig:l,transition:u=ext}=t;const{items:c,containerId:d,activeIndex:f,disabled:h,disableTransforms:g,sortedRects:v,overIndex:b,useDragOverlay:S,strategy:A}=$.useContext(pve),w=sxt(r,h),x=c.indexOf(a),P=$.useMemo(()=>({sortable:{containerId:d,index:x,items:c},...i}),[d,i,x,c]),N=$.useMemo(()=>c.slice(c.indexOf(a)),[c,a]),{rect:k,node:U,isOver:H,setNodeRef:B}=RCt({id:a,data:P,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...l}}),{active:q,activatorEvent:Z,activeNodeRect:C,attributes:L,setNodeRef:V,listeners:j,isDragging:X,over:G,setActivatorNodeRef:ie,transform:ae}=ICt({id:a,data:P,attributes:{...nxt,...n},disabled:w.draggable}),ue=g_t(B,V),Q=!!q,de=Q&&!g&&$O(f)&&$O(b),le=!S&&X,ye=le&&de?ae:null,We=de?ye??(o??A)({rects:v,activeNodeRect:C,activeIndex:f,overIndex:b,index:x}):null,Le=$O(f)&&$O(b)?s({id:a,items:c,activeIndex:f,overIndex:b}):x,Ve=q==null?void 0:q.id,at=$.useRef({activeId:Ve,items:c,newIndex:Le,containerId:d}),Et=c!==at.current.items,ne=e({active:q,containerId:d,isDragging:X,isSorting:Q,id:a,index:x,items:c,newIndex:at.current.newIndex,previousItems:at.current.items,previousContainerId:at.current.containerId,transition:u,wasDragging:at.current.activeId!=null}),Ze=rxt({disabled:!ne,index:x,node:U,rect:k});return $.useEffect(()=>{Q&&at.current.newIndex!==Le&&(at.current.newIndex=Le),d!==at.current.containerId&&(at.current.containerId=d),c!==at.current.items&&(at.current.items=c)},[Q,Le,d,c]),$.useEffect(()=>{if(Ve===at.current.activeId)return;if(Ve&&!at.current.activeId){at.current.activeId=Ve;return}const ot=setTimeout(()=>{at.current.activeId=Ve},50);return()=>clearTimeout(ot)},[Ve]),{active:q,activeIndex:f,attributes:L,data:P,rect:k,index:x,newIndex:Le,items:c,isOver:H,isSorting:Q,isDragging:X,listeners:j,node:U,overIndex:b,over:G,setNodeRef:ue,setActivatorNodeRef:ie,setDroppableNodeRef:B,setDraggableNodeRef:V,transform:Ze??We,transition:lt()};function lt(){if(Ze||Et&&at.current.newIndex===x)return txt;if(!(le&&!CN(Z)||!u)&&(Q||ne))return Ov.Transition.toString({...u,property:gve})}}function sxt(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(r=t==null?void 0:t.droppable)!=null?r:e.droppable}}function DD(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const axt=[ni.Down,ni.Right,ni.Up,ni.Left],oxt=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:s,over:a,scrollableAncestors:o}}=e;if(axt.includes(t.code)){if(t.preventDefault(),!n||!r)return;const l=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=i.get(d.id);if(f)switch(t.code){case ni.Down:r.top<f.top&&l.push(d);break;case ni.Up:r.top>f.top&&l.push(d);break;case ni.Left:r.left>f.left&&l.push(d);break;case ni.Right:r.left<f.left&&l.push(d);break}});const u=D_t({collisionRect:r,droppableRects:i,droppableContainers:l});let c=Wme(u,"id");if(c===(a==null?void 0:a.id)&&u.length>1&&(c=u[1].id),c!=null){const d=s.get(n.id),f=s.get(c),h=f?i.get(f.id):null,g=f==null?void 0:f.node.current;if(g&&h&&d&&f){const b=xN(g).some((N,k)=>o[k]!==N),S=mve(d,f),A=lxt(d,f),w=b||!S?{x:0,y:0}:{x:A?r.width-h.width:0,y:A?r.height-h.height:0},x={x:h.left,y:h.top};return w.x&&w.y?x:vC(x,w)}}}};
646function mve(t,e){return!DD(t)||!DD(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function lxt(t,e){return!DD(t)||!DD(e)||!mve(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const UO={item:{position:"relative",marginBottom:20,...Bt.reduceMotion(),"&:last-child":{marginBottom:0},opacity:1,transition:"opacity 0.3s ease",...Bt.focusOutline({outlineOffset:-1})},childrenInvisible:{opacity:0,transition:"opacity 0.3s ease"},handle:{position:"absolute",right:3,top:"50%",transform:"translateY(-50%)",cursor:"ns-resize",display:"flex",alignItems:"center",justifyContent:"center",height:vc.minButtonSize.finePointer,width:vc.minButtonSize.finePointer,"&:focus":{position:"absolute"},"&:focus-visible":{...Bt.focusOutline}}},uxt=({item:t,isReordering:e,isSortable:n,listId:r,children:i,isEditMode:s,listeners:a,style:o,isDragging:l,...u},c)=>{const{t:d}=dn(),f=`${r}-help-text`;return be("li",{css:[UO.item,o],ref:c,...u,children:[I("div",{css:l&&UO.childrenInvisible,children:i}
646),s&&I("span",{...a,css:e&&UO.childrenInvisible,children:I(Mc,{ariaDescribedBy:f,ariaLabel:`${d("sortable.listItem.reorder.label")} ${t.title}`,buttonCss:UO.handle,icon:en.ListHandle,isDisabled:!n,iconSizeInPx:32})})]},t.id)},vve=$.forwardRef(uxt),cxt=t=>{const{listeners:e,setNodeRef:n,transform:r,transition:i}=ixt({id:t.item.id,data:{title:t.item.title}}),s={transform:Ov.Transform.toString(r),transition:i};return I(vve,{ref:n,...t,listeners:e,style:s})},dxt={overlay:{img:{opacity:1}}},fxt=({isEditMode:t,items:e,listId:n,renderItem:r,onSortEnd:i})=>{const{t:s}=dn(),[a,o]=$.useState(e),[l,u]=$.useState(null),c=l&&a.find(A=>A.id===l),d=t&&e.length>1,f=`${n}-help-text`,h=$.useRef(!0);$.useEffect(()=>{o(e)},[e]);const g=O_t(S5(ive),S5(sve),S5(OH,{coordinateGetter:oxt}));return be(_Ct,{sensors:g,collisionDetection:L_t,onDragStart:A=>{const{active:w}=A;u(String(w.id)),h.current=!0},onDragEnd:A=>{const{active:w,over:x}=A;u(null),x&&w.id!==x.id&&o(P=>{const N=P.findIndex(H=>H.id===w.id),k=P.findIndex(H=>H.id===x.id),U=LH(P,N,k);return i==null||i(U),U})},modifiers:[GCt],accessibility:{announcements:{onDragStart({active:A}){var w;return s("sortable.list.announcements.onDragStart",{title:(w=A.data.current)==null?void 0:w.title})},onDragOver({active:A,over:w}){var x,P;if(h.current){h.current=!1;return}return w?s("sortable.list.announcements.onDragOver.success",{activeTitle:(x=A.data.current)==null?void 0:x.title,overIndex:((P=w.data.current)==null?void 0:P.sortable.index)+1}):s("sortable.list.announcements.onDragOver.error")},onDragEnd({active:A,over:w}){var x,P;return w?s("sortable.list.announcements.onDragEnd.success",{activeTitle:(x=A.data.current)==null?void 0:x.title,overIndex:((P=w.data.current)==null?void 0:P.sortable.index)+1}):s("sortable.list.announcements.onDragEnd.error")},onDragCancel({active:A}){var w;return s("sortable.list.announcements.onDragCancel",{activeTitle:(w=A.data.current)==null?void 0:w.title})}}},children:[I("p",{css:aC.visHidden,id:f,children:s("sortable.list.reorderHelpText")}),I("ol",{children:I(QCt,{items:a,strategy:YCt,children:a.map(A=>I(cxt,{item:A,listId:n,isSortable:d,isEditMode:t,isReordering:l===A.id,children:r({item:A})},A.id))})}),I(zCt,{css:dxt.overlay,children:c?I(vve,{listId:n,isSortable:!0,isEditMode:!0,item:c,isDragging:!0,children:r({item:c})}):null})]})},hxt=({entityImageShape:t,isEditMode:e,isPlayerQueue:n,isSortable:r,items:i,itemType:s,selectedItems:a,shouldShowEntityType:o,onItemClick:l,onItemHrefClick:u,onSortEnd:c,onToggleSelected:d,renderEntityRightColumn:f})=>{const h=({item:g})=>I(p_t,{entityImageShape:t,contentId:g.id,entityType:g.entityType,entitySubtype:g.entitySubtype,isEditMode:e,isPlayerQueue:n,isSelected:a.includes(g.id),item:g,shouldShowEntityType:o,onItemClick:l?()=>l(g.id):void 0,onToggleSelected:()=>d(g.id),onItemHrefClick:u,renderEntityRightColumn:f,itemType:s});return I(Yh,{initial:!1,children:r?I(fxt,{onSortEnd:c,items:i,listId:"queue",renderItem:h,isEditMode:e}):I(TN,{items:i,renderItem:h})})},Zo={container:{display:"flex",flexDirection:"column",minHeight:"inherit"},editCta:{[Be(ve.Small)]:{position:"fixed",bottom:20,left:20,right:20,zIndex:Ai.editCta},[Be(ve.Medium)]:{bottom:0,position:"relative",left:0,right:0,zIndex:Ai.editCta}},editCtaPlayerVisible:{[Be(ve.Small)]:{position:"fixed",bottom:80,left:20,right:20,zIndex:Ai.editCta}},header:{display:"flex",alignItems:"center",justifyContent:"space-between",[Be(ve.Large)]:{paddingBottom:20,borderBottom:Ng.separator}},headerCtas:{display:"flex","> button":{marginLeft:10}},title:{position:"relative",...cn.titleSection},titleGradient:{position:"relative",whiteSpace:"nowrap",...cn.titleSection,...Bt.overflowGradient("to right")},toolbar:{display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:28},metadata:{...cn.metadataSmall,color:_e.white60},editSelectors:{display:"flex"},editSelector:{marginRight:20,marginLeft:3},editSelectorsElement:{height:16},contentWithMediumPadding:{height:"100%",padding:"20px 0",paddingRight:10,overflowX:"hidden"},emptyMessage:{...cn.metadataLarge,minHeight:"inherit",display:"flex",justifyContent:"center",alignItems:"center"},listWithToolbar:{marginTop:15},listWithoutToolbar:{marginTop:20}},pxt=({containerCss:t,headerCss:e,listCss:n,nowPlayingItemId:r,items:i,selectedItems:s,isEditable:a,isEditing:o,shouldForceFocus:l,selectButtons:u,bulkEditActionButton:c,toggleEditModeButton:d,title:f,renderListLabel:h,renderEmptyMessage:g,onItemToggleSelected:v,scrollClass:b,onItemHrefClick:S,hadExpiredItems:A,...w})=>{const x=eT(),P=$.useRef(null),N=i.length===0,k=!!(a&&o),U=!!f,H=Fs(),B=Ht(ws);$.useEffect(()=>{if(l&&P.current){const ue=Bme(P.current);ue.length>0&&ue[0]instanceof HTMLElement&&ue[0].focus()}},[l]);const q=h?I(Il.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:gC(DJ,x),css:Zo.metadata,children:h(i)}):null,Z=c&&k&&!!s&&!!s.length,C=!!d&&!!a,V=Z||C?be("div",{css:Zo.headerCtas,children:[Z&&I(xv,{label:c.label,onClick:c.onClick,css:H.lessThan.LG&&B?Zo.editCtaPlayerVisible:Zo.edit
646Cta,size:H.is.SM?"Default":"Small",theme:"White"}),C&&I(xv,{label:d.label,onClick:d.onClick,size:"Small",theme:"Secondary"})]}):null,j=be("header",{css:[Zo.header,e],children:[I("h2",{css:Z?Zo.titleGradient:Zo.title,children:f}),!N&&V]}),X=k&&!!u&&!!u.length,G=(X||q)&&I("div",{css:A?void 0:Zo.editSelectorsElement,children:X?I(Il.ul,{initial:"hidden",animate:"visible",exit:"hidden",variants:gC(DJ,x),css:Zo.editSelectors,children:u==null?void 0:u.map(({label:ue,onClick:Q},de)=>I("li",{css:Zo.editSelector,children:I(Mg,{as:Fi.Button,isTiny:!0,onClick:Q,children:ue})},ue))}):q},"toolbar");if(N){const ue=g();return be("section",{css:[Zo.container,t],children:[U&&j,typeof ue=="string"?I("span",{css:Zo.emptyMessage,children:g()}):ue]})}const ae=!U&&(!!G||!!V)&&I("div",{css:Zo.toolbar,children:be(Yh,{initial:!1,children:[G,V]})});return be("section",{css:[Zo.container,t],children:[U?j:ae,be(Il.div,{layoutScroll:!0,css:[U&&Zo.contentWithMediumPadding,n],ref:P,className:b,children:[U&&I(Yh,{initial:!1,children:G}),I("div",{css:[ae&&Zo.listWithToolbar,U&&Zo.listWithoutToolbar],children:I(hxt,{...w,isEditMode:k,nowPlayingItemId:r,onToggleSelected:v,items:i,selectedItems:s||[],onItemHrefClick:S})})]})]})},gxt=({defaultSelected:t,items:e,itemType:n,isListEditable:r,isListSortable:i,selectButtons:s,renderEditActionButton:a,hideExpiredMessage:o,hadExpiredItems:l,onItemHrefClick:u,...c})=>{const{t:d}=dn(),{resetAllEditMode:f}=d_t(),{isEditMode:h,setIsEditMode:g,selectedItems:v=[],setSelectedItems:b}=f_t(n,t),S=v.length===e.length,A=!!r&&h,w=Ht(q2);$.useEffect(()=>()=>{f()},[f]),$.useEffect(()=>{b(t||[])},[t,b]);const x=U=>{const H=[...v],B=H.indexOf(U);B!==-1?H.splice(B,1):H.push(U),b(H)},P=()=>{b(S?[]:e.map(U=>U.id))},N=()=>{k&&(k.onClick(v)(),b([]))},k=a==null?void 0:a(v.length);return I(pxt,{...c,items:e,selectedItems:v,isEditable:r,isEditing:A,isSortable:i,onItemHrefClick:u,onItemToggleSelected:x,hadExpiredItems:l,selectButtons:[{label:d(S?"queueOverlay.myQueue.unselectAll":"queueOverlay.myQueue.selectAll"),onClick:P},...s||[]],bulkEditActionButton:k?{...k,onClick:N}:void 0,toggleEditModeButton:{label:d(A?"global.done":"global.edit"),onClick:()=>{l&&(o==null||o()),g(!A)}},scrollClass:w,itemType:n})},mxt=be("svg",{width:"214",height:"131",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[I("title",{children:"Queue Empty"}),I("rect",{y:"39.861",width:"26.805",height:"26.956",rx:"2",fill:"#fff",fillOpacity:".15"}),I("path",{fill:"#fff",fillOpacity:".15",d:"M35.741 46.151h107.218v4.493H35.741zM35.74 55.136h58.97v4.493H35.74z"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M172.442 48.847c0-.497-.4-.899-.893-.899a.896.896 0 0 0-.893.899c0 .496.4.898.893.898a.896.896 0 0 0 .893-.898Zm4.647 0c0-.497-.4-.899-.894-.899a.896.896 0 0 0-.893.899c0 .496.4.898.893.898a.896.896 0 0 0 .894-.898Zm3.752-.899c.494 0 .894.402.894.899 0 .496-.4.898-.894.898a.896.896 0 0 1-.893-.898c0-.497.4-.899.893-.899Z",fill:"#fff",fillOpacity:".15"}),I("rect",{width:"26.805",height:"26.956",rx:"2",fill:"#fff",fillOpacity:".15"}),I("path",{fill:"#fff",fillOpacity:".15",d:"M35.741 6.29h107.218v4.493H35.741zM35.74 15.275h58.97v4.493H35.74z"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M172.442 8.986c0-.496-.4-.899-.893-.899a.896.896 0 0 0-.893.899c0 .496.4.898.893.898a.896.896 0 0 0 .893-.898Zm4.647 0c0-.496-.4-.899-.894-.899a.896.896 0 0 0-.893.899c0 .496.4.898.893.898a.896.896 0 0 0 .894-.898Zm3.752-.899c.494 0 .894.403.894.899s-.4.898-.894.898a.896.896 0 0 1-.893-.898c0-.496.4-.899.893-.899Z",fill:"#fff",fillOpacity:".15"}),I("rect",{y:"80.295",width:"26.805",height:"26.956",rx:"2",fill:"#fff",fillOpacity:".15"}),I("path",{fill:"#fff",fillOpacity:".15",d:"M35.741 86.585h107.218v4.493H35.741zM35.74 95.571h58.97v4.493H35.74z"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M172.442 88.383c0-.496-.4-.899-.893-.899a.896.896 0 0 0-.893.899c0 .496.4.898.893.898a.896.896 0 0 0 .893-.898Zm4.647 0c0-.496-.4-.899-.894-.899a.896.896 0 0 0-.893.899c0 .496.4.898.893.898a.896.896 0 0 0 .894-.898Zm3.752-.899c.494 0 .894.403.894.899s-.4.898-.894.898a.896.896 0 0 1-.893-.898c0-.496.4-.899.893-.899Z",fill:"#fff",fillOpacity:".15"}),I("ellipse",{cx:"176.494",cy:"88.5",rx:"28",ry:"28.5",fill:"#090527"}),I("path",{d:"M176.494 117.5c15.749 0 28.5-12.992 28.5-29s-12.751-29-28.5-29c-15.748 0-28.5 12.992-28.5 29s12.752 29 28.5 29Z",stroke:"#fff",strokeOpacity:".3"}),I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M170.494 88.5c0-.863-.671-1.563-1.5-1.563-.828 0-1.5.7-1.5 1.563s.672 1.563 1.5 1.563c.829 0 1.5-.7 1.5-1.563Zm7.8 0c0-.863-.671-1.563-1.5-1.563-.828 0-1.5.7-1.5 1.563s.672 1.563 1.5 1.563c.829 0 1.5-.7 1.5-1.563Zm6.3-1.563c.829 0 1.5.7 1.5 1.563s-.671 1.563-1.5 1.563c-.828 0-1.5-.7-1.5-1.563s.672-1.563 1.5-1.563Z",fill:"#fff"})]}),w5={container:{textAlign:"center",margin:"0 auto",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:350,minHeight:"inherit",[Be(ve.Medium)]:{maxWidth:375},[Be(ve.Large)]:{maxWidth:375}},title:{...cn.metadataLarge,marginBottom:10},subtitle:{...cn.metadataLarge,color:_e.white60,marginBottom:30,[Be(ve.Medium)]:{marginBottom:40},[Be(ve.Large)]:{marginBottom:30}}},vxt=({containerCss:t})=>{const{t:e}=dn();return be("div",{css:[w5.container,t],children:[I("h3",{css:w5.title,children:e("queueOverlay.emptyQueue.title")}),I("p",{css:w5.subtitle,children:e("queueOverlay.emptyQueue.subtitle")}),mxt]})},_5={expiredPlayer:{[Be(ve.Large)]:{maxWidth:300}},expired:{...cn.metadataSmall,color:_e.white60,marginTop:20,marginBottom:5,[Be(ve.Small)]:{maxWidth:300},[Be(ve.Medium)]:{maxWidth:"initial"}}
646,expiredButton:{...cn.metadataSmall,...Bt.transition("color"),fontWeight:"bold",color:_e.white,marginBottom:10,textAlign:"left",transition:"color 100ms linear",":hover":{color:_e.white60}}},yve=({hideExpiredMessage:t,isPlayerQueue:e,textCss:n})=>{const{t:r}=dn();return be(Dn,{children:[I("p",{css:[_5.expired,e&&_5.expiredPlayer,n],children:r("queueOverlay.expired.text")}),I("button",{type:"button",css:_5.expiredButton,onClick:t,children:r("queueOverlay.expired.button")})]})},yxt={header:{[Be(ve.Large)]:{}},title:{...cn.titleSection},resetPadding:{padding:0}},bxt=({isLoading:t,queueItems:e,onRemove:n,shouldRenderHeader:r=!0,selectedItems:i,emptyQueueCss:s,...a})=>{const{t:o}=dn(),l=u=>{n==null||n(u)};return t?I(aD,{}):I(gxt,{...a,items:e,itemType:_H.MyQueue,isListEditable:!0,isListSortable:!0,renderEditActionButton:u=>({label:o("global.removeX",{quantity:u}),onClick:c=>()=>l(c)}),title:r?o("queueOverlay.myQueue.title"):void 0,containerCss:e.length===0&&a.hadExpiredItems?yxt.resetPadding:a.containerCss,renderEmptyMessage:()=>a.hadExpiredItems?I(yve,{hideExpiredMessage:a.hideExpiredMessage,isPlayerQueue:a.isPlayerQueue}):I(vxt,{containerCss:s}),defaultSelected:i})},Sxt=t=>{var v,b;const{t:e}=dn(),n=Ht(ws),r=(v=n==null?void 0:n.dataObject)==null?void 0:v.id,i=(b=n==null?void 0:n.episodeDataObject)==null?void 0:b.id,{playState:s}=Ht(mo),{request:a,...o}=gN(),l=Yu(),[u,c]=Fo(VV),d=Ht(kg),f=Qs(iN);$.useEffect(()=>{d?a():f(!1)},[a,d,f]);const h=S=>{const A={contentId:S,feature:Ei.QUEUE},w=[r,i].includes(S);w&&s===Hi.Playing?l.pause(A):w?l.resume(A):l.playQueue(S,A)},g=()=>{u&&c(!1)};return $.useEffect(()=>()=>{u&&c(!1)},[u,c]),I(bxt,{isLoading:o.isLoading,nowPlayingItemId:r,queueItems:o.items,onRemove:o.remove,selectedItems:o.selectedItems,onSortEnd:S=>o.set({currentId:o.currentId,items:S}),renderListLabel:()=>I(Dn,{children:u?I(yve,{hideExpiredMessage:g,isPlayerQueue:t.isPlayerQueue}):e("myAudioScreen.dynamicHeader.myQueue",{count:o.items.length})}),onItemClick:h,hadExpiredItems:u,hideExpiredMessage:g,...t})},YJ={queueDelay:.2,infoDelay:.4},Ext={[fi.initial]:{opacity:0},[fi.animate]:{opacity:1},[fi.exit]:{opacity:0}},Txt={[fi.initial]:{flexBasis:0,opacity:0},[fi.animate]:{flexBasis:"30%",opacity:1,transition:{bounce:0}},[fi.exit]:{flexBasis:0,opacity:0,transition:{bounce:0}}},Axt={[fi.initial]:{bottom:30,opacity:0,right:30,width:500,height:80},[fi.animate]:{bottom:0,opacity:1,right:0,y:0,width:"100%",height:"100%",transition:{bounce:.1,duration:.3}},[fi.exit]:{opacity:0,y:"10%",transition:{bounce:.1,duration:.3}}},wxt={[fi.initial]:{opacity:0,y:"25%"},[fi.animate]:{opacity:1,y:0,transition:{bounce:.1,duration:.3}},[fi.exit]:{opacity:0,y:"10%",transition:{bounce:.1,duration:.3}}},bve="fullPlayerScrollableContent",ZJ=Rme(bve),_xt=()=>{const{greaterThan:t,lessThan:e}=Fs(),n=Ht(kg),r=Eb("queue")&&n,[i,s]=$.useState(!1),{currentToast:a}=gu(),o=$.useRef(null),l=$.useRef(null),u=eT(),{handlePlayerContentVisibleComplete:c,handlePlayerVisibleComplete:d,isPlayerContentVisible:f,isPlayerContentAnimationComplete:h,isPlayerVisible:g}=mSt(),{handleQueueAnimationComplete:v,handleQueueClick:b,handleQueueContainerAnimationComplete:S,isQueueTransitioned:A,isQueueVisible:w}=vSt(),x=ZX(h,YJ.queueDelay),P=ZX(h,YJ.infoDelay);_D(h,o.current,ZJ),_D(h,l.current,ZJ);const N=Qs(q2);$.useEffect(()=>{N(bve)},[N]);const k=V=>{V===fi.animate?s(!0):V===fi.exit&&(s(!1),x.setIsVisibleAfterDelay(!1),P.setIsVisibleAfterDelay(!1)),d(V)},H=gC(i&&h?Txt:Ext,u),B=t.MD?Axt:wxt,q=gC(B,u),Z=t.MD?"large":"small",C=P.isVisibleAfterDelay,L=V=>!!V.target.className.split(" ").some(G=>G.includes("ab-"));return I(bv,{isVisible:g,motionCss:[wl.container,wl.mobileHeightFix],onAnimationComplete:k,style:{originY:1,originX:1},variants:q,...fi,children:I(bv.FadeInOut,{motionCss:wl.playerContent,isVisible:f,onAnimationComplete:c,variants:k1(),...fi,children:I(W2,{paused:!!a,focusTrapOptions:{allowOutsideClick:L},children:be("div",{css:wl.fullPlayer,children:[I(r_t,{}),r&&I(Yh,{children:w&&I(Il.div,{variants:H,onAnimationComplete:S,css:wl.queueContainer,...fi,children:x.isVisibleAfterDelay||e.LG?I(Yh,{children:A&&I(Il.div,{variants:k1(),onAnimationComplete:v,...fi,children:be("div",{children:[e.LG&&I(c_t,{onBackButtonClick:b}),I("div",{css:wl.queue,ref:l,children:I(Sxt,{containerCss:wl.queueListContainer,isPlayerQueue:!0,emptyQueueCss:wl.queueEmpty,shouldForceFocus:t.MD})})]})})}):I(aD,{})})}),be(bv.FadeInOut,{motionCss:wl.mainContainer,isVisible:!w||t.MD,children:[I("div",{css:wl.playerContainer,ref:o,children:I(n_t,{isInfoVisible:C,isQueueVisible:w&&r,onQueueClick:b})}),t.MD&&I("div",{css:wl.infoContainer,children:I(Nme,{isVisible:C})})]})]})})})},Z)},sn=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)}
646,Cxt=Number.isSafeInteger||function(t){return typeof t=="number"&&Math.abs(t)<=xxt},xxt=Number.MAX_SAFE_INTEGER||9007199254740991;let xn=function(t){return t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError",t}({}),st=function(t){return t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",t.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",t.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",t.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",t.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",t.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",t.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",t.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_PARSING_ERROR="levelParsingError",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.FRAG_GAP="fragGap",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.ASSET_LIST_LOAD_ERROR="assetListLoadError",t.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",t.ASSET_LIST_PARSING_ERROR="assetListParsingError",t.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.ATTACH_MEDIA_ERROR="attachMediaError",t.UNKNOWN="unknown",t}({}
vendor: 7,767 bytes, line 646
646),Y=function(t){return t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.MEDIA_ENDED="hlsMediaEnded",t.STALL_RESOLVED="hlsStallResolved",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFERED_TO_END="hlsBufferedToEnd",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached",t.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",t.ASSET_LIST_LOADING="hlsAssetListLoading",t.ASSET_LIST_LOADED="hlsAssetListLoaded",t.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",t.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",t.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",t.INTERSTITIAL_STARTED="hlsInterstitialStarted",t.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",t.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",t.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",t.INTERSTITIAL_ENDED="hlsInterstitialEnded",t.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",t.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",t.EVENT_CUE_ENTER="hlsEventCueEnter",t}({});var Mr={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},yn={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class _S{constructor(e,n=0,r=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=n,this.totalWeight_=r}sample(e,n){const r=Math.pow(this.alpha_,e);this.estimate_=n*(1-r)+r*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class Ixt{constructor(e,n,r,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new _S(e),this.fast_=new _S(n),this.defaultTTFB_=i,this.ttfb_=new _S(e)}update(e,n){const{slow_:r,fast_:i,ttfb_:s}=this;r.halfLife!==e&&(this.slow_=new _S(e,r.getEstimate(),r.getTotalWeight())),i.halfLife!==n&&(this.fast_=new _S(n,i.getEstimate(),i.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new _S(e,s.getEstimate(),s.getTotalWeight()))}sample(e,n){e=Math.max(e,this.minDelayMs_);const r=8*n,i=e/1e3,s=r/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const n=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(n,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function Oxt(t,e,n){return(e=Rxt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ns(){return ns=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ns.apply(null,arguments)}function QJ(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ui(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?QJ(Object(n),!0).forEach(function(r){Oxt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):QJ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Pxt(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rxt(t){var e=Pxt(t,"string");return typeof e=="symbol"?e:e+""}let Fd=class{constructor(e,n){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const r=`[${e}]:`;this.trace=Lm,this.debug=n.debug.bind(null,r),this.log=n.log.bind(null,r),this.warn=n.warn.bind(null,r),this.info=n.info.bind(null,r),this.error=n.error.bind(null,r)}};const Lm=function(){},Lxt={trace:Lm,debug:Lm,log:Lm,warn:Lm,info:Lm,error:Lm};function r6(){return ns({},Lxt)}function Dxt(t,e){const n=self.console[t];return n?n.bind(self.console,`${e?"["+e+"] ":""}[${t}] >`):Lm}function XJ(t,e,n){return e[t]?e[t].bind(e):Dxt(t,n)}const i6=r6();function kxt(t,e,n){const r=r6();if(typeof console=="object"&&t===!0||typeof t=="object"){const i=["debug","log","info","warn","error"];i.forEach(s=>{r[s]=XJ(s,t,n)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch{return r6()}i.forEach(s=>{i6[s]=XJ(s,t)})}else ns(i6,r);return r}const ji=i6;function Pv(t=!0){return typeof self>"u"?void 0:(t||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Nxt(t){return typeof self<"u"&&t===self.ManagedMediaSource}function Sve(t,e){const n=Object.keys(t),r=Object.keys(e),i=n.length,s=r.length;return!i||!s||i===s&&!n.some(a=>r.indexOf(a)===-1)}function Dc(t,e=!1){if(typeof TextDecoder<"u"){const u=new TextDecoder("utf-8").decode(t);if(e){const c=u.indexOf("\0");return c!==-1?u.substring(0,c):u}return u.replace(/\0/g,"")}const n=t.length;let r,i,s,a="",o=0;for(;o<n;){if(r=t[o++],r===0&&e)return a;
vendor: 28,649 bytes, line 646
646if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:i=t[o++],a+=String.fromCharCode((r&31)<<6|i&63);break;case 14:i=t[o++],s=t[o++],a+=String.fromCharCode((r&15)<<12|(i&63)<<6|(s&63)<<0);break}}return a}function el(t){let e="";for(let n=0;n<t.length;n++){let r=t[n].toString(16);r.length<2&&(r="0"+r),e+=r}return e}function Eve(t){return Uint8Array.from(t.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function Mxt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var C5={exports:{}},JJ;function Fxt(){return JJ||(JJ=1,function(t,e){(function(n){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,u,c){if(c=c||{},l=l.trim(),u=u.trim(),!u){if(!c.alwaysNormalize)return l;var d=o.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=o.normalizePath(d.path),o.buildURLFromParts(d)}var f=o.parseURL(u);if(!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return c.alwaysNormalize?(f.path=o.normalizePath(f.path),o.buildURLFromParts(f)):u;var h=o.parseURL(l);if(!h)throw new Error("Error trying to parse base URL.");if(!h.netLoc&&h.path&&h.path[0]!=="/"){var g=i.exec(h.path);h.netLoc=g[1],h.path=g[2]}h.netLoc&&!h.path&&(h.path="/");var v={scheme:h.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(v.netLoc=h.netLoc,f.path[0]!=="/"))if(!f.path)v.path=h.path,f.params||(v.params=h.params,f.query||(v.query=h.query));else{var b=h.path,S=b.substring(0,b.lastIndexOf("/")+1)+f.path;v.path=o.normalizePath(S)}return v.path===null&&(v.path=c.alwaysNormalize?o.normalizePath(f.path):f.path),o.buildURLFromParts(v)},parseURL:function(l){var u=r.exec(l);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(s,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};t.exports=o})()}(C5)),C5.exports}var DH=Fxt();class kH{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var ls={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class Tve{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,Bxt(this,"stats")}setByteRange(e,n){const r=e.split("@",2);let i;r.length===1?i=(n==null?void 0:n.byteRangeEndOffset)||0:i=parseInt(r[1]),this._byteRange=[i,parseInt(r[0])+i]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[ls.AUDIO]:null,[ls.VIDEO]:null,[ls.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new kH),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=DH.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[ls.AUDIO]=null,e[ls.VIDEO]=null,e[ls.AUDIOVIDEO]=null}}function Da(t){return t.sn!=="initSegment"}class x5 extends Tve{constructor(e,n){super(n),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],n=this.byteRange[1];if(sn(e)&&sn(n))return n-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){var e;const{levelkeys:n}=this;if(!n||n.NONE)return null;if(n.identity)this._decryptdata||(this._decryptdata=n.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const r=Object.keys(n);if(r.length===1){const i=this._decryptdata=n[r[0]]||null;i&&(this._decryptdata=i.getDecryptData(this.sn,n))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=sn(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var n;const r=Object.keys(this.levelkeys),i=r.length;if(i>1||i===1&&(n=this.levelkeys[r[0]])!=null&&n.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!sn(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Da(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){const n=this.levelkeys;if(n){var r;const i=n[e];i&&!((r=this._decryptdata)!=null&&r.keyId)&&(this._decryptdata=i.getDecryptData(this.sn,n))}}abortRequests(){var e,n;(e=this.loader)==null||e.abort(),(n=this.keyLoader)==null||n.abort()}setElementaryStreamInfo(e,n,r,i,s,a=!1){const{elementaryStreams:o}=this,l=o[e];if(!l){o[e]={startPTS:n,endPTS:r,startDTS:i,endDTS:s,partial:a};return}l.startPTS=Math.min(l.startPTS,n),l.endPTS=Math.max(l.endPTS,r),l.startDTS=Math.min(l.startDTS,i),l.endDTS=Math.max(l.endDTS,s)}}class $xt extends Tve{constructor(e,n,r,i,s){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=n,this.index=i;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,s),s&&(this.fragOffset=s.fragOffset+s.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function Ave(t,e){const n=Object.getPrototypeOf(t);if(n){const r=Object.getOwnPropertyDescriptor(n,e);return r||Ave(n,e)}}function Bxt(t,e){const n=Ave(t,e);n&&(n.enumerable=!0,Object.defineProperty(t,e,n))}const eee=Math.pow(2,32)-1,Uxt=[].push,wve={video:1,audio:2,id3:3,text:4};function ao(t){return String.fromCharCode.apply(null,t)}function _ve(t,e){const n=t[e]<<8|t[e+1];return n<0?65536+n:n}function nr(t,e){const n=Cve(t,e);return n<0?4294967296+n:n}function tee(t,e){let n=nr(t,e);return n*=Math.pow(2,32),n+=nr(t,e+4),n}function Cve(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function Vxt(t){const e=t.byteLength;for(let n=0;n<e;){const r=nr(t,n);if(r>8&&t[n+4]===109&&t[n+5]===111&&t[n+6]===111&&t[n+7]===102)return!0;n=r>1?n+r:e}return!1}function Lr(t,e){const n=[];if(!e.length)return n;const r=t.byteLength;for(let i=0;i<r;){const s=nr(t,i),a=ao(t.subarray(i+4,i+8)),o=s>1?i+s:r;if(a===e[0])if(e.length===1)n.push(t.subarray(i+8,o));else{const l=Lr(t.subarray(i+8,o),e.slice(1));l.length&&Uxt.apply(n,l)}i=o}return n}function Hxt(t){const e=[],n=t[0];let r=8;const i=nr(t,r);r+=4;let s=0,a=0;n===0?(s=nr(t,r),a=nr(t,r+4),r+=8):(s=tee(t,r),a=tee(t,r+8),r+=16),r+=2;let o=t.length+a;const l=_ve(t,r);r+=2;for(let u=0;u<l;u++){let c=r;const d=nr(t,c);c+=4;const f=d&2147483647;if((d&2147483648)>>>31===1)return ji.warn("SIDX has hierarchical references (not supported)"),null;const g=nr(t,c);c+=4,e.push({referenceSize:f,subsegmentDuration:g,info:{duration:g/i,start:o,end:o+f-1}}),o+=f,c+=4,r=c}return{earliestPresentationTime:s,timescale:i,version:n,referencesCount:l,references:e}}function xve(t){const e=[],n=Lr(t,["moov","trak"]);for(let i=0;i<n.length;i++){const s=n[i],a=Lr(s,["tkhd"])[0];if(a){let o=a[0];const l=nr(a,o===0?12:20),u=Lr(s,["mdia","mdhd"])[0];if(u){o=u[0];const c=nr(u,o===0?12:20),d=Lr(s,["mdia","hdlr"])[0];if(d){const f=ao(d.subarray(8,12)),h={soun:ls.AUDIO,vide:ls.VIDEO}[f],g=Lr(s,["mdia","minf","stbl","stsd"])[0],v=jxt(g);h?(e[l]={timescale:c,type:h,stsd:v},e[h]=Ui({timescale:c,id:l},v)):e[l]={timescale:c,type:f,stsd:v}}}}}return Lr(t,["moov","mvex","trex"]).forEach(i=>{const s=nr(i,4),a=e[s];a&&(a.default={duration:nr(i,12),flags:nr(i,20)})}),e}function jxt(t){const e=t.subarray(8),n=e.subarray(86),r=ao(e.subarray(4,8));let i=r,s;const a=r==="enca"||r==="encv";if(a){const u=Lr(e,[r])[0].subarray(r==="enca"?28:78);Lr(u,["sinf"]).forEach(d=>{const f=Lr(d,["schm"])[0];if(f){const h=ao(f.subarray(4,8));if(h==="cbcs"||h==="cenc"){const g=Lr(d,["frma"])[0];g&&(i=ao(g))}}})}const o=i;switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const l=Lr(n,["avcC"])[0];l&&l.length>3&&(i+="."+HO(l[1])+HO(l[2])+HO(l[3]),s=VO(o==="avc1"?"dva1":"dvav",n));break}case"mp4a":{const l=Lr(e,[r])[0],u=Lr(l.subarray(28),["esds"])[0];if(u&&u.length>7){let c=4;if(u[c++]!==3)break;c=I5(u,c),c+=2;const d=u[c++];if(d&128&&(c+=2),d&64&&(c+=u[c++]),u[c++]!==4)break;c=I5(u,c);const f=u[c++];if(f===64)i+="."+HO(f);else break;if(c+=12,u[c++]!==5)break;c=I5(u,c);const h=u[c++];let g=(h&248)>>3;g===31&&(g+=1+((h&7)<<3)+((u[c]&224)>>5)),i+="."+g}break}case"hvc1":case"hev1":{const l=Lr(n,["hvcC"])[0];if(l&&l.length>12){const u=l[1],c=["","A","B","C"][u>>6],d=u&31,f=nr(l,2),h=(u&32)>>5?"H":"L",g=l[12],v=l.subarray(6,12);i+="."+c+d,i+="."+zxt(f).toString(16).toUpperCase(),i+="."+h+g;let b="";for(let S=v.length;S--;){const A=v[S];(A||b)&&(b="."+A.toString(16).toUpperCase()+b)}i+=b}s=VO(o=="hev1"?"dvhe":"dvh1",n);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{i=VO(i,n)||i;break}case"vp09":{const l=Lr(n,["vpcC"])[0];if(l&&l.length>6){const u=l[4],c=l[5],d=l[6]>>4&15;i+="."+Th(u)+"."+Th(c)+"."+Th(d)}break}case"av01":{const l=Lr(n,["av1C"])[0];if(l&&l.length>2){const u=l[1]>>>5,c=l[1]&31,d=l[2]>>>7?"H":"M",f=(l[2]&64)>>6,h=(l[2]&32)>>5,g=u===2&&f?h?12:10:f?10:8,v=(l[2]&16)>>4,b=(l[2]&8)>>3,S=(l[2]&4)>>2,A=l[2]&3;i+="."+u+"."+Th(c)+d+"."+Th(g)+"."+v+"."+b+S+A+"."+Th(1)+"."+Th(1)+"."+Th(1)+"."+0,s=VO("dav1",n)}break}}return{codec:i,encrypted:a,supplemental:s}}function VO(t,e){const n=Lr(e,["dvvC"]),r=n.length?n[0]:Lr(e,["dvcC"])[0];if(r){const i=r[2]>>1&127,s=r[2]<<5&32|r[3]>>3&31;return t+"."+Th(i)+"."+Th(s)}}function zxt(t){let e=0;for(let n=0;n<32;n++)e|=(t>>n&1)<<31-n;return e>>>0}function I5(t,e){const n=e+5;for(;t[e++]&128&&e<n;);return e}function HO(t){return("0"+t.toString(16).toUpperCase()).slice(-2)}function Th(t){return(t<10?"0":"")+t}function Gxt(t,e){if(!t||!e)return;const n=e.keyId;n&&e.isCommonEncryption&&Ive(t,(r,i)=>{const s=r.subarray(8,24);s.some(a=>a!==0)||(ji.log(`[eme] Patching keyId in 'enc${i?"a":"v"}>sinf>>tenc' box: ${el(s)} -> ${el(n)}`),r.set(n,8))})}function Wxt(t){const e=[];return Ive(t,n=>e.push(n.subarray(8,24))),e}function Ive(t,e){Lr(t,["moov","trak"]).forEach(r=>{const i=Lr(r,["mdia","minf","stbl","stsd"])[0];if(!i)return;const s=i.subarray(8);let a=Lr(s,["enca"]);const o=a.length>0;o||(a=Lr(s,["encv"])),a.forEach(l=>{const u=o?l.subarray(28):l.subarray(78);Lr(u,["sinf"]).forEach(d=>{const f=Ove(d);f&&e(f,o)})})})}function Ove(t){const e=Lr(t,["schm"])[0];if(e){const n=ao(e.subarray(4,8));if(n==="cbcs"||n==="cenc"){const r=Lr(t,["schi","tenc"])[0];if(r)return r}}}function qxt(t,e,n){const r={},i=Lr(t,["moof","traf"]);for(let s=0;s<i.length;s++){const a=i[s],o=Lr(a,["tfhd"])[0],l=nr(o,4),u=e[l];if(!u)continue;r[l]||(r[l]={start:NaN,duration:0,sampleCount:0,timescale:u.timescale,type:u.type});const c=r[l],d=Lr(a,["tfdt"])[0];if(d){const w=d[0];let x=nr(d,4);w===1&&(x===eee?n.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(x*=eee+1,x+=nr(d,8))),sn(x)&&(!sn(c.start)||x<c.start)&&(c.start=x)}const f=u.default,h=nr(o,0)|(f==null?void 0:f.flags);let g=(f==null?void 0:f.duration)||0;h&8&&(h&2?g=nr(o,12):g=nr(o,8));const v=Lr(a,["trun"]);let b=c.start||0,S=0,A=g;for(let w=0;w<v.length;w++){const x=v[w],P=nr(x,4),N=c.sampleCount;c.sampleCount+=P;const k=x[3]&1,U=x[3]&4,H=x[2]&1,B=x[2]&2,q=x[2]&4,Z=x[2]&8;let C=8,L=P;for(k&&(C+=4),U&&P&&(!(x[C+1]&1)&&c.keyFrameIndex===void 0&&(c.keyFrameIndex=N),C+=4,H?(A=nr(x,C),C+=4):A=g,B&&(C+=4),Z&&(C+=4),b+=A,S+=A,L--);L--;)H?(A=nr(x,C),C+=4):A=g,B&&(C+=4),q&&(x[C+1]&1||c.keyFrameIndex===void 0&&(c.keyFrameIndex=c.sampleCount-(L+1),c.keyFrameStart=b),C+=4),Z&&(C+=4),b+=A,S+=A;!S&&g&&(S+=g*P)}c.duration+=S}if(!Object.keys(r).some(s=>r[s].duration)){let s=1/0,a=0;const o=Lr(t,["sidx"]);for(let l=0;l<o.length;l++){const u=Hxt(o[l]);if(u!=null&&u.references){s=Math.min(s,u.earliestPresentationTime/u.timescale);const c=u.references.reduce((d,f)=>d+f.info.duration||0,0);a=Math.max(a,c+u.earliestPresentationTime/u.timescale)}}a&&sn(a)&&Object.keys(r).forEach(l=>{r[l].duration||(r[l].duration=a*r[l].timescale-r[l].start)})}return r}function Kxt(t){const e={valid:null,remainder:null},n=Lr(t,["moof"]);if(n.length<2)return e.remainder=t,e;const r=n[n.length-1];return e.valid=t.slice(0,r.byteOffset-8),e.remainder=t.slice(r.byteOffset-8),e}function Pd(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function nee(t,e){const n=[],r=e.samples,i=e.timescale,s=e.id;let a=!1;return Lr(r,["moof"]).map(l=>{const u=l.byteOffset-8;Lr(l,["traf"]).map(d=>{const f=Lr(d,["tfdt"]).map(h=>{const g=h[0];let v=nr(h,4);return g===1&&(v*=Math.pow(2,32),v+=nr(h,8)),v/i})[0];return f!==void 0&&(t=f),Lr(d,["tfhd"]).map(h=>{const g=nr(h,4),v=nr(h,0)&16777215,b=(v&1)!==0,S=(v&2)!==0,A=(v&8)!==0;let w=0;const x=(v&16)!==0;let P=0;const N=(v&32)!==0;let k=8;g===s&&(b&&(k+=8),S&&(k+=4),A&&(w=nr(h,k),k+=4),x&&(P=nr(h,k),k+=4),N&&(k+=4),e.type==="video"&&(a=PN(e.codec)),Lr(d,["trun"]).map(U=>{const H=U[0],B=nr(U,0)&16777215,q=(B&1)!==0;let Z=0;const C=(B&4)!==0,L=(B&256)!==0;let V=0;const j=(B&512)!==0;let X=0;const G=(B&1024)!==0,ie=(B&2048)!==0;let ae=0;const ue=nr(U,4);let Q=8;q&&(Z=nr(U,Q),Q+=4),C&&(Q+=4);let de=Z+u;for(let le=0;le<ue;le++){if(L?(V=nr(U,Q),Q+=4):V=w,j?(X=nr(U,Q),Q+=4):X=P,G&&(Q+=4),ie&&(H===0?ae=nr(U,Q):ae=Cve(U,Q),Q+=4),e.type===ls.VIDEO){let ye=0;for(;ye<X;){const fe=nr(r,de);if(de+=4,Yxt(a,r[de])){const We=r.subarray(de,de+fe);NH(We,a?2:1,t+ae/i,n)}de+=fe,ye+=fe+4}}t+=V/i}}))})})}),n}function PN(t){if(!t)return!1;const e=t.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Yxt(t,e){if(t){const n=e>>1&63;return n===39||n===40}else return(e&31)===6}function NH(t,e,n,r){const i=Pve(t);let s=0;s+=e;let a=0,o=0,l=0;for(;s<i.length;){a=0;do{if(s>=i.length)break;l=i[s++],a+=l}while(l===255);o=0;do{if(s>=i.length)break;l=i[s++],o+=l}while(l===255);const u=i.length-s;let c=s;if(o<u)s+=o;else if(o>u){ji.error(`Malformed SEI payload. ${o} is too small, only ${u} bytes left to parse.`);break}if(a===4){if(i[c++]===181){const f=_ve(i,c);if(c+=2,f===49){const h=nr(i,c);if(c+=4,h===1195456820){const g=i[c++];if(g===3){const v=i[c++],b=31&v,S=64&v,A=S?2+b*3:0,w=new Uint8Array(A);if(S){w[0]=v;for(let x=1;x<A;x++)w[x]=i[c++]}r.push({type:g,payloadType:a,pts:n,bytes:w})}}}}}else if(a===5&&o>16){const d=[];for(let g=0;g<16;g++){const v=i[c++].toString(16);d.push(v.length==1?"0"+v:v),(g===3||g===5||g===7||g===9)&&d.push("-")}const f=o-16,h=new Uint8Array(f);for(let g=0;g<f;g++)h[g]=i[c++];r.push({payloadType:a,pts:n,uuid:d.join(""),userData:Dc(h),userDataBytes:h})}}}function Pve(t){const e=t.byteLength,n=[];let r=1;for(;r<e-2;)t[r]===0&&t[r+1]===0&&t[r+2]===3?(n.push(r+2),r+=2):r++;if(n.length===0)return t;const i=e-n.length,s=new Uint8Array(i);let a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),s[r]=t[a];return s}function Zxt(t){const e=t[0];let n="",r="",i=0,s=0,a=0,o=0,l=0,u=0;if(e===0){for(;ao(t.subarray(u,u+1))!=="\0";)n+=ao(t.subarray(u,u+1)),u+=1;for(n+=ao(t.subarray(u,u+1)),u+=1;ao(t.subarray(u,u+1))!=="\0";)r+=ao(t.subarray(u,u+1)),u+=1;r+=ao(t.subarray(u,u+1)),u+=1,i=nr(t,12),s=nr(t,16),o=nr(t,20),l=nr(t,24),u=28}else if(e===1){u+=4,i=nr(t,u),u+=4;const d=nr(t,u);u+=4;const f=nr(t,u);for(u+=4,a=2**32*d+f,Cxt(a)||(a=Number.MAX_SAFE_INTEGER,ji.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=nr(t,u),u+=4,l=nr(t,u),u+=4;ao(t.subarray(u,u+1))!=="\0";)n+=ao(t.subarray(u,u+1)),u+=1;for(n+=ao(t.subarray(u,u+1)),u+=1;ao(t.subarray(u,u+1))!=="\0";)r+=ao(t.subarray(u,u+1)),u+=1;r+=ao(t.subarray(u,u+1)),u+=1}const c=t.subarray(u,t.byteLength);return{schemeIdUri:n,value:r,timeScale:i,presentationTime:a,presentationTimeDelta:s,eventDuration:o,id:l,payload:c}}function Qxt(t,...e){const n=e.length;let r=8,i=n;for(;i--;)r+=e[i].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(t,4),i=0,r=8;i<n;i++)s.set(e[i],r),r+=e[i].byteLength;return s}function Xxt(t,e,n){if(t.byteLength!==16)throw new RangeError("Invalid system id");let r,i;r=0,i=new Uint8Array;let s;r>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const a=new Uint8Array(4);return n.byteLength>0&&new DataView(a.buffer).setUint32(0,n.byteLength,!1),Qxt([112,115,115,104],new Uint8Array([r,0,0,0]),t,s,i,a,n)}function Jxt(t){const e=[];if(t instanceof ArrayBuffer){const n=t.byteLength;let r=0;for(;r+32<n;){const i=new DataView(t,r),s=eIt(i);e.push(s),r+=s.size}}return e}function eIt(t){const e=t.getUint32(0),n=t.byteOffset,r=t.byteLength;if(r<e)return{offset:n,size:r};if(t.getUint32(4)!==1886614376)return{offset:n,size:e};const s=t.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:n,size:e};const a=t.buffer,o=el(new Uint8Array(a,n+12,16));let l=null,u=null,c=0;if(s===0)c=28;else{const f=t.getUint32(28);if(!f||r<32+f*16)return{offset:n,size:e};l=[];for(let h=0;h<f;h++)l.push(new Uint8Array(a,n+32+h*16,16));c=32+f*16}if(!c)return{offset:n,size:e};const d=t.getUint32(c);return e-32<d?{offset:n,size:e}:(u=new Uint8Array(a,n+c+4,d),{version:s,systemId:o,kids:l,data:u,offset:n,size:e})}const Rve=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),z1={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function MH(t,e){const n=z1[e];return!!n&&!!n[t.slice(0,4)]}function bC(t,e,n=!0){return!t.split(",").some(r=>!FH(r,e,n))}function FH(t,e,n=!0){var r;const i=Pv(n);return(r=i==null?void 0:i.isTypeSupported(SC(t,e)))!=null?r:!1}function SC(t,e){return`${e}/mp4;codecs=${t}`}function ree(t){if(t){const e=t.substring(0,4);return z1.video[e]}return 2}function kD(t){const e=Rve();return t.split(",").reduce((n,r)=>{const s=e&&PN(r)?9:z1.video[r];return s?(s*2+n)/(n?3:2):(z1.audio[r]+n)/(n?2:1)},0)}const O5={};function tIt(t,e=!0){if(O5[t])return O5[t];const n={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[t];for(let i=0;i<n.length;i++){var r;if(FH(n[i],"audio",e))return O5[t]=n[i],n[i];if(n[i]==="mp3"&&(r=Pv(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return t}const nIt=/flac|opus|mp4a\.40\.34/i;function ND(t,e=!0){return t.replace(nIt,n=>tIt(n.toLowerCase(),e))}function rIt(t,e){const n=[];if(t){const r=t.split(",");for(let i=0;i<r.length;i++)MH(r[i],"video")||n.push(r[i])}return e&&n.push(e),n.join(",")}function GP(t,e){if(t&&(t.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(t)!==-1)&&(iee(t,"audio")||iee(t,"video")))return t;if(e){const n=e.split(",");if(n.length>1){if(t){for(let r=n.length;r--;)if(n[r].substring(0,4)===t.substring(0,4))return n[r]}return n[0]}}return e||t}function iee(t,e){return MH(t,e)&&FH(t,e)}function iIt(t){const e=t.split(",");for(let n=0;n<e.length;n++){const r=e[n].split(".");r.length>2&&r[0]==="avc1"&&(e[n]=`avc1.${parseInt(r[1]).toString(16)}${("000"+parseInt(r[2]).toString(16)).slice(-4)}`)}return e.join(",")}function sIt(t){if(t.startsWith("av01.")){const e=t.split("."),n=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=n[r-4];return e.join(".")}return t}function see(t){const e=Pv(t)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function s6(t){return t.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const aIt={supported:!0,powerEfficient:!0,smooth:!0},oIt={supported:!1,smooth:!1,powerEfficient:!1},Lve={supported:!0,configurations:[],decodingInfoResults:[aIt]};function Dve(t,e){return{supported:!1,configurations:e,decodingInfoResults:[oIt],error:t}}function lIt(t,e,n,r,i,s){const a=t.videoCodec,o=t.audioCodec?t.audioGroups:null,l=s==null?void 0:s.audioCodec,u=s==null?void 0:s.channels,c=u?parseInt(u):l?1/0:2;let d=null;if(o!=null&&o.length)try{o.length===1&&o[0]?d=e.groups[o[0]].channels:d=o.reduce((f,h)=>{if(h){const g=e.groups[h];if(!g)throw new Error(`Audio track group ${h} not found`);Object.keys(g.channels).forEach(v=>{f[v]=(f[v]||0)+g.channels[v]})}return f},{2:0})}catch{return!0}return a!==void 0&&(a.split(",").some(f=>PN(f))||t.width>1920&&t.height>1088||t.height>1920&&t.width>1088||t.frameRate>Math.max(r,30)||t.videoRange!=="SDR"&&t.videoRange!==n||t.bitrate>Math.max(i,8e6))||!!d&&sn(c)&&Object.keys(d).some(f=>parseInt(f)>c)}function kve(t,e,n,r={}){const i=t.videoCodec;if(!i&&!t.audioCodec||!n)return Promise.resolve(Lve);const s=[],a=uIt(t),o=a.length,l=cIt(t,e,o>0),u=l.length;for(let c=o||1*u||1;c--;){const d={type:"media-source"};if(o&&(d.video=a[c%o]),u){d.audio=l[c%u];const f=d.audio.bitrate;d.video&&f&&(d.video.bitrate-=f)}s.push(d)}if(i){const c=navigator.userAgent;if(i.split(",").some(d=>PN(d))&&Rve())return Promise.resolve(Dve(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${c})`),s))}return Promise.all(s.map(c=>{const d=fIt(c);return r[d]||(r[d]=n.decodingInfo(c))})).then(c=>({supported:!c.some(d=>!d.supported),configurations:s,decodingInfoResults:c})).catch(c=>({supported:!1,configurations:s,decodingInfoResults:[],error:c}))}function uIt(t){var e;const n=(e=t.videoCodec)==null?void 0:e.split(","),r=Nve(t),i=t.width||640,s=t.height||480,a=t.frameRate||30,o=t.videoRange.toLowerCase();return n?n.map(l=>{const u={contentType:SC(sIt(l),"video"),width:i,height:s,bitrate:r,framerate:a};return o!=="sdr"&&(u.transferFunction=o),u}):[]}function cIt(t,e,n){var r;const i=(r=t.audioCodec)==null?void 0:r.split(","),s=Nve(t);return i&&t.audioGroups?t.audioGroups.reduce((a,o)=>{var l;const u=o?(l=e.groups[o])==null?void 0:l.tracks:null;return u?u.reduce((c,d)=>{if(d.groupId===o){const f=parseFloat(d.channels||"");i.forEach(h=>{const g={contentType:SC(h,"audio"),bitrate:n?dIt(h,s):s};f&&(g.channels=""+f),c.push(g)})}return c},a):a},[]):[]}function dIt(t,e){if(e<=1)return 1;let n=128e3;return t==="ec-3"?n=768e3:t==="ac-3"&&(n=64e4),Math.min(e/2,n)}function Nve(t){return Math.ceil(Math.max(t.bitrate*.9,t.averageBitrate)/1e3)*1e3||1}function fIt(t){let e="";const{audio:n,video:r}=t;if(r){const i=s6(r.contentType);e+=`${i}_r${r.height}x${r.width}f${Math.ceil(r.framerate)}${r.transferFunction||"sd"}_${Math.ceil(r.bitrate/1e5)}`}if(n){const i=s6(n.contentType);e+=`${r?"_":""}${i}_c${n.channels}`}return e}const a6=["NONE","TYPE-0","TYPE-1",null];function hIt(t){return a6.indexOf(t)>-1}const MD=["SDR","PQ","HLG"];function pIt(t){return!!t&&MD.indexOf(t)>-1}var WP={No:"",Yes:"YES",v2:"v2"};function aee(t){const{canSkipUntil:e,canSkipDateRanges:n,age:r}=t,i=r<e/2;return e&&i?n?WP.v2:WP.Yes:WP.No}class oee{constructor(e,n,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=n,this.skip=r}addDirectives(e){const n=new self.URL(e);return this.msn!==void 0&&n.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&n.searchParams.set("_HLS_part",this.part.toString()),this.skip&&n.searchParams.set("_HLS_skip",this.skip),n.href}}class EC{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var n;this.supplemental=e.supplemental;const r=(n=e.supplemental)==null?void 0:n.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return lee(this._audioGroups,e)}hasSubtitleGroup(e){return lee(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,n){if(n){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(n)===-1&&r.push(n)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(n)===-1&&r.push(n)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function lee(t,e){return!e||!t?!1:t.indexOf(e)!==-1}function gIt(){if(typeof matchMedia=="function"){const t=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(t.media!==e.media)return t.matches===!0}return!1}function mIt(t,e){let n=!1,r=[];if(t&&(n=t!=="SDR",r=[t]),e){r=e.allowedVideoRanges||MD.slice(0);const i=r.join("")!=="SDR"&&!e.videoCodec;n=e.preferHDR!==void 0?e.preferHDR:i&&gIt(),n||(r=["SDR"])}return{preferHDR:n,allowedVideoRanges:r}}const vIt=t=>{const e=new WeakSet;return(n,r)=>{if(t&&(r=t(n,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},us=(t,e)=>JSON.stringify(t,vIt(e));function yIt(t,e,n,r,i){const s=Object.keys(t),a=r==null?void 0:r.channels,o=r==null?void 0:r.audioCodec,l=i==null?void 0:i.videoCodec,u=a&&parseInt(a)===2;
vendor: 5,091 bytes, line 646
646let c=!1,d=!1,f=1/0,h=1/0,g=1/0,v=1/0,b=0,S=[];const{preferHDR:A,allowedVideoRanges:w}=mIt(e,i);for(let U=s.length;U--;){const H=t[s[U]];c||(c=H.channels[2]>0),f=Math.min(f,H.minHeight),h=Math.min(h,H.minFramerate),g=Math.min(g,H.minBitrate),w.filter(q=>H.videoRanges[q]>0).length>0&&(d=!0)}f=sn(f)?f:0,h=sn(h)?h:0;const x=Math.max(1080,f),P=Math.max(30,h);g=sn(g)?g:n,n=Math.max(g,n),d||(e=void 0);const N=s.length>1;return{codecSet:s.reduce((U,H)=>{const B=t[H];if(H===U)return U;if(S=d?w.filter(q=>B.videoRanges[q]>0):[],N){if(B.minBitrate>n)return fh(H,`min bitrate of ${B.minBitrate} > current estimate of ${n}`),U;if(!B.hasDefaultAudio)return fh(H,"no renditions with default or auto-select sound found"),U;if(o&&H.indexOf(o.substring(0,4))%5!==0)return fh(H,`audio codec preference "${o}" not found`),U;if(a&&!u){if(!B.channels[a])return fh(H,`no renditions with ${a} channel sound found (channels options: ${Object.keys(B.channels)})`),U}else if((!o||u)&&c&&B.channels[2]===0)return fh(H,"no renditions with stereo sound found"),U;if(B.minHeight>x)return fh(H,`min resolution of ${B.minHeight} > maximum of ${x}`),U;if(B.minFramerate>P)return fh(H,`min framerate of ${B.minFramerate} > maximum of ${P}`),U;if(!S.some(q=>B.videoRanges[q]>0))return fh(H,`no variants with VIDEO-RANGE of ${us(S)} found`),U;if(l&&H.indexOf(l.substring(0,4))%5!==0)return fh(H,`video codec preference "${l}" not found`),U;if(B.maxScore<b)return fh(H,`max score of ${B.maxScore} < selected max of ${b}`),U}return U&&(kD(H)>=kD(U)||B.fragmentError>t[U].fragmentError)?U:(v=B.minIndex,b=B.maxScore,H)},void 0),videoRanges:S,preferHDR:A,minFramerate:h,minBitrate:g,minIndex:v}}function fh(t,e){ji.log(`[abr] start candidates with "${t}" ignored because ${e}`)}function Mve(t){return t.reduce((e,n)=>{let r=e.groups[n.groupId];r||(r=e.groups[n.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(n);const i=n.channels||"2";return r.channels[i]=(r.channels[i]||0)+1,r.hasDefault=r.hasDefault||n.default,r.hasAutoSelect=r.hasAutoSelect||n.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function bIt(t,e,n,r){return t.slice(n,r+1).reduce((i,s,a)=>{if(!s.codecSet)return i;const o=s.audioGroups;let l=i[s.codecSet];l||(i[s.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,s.bitrate);const u=Math.min(s.height,s.width);return l.minHeight=Math.min(l.minHeight,u),l.minFramerate=Math.min(l.minFramerate,s.frameRate),l.minIndex=Math.min(l.minIndex,a),l.maxScore=Math.max(l.maxScore,s.score),l.fragmentError+=s.fragmentError,l.videoRanges[s.videoRange]=(l.videoRanges[s.videoRange]||0)+1,o&&o.forEach(c=>{if(!c)return;const d=e.groups[c];d&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?d.hasDefault:d.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(d.channels).forEach(f=>{l.channels[f]=(l.channels[f]||0)+d.channels[f]}))}),i},{})}function uee(t){if(!t)return t;const{lang:e,assocLang:n,characteristics:r,channels:i,audioCodec:s}=t;return{lang:e,assocLang:n,characteristics:r,channels:i,audioCodec:s}}function Uh(t,e,n){if("attrs"in t){const r=e.indexOf(t);if(r!==-1)return r}for(let r=0;r<e.length;r++){const i=e[r];if(O0(t,i,n))return r}return-1}function O0(t,e,n){const{groupId:r,name:i,lang:s,assocLang:a,default:o}=t,l=t.forced;return(r===void 0||e.groupId===r)&&(i===void 0||e.name===i)&&(s===void 0||SIt(s,e.lang))&&(s===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(l===void 0||e.forced===l)&&(!("characteristics"in t)||EIt(t.characteristics||"",e.characteristics))&&(n===void 0||n(t,e))}function SIt(t,e="--"){return t.length===e.length?t===e:t.startsWith(e)||e.startsWith(t)}function EIt(t,e=""){const n=t.split(","),r=e.split(",");return n.length===r.length&&!n.some(i=>r.indexOf(i)===-1)}function jy(t,e){const{audioCodec:n,channels:r}=t;return(n===void 0||(e.audioCodec||"").substring(0,4)===n.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function TIt(t,e,n,r,i){const s=e[r],o=e.reduce((f,h,g)=>{const v=h.uri;return(f[v]||(f[v]=[])).push(g),f},{})[s.uri];o.length>1&&(r=Math.max.apply(Math,o));const l=s.videoRange,u=s.frameRate,c=s.codecSet.substring(0,4),d=cee(e,r,f=>{if(f.videoRange!==l||f.frameRate!==u||f.codecSet.substring(0,4)!==c)return!1;const h=f.audioGroups,g=n.filter(v=>!h||h.indexOf(v.groupId)!==-1);return Uh(t,g,i)>-1});return d>-1?d:cee(e,r,f=>{const h=f.audioGroups,g=n.filter(v=>!h||h.indexOf(v.groupId)!==-1);return Uh(t,g,i)>-1})}function cee(t,e,n){for(let r=e;r>-1;r--)if(n(t[r]))return r;for(let r=e+1;r<t.length;r++)if(n(t[r]))return r;return-1}function FD(t,e){var n;return!!t&&t!==((n=e.loadLevelObj)==null?void 0:n.uri)}class AIt extends Fd{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.co
vendor: 6,212 bytes, lines 646-656
646decTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=n=>{var r;const{fragCurrent:i,partCurrent:s,hls:a}=this,{autoLevelEnabled:o,media:l}=a;if(!i||!l)return;const u=performance.now(),c=s?s.stats:i.stats,d=s?s.duration:i.duration,f=u-c.loading.start,h=a.minAutoLevel,g=i.level,v=this._nextAutoLevel;if(c.aborted||c.loaded&&c.loaded===c.total||g<=h){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const b=v>-1&&v!==g,S=!!n||b;if(!S&&(l.paused||!l.playbackRate||!l.readyState))return;const A=a.mainForwardBufferInfo;if(!S&&A===null)return;const w=this.bwEstimator.getEstimateTTFB(),x=Math.abs(l.playbackRate);if(f<=Math.max(w,1e3*(d/(x*2))))return;const P=A?A.len/x:0,N=c.loading.first?c.loading.first-c.loading.start:-1,k=c.loaded&&N>-1,U=this.getBwEstimate(),H=a.levels,B=H[g],q=Math.max(c.loaded,Math.round(d*(i.bitrate||B.averageBitrate)/8));let Z=k?f-N:f;Z<1&&k&&(Z=Math.min(f,c.loaded*8/U));const C=k?c.loaded*1e3/Z:0,L=w/1e3,V=C?(q-c.loaded)/C:q*8/U+L;if(V<=P)return;const j=C?C*8:U,X=((r=(n==null?void 0:n.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,G=this.hls.config.abrBandWidthUpFactor;let ie=Number.POSITIVE_INFINITY,ae;for(ae=g-1;ae>h;ae--){const le=H[ae].maxBitrate,ye=!H[ae].details||X;if(ie=this.getTimeToLoadFrag(L,j,d*le,ye),ie<Math.min(P,d+L))break}if(ie>=V||ie>d*10)return;k?this.bwEstimator.sample(f-Math.min(w,N),c.loaded):this.bwEstimator.sampleTTFB(f);const ue=H[ae].maxBitrate;this.getBwEstimate()*G>ue&&this.resetEstimator(ue);const Q=this.findBestLevel(ue,h,ae,0,P,1,1);Q>-1&&(ae=Q),this.warn(`Fragment ${i.sn}${s?" part "+s.index:""} of level ${g} is loading too slowly;
647      Fragment duration: ${i.duration.toFixed(3)}
648      Time to underbuffer: ${P.toFixed(3)} s
649      Estimated load time for current fragment: ${V.toFixed(3)} s
650      Estimated load time for down switch fragment: ${ie.toFixed(3)} s
651      TTFB estimate: ${N|0} ms
652      Current BW estimate: ${sn(U)?U|0:"Unknown"} bps
653      New BW estimate: ${this.getBwEstimate()|0} bps
654      Switching to level ${ae} @ ${ue|0} bps`),a.nextLoadLevel=a.nextAutoLevel=ae,this.clearTimer();const de=()=>{if(this.clearTimer(),this.fragCurrent===i&&this.hls.loadLevel===ae&&ae>0){const le=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${ae>0?"and switching down":""}
655      Fragment duration: ${i.duration.toFixed(3)} s
656      Time to underbuffer: ${le.toFixed(3)} s`),i.abortRequests(),this.fragCurrent=this.partCurrent=null,ae>h){let ye=this.findBestLevel(this.hls.levels[h].bitrate,h,ae,0,le,1,1);ye===-1&&(ye=h),this.hls.nextLoadLevel=this.hls.nextAutoLevel=ye,this.resetEstimator(this.hls.levels[ye].bitrate)}}};b||V>ie*2?de():this.timer=self.setInterval(de,ie*1e3),a.trigger(Y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:s,stats:c})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new Ixt(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.FRAG_LOADING,this.onFragLoading,this),e.on(Y.FRAG_LOADED,this.onFragLoaded,this),e.on(Y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(Y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.FRAG_LOADING,this.onFragLoading,this),e.off(Y.FRAG_LOADED,this.onFragLoaded,this),e.off(Y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(Y.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,n){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,n){const r=n.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var i;this.fragCurrent=r,this.partCurrent=(i=n.part)!=null?i:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,n){this.clearTimer()}onError(e,n){if(!n.fatal)switch(n.details){case st.BUFFER_ADD_CODEC_ERROR:case st.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case st.FRAG_LOAD_TIMEOUT:{const r=n.frag,{fragCurrent:i,partCurrent:s}=this;if(r&&i&&r.sn===i.sn&&r.level===i.level){const a=performance.now(),o=s?s.stats:r.stats,l=a-o.loading.start,u=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&u>-1){const d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(l-Math.min(d,u),o.loaded)}else this.bwEstimator.sampleTTFB(l)}break}}}getTimeToLoadFrag(e,n,r,i){const s=e+r/n,a=i?e+this.lastLevelLoadSec:0;return s+a}onLevelLoaded(e,n){const r=this.hls.config,{loading:i}=n.stats,s=i.end-i.first;sn(s)&&(this.lastLevelLoadSec=s/1e3),n.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(n.levelInfo)}onFragLoaded(e,{frag:n,part:r}){const i=r?r.stats:n.stats;if(n.type===yn.MAIN&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(n)){if
vendor: 1,907 bytes, line 656
656(this.clearTimer(),n.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const s=r?r.duration:n.duration,a=this.hls.levels[n.level],o=(a.loaded?a.loaded.bytes:0)+i.loaded,l=(a.loaded?a.loaded.duration:0)+s;a.loaded={bytes:o,duration:l},a.realBitrate=Math.round(8*o/l)}if(n.bitrateTest){const s={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(Y.FRAG_BUFFERED,s),n.bitrateTest=!1}else this.lastLoadedFragLevel=n.level}}onFragBuffered(e,n){const{frag:r,part:i}=n,s=i!=null&&i.stats.loaded?i.stats:r.stats;if(s.aborted||this.ignoreFragment(r))return;const a=s.parsing.end-s.loading.start-Math.min(s.loading.first-s.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,s.loaded),s.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==yn.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:n}=this.hls,r=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,s=this.findBestLevel(r,n,e,0,i,1,1);if(s>-1)return s;const a=this.hls.firstLevel,o=Math.min(Math.max(a,n),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!i||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const s=r&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const a=this.hls.levels;if(a.length>Math.max(e,s)&&a[e].loadError<=a[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}
656_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:n,hls:r}=this;if(r.levels.length<=1)return r.loadLevel;const{maxAutoLevel:i,config:s,minAutoLevel:a}=r,o=n?n.duration:e?e.duration:0,l=this.getBwEstimate(),u=this.getStarvationDelay();let c=s.abrBandWidthFactor,d=s.abrBandWidthUpFactor;if(u){const b=this.findBestLevel(l,a,i,u,0,c,d);if(b>=0)return this.rebufferNotice=-1,b}let f=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay;if(!u){const b=this.bitrateTestDelay;b&&(f=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-b,this.info(`bitrate test took ${Math.round(1e3*b)}ms, set first fragment max fetchDuration to ${Math.round(1e3*f)} ms`),c=d=1)}const h=this.findBestLevel(l,a,i,u,f,c,d);if(this.rebufferNotice!==h&&(this.rebufferNotice=h,this.info(`${u?"rebuffering expected":"buffer is empty"}, optimal quality level ${h}`)),h>-1)return h;const g=r.levels[a],v=r.loadLevelObj;return v&&(g==null?void 0:g.bitrate)<v.bitrate?a:r.loadLevel}getStarvationDelay(){const e=this.hls,n=e.media;if(!n)return 1/0;const r=n&&n.playbackRate!==0?Math.abs(n.playbackRate):1,i=e.mainForwardBufferInfo;return(i?i.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,n,r,i,s,a,o){var l;const u=i+s,c=this.lastLoadedFragLevel,d=c===-1?this.hls.firstLevel:c,{fragCurrent:f,partCurrent:h}=this,{levels:g,allAudioTracks:v,loadLevel:b,config:S}=this.hls;if(g.length===1)return 0;const A=g[d],w=!!((l=this.hls.latestLevelDetails)!=null&&l.live),x=b===-1||c===-1;let P,N="SDR",k=(A==null?void 0:A.frameRate)||0;const{audioPreference:U,videoPreference:H}=S,B=this.audioTracksByGroup||(this.audioTracksByGroup=Mve(v));let q=-1;if(x){if(this.firstSelection!==-1)return this.firstSelection;const j=this.codecTiers||(this.codecTiers=bIt(g,B,n,r)),X=yIt(j,N,e,U,H),{codecSet:G,videoRanges:ie,minFramerate:ae,minBitrate:ue,minIndex:Q,preferHDR:de}=X;q=Q,P=G,N=de?ie[ie.length-1]:ie[0],k=ae,e=Math.max(e,ue),this.log(`picked start tier ${us(X)}`)}else P=A==null?void 0:A.codecSet,N=A==null?void 0:A.videoRange;const Z=h?h.duration:f?f.duration:0,C=this.bwEstimator.getEstimateTTFB()/1e3,L=[];for(let j=r;j>=n;j--){var V;const X=g[j],G=j>d;if(!X)continue;if(S.useMediaCapabilities&&!X.supportedResult&&!X.supportedPromise){const ye=navigator.mediaCapabilities;typeof(ye==null?void 0:ye.decodingInfo)=="function"&&lIt(X,B,N,k,e,U)?(X.supportedPromise=kve(X,B,ye,this.supportedCache),X.supportedPromise.then(fe=>{if(!this.hls)return;X.supportedResult=fe;const We=this.hls.levels,Le=We.indexOf(X);fe.error?this.warn(`MediaCapabilities decodingInfo error: "${fe.error}" for level ${Le} ${us(fe)}`):fe.supported?fe.decodingInfoResults.some(Ve=>Ve.smooth===!1||Ve.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Le} not smooth or powerEfficient: ${us(fe)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Le} ${us(fe)}`),Le>-1&&We.length>1&&(this.log(`Removing unsupported level ${Le}`),this.hls.removeLevel(Le),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(fe=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${fe}`)})):X.supportedResult=Lve}if((P&&X.codecSet!==P||N&&X.videoRange!==N||G&&k>X.frameRate||!G&&k>0&&k<X.frameRate||(V=X.supportedResult)!=null&&(V=V.decodingInfoResults)!=null&&V.some(ye=>ye.smooth===!1))&&(!x||j!==q)){L.push(j);continue}const ie=X.details,ae=(h?ie==null?void 0:ie.partTarget:ie==null?void 0:ie.averagetargetduration)||Z;let ue;G?ue=o*e:ue=a*e;const Q=Z&&i>=Z*2&&s===0?X.averageBitrate:X.maxBitrate,de=this.getTimeToLoadFrag(C,ue,Q*ae,ie===void 0);if(ue>=Q&&(j===c||X.loadError===0&&X.fragmentError===0)&&(de<=C||!sn(de)||w&&!this.bitrateTestDelay||de<u)){const ye=this.forcedAutoLevel;return j!==b&&(ye===-1||ye!==b)&&(L.length&&this.trace(`Skipped level(s) ${L.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${g[L[0]].codecs}" ${g[L[0]].videoRange}; not compatible with "${P}" ${N}`),this.info(`switch candidate:${d}->${j} adjustedbw(${Math.round(ue)})-bitrate=${Math.round(ue-Q)} ttfb:${C.toFixed(1)} avgDuration:${ae.toFixed(1)} maxFetchDuration:${u.toFixed(1)} fetchDuration:${de.toFixed(1)}
656 firstSelection:${x} codecSet:${X.codecSet} videoRange:${X.videoRange} hls.loadLevel:${b}`)),x&&(this.firstSelection=j),j}}return-1}set nextAutoLevel(e){const n=this.deriveNextAutoLevel(e);this._nextAutoLevel!==n&&(this.nextAutoLevelKey="",this._nextAutoLevel=n)}deriveNextAutoLevel(e){const{maxAutoLevel:n,minAutoLevel:r}=this.hls;return Math.min(Math.max(e,r),n)}}const Fve={search:function(t,e){let n=0,r=t.length-1,i=null,s=null;for(;n<=r;){i=(n+r)/2|0,s=t[i];const a=e(s);if(a>0)n=i+1;else if(a<0)r=i-1;else return s}return null}};function wIt(t,e,n){if(e===null||!Array.isArray(t)||!t.length||!sn(e))return null;const r=t[0].programDateTime;if(e<(r||0))return null;const i=t[t.length-1].endProgramDateTime;if(e>=(i||0))return null;for(let s=0;s<t.length;++s){const a=t[s];if(CIt(e,n,a))return a}return null}function ob(t,e,n=0,r=0,i=.005){let s=null;if(t){s=e[1+t.sn-e[0].sn]||null;const o=t.endDTS-n;o>0&&o<15e-7&&(n+=15e-7),s&&t.level!==s.level&&s.end<=t.end&&(s=e[2+t.sn-e[0].sn]||null)}else n===0&&e[0].start===0&&(s=e[0]);if(s&&((!t||t.level===s.level)&&dee(n,r,s)===0||_It(s,t,Math.min(i,r))))return s;const a=Fve.search(e,dee.bind(null,n,r));return a&&(a!==t||!s)?a:s}function _It(t,e,n){if(e&&e.start===0&&e.level<t.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((i,s)=>(s[0]==="INF"&&(i+=parseFloat(s[1])),i),n);return t.start<=r}return!1}function dee(t=0,e=0,n){if(n.start<=t&&n.start+n.duration>t)return 0;const r=Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=t?1:n.start-r>t&&n.start?-1:0}function CIt(t,e,n){const r=Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0))*1e3;return(n.endProgramDateTime||0)-r>t}function $ve(t,e,n){if(t&&t.startCC<=e&&t.endCC>=e){let r=t.fragments;const{fragmentHint:i}=t;i&&(r=r.concat(i));let s;return Fve.search(r,a=>a.cc<e?1:a.cc>e?-1:(s=a,a.end<=n?1:a.start>n?-1:0)),s||null}return null}function $D(t){switch(t.details){case st.FRAG_LOAD_TIMEOUT:case st.KEY_LOAD_TIMEOUT:case st.LEVEL_LOAD_TIMEOUT:case st.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Bve(t){return t.details.startsWith("key")}function Uve(t){return Bve(t)&&!!t.frag&&!t.frag.decryptdata}function fee(t,e){const n=$D(e);return t.default[`${n?"timeout":"error"}Retry`]}function $H(t,e){const n=t.backoff==="linear"?1:Math.pow(2,e);return Math.min(n*t.retryDelayMs,t.maxRetryDelayMs)}function hee(t){return Ui(Ui({},t),{errorRetry:null,timeoutRetry:null})}function BD(t,e,n,r){if(!t)return!1;const i=r==null?void 0:r.code,s=e<t.maxNumRetry&&(xIt(i)||!!n);return t.shouldRetry?t.shouldRetry(t,e,n,r,s):s}function xIt(t){return o6(t)||!!t&&(t<400||t>499)}function o6(t){return t===0&&navigator.onLine===!1}var Jo={DoNothing:0,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,RetryRequest:5},dc={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4};class IIt extends Fd{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(Y.ERROR,this.onError,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Y.ERROR,this.onError,this),e.off(Y.ERROR,this.onErrorOut,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===yn.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const n=this.hls,r=n.currentLevel;return(e=n.loadLevelObj)!=null&&e.details||r===-1?n.loadLevel:r}variantHasKey(e,n){if(e){var r;if((r=e.details)!=null&&r.hasKey(n))return!0;const i=e.audioGroups;if(i)return this.hls.allAudioTracks.filter(a=>i.indexOf(a.groupId)>=0).some(a=>{var o;return(o=a.details)==null?void 0:o.hasKey(n)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,n){var r;if(n.fatal)return;const i=this.hls,s=n.context;switch(n.details){case st.FRAG_LOAD_ERROR:case st.FRAG_LOAD_TIMEOUT:case st.KEY_LOAD_ERROR:case st.KEY_LOAD_TIMEOUT:n.errorAction=this.getFragRetryOrSwitchAction(n);return;case st.FRAG_PARSING_ERROR:if((r=n.frag)!=null&&r.gap){n.errorAction=BE();return}case st.FRAG_GAP:case st.FRAG_DECRYPT_ERROR:{n.errorAction=this.getFragRetryOrSwitchAction(n),n.errorAction.action=Jo.SendAlternateToPenaltyBox;return}case st.LEVEL_EMPTY_ERROR:case st.LEVEL_PARSING_ERROR:{var a;const l=n.parent===yn.MAIN?n.level:i.loadLevel;n.details===st.LEVEL_EMPTY_ERROR&&((a=n.context)!=null&&(a=a.levelDetails)!=null&&a.live)?n.errorAction=this.getPlaylistRetryOrSwitchAction(n,l):(n.levelRetry=!1,n.errorAction=this.getLevelSwitchAction(n,l))}return;case st.LEVEL_LOAD_ERROR:case st.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(n.errorAction=this.getPlaylistRetryOrSwitchAction(n,s.level));return;case st.AUDIO_TRACK_LOAD_ERROR:case st.AUDIO_TRACK_LOAD_TIMEOUT:case st.SUBTITLE_LOAD_ERROR:case st.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const l=i.loadLevelObj;if(l&&(s.type===Mr.AUDIO_TRACK&&l.hasAudioGroup(s.groupId)||s.type===Mr.SUBTITLE_TRACK&&l.hasSubtitleGroup(s.groupId))){n.errorAction=this.getPlaylistRetryOrSwitchAction(n,i.loadLevel),n.errorAction.action=Jo.SendAlternateToPenaltyBox,n.errorAction.flags=dc.MoveAllAlternatesMatchingHost;return}}return;case st.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:n.errorAction={action:Jo.SendAlternateToPenaltyBox,flags:dc.MoveAllAlternatesMatchingHDCP};return;case st.KEY_SYSTEM_SESSION_UPDATE_FAILED:case st.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case st.KEY_SYSTEM_NO_SESSION:n.errorAction={action:Jo.SendAlternateToPenaltyBox,flags:dc.MoveAllAlternatesMatchingKey};return;
vendor: 15,143 bytes, line 656
656case st.BUFFER_ADD_CODEC_ERROR:case st.REMUX_ALLOC_ERROR:case st.BUFFER_APPEND_ERROR:if(!n.errorAction){var o;n.errorAction=this.getLevelSwitchAction(n,(o=n.level)!=null?o:i.loadLevel)}return;case st.INTERNAL_EXCEPTION:case st.BUFFER_APPENDING_ERROR:case st.BUFFER_FULL_ERROR:case st.LEVEL_SWITCH_ERROR:case st.BUFFER_STALLED_ERROR:case st.BUFFER_SEEK_OVER_HOLE:case st.BUFFER_NUDGE_ON_STALL:n.errorAction=BE();return}n.type===xn.KEY_SYSTEM_ERROR&&(n.levelRetry=!1,n.errorAction=BE())}getPlaylistRetryOrSwitchAction(e,n){const r=this.hls,i=fee(r.config.playlistLoadPolicy,e),s=this.playlistError++;if(BD(i,s,$D(e),e.response))return{action:Jo.RetryRequest,flags:dc.None,retryConfig:i,retryCount:s};const o=this.getLevelSwitchAction(e,n);return i&&(o.retryConfig=i,o.retryCount=s),o}getFragRetryOrSwitchAction(e){const n=this.hls,r=this.getVariantLevelIndex(e.frag),i=n.levels[r],{fragLoadPolicy:s,keyLoadPolicy:a}=n.config,o=fee(Bve(e)?a:s,e),l=n.levels.reduce((c,d)=>c+d.fragmentError,0);if(i&&(e.details!==st.FRAG_GAP&&i.fragmentError++,!Uve(e)&&BD(o,l,$D(e),e.response)))return{action:Jo.RetryRequest,flags:dc.None,retryConfig:o,retryCount:l};const u=this.getLevelSwitchAction(e,r);return o&&(u.retryConfig=o,u.retryCount=l),u}getLevelSwitchAction(e,n){const r=this.hls;n==null&&(n=r.loadLevel);const i=this.hls.levels[n];if(i){var s,a;const u=e.details;i.loadError++,u===st.BUFFER_APPEND_ERROR&&i.fragmentError++;let c=-1;const{levels:d,loadLevel:f,minAutoLevel:h,maxAutoLevel:g}=r;!r.autoLevelEnabled&&!r.config.preserveManualLevelOnError&&(r.loadLevel=-1);const v=(s=e.frag)==null?void 0:s.type,S=(v===yn.AUDIO&&u===st.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(u===st.BUFFER_ADD_CODEC_ERROR||u===st.BUFFER_APPEND_ERROR))&&d.some(({audioCodec:N})=>i.audioCodec!==N),w=e.sourceBufferName==="video"&&(u===st.BUFFER_ADD_CODEC_ERROR||u===st.BUFFER_APPEND_ERROR)&&d.some(({codecSet:N,audioCodec:k})=>i.codecSet!==N&&i.audioCodec===k),{type:x,groupId:P}=(a=e.context)!=null?a:{};for(let N=d.length;N--;){const k=(N+f)%d.length;if(k!==f&&k>=h&&k<=g&&d[k].loadError===0){var o,l;const U=d[k];if(u===st.FRAG_GAP&&v===yn.MAIN&&e.frag){const H=d[k].details;if(H){const B=ob(e.frag,H.fragments,e.frag.start);if(B!=null&&B.gap)continue}}else{if(x===Mr.AUDIO_TRACK&&U.hasAudioGroup(P)||x===Mr.SUBTITLE_TRACK&&U.hasSubtitleGroup(P))continue;if(v===yn.AUDIO&&(o=i.audioGroups)!=null&&o.some(H=>U.hasAudioGroup(H))||v===yn.SUBTITLE&&(l=i.subtitleGroups)!=null&&l.some(H=>U.hasSubtitleGroup(H))||S&&i.audioCodec===U.audioCodec||w&&i.codecSet===U.codecSet||!S&&i.codecSet!==U.codecSet)continue}c=k;break}}if(c>-1&&r.loadLevel!==c)return e.levelRetry=!0,this.playlistError=0,{action:Jo.SendAlternateToPenaltyBox,flags:dc.None,nextAutoLevel:c}}return{action:Jo.SendAlternateToPenaltyBox,flags:dc.MoveAllAlternatesMatchingHost}}onErrorOut(e,n){var r;switch((r=n.errorAction)==null?void 0:r.action){case Jo.DoNothing:break;case Jo.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(n),!n.errorAction.resolved&&n.details!==st.FRAG_GAP?n.fatal=!0:/MediaSource readyState: ended/.test(n.error.message)&&(this.warn(`MediaSource ended after "${n.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break}if(n.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const n=this.hls,r=e.errorAction;if(!r)return;const{flags:i}=r,s=r.nextAutoLevel;switch(i){case dc.None:this.switchLevel(e,s);break;case dc.MoveAllAlternatesMatchingHDCP:{const l=this.getVariantLevelIndex(e.frag),u=n.levels[l],c=u==null?void 0:u.attrs["HDCP-LEVEL"];if(r.hdcpLevel=c,c==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(c){n.maxHdcpLevel=a6[a6.indexOf(c)-1],r.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${n.maxHdcpLevel}" or lower`);break}}case dc.MoveAllAlternatesMatchingKey:{const l=e.decryptdata;if(l){const u=this.hls.levels,c=u.length;for(let f=c;f--;)if(this.variantHasKey(u[f],l)){var a,o;this.log(`Banned key found in level ${f} (${u[f].bitrate}bps) or audio group "${(a=u[f].audioGroups)==null?void 0:a.join(",")}" (${(o=e.frag)==null?void 0:o.type} fragment) ${el(l.keyId||[])}`),u[f].fragmentError++,u[f].loadError++,this.log(`Removing level ${f} with key error (${e.error})`),this.hls.removeLevel(f)}const d=e.frag;if(this.hls.levels.length<c)r.resolved=!0;else if(d&&d.type!==yn.MAIN){const f=d.decryptdata;f&&!l.matches(f)&&(r.resolved=!0)}}break}}r.resolved||this.switchLevel(e,s)}switchLevel(e,n){if(n!==void 0&&e.errorAction&&(this.warn(`switching to level ${n} after ${e.details}`),this.hls.nextAutoLevel=n,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===st.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=s6(e.mimeType),i=this.hls.levels;for(let s=i.length;s--;)i[s][`${e.sourceBufferName}Codec`]===r&&(this.log(`Removing level ${s} for ${e.details} ("${r}" not supported)`),this.hls.removeLevel(s))}}}function BE(t){const e={action:Jo.DoNothing,flags:dc.None};return t&&(e.resolved=!0),e}var po={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class OIt{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e&&(e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.BUFFER_APPENDED,this.onBufferAppended,this),e.on(Y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Y.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.BUFFER_APPENDED,this.onBufferAppended,this),e.off(Y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Y.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,n){const r=this.activePartLists[n];if(r)for(let i=r.length;i--;){const s=r[i];if(!s)break;if(s.start<=e&&e<=s.end&&s.loaded)return s}return this.getBufferedFrag(e,n)}getBufferedFrag(e,n){return this.getFragAtPos(e,n,!0)}getFragAtPos(e,n,r){const{fragments:i}=this,s=Object.keys(i);for(let a=s.length;a--;){const o=i[s[a]];if((o==null?void 0:o.body.type)===n&&(!r||o.buffered)){const l=o.body;if(l.start<=e&&e<=l.end)return l}}return null}detectEvictedFragments(e,n,r,i,s){this.timeRanges&&(this.timeRanges[e]=n);const a=(i==null?void 0:i.fragment.sn)||-1;Object.keys(this.fragments).forEach(o=>{const l=this.fragments[o];if(!l||a>=l.body.sn)return;if(!l.buffered&&(!l.loaded||s)){l.body.type===r&&this.removeFragment(l.body);return}const u=l.range[e];if(u){if(u.time.length===0){this.removeFragment(l.body);return}u.time.some(c=>{const d=!this.isTimeBuffered(c.startPTS,c.endPTS,n);return d&&this.removeFragment(l.body),d})}})}detectPartialFragments(e){const n=this.timeRanges;if(!n||e.frag.sn==="initSegment")return;const r=e.frag,i=CS(r),s=this.fragments[i];if(!s||s.buffered&&r.gap)return;const a=!r.relurl;Object.keys(n).forEach(o=>{const l=r.elementaryStreams[o];if(!l)return;const u=n[o],c=a||l.partial===!0;s.range[o]=this.getBufferedTimes(r,e.part,c,u)}),s.loaded=null,Object.keys(s.range).length?(this.bufferedEnd(s,r),jO(s)||this.removeParts(r.sn-1,r.type)):this.removeFragment(s.body)}bufferedEnd(e,n){e.buffered=!0,(e.body.endList=n.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,n){const r=this.activePartLists[n];r&&(this.activePartLists[n]=pee(r,i=>i.fragment.sn>=e))}fragBuffered(e,n){const r=CS(e);let i=this.fragments[r];!i&&n&&(i=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,this.bufferedEnd(i,e))}getBufferedTimes(e,n,r,i){const s={time:[],partial:r},a=e.start,o=e.end,l=e.minEndPTS||o,u=e.maxStartPTS||a;for(let c=0;c<i.length;c++){const d=i.start(c)-this.bufferPadding,f=i.end(c)+this.bufferPadding;if(u>=d&&l<=f){s.time.push({startPTS:Math.max(a,i.start(c)),endPTS:Math.min(o,i.end(c))});break}else if(a<f&&o>d){const h=Math.max(a,i.start(c)),g=Math.min(o,i.end(c));g>h&&(s.partial=!0,s.time.push({startPTS:h,endPTS:g}))}else if(o<=d)break}return s}getPartialFragment(e){let n=null,r,i,s,a=0;const{bufferPadding:o,fragments:l}=this;return Object.keys(l).forEach(u=>{const c=l[u];c&&jO(c)&&(i=c.body.start-o,s=c.body.end+o,e>=i&&e<=s&&(r=Math.min(e-i,s-e),a<=r&&(n=c.body,a=r)))}),n}isEndListAppended(e){const n=this.endListFragments[e];return n!==void 0&&(n.buffered||jO(n))}getState(e){const n=CS(e),r=this.fragments[n];return r?r.buffered?jO(r)?po.PARTIAL:po.OK:po.APPENDING:po.NOT_LOADED}isTimeBuffered(e,n,r){let i,s;for(let a=0;a<r.length;a++){if(i=r.start(a)-this.bufferPadding,s=r.end(a)+this.bufferPadding,e>=i&&n<=s)return!0;if(n<=i)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,n){if(n.frag.sn==="initSegment"||n.frag.bitrateTest)return;const r=n.frag,i=n.part?null:n,s=CS(r);this.fragments[s]={body:r,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}onBufferAppended(e,n){const{frag:r,part:i,timeRanges:s,type:a}=n;if(r.sn==="initSegment")return;const o=r.type;if(i){let u=this.activePartLists[o];u||(this.activePartLists[o]=u=[]),u.push(i)}this.timeRanges=s;const l=s[a];this.detectEvictedFragments(a,l,o,i)}onFragBuffered(e,n){this.detectPartialFragments(n)}hasFragment(e){const n=CS(e);return!!this.fragments[n]}hasFragments(e){const{fragments:n}=this,r=Object.keys(n);if(!e)return r.length>0;for(let i=r.length;i--;){const s=n[r[i]];if((s==null?void 0:s.body.type)===e)return!0}return!1}hasParts(e){var n;return!!((n=this.activePartLists[e])!=null&&n.length)}removeFragmentsInRange(e,n,r,i,s){i&&!this.hasGaps||Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o)return;const l=o.body;l.type!==r||i&&!l.gap||l.start<n&&l.end>e&&(o.buffered||s)&&this.removeFragment(l)})}removeFragment(e){const n=CS(e);e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const i=e.sn;this.activePartLists[e.type]=pee(r,s=>s.fragment.sn!==i)}delete this.fragments[n],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const n=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;n&&n.forEach(r=>r.clearElementaryStreamInfo())}}function jO(t){var e,n,r;return t.buffered&&!!(t.body.gap||(e=t.range.video)!=null&&e.partial||(n=t.range.audio)!=null&&n.partial||(r=t.range.audiovideo)!=null&&r.partial)}function CS(t){return`${t.type}_${t.level}_${t.sn}`}function pee(t,e){return t.filter(n=>{const r=e(n);return r||n.clearElementaryStreamInfo(),r})}var Rv={cbc:0,ctr:1};class PIt{constructor(e,n,r){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=n,this.aesMode=r}decrypt(e,n){switch(this.aesMode){case Rv.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},n,e);case Rv.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},n,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function RIt(t){const e=t.byteLength,n=e&&new DataView(t.buffer).getUint8(e-1);return n?t.slice(0,e-n):t}class LIt{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const n=new DataView(e),r=new Uint32Array(4);for(let i=0;i<4;i++)r[i]=n.getUint32(i*4);return r}initTable(){const e=this.sBox,n=this.invSBox,r=this.subMix,i=r[0],s=r[1],a=r[2],o=r[3],l=this.invSubMix,u=l[0],c=l[1],d=l[2],f=l[3],h=new Uint32Array(256);let g=0,v=0,b=0;for(b=0;b<256;b++)b<128?h[b]=b<<1:h[b]=b<<1^283;for(b=0;b<256;b++){let S=v^v<<1^v<<2^v<<3^v<<4;S=S>>>8^S&255^99,e[g]=S,n[S]=g;const A=h[g],w=h[A],x=h[w];let P=h[S]*257^S*16843008;i[g]=P<<24|P>>>8,s[g]=P<<16|P>>>16,a[g]=P<<8|P>>>24,o[g]=P,P=x*16843009^w*65537^A*257^g*16843008,u[S]=P<<24|P>>>8,c[S]=P<<16|P>>>16,d[S]=P<<8|P>>>24,f[S]=P,g?(g=A^h[h[h[x^A]]],v^=h[h[v]]):g=v=1}}expandKey(e){const n=this.uint8ArrayToUint32Array_(e);let r=!0,i=0;for(;i<n.length&&r;)r=n[i]===this.key[i],i++;if(r)return;this.key=n;const s=this.keySize=n.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);const a=this.ksRows=(s+6+1)*4;let o,l;const u=this.keySchedule=new Uint32Array(a),c=this.invKeySchedule=new Uint32Array(a),d=this.sBox,f=this.rcon,h=this.invSubMix,g=h[0],v=h[1],b=h[2],S=h[3];let A,w;for(o=0;o<a;o++){if(o<s){A=u[o]=n[o];continue}w=A,o%s===0?(w=w<<8|w>>>24,w=d[w>>>24]<<24|d[w>>>16&255]<<16|d[w>>>8&255]<<8|d[w&255],w^=f[o/s|0]<<24):s>6&&o%s===4&&(w=d[w>>>24]<<24|d[w>>>16&255]<<16|d[w>>>8&255]<<8|d[w&255]),u[o]=A=(u[o-s]^w)>>>0}for(l=0;l<a;l++)o=a-l,l&3?w=u[o]:w=u[o-4],l<4||o<=4?c[l]=w:c[l]=g[d[w>>>24]]^v[d[w>>>16&255]]^b[d[w>>>8&255]]^S[d[w&255]],c[l]=c[l]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,n,r){const i=this.keySize+6,s=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,l=o[0],u=o[1],c=o[2],d=o[3],f=this.uint8ArrayToUint32Array_(r);let h=f[0],g=f[1],v=f[2],b=f[3];const S=new Int32Array(e),A=new Int32Array(S.length);let w,x,P,N,k,U,H,B,q,Z,C,L,V,j;const X=this.networkToHostOrderSwap;for(;n<S.length;){for(q=X(S[n]),Z=X(S[n+1]),C=X(S[n+2]),L=X(S[n+3]),k=q^s[0],U=L^s[1],H=C^s[2],B=Z^s[3],V=4,j=1;j<i;j++)w=l[k>>>24]^u[U>>16&255]^c[H>>8&255]^d[B&255]^s[V],x=l[U>>>24]^u[H>>16&255]^c[B>>8&255]^d[k&255]^s[V+1],P=l[H>>>24]^u[B>>16&255]^c[k>>8&255]^d[U&255]^s[V+2],N=l[B>>>24]^u[k>>16&255]^c[U>>8&255]^d[H&255]^s[V+3],k=w,U=x,H=P,B=N,V=V+4;w=a[k>>>24]<<24^a[U>>16&255]<<16^a[H>>8&255]<<8^a[B&255]^s[V],x=a[U>>>24]<<24^a[H>>16&255]<<16^a[B>>8&255]<<8^a[k&255]^s[V+1],P=a[H>>>24]<<24^a[B>>16&255]<<16^a[k>>8&255]<<8^a[U&255]^s[V+2],N=a[B>>>24]<<24^a[k>>16&255]<<16^a[U>>8&255]<<8^a[H&255]^s[V+3],A[n]=X(w^h),A[n+1]=X(N^g),A[n+2]=X(P^v),A[n+3]=X(x^b),h=q,g=Z,v=C,b=L,n=n+4}return A.buffer}}class DIt{constructor(e,n,r){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=n,this.aesMode=r}expandKey(){const e=kIt(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function kIt(t){switch(t){case Rv.cbc:return"AES-CBC";case Rv.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${t}`)}}const NIt=16;class BH{constructor(e,{removePKCS7Padding:n=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftw
vendor: 15,667 bytes, line 656
656areAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=n,n)try{const r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch{}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:n}=this;if(!e||n)return this.reset(),null;const r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?RIt(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,n,r,i){return this.useSoftware?new Promise((s,a)=>{const o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,n,r,i);const l=this.flush();l?s(l.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),n,r,i)}softwareDecrypt(e,n,r,i){const{currentIV:s,currentResult:a,remainderData:o}=this;if(i!==Rv.cbc||n.byteLength!==16)return ji.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=Pd(o,e),this.remainderData=null);const l=this.getValidChunk(e);if(!l.length)return null;s&&(r=s);let u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new LIt),u.expandKey(n);const c=a;return this.currentResult=u.decrypt(l.buffer,0,r),this.currentIV=l.slice(-16).buffer,c||null}webCryptoDecrypt(e,n,r,i){if(this.key!==n||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,n,r,i));this.key=n,this.fastAesKey=new DIt(this.subtle,n,i)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new PIt(this.subtle,new Uint8Array(r),i).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(ji.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,n,r,i)))}onWebCryptoError(e,n,r,i){const s=this.enableSoftwareAES;if(s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,n,r,i);const a=this.flush();if(a)return a.buffer}throw new Error("WebCrypto"+(s?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let n=e;const r=e.length-e.length%NIt;return r!==e.length&&(n=e.slice(0,r),this.remainderData=e.slice(r)),n}logOnce(e){this.logEnabled&&(ji.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const gee=Math.pow(2,17);class MIt{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,n){const r=e.url;if(!r)return Promise.reject(new Yp({type:xn.NETWORK_ERROR,details:st.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const i=this.config,s=i.fLoader,a=i.loader;return new Promise((o,l)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(g=>g[0]==="GAP")){l(vee(e));return}else e.gap=!1;const u=this.loader=s?new s(i):new a(i),c=mee(e);e.loader=u;const d=hee(i.fragLoadPolicy.default),f={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:gee};e.stats=u.stats;const h={onSuccess:(g,v,b,S)=>{this.resetLoader(e,u);let A=g.data;b.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(A.slice(0,16)),A=A.slice(16)),o({frag:e,part:null,payload:A,networkDetails:S})},onError:(g,v,b,S)=>{this.resetLoader(e,u),l(new Yp({type:xn.NETWORK_ERROR,details:st.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:Ui({url:r,data:void 0},g),error:new Error(`HTTP Error ${g.code} ${g.text}`),networkDetails:b,stats:S}))},onAbort:(g,v,b)=>{this.resetLoader(e,u),l(new Yp({type:xn.NETWORK_ERROR,details:st.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:b,stats:g}))},onTimeout:(g,v,b)=>{this.resetLoader(e,u),l(new Yp({type:xn.NETWORK_ERROR,details:st.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${f.timeout}ms`),networkDetails:b,stats:g}))}};n&&(h.onProgress=(g,v,b,S)=>n({frag:e,part:null,payload:b,networkDetails:S})),u.load(c,f,h)})}loadPart(e,n,r){this.abort();const i=this.config,s=i.fLoader,a=i.loader;return new Promise((o,l)=>{if(this.loader&&this.loader.destroy(),e.gap||n.gap){l(vee(e,n));return}const u=this.loader=s?new s(i):new a(i),c=mee(e,n);e.loader=u;const d=hee(i.fragLoadPolicy.default),f={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:gee};n.stats=u.stats,u.load(c,f,{onSuccess:(h,g,v,b)=>{this.resetLoader(e,u),this.updateStatsFromPart(e,n);const S={frag:e,part:n,payload:h.data,networkDetails:b};r(S),o(S)},onError:(h,g,v,b)=>{this.resetLoader(e,u),l(new Yp({type:xn.NETWORK_ERROR,details:st.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:n,response:Ui({url:c.url,data:void 0},h),error:new Error(`HTTP Error ${h.code} ${h.text}`),networkDetails:v,stats:b}))},onAbort:(h,g,v)=>{e.stats.aborted=n.stats.aborted,this.resetLoader(e,u),l(new Yp({type:xn.NETWORK_ERROR,details:st.INTERNAL_ABORTED,fatal:!1,frag:e,part:n,error:new Error("Aborted"),networkDetails:v,stats:h}))},onTimeout:(h,g,v)=>{this.resetLoader(e,u),l(new Yp({type:xn.NETWORK_ERROR,details:st.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:n,error:new Error(`Timeout after ${f.timeout}ms`),networkDetails:v,stats:h}))}})})}updateStatsFromPart(e,n){const r=e.stats,i=n.stats,s=i.total;if(r.loaded+=i.loaded,s){const l=Math.round(e.duration/n.duration),u=Math.min(Math.round(r.loaded/s),l),d=(l-u)*Math.round(r.loaded/u);r.total=r.loaded+d}else r.total=Math.max(r.loaded,r.total);const a=r.loading,o=i.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,n){e.loader=null,this.loader===n&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),n.destroy()}}function mee(t,e=null){const n=e||t,r={frag:t,part:e,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},i=n.byteRangeStartOffset,s=n.byteRangeEndOffset;if(sn(i)&&sn(s)){var a;let o=i,l=s;if(t.sn==="initSegment"&&FIt((a=t.decryptdata)==null?void 0:a.method)){const u=s-i;u%16&&(l=s+(16-u%16)),i!==0&&(r.resetIV=!0,o=i-16)}r.rangeStart=o,r.rangeEnd=l}return r}function vee(t,e){const n=new Error(`GAP ${t.gap?"tag":"attribute"} found`),r={type:xn.MEDIA_ERROR,details:st.FRAG_GAP,fatal:!1,frag:t,error:n,networkDetails:null};return e&&(r.part=e),(e||t).stats.aborted=!0,new Yp(r)}function FIt(t){return t==="AES-128"||t==="AES-256"}class Yp extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Vve extends Fd{constructor(e,n){super(e,n),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class UH{constructor(e,n,r,i=0,s=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=zO(),this.buffering={audio:zO(),video:zO(),audiovideo:zO()},this.level=e,this.sn=n,this.id=r,this.size=i,this.part=s,this.partial=a}}function zO(){return{start:0,executeStart:0,executeEnd:0,end:0}}const yee={length:0,start:()=>0,end:()=>0};class ar{static isBuffered(e,n){if(e){const r=ar.getBuffered(e);for(let i=r.length;i--;)if(n>=r.start(i)&&n<=r.end(i))return!0}return!1}static bufferedRanges(e){if(e){const n=ar.getBuffered(e);return ar.timeRangesToArray(n)}return[]}static timeRangesToArray(e){const n=[];for(let r=0;r<e.length;r++)n.push({start:e.start(r),end:e.end(r)});return n}static bufferInfo(e,n,r){if(e){const i=ar.bufferedRanges(e);if(i.length)return ar.bufferedInfo(i,n,r)}return{len:0,start:n,end:n,bufferedIndex:-1}}static bufferedInfo(e,n,r){n=Math.max(0,n),e.length>1&&e.sort((c,d)=>c.start-d.start||d.end-c.end);let i=-1,s=[];if(r)for(let c=0;c<e.length;c++){n>=e[c].start&&n<=e[c].end&&(i=c);const d=s.length;if(d){const f=s[d-1].end;e[c].start-f<r?e[c].end>f&&(s[d-1].end=e[c].end):s.push(e[c])}else s.push(e[c])}else s=e;let a=0,o,l=n,u=n;for(let c=0;c<s.length;c++){const d=s[c].start,f=s[c].end;if(i===-1&&n>=d&&n<=f&&(i=c),n+r>=d&&n<f)l=d,u=f,a=u-n;else if(n+r<d){o=d;break}}return{len:a,start:l||0,end:u||0,nextStart:o,buffered:e,bufferedIndex:i}}static getBuffered(e){try{return e.buffered||yee}catch(n){return ji.log("failed to get media.buffered",n),yee}}}const Hve=/\{\$([a-zA-Z0-9-_]+)\}/g;function bee(t){return Hve.test(t)}function l6(t,e){if(t.variableList!==null||t.hasVariableRefs){const n=t.variableList;return e.replace(Hve,r=>{const i=r.substring(2,r.length-1),s=n==null?void 0:n[i];return s===void 0?(t.playlistParsingError||(t.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),r):s})}return e}function See(t,e,n){let r=t.variableList;r||(t.variableList=r={});let i,s;if("QUERYPARAM"in e){i=e.QUERYPARAM;try{const a=new self.URL(n).searchParams;if(a.has(i))s=a.get(i);else throw new Error(`"${i}" does not match any query parameter in URI: "${n}"`)}catch(a){t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else i=e.NAME,s=e.VALUE;i in r?t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):r[i]=s||""}function $It(t,e,n){const r=e.IMPORT;if(n&&r in n){let i=t.variableList;i||(t.variableList=i={}),i[r]=n[r]}else t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const BIt=/^(\d+)x(\d+)$/,Eee=/(.+?)=(".*?"|.*?)(?:,|$)/g;class ra{constructor(e,n){typeof e=="string"&&(e=ra.parseAttrList(e,n)),ns(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const n=parseInt(this[e],10);return n>Number.MAX_SAFE_INTEGER?1/0:n}hexadecimalInteger(e){if(this[e]){let n=(this[e]||"0x").slice(2);n=(n.length&1?"0":"")+n;const r=new Uint8Array(n.length/2);for(let i=0;i<n.length/2;i++)r[i]=parseInt(n.slice(i*2,i*2+2),16);return r}return null}hexadecimalIntegerAsNumber(e){const n=parseInt(this[e],16);return n>Number.MAX_SAFE_INTEGER?1/0:n}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,n){const r=this[e];return r?parseFloat(r):n}enumeratedString(e){return this[e]}enumeratedStringList(e,n){const r=this[e];return(r?r.split(/[ ,]+/):[]).reduce((i,s)=>(i[s.toLowerCase()]=!0,i),n)}bool(e){return this[e]==="YES"}decimalResolution(e){const n=BIt.exec(this[e]);if(n!==null)return{width:parseInt(n[1],10),height:parseInt(n[2],10)}}static parseAttrList(e,n){let r;const i={},s='"';for(Eee.lastIndex=0;(r=Eee.exec(e))!==null;){const a=r[1].trim();let o=r[2];const l=o.indexOf(s)===0&&o.lastIndexOf(s)===o.length-1;let u=!1;if(l)o=o.slice(1,-1);else switch(a){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":u=!0}if(n&&(l||u))o=l6(n,o);else if(!u&&!l)switch(a){case"CLOSED-CAPTIONS":if(o==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":ji.warn(`${e}: attribute ${a} is missing quotes`)}i[a]=o}return i}}const UIt="com.apple.hls.interstitial";function VIt(t){return t!=="ID"&&t!=="CLASS"&&t!=="CUE"&&t!=="START-DATE"&&t!=="DURATION"&&t!=="END-DATE"&&t!=="END-ON-NEXT"}function HIt(t){return t==="SCTE35-OUT"||t==="SCTE35-IN"||t==="SCTE35-CMD"}class jve{constructor(e,n,r=0){var i;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(n==null?void 0:n.tagAnchor)||null,this.tagOrder=(i=n==null?void 0:n.tagOrder)!=null?i:r,n){const s=n.attr;for(const a in s)if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==s[a]){ji.warn(`DATERANGE tag attribute: "${a}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=a;break}e=ns(new ra({}),s,e)}if(this.attr=e,n?(this._startDate=n._startDate,this._cue=n._cue,this._endDate=n._endDate,this._dateAtEnd=n._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const s=(n==null?void 0:n.endDate)||new Date(this.attr["END-DATE"]);sn(s.getTime())&&(this._endDate=s)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(ji.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const n=this.duration;return n!==null?this._dateAtEnd=new Date(this._startDate.getTime()+n*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(sn(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===UIt}get isValid(){return!!this.id&&!this._badValueForSameId&&sn(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const jIt=10;class zIt{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.drift
vendor: 17,659 bytes, line 656
656StartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const n=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!n||!this.live,this.advanced=this.endSN>e.endSN||n>0||n===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(n=>{let r=n.decryptdata;return r||(n.setKeyFormat(e.keyFormat),r=n.decryptdata),!!r&&e.matches(r)})}get hasProgramDateTime(){return this.fragments.length?sn(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||jIt}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const n=this.lastPartIndex;if(n!==-1){for(let r=e.length;r--;)if(e[r].index>n)return e[r].index;return n}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function UD(t,e){return t.length===e.length?!t.some((n,r)=>n!==e[r]):!1}function Tee(t,e){return!t&&!e?!0:!t||!e?!1:UD(t,e)}function UE(t){return t==="AES-128"||t==="AES-256"||t==="AES-256-CTR"}function VH(t){switch(t){case"AES-128":case"AES-256":return Rv.cbc;case"AES-256-CTR":return Rv.ctr;default:throw new Error(`invalid full segment method ${t}`)}}function HH(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}function u6(t){return Uint8Array.from(unescape(encodeURIComponent(t)),e=>e.charCodeAt(0))}function GIt(t){const e=u6(t).subarray(0,16),n=new Uint8Array(16);return n.set(e,16-e.length),n}function zve(t){const e=function(r,i,s){const a=r[i];r[i]=r[s],r[s]=a};e(t,0,3),e(t,1,2),e(t,4,5),e(t,6,7)}function Gve(t){const e=t.split(":");let n=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),i=r[r.length-1].split(",");if(i.length===2){const s=i[0]==="base64",a=i[1];s?(r.splice(-1,1),n=HH(a)):n=GIt(a)}}return n}const VD=typeof self<"u"?self:void 0;var aa={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},rl={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function qP(t){switch(t){case rl.FAIRPLAY:return aa.FAIRPLAY;case rl.PLAYREADY:return aa.PLAYREADY;case rl.WIDEVINE:return aa.WIDEVINE;case rl.CLEARKEY:return aa.CLEARKEY}}function P5(t){switch(t){case aa.FAIRPLAY:return rl.FAIRPLAY;case aa.PLAYREADY:return rl.PLAYREADY;case aa.WIDEVINE:return rl.WIDEVINE;case aa.CLEARKEY:return rl.CLEARKEY}}function bw(t){const{drmSystems:e,widevineLicenseUrl:n}=t,r=e?[aa.FAIRPLAY,aa.WIDEVINE,aa.PLAYREADY,aa.CLEARKEY].filter(i=>!!e[i]):[];return!r[aa.WIDEVINE]&&n&&r.push(aa.WIDEVINE),r}const Wve=function(t){return VD!=null&&(t=VD.navigator)!=null&&t.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function WIt(t,e,n,r){let i;switch(t){case aa.FAIRPLAY:i=["cenc","sinf"];break;case aa.WIDEVINE:case aa.PLAYREADY:i=["cenc"];break;case aa.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${t}`)}return qIt(i,e,n,r)}function qIt(t,e,n,r){return[{initDataTypes:t,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(s=>({contentType:`audio/mp4; codecs=${s}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:n.map(s=>({contentType:`video/mp4; codecs=${s}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function KIt(t){var e;return!!t&&(t.sessionType==="persistent-license"||!!((e=t.sessionTypes)!=null&&e.some(n=>n==="persistent-license")))}function qve(t){const e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),n=String.fromCharCode.apply(null,Array.from(e)),r=n.substring(n.indexOf("<"),n.length),a=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(a){const o=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(o){const l=HH(o).subarray(0,16);return zve(l),l}}return null}let xS={};class Ev{static clearKeyUriToKeyIdMap(){xS={}}static setKeyIdForUri(e,n){xS[e]=n}static addKeyIdForUri(e){const n=Object.keys(xS).length%Number.MAX_SAFE_INTEGER,r=new Uint8Array(16);return new DataView(r.buffer,12,4).setUint32(0,n),xS[e]=r,r}constructor(e,n,r,i=[1],s=null,a){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=n,this.keyFormat=r,this.keyFormatVersions=i,this.iv=s,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!UE(e),a!=null&&a.startsWith("0x")&&(this.keyId=new Uint8Array(Eve(a)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&UD(e.keyFormatVersions,this.keyFormatVersions)&&Tee(e.iv,this.iv)&&Tee(e.keyId,this.keyId)}isSupported(){if(this.method){if(UE(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case rl.FAIRPLAY:case rl.WIDEVINE:case rl.PLAYREADY:case rl.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e,n){if(!this.encrypted||!this.uri)return null;if(UE(this.method)){let s=this.iv;return s||(typeof e!="number"&&(ji.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),s=ZIt(e)),new Ev(this.method,this.uri,"identity",this.keyFormatVersions,s)}if(this.keyId){const s=xS[this.uri];if(s&&!UD(this.keyId,s)&&Ev.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const r=Gve(this.uri);if(r)switch(this.keyFormat){case rl.WIDEVINE:if(this.pssh=r,!this.keyId){const s=Jxt(r.buffer);if(s.length){var i;const a=s[0];this.keyId=(i=a.kids)!=null&&i.length?a.kids[0]:null}}this.keyId||(this.keyId=Aee(n));break;case rl.PLAYREADY:{const s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Xxt(s,null,r),this.keyId=qve(r);break}default:{let s=r.subarray(0,16);if(s.length!==16){const a=new Uint8Array(16);a.set(s,16-s.length),s=a}this.keyId=s;break}}if(!this.keyId||this.keyId.byteLength!==16){let s;s=YIt(n),s||(s=Aee(n),s||(s=xS[this.uri])),s&&(this.keyId=s,Ev.setKeyIdForUri(this.uri,s))}return this}}function YIt(t){const e=t==null?void 0:t[rl.WIDEVINE];return e?e.keyId:null}function Aee(t){const e=t==null?void 0:t[rl.PLAYREADY];if(e){const n=Gve(e.uri);if(n)return qve(n)}return null}function ZIt(t){const e=new Uint8Array(16);for(let n=12;n<16;n++)e[n]=t>>8*(15-n)&255;return e}const wee=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,_ee=/#EXT-X-MEDIA:(.*)/g,QIt=/^#EXT(?:INF|-X-TARGETDURATION):/m,R5=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),XIt=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Vh{static findGroup(e,n){for(let r=0;r<e.length;r++){const i=e[r];if(i.id===n)return i}}static resolve(e,n){return DH.buildAbsoluteURL(n,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return QIt.test(e)}static parseMasterPlaylist(e,n){const r=bee(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},s=[];if(wee.lastIndex=0,!e.startsWith("#EXTM3U"))return i.playlistParsingError=new Error("no EXTM3U delimiter"),i;let a;for(;(a=wee.exec(e))!=null;)if(a[1]){var o;const u=new ra(a[1],i),c=l6(i,a[2]),d={attrs:u,bitrate:u.decimalInteger("BANDWIDTH")||u.decimalInteger("AVERAGE-BANDWIDTH"),name:u.NAME,url:Vh.resolve(c,n)},f=u.decimalResolution("RESOLUTION");f&&(d.width=f.width,d.height=f.height),Iee(u.CODECS,d);const h=u["SUPPLEMENTAL-CODECS"];h&&(d.supplemental={},Iee(h,d.supplemental)),(o=d.unknownCodecs)!=null&&o.length||s.push(d),i.levels.push(d)}else if(a[3]){const u=a[3],c=a[4];switch(u){case"SESSION-DATA":{const d=new ra(c,i),f=d["DATA-ID"];f&&(i.sessionData===null&&(i.sessionData={}),i.sessionData[f]=d);break}case"SESSION-KEY":{const d=Cee(c,n,i);d.encrypted&&d.isSupported()?(i.sessionKeys===null&&(i.sessionKeys=[]),i.sessionKeys.push(d)):ji.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${c}"`);break}case"DEFINE":{{const d=new ra(c,i);See(i,d,n)}break}case"CONTENT-STEERING":{const d=new ra(c,i);i.contentSteering={uri:Vh.resolve(d["SERVER-URI"],n),pathwayId:d["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=xee(c);break}}}const l=s.length>0&&s.length<i.levels.length;return i.levels=l?s:i.levels,i.levels.length===0&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,n,r){let i;const s={},a=r.levels,o={AUDIO:a.map(u=>({id:u.attrs.AUDIO,audioCodec:u.audioCodec})),SUBTITLES:a.map(u=>({id:u.attrs.SUBTITLES,textCodec:u.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(_ee.lastIndex=0;(i=_ee.exec(e))!==null;){const u=new ra(i[1],r),c=u.TYPE;if(c){const d=o[c],f=s[c]||[];s[c]=f;const h=u.LANGUAGE,g=u["ASSOC-LANGUAGE"],v=u.CHANNELS,b=u.CHARACTERISTICS,S=u["INSTREAM-ID"],A={attrs:u,bitrate:0,id:l++,groupId:u["GROUP-ID"]||"",name:u.NAME||h||"",type:c,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:h,url:u.URI?Vh.resolve(u.URI,n):""};if(g&&(A.assocLang=g),v&&(A.channels=v),b&&(A.characteristics=b),S&&(A.instreamId=S),d!=null&&d.length){const w=Vh.findGroup(d,A.groupId)||d[0];Oee(A,w,"audioCodec"),Oee(A,w,"textCodec")}f.push(A)}}return s}static parseLevelPlaylist(e,n,r,i,s,a){var o;const l={url:n},u=new zIt(n),c=u.fragments,d=[];let f=null,h=0,g=0,v=0,b=0,S=0,A=null,w=new x5(i,l),x,P,N,k=-1,U=!1,H=null,B;if(R5.lastIndex=0,u.m3u8=e,u.hasVariableRefs=bee(e),((o=R5.exec(e))==null?void 0:o[0])!=="#EXTM3U")return u.playlistParsingError=new Error("Missing format identifier #EXTM3U"),u;for(;(x=R5.exec(e))!==null;){U&&(U=!1,w=new x5(i,l),w.playlistOffset=v,w.setStart(v),w.sn=h,w.cc=b,S&&(w.bitrate=S),w.level=r,f&&(w.initSegment=f,f.rawProgramDateTime&&(w.rawProgramDateTime=f.rawProgramDateTime,f.rawProgramDateTime=null),H&&(w.setByteRange(H),H=null)));const L=x[1];if(L){w.duration=parseFloat(L);const V=(" "+x[2]).slice(1);w.title=V||null,w.tagList.push(V?["INF",L,V]:["INF",L])}else if(x[3]){if(sn(w.duration)){w.playlistOffset=v,w.setStart(v),N&&Ree(w,N,u),w.sn=h,w.level=r,w.cc=b,c.push(w);const V=(" "+x[3]).slice(1);w.relurl=l6(u,V),c6(w,A,d),A=w,v+=w.duration,h++,g=0,U=!0}}else{if(x=x[0].match(XIt),!x){ji.warn("No matches on slow regex match for level playlist!");continue}for(P=1;P<x.length&&x[P]===void 0;P++);const V=(" "+x[P]).slice(1),j=(" "+x[P+1]).slice(1),X=x[P+2]?(" "+x[P+2]).slice(1):null;switch(V){case"BYTERANGE":A?w.setByteRange(j,A):w.setByteRange(j);break;case"PROGRAM-DATE-TIME":w.rawProgramDateTime=j,w.tagList.push(["PROGRAM-DATE-TIME",j]),k===-1&&(k=c.length);break;case"PLAYLIST-TYPE":u.type&&Bp(u,V,x),u.type=j.toUpperCase();break;case"MEDIA-SEQUENCE":u.startSN!==0?Bp(u,V,x):c.length>0&&Lee(u,V,x),h=u.startSN=parseInt(j);break;case"SKIP":{u.skippedSegments&&Bp(u,V,x);const G=new ra(j,u),ie=G.decimalInteger("SKIPPED-SEGMENTS");if(sn(ie)){u.skippedSegments+=ie;for(let ue=ie;ue--;)c.push(null);h+=ie}const ae=G.enumeratedString("RECENTLY-REMOVED-DATERANGES");ae&&(u.recentlyRemovedDateranges=(u.recentlyRemovedDateranges||[]).concat(ae.split("	")));break}case"TARGETDURATION":u.targetduration!==0&&Bp(u,V,x),u.targetduration=Math.max(parseInt(j),1);break;case"VERSION":u.version!==null&&Bp(u,V,x),u.version=parseInt(j);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":u.live||Bp(u,V,x),u.live=!1;break;case"#":(j||X)&&w.tagList.push(X?[j,X]:[j]);break;case"DISCONTINUITY":b++,w.tagList.push(["DIS"]);break;case"GAP":w.gap=!0,w.tagList.push([V]);break;case"BITRATE":w.tagList.push([V,j]),S=parseInt(j)*1e3,sn(S)?w.bitrate=S:S=0;break;case"DATERANGE":{const G=new ra(j,u),ie=new jve(G,u.dateRanges[G.ID],u.dateRangeTagCount);u.dateRangeTagCount++,ie.isValid||u.skippedSegments?u.dateRanges[ie.id]=ie:ji.warn(`Ignoring invalid DATERANGE tag: "${j}"`),w.tagList.push(["EXT-X-DATERANGE",j]);break}case"DEFINE":{{const G=new ra(j,u);"IMPORT"in G?$It(u,G,a):See(u,G,n)}break}case"DISCONTINUITY-SEQUENCE":u.startCC!==0?Bp(u,V,x):c.length>0&&Lee(u,V,x),u.startCC=b=parseInt(j);break;case"KEY":{const G=Cee(j,n,u);if(G.isSupported()){if(G.method==="NONE"){N=void 0;break}N||(N={});const ie=N[G.keyFormat];ie!=null&&ie.matches(G)||(ie&&(N=ns({},N)),N[G.keyFormat]=G)}else ji.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${j}"`);break}case"START":u.startTimeOffset=xee(j);break;case"MAP":{const G=new ra(j,u);if(w.duration){const ie=new x5(i,l);Pee(ie,G,r,N),f=ie,w.initSegment=f,f.rawProgramDateTime&&!w.rawProgramDateTime&&(w.rawProgramDateTime=f.rawProgramDateTime)}else{const ie=w.byteRangeEndOffset;if(ie){const ae=w.byteRangeStartOffset;H=`${ie-ae}@${ae}`}else H=null;Pee(w,G,r,N),f=w,U=!0}f.cc=b;break}case"SERVER-CONTROL":{B&&Bp(u,V,x),B=new ra(j),u.canBlockReload=B.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=B.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&B.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=B.optionalFloat("PART-HOLD-BACK",0),u.holdBack=B.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{u.partTarget&&Bp(u,V,x);const G=new ra(j);u.partTarget=G.decimalFloatingPoint("PART-TARGET");break}case"PART":{let G=u.partList;G||(G=u.partList=[]);const ie=g>0?G[G.length-1]:void 0,ae=g++,ue=new ra(j,u),Q=new $xt(ue,w,l,ae,ie);G.push(Q),w.duration+=Q.duration;break}case"PRELOAD-HINT":{const G=new ra(j,u);u.preloadHint=G;break}case"RENDITION-REPORT":{const G=new ra(j,u);u.renditionReports=u.renditionReports||[],u.renditionReports.push(G);break}default:ji.warn(`line parsed but not handled: ${x}`);break}}}A&&!A.relurl?(c.pop(),v-=A.duration,u.partList&&(u.fragmentHint=A)):u.partList&&(c6(w,A,d),w.cc=b,u.fragmentHint=w,N&&Ree(w,N,u)),u.targetduration||(u.playlistParsingError=new Error("Missing Target Duration"));const q=c.length,Z=c[0],C=c[q-1];if(v+=u.skippedSegments*u.targetduration,v>0&&q&&C){u.averagetargetduration=v/q;const L=C.sn;u.endSN=L!=="initSegment"?L:0,u.live||(C.endList=!0),k>0&&(eOt(c,k),Z&&d.unshift(Z))}return u.fragmentHint&&(v+=u.fragmentHint.duration),u.totalduration=v,d.length&&u.dateRangeTagCount&&Z&&Kve(d,u),u.endCC=b,u}}function Kve(t,e){let n=t.length;if(!n)if(e.hasProgramDateTime){const o=e.fragments[e.fragments.length-1];t.push(o),n++}else return;const r=t[n-1],i=e.live?1/0:e.totalduration,s=Object.keys(e.dateRanges);for(let o=s.length;o--;){const l=e.dateRanges[s[o]],u=l.startDate.getTime();l.tagAnchor=r.ref;for(let c=n;c--;){var a;if(((a=t[c])==null?void 0:a.sn)<e.startSN)break;const d=JIt(e,u,t,c,i);if(d!==-1){l.tagAnchor=e.fragments[d].ref;break}}}}function JIt(t,e,n,r,i){const s=n[r];if(s){const o=s.programDateTime;if(e>=o||r===0){var a;const l=(((a=n[r+1])==null?void 0:a.start)||i)-s.start;if(e<=o+l*1e3){const u=n[r].sn-t.startSN;if(u<0)return-1;const c=t.fragments;if(c.length>n.length){const f=(n[r+1]||c[c.length-1]).sn-t.startSN;for(let h=f;h>u;h--){const g=c[h].programDateTime;if(e>=g&&e<g+c[h].duration*1e3)return h}}return u}}}return-1}function Cee(t,e,n){var r,i;const s=new ra(t,n),a=(r=s.METHOD)!=null?r:"",o=s.URI,l=s.hexadecimalInteger("IV"),u=s.KEYFORMATVERSIONS,c=(i=s.KEYFORMAT)!=null?i:"identity";o&&s.IV&&!l&&ji.error(`Invalid IV: ${s.IV}`);const d=o?Vh.resolve(o,e):"",f=(u||"1").split("/").map(Number).filter(Number.isFinite);return new Ev(a,d,c,f,l,s.KEYID)}function xee(t){const n=new ra(t).decimalFloatingPoint("TIME-OFFSET");return sn(n)?n:null}function Iee(t,e){let n=(t||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const i=n.filter(s=>MH(s,r));i.length&&(e[`${r}Codec`]=i.map(s=>s.split("/")[0]).join(","),n=n.filter(s=>i.indexOf(s)===-1))}),e.unknownCodecs=n}function Oee(t,e,n){const r=e[n];r&&(t[n]=r)}function eOt(t,e){let n=t[e];for(let r=e;r--;){const i=t[r];
vendor: 3,042 bytes, line 656
656if(!i)return;i.programDateTime=n.programDateTime-i.duration*1e3,n=i}}function c6(t,e,n){t.rawProgramDateTime?n.push(t):e!=null&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime)}function Pee(t,e,n,r){t.relurl=e.URI,e.BYTERANGE&&t.setByteRange(e.BYTERANGE),t.level=n,t.sn="initSegment",r&&(t.levelkeys=r),t.initSegment=null}function Ree(t,e,n){t.levelkeys=e;const{encryptedFragments:r}=n;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(i=>e[i].isCommonEncryption)&&r.push(t)}function Bp(t,e,n){t.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${n[0]})`)}function Lee(t,e,n){t.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${n[0]})`)}function L5(t,e){const n=e.startPTS;if(sn(n)){let r=0,i;e.sn>t.sn?(r=n-t.start,i=t):(r=t.start-n,i=e),i.duration!==r&&i.setDuration(r)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.setStart(t.start+(t.minEndPTS-t.start)):e.setStart(t.start+t.duration):e.setStart(Math.max(t.start-e.duration,0))}function Yve(t,e,n,r,i,s,a){r-n<=0&&(a.warn("Fragment should have a positive duration",e),r=n+e.duration,s=i+e.duration);let l=n,u=r;const c=e.startPTS,d=e.endPTS;if(sn(c)){const S=Math.abs(c-n);t&&S>t.totalduration?a.warn(`media timestamps and playlist times differ by ${S}s for level ${e.level} ${t.url}`):sn(e.deltaPTS)?e.deltaPTS=Math.max(S,e.deltaPTS):e.deltaPTS=S,l=Math.max(n,c),n=Math.min(n,c),i=e.startDTS!==void 0?Math.min(i,e.startDTS):i,u=Math.min(r,d),r=Math.max(r,d),s=e.endDTS!==void 0?Math.max(s,e.endDTS):s}const f=n-e.start;e.start!==0&&e.setStart(n),e.setDuration(r-e.start),e.startPTS=n,e.maxStartPTS=l,e.startDTS=i,e.endPTS=r,e.minEndPTS=u,e.endDTS=s;const h=e.sn;if(!t||h<t.startSN||h>t.endSN)return 0;let g;const v=h-t.startSN,b=t.fragments;for(b[v]=e,g=v;g>0;g--)L5(b[g],b[g-1]);for(g=v;g<b.length-1;g++)L5(b[g],b[g+1]);return t.fragmentHint&&L5(b[b.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,f}function tOt(t,e,n){if(t===e)return;let r=null;const i=t.fragments;for(let c=i.length-1;c>=0;c--){const d=i[c].initSegment;if(d){r=d;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;let s;iOt(t,e,(c,d,f,h)=>{if((!e.startCC||e.skippedSegments)&&d.cc!==c.cc){const g=c.cc-d.cc;for(let v=f;v<h.length;v++)h[v].cc+=g;e.endCC=h[h.length-1].cc}sn(c.startPTS)&&sn(c.endPTS)&&(d.setStart(d.startPTS=c.startPTS),d.startDTS=c.startDTS,d.maxStartPTS=c.maxStartPTS,d.endPTS=c.endPTS,d.endDTS=c.endDTS,d.minEndPTS=c.minEndPTS,d.setDuration(c.endPTS-c.startPTS),d.duration&&(s=d),e.PTSKnown=e.alignedSliding=!0),c.hasStreams&&(d.elementaryStreams=c.elementaryStreams),d.loader=c.loader,c.hasStats&&(d.stats=c.stats),c.initSegment&&(d.initSegment=c.initSegment,r=c.initSegment)});const a=e.fragments,o=e.fragmentHint?a.concat(e.fragmentHint):a;if(r&&o.forEach(c=>{var d;c&&(!c.initSegment||c.initSegment.relurl===((d=r)==null?void 0:d.relurl))&&(c.initSegment=r)}),e.skippedSegments){if(e.deltaUpdateFailed=a.some(c=>!c),e.deltaUpdateFailed){n.warn("[level-helper] Previous playlist missing segments ski
656pped in delta playlist");for(let c=e.skippedSegments;c--;)a.shift();e.startSN=a[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=nOt(t.dateRanges,e,n));const c=t.fragments.filter(d=>d.rawProgramDateTime);if(t.hasProgramDateTime&&!e.hasProgramDateTime)for(let d=1;d<o.length;d++)o[d].programDateTime===null&&c6(o[d],o[d-1],c);Kve(c,e)}e.endCC=a[a.length-1].cc}if(!e.startCC){var l;const c=Xve(t,e.startSN-1);e.startCC=(l=c==null?void 0:c.cc)!=null?l:a[0].cc}rOt(t.partList,e.partList,(c,d)=>{d.elementaryStreams=c.elementaryStreams,d.stats=c.stats}),s?Yve(e,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS,n):Zve(t,e),a.length&&(e.totalduration=e.edge-a[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;const u=e.advancedDateTime;if(e.advanced&&u){const c=e.edge;e.driftStart||(e.driftStartTime=u,e.driftStart=c),e.driftEndTime=u,e.driftEnd=c}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=t.requestScheduled)}function nOt(t,e,n){const{dateRanges:r,recentlyRemovedDateranges:i}=e,s=ns({},t);i&&i.forEach(l=>{delete s[l]});const o=Object.keys(s).length;return o?(Object.keys(r).forEach(l=>{const u=s[l],c=new jve(r[l].attr,u);c.isValid?(s[l]=c,u||(c.tagOrder+=o)):n.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${us(r[l].attr)}"`)}),s):r}function rOt(t,e,n){if(t&&e){let r=0;for(let i=0,s=t.length;i<=s;i++){const a=t[i],o=e[i+r];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?n(a,o):r--}}}function iOt(t,e,n){const r=e.skippedSegments,i=Math.max(t.startSN,e.startSN)-e.startSN,s=(t.fragmentHint?1:0)+(r?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,a=e.startSN-t.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;for(let u=i;u<=s;u++){const c=l[a+u];let d=o[u];if(r&&!d&&c&&(d=e.fragments[u]=c),c&&d){n(c,d,u,o);const f=c.relurl,h=d.relurl;if(f&&sOt(f,h)){e.playlistParsingError=Dee(`media sequence mismatch ${d.sn}:`,t,e,c,d);return}else if(c.cc!==d.cc){e.playlistParsingError=Dee(`discontinuity sequence mismatch (${c.cc}!=${d.cc})`,t,e,c,d);return}}}}function Dee(t,e,n,r,i){return new Error(`${t} ${i.url}
657Playlist starting @${e.startSN}
658${e.m3u8}
659
660Playlist starting @${n.startSN}
661${n.m3u8}`)}function Zve(t,e,n=!0){const r=e.startSN+e.skippedSegments-t.startSN,i=t.fragments,s=r>=0;let a=0;if(s&&r<i.length)a=i[r].start;else if(s&&e.startSN===t.endSN+1)a=t.fragmentEnd;else if(s&&n)a=t.fragmentStart+r*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)a=t.fragmentStart;else return;d6(e,a)}function d6(t,e){if(e){const n=t.fragments;for(let r=t.skippedSegments;r<n.length;r++)n[r].addStart(e);t.fragmentHint&&t.fragmentHint.addStart(e)}}function Qve(t,e=1/0){let n=1e3*t.targetduration;if(t.updated){const r=t.fragments;if(r.length&&n*4>e){const s=r[r.length-1].duration*1e3;s<n&&(n=s)}}else n/=2;return Math.round(n)}function Xve(t,e,n){if(!t)return null;let r=t.fragments[e-t.startSN];return r||(r=t.fragmentHint,r&&r.sn===e)?r:e<t.startSN&&n&&n.sn===e?n:null}function kee(t,e,n){return t?Jve(t.partList,e,n):null}function Jve(t,e,n){if(t)for(let r=t.length;r--;){const i=t[r];if(i.index===n&&i.fragment.sn===e)return i}return null}function eye(t){t.forEach((e,n)=>{var r;(r=e.details)==null||r.fragments.forEach(i=>{i.level=n,i.initSegment&&(i.initSegment.level=n)})})}function sOt(t,e){return t!==e&&e?Nee(t)!==Nee(e):!1}function Nee(t){return t.replace(/\?[^?]*$/,"")}function a_(t,e){for(let r=0,i=t.length;r<i;r++){var n;if(((n=t[r])==null?void 0:n.cc)===e)return t[r]}return null}function aOt(t,e){return!!(t&&e.startCC<t.endCC&&e.endCC>t.startCC)}function Mee(t,e){const n=t.start+e;t.startPTS=n,t.setStart(n),t.endPTS=n+t.duration}function tye(t,e){const n=e.fragments;for(let r=0,i=n.length;r<i;r++)Mee(n[r],t);e.fragmentHint&&Mee(e.fragmentHint,t),e.alignedSliding=!0}function oOt(t,e){t&&(nye(e,t),e.alignedSliding||HD(e,t),!e.alignedSliding&&!e.skippedSegments&&Zve(t,e,!1))}function nye(t,e){if(!aOt(e,t))return;const n=Math.min(e.endCC,t.endCC),r=a_(e.fragments,n),i=a_(t.fragments,n);if(!r||!i)return;ji.log(`Aligning playlist at start of dicontinuity sequence ${n}`);const s=r.start-i.start;
vendor: 50,900 bytes, line 661
661tye(s,t)}function HD(t,e){if(!t.hasProgramDateTime||!e.hasProgramDateTime)return;const n=t.fragments,r=e.fragments;if(!n.length||!r.length)return;let i,s;const a=Math.min(e.endCC,t.endCC);e.startCC<a&&t.startCC<a&&(i=a_(r,a),s=a_(n,a)),(!i||!s)&&(i=r[Math.floor(r.length/2)],s=a_(n,i.cc)||n[Math.floor(n.length/2)]);const o=i.programDateTime,l=s.programDateTime;if(!o||!l)return;const u=(l-o)/1e3-(s.start-i.start);tye(u,t)}function iu(t,e,n){$u(t,e,n),t.addEventListener(e,n)}function $u(t,e,n){t.removeEventListener(e,n)}const lOt={toString:function(t){let e="";const n=t.length;for(let r=0;r<n;r++)e+=`[${t.start(r).toFixed(3)}-${t.end(r).toFixed(3)}]`;return e}},wt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class jH extends Vve{constructor(e,n,r,i,s){super(i,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=wt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:a,fragCurrent:o,media:l,mediaBuffer:u,state:c}=this,d=l?l.currentTime:0,f=ar.bufferInfo(u||l,d,a.maxBufferHole),h=!f.len;if(this.log(`Media seeking to ${sn(d)?d.toFixed(3):d}, state: ${c}, ${h?"out of":"in"} buffer`),this.state===wt.ENDED)this.resetLoadingState();else if(o){const g=a.maxFragLookUpTolerance,v=o.start-g,b=o.start+o.duration+g;if(h||b<f.start||v>f.end){const S=d>b;(d<v||S)&&(S&&o.loader&&(this.log(`Cancelling fragment load for seek (sn: ${o.sn})`),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(l){this.fragmentTracker.removeFragmentsInRange(d,1/0,this.playlistType,!0);const g=this.lastCurrentTime;if(d>g&&(this.lastCurrentTime=d),!this.loadingParts){const v=Math.max(f.end,d),b=this.shouldLoadParts(this.getLevelDetails(),v);b&&(this.log(`LL-Part loading ON after seeking to ${d.toFixed(2)} with buffer @${v.toFixed(2)}`),this.loadingParts=b)}}this.hls.hasEnoughToStart||(this.log(`Setting ${h?"startPosition":"nextLoadPosition"} to ${d} for seek without enough to start`),this.nextLoadPosition=d,h&&(this.startPosition=d)),h&&this.state===wt.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=s,this.hls=e,this.fragmentLoader=new MIt(e.config),this.keyLoader=r,this.fragmentTracker=n,this.config=e.config,this.decrypter=new BH(e.config)}registerListeners(){const{hls:e}=this;e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Y.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===wt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=wt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:n}=this;return n===-1&&e?e:n}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,n){if(n.live||!this.media)return!1;const r=e.end||0,i=this.config.timelineOffset||0;if(r<=i)return!1;const s=e.buffered;this.config.maxBufferHole&&s&&s.length>1&&(e=ar.bufferedInfo(s,e.start,0));const a=e.nextStart;if(a&&a>i&&a<n.edge||this.media.currentTime<e.start)return!1;const l=n.partList;if(l!=null&&l.length){const c=l[l.length-1];return ar.isBuffered(this.media,c.start+c.duration/2)}const u=n.fragments[n.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(u)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var n;return((n=this.getLevelDetails())==null?void 0:n.appliedTimelineOffset)||e}return 0}onMediaAttached(e,n){const r=this.media=this.mediaBuffer=n.media;iu(r,"seeking",this.onMediaSeeking),iu(r,"ended",this.onMediaEnded);const i=this.config;this.levels&&i.autoStartLoad&&this.state===wt.STOPPED&&this.startLoad(i.startPosition)}onMediaDetaching(e,n){const r=!!n.transferMedia,i=this.media;if(i!==null){if(i.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),$u(i,"seeking",this.onMediaSeeking),$u(i,"ended",this.onMediaEnded),this.keyLoader&&!r&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,r){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,n){}onManifestLoaded(e,n){this.startTimeOffset=n.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=wt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,n,r){this.startFragRequested=!0,this._loadFragForPlayback(e,n,r)}_loadFragForPlayback(e,n,r){const i=s=>{const a=s.frag;if(this.fragContextChanged(a)){this.warn(`${a.type} sn: ${a.sn}${s.part?" part: "+s.part.index:""} of ${this.fragInfo(a,!1,s.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(a);return}a.stats.chunkCount++,this._handleFragmentLoadProgress(s)};this._doFragLoad(e,n,r,i).then(s=>{if(!s)return;const a=this.state,o=s.frag;if(this.fragContextChanged(o)){(a===wt.FRAG_LOADING||!this.fragCurrent&&a===wt.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=wt.IDLE);return}"payload"in s&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(Y.FRAG_LOADED,s)),this._handleFragmentLoadComplete(s)}).catch(s=>{this.state===wt.STOPPED||this.state===wt.ERROR||(this.warn(`Frag error: ${(s==null?void 0:s.message)||s}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var n;const{fragmentTracker:r}=this;if(r.getState(e)===po.APPENDING){const s=e.type,a=this.getFwdBufferInfo(this.mediaBuffer,s),o=Math.max(e.duration,a?a.len:this.config.maxBufferLength),l=this.backtrackFragment;((l?e.sn-l.sn:0)===1||this.reduceMaxBufferLength(o,e.duration))&&r.removeFragment(e)}else((n=this.mediaBuffer)==null?void 0:n.buffered.length)===0?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===po.PARTIAL&&r.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const n=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:n,part:null,stats:n.stats,id:n.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const n=e.details;return(n==null?void 0:n.live)&&n.type!=="EVENT"&&(this.levelLastLoaded!==e||n.expired)}flushMainBuffer(e,n,r=null){if(!(e-n))return;const i={startOffset:e,endOffset:n,type:r};this.hls.trigger(Y.BUFFER_FLUSHING,i)}_loadInitSegment(e,n){this._doFragLoad(e,n).then(r=>{const i=r==null?void 0:r.frag;if(!i||this.fragContextChanged(i)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:i}=this,{frag:s,payload:a}=r,o=s.decryptdata;if(a&&a.byteLength>0&&o!=null&&o.key&&o.iv&&UE(o.method)){const l=self.performance.now();return this.decrypter.decrypt(new Uint8Array(a),o.key.buffer,o.iv.buffer,VH(o.method)).catch(u=>{throw i.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:s}),u}).then(u=>{const c=self.performance.now();return i.trigger(Y.FRAG_DECRYPTED,{frag:s,payload:u,stats:{tstart:l,tdecrypt:c}}),r.payload=u,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===wt.STOPPED||this.state===wt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:n}=this;if(!n)throw new Error("init load aborted, missing levels");const r=e.frag.stats;this.state!==wt.STOPPED&&(this.state=wt.IDLE),e.frag.data=new Uint8Array(e.payload),r.parsing.start=r.buffering.start=self.performance.now(),r.parsing.end=r.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,n){var r,i;const s=e.tracks;if(s&&!n.encrypted&&((r=s.audio)!=null&&r.encrypted||(i=s.video)!=null&&i.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const a=this.media,o=new Error(`Encrypted track with no key in ${this.fragInfo(n)} (media ${a?"attached mediaKeys: "+a.mediaKeys:"detached"})`);return this.warn(o.message),!a||a.mediaKeys?!1:(this.hls.trigger(Y.ERROR,{type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_NO_KEYS,fatal:!1,error:o,frag:n}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:n}=this;return!e||!n||e.sn!==n.sn||e.level!==n.level}fragBufferedComplete(e,n){const r=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${n?" part: "+n.index:""} of ${this.fragInfo(e,!1,n)} > buffer:${r?lOt.toString(ar.getBuffered(r)):"(detached)"})`),Da(e)){var i;if(e.type!==yn.SUBTITLE){const a=e.elementaryStreams;if(!Object.keys(a).some(o=>!!a[o])){this.state=wt.IDLE;return}}const s=(i=this.levels)==null?void 0:i[e.level];s!=null&&s.fragmentError&&(this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`),s.fragmentError=0)}this.state=wt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:n}=this;if(!n)return;const{frag:r,part:i,partsLoaded:s}=e,a=!s||s.length===0||s.some(l=>!l),o=new UH(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!a);n.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,n,r=null,i){var s;this.fragCurrent=e;const a=n.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(e.encrypted&&!((s=e.decryptdata)!=null&&s.key)){if(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=wt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(f=>{if(!this.fragContextChanged(f.frag))return this.hls.trigger(Y.KEY_LOADED,f),this.state===wt.KEY_LOADING&&(this.state=wt.IDLE),f}),this.hls.trigger(Y.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(o=this.keyLoader.loadClear(e,a.encryptedFragments,this.startFragRequested),o&&this.log("[eme] blocking frag load until media-keys acquired"));const l=this.fragPrevious;if(Da(e)&&(!l||e.sn!==l.sn)){const f=this.shouldLoadParts(n.details,e.end);f!==this.loadingParts&&(this.log(`LL-Part loading ${f?"ON":"OFF"} loading sn ${l==null?void 0:l.sn}->${e.sn}`),this.loadingParts=f)}if(r=Math.max(e.start,r||0),this.loadingParts&&Da(e)){const f=a.partList;if(f&&i){r>a.fragmentEnd&&a.fragmentHint&&(e=a.fragmentHint);const h=this.getNextPart(f,e,r);if(h>-1){const g=f[h];e=this.fragCurrent=g.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${g.index} (${h}/${f.length-1}) of ${this.fragInfo(e,!1,g)}) cc: ${e.cc} [${a.startSN}-${a.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=g.start+g.duration,this.state=wt.FRAG_LOADING;let v;return o?v=o.then(b=>!b||this.fragContextChanged(b.frag)?null:this.doFragPartsLoad(e,g,n,i)).catch(b=>this.handleFragLoadError(b)):v=this.doFragPartsLoad(e,g,n,i).catch(b=>this.handleFragLoadError(b)),this.hls.trigger(Y.FRAG_LOADING,{frag:e,part:g,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):v}else if(!e.url||this.loadedEndOfParts(f,r))return Promise.resolve(null)}}if(Da(e)&&this.loadingParts){var u;this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(u=a.partList)==null?void 0:u.filter(f=>f.loaded).map(f=>`[${f.start}-${f.end}]`)}`),this.loadingParts=!1}else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+a.startSN+"-"+a.endSN+"]"}, target: ${parseFloat(r.toFixed(3))}`),sn(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=wt.FRAG_LOADING;const c=this.config.progressive&&e.type!==yn.SUBTITLE;let d;return c&&o?d=o.then(f=>!f||this.fragContextChanged(f.frag)?null:this.fragmentLoader.load(e,i)).catch(f=>this.handleFragLoadError(f)):d=Promise.all([this.fragmentLoader.load(e,c?i:void 0),o]).then(([f])=>(!c&&i&&i(f),f)).catch(f=>this.handleFragLoadError(f)),this.hls.trigger(Y.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):d}doFragPartsLoad(e,n,r,i){return new Promise((s,a)=>{var o;const l=[],u=(o=r.details)==null?void 0:o.partList,c=d=>{this.fragmentLoader.loadPart(e,d,i).then(f=>{l[d.index]=f;const h=f.part;this.hls.trigger(Y.FRAG_LOADED,f);const g=kee(r.details,e.sn,d.index+1)||Jve(u,e.sn,d.index+1);if(g)c(g);else return s({frag:e,part:h,partsLoaded:l})}).catch(a)};c(n)})}handleFragLoadError(e){if("data"in e){const n=e.data;n.frag&&n.details===st.INTERNAL_ABORTED?this.handleFragLoadAborted(n.frag,n.part):n.frag&&n.type===xn.KEY_SYSTEM_ERROR?(n.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(n.frag)):this.hls.trigger(Y.ERROR,n)}else this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const n=this.getCurrentContext(e);if(!n||this.state!==wt.PARSING){!this.fragCurrent&&this.state!==wt.STOPPED&&this.state!==wt.ERROR&&(this.state=wt.IDLE);return}const{frag:r,part:i,level:s}=n,a=self.performance.now();r.stats.parsing.end=a,i&&(i.stats.parsing.end=a);const o=this.getLevelDetails(),u=o&&r.sn>o.endSN||this.shouldLoadParts(o,r.end);u!==this.loadingParts&&(this.log(`LL-Part loading ${u?"ON":"OFF"} after parsing segment ending @${r.end.toFixed(2)}`),this.loadingParts=u),this.updateLevelTiming(r,i,s,e.partial)}shouldLoadParts(e,n){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var r;const s=e.partList[0];if(s.fragment.type===yn.SUBTITLE)return!1;const a=s.end+(((r=e.fragmentHint)==null?void 0:r.duration)||0);if(n>=a){var i;if((this.hls.hasEnoughToStart?((i=this.media)==null?void 0:i.currentTime)||this.lastCurrentTime:this.getLoadPosition())>s.start-s.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:n,fragCurrent:r}=this,{level:i,sn:s,part:a}=e;if(!(n!=null&&n[i]))return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${i}. The current chunk will not be buffered.`),null;const o=n[i],l=o.details,u=a>-1?kee(l,s,a):null,c=u?u.fragment:Xve(l,s,r);return c?(r&&r!==c&&(c.stats=r.stats),{frag:c,part:u,level:o}):null}bufferFragmentData(e,n,r,i,s){if(this.state!==wt.PARSING)return;const{data1:a,data2:o}=e;let l=a;if(o&&(l=Pd(a,o)),!l.length)return;const u=this.initPTS[n.cc],c=u?-u.baseTime/u.timescale:void 0,d={type:e.type,frag:n,part:r,chunkMeta:i,offset:c,parent:n.type,data:l};if(this.hls.trigger(Y.BUFFER_APPENDING,d),e.dropped&&e.independent&&!r){if(s)return;this.flushBufferGap(n)}}flushBufferGap(e){const n=this.media;if(!n)return;if(!ar.isBuffered(n,n.currentTime)){this.flushMainBuffer(0,e.start);return}const r=n.currentTime,i=ar.bufferInfo(n,r,0),s=e.duration,a=Math.min(this.config.maxFragLookUpTolerance*2,s*.25),o=Math.max(Math.min(e.start-a,i.end-a),r+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,n){var r;const i=this.getLoadPosition();if(!sn(i))return null;const a=this.lastCurrentTime>i||(r=this.media)!=null&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,i,n,a)}getFwdBufferInfoAtPos(e,n,r,i){const s=ar.bufferInfo(e,n,i);if(s.len===0&&s.nextStart!==void 0){const a=this.fragmentTracker.getBufferedFrag(n,r);if(a&&(s.nextStart<=a.end||a.gap)){const o=Math.max(Math.min(s.nextStart,a.end)-n,i);return ar.bufferInfo(e,n,o)}}return s}getMaxBufferLength(e){const{config:n}=this;let r;return e?r=Math.max(8*n.maxBufferSize/e,n.maxBufferLength):r=n.maxBufferLength,Math.min(r,n.maxMaxBufferLength)}reduceMaxBufferLength(e,n){const r=this.config,i=Math.max(Math.min(e-n,r.maxBufferLength),n),s=Math.max(e-n*3,r.maxMaxBufferLength/2,i);return s>=i?(r.maxMaxBufferLength=s,this.warn(`Reduce max buffer length to ${s}s`),!0):!1}getAppendedFrag(e,n=yn.MAIN){const r=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,n):null;return r&&"fragment"in r?r.fragment:r}getNextFragment(e,n){const r=n.fragments,i=r.length;if(!i)return null;const{config:s}=this,a=r[0].start,o=s.lowLatencyMode&&!!n.partList;let l=null;if(n.live){const d=s.initialLiveManifestSize;if(i<d)return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${d})`),null;if(!n.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<a){var u;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),l=this.getInitialLiveFragment(n);const f=this.hls.startPosition,h=this.hls.liveSyncPosition,g=l?(f!==-1&&f>=a?f:h)||l.start:e;this.log(`Setting startPosition to ${g} to match start frag at live edge. mainStart: ${f} liveSyncPosition: ${h} frag.start: ${(u=l)==null?void 0:u.start}`),this.startPosition=this.nextLoadPosition=g}}else e<=a&&(l=r[0]);if(!l){const d=this.loadingParts?n.partEnd:n.fragmentEnd;l=this.getFragmentAtPosition(e,d,n)}let c=this.filterReplacedPrimary(l,n);if(!c&&l){const d=l.sn-n.startSN;c=this.filterReplacedPrimary(r[d+1]||null,n)}return this.mapToInitFragWhenRequired(c)}isLoopLoading(e,n){const r=this.fragmentTracker.getState(e);return(r===po.OK||r===po.PARTIAL&&!!e.gap)&&this.nextLoadPosition>n}getNextFragmentLoopLoading(e,n,r,i,s){let a=null;if(e.gap&&(a=this.getNextFragment(this.nextLoadPosition,n),a&&!a.gap&&r.nextStart)){const o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,i,0);if(o!==null&&r.len+o.len>=s){const l=a.sn;return this.loopSn!==l&&(this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${l}`),this.loopSn=l),null}}return this.loopSn=void 0,a}get primaryPrefetch(){if(Fee(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,n){if(!e)return e;if(Fee(this.config)&&e.type!==yn.SUBTITLE){const r=this.hls.interstitialsManager,i=r==null?void 0:r.bufferingItem;if(i){const a=i.event;if(a){if(a.appendInPlace||Math.abs(e.start-i.start)>1||i.start===0)return null}else if(e.end<=i.start&&(n==null?void 0:n.live)===!1||e.start>i.end&&i.nextEvent&&(i.nextEvent.appendInPlace||e.start-i.end>1))return null}const s=r==null?void 0:r.playerQueue;if(s)for(let a=s.length;a--;){const o=s[a].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,n,r){let i=-1,s=!1,a=!0;for(let o=0,l=e.length;o<l;o++){const u=e[o];if(a=a&&!u.independent,i>-1&&r<u.start)break;const c=u.loaded;c?i=-1:(s||(u.independent||a)&&u.fragment===n)&&(u.fragment!==n&&this.warn(`Need buffer at ${r} but next unloaded part starts at ${u.start}`),i=o),s=c}return i}loadedEndOfParts(e,n){let r;for(let i=e.length;i--;){if(r=e[i],!r.loaded)return!1;if(n>r.start)return!0}return!1}getInitialLiveFragment(e){const n=e.fragments,r=this.fragPrevious;let i=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),i=wIt(n,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const s=r.sn+1;if(s>=e.startSN&&s<=e.endSN){const a=n[s-e.startSN];r.cc===a.cc&&(i=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=$ve(e,r.cc,r.end),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const s=this.hls.liveSyncPosition;s!==null&&(i=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,n,r){const{config:i}=this;let{fragPrevious:s}=this,{fragments:a,endSN:o}=r;const{fragmentHint:l}=r,{maxFragLookUpTolerance:u}=i,c=r.partList,d=!!(this.loadingParts&&c!=null&&c.length&&l);d&&!this.bitrateTest&&c[c.length-1].fragment.sn===l.sn&&(a=a.concat(l),o=l.sn);let f;if(e<n){var h;const v=e<this.lastCurrentTime||e>n-u||(h=this.media)!=null&&h.paused||!this.startFragRequested?0:u;f=ob(s,a,e,v)}else f=a[a.length-1];if(f){const g=f.sn-r.startSN,v=this.fragmentTracker.getState(f);if((v===po.OK||v===po.PARTIAL&&f.gap)&&(s=f),s&&f.sn===s.sn&&(!d||c[0].fragment.sn>f.sn||!r.live)&&f.level===s.level){const S=a[g+1];f.sn<o&&this.fragmentTracker.getState(S)!==po.OK?f=S:f=null}}return f}alignPlaylists(e,n,r){const i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,a=!n,o=e.alignedSliding&&sn(s);if(a||!o&&!s){oOt(r,e);const l=e.fragmentStart;return this.log(`Live playlist sliding: ${l.toFixed(2)} start-sn: ${n?n.startSN:"na"}->${e.startSN} fragments: ${i}`),l}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,n){let r=this.startPosition;r<n&&(r=-1);const i=this.timelineOffset;if(r===-1){const s=this.startTimeOffset!==null,a=s?this.startTimeOffset:e.startTimeOffset;a!==null&&sn(a)?(r=n+a,a<0&&(r+=e.edge),r=Math.min(Math.max(n,r),n+e.totalduration),this.log(`Setting startPosition to ${r} for start time offset ${a} found in ${s?"multivariant":"media"} playlist`),this.startPosition=r):e.live?(r=this.hls.liveSyncPosition||n,this.log(`Setting startPosition to -1 to start at live edge ${r}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=r=0),this.lastCurrentTime=r+i}this.nextLoadPosition=r+i}getLoadPosition(){var e;const{media:n}=this;let r=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&n?r=n.currentTime:this.nextLoadPosition>=0&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,n){this.transmuxer&&e.type===this.playlistType&&Da(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${n?" part "+n.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==wt.FRAG_LOADING_WAITING_RETRY)&&(this.state=wt.IDLE)}onFragmentOrKeyLoadError(e,n){var r;if(n.chunkMeta&&!n.frag){const S=this.getCurrentContext(n.chunkMeta);S&&(n.frag=S.frag)}const i=n.frag;if(!i||i.type!==e||!this.levels)return;if(this.fragContextChanged(i)){var s;this.warn(`Frag load error must match current frag to retry ${i.url} > ${(s=this.fragCurrent)==null?void 0:s.url}`);return}const a=n.details===st.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(i,!0);const o=n.errorAction;if(!o){this.state=wt.ERROR;return}const{action:l,flags:u,retryCount:c=0,retryConfig:d}=o,f=!!d,h=f&&l===Jo.RetryRequest,g=f&&!o.resolved&&u===dc.MoveAllAlternatesMatchingHost,v=(r=this.hls.latestLevelDetails)==null?void 0:r.live;if(!h&&g&&Da(i)&&!i.endList&&v&&!Uve(n))this.resetFragmentErrors(e),this.treatAsGap(i),o.resolved=!0;else if((h||g)&&c<d.maxNumRetry){var b;const S=o6((b=n.response)==null?void 0:b.code),A=$H(d,c);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+A,this.state=wt.FRAG_LOADING_WAITING_RETRY,o.resolved=!0,S){this.log("Waiting for connection (offline)"),this.retryDate=1/0,n.reason="offline";return}this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${n.details}, retrying loading ${c+1}/${d.maxNumRetry} in ${A}ms`)}else if(d)if(this.resetFragmentErrors(e),c<d.maxNumRetry)!a&&l!==Jo.RemoveAlternatePermanently&&(o.resolved=!0);else{this.warn(`${n.details} reached or exceeded max retry (${c})`);return}else l===Jo.SendAlternateToPenaltyBox?this.state=wt.WAITING_LEVEL:this.state=wt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),n=this.retryDate,r=n===1/0;(!n||e>=n||r&&!o6(0))&&(r&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=wt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===wt.PARSING||this.state===wt.PARSED){const n=e.frag,r=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,r),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.len,(n==null?void 0:n.duration)||10);const a=!s;return a&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${r} buffer`),n&&(this.fragmentTracker.removeFragment(n),this.nextLoadPosition=n.start),this.resetLoadingState(),a}return!1}resetFragmentErrors(e){e===yn.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==wt.STOPPED&&(this.state=wt.IDLE)}afterBufferFlushed(e,n,r){if(!e)return;const i=ar.getBuffered(e);this.fragmentTracker.detectEvictedFragments(n,i,r),this.state===wt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==wt.STOPPED&&(this.state=wt.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,n=e?e.details:null;n!=null&&n.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(n,n.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,n,r,i){const s=r.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((l,u)=>{const c=e.elementaryStreams[u];if(c){const d=c.endPTS-c.startPTS;if(d<=0)return this.warn(`Could not parse fragment ${e.sn} ${u} duration reliably (${d})`),l||!1;const f=i?0:Yve(s,e,c.startPTS,c.endPTS,c.startDTS,c.endDTS,this);return this.hls.trigger(Y.LEVEL_PTS_UPDATED,{details:s,level:r,drift:f,type:u,frag:e,start:c.startPTS,end:c.endPTS}),!0}return l},!1)){var o;const l=((o=this.transmuxer)==null?void 0:o.error)===null;if((r.fragmentError===0||l&&(r.fragmentError<2||e.endList))&&this.treatAsGap(e,r),l){const u=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(u.message),this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_PARSING_ERROR,fatal:!1,error:u,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=wt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${n?" part: "+n.index:""} of ${this.fragInfo(e,!1,n)})`),this.hls.trigger(Y.FRAG_PARSED,{frag:e,part:n})}playlistLabel(){return this.playlistType===yn.MAIN?"level":"track"}fragInfo(e,n=!0,r){var i,s;return`${this.playlistLabel()} ${e.level} (${r?"part":"frag"}:[${((i=n&&!r?e.startPTS:(r||e).start)!=null?i:NaN).toFixed(3)}-${((s=n&&!r?e.endPTS:(r||e).end)!=null?s:NaN).toFixed(3)}]${r&&e.type==="main"?"INDEPENDENT="+(r.independent?"YES":"NO"):""}`}treatAsGap(e,n){n&&n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const n=this._state;n!==e&&(this._state=e,this.log(`${n}->${e}`))}get state(){return this._state}}function Fee(t){return!!t.interstitialsController&&t.enableInterstitialPlayback!==!1}class rye{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:n}=this;let r;if(e.length)e.length===1?r=e[0]:r=uOt(e,n);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function uOt(t,e){const n=new Uint8Array(e);let r=0;for(let i=0;i<t.length;i++){const s=t[i];n.set(s,r),r+=s.length}return n}var D5={exports:{}},$ee;function cOt(){return $ee||($ee=1,function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function s(l,u,c,d,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,d||l,f),g=n?n+u:u;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],h]:l._events[g].push(h):(l._events[g]=h,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],c,d;if(this._eventsCount===0)return u;for(d in c=this._events)e.call(c,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},o.prototype.listeners=function(u){var c=n?n+u:u,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,g=new Array(h);f<h;f++)g[f]=d[f].fn;return g},o.prototype.listenerCount=function(u){var c=n?n+u:u,d=this._events[c];return d?d.fn?1:d.length:0},o.prototype.emit=function(u,c,d,f,h,g){var v=n?n+u:u;if(!this._events[v])return!1;var b=this._events[v],S=arguments.length,A,w;if(b.fn){switch(b.once&&this.removeListener(u,b.fn,void 0,!0),S){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,c),!0;case 3:return b.fn.call(b.context,c,d),!0;case 4:return b.fn.call(b.context,c,d,f),!0;case 5:return b.fn.call(b.context,c,d,f,h),!0;case 6:return b.fn.call(b.context,c,d,f,h,g),!0}for(w=1,A=new Array(S-1);w<S;w++)A[w-1]=arguments[w];b.fn.apply(b.context,A)}else{var x=b.length,P;for(w=0;w<x;w++)switch(b[w].once&&this.removeListener(u,b[w].fn,void 0,!0),S){case 1:b[w].fn.call(b[w].context);break;case 2:b[w].fn.call(b[w].context,c);break;case 3:b[w].fn.call(b[w].context,c,d);break;case 4:b[w].fn.call(b[w].context,c,d,f);break;default:if(!A)for(P=1,A=new Array(S-1);P<S;P++)A[P-1]=arguments[P];b[w].fn.apply(b[w].context,A)}}return!0},o.prototype.on=function(u,c,d){return s(this,u,c,d,!1)},o.prototype.once=function(u,c,d){return s(this,u,c,d,!0)},o.prototype.removeListener=function(u,c,d,f){var h=n?n+u:u;if(!this._events[h])return this;if(!c)return a(this,h),this;var g=this._events[h];if(g.fn)g.fn===c&&(!f||g.once)&&(!d||g.context===d)&&a(this,h);else{for(var v=0,b=[],S=g.length;v<S;v++)(g[v].fn!==c||f&&!g[v].once||d&&g[v].context!==d)&&b.push(g[v]);b.length?this._events[h]=b.length===1?b[0]:b:a(this,h)}return this},o.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,t.exports=o}(D5)),D5.exports}var dOt=cOt(),zH=Mxt(dOt);const TC="1.6.15",G1={};function fOt(){return typeof __HLS_WORKER_BUNDLE__=="function"}function hOt(){const t=G1[TC];if(t)return t.clientCount++,t;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),n=self.URL.createObjectURL(e),i={worker:new self.Worker(n),objectURL:n,clientCount:1};return G1[TC]=i,i}function pOt(t){const e=G1[t];if(e)return e.clientCount++,e;const n=new self.URL(t,self.location.href).href,i={worker:new self.Worker(n),scriptURL:n,clientCount:1};return G1[t]=i,i}function gOt(t){const e=G1[t||TC];if(e&&e.clientCount--===1){const{worker:r,objectURL:i}=e;delete G1[t||TC],i&&self.URL.revokeObjectURL(i),r.terminate()}}function iye(t,e){return e+10<=t.length&&t[e]===51&&t[e+1]===68&&t[e+2]===73&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128}function GH(t,e){return e+10<=t.length&&t[e]===73&&t[e+1]===68&&t[e+2]===51&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128}function RN(t,e){let n=0;return n=(t[e]&127)<<21,n|=(t[e+1]&127)<<14,n|=(t[e+2]&127)<<7,n|=t[e+3]&127,n}function AC(t,e){const n=e;let r=0;for(;GH(t,e);){r+=10;const i=RN(t,e+6);r+=i,iye(t,e+10)&&(r+=10),e+=r}if(r>0)return t.subarray(n,n+r)}function mOt(t,e,n,r){const i=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],s=e[n+2],a=s>>2&15;if(a>12){const h=new Error(`invalid ADTS sampling index:${a}`);t.emit(Y.ERROR,Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_PARSING_ERROR,fatal:!0,error:h,reason:h.message});return}const o=(s>>6&3)+1,l=e[n+3]>>6&3|(s&1)<<2,u="mp4a.40."+o,c=i[a];let d=a;(o===5||o===29)&&(d-=3);const f=[o<<3|(d&14)>>1,(d&1)<<7|l<<3];return ji.log(`manifest codec:${r}, parsed codec:${u}, channels:${l}, rate:${c} (ADTS object type:${o} sampling index:${a})`),{config:f,samplerate:c,channelCount:l,codec:u,parsedCodec:u,manifestCodec:r}}function sye(t,e){return t[e]===255&&(t[e+1]&246)===240}function aye(t,e){return t[e+1]&1?7:9}function WH(t,e){return(t[e+3]&3)<<11|t[e+4]<<3|(t[e+5]&224)>>>5}function vOt(t,e){return e+5<t.length}function jD(t,e){return e+1<t.length&&sye(t,e)}function yOt(t,e){return vOt(t,e)&&sye(t,e)&&WH(t,e)<=t.length-e}function bOt(t,e){if(jD(t,e)){const n=aye(t,e);if(e+n>=t.length)return!1;const r=WH(t,e);if(r<=n)return!1;const i=e+r;return i===t.length||jD(t,i)}return!1}function oye(t,e,n,r,i){if(!t.samplerate){const s=mOt(e,n,r,i);if(!s)return;ns(t,s)}}function lye(t){return 1024*9e4/t}function SOt(t,e){const n=aye(t,e);if(e+n<=t.length){const r=WH(t,e)-n;if(r>0)return{headerLength:n,frameLength:r}}}function uye(t,e,n,r,i){const s=lye(t.samplerate),a=r+i*s,o=SOt(e,n);let l;if(o){const{frameLength:d,headerLength:f}=o,h=f+d,g=Math.max(0,n+h-e.length);g?(l=new Uint8Array(h-f),l.set(e.subarray(n+f,e.length),0)):l=e.subarray(n+f,n+h);const v={unit:l,pts:a};return g||t.samples.push(v),{sample:v,length:h,missing:g}}const u=e.length-n;return l=new Uint8Array(u),l.set(e.subarray(n,e.length),0),{sample:{unit:l,pts:a},length:u,missing:-1}}function EOt(t,e){return GH(t,e)&&RN(t,e+6)+10<=t.length-e}function TOt(t){return t instanceof ArrayBuffer?t:t.byteOffset==0&&t.byteLength==t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer}function k5(t,e=0,n=1/0){return AOt(t,e,n,Uint8Array)}function AOt(t,e,n,r){const i=wOt(t);let s=1;"BYTES_PER_ELEMENT"in r&&(s=r.BYTES_PER_ELEMENT);const a=_Ot(t)?t.byteOffset:0,o=(a+t.byteLength)/s,l=(a+e)/s,u=Math.floor(Math.max(0,Math.min(l,o))),c=Math.floor(Math.min(u+Math.max(n,0),o));return new r(i,u,c-u)}function wOt(t){return t instanceof ArrayBuffer?t:t.buffer}function _Ot(t){return t&&t.buffer instanceof ArrayBuffer&&t.byteLength!==void 0&&t.byteOffset!==void 0}function COt(t){const e={key:t.type,description:"",data:"",mimeType:null,pictureType:null},n=3;if(t.size<2)return;if(t.data[0]!==n){console.log("Ignore frame with unrecognized character encoding");return}const r=t.data.subarray(1).indexOf(0);if(r===-1)return;const i=Dc(k5(t.data,1,r)),s=t.data[2+r],a=t.data.subarray(3+r).indexOf(0);if(a===-1)return;const o=Dc(k5(t.data,3+r,a));let l;return i==="-->"?l=Dc(k5(t.data,4+r+a)):l=TOt(t.data.subarray(4+r+a)),e.mimeType=i,e.pictureType=s,e.description=o,e.data=l,e}function xOt(t){if(t.size<2)return;const e=Dc(t.data,!0),n=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:n.buffer}}function IOt(t){if(t.size<2)return;if(t.type==="TXXX"){let n=1;const r=Dc(t.data.subarray(n),!0);n+=r.length+1;const i=Dc(t.data.subarray(n));return{key:t.type,info:r,data:i}}const e=Dc(t.data.subarray(1));return{key:t.type,info:"",data:e}}function OOt(t){if(t.type==="WXXX"){if(t.size<2)return;let n=1;const r=Dc(t.data.subarray(n),!0);n+=r.length+1;const i=Dc(t.data.subarray(n));return{key:t.type,info:r,data:i}}const e=Dc(t.data);return{key:t.type,info:"",data:e}}function POt(t){return t.type==="PRIV"?xOt(t):t.type[0]==="W"?OOt(t):t.type==="APIC"?COt(t):IOt(t)}function ROt(t){const e=String.fromCharCode(t[0],t[1],t[2],t[3]),n=RN(t,4),r=10;return{type:e,size:n,data:t.subarray(r,r+n)}}const GO=10,LOt=10;function cye(t){let e=0;const n=[];for(;GH(t,e);){const r=RN(t,e+6);t[e+5]>>6&1&&(e+=GO),e+=GO;const i=e+r;for(;e+LOt<i;){const s=ROt(t.subarray(e)),a=POt(s);a&&n.push(a),e+=s.size+GO}iye(t,e)&&(e+=GO)}return n}function dye(t){return t&&t.key==="PRIV"&&t.info==="com.apple.streaming.transportStreamTimestamp"}function DOt(t){if(t.data.byteLength===8){const e=new Uint8Array(t.data),n=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,n&&(r+=4772185884e-2),Math.round(r)}}function qH(t){const e=cye(t);for(let n=0;n<e.length;n++){const r=e[n];if(dye(r))return DOt(r)}}let wc=function(t){return t.audioId3="org.id3",t.dateRange="com.apple.quicktime.HLS",t.emsg="https://aomedia.org/emsg/ID3",t.misbklv="urn:misb:KLV:bin:1910.1",t}({});function Lh(t="",e=9e4){return{type:t,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class KH{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,n,r,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,n){return!1}appendFrame(e,n,r){}demux(e,n){this.cachedData&&(e=Pd(this.cachedData,e),this.cachedData=null);let r=AC(e,0),i=r?r.length:0,s;const a=this._audioTrack,o=this._id3Track,l=r?qH(r):void 0,u=e.length;for((this.basePTS===null||this.frameIndex===0&&sn(l))&&(this.basePTS=kOt(l,n,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:wc.audioId3,duration:Number.POSITIVE_INFINITY});i<u;){if(this.canParse(e,i)){const c=this.appendFrame(a,e,i);c?(this.frameIndex++,this.lastPTS=c.sample.pts,i+=c.length,s=i):i=u}else EOt(e,i)?(r=AC(e,i),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:wc.audioId3,duration:Number.POSITIVE_INFINITY}),i+=r.length,s=i):i++;if(i===u&&s!==u){const c=e.slice(s);this.cachedData?this.cachedData=Pd(this.cachedData,c):this.cachedData=c}}return{audioTrack:a,videoTrack:Lh(),id3Track:o,textTrack:Lh()}}demuxSampleAes(e,n,r){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const n=this.cachedData;return n&&(this.cachedData=null,this.demux(n,0)),{audioTrack:this._audioTrack,videoTrack:Lh(),id3Track:this._id3Track,textTrack:Lh()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const kOt=(t,e,n)=>{if(sn(t))return t*90;const r=n?n.baseTime*9e4/n.timescale:0;return e*9e4+r};let WO=null;const NOt=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],MOt=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],FOt=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],$Ot=[0,1,1,4];function fye(t,e,n,r,i){if(n+24>e.length)return;const s=hye(e,n);if(s&&n+s.frameLength<=e.length){const a=s.samplesPerFrame*9e4/s.sampleRate,o=r+i*a,l={unit:e.subarray(n,n+s.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(l),{sample:l,length:s.frameLength,missing:0}}}function hye(t,e){const n=t[e+1]>>3&3,r=t[e+1]>>1&3,i=t[e+2]>>4&15,s=t[e+2]>>2&3;if(n!==1&&i!==0&&i!==15&&s!==3){const a=t[e+2]>>1&1,o=t[e+3]>>6,l=n===3?3-r:r===3?3:4,u=NOt[l*14+i-1]*1e3,d=MOt[(n===3?0:n===2?1:2)*3+s],f=o===3?1:2,h=FOt[n][r],g=$Ot[r],v=h*8*g,b=Math.floor(h*u/d+a)*g;if(WO===null){const w=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);WO=w?parseInt(w[1]):0}return!!WO&&WO<=87&&r===2&&u>=224e3&&o===0&&(t[e+3]=t[e+3]|128),{sampleRate:d,channelCount:f,frameLength:b,samplesPerFrame:v}}}function YH(t,e){return t[e]===255&&(t[e+1]&224)===224&&(t[e+1]&6)!==0}function pye(t,e){return e+1<t.length&&YH(t,e)}function BOt(t,e){return YH(t,e)&&4<=t.length-e}function gye(t,e){if(e+1<t.length&&YH(t,e)){const r=hye(t,e);let i=4;r!=null&&r.frameLength&&(i=r.frameLength);const s=e+i;return s===t.length||pye(t,s)}return!1}class UOt extends KH{constructor(e,n){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=n}resetInitSegment(e,n,r,i){super.resetInitSegment(e,n,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e,n){if(!e)return!1;const r=AC(e,0);let i=(r==null?void 0:r.length)||0;if(gye(e,i))return!1;for(let s=e.length;i<s;i++)if(bOt(e,i))return n.log("ADTS sync word found !"),!0;return!1}canParse(e,n){return yOt(e,n)}appendFrame(e,n,r){oye(e,this.observer,n,r,e.manifestCodec);const i=uye(e,n,r,this.basePTS,this.frameIndex);if(i&&i.missing===0)return i}}const mye=(t,e)=>{let n=0,r=5;e+=r;const i=new Uint32Array(1),s=new Uint32Array(1),a=new Uint8Array(1);for(;r>0;){a[0]=t[e];const o=Math.min(r,8),l=8-o;s[0]=4278190080>>>24+l<<l,i[0]=(a[0]&s[0])>>l,n=n?n<<o|i[0]:i[0],e+=1,r-=o}return n};class VOt extends KH{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,n,r,i){super.resetInitSegment(e,n,r,i),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}}canParse(e,n){return n+64<e.length}appendFrame(e,n,r){const i=vye(e,n,r,this.basePTS,this.frameIndex);if(i!==-1)return{sample:e.samples[e.samples.length-1],length:i,missing:0}}static probe(e){if(!e)return!1;const n=AC(e,0);if(!n)return!1;const r=n.length;return e[r]===11&&e[r+1]===119&&qH(n)!==void 0&&mye(e,r)<16}}function vye(t,e,n,r,i){if(n+8>e.length||e[n]!==11||e[n+1]!==119)return-1;const s=e[n+4]>>6;if(s>=3)return-1;const o=[48e3,44100,32e3][s],l=e[n+4]&63,c=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][l*3+s]*2;if(n+c>e.length)return-1;const d=e[n+6]>>5;let f=0;d===2?f+=2:(d&1&&d!==1&&(f+=2),d&4&&(f+=2));const h=(e[n+6]<<8|e[n+7])>>12-f&1,v=[2,1,2,3,3,4,4,5][d]+h,b=e[n+5]>>3,S=e[n+5]&7,A=new Uint8Array([s<<6|b<<1|S>>2,(S&3)<<6|d<<3|h<<2|l>>4,l<<4&224]),w=1536/o*9e4,x=r+i*w,P=e.subarray(n,n+c);return t.config=A,t.channelCount=v,t.samplerate=o,t.samples.push({unit:P,pts:x}),c}class HOt extends KH{resetInitSegment(e,n,r,i){super.resetInitSegment(e,n,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const n=AC(e,0);let r=(n==null?void 0:n.length)||0;if(n&&e[r]===11&&e[r+1]===119&&qH(n)!==void 0&&mye(e,r)<=16)return!1;for(let i=e.length;r<i;r++)if(gye(e,r))return ji.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,n){return BOt(e,n)}appendFrame(e,n,r){if(this.basePTS!==null)return fye(e,n,r,this.basePTS,this.frameIndex)}}const jOt=/\/emsg[-/]ID3/i;class zOt{constructor(e,n){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=n}resetTimeStamp(){}resetInitSegment(e,n,r,i){const s=this.videoTrack=Lh("video",1),a=this.audioTrack=Lh("audio",1),o=this.txtTrack=Lh("text",1);if(this.id3Track=Lh("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const l=xve(e);if(l.video){const{id:u,timescale:c,codec:d,supplemental:f}=l.video;s.id=u,s.timescale=o.timescale=c,s.codec=d,s.supplemental=f}if(l.audio){const{id:u,timescale:c,codec:d}=l.audio;a.id=u,a.timescale=c,a.codec=d}o.id=wve.text,s.sampleDuration=0,s.duration=a.duration=i}resetContiguity(){this.remainderData=null}static probe(e){return Vxt(e)}demux(e,n){this.timeOffset=n;let r=e;const i=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Pd(this.remainderData,e));const o=Kxt(r);this.remainderData=o.remainder,i.samples=o.valid||new Uint8Array}else i.samples=r;const a=this.extractID3Track(i,n);return s.samples=nee(n,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,n=this.videoTrack,r=this.txtTrack;n.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(n,this.timeOffset);return r.samples=nee(e,n),{videoTrack:n,audioTrack:Lh(),id3Track:i,textTrack:Lh()}}extractID3Track(e,n){const r=this.id3Track;if(e.samples.length){const i=Lr(e.samples,["emsg"]);i&&i.forEach(s=>{const a=Zxt(s);if(jOt.test(a.schemeIdUri)){const o=Bee(a,n);let l=a.eventDuration===4294967295?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;l<=.001&&(l=Number.POSITIVE_INFINITY);const u=a.payload;r.samples.push({data:u,len:u.byteLength,dts:o,pts:o,type:wc.emsg,duration:l})}else if(this.config.enableEmsgKLVMetadata&&a.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=Bee(a,n);r.samples.push({data:a.payload,len:a.payload.byteLength,dts:o,pts:o,type:wc.misbklv,duration:Number.POSITIVE_INFINITY})}})}return r}demuxSampleAes(e,n,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function Bee(t,e){return sn(t.presentationTime)?t.presentationTime/t.timeScale:e+t.presentationTimeDelta/t.timeScale}class GOt{constructor(e,n,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new BH(n,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Rv.cbc)}decryptAacSample(e,n,r){const i=e[n].unit;if(i.length<=16)return;const s=i.subarray(16,i.length-i.length%16),a=s.buffer.slice(s.byteOffset,s.byteOffset+s.length);this.decryptBuffer(a).then(o=>{const l=new Uint8Array(o);i.set(l,16),this.decrypter.isSync()||this.decryptAacSamples(e,n+1,r)}).catch(r)}decryptAacSamples(e,n,r){for(;;n++){if(n>=e.length){r();return}if(!(e[n].unit.length<32)&&(this.decryptAacSample(e,n,r),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const n=Math.floor((e.length-48)/160)*16+16,r=new Int8Array(n);let i=0;for(let s=32;s<e.length-16;s+=160,i+=16)r.set(e.subarray(s,s+16),i);return r}getAvcDecryptedUnit(e,n){const r=new Uint8Array(n);let i=0;for(let s=32;s<e.length-16;s+=160,i+=16)e.set(r.subarray(i,i+16),s);return e}decryptAvcSample(e,n,r,i,s){const a=Pve(s.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then(l=>{s.data=this.getAvcDecryptedUnit(a,l),this.decrypter.isSync()||this.decryptAvcSamples(e,n,r+1,i)}).catch(i)}decryptAvcSamples(e,n,r,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,r=0){if(n>=e.length){i();return}const s=e[n].units;for(;!(r>=s.length);r++){const a=s[r];if(!(a.data.length<=48||a.type!==1&&a.type!==5)&&(this.decryptAvcSample(e,n,r,i,a),!this.decrypter.isSync()))return}}}}class yye{constructor(){this.VideoSample=null}createVideoSample(e,n,r){return{key:e,frame:!1,pts:n,dts:r,units:[],length:0}}getLastNalUnit(e){var n;let r=this.VideoSample,i;if((!r||r.units.length===0)&&(r=e[e.length-1]),(n=r)!=null&&n.units){const s=r.units;i=s[s.length-1]}return i}pushAccessUnit(e,n){if(e.units.length&&e.frame){if(e.pts===void 0){const r=n.samples,i=r.length;if(i){const s=r[i-1];e.pts=s.pts,e.dts=s.dts}else{n.dropped++;return}}n.samples.push(e)}}parseNALu(e,n,r){const i=n.byteLength;let s=e.naluState||0;const a=s,o=[];let l=0,u,c,d,f=-1,h=0;for(s===-1&&(f=0,h=this.getNALuType(n,0),s=0,l=1);l<i;){if(u=n[l++],!s){s=u?0:1;continue}if(s===1){s=u?0:2;continue}if(!u)s=3;else if(u===1){if(c=l-s-1,f>=0){const g={data:n.subarray(f,c),type:h};o.push(g)}else{const g=this.getLastNalUnit(e.samples);g&&(a&&l<=4-a&&g.state&&(g.data=g.data.subarray(0,g.data.byteLength-a)),c>0&&(g.data=Pd(g.data,n.subarray(0,c)),g.state=0))}l<i?(d=this.getNALuType(n,l),f=l,h=d,s=0):s=-1}else s=0}if(f>=0&&s>=0){const g={data:n.subarray(f,i),type:h,state:s};o.push(g)}if(o.length===0){const g=this.getLastNalUnit(e.samples);g&&(g.data=Pd(g.data,n))}return e.naluState=s,o}}class o_{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,n=this.bytesAvailable,r=e.byteLength-n,i=new Uint8Array(4),s=Math.min(4,n);if(s===0)throw new Error("no bytes available");i.set(e.subarray(r,r+s)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=s*8,this.bytesAvailable-=s}skipBits(e){let n;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>
vendor: 4,189 bytes, line 661
661e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,n=e>>3,e-=n<<3,this.bytesAvailable-=n,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let n=Math.min(this.bitsAvailable,e);const r=this.word>>>32-n;if(e>32&&ji.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=n,this.bitsAvailable>0)this.word<<=n;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return n=e-n,n>0&&this.bitsAvailable?r<<n|this.readBits(n):r}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class WOt extends yye{parsePES(e,n,r,i){const s=this.parseNALu(e,r.data,i);let a=this.VideoSample,o,l=!1;r.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach(u=>{var c,d;switch(u.type){case 1:{let v=!1;o=!0;const b=u.data;if(l&&b.length>4){const S=this.readSliceType(b);(S===2||S===4||S===7||S===9)&&(v=!0)}if(v){var f;(f=a)!=null&&f.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),a.frame=!0,a.key=v;break}case 5:o=!0,(c=a)!=null&&c.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),a.key=!0,a.frame=!0;break;case 6:{o=!0,NH(u.data,1,r.pts,n.samples);break}case 7:{var h,g;o=!0,l=!0;const v=u.data,b=this.readSPS(v);if(!e.sps||e.width!==b.width||e.height!==b.height||((h=e.pixelRatio)==null?void 0:h[0])!==b.pixelRatio[0]||((g=e.pixelRatio)==null?void 0:g[1])!==b.pixelRatio[1]){e.width=b.width,e.height=b.height,e.pixelRatio=b.pixelRatio,e.sps=[v];const S=v.subarray(1,4);let A="avc1.";for(let w=0;w<3;w++){let x=S[w].toString(16);x.length<2&&(x="0"+x),A+=x}e.codec=A}break}case 8:o=!0,e.pps=[u.data];break;case 9:o=!0,e.audFound=!0,(d=a)!=null&&d.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:o=!0;break;default:o=!1;break}a&&o&&a.units.push(u)}),i&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,n){return e[n]&31}readSliceType(e){const n=new o_(e);return n.readUByte(),n.readUEG(),n.readUEG()}skipScalingList(e,n){let r=8,i=8,s;for(let a=0;a<e;a++)i!==0&&(s=n.readEG(),i=(r+s+256)%256),r=i===0?r:i}readSPS(e){const n=new o_(e);let r=0,i=0,s=0,a=0,o,l,u;const c=n.readUByte.bind(n),d=n.readBits.bind(n),f=n.readUEG.bind(n),h=n.readBoolean.bind(n),g=n.skipBits.bind(n),v=n.skipEG.bind(n),b=n.skipUEG.bind(n),S=this.skipScalingList.bind(this);c();const A=c();if(d(5),g(3),c(),b(),A===100||A===110||A===122||A===244||A===44||A===83||A===86||A===118||A===128){const U=f();if(U===3&&g(1),b(),b(),g(1),h())for(l=U!==3?8:12,u=0;u<l;u++)h()&&(u<6?S(16,n):S(64,n))}b();const w=f();if(w===0)f();else if(w===1)for(g(1),v(),v(),o=f(),u=0;u<o;u++)v();b(),g(1);const x=f(),P=f(),N=d(1);N===0&&g(1),g(1),h()&&(r=f(),i=f(),s=f(),a=f());let k=[1,1];if(h()&&h())switch(c()){case 1:k=[1,1];break;case 2:k=[12,11];break;case 3:k=[10,11];break;case 4:k=[16,11];break;case 5:k=[40,33];break;case 6:k=[24,11];break;case 7:k=[20,11];break;case 8:k=[32,11];break;case 9:k=[80,33];break;case 10:k=[18,11];break;case 11:k=[15,11];break;case 12:k=[64,33];break;case 13:k=[160,99];break;case 14:k=[4,3];break;case 15:k=[3,2];break;case 16:k=[2,1];break;case 255:{k=[c()<<8|c(),c()<<8|c()];break}}return{width:Math.ceil((x+1)*16-r*2-i*2),height:(2-N)*(P+1)*16-(N?2:4)*(s+a),pixelRatio:k}}}class qOt extends yye{constructor(...e){super(...e),this.initVPS=null}parsePES(e,n,r,i){const s=this.parseNALu(e,r.data,i);let a=this.VideoSample,o,l=!1;r.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEac
vendor: 17,971 bytes, line 661
661h(u=>{var c,d;switch(u.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:a||(a=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),a.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!0,l){var f;(f=a)!=null&&f.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),a.key=!0,a.frame=!0;break;case 19:case 20:o=!0,(c=a)!=null&&c.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),a.key=!0,a.frame=!0;break;case 39:o=!0,NH(u.data,2,r.pts,n.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=ns(e.params,this.readVPS(u.data)),this.initVPS=u.data),e.vps=[u.data];break;case 33:if(o=!0,l=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],u.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const h=this.readSPS(u.data);e.width=h.width,e.height=h.height,e.pixelRatio=h.pixelRatio,e.codec=h.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const g in h.params)e.params[g]=h.params[g]}this.pushParameterSet(e.sps,u.data,e.vps),a||(a=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),a.key=!0;break;case 34:if(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const h=this.readPPS(u.data);for(const g in h)e.params[g]=h[g]}this.pushParameterSet(e.pps,u.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(d=a)!=null&&d.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:o=!1;break}a&&o&&a.units.push(u)}),i&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}pushParameterSet(e,n,r){(r&&r[0]===this.initVPS||!r&&!e.length)&&e.push(n)}getNALuType(e,n){return(e[n]&126)>>>1}ebsp2rbsp(e){const n=new Uint8Array(e.byteLength);let r=0;for(let i=0;i<e.byteLength;i++)i>=2&&e[i]===3&&e[i-1]===0&&e[i-2]===0||(n[r]=e[i],r++);return new Uint8Array(n.buffer,0,r)}pushAccessUnit(e,n){super.pushAccessUnit(e,n),this.initVPS&&(this.initVPS=null)}readVPS(e){const n=new o_(e);n.readUByte(),n.readUByte(),n.readBits(4),n.skipBits(2),n.readBits(6);const r=n.readBits(3),i=n.readBoolean();return{numTemporalLayers:r+1,temporalIdNested:i}}readSPS(e){const n=new o_(this.ebsp2rbsp(e));n.readUByte(),n.readUByte(),n.readBits(4);const r=n.readBits(3);n.readBoolean();const i=n.readBits(2),s=n.readBoolean(),a=n.readBits(5),o=n.readUByte(),l=n.readUByte(),u=n.readUByte(),c=n.readUByte(),d=n.readUByte(),f=n.readUByte(),h=n.readUByte(),g=n.readUByte(),v=n.readUByte(),b=n.readUByte(),S=n.readUByte(),A=[],w=[];for(let se=0;se<r;se++)A.push(n.readBoolean()),w.push(n.readBoolean());if(r>0)for(let se=r;se<8;se++)n.readBits(2);for(let se=0;se<r;se++)A[se]&&(n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte(),n.readUByte()),w[se]&&n.readUByte();n.readUEG();const x=n.readUEG();x==3&&n.skipBits(1);const P=n.readUEG(),N=n.readUEG(),k=n.readBoolean();let U=0,H=0,B=0,q=0;k&&(U+=n.readUEG(),H+=n.readUEG(),B+=n.readUEG(),q+=n.readUEG());const Z=n.readUEG(),C=n.readUEG(),L=n.readUEG(),V=n.readBoolean();for(let se=V?0:r;se<=r;se++)n.skipUEG(),n.skipUEG(),n.skipUEG();if(n.skipUEG(),n.skipUEG(),n.skipUEG(),n.skipUEG(),n.skipUEG(),n.skipUEG(),n.readBoolean()&&n.readBoolean())for(let Fe=0;Fe<4;Fe++)for(let ht=0;ht<(Fe===3?2:6);ht++)if(!n.readBoolean())n.readUEG();else{const pt=Math.min(64,1<<4+(Fe<<1));Fe>1&&n.readEG();for(let me=0;me<pt;me++)n.readEG()}n.readBoolean(),n.readBoolean(),n.readBoolean()&&(n.readUByte(),n.skipUEG(),n.skipUEG(),n.readBoolean());const G=n.readUEG();let ie=0;for(let se=0;se<G;se++){let Fe=!1;if(se!==0&&(Fe=n.readBoolean()),Fe){se===G&&n.readUEG(),n.readBoolean(),n.readUEG();let ht=0;for(let Ct=0;Ct<=ie;Ct++){const pt=n.readBoolean();let me=!1;pt||(me=n.readBoolean()),(pt||me)&&ht++}ie=ht}else{const ht=n.readUEG(),Ct=n.readUEG();ie=ht+Ct;for(let pt=0;pt<ht;pt++)n.readUEG(),n.readBoolean();for(let pt=0;pt<Ct;pt++)n.readUEG(),n.readBoolean()}}if(n.readBoolean()){const se=n.readUEG();for(let Fe=0;Fe<se;Fe++){for(let ht=0;ht<L+4;ht++)n.readBits(1);n.readBits(1)}}let ue=0,Q=1,de=1,le=!0,ye=1,fe=0;n.readBoolean(),n.readBoolean();let We=!1;if(n.readBoolean()){if(n.readBoolean()){const De=n.readUByte(),Me=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],qe=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];De>0&&De<16?(Q=Me[De-1],de=qe[De-1]):De===255&&(Q=n.readBits(16),de=n.readBits(16))}if(n.readBoolean()&&n.readBoolean(),n.readBoolean()&&(n.readBits(3),n.readBoolean(),n.readBoolean()&&(n.readUByte(),n.readUByte(),n.readUByte())),n.readBoolean()&&(n.readUEG(),n.readUEG()),n.readBoolean(),n.readBoolean(),n.readBoolean(),We=n.readBoolean(),We&&(n.skipUEG(),n.skipUEG(),n.skipUEG(),n.skipUEG()),n.readBoolean()&&(ye=n.readBits(32),fe=n.readBits(32),n.readBoolean()&&n.readUEG(),n.readBoolean())){const qe=n.readBoolean(),ut=n.readBoolean();let Tt=!1;(qe||ut)&&(Tt=n.readBoolean(),Tt&&(n.readUByte(),n.readBits(5),n.readBoolean(),n.readBits(5)),n.readBits(4),n.readBits(4),Tt&&n.readBits(4),n.readBits(5),n.readBits(5),n.readBits(5));for(let jt=0;jt<=r;jt++){le=n.readBoolean();const on=le||n.readBoolean();let wn=!1;on?n.readEG():wn=n.readBoolean();const kr=wn?1:n.readUEG()+1;if(qe)for(let Ir=0;Ir<kr;Ir++)n.readUEG(),n.readUEG(),Tt&&(n.readUEG(),n.readUEG()),n.skipBits(1);if(ut)for(let Ir=0;Ir<kr;Ir++)n.readUEG(),n.readUEG(),Tt&&(n.readUEG(),n.readUEG()),n.skipBits(1)}}n.readBoolean()&&(n.readBoolean(),n.readBoolean(),n.readBoolean(),ue=n.readUEG())}let Ve=P,at=N;if(k){let se=1,Fe=1;x===1?se=Fe=2:x==2&&(se=2),Ve=P-se*H-se*U,at=N-Fe*q-Fe*B}const Et=i?["A","B","C"][i]:"",ne=o<<24|l<<16|u<<8|c;let Ze=0;for(let se=0;se<32;se++)Ze=(Ze|(ne>>se&1)<<31-se)>>>0;let lt=Ze.toString(16);return a===1&&lt==="2"&&(lt="6"),{codecString:`hvc1.${Et}${a}.${lt}.${s?"H":"L"}${S}.B0`,params:{general_tier_flag:s,general_profile_idc:a,general_profile_space:i,general_profile_compatibility_flags:[o,l,u,c],general_constraint_indicator_flags:[d,f,h,g,v,b],general_level_idc:S,bit_depth:Z+8,bit_depth_luma_minus8:Z,bit_depth_chroma_minus8:C,min_spatial_segmentation_idc:ue,chroma_format_idc:x,frame_rate:{fixed:le,fps:fe/ye}},width:Ve,height:at,pixelRatio:[Q,de]}}readPPS(e){const n=new o_(this.ebsp2rbsp(e));n.readUByte(),n.readUByte(),n.skipUEG(),n.skipUEG(),n.skipBits(2),n.skipBits(3),n.skipBits(2),n.skipUEG(),n.skipUEG(),n.skipEG(),n.skipBits(2),n.readBoolean()&&n.skipUEG(),n.skipEG(),n.skipEG(),n.skipBits(4);const i=n.readBoolean(),s=n.readBoolean();let a=1;return s&&i?a=0:s?a=3:i&&(a=2),{parallelismType:a}}matchSPS(e,n){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,n).substr(3)}}const _o=188;class Dm{constructor(e,n,r,i){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=n,this.typeSupported=r,this.logger=i,this.videoParser=null}static probe(e,n){const r=Dm.syncOffset(e);return r>0&&n.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const n=e.length;let r=Math.min(_o*5,n-_o)+1,i=0;for(;i<r;){let s=!1,a=-1,o=0;for(let l=i;l<n;l+=_o)if(e[l]===71&&(n-l===_o||e[l+_o]===71)){if(o++,a===-1&&(a=l,a!==0&&(r=Math.min(a+_o*99,e.length-_o)+1)),s||(s=f6(e,l)===0),s&&o>1&&(a===0&&o>2||l+_o>r))return a}else{if(o)return-1;break}i++}return-1}static createTrack(e,n){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:wve[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?n:void 0}}resetInitSegment(e,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Dm.createTrack("video"),this._videoTrack.duration=i,this._audioTrack=Dm.createTrack("audio",i),this._id3Track=Dm.createTrack("id3"),this._txtTrack=Dm.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=n,this.videoCodec=r}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:n,_id3Track:r}=this;e&&(e.pesData=null),n&&(n.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,n,r=!1,i=!1){r||(this.sampleAes=null);let s;const a=this._videoTrack,o=this._audioTrack,l=this._id3Track,u=this._txtTrack;let c=a.pid,d=a.pesData,f=o.pid,h=l.pid,g=o.pesData,v=l.pesData,b=null,S=this.pmtParsed,A=this._pmtId,w=e.length;if(this.remainderData&&(e=Pd(this.remainderData,e),w=e.length,this.remainderData=null),w<_o&&!i)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:l,textTrack:u};const x=Math.max(0,Dm.syncOffset(e));w-=(w-x)%_o,w<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,w,e.buffer.byteLength-w));let P=0;for(let k=x;k<w;k+=_o)if(e[k]===71){const U=!!(e[k+1]&64),H=f6(e,k),B=(e[k+3]&48)>>4;let q;if(B>1){if(q=k+5+e[k+4],q===k+_o)continue}else q=k+4;switch(H){case c:U&&(d&&(s=IS(d,this.logger))&&(this.readyVideoParser(a.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(a,u,s,!1)),d={data:[],size:0}),d&&(d.data.push(e.subarray(q,k+_o)),d.size+=k+_o-q);break;case f:if(U){if(g&&(s=IS(g,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,s);break;case"mp3":this.parseMPEGPES(o,s);break;case"ac3":this.parseAC3PES(o,s);break}g={data:[],size:0}}g&&(g.data.push(e.subarray(q,k+_o)),g.size+=k+_o-q);break;case h:U&&(v&&(s=IS(v,this.logger))&&this.parseID3PES(l,s),v={data:[],size:0}),v&&(v.data.push(e.subarray(q,k+_o)),v.size+=k+_o-q);break;case 0:U&&(q+=e[q]+1),A=this._pmtId=KOt(e,q);break;case A:{U&&(q+=e[q]+1);const Z=YOt(e,q,this.typeSupported,r,this.observer,this.logger);c=Z.videoPid,c>0&&(a.pid=c,a.segmentCodec=Z.segmentVideoCodec),f=Z.audioPid,f>0&&(o.pid=f,o.segmentCodec=Z.segmentAudioCodec),h=Z.id3Pid,h>0&&(l.pid=h),b!==null&&!S&&(this.logger.warn(`MPEG-TS PMT found at ${k} after unknown PID '${b}'. Backtracking to sync byte @${x} to parse all TS packets.`),b=null,k=x-188),S=this.pmtParsed=!0;break}case 17:case 8191:break;default:b=H;break}}else P++;P>0&&h6(this.observer,new Error(`Found ${P} TS packet/s that do not start with 0x47`),void 0,this.logger),a.pesData=d,o.pesData=g,l.pesData=v;const N={audioTrack:o,videoTrack:a,id3Track:l,textTrack:u};return i&&this.extractRemainingSamples(N),N}flush(){const{remainderData:e}=this;this.remainderData=null;let n;return e?n=this.demux(e,-1,!1,!0):n={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(n),this.sampleAes?this.decrypt(n,this.sampleAes):n}extractRemainingSamples(e){const{audioTrack:n,videoTrack:r,id3Track:i,textTrack:s}=e,a=r.pesData,o=n.pesData,l=i.pesData;let u;if(a&&(u=IS(a,this.logger))?(this.readyVideoParser(r.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(r,s,u,!0),r.pesData=null)):r.pesData=a,o&&(u=IS(o,this.logger))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,u);break;case"mp3":this.parseMPEGPES(n,u);break;case"ac3":this.parseAC3PES(n,u);break}n.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o;l&&(u=IS(l,this.logger))?(this.parseID3PES(i,u),i.pesData=null):i.pesData=l}demuxSampleAes(e,n,r){const i=this.demux(e,r,!0,!this.config.progressive),s=this.sampleAes=new GOt(this.observer,this.config,n);return this.decrypt(i,s)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new WOt:e==="hevc"&&(this.videoParser=new qOt))}decrypt(e,n){return new Promise(r=>{const{audioTrack:i,videoTrack:s}=e;i.samples&&i.segmentCodec==="aac"?n.decryptAacSamples(i.samples,0,()=>{s.samples?n.decryptAvcSamples(s.samples,0,0,()=>{r(e)}):r(e)}):s.samples&&n.decryptAvcSamples(s.samples,0,0,()=>{r(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,n){let r=0;const i=this.aacOverFlow;let s=n.data;if(i){this.aacOverFlow=null;const d=i.missing,f=i.sample.unit.byteLength;if(d===-1)s=Pd(i.sample.unit,s);else{const h=f-d;i.sample.unit.set(s.subarray(0,d),h),e.samples.push(i.sample),r=i.missing}}let a,o;for(a=r,o=s.length;a<o-1&&!jD(s,a);a++);if(a!==r){let d;const f=a<o-1;if(f?d=`AAC PES did not start with ADTS header,offset:${a}`:d="No ADTS header found in AAC PES",h6(this.observer,new Error(d),f,this.logger),!f)return}oye(e,this.observer,s,a,this.audioCodec);let l;if(n.pts!==void 0)l=n.pts;else if(i){const d=lye(e.samplerate);l=i.sample.pts+d}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let u=0,c;for(;a<o;)if(c=uye(e,s,a,l,u),a+=c.length,c.missing){this.aacOverFlow=c;break}else for(u++;a<o-1&&!jD(s,a);a++);}parseMPEGPES(e,n){const r=n.data,i=r.length;let s=0,a=0;const o=n.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<i;)if(pye(r,a)){const l=fye(e,r,a,o,s);if(l)a+=l.length,s++;else break}else a++}parseAC3PES(e,n){{const r=n.data,i=n.pts;if(i===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const s=r.length;let a=0,o=0,l;for(;o<s&&(l=vye(e,r,o,i,a++))>0;)o+=l}}parseID3PES(e,n){if(n.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=ns({},n,{type:this._videoTrack?wc.emsg:wc.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function f6(t,e){return((t[e+1]&31)<<8)+t[e+2]}function KOt(t,e){return(t[e+10]&31)<<8|t[e+11]}function YOt(t,e,n,r,i,s){const a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(t[e+1]&15)<<8|t[e+2],l=e+3+o-4,u=(t[e+10]&15)<<8|t[e+11];for(e+=12+u;e<l;){const c=f6(t,e),d=(t[e+3]&15)<<8|t[e+4];switch(t[e]){case 207:if(!r){N5("ADTS AAC",s);break}case 15:a.audioPid===-1&&(a.audioPid=c);break;case 21:a.id3Pid===-1&&(a.id3Pid=c);break;case 219:if(!r){N5("H.264",s);break}case 27:a.videoPid===-1&&(a.videoPid=c);break;case 3:case 4:!n.mpeg&&!n.mp3?s.log("MPEG audio found, not supported in this browser"):a.audioPid===-1&&(a.audioPid=c,a.segmentAudioCodec="mp3");break;case 193:if(!r){N5("AC-3",s);break}case 129:n.ac3?a.audioPid===-1&&(a.audioPid=c,a.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(a.audioPid===-1&&d>0){let f=e+5,h=d;for(;h>2;){switch(t[f]){case 106:n.ac3!==!0?s.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=c,a.segmentAudioCodec="ac3");break}const v=t[f+1]+2;f+=v,h-=v}}break;case 194:case 135:return h6(i,new Error("Unsupported EC-3 in M2TS found"),void 0,s),a;case 36:a.videoPid===-1&&(a.videoPid=c,a.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"));break}e+=d+5}return a}function h6(t,e,n,r){r.warn(`parsing error: ${e.message}`),t.emit(Y.ERROR,Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_PARSING_ERROR,fatal:!1,levelRetry:n,error:e,reason:e.message})}function N5(t,e){e.log(`${t} with AES-128-CBC encryption found in unencrypted stream`)}function IS(t,e){let n=0,r,i,s,a,o;const l=t.data;if(!t||t.size===0)return null;for(;l[0].length<19&&l.length>1;)l[0]=Pd(l[0],l[1]),l.splice(1,1);if(r=l[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(i=(r[4]<<8)+r[5],i&&i>t.size-6)return null;const c=r[7];c&192&&(a=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,c&64?(o=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,a-o>60*9e4&&(e.warn(`${Math.round((a-o)/9e4)}s delta between PTS and DTS, align them`),a=o)):o=a),s=r[8];let d=s+9;if(t.size<=d)return null;t.size-=d;const f=new Uint8Array(t.size);for(let h=0,g=l.length;h<g;h++){r=l[h];let v=r.byteLength;if(d)if(d>v){d-=v;continue}else r=r.subarray(d),v-=d,d=0;f.set(r,n),n+=v}return i&&(i-=s+3),{data:f,pts:a,dts:o,len:i}}return null}class ZOt{static getSilentFrame(e,n){switch(e){case"mp4a.40.2":if(n===1)return new Uint8Array([0,200,0,128,35,128]);if(n===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(n===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(n===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(n===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(n===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(n===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(n===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(n===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const gm=Math.pow(2,32)-1;class it{static init(){it.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in it.types)it.types.hasOwnProperty(e)&&(it.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new 
vendor: 4,706 bytes, line 661
661Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);it.HDLR_TYPES={video:n,audio:r};const i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);it.STTS=it.STSC=it.STCO=s,it.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),it.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),it.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),it.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);it.FTYP=it.box(it.types.ftyp,a,l,a,o),it.DINF=it.box(it.types.dinf,it.box(it.types.dref,i))}static box(e,...n){let r=8,i=n.length;const s=i;for(;i--;)r+=n[i].byteLength;const a=new Uint8Array(r);for(a[0]=r>>24&255,a[1]=r>>16&255,a[2]=r>>8&255,a[3]=r&255,a.set(e,4),i=0,r=8;i<s;i++)a.set(n[i],r),r+=n[i].byteLength;return a}static hdlr(e){return it.box(it.types.hdlr,it.HDLR_TYPES[e])}static mdat(e){return it.box(it.types.mdat,e)}static mdhd(e,n){n*=e;const r=Math.floor(n/(gm+1)),i=Math.floor(n%(gm+1));return it.box(it.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))}static mdia(e){return it.box(it.types.mdia,it.mdhd(e.timescale||0,e.duration||0),it.hdlr(e.type),it.minf(e))}static mfhd(e){return it.box(it.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?it.box(it.types.minf,it.box(it.types.smhd,it.SMHD),it.DINF,it.stbl(e)):it.box(it.types.minf,it.box(it.types.vmhd,it.VMHD),it.DINF,it.stbl(e))}static moof(e,n,r){return it.box(it.types.moof,it.mfhd(e),it.traf(r,n))}static moov(e){let n=e.length;const r=[];for(;n--;)r[n]=it.trak(e[n]);return it.box.apply(null,[it.types.moov,it.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(it.mvex(e)))}static mvex(e){let n=e.length;const r=[];for(;n--;)r[n]=it.trex(e[n]);return it.box.apply(null,[it.types.mvex,...r])}static mvhd(e,n){n*=e;const r=Math.floor(n/(gm+1)),i=Math.floor(n%(gm+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&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 it.box(it.types.mvhd,s)}static sdtp(e){const n=e.samples||[],r=new Uint8Array(4+n.length);let i,s;for(i=0;i<n.length;i++)s=n[i].flags,r[i+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return it.box(it.types.sdtp,r)}static stbl(e){return it.box(it.types.stbl,it.stsd(e),it.box(it.types.stts,it.STTS),it.box(it.types.stsc,it.STSC),it.box(it.types.stsz,it.STSZ),it.box(it.types.stco,it.STCO))}static avc1(e){let n=[],r=[],i,s,a;for(i=0;i<e.sps.length;i++)s=e.sps[i],a=s.byteLength,n.push(a>>>8&255),n.push(a&255),n=n.concat(Array.prototype.slice.call(s));for(i=0;i<e.pps.length;i++)s=e.pps[i],a=s.byteLength,r.push(a>>>8&255),r.push(a&255),r=r.concat(Array.prototype.slice.call(s));const o=it.box(it.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(r))),l=e.width,u=e.height,c=e.pixelRatio[0],d=e.pixelRatio[1];return it.box(it.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,l>>8&255,l&255,u>>8&255,u&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]),o,it.box(it.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),it.box(it.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,d>>24,d>>16&255,d>>8&255,d&255])))}static esds(e){const n=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...n,6,1,2])}static audioStsd(e){const n=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,n>>8&255,n&255,0,0])}static mp4a(e){return it.box(it.types.mp4a,it.audioStsd(e),it.box(it.types.esds,it.esds(e)))}static mp3(e){return it.box(it.types[".mp3"],it.audioStsd(e))}static ac3(e){return it.box(it.types["ac-3"],it.audioStsd(e),it.box(it.types.dac3,e.config))}static stsd(e){const{segmentCodec:n}=e;if(e.type==="audio"){if(n==="aac")return it.box(it.types.stsd,it.STSD,it.mp4a(e));if(n==="ac3"&&e.config)return it.box(it.types.stsd,it.STSD,it.ac3(e));if(n==="mp3"&&e.codec==="mp3")return it.box(it.types.stsd,it.STSD,it.mp3(e))}else if(e.pps&&e.sps){if(n==="avc")return it.box(it.types.stsd,it.STSD,it.avc1(e));if(n==="hevc"&&e.vps)return it.box(it.types.stsd,it.STSD,it.hvc1(e))}
vendor: 22,903 bytes, line 661
661else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${n}/${e.codec})`)}static tkhd(e){const n=e.id,r=(e.duration||0)*(e.timescale||0),i=e.width||0,s=e.height||0,a=Math.floor(r/(gm+1)),o=Math.floor(r%(gm+1));return it.box(it.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,o>>24,o>>16&255,o>>8&255,o&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,i>>8&255,i&255,0,0,s>>8&255,s&255,0,0]))}static traf(e,n){const r=it.sdtp(e),i=e.id,s=Math.floor(n/(gm+1)),a=Math.floor(n%(gm+1));return it.box(it.types.traf,it.box(it.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),it.box(it.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,a>>24,a>>16&255,a>>8&255,a&255])),it.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,it.box(it.types.trak,it.tkhd(e),it.mdia(e))}static trex(e){const n=e.id;return it.box(it.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,n){const r=e.samples||[],i=r.length,s=12+16*i,a=new Uint8Array(s);let o,l,u,c,d,f;for(n+=8+s,a.set([e.type==="video"?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),o=0;o<i;o++)l=r[o],u=l.duration,c=l.size,d=l.flags,f=l.cts,a.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&61440,d.degradPrio&15,f>>>24&255,f>>>16&255,f>>>8&255,f&255],12+16*o);return it.box(it.types.trun,a)}static initSegment(e){it.types||it.init();const n=it.moov(e);return Pd(it.FTYP,n)}static hvc1(e){const n=e.params,r=[e.vps,e.sps,e.pps],i=4,s=new Uint8Array([1,n.general_profile_space<<6|(n.general_tier_flag?32:0)|n.general_profile_idc,n.general_profile_compatibility_flags[0],n.general_profile_compatibility_flags[1],n.general_profile_compatibility_flags[2],n.general_profile_compatibility_flags[3],n.general_constraint_indicator_flags[0],n.general_constraint_indicator_flags[1],n.general_constraint_indicator_flags[2],n.general_constraint_indicator_flags[3],n.general_constraint_indicator_flags[4],n.general_constraint_indicator_flags[5],n.general_level_idc,240|n.min_spatial_segmentation_idc>>8,255&n.min_spatial_segmentation_idc,252|n.parallelismType,252|n.chroma_format_idc,248|n.bit_depth_luma_minus8,248|n.bit_depth_chroma_minus8,0,parseInt(n.frame_rate.fps),i-1|n.temporal_id_nested<<2|n.num_temporal_layers<<3|(n.frame_rate.fixed?64:0),r.length]);let a=s.length;for(let g=0;g<r.length;g+=1){a+=3;for(let v=0;v<r[g].length;v+=1)a+=2+r[g][v].length}const o=new Uint8Array(a);o.set(s,0),a=s.length;const l=r.length-1;for(let g=0;g<r.length;g+=1){o.set(new Uint8Array([32+g|(g===l?128:0),0,r[g].length]),a),a+=3;for(let v=0;v<r[g].length;v+=1)o.set(new Uint8Array([r[g][v].length>>8,r[g][v].length&255]),a),a+=2,o.set(r[g][v],a),a+=r[g][v].length}const u=it.box(it.types.hvcC,o),c=e.width,d=e.height,f=e.pixelRatio[0],h=e.pixelRatio[1];return it.box(it.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,c>>8&255,c&255,d>>8&255,d&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]),u,it.box(it.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),it.box(it.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,h>>24,h>>16&255,h>>8&255,h&255])))}}it.types=void 0;it.HDLR_TYPES=void 0;it.STTS=void 0;it.STSC=void 0;it.STCO=void 0;it.STSZ=void 0;it.VMHD=void 0;it.SMHD=void 0;it.STSD=void 0;it.FTYP=void 0;it.DINF=void 0;const bye=9e4;function ZH(t,e,n=1,r=!1){const i=t*e*n;return r?Math.round(i):i}function QOt(t,e,n=1,r=!1){return ZH(t,e,1/n,r)}function HA(t,e=!1){return ZH(t,1e3,1/bye,e)}function XOt(t,e=1){return ZH(t,bye,1/e)}function Uee(t){const{baseTime:e,timescale:n,trackId:r}=t;return`${e/n} (${e}/${n}) trackId: ${r}`}const JOt=10*1e3,ePt=1024,tPt=1152,nPt=1536;let OS=null,M5=null;function Vee(t,e,n,r){return{duration:e,size:n,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:t?2:1,isNonSync:t?0:1}}}class KP extends Fd{constructor(e,n,r,i){if(super("mp4-remuxer",i),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=n,this.typeSupported=r,this.ISGenerated=!1,OS===null){const a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);OS=a?parseInt(a[1]):0}if(M5===null){const s=navigator.userAgent.match(/Safari\/(\d+)/i);M5=s?parseInt(s[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const n=this._initPTS;(!n||!e||e.trackId!==n.trackId||e.baseTime!==n.baseTime||e.timescale!==n.timescale)&&this.log(`Reset initPTS: ${n&&Uee(n)} > ${e&&Uee(e)}`),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let n=!1;const r=e[0].pts,i=e.reduce((s,a)=>{let o=a.pts,l=o-s;return l<-4294967296&&(n=!0,o=hc(o,r),l=o-s),l>0?s:o},r);return n&&this.debug("PTS rollover detected"),i}remux(e,n,r,i,s,a,o,l){let u,c,d,f,h,g,v=s,b=s;const S=e.pid>-1,A=n.pid>-1,w=n.samples.length,x=e.samples.length>0,P=o&&w>0||w>1;if((!S||x)&&(!A||P)||this.ISGenerated||o){if(this.ISGenerated){var k,U,H,B;const L=this.videoTrackConfig;(L&&(n.width!==L.width||n.height!==L.height||((k=n.pixelRatio)==null?void 0:k[0])!==((U=L.pixelRatio)==null?void 0:U[0])||((H=n.pixelRatio)==null?void 0:H[1])!==((B=L.pixelRatio)==null?void 0:B[1]))||!L&&P||this.nextAudioTs===null&&x)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,n,s,a));const q=this.isVideoContiguous;let Z=-1,C;if(P&&(Z=rPt(n.samples),!q&&this.config.forceKeyFrameOnDiscontinuity))if(g=!0,Z>0){this.warn(`Dropped ${Z} out of ${w} video samples due to a missing keyframe`);const L=this.getVideoStartPts(n.samples);n.samples=n.samples.slice(Z),n.dropped+=Z,b+=(n.samples[0].pts-L)/n.inputTimeScale,C=b}else Z===-1&&(this.warn(`No keyframe found out of ${w} video samples`),g=!1);if(this.ISGenerated){if(x&&P){const L=this.getVideoStartPts(n.samples),j=(hc(e.samples[0].pts,L)-L)/n.inputTimeScale;v+=Math.max(0,j),b+=Math.max(0,-j)}if(x){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),d=this.generateIS(e,n,s,a)),c=this.remuxAudio(e,v,this.isAudioContiguous,a,A||P||l===yn.AUDIO?b:void 0),P){const L=c?c.endPTS-c.startPTS:0;n.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),d=this.generateIS(e,n,s,a)),u=this.remuxVideo(n,b,q,L)}}else P&&(u=this.remuxVideo(n,b,q,0));u&&(u.firstKeyFrame=Z,u.independent=Z!==-1,u.firstKeyFramePTS=C)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(h=Sye(r,s,this._initPTS,this._initDTS)),i.samples.length&&(f=Eye(i,s,this._initPTS))),{audio:c,video:u,initSegment:d,independent:g,text:f,id3:h}}computeInitPts(e,n,r,i){const s=Math.round(r*n);let a=hc(e,s);if(a<s+n)for(this.log(`Adjusting PTS for rollover in timeline near ${(s-a)/n} ${i}`);a<s+n;)a+=8589934592;return a-s}generateIS(e,n,r,i){const s=e.samples,a=n.samples,o=this.typeSupported,l={},u=this._initPTS;let c=!u||i,d="audio/mp4",f,h,g,v=-1;if(c&&(f=h=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(d="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}l.audio={id:"audio",container:d,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):it.initSegment([e]),metadata:{channelCount:e.channelCount}},c&&(v=e.id,g=e.inputTimeScale,!u||g!==u.timescale?f=h=this.computeInitPts(s[0].pts,g,r,"audio"):c=!1)}if(n.sps&&n.pps&&a.length){if(n.timescale=n.inputTimeScale,l.video={id:"main",container:"video/mp4",codec:n.codec,initSegment:it.initSegment([n]),metadata:{width:n.width,height:n.height}},c)if(v=n.id,g=n.inputTimeScale,!u||g!==u.timescale){const b=this.getVideoStartPts(a),S=hc(a[0].dts,b),A=this.computeInitPts(S,g,r,"video"),w=this.computeInitPts(b,g,r,"video");h=Math.min(h,A),f=Math.min(f,w)}else c=!1;this.videoTrackConfig={width:n.width,height:n.height,pixelRatio:n.pixelRatio}}if(Object.keys(l).length)return this.ISGenerated=!0,c?(u&&this.warn(`Timestamps at playlist time: ${i?"":"~"}${r} ${f/g} != initPTS: ${u.baseTime/u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`),this.log(`Found initPTS at playlist time: ${r} offset: ${f/g} (${f}/${g}) trackId: ${v}`),this._initPTS={baseTime:f,timescale:g,trackId:v},this._initDTS={baseTime:h,timescale:g,trackId:v}):f=g=void 0,{tracks:l,initPTS:f,timescale:g,trackId:v}}remuxVideo(e,n,r,i){const s=e.inputTimeScale,a=e.samples,o=[],l=a.length,u=this._initPTS,c=u.baseTime*s/u.timescale;let d=this.nextVideoTs,f=8,h=this.videoSampleDuration,g,v,b=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,A=!1;if(!r||d===null){const ue=c+n*s,Q=a[0].pts-hc(a[0].dts,a[0].pts);OS&&d!==null&&Math.abs(ue-Q-(d+c))<15e3?r=!0:d=ue-Q-c}const w=d+c;for(let ue=0;ue<l;ue++){const Q=a[ue];Q.pts=hc(Q.pts,w),Q.dts=hc(Q.dts,w),Q.dts<a[ue>0?ue-1:ue].dts&&(A=!0)}A&&a.sort(function(ue,Q){const de=ue.dts-Q.dts,le=ue.pts-Q.pts;return de||le}),g=a[0].dts,v=a[a.length-1].dts;const x=v-g,P=x?Math.round(x/(l-1)):h||e.inputTimeScale/30;if(r){const ue=g-w,Q=ue>P,de=ue<-1;if((Q||de)&&(Q?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${HA(ue,!0)} ms (${ue}dts) hole between fragments detected at ${n.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${HA(-ue,!0)} ms (${ue}dts) overlapping between fragments detected at ${n.toFixed(3)}`),!de||w>=a[0].pts||OS)){g=w;const le=a[0].pts-ue;if(Q)a[0].dts=g,a[0].pts=le;else{let ye=!0;for(let fe=0;fe<a.length&&!(a[fe].dts>le&&ye);fe++){const We=a[fe].pts;if(a[fe].dts-=ue,a[fe].pts-=ue,fe<a.length-1){const Le=a[fe+1].pts,Ve=a[fe].pts,at=Le<=Ve,Et=Le<=We;ye=at==Et}}}this.log(`Video: Initial PTS/DTS adjusted: ${HA(le,!0)}/${HA(g,!0)}, delta: ${HA(ue,!0)} ms`)}}g=Math.max(0,g);let N=0,k=0,U=g;for(let ue=0;ue<l;ue++){const Q=a[ue],de=Q.units,le=de.length;let ye=0;for(let fe=0;fe<le;fe++)ye+=de[fe].data.length;k+=ye,N+=le,Q.length=ye,Q.dts<U?(Q.dts=U,U+=P/4|0||1):U=Q.dts,b=Math.min(Q.pts,b),S=Math.max(Q.pts,S)}v=a[l-1].dts;const H=k+4*N+8;let B;try{B=new Uint8Array(H)}catch(ue){this.observer.emit(Y.ERROR,Y.ERROR,{type:xn.MUX_ERROR,details:st.REMUX_ALLOC_ERROR,fatal:!1,error:ue,bytes:H,reason:`fail allocating video mdat ${H}`});return}const q=new DataView(B.buffer);q.setUint32(0,H),B.set(it.types.mdat,4);let Z=!1,C=Number.POSITIVE_INFINITY,L=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY,j=Number.NEGATIVE_INFINITY;for(let ue=0;ue<l;ue++){const Q=a[ue],de=Q.units;let le=0;for(let We=0,Le=de.length;We<Le;We++){const Ve=de[We],at=Ve.data,Et=Ve.data.byteLength;q.setUint32(f,Et),f+=4,B.set(at,f),f+=Et,le+=4+Et}let ye;if(ue<l-1)h=a[ue+1].dts-Q.dts,ye=a[ue+1].pts-Q.pts;else{const We=this.config,Le=ue>0?Q.dts-a[ue-1].dts:P;if(ye=ue>0?Q.pts-a[ue-1].pts:P,We.stretchShortVideoTrack&&this.nextAudioTs!==null){const Ve=Math.floor(We.maxBufferHole*s),at=(i?b+i*s:this.nextAudioTs+c)-Q.pts;at>Ve?(h=at-Le,h<0?h=Le:Z=!0,this.log(`It is approximately ${at/90} ms to the next segment; using duration ${h/90} ms for the last video frame.`)):h=Le}else h=Le}const fe=Math.round(Q.pts-Q.dts);C=Math.min(C,h),V=Math.max(V,h),L=Math.min(L,ye),j=Math.max(j,ye),o.push(Vee(Q.key,h,le,fe))}if(o.length){if(OS){if(OS<70){const ue=o[0].flags;ue.dependsOn=2,ue.isNonSync=0}}else if(M5&&j-L<V-C&&P/V<.025&&o[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let ue=g;for(let Q=0,de=o.length;Q<de;Q++){const le=ue+o[Q].duration,ye=ue+o[Q].cts;if(Q<de-1){const fe=le+o[Q+1].cts;o[Q].duration=fe-ye}else o[Q].duration=Q?o[Q-1].duration:P;o[Q].cts=0,ue=le}}}h=Z||!h?P:h;const X=v+h;this.nextVideoTs=d=X-c,this.videoSampleDuration=h,this.isVideoContiguous=!0;const ae={data1:it.moof(e.sequenceNumber++,g,ns(e,{samples:o})),data2:B,startPTS:(b-c)/s,endPTS:(S+h-c)/s,startDTS:(g-c)/s,endDTS:d/s,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,ae}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return tPt;case"ac3":return nPt;default:return ePt}}remuxAudio(e,n,r,i,s){const a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,l=a/o,u=this.getSamplesPerFrame(e),c=u*l,d=this._initPTS,f=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,h=[],g=s!==void 0;let v=e.samples,b=f?0:8,S=this.nextAudioTs||-1;const A=d.baseTime*a/d.timescale,w=A+n*a;if(this.isAudioContiguous=r=r||v.length&&S>0&&(i&&Math.abs(w-(S+A))<9e3||Math.abs(hc(v[0].pts,w)-(S+A))<20*c),v.forEach(function(j){j.pts=hc(j.pts,w)}),!r||S<0){const j=v.length;if(v=v.filter(X=>X.pts>=0),j!==v.length&&this.warn(`Removed ${v.length-j} of ${j} samples (initPTS ${A} / ${a})`),!v.length)return;s===0?S=0:i&&!g?S=Math.max(0,w-A):S=v[0].pts-A}if(e.segmentCodec==="aac"){const j=this.config.maxAudioFramesDrift;for(let X=0,G=S+A;X<v.length;X++){const ie=v[X],ae=ie.pts,ue=ae-G,Q=Math.abs(1e3*ue/a);if(ue<=-j*c&&g)X===0&&(this.warn(`Audio frame @ ${(ae/a).toFixed(3)}s overlaps marker by ${Math.round(1e3*ue/a)} ms.`),this.nextAudioTs=S=ae-A,G=ae);else if(ue>=j*c&&Q<JOt&&g){let de=Math.round(ue/c);for(G=ae-de*c;G<0&&de&&c;)de--,G+=c;X===0&&(this.nextAudioTs=S=G-A),this.warn(`Injecting ${de} audio frames @ ${((G-A)/a).toFixed(3)}s due to ${Math.round(1e3*ue/a)} ms gap.`);for(let le=0;le<de;le++){let ye=ZOt.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);ye||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),ye=ie.unit.subarray()),v.splice(X,0,{unit:ye,pts:G}),G+=c,X++}}ie.pts=G,G+=c}}let x=null,P=null,N,k=0,U=v.length;for(;U--;)k+=v[U].unit.byteLength;for(let j=0,X=v.length;j<X;j++){const G=v[j],ie=G.unit;let ae=G.pts;if(P!==null){const Q=h[j-1];Q.duration=Math.round((ae-P)/l)}else if(r&&e.segmentCodec==="aac"&&(ae=S+A),x=ae,k>0){k+=b;try{N=new Uint8Array(k)}catch(Q){this.observer.emit(Y.ERROR,Y.ERROR,{type:xn.MUX_ERROR,details:st.REMUX_ALLOC_ERROR,fatal:!1,error:Q,bytes:k,reason:`fail allocating audio mdat ${k}`});return}f||(new DataView(N.buffer).setUint32(0,k),N.set(it.types.mdat,4))}else return;N.set(ie,b);const ue=ie.byteLength;b+=ue,h.push(Vee(!0,u,ue,0)),P=ae}const H=h.length;if(!H)return;const B=h[h.length-1];S=P-A,this.nextAudioTs=S+l*B.duration;const q=f?new Uint8Array(0):it.moof(e.sequenceNumber++,x/l,ns({},e,{samples:h}));e.samples=[];const Z=(x-A)/a,C=this.nextAudioTs/a,V={data1:q,data2:N,startPTS:Z,endPTS:C,startDTS:Z,endDTS:C,type:"audio",hasAudio:!0,hasVideo:!1,nb:H};return this.isAudioContiguous=!0,V}}function hc(t,e){let n;if(e===null)return t;for(e<t?n=-8589934592:n=8589934592;Math.abs(t-e)>4294967296;)t+=n;return t}function rPt(t){for(let e=0;e<t.length;e++)if(t[e].key)return e;return-1}function Sye(t,e,n,r){const i=t.samples.length;if(!i)return;const s=t.inputTimeScale;for(let o=0;o<i;o++){const l=t.samples[o];l.pts=hc(l.pts-n.baseTime*s/n.timescale,e*s)/s,l.dts=hc(l.dts-r.baseTime*s/r.timescale,e*s)/s}const a=t.samples;return t.samples=[],{samples:a}}function Eye(t,e,n){const r=t.samples.length;if(!r)return;const i=t.inputTimeScale;for(let a=0;a<r;a++){const o=t.samples[a];o.pts=hc(o.pts-n.baseTime*i/n.timescale,e*i)/i}t.samples.sort((a,o)=>a.pts-o.pts);const s=t.samples;return t.samples=[],{samples:s}}class iPt extends Fd{constructor(e,n,r,i){super("passthrough-remuxer",i),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const n=this.initPTS;n&&e&&n.baseTime===e.baseTime&&n.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,n,r,i){this.audioCodec=n,this.videoCodec=r,this.generateInitSegment(e,i),this.emitInitSegment=!0}generateInitSegment(e,n){let{audioCodec:r,videoCodec:i}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:s,video:a}=this.initData=xve(e);if(n)Gxt(e,n);else{const l=s||a;l!=null&&l.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${l.codec}")!`)}s&&(r=Hee(s,ls.AUDIO,this)),a&&(i=Hee(a,ls.VIDEO,this));const o={};s&&a?o.audiovideo={container:"video/mp4",codec:r+","+i,supplemental:a.supplemental,encrypted:a.encrypted,initSegment:e,id:"main"}:s?o.audio={container:"audio/mp4",codec:r,encrypted:s.encrypted,initSegment:e,id:"audio"}:a?o.video={container:"video/mp4",codec:i,supplemental:a.supplemental,encrypted:a.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=o}remux(e,n,r,i,s,a){var o,l;let{initPTS:u,lastEndTime:c}=this;const d={audio:void 0,video:void 0,text:i,id3:r,initSegment:void 0};sn(c)||(c=this.lastEndTime=s||0);const f=n.samples;if(!f.length)return d;const h={initPTS:void 0,timescale:void 0,trackId:void 0};let g=this.initData;if((o=g)!=null&&o.length||(this.generateInitSegment(f),g=this.initData),!((l=g)!=null&&l.length))return this.warn("Failed to generate initSegment."),d;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1);const v=qxt(f,g,this),b=g.audio?v[g.audio.id]:null,S=g.video?v[g.video.id]:null,A=qO(S,1/0),w=qO(b,1/0),x=qO(S,0,!0),P=qO(b,0,!0);let N=s,k=0;const U=b&&(!S||!u&&w<A||u&&u.trackId===g.audio.id),H=U?b:S;if(H){const G=H.timescale,ie=H.start-s*G,ae=U?g.audio.id:g.video.id;N=H.start/G,k=U?P-w:x-A,(a||!u)&&(sPt(u,N,s,k)||G!==u.timescale)&&(u&&this.warn(`Timestamps at playlist time: ${a?"":"~"}${s} ${ie/G} != initPTS: ${u.baseTime/u.timescale} (${u.baseTime}/${u.timescale}) trackId: ${u.trackId}`),this.log(`Found initPTS at playlist time: ${s} offset: ${N-s} (${ie}/${G}) trackId: ${ae}`),u=null,h.initPTS=ie,h.timescale=G,h.trackId=ae)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${s}`);u?(h.initPTS=u.baseTime,h.timescale=u.timescale,h.trackId=u.trackId):((!h.timescale||h.trackId===void 0||h.initPTS===void 0)&&(this.warn("Could not set initPTS"),h.initPTS=N,h.timescale=1,h.trackId=-1),this.initPTS=u={baseTime:h.initPTS,timescale:h.timescale,trackId:h.trackId});const B=N-u.baseTime/u.timescale,q=B+k;k>0?this.lastEndTime=q:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Z=!!g.audio,C=!!g.video;let L="";Z&&(L+="audio"),C&&(L+="video");const V=(g.audio?g.audio.encrypted:!1)||(g.video?g.video.encrypted:!1),j={data1:f,startPTS:B,startDTS:B,endPTS:q,endDTS:q,type:L,hasAudio:Z,hasVideo:C,nb:1,dropped:0,encrypted:V};d.audio=Z&&!C?j:void 0,d.video=C?j:void 0;const X=S==null?void 0:S.sampleCount;if(X){const G=S.keyFrameIndex,ie=G!==-1;j.nb=X,j.dropped=G===0||this.isVideoContiguous?0:ie?G:X,j.independent=ie,j.firstKeyFrame=G,ie&&S.keyFrameStart&&(j.firstKeyFramePTS=(S.keyFrameStart-u.baseTime)/u.timescale),this.isVideoContiguous||(d.independent=ie),this.isVideoContiguous||(this.isVideoContiguous=ie),j.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${G}/${X} dropped: ${j.dropped} start: ${j.firstKeyFramePTS||"NA"}`)}return d.initSegment=h,d.id3=Sye(r,s,u,u),i.samples.length&&(d.text=Eye(i,s,u)),d}}function qO(t,e,n=!1){return(t==null?void 0:t.start)!==void 0?(t.start+(n?t.duration:0))/t.timescale:e}function sPt(t,e,n,r){if(t===null)return!0;const i=Math.max(r,1),s=e-t.baseTime/t.timescale;return Math.abs(s-n)>i}function Hee(t,e,n){const r=t.codec;return r&&r.length>4?r:e===ls.AUDIO?r==="ec-3"||r==="ac-3"||r==="alac"?r:r==="fLaC"||r==="Opus"?ND(r,!1):(n.warn(`Unhandled audio codec "${r}" in mp4 MAP`),r||"mp4a"):(n.warn(`Unhandled video codec "${r}" in mp4 MAP`),r||"avc1")}let Zp;try{Zp=self.performance.now.bind(self.performance)}catch{Zp=Date.now}const YP=[{demux:zOt,remux:iPt},{demux:Dm,remux:KP},{demux:UOt,remux:KP},{demux:HOt,remux:KP}];YP.splice(2,0,{demux:VOt,remux:KP});class jee{constructor(e,n,r,i,s,a){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=n,this.config=r,this.id=s,this.logger=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,n,r,i){const s=r.transmuxing;s.executeStart=Zp();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:l}=this;i&&(this.currentTransmuxState=i);const{contiguous:u,discontinuity:c,trackSwitch:d,accurateTimeOffset:f,timeOffset:h,initSegmentChange:g}=i||o,{audioCodec:v,videoCodec:b,defaultInitPts:S,duration:A,initSegmentData:w}=l,x=aPt(a,n);if(x&&UE(x.method)){const U=this.getDecrypter(),H=VH(x.method);if(U.isSync()){let B=U.softwareDecrypt(a,x.key.buffer,x.iv.buffer,H);if(r.part>-1){const Z=U.flush();B=Z&&Z.buffer}if(!B)return s.executeEnd=Zp(),F5(r);a=new Uint8Array(B)}else return this.asyncResult=!0,this.decryptionPromise=U.webCryptoDecrypt(a,x.key.buffer,x.iv.buffer,H).then(B=>{const q=this.push(B,null,r);return this.decryptionPromise=null,q}),this.decryptionPromise}const P=this.needsProbing(c,d);if(P){const U=this.configureTransmuxer(a);if(U)return this.logger.warn(`[transmuxer] ${U.message}`),this.observer.emit(Y.ERROR,Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_PARSING_ERROR,fatal:!1,error:U,reason:U.message}),s.executeEnd=Zp(),F5(r)}(c||d||g||P)&&this.resetInitSegment(w,v,b,A,n),(c||g||P)&&this.resetInitialTimestamp(S),u||this.resetContiguity();const N=this.transmux(a,x,h,f,r);this.asyncResult=wC(N);const k=this.currentTransmuxState;return k.contiguous=!0,k.discontinuity=!1,k.trackSwitch=!1,s.executeEnd=Zp(),N}flush(e){const n=e.transmuxing;n.executeStart=Zp();const{decrypter:r,currentTransmuxState:i,decryptionPromise:s}=this;if(s)return this.asyncResult=!0,s.then(()=>this.flush(e));const a=[],{timeOffset:o}=i;if(r){const d=r.flush();d&&a.push(this.push(d.buffer,null,e))}const{demuxer:l,remuxer:u}=this;if(!l||!u){n.executeEnd=Zp();const d=[F5(e)];return this.asyncResult?Promise.resolve(d):d}const c=l.flush(o);return wC(c)?(this.asyncResult=!0,c.then(d=>(this.flushRemux(a,d,e),a))):(this.flushRemux(a,c,e),this.asyncResult?Promise.resolve(a):a)}flushRemux(e,n,r){const{audioTrack:i,videoTrack:s,id3Track:a,textTrack:o}
vendor: 5,300 bytes, line 661
661=n,{accurateTimeOffset:l,timeOffset:u}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${r.part>-1?" part: "+r.part:""} of ${this.id===yn.MAIN?"level":"track"} ${r.level}`);const c=this.remuxer.remux(i,s,a,o,u,l,!0,this.id);e.push({remuxResult:c,chunkMeta:r}),r.transmuxing.executeEnd=Zp()}resetInitialTimestamp(e){const{demuxer:n,remuxer:r}=this;!n||!r||(n.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:n}=this;!e||!n||(e.resetContiguity(),n.resetNextTimestamp())}resetInitSegment(e,n,r,i,s){const{demuxer:a,remuxer:o}=this;!a||!o||(a.resetInitSegment(e,n,r,i),o.resetInitSegment(e,n,r,s))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,n,r,i,s){let a;return n&&n.method==="SAMPLE-AES"?a=this.transmuxSampleAes(e,n,r,i,s):a=this.transmuxUnencrypted(e,r,i,s),a}transmuxUnencrypted(e,n,r,i){const{audioTrack:s,videoTrack:a,id3Track:o,textTrack:l}=this.demuxer.demux(e,n,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(s,a,o,l,n,r,!1,this.id),chunkMeta:i}}transmuxSampleAes(e,n,r,i,s){return this.demuxer.demuxSampleAes(e,n,r).then(a=>({remuxResult:this.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,r,i,!1,this.id),chunkMeta:s}))}configureTransmuxer(e){const{config:n,observer:r,typeSupported:i}=this;let s;for(let d=0,f=YP.length;d<f;d++){var a;if((a=YP[d].demux)!=null&&a.probe(e,this.logger)){s=YP[d];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,l=this.remuxer,u=s.remux,c=s.demux;(!l||!(l instanceof u))&&(this.remuxer=new u(r,n,i,this.logger)),(!o||!(o instanceof c))&&(this.demuxer=new c(r,n,i,this.logger),this.probe=c.probe)}needsProbing(e,n){return!this.demuxer||!this.remuxer||e||n}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new BH(this.config)),e}}function aPt(t,e){let n=null;return t.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(n=e),n}const F5=t=>({remuxResult:{},chunkMeta:t});function wC(t){return"then"in t&&t.then instanceof Function}class oPt{constructor(e,n,r,i,s){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=n,this.initSegmentData=r,this.duration=i,this.defaultInitPts=s||null}}class lPt{constructor(e,n,r,i,s,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=n,this.accurateTimeOffset=r,this.trackSwitch=i,this.timeOffset=s,this.initSegmentChange=a}}let zee=0;class Tye{constructor(e,n,r,i){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=zee++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=l=>{const u=l.data,c=this.hls;if(!(!c||!(u!=null&&u.event)||u.instanceNo!==this.instanceNo))switch(u.event){case"init":{var d;const f=(d=this.workerContext)==null?void 0:d.objectURL;f&&self.URL.revokeObjectURL(f);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}case"workerLog":{c.logger[u.data.logType]&&c.logger[u.data.logType](u.data.message);break}default:{u.data=u.data||{},u.data.frag=this.frag,u.data.part=this.part,u.data.id=this.id,c.trigger(u.event,u.data);break}}},this.onWorkerError=l=>{if(!this.hls)return;const u=new Error(`${l.message}  (${l.filename}:${l.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:u})};const s=e.config;this.hls=e,this.id=n,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=r,this.onFlush=i;const a=(l,u)=>{u=u||{},u.frag=this.frag||void 0,l===Y.ERROR&&(u=u,u.parent=this.id,u.part=this.part,this.error=u.error),this.hls.trigger(l,u)};this.observer=new zH,this.observer.on(Y.FRAG_DECRYPTED,a),this.observer.on(Y.ERROR,a);const o=see(s.preferManagedMediaSource);if(this.useWorker&&typeof Worker<"u"){const l=this.hls.logger;if(s.workerPath||fOt()){try{s.workerPath?(l.log(`loading Web Worker ${s.workerPath} for "${n}"`),this.workerContext=pOt(s.workerPath)):(l.log(`injecting Web Worker for "${n}"`),this.workerContext=hOt());const{worker:c}=this.workerContext;c.addEventListener("message",this.onWorkerMessage),c.addEventListener("error",this.onWorkerError),c.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:n,config:us(s)})}catch(c){l.warn(`Error setting up "${n}" Web Worker, fallback to inline`,c),this.terminateWorker(),this.error=null,this.transmuxer=new jee(this.observer,o,s,"",n,e.logger)}return}}this.transmuxer=new jee(this.observer,o,s,"",n,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=zee++;const n=this.hls.config,r=see(n.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,c
vendor: 25,276 bytes, lines 661-667
661onfig:us(n)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),gOt(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,n,r,i,s,a,o,l,u,c){var d,f;u.transmuxing.start=self.performance.now();const{instanceNo:h,transmuxer:g}=this,v=a?a.start:s.start,b=s.decryptdata,S=this.frag,A=!(S&&s.cc===S.cc),w=!(S&&u.level===S.level),x=S?u.sn-S.sn:-1,P=this.part?u.part-this.part.index:-1,N=x===0&&u.id>1&&u.id===(S==null?void 0:S.stats.chunkCount),k=!w&&(x===1||x===0&&(P===1||N&&P<=0)),U=self.performance.now();(w||x||s.stats.parsing.start===0)&&(s.stats.parsing.start=U),a&&(P||!k)&&(a.stats.parsing.start=U);const H=!(S&&((d=s.initSegment)==null?void 0:d.url)===((f=S.initSegment)==null?void 0:f.url)),B=new lPt(A,k,l,w,v,H);if(!k||A||H){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${s.type} sn: ${u.sn}${u.part>-1?" part: "+u.part:""} ${this.id===yn.MAIN?"level":"track"}: ${u.level} id: ${u.id}
662        discontinuity: ${A}
663        trackSwitch: ${w}
664        contiguous: ${k}
665        accurateTimeOffset: ${l}
666        timeOffset: ${v}
667        initSegmentChange: ${H}`);const q=new oPt(r,i,n,o,c);this.configureTransmuxer(q)}if(this.frag=s,this.part=a,this.workerContext)this.workerContext.worker.postMessage({instanceNo:h,cmd:"demux",data:e,decryptdata:b,chunkMeta:u,state:B},e instanceof ArrayBuffer?[e]:[]);else if(g){const q=g.push(e,b,u,B);wC(q)?q.then(Z=>{this.handleTransmuxComplete(Z)}).catch(Z=>{this.transmuxerError(Z,u,"transmuxer-interface push error")}):this.handleTransmuxComplete(q)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:n,transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:n,cmd:"flush",chunkMeta:e});else if(r){const i=r.flush(e);wC(i)?i.then(s=>{this.handleFlushResult(s,e)}).catch(s=>{this.transmuxerError(s,e,"transmuxer-interface flush error")}):this.handleFlushResult(i,e)}}transmuxerError(e,n,r){this.hls&&(this.error=e,this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_PARSING_ERROR,chunkMeta:n,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,n){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(n)}configureTransmuxer(e){const{instanceNo:n,transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:n,cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const Gee=100;class uPt extends jH{constructor(e,n,r){super(e,n,r,"audio-stream-controller",yn.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(Y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Y.BUFFER_RESET,this.onBufferReset,this),e.on(Y.BUFFER_CREATED,this.onBufferCreated,this),e.on(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(Y.FRAG_LOADING,this.onFragLoading,this),e.on(Y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(Y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Y.BUFFER_RESET,this.onBufferReset,this),e.off(Y.BUFFER_CREATED,this.onBufferCreated,this),e.off(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(Y.FRAG_LOADING,this.onFragLoading,this),e.off(Y.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:n,id:r,initPTS:i,timescale:s,trackId:a}){if(r===yn.MAIN){const o=n.cc,l=this.fragCurrent;if(this.initPTS[o]={baseTime:i,timescale:s,trackId:a},this.log(`InitPTS for cc: ${o} found from main: ${i/s} (${i}/${s}) trackId: ${a}`),this.mainAnchor=n,this.state===wt.WAITING_INIT_PTS){const u=this.waitingData;(!u&&!this.loadingParts||u&&u.frag.cc!==o)&&this.syncWithAnchor(n,u==null?void 0:u.frag)}else!this.hls.hasEnoughToStart&&l&&l.cc!==o?(l.abortRequests(),this.syncWithAnchor(n,l)):this.state===wt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,n){var r;const i=((r=this.mainFragLoading)==null?void 0:r.frag)||null;if(n&&(i==null?void 0:i.cc)===n.cc)return;const s=(i||e).cc,a=this.getLevelDetails(),o=this.getLoadPosition(),l=$ve(a,s,o);l&&(this.log(`Syncing with main frag at ${l.start} cc ${l.cc}`),this.startFragRequested=!1,this.nextLoadPosition=l.start,this.resetLoadingState(),this.state===wt.IDLE&&this.doTickIdle())}startLoad(e,n){if(!this.levels){this.startPosition=e,this.state=wt.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(Gee),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=wt.IDLE):this.state=wt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=n?-1:e,this.tick()}doTick(){switch(this.state){case wt.IDLE:this.doTickIdle();break;case wt.WAITING_TRACK:{const{levels:e,trackId:n}=this,r=e==null?void 0:e[n],i=r==null?void 0:r.details;if(i&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(i))break;this.state=wt.WAITING_INIT_PTS}break}case wt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case wt.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:n,part:r,cache:i,complete:s}=e,a=this.mainAnchor;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.state=wt.FRAG_LOADING;const o=i.flush().buffer,l={frag:n,part:r,payload:o,networkDetails:null};this._handleFragmentLoadProgress(l),s&&super._handleFragmentLoadComplete(l)}else a&&a.cc!==e.frag.cc&&this.syncWithAnchor(a,e.frag)}else this.state=wt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:n,levels:r,media:i,trackId:s}=this,a=n.config;if(!this.buffering||!i&&!this.primaryPrefetch&&(this.startFragRequested||!a.startFragPrefetch)||!(r!=null&&r[s]))return;const o=r[s],l=o.details;if(!l||this.waitForLive(o)||this.waitForCdnTuneIn(l)){this.state=wt.WAITING_TRACK,this.startFragRequested=!1;return}const u=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&u&&(this.bufferFlushed=!1,this.afterBufferFlushed(u,ls.AUDIO,yn.AUDIO));const c=this.getFwdBufferInfo(u,yn.AUDIO);if(c===null)return;if(!this.switchingTrack&&this._streamEnded(c,l)){n.trigger(Y.BUFFER_EOS,{type:"audio"}),this.state=wt.ENDED;return}const d=c.len,f=n.maxBufferLength,h=l.fragments,g=h[0].start,v=this.getLoadPosition(),b=this.flushing?v:c.end;if(this.switchingTrack&&i){const w=v;l.PTSKnown&&w<g&&(c.end>g||c.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=g+.05)}if(d>=f&&!this.switchingTrack&&b<h[h.length-1].start)return;let S=this.getNextFragment(b,l);if(S&&this.isLoopLoading(S,b)&&(S=this.getNextFragmentLoopLoading(S,l,c,yn.MAIN,f)),!S){this.bufferFlushed=!0;return}let A=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&A&&Da(S)&&!S.endList&&(!l.live||!this.loadingParts&&b<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(A)===po.OK&&(this.mainFragLoading=A=null),A&&Da(A))){if(S.start>A.end){const x=this.fragmentTracker.getFragAtPos(b,yn.MAIN);x&&x.end>A.end&&(A=x,this.mainFragLoading={frag:x,targetBufferTime:null})}if(S.start>A.end)return}this.loadFragment(S,o,b)}onMediaDetaching(e,n){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,n)}onAudioTracksUpdated(e,{audioTracks:n}){this.resetTransmuxer(),this.levels=n.map(r=>new EC(r))}onAudioTrackSwitching(e,n){const r=!!n.url;this.trackId=n.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),r?(this.switchingTrack=n,this.flushAudioIfNeeded(n),this.state!==wt.STOPPED&&(this.setInterval(Gee),this.state=wt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=n,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,n){this.mainDetails=n.details;const r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(Y.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,n){var r;const{levels:i}=this,{details:s,id:a,groupId:o,track:l}=n;if(!i){this.warn(`Audio tracks reset while loading track ${a} "${l.name}" of "${o}"`);return}const u=this.mainDetails;if(!u||s.endCC>u.endCC||u.expired){this.cachedTrackLoadedData=n,this.state!==wt.STOPPED&&(this.state=wt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${a} "${l.name}" of "${o}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`);const c=i[a];let d=0;if(s.live||(r=c.details)!=null&&r.live){if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;if(c.details){var f;d=this.alignPlaylists(s,c.details,(f=this.levelLastLoaded)==null?void 0:f.details)}s.alignedSliding||(nye(s,u),s.alignedSliding||HD(s,u),d=s.fragmentStart)}c.details=s,this.levelLastLoaded=c,this.startFragRequested||this.setStartPosition(u,d),this.hls.trigger(Y.AUDIO_TRACK_UPDATED,{details:s,id:a,groupId:n.groupId}),this.state===wt.WAITING_TRACK&&!this.waitForCdnTuneIn(s)&&(this.state=wt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var n;const r=e.frag,{part:i,payload:s}=e,{config:a,trackId:o,levels:l}=this;if(!l){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const u=l[o];if(!u){this.warn("Audio track is undefined on fragment load progress");return}const c=u.details;if(!c){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const d=a.defaultAudioCodec||u.audioCodec||"mp4a.40.2";let f=this.transmuxer;f||(f=this.transmuxer=new Tye(this.hls,yn.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const h=this.initPTS[r.cc],g=(n=r.initSegment)==null?void 0:n.data;if(h!==void 0){const b=i?i.index:-1,S=b!==-1,A=new UH(r.level,r.sn,r.stats.chunkCount,s.byteLength,b,S);f.push(s,g,d,"",r,i,c.totalduration,!1,A,h)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${c.startSN} ,${c.endSN}],track ${o}`);const{cache:v}=this.waitingData=this.waitingData||{frag:r,part:i,cache:new rye,complete:!1};v.push(new Uint8Array(s)),this.state!==wt.STOPPED&&(this.state=wt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,n){this.bufferFlushed=this.flushing=!1;const r=n.tracks.audio;r&&(this.mediaBuffer=r.buffer||null)}onFragLoading(e,n){!this.audioOnly&&n.frag.type===yn.MAIN&&Da(n.frag)&&(this.mainFragLoading=n,this.state===wt.IDLE&&this.tick())}onFragBuffered(e,n){const{frag:r,part:i}=n;if(r.type!==yn.AUDIO){!this.audioOnly&&r.type===yn.MAIN&&!r.elementaryStreams.video&&!r.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${i?" p: "+i.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(Da(r)){this.fragPrevious=r;const s=this.switchingTrack;s&&(this.bufferedTrack=s,this.switchingTrack=null,this.hls.trigger(Y.AUDIO_TRACK_SWITCHED,Ui({},s)))}this.fragBufferedComplete(r,i),this.media&&this.tick()}onError(e,n){var r;if(n.fatal){this.state=wt.ERROR;return}switch(n.details){case st.FRAG_GAP:case st.FRAG_PARSING_ERROR:case st.FRAG_DECRYPT_ERROR:case st.FRAG_LOAD_ERROR:case st.FRAG_LOAD_TIMEOUT:case st.KEY_LOAD_ERROR:case st.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(yn.AUDIO,n);break;case st.AUDIO_TRACK_LOAD_ERROR:case st.AUDIO_TRACK_LOAD_TIMEOUT:case st.LEVEL_PARSING_ERROR:!n.levelRetry&&this.state===wt.WAITING_TRACK&&((r=n.context)==null?void 0:r.type)===Mr.AUDIO_TRACK&&(this.state=wt.IDLE);break;case st.BUFFER_ADD_CODEC_ERROR:case st.BUFFER_APPEND_ERROR:if(n.parent!=="audio")return;this.reduceLengthAndFlushBuffer(n)||this.resetLoadingState();break;case st.BUFFER_FULL_ERROR:if(n.parent!=="audio")return;this.reduceLengthAndFlushBuffer(n)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case st.INTERNAL_EXCEPTION:this.recoverWorkerError(n);break}}onBufferFlushing(e,{type:n}){n!==ls.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:n}){if(n!==ls.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===wt.ENDED&&(this.state=wt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,n,yn.AUDIO),this.tick())}}_handleTransmuxComplete(e){var n;const r="audio",{hls:i}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:l,part:u,level:c}=o,{details:d}=c,{audio:f,text:h,id3:g,initSegment:v}=s;if(this.fragContextChanged(l)||!d){this.fragmentTracker.removeFragment(l);return}if(this.state=wt.PARSING,this.switchingTrack&&f&&this.completeAudioSwitch(this.switchingTrack),v!=null&&v.tracks){const b=l.initSegment||l;if(this.unhandledEncryptionError(v,l))return;this._bufferInitSegment(c,v.tracks,b,a),i.trigger(Y.FRAG_PARSING_INIT_SEGMENT,{frag:b,id:r,tracks:v.tracks})}if(f){const{startPTS:b,endPTS:S,startDTS:A,endDTS:w}=f;u&&(u.elementaryStreams[ls.AUDIO]={startPTS:b,endPTS:S,startDTS:A,endDTS:w}),l.setElementaryStreamInfo(ls.AUDIO,b,S,A,w),this.bufferFragmentData(f,l,u,a)}if(g!=null&&(n=g.samples)!=null&&n.length){const b=ns({id:r,frag:l,details:d},g);i.trigger(Y.FRAG_PARSING_METADATA,b)}if(h){const b=ns({id:r,frag:l,details:d},h);i.trigger(Y.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,n,r,i){if(this.state!==wt.PARSING||(n.video&&delete n.video,n.audiovideo&&delete n.audiovideo,!n.audio))return;const s=n.audio;s.id=yn.AUDIO;const a=e.audioCodec;this.log(`Init audio buffer, container:${s.container}, codecs[level/parsed]=[${a}/${s.codec}]`),a&&a.split(",").length===1&&(s.levelCodec=a),this.hls.trigger(Y.BUFFER_CODECS,n);const o=s.initSegment;if(o!=null&&o.byteLength){const l={type:"audio",frag:r,part:null,chunkMeta:i,parent:r.type,data:o};this.hls.trigger(Y.BUFFER_APPENDING,l)}this.tickImmediate()}loadFragment(e,n,r){const i=this.fragmentTracker.getState(e);if(this.switchingTrack||i===po.NOT_LOADED||i===po.PARTIAL){var s;if(!Da(e))this._loadInitSegment(e,n);else if((s=n.details)!=null&&s.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=wt.WAITING_INIT_PTS;const a=this.mainDetails;a&&a.fragmentStart!==n.details.fragmentStart&&HD(n.details,a)}else super.loadFragment(e,n,r)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:a,channels:o}=this.bufferedTrack;O0({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:a,channels:o},e,jy)||(FD(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:n}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,n.trigger(Y.AUDIO_TRACK_SWITCHED,Ui({},e))}}class QH extends Fd{constructor(e,n){super(n,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,n,r){const i=n==null?void 0:n.renditionReports;if(i){let s=-1;for(let a=0;a<i.length;a++){const o=i[a];let l;try{l=new self.URL(o.URI,n.url).href}catch(u){this.warn(`Could not construct new URL for Rendition Report: ${u}`),l=o.URI||""}if(l===e){s=a;break}else l===e.substring(0,l.length)&&(s=a)}if(s!==-1){const a=i[s],o=parseInt(a["LAST-MSN"])||n.lastPartSn;let l=parseInt(a["LAST-PART"])||n.lastPartIndex;if(this.hls.config.lowLatencyMode){const c=Math.min(n.age-n.partTarget,n.targetduration);l>=0&&c>n.partTarget&&(l+=1)}const u=r&&aee(r);return new oee(o,l>=0?l:void 0,u)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,n){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,n){if(n)try{return n.addDirectives(e)}catch(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}return e}playlistLoaded(e,n,r){const{details:i,stats:s}=n,a=self.performance.now(),o=s.loading.first?Math.max(0,a-s.loading.first):0;i.advancedDateTime=Date.now()-o;const l=this.hls.config.timelineOffset;if(l!==i.appliedTimelineOffset){const c=Math.max(l||0,0);i.appliedTimelineOffset=c,i.fragments.forEach(d=>{d.setStart(d.playlistOffset+c)})}if(i.live||r!=null&&r.live){const c="levelInfo"in n?n.levelInfo:n.track;if(i.reloaded(r),r&&i.fragments.length>0){tOt(r,i,this);const A=i.playlistParsingError;if(A){this.warn(A);const w=this.hls;if(!w.config.ignorePlaylistParsingErrors){var u;const{networkDetails:x}=n;w.trigger(Y.ERROR,{type:xn.NETWORK_ERROR,details:st.LEVEL_PARSING_ERROR,fatal:!1,url:i.url,error:A,reason:A.message,level:n.level||void 0,parent:(u=i.fragments[0])==null?void 0:u.type,networkDetails:x,stats:s});return}i.playlistParsingError=null}}i.requestScheduled===-1&&(i.requestScheduled=s.loading.start);const d=this.hls.mainForwardBufferInfo,f=d?d.end-d.len:0,h=(i.edge-f)*1e3,g=Qve(i,h);if(i.requestScheduled+g<a?i.requestScheduled=a:i.requestScheduled+=g,this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),!this.canLoad||!i.live)return;let v,b,S;if(i.canBlockReload&&i.endSN&&i.advanced){const A=this.hls.config.lowLatencyMode,w=i.lastPartSn,x=i.endSN,P=i.lastPartIndex,N=P!==-1,k=w===x;N?k?(b=x+1,S=A?0:P):(b=w,S=A?P+1:i.maxPartIndex):b=x+1;const U=i.age,H=U+i.ageHeader;let B=Math.min(H-i.partTarget,i.targetduration*1.5);if(B>0){if(H>i.targetduration*3)this.log(`Playlist last advanced ${U.toFixed(2)}s ago. Omitting segment and part directives.`),b=void 0,S=void 0;else if(r!=null&&r.tuneInGoal&&H-i.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${B} with playlist age: ${i.age}`),B=0;else{const q=Math.floor(B/i.targetduration);if(b+=q,S!==void 0){const Z=Math.round(B%i.targetduration/i.partTarget);S+=Z}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${U.toFixed(2)}s goal: ${B} skip sn ${q} to part ${S}`)}i.tuneInGoal=B}if(v=this.getDeliveryDirectives(i,n.deliveryDirectives,b,S),A||!k){i.requestScheduled=a,this.loadingPlaylist(c,v);return}}else(i.canBlockReload||i.canSkipUntil)&&(v=this.getDeliveryDirectives(i,n.deliveryDirectives,b,S));v&&b!==void 0&&i.canBlockReload&&(i.requestScheduled=s.loading.first+Math.max(g-o*2,g/2)),this.scheduleLoading(c,v,i)}else this.clearTimer()}scheduleLoading(e,n,r){const i=r||e.details;if(!i){this.loadingPlaylist(e,n);return}const s=self.performance.now(),a=i.requestScheduled;if(s>=a){this.loadingPlaylist(e,n);return}const o=a-s;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(o)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,n),o)}getDeliveryDirectives(e,n,r,i){let s=aee(e);return n!=null&&n.skip&&e.deltaUpdateFailed&&(r=n.msn,i=n.part,s=WP.No),new oee(r,i,s)}checkRetry(e){const n=e.details,r=$D(e),i=e.errorAction,{action:s,retryCount:a=0,retryConfig:o}=i||{},l=!!i&&!!o&&(s===Jo.RetryRequest||!i.resolved&&s===Jo.SendAlternateToPenaltyBox);if(l){var u;if(a>=o.maxNumRetry)return!1;if(r&&(u=e.context)!=null&&u.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${n}" without delivery-directives`),this.loadPlaylist();else{const c=$H(o,a);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),c),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${n}" in ${c}ms`)}e.levelRetry=!0,i.resolved=!0}return l}}function Aye(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!_C(t[n].attrs,e[n].attrs))return!1;return!0}function _C(t,e,n){const r=t["STABLE-RENDITION-ID"];return r&&!n?r===e["STABLE-RENDITION-ID"]:!(n||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(i=>t[i]!==e[i])}function p6(t,e){return e.label.toLowerCase()===t.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(t.lang||"").toLowerCase())}class cPt extends QH{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Y.LEVEL_LOADING,this.onLevelLoading,this),e.on(Y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Y.LEVEL_LOADING,this.onLevelLoading,this),e.off(Y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Y.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,n){this.tracks=n.audioTracks||[]}onAudioTrackLoaded(e,n){const{id:r,groupId:i,details:s}=n,a=this.tracksInGroup[r];if(!a||a.groupId!==i){this.warn(`Audio track with id:${r} and group:${i} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=n.details,this.log(`Audio track ${r} "${a.name}" lang:${a.lang} group:${i} loaded [${s.startSN}-${s.endSN}]`),r===this.trackId&&this.playlistLoaded(r,n,o)}onLevelLoading(e,n){this.switchLevel(n.level)}onLevelSwitching(e,n){this.switchLevel(n.level)}switchLevel(e){const n=this.hls.levels[e];if(!n)return;const r=n.audioGroups||null,i=this.groupIds;let s=this.currentTrack;if(!r||(i==null?void 0:i.length)!==(r==null?void 0:r.length)||r!=null&&r.some(o=>(i==null?void 0:i.indexOf(o))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(f=>!r||r.indexOf(f.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(f=>f.default)&&(this.selectDefaultTrack=!1),o.forEach((f,h)=>{f.id=h});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const l=this.hls.config.audioPreference;if(!s&&l){const f=Uh(l,o,jy);if(f>-1)s=o[f];else{const h=Uh(l,this.tracks);s=this.tracks[h]}}let u=this.findTrackId(s);u===-1&&s&&(u=this.findTrackId(null));const c={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(Y.AUDIO_TRACKS_UPDATED,c);const d=this.trackId;if(u!==-1&&d===-1)this.setAudioTrack(u);else if(o.length&&d===-1){var a;const f=new Error(`No audio track selected for current audio group-ID(s): ${(a=this.groupIds)==null?void 0:a.join(",")} track count: ${o.length}`);this.warn(f.message),this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:f})}}}onError(e,n){n.fatal||!n.context||n.context.type===Mr.AUDIO_TRACK&&n.c
vendor: 7,271 bytes, lines 667-670
667ontext.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(n.context.groupId)!==-1)&&this.checkRetry(n)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const n=this.hls;if(n.config.audioPreference=e,e){const r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const i=this.currentTrack;if(i&&O0(e,i,jy))return i;const s=Uh(e,this.tracksInGroup,jy);if(s>-1){const a=this.tracksInGroup[s];return this.setAudioTrack(s),a}else if(i){let a=n.loadLevel;a===-1&&(a=n.firstAutoLevel);const o=TIt(e,n.levels,r,a,jy);if(o===-1)return null;n.nextLoadLevel=o}if(e.channels||e.audioCodec){const a=Uh(e,r);if(a>-1)return r[a]}}}return null}setAudioTrack(e){const n=this.tracksInGroup;if(e<0||e>=n.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,i=n[e],s=i.details&&!i.details.live;if(e===this.trackId&&i===r&&s||(this.log(`Switching to audio-track ${e} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`),this.trackId=e,this.currentTrack=i,this.hls.trigger(Y.AUDIO_TRACK_SWITCHING,Ui({},i)),s))return;const a=this.switchParams(i.url,r==null?void 0:r.details,i.details);this.loadPlaylist(a)}findTrackId(e){const n=this.tracksInGroup;for(let r=0;r<n.length;r++){const i=n[r];if(!(this.selectDefaultTrack&&!i.default)&&(!e||O0(e,i,jy)))return r}if(e){const{name:r,lang:i,assocLang:s,characteristics:a,audioCodec:o,channels:l}=e;for(let u=0;u<n.length;u++){const c=n[u];if(O0({name:r,lang:i,assocLang:s,characteristics:a,audioCodec:o,channels:l},c,jy))return u}for(let u=0;u<n.length;u++){const c=n[u];if(_C(e.attrs,c.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return u}for(let u=0;u<n.length;u++){const c=n[u];if(_C(e.attrs,c.attrs,["LANGUAGE"]))return u}}return-1}loadPlaylist(e){super.loadPlaylist();const n=this.currentTrack;this.shouldLoadPlaylist(n)&&FD(n.url,this.hls)&&this.scheduleLoading(n,e)}loadingPlaylist(e,n){super.loadingPlaylist(e,n);const r=e.id,i=e.groupId,s=this.getUrlWithDirectives(e.url,n),a=e.details,o=a==null?void 0:a.age;this.log(`Loading audio-track ${r} "${e.name}" lang:${e.lang} group:${i}${(n==null?void 0:n.msn)!==void 0?" at sn "+n.msn+" part "+n.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type&&" "+a.type||""):""} ${s}`),this.hls.trigger(Y.AUDIO_TRACK_LOADING,{url:s,id:r,groupId:i,deliveryDirectives:n||null,track:e})}}class dPt{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,n,r){if(this.queues===null||this.tracks===null)return;const i=this.queues[n];i.push(e),i.length===1&&!r&&this.executeNext(n)}appendBlocker(e){return new Promise(n=>{const r={label:"async-blocker",execute:n,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(r,e)})}prependBlocker(e){return new Promise(n=>{if(this.queues){const r={label:"async-blocker-prepend",execute:n,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(r)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var n;const r=(n=e[0])==null?void 0:n.label;(r==="async-blocker"||r==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const n=this.queues[e];if(n.length){const i=n[0];try{i.execute()}catch(s){var r;if(i.onError(s),this.queues===null||this.tracks===null)return;const a=(r=this.tracks[e])==null?void 0:r.buffer;a!=null&&a.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var n;return((n=this.queues)==null?void 0:n[e][0])||null}toString(){const{queues:e,tracks:n}=this;return e===null||n===null?"<destroyed>":`
668${this.list("video")}
669${this.list("audio")}
670${this.list("audiovideo")}}`}list(e){var n,r;return(n=this.queues)!=null&&n[e]||(r=this.tracks)!=null&&r[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var n;const r=(n=this.tracks)==null?void 0:n[e],i=r==null?void 0:r.buffer;return i?`SourceBuffer${i.updating?" updating":""}${r.ended?" ended":""}${r.ending?" ending":""}`:"none"}listOps(e){var n;return((n=this.queues)==null?void 0:n[e].map(r=>r.label).join(", "))||""}}const Wee=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,wye="HlsJsTrackRemovedError";class fPt extends Error{constructor(e){super(e),this.name=wye}}class hPt extends Fd{constructor(e,n){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=r=>{var i;this.hls&&((i=this.mediaSource)==null?void 0:i.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=r=>{const{media:i,mediaSource:s}=this;r&&this.log("Media source opened"),!(!i||!s)&&(s.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(Y.MEDIA_ATTACHED,{media:i,mediaSource:s}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:i}=this;r!==i&&this.error(`Media element src was set while attaching MediaSource (${i} > ${r})`)},this.hls=e,this.fragmentTracker=n,this.appendSource=Nxt(Pv(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Y.BUFFER_RESET,this.onBufferReset,this),e.on(Y.BUFFER_APPENDING,this.onBufferAppending,this),e.on(Y.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Y.BUFFER_EOS,this.onBufferEos,this),e.on(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Y.FRAG_PARSED,this.onFragParsed,this),e.on(Y.FRAG_CHANGED,this.onFragChanged,this),e.on(Y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;
vendor: 21,048 bytes, lines 670-672
670e.off(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Y.BUFFER_RESET,this.onBufferReset,this),e.off(Y.BUFFER_APPENDING,this.onBufferAppending,this),e.off(Y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Y.BUFFER_EOS,this.onBufferEos,this),e.off(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Y.FRAG_PARSED,this.onFragParsed,this),e.off(Y.FRAG_CHANGED,this.onFragChanged,this),e.off(Y.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:n}=this;if(!e)return null;const r={};if(this.operationQueue){const s=this.isUpdating();s||this.operationQueue.removeBlockers();const a=this.isQueued();(s||a)&&this.warn(`Transfering MediaSource with${a?" operations in queue":""}${s?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const i=this.transferData;return!this.sourceBufferCount&&i&&i.mediaSource===n?ns(r,i.tracks):this.sourceBuffers.forEach(s=>{const[a]=s;a&&(r[a]=ns({},this.tracks[a]),this.removeBuffer(a)),s[0]=s[1]=null}),{media:e,mediaSource:n,tracks:r}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,n){var r;let i=2;(n.audio&&!n.video||!n.altAudio)&&(i=1),this.bufferCodecEventsTotal=i,this.log(`${i} bufferCodec event(s) expected.`),(r=this.transferData)!=null&&r.mediaSource&&this.sourceBufferCount&&i&&this.bufferCreated()}onMediaAttaching(e,n){const r=this.media=n.media;this.transferData=this.overrides=void 0;const i=Pv(this.appendSource);if(i){const s=!!n.mediaSource;(s||n.overrides)&&(this.transferData=n,this.overrides=n.overrides);const a=this.mediaSource=n.mediaSource||new i;if(this.assignMediaSource(a),s)this._objectUrl=r.src,this.attachTransferred();else{const o=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{r.removeAttribute("src");const l=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||l&&a instanceof l,qee(r),pPt(r,o),r.load()}catch{r.src=o}else r.src=o}r.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var n,r;this.log(`${((n=this.transferData)==null?void 0:n.mediaSource)===e?"transferred":"created"} media source: ${(r=e.constructor)==null?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,n=this.transferData;if(!n||!e)return;const r=this.tracks,i=n.tracks,s=i?Object.keys(i):null,a=s?s.length:0,o=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(i&&s&&a){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
671required tracks: ${us(r,(l,u)=>l==="initSegment"?void 0:u)};
672transfer tracks: ${us(i,(l,u)=>l==="initSegment"?void 0:u)}}`),!Sve(i,r)){n.mediaSource=null,n.tracks=void 0;const l=e.currentTime,u=this.details,c=Math.max(l,(u==null?void 0:u.fragments[0].start)||0);if(c-l>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${l} -> ${c}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(i)}"->"${Object.keys(r)}") start time: ${c} currentTime: ${l}`),this.onMediaDetaching(Y.MEDIA_DETACHING,{}),this.onMediaAttaching(Y.MEDIA_ATTACHING,n),e.currentTime=c;return}this.transferData=void 0,s.forEach(l=>{const u=l,c=i[u];if(c){const d=c.buffer;if(d){const f=this.fragmentTracker,h=c.id;if(f.hasFragments(h)||f.hasParts(h)){const b=ar.getBuffered(d);f.detectEvictedFragments(u,b,h,null,!0)}const g=$5(u),v=[u,d];this.sourceBuffers[g]=v,d.updating&&this.operationQueue&&this.operationQueue.prependBlocker(u),this.trackSourceBuffer(u,c)}}}),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}get mediaSourceOpenOrEnded(){var e;const n=(e=this.mediaSource)==null?void 0:e.readyState;return n==="open"||n==="ended"}onMediaDetaching(e,n){const r=!!n.transferMedia;this.transferData=this.overrides=void 0;const{media:i,mediaSource:s,_objectUrl:a}=this;if(s){if(this.log(`media source ${r?"transferring":"detaching"}`),r)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=s.readyState==="open";try{const l=s.sourceBuffers;for(let u=l.length;u--;)o&&l[u].abort(),s.removeSourceBuffer(l[u]);o&&s.endOfStream()}catch(l){this.warn(`onMediaDetaching: ${l.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.removeEventListener("startstreaming",this._onStartStreaming),s.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}i&&(i.removeEventListener("emptied",this._onMediaEmptied),r||(a&&self.URL.revokeObjectURL(a),this.mediaSrc===a?(i.removeAttribute("src"),this.appendSource&&qee(i),i.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(Y.MEDIA_DETACHED,n)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var n;const r=(n=this.tracks[e])==null?void 0:n.buffer;if(this.removeBuffer(e),r)try{var i;(i=this.mediaSource)!=null&&i.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(s){this.warn(`onBufferReset ${e}`,s)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[$5(e)]=[null,null];const n=this.tracks[e];n&&(n.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new dPt(this.tracks)}onBufferCodecs(e,n){var r;const i=this.tracks,s=Object.keys(n);this.log(`BUFFER_CODECS: "${s}" (current SB count ${this.sourceBufferCount})`);const a="audiovideo"in n&&(i.audio||i.video)||i.audiovideo&&("audio"in n||"video"in n),o=!a&&this.sourceBufferCount&&this.media&&s.some(l=>!i[l]);if(a||o){this.warn(`Unsupported transition between "${Object.keys(i)}" and "${s}" SourceBuffers`);return}s.forEach(l=>{var u,c;const d=n[l],{id:f,codec:h,levelCodec:g,container:v,metadata:b,supplemental:S}=d;let A=i[l];const w=(u=this.transferData)==null||(u=u.tracks)==null?void 0:u[l],x=w!=null&&w.buffer?w:A,P=(x==null?void 0:x.pendingCodec)||(x==null?void 0:x.codec),N=x==null?void 0:x.levelCodec;A||(A=i[l]={buffer:void 0,listeners:[],codec:h,supplemental:S,container:v,levelCodec:g,metadata:b,id:f});const k=GP(P,N),U=k==null?void 0:k.replace(Wee,"$1");let H=GP(h,g);const B=(c=H)==null?void 0:c.replace(Wee,"$1");H&&k&&U!==B&&(l.slice(0,5)==="audio"&&(H=ND(H,this.appendSource)),this.log(`switching codec ${P} to ${H}`),H!==(A.pendingCodec||A.codec)&&(A.pendingCodec=H),A.container=v,this.appendChangeType(l,v,H))}),(this.tracksReady||this.sourceBufferCount)&&(n.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!n.video&&((r=n.audio)==null?void 0:r.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks())}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,n)=>{const r=this.tracks[n];return e[n]={id:r.id,container:r.container,codec:r.codec,levelCodec:r.levelCodec},e},{})}appendChangeType(e,n,r){const i=`${n};codecs=${r}`,s={label:`change-type=${i}`,execute:()=>{const a=this.tracks[e];if(a){const o=a.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${i}`),o.changeType(i),a.codec=r,a.container=n)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:a=>{this.warn(`Failed to change ${e} SourceBuffer type`,a)}};this.append(s,e,this.isPending(this.tracks[e]))}blockAudio(e){var n;const r=e.start,i=r+e.duration*.05;if(((n=this.fragmentTracker.getAppendedFrag(r,yn.MAIN))==null?void 0:n.gap)===!0)return;const a={label:"block-audio",execute:()=>{var o;const l=this.tracks.video;(this.lastVideoAppendEnd>i||l!=null&&l.buffer&&ar.isBuffered(l.buffer,i)||((o=this.fragmentTracker.getAppendedFrag(i,yn.MAIN))==null?void 0:o.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn("Error executing block-audio operation",o)}};this.blockedAudioAppend={op:a,frag:e},this.append(a,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:n}=this;e&&n&&(this.blockedAudioAppend=null,n.unblockAudio(e.op))}onBufferAppending(e,n){const{tracks:r}=this,{data:i,type:s,parent:a,frag:o,part:l,chunkMeta:u,offset:c}=n,d=u.buffering[s],{sn:f,cc:h}=o,g=self.performance.now();d.start=g;const v=o.stats.buffering,b=l?l.stats.buffering:null;v.start===0&&(v.start=g),b&&b.start===0&&(b.start=g);const S=r.audio;let A=!1;s==="audio"&&(S==null?void 0:S.container)==="audio/mpeg"&&(A=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const w=r.video,x=w==null?void 0:w.buffer;if(x&&f!=="initSegment"){const k=l||o,U=this.blockedAudioAppend;if(s==="audio"&&a!=="main"&&!this.blockedAudioAppend&&!(w.ending||w.ended)){const B=k.start+k.duration*.05,q=x.buffered,Z=this.currentOp("video");!q.length&&!Z?this.blockAudio(k):!Z&&!ar.isBuffered(x,B)&&this.lastVideoAppendEnd<B&&this.blockAudio(k)}else if(s==="video"){const H=k.end;if(U){const B=U.frag.start;(H>B||H<this.lastVideoAppendEnd||ar.isBuffered(x,B))&&this.unblockAudio()}this.lastVideoAppendEnd=H}}const P=(l||o).start,N={label:`append-${s}`,execute:()=>{var k;d.executeStart=self.performance.now();const U=(k=this.tracks[s])==null?void 0:k.buffer;U&&(A?this.updateTimestampOffset(U,P,.1,s,f,h):c!==void 0&&sn(c)&&this.updateTimestampOffset(U,c,1e-6,s,f,h)),this.appendExecutor(i,s)},onStart:()=>{},onComplete:()=>{const k=self.performance.now();d.executeEnd=d.end=k,v.first===0&&(v.first=k),b&&b.first===0&&(b.first=k);const U={};this.sourceBuffers.forEach(([H,B])=>{H&&(U[H]=ar.getBuffered(B))}),this.appendErrors[s]=0,s==="audio"||s==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(Y.BUFFER_APPENDED,{type:s,frag:o,part:l,chunkMeta:u,parent:o.type,timeRanges:U})},onError:k=>{var U;const H={type:xn.MEDIA_ERROR,parent:o.type,details:st.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:o,part:l,chunkMeta:u,error:k,err:k,fatal:!1},B=(U=this.media)==null?void 0:U.error;if(k.code===DOMException.QUOTA_EXCEEDED_ERR||k.name=="QuotaExceededError"||"quota"in k)H.details=st.BUFFER_FULL_ERROR;else if(k.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!B)H.errorAction=BE(!0);else if(k.name===wye&&this.sourceBufferCount===0)H.errorAction=BE(!0);else{const q=++this.appendErrors[s];this.warn(`Failed ${q}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${s}" sourceBuffer (${B||"no media error"})`),(q>=this.hls.config.appendErrorMaxRetry||B)&&(H.fatal=!0)}this.hls.trigger(Y.ERROR,H)}};this.log(`queuing "${s}" append sn: ${f}${l?" p: "+l.index:""} of ${o.type===yn.MAIN?"level":"track"} ${o.level} cc: ${h}`),this.append(N,s,this.isPending(this.tracks[s]))}getFlushOp(e,n,r){return this.log(`queuing "${e}" remove ${n}-${r}`),{label:"remove",execute:()=>{this.removeExecutor(e,n,r)},onStart:()=>{},onComplete:()=>{this.hls.trigger(Y.BUFFER_FLUSHED,{type:e})},onError:i=>{this.warn(`Failed to remove ${n}-${r} from "${e}" SourceBuffer`,i)}}}onBufferFlushing(e,n){const{type:r,startOffset:i,endOffset:s}=n;r?this.append(this.getFlushOp(r,i,s),r):this.sourceBuffers.forEach(([a])=>{a&&this.append(this.getFlushOp(a,i,s),a)})}onFragParsed(e,n){const{frag:r,part:i}=n,s=[],a=i?i.elementaryStreams:r.elementaryStreams;a[ls.AUDIOVIDEO]?s.push("audiovideo"):(a[ls.AUDIO]&&s.push("audio"),a[ls.VIDEO]&&s.push("video"));const o=()=>{const l=self.performance.now();r.stats.buffering.end=l,i&&(i.stats.buffering.end=l);const u=i?i.stats:r.stats;this.hls.trigger(Y.FRAG_BUFFERED,{frag:r,part:i,stats:u,id:r.type})};s.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(o,s).catch(l=>{this.warn(`Fragment buffered callback ${l}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,n){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const n=this.tracks[e];if(n)return!n.ended||n.ending}return!1})}onBufferEos(e,n){var r;this.sourceBuffers.forEach(([a])=>{if(a){const o=this.tracks[a];(!n.type||n.type===a)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${a} buffer reached EOS`)))}});const i=((r=this.overrides)==null?void 0:r.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([a])=>{var o;return a&&!((o=this.tracks[a])!=null&&o.ended)})?i?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:a}=this;if(!a||a.readyState!=="open"){a&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${a.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),a.endOfStream(),this.hls.trigger(Y.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(Y.BUFFERED_TO_END,void 0)):n.type==="video"&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const n=this.tracks[e];n&&(n.ending=!1)}})}onLevelUpdated(e,{details:n}){n.fragments.length&&(this.details=n,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,n){if(n.details===st.BUFFER_APPEND_ERROR&&n.frag){var r;const i=(r=n.errorAction)==null?void 0:r.nextAutoLevel;sn(i)&&i!==n.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:n,media:r}=this;if(!r||n===null||!this.sourceBufferCount)return;const i=e.config,s=r.currentTime,a=n.levelTargetDuration,o=n.live&&i.liveBackBufferLength!==null?i.liveBackBufferLength:i.backBufferLength;if(sn(o)&&o>=0){const u=Math.max(o,a),c=Math.floor(s/a)*a-u;this.flushBackBuffer(s,a,c)}const l=i.frontBufferFlushThreshold;if(sn(l)&&l>0){const u=Math.max(i.maxBufferLength,l),c=Math.max(u,a),d=Math.floor(s/a)*a+c;this.flushFrontBuffer(s,a,d)}}flushBackBuffer(e,n,r){this.sourceBuffers.forEach(([i,s])=>{if(s){const o=ar.getBuffered(s);if(o.length>0&&r>o.start(0)){var a;this.hls.trigger(Y.BACK_BUFFER_REACHED,{bufferEnd:r});const l=this.tracks[i];if((a=this.details)!=null&&a.live)this.hls.trigger(Y.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(l!=null&&l.ended){this.log(`Cannot flush ${i} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(Y.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:i})}}})}flushFrontBuffer(e,n,r){this.sourceBuffers.forEach(([i,s])=>{if(s){const a=ar.getBuffered(s),o=a.length;if(o<2)return;const l=a.start(o-1),u=a.end(o-1);if(r>l||e>=l&&e<=u)return;this.hls.trigger(Y.BUFFER_FLUSHING,{startOffset:l,endOffset:1/0,type:i})}})}getDurationAndRange(){var e;const{details:n,mediaSource:r}=this;if(!n||!this.media||(r==null?void 0:r.readyState)!=="open")return null;const i=n.edge;if(n.live&&this.hls.config.liveDurationInfinity){if(n.fragments.length&&r.setLiveSeekableRange){const u=Math.max(0,n.fragmentStart),c=Math.max(u,i);return{duration:1/0,start:u,end:c}}return{duration:1/0}}const s=(e=this.overrides)==null?void 0:e.duration;if(s)return sn(s)?{duration:s}:null;const a=this.media.duration,o=sn(r.duration)?r.duration:0;return i>o&&i>a||!sn(a)?{duration:i}:null}updateMediaSource({duration:e,start:n,end:r}){const i=this.mediaSource;!this.media||!i||i.readyState!=="open"||(i.duration!==e&&(sn(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),i.duration=e),n!==void 0&&r!==void 0&&(this.log(`MediaSource duration is set to ${i.duration}. Setting seekable range to ${n}-${r}.`),i.setLiveSeekableRange(n,r)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:n,tracks:r}=this;if(this.log(`checkPendingTracks (pending: ${n} codec events expected: ${e}) ${us(r)}`),this.tracksReady){var i;const s=(i=this.transferData)==null?void 0:i.tracks;s&&Object.keys(s).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([n,r])=>{if(n){const i=this.tracks[n];e[n]={buffer:r,container:i.container,codec:i.codec,supplemental:i.supplemental,levelCodec:i.levelCodec,id:i.id,metadata:i.metadata}}}),this.hls.trigger(Y.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([n])=>{this.executeNext(n)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:n,mediaSource:r}=this;if(!r)throw new Error("createSourceBuffers called when mediaSource was null");for(const s in e){const a=s,o=e[a];if(this.isPending(o)){const l=this.getTrackCodec(o,a),u=`${o.container};codecs=${l}`;o.codec=l,this.log(`creating sourceBuffer(${u})${this.currentOp(a)?" Queued":""} ${us(o)}`);try{const c=r.addSourceBuffer(u),d=$5(a),f=[a,c];n[d]=f,o.buffer=c}catch(c){var i;this.error(`error while trying to add sourceBuffer: ${c.message}`),this.shiftAndExecuteNext(a),(i=this.operationQueue)==null||i.removeBlockers(),delete this.tracks[a],this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:c,sourceBufferName:a,mimeType:u,parent:o.id});return}this.trackSourceBuffer(a,o)}}this.bufferCreated()}getTrackCodec(e,n){const r=e.supplemental;let i=e.codec;r&&(n==="video"||n==="audiovideo")&&bC(r,"video")&&(i=rIt(i,r));const s=GP(i,e.levelCodec);return s?n.slice(0,5)==="audio"?ND(s,this.appendSource):s:""}trackSourceBuffer(e,n){const r=n.buffer;if(!r)return;const i=this.getTrackCodec(n,e);this.tracks[e]={buffer:r,codec:i,container:n.container,levelCodec:n.levelCodec,supplemental:n.supplemental,metadata:n.metadata,id:n.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(s,a)=>{const o=a.removedRanges;o!=null&&o.length&&this.hls.trigger(Y.BUFFER_FLUSHED,{type:s})})}get mediaSrc(){var e,n;const r=((e=this.media)==null||(n=e.querySelector)==null?void 0:n.call(e,"source"))||this.media;return r==null?void 0:r.src}onSBUpdateStart(e){const n=this.currentOp(e);n&&n.onStart()}onSBUpdateEnd(e){var n;if(((n=this.mediaSource)==null?void 0:n.readyState)==="closed"){this.resetBuffer(e);return}const r=this.currentOp(e);r&&(r.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,n){var r;const i=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${i}`,n),this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1});const s=this.currentOp(e);s&&s.onError(i)}updateTimestampOffset(e,n,r,i,s,a){const o=n-e.timestampOffset;Math.abs(o)>=r&&(this.log(`Updating ${i} SourceBuffer timestampOffset to ${n} (sn: ${s} cc: ${a})`),e.timestampOffset=n)}removeExecutor(e,n,r){const{media:i,mediaSource:s}=this,a=this.tracks[e],o=a==null?void 0:a.buffer;if(!i||!s||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const l=sn(i.duration)?i.duration:1/0,u=sn(s.duration)?s.duration:1/0,c=Math.max(0,n),d=Math.min(r,l,u);d>c&&(!a.ending||a.ended)?(a.ended=!1,this.log(`Removing [${c},${d}] from the ${e} SourceBuffer`),o.remove(c,d)):this.shiftAndExecuteNext(e)}appendExecutor(e,n){const r=this.tracks[n],i=r==null?void 0:r.buffer;if(!i)throw new fPt(`Attempting to append to the ${n} SourceBuffer, but it does not exist`);r.ending=!1,r.ended=!1,i.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(n=>{this.warn(`SourceBuffer blocked callback ${n}
672`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(n){this.warn(`Callback run without blocking ${this.operationQueue} ${n}`)}}isUpdating(){return this.sourceBuffers.some(([e,n])=>e&&n.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,n=this.sourceBufferTypes){if(!n.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:r}=this,i=n.map(a=>this.appendBlocker(a));return n.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(i).then(a=>{r===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(n=>{var r;const i=(r=this.tracks[n])==null?void 0:r.buffer;!i||i.updating||this.shiftAndExecuteNext(n)})}append(e,n,r){this.operationQueue&&this.operationQueue.append(e,n,r)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,n)=>e+(this.isPending(this.tracks[n])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[n])=>e+(n?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,n,r){const i=this.tracks[e];if(!i)return;const s=i.buffer;if(!s)return;const a=r.bind(this,e);i.listeners.push({event:n,listener:a}),s.addEventListener(n,a)}removeBufferListeners(e){const n=this.tracks[e];if(!n)return;const r=n.buffer;r&&(n.listeners.forEach(i=>{r.removeEventListener(i.event,i.listener)}),n.listeners.length=0)}}function qee(t){const e=t.querySelectorAll("source");[].slice.call(e).forEach(n=>{t.removeChild(n)})}function pPt(t,e){const n=self.document.createElement("source");n.type="video/mp4",n.src=e,t.appendChild(n)}function $5(t){return t==="audio"?1:0}class XH{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(Y.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(Y.MEDIA_ATTA
vendor: 2,627 bytes, line 672
672CHING,this.onMediaAttaching,this),e.on(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Y.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(Y.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,n){const r=this.hls.levels[n.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})}onMediaAttaching(e,n){this.media=n.media instanceof HTMLVideoElement?n.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,n){const r=this.hls;this.restrictedLevels=[],this.firstLevel=n.firstLevel,r.config.capLevelToPlayerSize&&n.video&&this.startCapping()}onLevelsUpdated(e,n){this.timer&&sn(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,n){this.hls.config.capLevelToPlayerSize&&n.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const n=this.hls,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&n.logger.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),n.autoLevelCapping=r,n.autoLevelEnabled&&n.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=n.autoLevelCapping}}}getMaxLevel(e){const n=this.hls.levels;if(!n.length)return-1;const r=n.filter((i,s)=>this.isLevelAllowed(i)&&s<=e);return this.clientRect=null,XH.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,n={width:0,height:0};if(e){const r=e.getBoundingClientRect();n.width=r.width,n.height=r.height,!n.width&&!n.height&&(n.width=r.right-r.left||e.
vendor: 4,145 bytes, line 672
672width||0,n.height=r.bottom-r.top||e.height||0)}return this.clientRect=n,n}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch{}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(r=>e.bitrate===r.bitrate&&e.width===r.width&&e.height===r.height)}static getMaxLevelByMediaSize(e,n,r){if(!(e!=null&&e.length))return-1;const i=(o,l)=>l?o.width!==l.width||o.height!==l.height:!0;let s=e.length-1;const a=Math.max(n,r);for(let o=0;o<e.length;o+=1){const l=e[o];if((l.width>=a||l.height>=a)&&i(l,e[o+1])){s=o;break}}return s}}const gPt={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Iu=gPt,mPt={HLS:"h"},vPt=mPt;class np{constructor(e,n){Array.isArray(e)&&(e=e.map(r=>r instanceof np?r:new np(r))),this.value=e,this.params=n}}const yPt="Dict";function bPt(t){return Array.isArray(t)?JSON.stringify(t):t instanceof Map?"Map{}":t instanceof Set?"Set{}":typeof t=="object"?JSON.stringify(t):String(t)}function SPt(t,e,n,r){return new Error(`failed to ${t} "${bPt(e)}" as ${n}`,{cause:r})}function rp(t,e,n){return SPt("serialize",t,e,n)}class _ye{constructor(e){this.description=e}}const Kee="Bare Item",EPt="Boolean";function TPt(t){if(typeof t!="boolean")throw rp(t,EPt);return t?"?1":"?0"}function APt(t){return btoa(String.fromCharCode(...t))}const wPt="Byte Sequence";function _Pt(t){if(ArrayBuffer.isView(t)===!1)throw rp(t,wPt);return`:${APt(t)}:`}const CPt="Integer";function xPt(t){return t<-999999999999999||999999999999999<t}function Cye(t){if(xPt(t))throw rp(t,CPt);return t.toString()}function IPt(t){return`@${Cye(t.getTime()/1e3)}`}function xye(t,e){if(t<0)return-xye(-t,e);const n=Math.pow(10,e);if(Math.abs(t*n%1-.5)<Number.EPSILON){const i=Math.floor(t*n);return(i%2===0?i:i+1)/n}else return Math.round(t*n)/n}const OPt="Decimal";function PPt(t){const e=xye(t,3);if(Math.floor(Math.abs(e)).toString().length>12)throw rp(t,OPt);const n=e.toString();return n.includes(".")?n:`${n}.0`}const RPt="String",LPt=/[\x00-\x1f\x7f]+/;function DPt(t){if(LPt.test(t))throw rp(t,RPt);return`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function kPt(t){return t.description||t.toString().slice(7,-1)}const NPt="Token";function Yee(t){const e=kPt(t);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw rp(e,NPt);return e}function g6(t){switch(typeof t){case"number":if(!sn(t))throw rp(t,Kee);return Number.isInteger(t)?Cye(t):PPt(t);case"string":return DPt(t);case"symbol":return Yee(t);case"boolean":return TPt(t);case"object":if(t instanceof Date)return IPt(t);if(t instanceof Uint8Array)return _Pt(t);if(t instanceof _ye)return Yee(t);default:throw rp(t,Kee)}}const MPt="Key";function m6(t){if(/^[a-z*][a-z0-9\-_.*]*$/.test(t)===!1)throw rp(t,MPt);return t}function JH(t){return t==null?"":Object.entries(t).map(([e,n])=>n===!0?`;${m6(e)}`:`;${m6(e)}=${g6(n)}`).join("")}function Iye(t){return t instanceof np?`${g6(t.value)}${JH(t.params)}`:g6(t)}function FPt(t){return`(${t.value.map(Iye).join(" ")})${JH(t.params)}`}function $Pt(t,e={whitespace:!0}){if(typeof t!="object"||t==null)throw rp(t,yPt);const n=t instanceof Map?t.entries():Object.entries(t),r=e!=null&&e.whitespace?" ":"";return Array.from(n).map(([i,s])=>{s instanceof np||(s=new np(s));let a=m6(i);return s.value===!0?a+=JH(s.params):(a+="=",Array.isArray(s.value)?a+=FPt(s):a+=Iye(s)),a}).join(`,${r}`)}function Oye(t,e){return $Pt(t,e)}const hh="CMCD-Object",va="CMCD-Request",ky="CMCD-Session",mm="CMCD-Status",BPt={br:hh,ab:hh,d:hh,ot:hh,tb:hh,tpb:hh,lb:hh,tab:hh,lab:hh,url:hh,pb:va,bl:va,tbl:va,dl:va,ltc:va,mtp:va,nor:va,nrr:va,rc:va,sn:va,sta:va,su:va,ttfb:va,ttfbb:va,ttlb:va,cmsdd:va,cmsds:va,smrt:va,df:va,cs:va,ts:va,cid:ky,pr:ky,sf:ky,sid:ky,st:ky,v:ky,msd:ky,bs:mm,bsd:mm,cdn:mm,rtp:mm,bg:mm,pt:mm,ec:mm,e:mm},UPt={REQUEST:va};function VPt(t){return Object.keys(t).reduce((e,n)=>{var r;return(r=t[n])===null||r===void 0||r.forEach(i=>
672e[i]=n),e},{})}function HPt(t,e){const n={};if(!t)return n;const r=Object.keys(t),i=e?VPt(e):{};return r.reduce((s,a)=>{var o;const l=BPt[a]||i[a]||UPt.REQUEST,u=(o=s[l])!==null&&o!==void 0?o:s[l]={};return u[a]=t[a],s},n)}function jPt(t){return["ot","sf","st","e","sta"].includes(t)}function zPt(t){return typeof t=="number"?sn(t):t!=null&&t!==""&&t!==!1}const Pye="event";function GPt(t,e){const n=new URL(t),r=new URL(e);if(n.origin!==r.origin)return t;const i=n.pathname.split("/").slice(1),s=r.pathname.split("/").slice(1,-1);for(;i[0]===s[0];)i.shift(),s.shift();for(;s.length;)s.shift(),i.unshift("..");return i.join("/")+n.search+n.hash}const ZP=t=>Math.round(t),v6=(t,e)=>Array.isArray(t)?t.map(n=>v6(n,e)):t instanceof np&&typeof t.value=="string"?new np(v6(t.value,e),t.params):(e.baseUrl&&(t=GPt(t,e.baseUrl)),e.version===1?encodeURIComponent(t):t),KO=t=>ZP(t/100)*100,WPt=(t,e)=>{let n=t;return e.version>=2&&(t instanceof np&&typeof t.value=="string"?n=new np([t]):typeof t=="string"&&(n=[t])),v6(n,e)},qPt={br:ZP,d:ZP,bl:KO,dl:KO,mtp:KO,nor:WPt,rtp:KO,tb:ZP},Rye="request",Lye="response",ej=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],KPt=["e"],YPt=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function LN(t){return YPt.test(t)}function ZPt(t){return ej.includes(t)||KPt.includes(t)||LN(t)}const Dye=["d","dl","nor","ot","rtp","su"];function QPt(t){return ej.includes(t)||Dye.includes(t)||LN(t)}const XPt=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function JPt(t){return ej.includes(t)||Dye.includes(t)||XPt.includes(t)||LN(t)}const eRt=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function tRt(t){return eRt.includes(t)||LN(t)}const nRt={[Lye]:JPt,[Pye]:ZPt,[Rye]:QPt};function kye(t,e={}){const n={};if(t==null||typeof t!="object")return n;const r=e.version||t.v||1,i=e.reportingMode||Rye,s=r===1?tRt:nRt[i];let a=Object.keys(t).filter(s);const o=e.filter;typeof o=="function"&&(a=a.filter(o));const l=i===Lye||i===Pye;l&&!a.includes("ts")&&a.push("ts"),r>1&&!a.includes("v")&&a.push("v");const u=ns({},qPt,e.formatters),c={version:r,reportingMode:i,baseUrl:e.baseUrl};return a.sort().forEach(d=>{let f=t[d];const h=u[d];if(typeof h=="function"&&(f=h(f,c)),d==="v"){if(r===1)return;f=r}d=="pr"&&f===1||(l&&d==="ts"&&!sn(f)&&(f=Date.now()),zPt(f)&&(jPt(d)&&typeof f=="string"&&(f=new _ye(f)),n[d]=f))}),n}function rRt(t,e={}){const n={};if(!t)return n;const r=kye(t,e),i=HPt(r,e==null?void 0:e.customHeaderMap);return Object.entries(i).reduce((s,[a,o])=>{const l=Oye(o,{whitespace:!1});return l&&(s[a]=l),s},n)}function iRt(t,e,n){return ns(t,rRt(e,n))}const sRt="CMCD";function aRt(t,e={}){return t?Oye(kye(t,e),{whitespace:!1}):""}function oRt(t,e={}){if(!t)return"";const n=aRt(t,e);return encodeURIComponent(n)}function lRt(t,e={}){if(!t)return"";const n=oRt(t,e);return`${sRt}=${n}`}const Zee=/CMCD=[^&#]+/;function uRt(t,e,n){const r=lRt(e,n);if(!r)return t;if(Zee.test(t))return t.replace(Zee,r);const i=t.includes("?")?"&":"?";return`${t}${i}${r}`}class cRt{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=i=>{try{this.apply(i,{ot:Iu.MANIFEST,su:!this.initialized})}catch(s){this.hls.logger.warn("Could not generate manifest CMCD data.",s)}},this.applyFragmentData=i=>{try{const{frag:s,part:a}=i,o=this.hls.levels[s.level],l=this.getObjectType(s),u={d:(a||s).duration*1e3,ot:l};(l===Iu.VIDEO||l===Iu.AUDIO||l==Iu.MUXED)&&(u.br=o.bitrate/1e3,u.tb=this.getTopBandwidth(l)/1e3,u.bl=this.getBufferLength(l));const c=a?this.getNextPart(a):this.getNextFrag(s);c!=null&&c.url&&c.url!==s.url&&(u.nor=c.url),this.apply(i,u)}catch(s){this.hls.logger.warn("Could not generate segment CMCD data.",s)}},this.hls=e;const n=this.config=e.config,{cmcd:r}=n;r!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||e.sessionId,this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;
672e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHED,this.onMediaDetached,this),e.on(Y.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHED,this.onMediaDetached,this),e.off(Y.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,n){var r,i;this.audioBuffer=(r=n.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(i=n.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:vPt.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,n={}){ns(n,this.createData());const r=n.ot===Iu.INIT||n.ot===Iu.VIDEO||n.ot===Iu.MUXED;this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering);const{includeKeys:i}=this;i&&(n=Object.keys(n).reduce((a,o)=>(i.includes(o)&&(a[o]=n[o]),a),{}));const s={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),iRt(e.headers,n,s)):e.url=uRt(e.url,n,s)}getNextFrag(e){var n;const r=(n=this.hls.levels[e.level])==null?void 0:n.details;if(r){const i=e.sn-r.startSN;return r.fragments[i+1]}}getNextPart(e){var n;const{index:r,fragment:i}=e,s=(n=this.hls.levels[i.level])==null||(n=n.details)==null?void 0:n.partList;if(s){const{sn:a}=i;for(let o=s.length-1;o>=0;o--){const l=s[o];if(l.index===r&&l.fragment.sn===a)return s[o+1]}}}getObjectType(e){const{type:n}=e;if(n==="subtitle")return Iu.TIMED_TEXT;if(e.sn==="initSegment")return Iu.INIT;if(n==="audio")return Iu.AUDIO;if(n==="main")return this.hls.audioTracks.length?Iu.VIDEO:Iu.MUXED}getTopBandwidth(e){let n=0,r;const i=this.hls;if(e===Iu.AUDIO)r=i.audioTracks;else{const s=i.maxAutoLevel,a=s>-1?s+1:i.levels.length;r=i.levels.slice(0,a)}return r.forEach(s=>{s.bitrate>n&&(n=s.bitrate)}),n>0?n:NaN}getBufferLength(e){const n=this.media,r=e===Iu.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!n?NaN:ar.bufferInfo(r,n.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,n=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new r(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){n(s),this.loader.load(s,a,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,n=this.applyFragmentData,r=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new r(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){n(s),this.loader.load(s,a,o)}}}}const dRt=3e5;class fRt extends Fd{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Y.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Y.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,n)=>(e.indexOf(n.pathwayId)===-1&&e.push(n.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}
vendor: 5,393 bytes, line 672
672startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const n=this.levels;n&&(this.levels=n.filter(r=>r!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,n){const{contentSteering:r}=n;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,n){this.audioTracks=n.audioTracks,this.subtitleTracks=n.subtitleTracks}onError(e,n){const{errorAction:r}=n;if((r==null?void 0:r.action)===Jo.SendAlternateToPenaltyBox&&r.flags===dc.MoveAllAlternatesMatchingHost){const i=this.levels;let s=this._pathwayPriority,a=this.pathwayId;if(n.context){const{groupId:o,pathwayId:l,type:u}=n.context;o&&i?a=this.getPathwayForGroupId(o,u,a):l&&(a=l)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!s&&i&&(s=this.pathways()),s&&s.length>1&&(this.updatePathwayPriority(s),r.resolved=this.pathwayId!==a),n.details===st.BUFFER_APPEND_ERROR&&!n.fatal?r.resolved=!0:r.resolved||this.warn(`Could not resolve ${n.details} ("${n.error.message}") with content-steering for Pathway: ${a} levels: ${i&&i.length} priorities: ${us(s)} penalized: ${us(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let n=this.getLevelsForPathway(this.pathwayId);if(n.length===0){const r=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`),n=this.getLevelsForPathway(r),this.pathwayId=r}return n.length!==e.length&&this.log(`Found ${n.length}/${e.length} levels in Pathway "${this.pathwayId}"`),n}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(n=>e===n.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let n;const r=this.penalizedPathways,i=performance.now();Object.keys(r).forEach(s=>{i-r[s]>dRt&&delete r[s]});for(let s=0;s<e.length;s++){const a=e[s];if(a in r)continue;if(a===this.pathwayId)return;const o=this.hls.nextLoadLevel,l=this.hls.levels[o];if(n=this.getLevelsForPathway(a),n.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,eye(n),this.hls.trigger(Y.LEVELS_UPDATED,{levels:n});const u=this.hls.levels[o];l&&u&&this.levels&&(u.attrs["STABLE-VARIANT-ID"]!==l.attrs["STABLE-VARIANT-ID"]&&u.bitrate!==l.bitrate&&this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${u.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,n,r){const i=this.getLevelsForPathway(r).concat(this.levels||[]);for(let s=0;s<i.length;s++)if(n===Mr.AUDIO_TRACK&&i[s].hasAudioGroup(e)||n===Mr.SUBTITLE_TRACK&&i[s].hasSubtitleGroup(e))return i[s].pathwayId;return r}clonePathways(e){const n=this.levels;if(!n)return;const r={},i={};e.forEach(s=>{const{ID:a,"BASE-ID":o,"URI-REPLACEMENT":l}=s;if(n.some(c=>c.pathwayId===a))return;const u=this.getLevelsForPathway(o).map(c=>{const d=new ra(c.attrs);d["PATHWAY-ID"]=a;const f=d.AUDIO&&`${d.AUDIO}_clone_${a}`,h=d.SUBTITLES&&`${d.SUBTITLES}_clone_${a}`;f&&(r[d.AUDIO]=f,d.AUDIO=f),h&&(i[d.SUBTITLES]=h,d.SUBTITLES=h);const g=Nye(c.uri,d["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l),v=new EC({attrs:d,audioCodec:c.audioCodec,bitrate:c.bitrate,height:c.height,name:c.name,url:g,videoCodec:c.videoCodec,width:c.width});if(c.audioGroups)for(let b=1;b<c.audioGroups.length;b++)v.addGroupId("audio",`${c.audioGroups[b]}_clone_${a}`);if(c.subtitleGroups)for(let b=1;b<c.subtitleGroups.length;b++)v.addGroupId("text",`${c.subtitleGroups[b]}_clone_${a}`);return v});n.push(...u),Qee(this.audioTracks,r,l,a),Qee(this.subtitleTracks,i,l,a)})}loadSteeringManifest(e){const n=this.hls.config,r=n.loader;this.loader&&this.loader.destroy(),this.loader=new r(n);let i;try{i=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const c=(this.hls.bandwidthEstimate||n.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+c)}const s={responseType:"json",url:i.href},a=n.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},l={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},u={onSuccess:(c,d,f,h)=>{this.log(`Loaded steering manifest: "${i}"`);const g=c.data;if((g==null?void 0:g.VERSION)!==1){this.log(`Steering VERSION ${g.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=g.TTL;const{"RELOAD-URI":v,"PATHWAY-CLONES":b,"PATHWAY-PRIORITY":S}=g;if(v)try{this.uri=new self.URL(v,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${v}`);return}this.scheduleRefresh(this.uri||f.url),b&&this.clonePathways(b);const A={steeringManifest:g,url:i.toString()};this.hls.trigger(Y.STEERING_MANIFEST_LOADED,A),S&&this.updatePathwayPriority(S)},onError:(c,d,f,h)=>
672{if(this.log(`Error loading steering manifest: ${c.code} ${c.text} (${d.url})`),this.stopLoad(),c.code===410){this.enabled=!1,this.log(`Steering manifest ${d.url} no longer available`);return}let g=this.timeToLoad*1e3;if(c.code===429){const v=this.loader;if(typeof(v==null?void 0:v.getResponseHeader)=="function"){const b=v.getResponseHeader("Retry-After");b&&(g=parseFloat(b)*1e3)}this.log(`Steering manifest ${d.url} rate limited`);return}this.scheduleRefresh(this.uri||d.url,g)},onTimeout:(c,d,f)=>{this.log(`Timeout loading steering manifest (${d.url})`),this.scheduleRefresh(this.uri||d.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(s,l,u)}scheduleRefresh(e,n=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const i=(r=this.hls)==null?void 0:r.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},n)}}function Qee(t,e,n,r){t&&Object.keys(e).forEach(i=>{const s=t.filter(a=>a.groupId===i).map(a=>{const o=ns({},a);return o.details=void 0,o.attrs=new ra(o.attrs),o.url=o.attrs.URI=Nye(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",n),o.groupId=o.attrs["GROUP-ID"]=e[i],o.attrs["PATHWAY-ID"]=r,o});t.push(...s)})}function Nye(t,e,n,r){const{HOST:i,PARAMS:s,[n]:a}=r;let o;e&&(o=a==null?void 0:a[e],o&&(t=o));const l=new self.URL(t);return i&&!o&&(l.host=i),s&&Object.keys(s).sort().forEach(u=>{u&&l.searchParams.set(u,s[u])}),l.href}class VE extends Fd{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=VE.CDMCleanupPromise?[VE.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=n=>{const{initDataType:r,initData:i}=n,s=`"${n.type}" event: init data type: "${r}"`;if(this.debug(s),i!==null){if(!this.keyFormatPromise){let a=Object.keys(this.keySystemAccessPromises);a.length||(a=bw(this.config));const o=a.map(P5).filter(l=>!!l);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(a=>{const o=qP(a);if(r!=="sinf"||o!==aa.FAIRPLAY){this.log(`Ignoring "${n.type}" event with init data type: "${r}" for selected key-system ${o}`);return}let l;try{const h=ao(new Uint8Array(i)),g=HH(JSON.parse(h).sinf),v=Ove(g);if(!v)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");l=new Uint8Array(v.subarray(8,24))}catch(h){this.warn(`${s} Failed to parse sinf: ${h}`);return}const u=el(l),{keyIdToKeySessionPromise:c,mediaKeySessions:d}=this;let f=c[u];for(let h=0;h<d.length;h++){const g=d[h],v=g.decryptdata;if(!v.keyId)continue;const b=el(v.keyId);if(UD(l,v.keyId)||v.uri.replace(/-/g,"").indexOf(u)!==-1){if(f=c[b],!f)continue;if(v.pssh)break;delete c[b],v.pssh=new Uint8Array(i),v.keyId=l,f=c[u]=f.then(()=>this.generateRequestWithPreferredKeySession(g,r,i,"encrypted-event-key-match")),f.catch(S=>this.handleError(S));break}}f||this.handleError(new Error(`Key ID ${u} not encountered in playlist. Key-system sessions ${d.length}.`))}).catch(a=>this.handleError(a))}},this.onWaitingForKey=n=>{this.log(`"${n.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}
672registerListeners(){this.hls.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Y.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Y.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(Y.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Y.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Y.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(Y.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:n,widevineLicenseUrl:r}=this.config,i=n==null?void 0:n[e];if(i)return i.licenseUrl;if(e===aa.WIDEVINE&&r)return r}getLicenseServerUrlOrThrow(e){const n=this.getLicenseServerUrl(e);if(n===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return n}getServerCertificateUrl(e){const{drmSystems:n}=this.config,r=n==null?void 0:n[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const n=this.hls.levels,r=(a,o,l)=>!!a&&l.indexOf(a)===o,i=n.map(a=>a.audioCodec).filter(r),s=n.map(a=>a.videoCodec).filter(r);return i.length+s.length===0&&s.push("avc1.42e01e"),new Promise((a,o)=>{const l=u=>{const c=u.shift();this.getMediaKeysPromise(c,i,s).then(d=>a({keySystem:c,mediaKeys:d})).catch(d=>{u.length?l(u):d instanceof lc?o(d):o(new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_NO_ACCESS,error:d,fatal:!0},d.message))})};l(e)})}requestMediaKeySystemAccess(e,n){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let i=`Configured requestMediaKeySystemAccess is not a function ${r}`;return Wve===null&&self.location.protocol==="http:"&&(i=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(i))}return r(e,n)}getMediaKeysPromise(e,n,r){var i;const s=WIt(e,n,r,this.config.drmSystemOptions||{});let a=this.keySystemAccessPromises[e],o=(i=a)==null?void 0:i.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${us(s)}`),o=this.requestMediaKeySystemAccess(e,s);const l=a=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(u=>{this.log(`Failed to obtain access to key-system "${e}": ${u}`)}),o.then(u=>{this.log(`Access for key-system "${u.keySystem}" obtained`);const c=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const d=l.mediaKeys=u.createMediaKeys().then(f=>(this.log(`Media-keys created for "${e}"`),l.hasMediaKeys=!0,c.then(h=>h?this.setMediaKeysServerCertificate(f,e,h):f)));return d.catch(f=>{this.error(`Failed to create media-keys for "${e}"}: ${f}`)}),d})}return o.then(()=>a.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:n,mediaKeys:r}){this.log(`Creating key-system session "${n}" keyId: ${el(e.keyId||[])} keyUri: ${e.uri}`);const i=r.createSession(),s={decryptdata:e,keySystem:n,mediaKeys:r,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(s),s}renewKeySession(e){const n=e.decryptdata;if(n.pssh){const r=this.createMediaKeySessionContext(e),i=YO(n),s="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(r,s,n.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,n){const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyId ${el(e.decryptdata.keyId||[])}
673      } (data length: ${n.byteLength})`),r.update(n)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>P5(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:n,mediaKeys:r})=>this.attemptSetMediaKeys(n,r))}selectKeySystem(e){return new Promise((n,r)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:i})=>{const s=P5(i);s?n(s):r(new Error(`Unable to find format for key-system "${i}"`))}).catch(r)})}selectKeySystemFormat(e){const n=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)),this.keyFormatPromise}getKeyFormatPromise(e){const n=bw(this.config),r=e.map(qP).filter(i=>!!i&&n.indexOf(i)!==-1);return this.selectKeySystem(r)}getKeyStatus(e){const{mediaKeySessions:n}=this;for(let r=0;r<n.length;r++){const i=hRt(e,n[r]);if(i)return i}}loadKey(e){const n=e.keyInfo.decryptdata,r=YO(n),i=this.bannedKeyIds[r];if(i||this.getKeyStatus(n)==="internal-error"){const o=Xee(i||"internal-error",n);return this.handleError(o,e.frag),Promise.reject(o)}const s=`(keyId: ${r} format: "${n.keyFormat}" method: ${n.method} uri: ${n.uri})`;this.log(`Starting session for key ${s}`);const a=this.keyIdToKeySessionPromise[r];if(!a){const o=this.getKeySystemForKeyPromise(n).then(({keySystem:l,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(l,u).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:l,mediaKeys:u,decryptdata:n}))))).then(l=>{const u="cenc",c=n.pssh?n.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(l,u,c,"playlist-key")});return o.catch(l=>this.handleError(l,e.frag)),this.keyIdToKeySessionPromise[r]=o,o}return a.catch(o=>{if(o instanceof lc){const l=Ui({},o.data);this.getKeyStatus(n)==="internal-error"&&(l.decryptdata=n);const u=new lc(l,o.message);this.handleError(u,e.frag)}}),a}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,n){if(this.hls)if(e instanceof lc){n&&(e.data.frag=n);const r=e.data.decryptdata;this.error(`${e.message}${r?` (${el(r.keyId||[])})`:""}`),this.hls.trigger(Y.ERROR,e.data)}else this.error(e.message),this.hls.trigger(Y.ERROR,{type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}
vendor: 13,136 bytes, line 673
673getKeySystemForKeyPromise(e){const n=YO(e),r=this.keyIdToKeySessionPromise[n];if(!r){const i=qP(e.keyFormat),s=i?[i]:bw(this.config);return this.attemptKeySystemAccess(s)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=bw(this.config)),e.length===0)throw new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${us({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,n){if(this.mediaResolved=void 0,this.mediaKeys===n)return Promise.resolve();const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(r).then(()=>this.media?this.media.setMediaKeys(n):new Promise((s,a)=>{this.mediaResolved=()=>{if(this.mediaResolved=void 0,!this.media)return a(new Error("Attempted to set mediaKeys without media element attached"));this.mediaKeys=n,this.media.setMediaKeys(n).then(s).catch(a)}}));return this.mediaKeys=n,this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(s=>r.indexOf(s)===-1)})}generateRequestWithPreferredKeySession(e,n,r,i){var s;const a=(s=this.config.drmSystems)==null||(s=s[e.keySystem])==null?void 0:s.generateRequest;if(a)try{const g=a.call(this.hls,n,r,e);if(!g)throw new Error("Invalid response from configured generateRequest filter");n=g.initDataType,r=g.initData?g.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(g){if(this.warn(g.message),this.hls&&this.hls.config.debug)throw g}if(r===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const o=YO(e.decryptdata),l=e.decryptdata.uri;this.log(`Generating key-session request for "${i}" keyId: ${o} URI: ${l} (init data type: ${n} length: ${r.byteLength})`);const u=new zH,c=e._onmessage=g=>{const v=e.mediaKeysSession;if(!v){u.emit("error",new Error("invalid state"));return}const{messageType:b,message:S}=g;this.log(`"${b}" message event for session "${v.sessionId}" message size: ${S.byteLength}`),b==="license-request"||b==="license-renewal"?this.renewLicense(e,S).catch(A=>{u.eventNames().length?u.emit("error",A):this.handleError(A)}):b==="license-release"?e.keySystem===aa.FAIRPLAY&&this.updateKeySession(e,u6("acknowledged")).then(()=>this.removeSession(e)).catch(A=>this.handleError(A)):this.warn(`unhandled media key message type "${b}"`)},d=(g,v)=>{v.keyStatus=g;let b;g.startsWith("usable")?u.emit("resolved"):g==="internal-error"||g==="output-restricted"||g==="output-downscaled"?b=Xee(g,v.decryptdata):g==="expired"?b=new Error(`key expired (keyId: ${o})`):g==="released"?b=new Error("key released"):g==="status-pending"||this.warn(`unhandled key status change "${g}" (keyId: ${o})`),b&&(u.eventNames().length?u.emit("error",b):this.handleError(b))},f=e._onkeystatuseschange=g=>{if(!e.mediaKeysSession){u.emit("error",new Error("invalid state"));return}const b=this.getKeyStatuses(e);if(!Object.keys(b).some(x=>b[x]!=="status-pending"))return;if(b[o]==="expired"){this.log(`Expired key ${us(b)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let A=b[o];if(A)d(A,e);else{var w;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(w=e.keyStatusTimeouts)[o]||(w[o]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const P=this.getKeyStatus(e.decryptdata);if(P&&P!=="status-pending")return this.log(`No status for keyId ${o} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${P} from other session.`),d(P,e);this.log(`key status for ${o} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),A="internal-error",d(A,e)},1e3)),this.log(`No status for keyId ${o} (${us(b)}).`)}};iu(e.mediaKeysSession,"message",c),iu(e.mediaKeysSession,"keystatuseschange",f);const h=new Promise((g,v)=>{u.on("error",v),u.on("resolved",g)});return e.mediaKeysSession.generateRequest(n,r).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${o} URI: ${l}`)}).catch(g=>{throw new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_NO_SESSION,error:g,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${g}`)}).then(()=>h).catch(g=>(u.removeAllListeners(),this.removeSession(e).then(()=>{throw g}))).then(()=>(u.removeAllListeners(),e))}getKeyStatuses(e){const n={};return e.mediaKeysSession.keyStatuses.forEach((r,i)=>{if(typeof i=="string"&&typeof r=="object"){const o=i;i=r,r=o}const s="buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i);if(e.keySystem===aa.PLAYREADY&&s.length===16){const o=el(s);n[o]=r,zve(s)}const a=el(s);r==="internal-error"&&(this.bannedKeyIds[a]=r),this.log(`key status change "${r}" for keyStatuses keyId: ${a} key-session "${e.mediaKeysSession.sessionId}"`),n[a]=r}),n}fetchServerCertificate(e){const n=this.config,r=n.loader,i=new r(n),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise((a,o)=>{const l={responseType:"arraybuffer",url:s},u=n.certLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(f,h,g,v)=>{a(f.data)},onError:(f,h,g,v)=>{o(new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:g,response:Ui({url:l.url,data:void 0},f)},`"${e}" certificate request failed (${s}). Status: ${f.code} (${f.text})`))},onTimeout:(f,h,g)=>{o(new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:g,response:{url:l.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(f,h,g)=>{o(new Error("aborted"))}};i.load(l,c,d)})):Promise.resolve()}setMediaKeysServerCertificate(e,n,r){return new Promise((i,s)=>{e.setServerCertificate(r).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${r.byteLength}) on "${n}"`),i(e)}).catch(a=>{s(new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:a,fatal:!0},a.message))})})}renewLicense(e,n){return this.requestLicense(e,new Uint8Array(n)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(i=>{throw new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:i,fatal:!1},i.message)}))}unpackPlayReadyKeyMessage(e,n){const r=String.fromCharCode.apply(null,new Uint16Array(n.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),n;const i=new DOMParser().parseFromString(r,"application/xml"),s=i.querySelectorAll("HttpHeader");if(s.length>0){let c;for(let d=0,f=s.length;d<f;d++){var a,o;c=s[d];const h=(a=c.querySelector("name"))==null?void 0:a.textContent,g=(o=c.querySelector("value"))==null?void 0:o.textContent;h&&g&&e.setRequestHeader(h,g)}}const l=i.querySelector("Challenge"),u=l==null?void 0:l.textContent;if(!u)throw new Error("Cannot find <Challenge> in key message");return u6(atob(u))}setupLicenseXHR(e,n,r,i){const s=this.config.licenseXhrSetup;return s?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return s.call(this.hls,e,n,r,i)}).catch(a=>{if(!r.decryptdata)throw a;return e.open("POST",n,!0),s.call(this.hls,e,n,r,i)}).then(a=>(e.readyState||e.open("POST",n,!0),{xhr:e,licenseChallenge:a||i})):(e.open("POST",n,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,n){const r=this.config.keyLoadPolicy.default;return new Promise((i,s)=>{const a=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return s(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let l=o.response;this.log(`License received ${l instanceof ArrayBuffer?l.byteLength:l}`);const u=this.config.licenseResponseCallback;if(u)try{l=u.call(this.hls,o,a,e)}catch(c){this.error(c)}i(l)}else{const l=r.errorRetry,u=l?l.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>u||o.status>=400&&o.status<500)s(new lc({type:xn.KEY_SYSTEM_ERROR,details:st.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const c=u-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${c} attempts left`),this.requestLicense(e,n).then(i,s)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,n).then(({xhr:l,licenseChallenge:u})=>{e.keySystem==aa.PLAYREADY&&(u=this.unpackPlayReadyKeyMessage(l,u)),l.send(u)}).catch(s)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,n){if(!this.config.emeEnabled)return;const r=n.media;this.media=r,iu(r,"encrypted",this.onMediaEncrypted),iu(r,"waitingforkey",this.onWaitingForKey);const i=this.mediaResolved;i?i():this.mediaKeys=r.mediaKeys}onMediaDetached(){const e=this.media;e&&($u(e,"encrypted",this.onMediaEncrypted),$u(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const n=this.mediaResolved;if(n&&n(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const r=this.media,i=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Ev.clearKeyUriToKeyIdMap();const s=i.length;VE.CDMCleanupPromise=Promise.all(i.map(a=>this.removeSession(a)).concat((r==null||(e=r.setMediaKeys(null))==null?void 0:e.catch(a=>{this.log(`Could not clear media keys: ${a}`),this.hls&&this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${a}`)})}))||Promise.resolve())).catch(a=>{this.log(`Could not close sessions and clear media keys: ${a}`),this.hls&&this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${a}`)})}).then(()=>{s&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:n}){if(!(!n||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=n.reduce((i,s)=>(i.indexOf(s.keyFormat)===-1&&i.push(s.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:n,licenseXhr:r,decryptdata:i}=e;if(n){this.log(`Remove licenses and keys and close session "${n.sessionId}" keyId: ${el((i==null?void 0:i.keyId)||[])}`),e._onmessage&&(n.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(n.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);s>-1&&this.mediaKeySessions.splice(s,1);const{keyStatusTimeouts:a}=e;a&&Object.keys(a).forEach(u=>self.clearTimeout(a[u]));const{drmSystemOptions:o}=this.config;return(KIt(o)?new Promise((u,c)=>{self.setTimeout(()=>c(new Error("MediaKeySession.remove() timeout")),8e3),n.remove().then(u).catch(c)}):Promise.resolve()).catch(u=>{this.log(`Could not remove session: ${u}`),this.hls&&this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${u}`)})}).then(()=>n.close()).catch(u=>{this.log(`Could not close session: ${u}`),this.hls&&this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${u}`)})})}return Promise.resolve()}}VE.CDMCleanupPromise=void 0;function YO(t){if(!t)throw new Error("Could not read keyId of undefined decryptdata");if(t.keyId===null)throw new Error("keyId is null");return el(t.keyId)}function hRt(t,e){if(t.keyId&&e.mediaKeysSession.keyStatuses.has(t.keyId))return e.mediaKeysSession.keyStatuses.get(t.keyId);if(t.matches(e.decryptdata))return e.keyStatus}class lc extends Error{constructor(e,n){super(n),this.data=void 0,e.error||(e.error=new Error(n)),this.data=e,e.err=e.error}}function Xee(t,e){const n=t==="output-restricted",r=n?st.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:st.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new lc({type:xn.KEY_SYSTEM_ERROR,details:r,fatal:!1,decryptdata:e},n?"HDCP level output restricted":`key status changed to "${t}"`)}class pRt{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}
vendor: 8,458 bytes, line 673
673registerListeners(){this.hls.on(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,n){const r=this.hls.config;if(r.capLevelOnFPSDrop){const i=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,n,r){const i=performance.now();if(n){if(this.lastTime){const s=i-this.lastTime,a=r-this.lastDroppedFrames,o=n-this.lastDecodedFrames,l=1e3*a/s,u=this.hls;if(u.trigger(Y.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:r}),l>0&&a>u.config.fpsDroppedMonitoringThreshold*o){let c=u.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=c)&&(c=c-1,u.trigger(Y.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:u.currentLevel}),u.autoLevelCapping=c,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=n}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const n=e.getVideoPlaybackQuality();this.checkFPS(e,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function Mye(t,e){let n;try{n=new Event("addtrack")}catch{n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=t,e.dispatchEvent(n)}function Fye(t,e){const n=t.mode;if(n==="disabled"&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){ji.debug(`[texttrack-utils]: ${r}`);try{const i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,t.addCue(i)}catch(i){ji.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`)}}n==="disabled"&&(t.mode=n)}function vE(t,e){const n=t.mode;if(n==="disabled"&&(t.mode="hidden"),t.cues)for(let r=t.cues.length;r--;)e&&t.cues[r].removeEventListener("enter",e),t.removeCue(t.cues[r]);n==="disabled"&&(t.mode=n)}function y6(t,e,n,r){const i=t.mode;if(i==="disabled"&&(t.mode="hidden"),t.cues&&t.cues.length>0){const s=mRt(t.cues,e,n);for(let a=0;a<s.length;a++)(!r||r(s[a]))&&t.removeCue(s[a])}i==="disabled"&&(t.mode=i)}function gRt(t,e){if(e<=t[0].startTime)return 0;const n=t.length-1;if(e>t[n].endTime)return-1;let r=0,i=n,s;for(;r<=i;)if(s=Math.floor((i+r)/2),e<t[s].startTime)i=s-1;else if(e>t[s].startTime&&r<n)r=s+1;else return s;return t[r].startTime-e<e-t[i].startTime?r:i}function mRt(t,e,n){const r=[],i=gRt(t,e);if(i>-1)for(let s=i,a=t.length;s<a;s++){const o=t[s];if(o.startTime>=e&&o.endTime<=n)r.push(o);else if(o.startTime>n)return r}return r}function QP(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(t[n])}return e}class vRt extends QH{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let n=null;const r=QP(this.media.textTracks);for(let s=0;s<r.length;s++)if(r[s].mode==="hidden")n=r[s];else if(r[s].mode==="showing"){n=r[s];break}const i=this.findTrackForTextTrack(n);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Y.LEVEL_LOADING,this.onLevelLoading,this),e.on(Y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Y.LEVEL_LOADING,this.onLevelLoading,this),e.off(Y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Y.ERROR,this.onError,this)}onMediaAttached(e,n){this.media=n.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,n){const r=this.media;if(!r)return;const i=!!n.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,i)return;QP(r.textTracks).forEach(a=>{vE(a)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,n){this.tracks=n.subtitleTracks}onSubtitleTrackLoaded(e,n){const{id:r,groupId:i,details:s}=n,a=this.tracksInGroup[r];if(!a||a.groupId!==i){this.warn(`Subtitle track with id:${r} and group:${i} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=n.details,this.log(`Subtitle track ${r} "${a.name}" lang:${a.lang} group:${i} loaded [${s.startSN}-${s.endSN}]`),r===this.trackId&&this.playlistLoaded(r,n,o)}onLevelLoading(e,n){this.switchLevel(n.level)}onLevelSwitching(e,n){this.switchLevel(n.level)}switchLevel(e){const n=this.hls.levels[e];if(!n)return;const r=n.subtitleGroups||null,i=this.groupIds;let s=this.currentTrack;if(!r||(i==null?void 0:i.length)!==(r==null?void 0:r.length)||r!=null&&r.some(a=>(i==null?void 0:i.indexOf(a))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(c=>!r||r.indexOf(c.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(c=>c.default)&&(this.selectDefaultTrack=!1),a.forEach((c,d)=>{c.id=d});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const o=this.hls.config.subtitlePreference;if(!s&&o){this.selectDefaultTrack=!1;const c=Uh(o,a);if(c>-1)s=a[c];else{const d=Uh(o,this.tracks);s=this.tracks[d]}}let l=this.findTrackId(s);l===-1&&s&&(l=this.findTrackId(null));const u={subtitleTracks:a};this.log(`Updating subtitle tracks, ${a.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(Y.SUBTITLE_TRACKS_UPDATED,u),l!==-1&&this.trackId===-1&&this.setSubtitleTrack(l)}}findTrackId(e){const n=this.tracksInGroup,r=this.selectDefaultTrack;for(let i=0;i<n.length;i++){const s=n[i];if(!(r&&!s.default||!r&&!e)&&(!e||O0(s,e)))return i}if(e){for(let i=0;i<n.length;i++){const s=n[i];if(_C(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<n.length;i++){const s=n[i];if(_C(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const n=this.tracksInGroup;for(let r=0;r<n.length;r++){const i=n[r];if(p6(i,e))return r}}return-1}onError(e,n){n.fatal||!n.context||n.context.type===Mr.SUBTITLE_TRACK&&n.c
vendor: 7,089 bytes, line 673
673ontext.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(n.context.groupId)!==-1)&&this.checkRetry(n)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const n=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&O0(e,r))return r;const i=Uh(e,this.tracksInGroup);if(i>-1){const s=this.tracksInGroup[i];return this.setSubtitleTrack(i),s}else{if(r)return null;{const s=Uh(e,n);if(s>-1)return n[s]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,n){super.loadingPlaylist(e,n);const r=e.id,i=e.groupId,s=this.getUrlWithDirectives(e.url,n),a=e.details,o=a==null?void 0:a.age;this.log(`Loading subtitle ${r} "${e.name}" lang:${e.lang} group:${i}${(n==null?void 0:n.msn)!==void 0?" at sn "+n.msn+" part "+n.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type&&" "+a.type||""):""} ${s}`),this.hls.trigger(Y.SUBTITLE_TRACK_LOADING,{url:s,id:r,groupId:i,deliveryDirectives:n||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const n=QP(e.textTracks),r=this.currentTrack;let i;if(r&&(i=n.filter(s=>p6(r,s))[0],i||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(n).forEach(s=>{s.mode!=="disabled"&&s!==i&&(s.mode="disabled")}),i){const s=this.subtitleDisplay?"showing":"hidden";i.mode!==s&&(i.mode=s)}}setSubtitleTrack(e){const n=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=n.length||!sn(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,i=n[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),!i){this.hls.trigger(Y.SUBTITLE_TRACK_SWITCH,{id:e});return}const s=!!i.details&&!i.details.live;if(e===this.trackId&&i===r&&s)return;this.log(`Switching to subtitle-track ${e}`+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:a,groupId:o="",name:l,type:u,url:c}=i;this.hls.trigger(Y.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:l,type:u,url:c});const d=this.switchParams(i.url,r==null?void 0:r.details,i.details);this.loadPlaylist(d)}}function yRt(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),n=e.toString();return URL.revokeObjectURL(e),n.slice(n.lastIndexOf("/")+1)}catch{let n=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const s=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(i=="x"?s:s&3|8).toString(16)})}}}function l_(t){let e=5381,n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return(e>>>0).toString()}const HE=.025;let zD=function(t){return t[t.Point=0]="Point",t[t.Range=1]="Range",t}({});function bRt(t,e,n){return`${t.identifier}-${n+1}-${l_(e)}`}class SRt{constructor(e,n){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=n,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var n;if(e>0&&e>=this.assetList.length)return!0;const r=this.playoutLimit;return e<=0||isNaN(r)?!1:r===0?!0:(((n=this.assetList[e])==null?void 0:n.startOffset)||0)>r}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const n=this.dateRange.tagAnchor;if(n)return B5(e,n)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const n=this.dateRange.startTime,r=B5(n,e);return n-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,n=sn(e)?e:this.duration;return this.cumulativeDuration+n}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const n=this.resumeAnchor;if(n)return B5(e,n)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<HE))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let n;return this._duration!==null?n=this._duration:this.dateRange.duration?n=this.dateRange.duration:n=this.dateRange.plannedDuration||0,!isNaN(e)&&e<n&&(n=e),n}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?zD.Range:zD.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return ERt(this)}}function B5(t,e){return t-e.start<e.duration/2&&!(Math.abs(t-(e.start+e.duration))<HE)?e.start:e.start+e.duration}function $ye(t,e,n){const r=new self.URL(t,n);return r.protocol!=="data:"&&r.searchParams.set("_HLS_primary_id",e),r}function U5(t,e){for(;(n=t.assetList[++e])!=null&&n.error;)var n;return e}function ERt(t){return`["${t.identifier}" ${t.cue.pre?"<pre>":t.cue.post?"<post>":""}${t.timelineStart.toFixed(2)}-${t.resumeTime.toFixed(2)}]`}function BS(t){const e=t.timelineStart,n=t.duration||0;return`["${t.identifier}" ${e.toFixed(2)}-${(e+n).toFixed(2)}]`}class TRt{constructor(e,n,r,i){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetail
vendor: 4,237 bytes, line 673
673s=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(Y.PLAYOUT_LIMIT_REACHED,{})};const s=this.hls=new e(n);this.interstitial=r,this.assetItem=i;const a=()=>{this.hasDetails=!0};s.once(Y.LEVEL_LOADED,a),s.once(Y.AUDIO_TRACK_LOADED,a),s.once(Y.SUBTITLE_TRACK_LOADED,a),s.on(Y.MEDIA_ATTACHING,(o,{media:l})=>{this.removeMediaListeners(),this.mediaAttached=l,this.interstitial.playoutLimit&&(l.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&s.on(Y.BUFFER_APPENDED,()=>{const c=this.bufferedEnd;this.reachedPlayout(c)&&(this._bufferedEosTime=c,s.trigger(Y.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let n=this.assetItem.uri;try{n=$ye(n,e.config.primarySessionId||"").href}catch{}e.loadSource(n)}}bufferedInPlaceToEnd(e){var n;if(!this.appendInPlace)return!1;if((n=this.hls)!=null&&n.bufferedToEnd)return!0;if(!e)return!1;const r=Math.min(this._bufferedEosTime||1/0,this.duration),i=this.timelineOffset,s=ar.bufferInfo(e,i,0);return this.getAssetTime(s.end)>=r-.02}reachedPlayout(e){const r=this.interstitial.playoutLimit;return this.startOffset+e>=r}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const n=ar.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(n.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const n=this.interstitial.playoutLimit;if(n){const r=n-this.startOffset;if(r>0&&r<e)return r}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const n=this.timelineOffset;if(e!==n){const r=e-n;if(Math.abs(r)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const n=this.timelineOffset,r=this.duration;return Math.min(Math.max(0,e-n),r)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var n;this.loadSource(),(n=this.hls)==null||n.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const n=r=>delete r.details;e.levels.forEach(n),e.allAudioTracks.forEach(n),e.allSubtitleTracks.forEach(n),this.hasDetails=!1}}on(e,n,r){var i;(i=this.hls)==null||i.on(e,n)}once(e,n,r){var i;(i=this.hls)==null||i.once(e,n)}off(e,n,r){var i;(i=this.hls)==null||i.off(e,n)}toString(){var e;return`HlsAssetPlayer: ${BS(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Jee=.033;class ARt extends Fd{constructor(e,n){super("interstitials-sched",n),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={}
vendor: 11,727 bytes, lines 673-674
673,this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,n){return this.events?this.events.reduce((r,i)=>e<=i.startOffset&&n>i.startOffset?(delete i.error,r+1):r,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,n){if(e.event)return this.findEventIndex(e.event.identifier);let r=-1;e.nextEvent?r=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(r=this.findEventIndex(e.previousEvent.identifier)+1);const i=this.items;if(i)for(i[r]||(n===void 0&&(n=e.start),r=this.findItemIndexAtTime(n));r>=0&&(s=i[r])!=null&&s.event;){var s;r--}return r}findItemIndexAtTime(e,n){const r=this.items;if(r)for(let i=0;i<r.length;i++){let s=r[i];if(n&&n!=="primary"&&(s=s[n]),e===s.start||e>s.start&&e<s.end)return i}return-1}findJumpRestrictedIndex(e,n){const r=this.items;if(r)for(let i=e;i<=n&&r[i];i++){const s=r[i].event;if(s!=null&&s.restrictions.jump&&!s.appendInPlace)return i}return-1}findEventIndex(e){const n=this.items;if(n)for(let i=n.length;i--;){var r;if(((r=n[i].event)==null?void 0:r.identifier)===e)return i}return-1}findAssetIndex(e,n){const r=e.assetList,i=r.length;if(i>1)for(let s=0;s<i;s++){const a=r[s];if(!a.error){const o=a.timelineStart;if(n===o||n>o&&(n<o+(a.duration||0)||s===i-1))return s}}return 0}get assetIdAtEnd(){var e;const n=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(n){const r=n.assetList,i=r[r.length-1];if(i)return i.identifier}return null}parseInterstitialDateRanges(e,n){const r=e.main.details,{dateRanges:i}=r,s=this.events,a=this.parseDateRanges(i,{url:r.url},n),o=Object.keys(i),l=s?s.filter(u=>!o.includes(u.identifier)):[];a.length&&a.sort((u,c)=>{const d=u.cue.pre,f=u.cue.post,h=c.cue.pre,g=c.cue.post;if(d&&!h)return-1;if(h&&!d||f&&!g)return 1;if(g&&!f)return-1;if(!d&&!h&&!f&&!g){const v=u.startTime,b=c.startTime;if(v!==b)return v-b}return u.dateRange.tagOrder-c.dateRange.tagOrder}),this.events=a,l.forEach(u=>{this.removeEvent(u)}),this.updateSchedule(e,l)}updateSchedule(e,n=[],r=!1){const i=this.events||[];if(i.length||n.length||this.length<2){const s=this.items,a=this.parseSchedule(i,e);(r||n.length||(s==null?void 0:s.length)!==a.length||a.some((l,u)=>Math.abs(l.playout.start-s[u].playout.start)>.005||Math.abs(l.playout.end-s[u].playout.end)>.005))&&(this.items=a,this.onScheduleUpdate(n,s))}}parseDateRanges(e,n,r){const i=[],s=Object.keys(e);for(let a=0;a<s.length;a++){const o=s[a],l=e[o];if(l.isInterstitial){let u=this.eventMap[o];u?u.setDateRange(l):(u=new SRt(l,n),this.eventMap[o]=u,r===!1&&(u.appendInPlace=r)),i.push(u)}}return i}parseSchedule(e,n){const r=[],i=n.main.details,s=i.live?1/0:i.edge;let a=0;if(e=e.filter(l=>!l.error&&!(l.cue.once&&l.hasPlayed)),e.length){this.resolveOffsets(e,n);let l=0,u=0;if(e.forEach((c,d)=>{const f=c.cue.pre,h=c.cue.post,g=e[d-1]||null,v=c.appendInPlace,b=h?s:c.startOffset,S=c.duration,A=c.timelineOccupancy===zD.Range?S:0,w=c.resumptionOffset,x=(g==null?void 0:g.startTime)===b,P=b+c.cumulativeDuration;let N=v?P+S:b+w;if(f||!h&&b<=0){const U=u;u+=A,c.timelineStart=P;const H=a;a+=S,r.push({event:c,start:P,end:N,playout:{start:H,end:a},integrated:{start:U,end:u}})}else if(b<=s){if(!x){const B=b-l;if(B>Jee){const q=l,Z=u;u+=B;const C=a;a+=B;const L={previousEvent:e[d-1]||null,nextEvent:c,start:q,end:q+B,playout:{start:C,end:a},integrated:{start:Z,end:u}};r.push(L)}else B>0&&g&&(g.cumulativeDuration+=B,r[r.length-1].end=b)}h&&(N=P),c.timelineStart=P;const U=u;u+=A;const H=a;a+=S,r.push({event:c,start:P,end:N,playout:{start:H,end:a},integrated:{start:U,end:u}})}else return;const k=c.resumeTime;h||k>s?l=s:l=k}),l<s){var o;const c=l,d=u,f=s-l;u+=f;const h=a;a+=f,r.push({previousEvent:((o=r[r.length-1])==null?void 0:o.event)||null,nextEvent:null,start:l,end:c+f,playout:{start:h,end:a},integrated:{start:d,end:u}})}this.setDurations(s,a,u)}else r.push({previousEvent:null,nextEvent:null,start:0,end:s,playout:{start:0,end:s},integrated:{start:0,end:s}}),this.setDurations(s,s,s);return r}setDurations(e,n,r){this.durations={primary:e,playout:n,integrated:r}}resolveOffsets(e,n){const r=n.main.details,i=r.live?1/0:r.edge;let s=0,a=-1;e.forEach((o,l)=>{const u=o.cue.pre,c=o.cue.post,d=u?0:c?i:o.startTime;this.updateAssetDurations(o),a===d?o.cumulativeDuration=s:(s=0,a=d),!c&&o.snapOptions.in&&(o.resumeAnchor=ob(null,r.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,n)||(o.appendInPlace=!1)),!o.appendInPlace&&l+1<e.length&&e[l+1].startTime-e[l].resumeTime<Jee&&(e[l+1].appendInPlace=!1,e[l+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const h=sn(o.resumeOffset)?o.resumeOffset:o.duration;s+=h})}primaryCanResumeInPlaceAt(e,n){const r=e.resumeTime,i=e.startTime+e.resumptionOffset;return Math.abs(r-i)>HE?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${i}`),!1):!Object.keys(n).some(a=>{const o=n[a].details,l=o.edge;if(r>=l)return this.log(`"${e.identifier}" resumption ${r} past ${a} playlist end ${l}`),!1;const u=ob(null,o.fragments,r);if(!u)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${a} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const c=a==="audio"?.175:0;return Math.abs(u.start-r)<HE+c||Math.abs(u.end-r)<HE+c?!1:(this.log(`"${e.identifier}" resumption ${r} not aligned with ${a} fragment bounds (${u.start}-${u.end} sn: ${u.sn} cc: ${u.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const n=e.timelineStart;let r=0,i=!1,s=!1;for(let a=0;a<e.assetList.length;a++){const o=e.assetList[a],l=n+r;o.startOffset=r,o.timelineStart=l,i||(i=o.duration===null),s||(s=!!o.error);const u=o.error?0:o.duration||0;r+=u}i&&!s?e.duration=Math.max(r,e.duration):e.duration=r}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function tf(t){return`[${t.event?'"'+t.event.identifier+'"':"primary"}: ${t.start.toFixed(2)}-${t.end.toFixed(2)}]`}class wRt{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,n){const r=e.assetListUrl;let i;try{i=$ye(r,this.hls.sessionId,e.baseUrl)}catch(f){const h=this.assignAssetListError(e,st.ASSET_LIST_LOAD_ERROR,f,r);this.hls.trigger(Y.ERROR,h);return}n&&i.protocol!=="data:"&&i.searchParams.set("_HLS_start_offset",""+n);const s=this.hls.config,a=s.loader,o=new a(s),l={responseType:"json",url:i.href},u=s.interstitialAssetListLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(f,h,g,v)=>{const b=f.data,S=b==null?void 0:b.ASSETS;if(!Array.isArray(S)){const A=this.assignAssetListError(e,st.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),g.url,h,v);this.hls.trigger(Y.ERROR,A);return}e.assetListResponse=b,this.hls.trigger(Y.ASSET_LIST_LOADED,{event:e,assetListResponse:b,networkDetails:v})},onError:(f,h,g,v)=>{const b=this.assignAssetListError(e,st.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${f.code} ${f.text} (${h.url})`),h.url,v,g);this.hls.trigger(Y.ERROR,b)},onTimeout:(f,h,g)=>{const v=this.assignAssetListError(e,st.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${h.url})`),h.url,f,g);this.hls.trigger(Y.ERROR,v)}};return o.load(l,c,d),this.hls.trigger(Y.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,n,r,i,s,a){return e.error=r,{type:xn.NETWORK_ERROR,details:n,fatal:!1,interstitial:e,url:i,error:r,networkDetails:a,stats:s}}}function ete(t){var e;t==null||(e=t.play())==null||e.catch(()=>{})}function ZO(t,e){return`[${t}] Advancing timeline position to ${e}`}class _Rt extends Fd{constructor(e,n){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled||!this.schedule)return;const i=r-this.timelinePos;if(Math.abs(i)<1/7056e5)return;const a=i<=-.01;this.timelinePos=r,this.bufferedPos=r;const o=this.playingItem;if(!o){this.checkBuffer();return}if(a&&this.schedule.resetErrorsInRange(r,r-i)&&this.updateSchedule(!0),this.checkBuffer(),a&&r<o.start||r>=o.end){var l;const h=this.findItemIndex(o);let g=this.schedule.findItemIndexAtTime(r);if(g===-1&&(g=h+(a?-1:1),this.log(`seeked ${a?"back ":""}to position not covered by schedule ${r} (resolving from ${h} to ${g})`)),!this.isInterstitial(o)&&(l=this.media)!=null&&l.paused&&(this.shouldPlay=!1),!a&&g>h){const v=this.schedule.findJumpRestrictedIndex(h+1,g);if(v>h){this.setSchedulePosition(v);return}}this.setSchedulePosition(g);return}const u=this.playingAsset;if(!u){if(this.playingLastItem&&this.isInterstitial(o)){const h=o.event.assetList[0];h&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,h))}return}const c=u.timelineStart,d=u.duration||0;if(a&&r<c||r>=c+d){var f;(f=o.event)!=null&&f.appendInPlace&&(this.clearAssetPlayers(o.event,o),this.flushFrontBuffer(r)),this.setScheduleToAssetAtTime(r,u)}},this.onTimeupdate=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;if(r>this.timelinePos)this.timelinePos=r,r>this.bufferedPos&&this.checkBuffer();else return;const i=this.playingItem;if(!i||this.playingLastItem)return;if(r>=i.end){this.timelinePos=i.end;const o=this.findItemIndex(i);this.setSchedulePosition(o+1)}const s=this.playingAsset;if(!s)return;const a=s.timelineStart+(s.duration||0);r>=a&&this.setScheduleToAssetAtTime(r,s)},this.onScheduleUpdate=(r,i)=>{const s=this.schedule;if(!s)return;const a=this.playingItem,o=s.events||[],l=s.items||[],u=s.durations,c=r.map(v=>v.identifier),d=!!(o.length||c.length);(d||i)&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
674Schedule: ${l.map(v=>tf(v))} pos: ${this.timelinePos}`),c.length&&this.log(`Removed events ${c}`);let f=null,h=null;a&&(f=this.updateItem(a,this.timelinePos),this.itemsMatch(a,f)?this.playingItem=f:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const g=this.bufferingItem;if(g&&(h=this.updateItem(g,this.bufferedPos),this.itemsMatch(g,h)?this.bufferingItem=h:g.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(g.event,null))),r.forEach(v=>{v.assetList.forEach(b=>{this.clearAssetPlayer(b.identifier,null)})}),this.playerQueue.forEach(v=>{if(v.interstitial.appendInPlace){const b=v.assetItem.timelineStart,S=v.timelineOffset-b;if(S)try{v.timelineOffset=b}catch(A){Math.abs(S)>HE&&this.warn(`${A} ("${v.assetId}" ${v.timelineOffset}->${b})`)}}}),d||i){if(this.hls.trigger(Y.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:l.slice(0),durations:u,removedIds:c}),this.isInterstitial(a)&&c.includes(a.event.identifier)){this.warn(`Interstitial "${a.event.identifier}" removed while playing`),this.primaryFallback(a.event);return}a&&this.trimInPlace(f,a),g&&h!==f&&this.trimInPlace(h,g),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=n,this.assetListLoader=new wRt(e),this.schedule=new ARt(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;
vendor: 4,217 bytes, line 674
674e&&(e.on(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Y.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(Y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(Y.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(Y.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(Y.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(Y.BUFFER_APPENDED,this.onBufferAppended,this),e.on(Y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Y.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(Y.MEDIA_ENDED,this.onMediaEnded,this),e.on(Y.ERROR,this.onError,this),e.on(Y.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Y.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(Y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(Y.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(Y.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(Y.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(Y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Y.BUFFER_APPENDED,this.onBufferAppended,this),e.off(Y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Y.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(Y.MEDIA_ENDED,this.onMediaEnded,this),e.off(Y.ERROR,this.onError,this),e.off(Y.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){$u(e,"play",this.onPlay),$u(e,"pause",this.onPause),$u(e,"seeking",this.onSeeking),$u(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,n){const r=this.media=n.media;iu(r,"seeking",this.onSeeking),iu(r,"timeupdate",this.onTimeupdate),iu(r,"play",this.onPlay),iu(r,"pause",this.onPause)}onMediaAttached(e,n){const r=this.effectivePlayingItem,i=this.detachedData;if(this.detachedData=null,r===null)this.checkStart();else if(!i){this.clearScheduleState();const s=this.findItemIndex(r);this.setSchedulePosition(s)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,n){const r=!!n.transferMedia,i=this.media;if(this.media=null,!r&&(i&&this.removeMediaListeners(i),this.detachedData)){const s=this.getBufferingPlayer();s&&(this.log(`Removing schedule state for detachedData and ${s}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,s.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,n=()=>e.bufferingItem||e.waitingItem,r=d=>d&&e.getAssetPlayer(d.identifier),i=(d,f,h,g,v)=>{if(d){let b=d[f].start;const S=d.event;if(S){if(f==="playout"||S.timelineOccupancy!==zD.Point){const A=r(h);(A==null?void 0:A.interstitial)===S&&(b+=A.assetItem.startOffset+A[v])}}else{const A=g==="bufferedPos"?a():e[g];b+=A-d.start}return b}return 0},s=(d,f)=>{var h;
vendor: 35,244 bytes, line 674
674if(d!==0&&f!=="primary"&&(h=e.schedule)!=null&&h.length){var g;const v=e.schedule.findItemIndexAtTime(d),b=(g=e.schedule.items)==null?void 0:g[v];if(b){const S=b[f].start-b.start;return d+S}}return d},a=()=>{const d=e.bufferedPos;return d===Number.MAX_VALUE?o("primary"):Math.max(d,0)},o=d=>{var f,h;return(f=e.primaryDetails)!=null&&f.live?e.primaryDetails.edge:((h=e.schedule)==null?void 0:h.durations[d])||0},l=(d,f)=>{var h,g;const v=e.effectivePlayingItem;if(v!=null&&(h=v.event)!=null&&h.restrictions.skip||!e.schedule)return;e.log(`seek to ${d} "${f}"`);const b=e.effectivePlayingItem,S=e.schedule.findItemIndexAtTime(d,f),A=(g=e.schedule.items)==null?void 0:g[S],w=e.getBufferingPlayer(),x=w==null?void 0:w.interstitial,P=x==null?void 0:x.appendInPlace,N=b&&e.itemsMatch(b,A);if(b&&(P||N)){const k=r(e.playingAsset),U=(k==null?void 0:k.media)||e.primaryMedia;if(U){const H=f==="primary"?U.currentTime:i(b,f,e.playingAsset,"timelinePos","currentTime"),B=d-H,q=(P?H:U.currentTime)+B;if(q>=0&&(!k||P||q<=k.duration)){U.currentTime=q;return}}}if(A){let k=d;if(f!=="primary"){const H=A[f].start,B=d-H;k=A.start+B}const U=!e.isInterstitial(A);if((!e.isInterstitial(b)||b.event.appendInPlace)&&(U||A.event.appendInPlace)){const H=e.media||(P?w==null?void 0:w.media:null);H&&(H.currentTime=k)}else if(b){const H=e.findItemIndex(b);if(S>H){const q=e.schedule.findJumpRestrictedIndex(H+1,S);if(q>H){e.setSchedulePosition(q);return}}let B=0;if(U)e.timelinePos=k,e.checkBuffer();else{const q=A.event.assetList,Z=d-(A[f]||A).start;for(let C=q.length;C--;){const L=q[C];if(L.duration&&Z>=L.startOffset&&Z<L.startOffset+L.duration){B=C;break}}}e.setSchedulePosition(S,B)}}},u=()=>{const d=e.effectivePlayingItem;if(e.isInterstitial(d))return d;const f=n();return e.isInterstitial(f)?f:null},c={get bufferedEnd(){const d=n(),f=e.bufferingItem;if(f&&f===d){var h;return i(f,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-f.playout.start||((h=e.bufferingAsset)==null?void 0:h.startOffset)||0}return 0},get currentTime(){const d=u(),f=e.effectivePlayingItem;return f&&f===d?i(f,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-f.playout.start:0},set currentTime(d){const f=u(),h=e.effectivePlayingItem;h&&h===f&&l(d+h.playout.start,"playout")},get duration(){const d=u();return d?d.playout.end-d.playout.start:0},get assetPlayers(){var d;const f=(d=u())==null?void 0:d.event.assetList;return f?f.map(h=>e.getAssetPlayer(h.identifier)):[]},get playingIndex(){var d;const f=(d=u())==null?void 0:d.event;return f&&e.effectivePlayingAsset?f.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return u()}};return this.manager={get events(){var d;return((d=e.schedule)==null||(d=d.events)==null?void 0:d.slice(0))||[]},get schedule(){var d;return((d=e.schedule)==null||(d=d.items)==null?void 0:d.slice(0))||[]},get interstitialPlayer(){return u()?c:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return n()},get bufferingIndex(){const d=n();return e.findItemIndex(d)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const d=e.effectivePlayingItem;return e.findItemIndex(d)},primary:{get bufferedEnd(){return a()},get currentTime(){const d=e.timelinePos;return d>0?d:0},set currentTime(d){l(d,"primary")},get duration(){return o("primary")},get seekableStart(){var d;return((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0}},integrated:{get bufferedEnd(){return i(n(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return i(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(d){l(d,"integrated")},get duration(){return o("integrated")},get seekableStart(){var d;return s(((d=e.primaryDetails)==null?void 0:d.fragmentStart)||0,"integrated")}},skip:()=>{const d=e.effectivePlayingItem,f=d==null?void 0:d.event;if(f&&!f.restrictions.skip){const h=e.findItemIndex(d);if(f.appendInPlace){const g=d.playout.start+d.event.duration;l(g+.001,"playout")}else e.advanceAfterAssetEnded(f,h,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const n=this.playingItem,r=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!n||!r?!1:this.findItemIndex(n)===r.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,n;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let i=this.media;!i&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(i=this.primaryMedia);const s=(n=i)==null?void 0:n.currentTime;if(!(s===void 0||!sn(s)))return s}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,n){const r=this.getAssetPlayer(e);r&&this.transferMediaFromPlayer(r,n)}transferMediaFromPlayer(e,n){const r=e.interstitial.appendInPlace,i=e.media;if(r&&i===this.primaryMedia){if(this.bufferingAsset=null,(!n||this.isInterstitial(n)&&!n.event.appendInPlace)&&n&&i){this.detachedData={media:i};return}const s=e.transferMedia();this.log(`transfer MediaSource from ${e} ${us(s)}`),this.detachedData=s}else n&&i&&(this.shouldPlay||(this.shouldPlay=!i.paused))}transferMediaTo(e,n){var r,i;if(e.media===n)return;let s=null;const a=this.hls,o=e!==a,l=o&&e.interstitial.appendInPlace,u=(r=this.detachedData)==null?void 0:r.mediaSource;let c;if(a.media)l&&(s=a.transferMedia(),this.detachedData=s),c="Primary";else if(u){const g=this.getBufferingPlayer();g?(s=g.transferMedia(),c=`${g}`):c="detached MediaSource"}else c="detached media";if(!s){if(u)s=this.detachedData,this.log(`using detachedData: MediaSource ${us(s)}`);else if(!this.detachedData||a.media===n){const g=this.playerQueue;g.length>1&&g.forEach(v=>{if(o&&v.interstitial.appendInPlace!==l){const b=v.interstitial;this.clearInterstitial(v.interstitial,null),b.appendInPlace=!1,b.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${b}`)}}),this.hls.detachMedia(),this.detachedData={media:n}}}const d=s&&"mediaSource"in s&&((i=s.mediaSource)==null?void 0:i.readyState)!=="closed",f=d&&s?s:n;this.log(`${d?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${c} (media.currentTime: ${n.currentTime})`);const h=this.schedule;if(f===s&&h){const g=o&&e.assetId===h.assetIdAtEnd;f.overrides={duration:h.duration,endOfStream:!o||g,cueRemoval:!o}}e.attachMedia(f)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,n=e==null?void 0:e.events;if(!n||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const r=this.timelinePos,i=this.effectivePlayingItem;if(r===-1){const s=this.hls.startPosition;if(this.log(ZO("checkStart",s)),this.timelinePos=s,n.length&&n[0].cue.pre){const a=e.findEventIndex(n[0].identifier);this.setSchedulePosition(a)}else if(s>=0||!this.primaryLive){const a=this.timelinePos=s>0?s:0,o=e.findItemIndexAtTime(a);this.setSchedulePosition(o)}}else if(i&&!this.playingItem){const s=e.findItemIndex(i);this.setSchedulePosition(s)}}advanceAssetBuffering(e,n){const r=e.event,i=r.findAssetIndex(n),s=U5(r,i);if(!r.isAssetPastPlayoutLimit(s))this.bufferedToEvent(e,s);else if(this.schedule){var a;const o=(a=this.schedule.items)==null?void 0:a[this.findItemIndex(e)+1];o&&this.bufferedToItem(o)}}advanceAfterAssetEnded(e,n,r){const i=U5(e,r);if(e.isAssetPastPlayoutLimit(i)){if(this.schedule){const s=this.schedule.items;if(s){const a=n+1,o=s.length;if(a>=o){this.setSchedulePosition(-1);return}const l=e.resumeTime;this.timelinePos<l&&(this.log(ZO("advanceAfterAssetEnded",l)),this.timelinePos=l,e.appendInPlace&&this.advanceInPlace(l),this.checkBuffer(this.bufferedPos<l)),this.setSchedulePosition(a)}}}else{if(e.appendInPlace){const s=e.assetList[i];s&&this.advanceInPlace(s.timelineStart)}this.setSchedulePosition(n,i)}}setScheduleToAssetAtTime(e,n){const r=this.schedule;if(!r)return;const i=n.parentIdentifier,s=r.getEvent(i);if(s){const a=r.findEventIndex(i),o=r.findAssetIndex(s,e);this.advanceAfterAssetEnded(s,a,o-1)}}setSchedulePosition(e,n){var r;const i=(r=this.schedule)==null?void 0:r.items;if(!i||this.playbackDisabled)return;const s=e>=0?i[e]:null;this.log(`setSchedulePosition ${e}, ${n} (${s&&tf(s)}) pos: ${this.timelinePos}`);const a=this.waitingItem||this.playingItem,o=this.playingLastItem;if(this.isInterstitial(a)){const c=a.event,d=this.playingAsset,f=d==null?void 0:d.identifier,h=f?this.getAssetPlayer(f):null;if(h&&f&&(!this.eventItemsMatch(a,s)||n!==void 0&&f!==c.assetList[n].identifier)){var l;const g=c.findAssetIndex(d);if(this.log(`INTERSTITIAL_ASSET_ENDED ${g+1}/${c.assetList.length} ${BS(d)}`),this.endedAsset=d,this.playingAsset=null,this.hls.trigger(Y.INTERSTITIAL_ASSET_ENDED,{asset:d,assetListIndex:g,event:c,schedule:i.slice(0),scheduleIndex:e,player:h}),a!==this.playingItem){this.itemsMatch(a,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(c,this.findItemIndex(this.playingItem),g);return}this.retreiveMediaSource(f,s),h.media&&!((l=this.detachedData)!=null&&l.mediaSource)&&h.detachMedia()}if(!this.eventItemsMatch(a,s)&&(this.endedItem=a,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${c} ${tf(a)}`),c.hasPlayed=!0,this.hls.trigger(Y.INTERSTITIAL_ENDED,{event:c,schedule:i.slice(0),scheduleIndex:e}),c.cue.once)){var u;this.updateSchedule();const g=(u=this.schedule)==null?void 0:u.items;if(s&&g){const v=this.findItemIndex(s);this.advanceSchedule(v,g,n,a,o)}return}}this.advanceSchedule(e,i,n,a,o)}advanceSchedule(e,n,r,i,s){const a=this.schedule;if(!a)return;const o=n[e]||null,l=this.primaryMedia,u=this.playerQueue;if(u.length&&u.forEach(c=>{const d=c.interstitial,f=a.findEventIndex(d.identifier);(f<e||f>e+1)&&this.clearInterstitial(d,o)}),this.isInterstitial(o)){this.timelinePos=Math.min(Math.max(this.timelinePos,o.start),o.end);const c=o.event;if(r===void 0){r=a.findAssetIndex(c,this.timelinePos);const g=U5(c,r-1);if(c.isAssetPastPlayoutLimit(g)||c.appendInPlace&&this.timelinePos===o.end){this.advanceAfterAssetEnded(c,e,r);return}r=g}const d=this.waitingItem;this.assetsBuffered(o,l)||this.setBufferingItem(o);let f=this.preloadAssets(c,r);if(this.eventItemsMatch(o,d||i)||(this.waitingItem=o,this.log(`INTERSTITIAL_STARTED ${tf(o)} ${c.appendInPlace?"append in place":""}`),this.hls.trigger(Y.INTERSTITIAL_STARTED,{event:c,schedule:n.slice(0),scheduleIndex:e})),!c.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${c}`);return}if(c.assetListLoader&&(c.assetListLoader.destroy(),c.assetListLoader=void 0),!l){this.log(`Waiting for attachMedia to start Interstitial ${c}`);return}this.waitingItem=this.endedItem=null,this.playingItem=o;const h=c.assetList[r];if(!h){this.advanceAfterAssetEnded(c,e,r||0);return}if(f||(f=this.getAssetPlayer(h.identifier)),f===null||f.destroyed){const g=c.assetList.length;this.warn(`asset ${r+1}/${g} player destroyed ${c}`),f=this.createAssetPlayer(c,h,r),f.loadSource()}if(!this.eventItemsMatch(o,this.bufferingItem)&&c.appendInPlace&&this.isAssetBuffered(h))return;this.startAssetPlayer(f,r,n,e,l),this.shouldPlay&&ete(f.media)}else o?(this.resumePrimary(o,e,i),this.shouldPlay&&ete(this.hls.media)):s&&this.isInterstitial(i)&&(this.endedItem=null,this.playingItem=i,i.event.appendInPlace||this.attachPrimary(a.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,n,r){var i,s;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${tf(e)}`),!((i=this.detachedData)!=null&&i.mediaSource)){let o=this.timelinePos;(o<e.start||o>=e.end)&&(o=this.getPrimaryResumption(e,n),this.log(ZO("resumePrimary",o)),this.timelinePos=o),this.attachPrimary(o,e)}if(!r)return;const a=(s=this.schedule)==null?void 0:s.items;a&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${tf(e)}`),this.hls.trigger(Y.INTERSTITIALS_PRIMARY_RESUMED,{schedule:a.slice(0),scheduleIndex:n}),this.checkBuffer())}getPrimaryResumption(e,n){const r=e.start;if(this.primaryLive){const i=this.primaryDetails;if(n===0)return this.hls.startPosition;if(i&&(r<i.fragmentStart||r>i.edge))return this.hls.liveSyncPosition||-1}return r}isAssetBuffered(e){const n=this.getAssetPlayer(e.identifier);return n!=null&&n.hls?n.hls.bufferedToEnd:ar.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,n,r){n?this.setBufferingItem(n):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const i=this.primaryMedia;if(!i)return;const s=this.hls;s.media?this.checkBuffer():(this.transferMediaTo(s,i),r&&this.startLoadingPrimaryAt(e,r)),r||(this.log(ZO("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,r))}startLoadingPrimaryAt(e,n){var r;const i=this.hls;!i.loadingEnabled||!i.media||Math.abs((((r=i.mainForwardBufferInfo)==null?void 0:r.start)||i.media.currentTime)-e)>.5?i.startLoad(e,n):i.bufferingEnabled||i.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(Y.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(Y.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,n){if(n.level===-1||!this.schedule)return;const r=this.hls.levels[n.level];if(!r.details)return;const i=Ui(Ui({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=i,this.schedule.parseInterstitialDateRanges(i,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,n){const r=this.hls.audioTracks[n.id],i=this.mediaSelection;if(!i){this.altSelection=Ui(Ui({},this.altSelection),{},{audio:r});return}const s=Ui(Ui({},i),{},{audio:r});this.mediaSelection=s}onSubtitleTrackUpdated(e,n){const r=this.hls.subtitleTracks[n.id],i=this.mediaSelection;if(!i){this.altSelection=Ui(Ui({},this.altSelection),{},{subtitles:r});return}const s=Ui(Ui({},i),{},{subtitles:r});this.mediaSelection=s}onAudioTrackSwitching(e,n){const r=uee(n);this.playerQueue.forEach(({hls:i})=>i&&(i.setAudioOption(n)||i.setAudioOption(r)))}onSubtitleTrackSwitch(e,n){const r=uee(n);this.playerQueue.forEach(({hls:i})=>i&&(i.setSubtitleOption(n)||n.id!==-1&&i.setSubtitleOption(r)))}onBufferCodecs(e,n){const r=n.tracks;r&&(this.requiredTracks=r)}onBufferAppended(e,n){this.checkBuffer()}onBufferFlushed(e,n){const r=this.playingItem;if(r&&!this.itemsMatch(r,this.bufferingItem)&&!this.isInterstitial(r)){const i=this.timelinePos;this.bufferedPos=i,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const n=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&n){for(let i=0;i<n.length;i++){const s=n[i];if(s.cue.post){var r;const a=this.schedule.findEventIndex(s.identifier),o=(r=this.schedule.items)==null?void 0:r[a];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const n=this.playingItem;if(!this.playingLastItem&&n){const r=this.findItemIndex(n);this.setSchedulePosition(r+1)}else this.shouldPlay=!1}updateItem(e,n){var r;const i=(r=this.schedule)==null?void 0:r.items;if(e&&i){const s=this.findItemIndex(e,n);return i[s]||null}return null}trimInPlace(e,n){if(this.isInterstitial(e)&&e.event.appendInPlace&&n.end-e.end>.25){e.event.assetList.forEach((s,a)=>{e.event.isAssetPastPlayoutLimit(a)&&this.clearAssetPlayer(s.identifier,null)});const r=e.end+.25,i=ar.bufferInfo(this.primaryMedia,r,0);(i.end>r||(i.nextStart||0)>r)&&(this.log(`trim buffered interstitial ${tf(e)} (was ${tf(n)})`),this.attachPrimary(r,null,!0),this.flushFrontBuffer(r))}}itemsMatch(e,n){return!!n&&(e===n||e.event&&n.event&&this.eventItemsMatch(e,n)||!e.event&&!n.event&&this.findItemIndex(e)===this.findItemIndex(n))}eventItemsMatch(e,n){var r;return!!n&&(e===n||e.event.identifier===((r=n.event)==null?void 0:r.identifier))}findItemIndex(e,n){return e&&this.schedule?this.schedule.findItemIndex(e,n):-1}updateSchedule(e=!1){var n;const r=this.mediaSelection;r&&((n=this.schedule)==null||n.updateSchedule(r,[],e))}checkBuffer(e){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r)return;const i=ar.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=i.len<1),this.updateBufferedPos(i.end,r,e)}updateBufferedPos(e,n,r){const i=this.schedule,s=this.bufferingItem;if(this.bufferedPos>e||!i)return;if(n.length===1&&this.itemsMatch(n[0],s)){this.bufferedPos=e;return}const a=this.playingItem,o=this.findItemIndex(a);let l=i.findItemIndexAtTime(e);if(this.bufferedPos<e){var u;const c=this.findItemIndex(s),d=Math.min(c+1,n.length-1),f=n[d];if((l===-1&&s&&e>=s.end||(u=f.event)!=null&&u.appendInPlace&&e+.01>=f.start)&&(l=d),this.isInterstitial(s)){const h=s.event;if(d-o>1&&h.appendInPlace===!1||h.assetList.length===0&&h.assetListLoader)return}if(this.bufferedPos=e,l>c&&l>o)this.bufferedToItem(f);else{const h=this.primaryDetails;this.primaryLive&&h&&e>h.edge-h.targetduration&&f.start<h.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(f)&&this.preloadAssets(f.event,0)}}else r&&a&&!this.itemsMatch(a,s)&&(l===o?this.bufferedToItem(a):l===o+1&&this.bufferedToItem(n[l]))}assetsBuffered(e,n){return e.event.assetList.length===0?!1:!e.event.assetList.some(i=>{const s=this.getAssetPlayer(i.identifier);return!(s!=null&&s.bufferedInPlaceToEnd(n))})}setBufferingItem(e){const n=this.bufferingItem,r=this.schedule;if(!this.itemsMatch(e,n)&&r){const{items:i,events:s}=r;if(!i||!s)return n;const a=this.isInterstitial(e),o=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const l=o?o.remaining:n?n.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${tf(e)}`+(n?` (${l.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(a){const u=r.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((c,d)=>{const f=this.getAssetPlayer(c.identifier);f&&(d===u&&f.loadSource(),f.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(u=>u.pauseBuffering());this.hls.trigger(Y.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:s.slice(0),schedule:i.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return n}bufferedToItem(e,n=0){const r=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,n);else if(r!==null){this.bufferingAsset=null;const i=this.detachedData;i?i.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const n=this.findItemIndex(e),r=this.getPrimaryResumption(e,n);this.startLoadingPrimaryAt(r)}bufferedToEvent(e,n){const r=e.event,i=r.assetList.length===0&&!r.assetListLoader,s=r.cue.once;if(i||!s){const a=this.preloadAssets(r,n);if(a!=null&&a.interstitial.appendInPlace){const o=this.primaryMedia;o&&this.bufferAssetPlayer(a,o)}}}preloadAssets(e,n){const r=e.assetUrl,i=e.assetList.length,s=i===0&&!e.assetListLoader,a=e.cue.once;if(s){const l=e.timelineStart;if(e.appendInPlace){var o;const f=this.playingItem;!this.isInterstitial(f)&&(f==null||(o=f.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(l+.25)}let u,c=0;if(!this.playingItem&&this.primaryLive&&(c=this.hls.startPosition,c===-1&&(c=this.hls.liveSyncPosition||0)),c&&!(e.cue.pre||e.cue.post)){const f=c-l;f>0&&(u=Math.round(f*1e3)/1e3)}if(this.log(`Load interstitial asset ${n+1}/${r?1:i} ${e}${u?` live-start: ${c} start-offset: ${u}`:""}`),r)return this.createAsset(e,0,0,l,e.duration,r);const d=this.assetListLoader.loadAssetList(e,u);d&&(e.assetListLoader=d)}else if(!a&&i){for(let u=n;u<i;u++){const c=e.assetList[u],d=this.getAssetPlayerQueueIndex(c.identifier);(d===-1||this.playerQueue[d].destroyed)&&!c.error&&this.createAssetPlayer(e,c,u)}const l=e.assetList[n];if(l){const u=this.getAssetPlayer(l.identifier);return u&&u.loadSource(),u}}return null}flushFrontBuffer(e){const n=this.requiredTracks;if(!n)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(n).forEach(i=>{this.hls.trigger(Y.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:i})})}getAssetPlayerQueueIndex(e){const n=this.playerQueue;for(let r=0;r<n.length;r++)if(e===n[r].assetId)return r;return-1}getAssetPlayer(e){const n=this.getAssetPlayerQueueIndex(e);return this.playerQueue[n]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:n}=this;if(n){for(let r=0;r<e.length;r++)if(e[r].media===n)return e[r]}return null}createAsset(e,n,r,i,s,a){const o={parentIdentifier:e.identifier,identifier:bRt(e,a,n),duration:s,startOffset:r,timelineStart:i,uri:a};return this.createAssetPlayer(e,o,n)}createAssetPlayer(e,n,r){const i=this.hls,s=i.userConfig;let a=s.videoPreference;const o=i.loadLevelObj||i.levels[i.currentLevel];(a||o)&&(a=ns({},a),o.videoCodec&&(a.videoCodec=o.videoCodec),o.videoRange&&(a.allowedVideoRanges=[o.videoRange]));const l=i.audioTracks[i.audioTrack],u=i.subtitleTracks[i.subtitleTrack];let c=0;if(this.primaryLive||e.appendInPlace){const x=this.timelinePos-n.timelineStart;if(x>1){const P=n.duration;P&&x<P&&(c=x)}}const d=n.identifier,f=Ui(Ui({},s),{},{maxMaxBufferLength:Math.min(180,i.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:i.sessionId,assetPlayerId:d,abrEwmaDefaultEstimate:i.bandwidthEstimate,interstitialsController:void 0,startPosition:c,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:a,audioPreference:l||s.audioPreference,subtitlePreference:u||s.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,n.timelineStart&&(f.timelineOffset=n.timelineStart));const h=f.cmcd;h!=null&&h.sessionId&&h.contentId&&(f.cmcd=ns({},h,{contentId:l_(n.uri)})),this.getAssetPlayer(d)&&this.warn(`Duplicate date range identifier ${e} and asset ${d}`);const g=new TRt(this.HlsPlayerClass,f,e,n);this.playerQueue.push(g),e.assetList[r]=n;let v=!0;const b=x=>{if(x.live){var P;const U=new Error(`Interstitials MUST be VOD assets ${e}`),H={fatal:!0,type:xn.OTHER_ERROR,details:st.INTERSTITIAL_ASSET_ITEM_ERROR,error:U},B=((P=this.schedule)==null?void 0:P.findEventIndex(e.identifier))||-1;this.handleAssetItemError(H,e,B,r,U.message);return}const N=x.edge-x.fragmentStart,k=n.duration;(v||k===null||N>k)&&(v=!1,this.log(`Interstitial asset "${d}" duration change ${k} > ${N}`),n.duration=N,this.updateSchedule())};g.on(Y.LEVEL_UPDATED,(x,{details:P})=>b(P)),g.on(Y.LEVEL_PTS_UPDATED,(x,{details:P})=>b(P)),g.on(Y.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const S=(x,P)=>{const N=this.getAssetPlayer(d);if(N&&P.tracks){N.off(Y.BUFFER_CODECS,S),N.tracks=P.tracks;const k=this.primaryMedia;this.bufferingAsset===N.assetItem&&k&&!N.media&&this.bufferAssetPlayer(N,k)}};g.on(Y.BUFFER_CODECS,S);const A=()=>{var x;const P=this.getAssetPlayer(d);if(this.log(`buffered to end of asset ${P}`),!P||!this.schedule)return;const N=this.schedule.findEventIndex(e.identifier),k=(x=this.schedule.items)==null?void 0:x[N];this.isInterstitial(k)&&this.advanceAssetBuffering(k,n)};g.on(Y.BUFFERED_TO_END,A);const w=x=>()=>{if(!this.getAssetPlayer(d)||!this.schedule)return;this.shouldPlay=!0;const N=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,N,x)};return g.once(Y.MEDIA_ENDED,w(r)),g.once(Y.PLAYOUT_LIMIT_REACHED,w(1/0)),g.on(Y.ERROR,(x,P)=>{if(!this.schedule)return;const N=this.getAssetPlayer(d);if(P.details===st.BUFFER_STALLED_ERROR){if(N!=null&&N.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(P,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${P.error} ${e}`)}),g.on(Y.DESTROYING,()=>{if(!this.getAssetPlayer(d)||!this.schedule)return;const P=new Error(`Asset player destroyed unexpectedly ${d}`),N={fatal:!0,type:xn.OTHER_ERROR,details:st.INTERSTITIAL_ASSET_ITEM_ERROR,error:P};this.handleAssetItemError(N,e,this.schedule.findEventIndex(e.identifier),r,P.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${BS(n)}`),this.hls.trigger(Y.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:n,assetListIndex:r,event:e,player:g}),g}clearInterstitial(e,n){this.clearAssetPlayers(e,n),e.reset()}clearAssetPlayers(e,n){e.assetList.forEach(r=>{this.clearAssetPlayer(r.identifier,n)})}resetAssetPlayer(e){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){this.log(`reset asset player "${e}" after error`);const r=this.playerQueue[n];this.transferMediaFromPlayer(r,null),r.resetDetails()}}clearAssetPlayer(e,n){const r=this.getAssetPlayerQueueIndex(e);if(r!==-1){const i=this.playerQueue[r];this.log(`clear ${i} toSegment: ${n&&tf(n)}`),this.transferMediaFromPlayer(i,n),this.playerQueue.splice(r,1),i.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,n,r,i,s){const{interstitial:a,assetItem:o,assetId:l}=e,u=a.assetList.length,c=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!c||c.identifier!==l)&&(c&&(this.clearAssetPlayer(c.identifier,r[i]),delete c.error),this.log(`INTERSTITIAL_ASSET_STARTED ${n+1}/${u} ${BS(o)}`),this.hls.trigger(Y.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:n,event:a,schedule:r.slice(0),scheduleIndex:i,player:e})),this.bufferAssetPlayer(e,s)}bufferAssetPlayer(e,n){var r,i;if(!this.schedule)return;const{interstitial:s,assetItem:a}=e,o=this.schedule.findEventIndex(s.identifier),l=(r=this.schedule.items)==null?void 0:r[o];if(!l)return;e.loadSource(),this.setBufferingItem(l),this.bufferingAsset=a;const u=this.getBufferingPlayer();if(u===e)return;const c=s.appendInPlace;if(c&&(u==null?void 0:u.interstitial.appendInPlace)===!1)return;const d=(u==null?void 0:u.tracks)||((i=this.detachedData)==null?void 0:i.tracks)||this.requiredTracks;if(c&&a!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(d&&!Sve(d,e.tracks)){const f=new Error(`Asset ${BS(a)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(d)}')`),h={fatal:!0,type:xn.OTHER_ERROR,details:st.INTERSTITIAL_ASSET_ITEM_ERROR,error:f},g=s.findAssetIndex(a);this.handleAssetItemError(h,s,o,g,f.message);return}}this.transferMediaTo(e,n)}handleInPlaceStall(e){const n=this.schedule,r=this.primaryMedia;if(!n||!r)return;const i=r.currentTime,s=n.findAssetIndex(e,i),a=e.assetList[s];if(a){const o=this.getAssetPlayer(a.identifier);if(o){const l=o.currentTime||i-a.timelineStart,u=o.duration-l;if(this.warn(`Stalled at ${l} of ${l+u} in ${o} ${e} (media.currentTime: ${i})`),l&&(u/r.playbackRate<.5||o.bufferedInPlaceToEnd(r))&&o.hls){const c=n.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,c,s)}}}}advanceInPlace(e){const n=this.primaryMedia;n&&n.currentTime<e&&(n.currentTime=e)}handleAssetItemError(e,n,r,i,s){if(e.details===st.BUFFER_STALLED_ERROR)return;const a=n.assetList[i]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${a&&BS(a)} ${e.error}`),!this.schedule)return;const o=(a==null?void 0:a.identifier)||"",l=this.getAssetPlayerQueueIndex(o),u=this.playerQueue[l]||null,c=this.schedule.items,d=ns({},e,{fatal:!1,errorAction:BE(!0),asset:a,assetListIndex:i,event:n,schedule:c,scheduleIndex:r,player:u});if(this.hls.trigger(Y.INTERSTITIAL_ASSET_ERROR,d),!e.fatal)return;const f=this.playingAsset,h=this.bufferingAsset,g=new Error(s);if(a&&(this.clearAssetPlayer(o,null),a.error=g),!n.assetList.some(v=>!v.error))n.error=g;else for(let v=i;v<n.assetList.length;v++)this.resetAssetPlayer(n.assetList[v].identifier);this.updateSchedule(!0),n.error?this.primaryFallback(n):f&&f.identifier===o?this.advanceAfterAssetEnded(n,r,i):h&&h.identifier===o&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,h)}primaryFallback(e){const n=e.timelineStart,r=this.effectivePlayingItem;let i=this.timelinePos;if(r){this.log(`Fallback to primary from event "${e.identifier}" start: ${n} pos: ${i} playing: ${tf(r)} error: ${e.error}`),i===-1&&(i=this.hls.startPosition);const a=this.updateItem(r,i);this.itemsMatch(r,a)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(n,null),this.flushFrontBuffer(n))}else if(i===-1){this.checkStart();return}if(!this.schedule)return;const s=this.schedule.findItemIndexAtTime(i);this.setSchedulePosition(s)}onAssetListLoaded(e,n){var r,i;const s=n.event,a=s.identifier,o=n.assetListResponse.ASSETS;if(!((r=this.schedule)!=null&&r.hasEvent(a)))return;const l=s.timelineStart,u=s.duration;let c=0;o.forEach((v,b)=>{const S=parseFloat(v.DURATION);this.createAsset(s,b,c,l+c,S,v.URI),c+=S}),s.duration=c,this.log(`Loaded asset-list with duration: ${c} (was: ${u}) ${s}`);const d=this.waitingItem,f=(d==null?void 0:d.event.identifier)===a;this.updateSchedule();const h=(i=this.bufferingItem)==null?void 0:i.event;if(f){var g;const v=this.schedule.findEventIndex(a),b=(g=this.schedule.items)==null?void 0:g[v];if(b){if(!this.playingItem&&this.timelinePos>b.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==v){s.error=new Error(`Interstitial ${o.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${s}`),this.log(s.error.message),this.updateSchedule(!0),this.primaryFallback(s);return}this.setBufferingItem(b)}this.setSchedulePosition(v)}else if((h==null?void 0:h.identifier)===a){const v=s.assetList[0];if(v){const b=this.getAssetPlayer(v.identifier);if(h.appendInPlace){const S=this.primaryMedia;b&&S&&this.bufferAssetPlayer(b,S)}else b&&b.loadSource()}}}onError(e,n){if(this.schedule)switch(n.details){case st.ASSET_LIST_PARSING_ERROR:case st.ASSET_LIST_LOAD_ERROR:case st.ASSET_LIST_LOAD_TIMEOUT:{const r=n.interstitial;r&&(this.updateSchedule(!0),this.primaryFallback(r));break}case st.BUFFER_STALLED_ERROR:{const r=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&r.event.appendInPlace){this.handleInPlaceStall(r.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const tte=500;class CRt extends jH{constructor(e,n,r){super(e,n,r,"subtitle-stream-controller",yn.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(Y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Y.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(Y.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(Y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Y.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(Y.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,n){this.stopLoad(),this.state=wt.IDLE,this.setInterval(tte),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=n?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,n){this.tracksBuffered=[],super.onMediaDetaching(e,n)}onLevelLoaded(e,n){this.mainDetails=n.details}onSubtitleFragProcessed(e,n){const{frag:r,success:i}=n;if(this.fragContextChanged(r)||(Da(r)&&(this.fragPrevious=r),this.state=wt.IDLE),!i)return;const s=this.tracksBuffered[this.currentTrackId];if(!s)return;let a;const o=r.start;for(let u=0;u<s.length;u++)if(o>=s[u].start&&o<=s[u].end){a=s[u];break}const l=r.start+r.duration;a?a.end=l:(a={start:o,end:l},s.push(a)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null),this.media&&this.tick()}onBufferFlushing(e,n){const{startOffset:r,endOffset:i}=n;if(r===0&&i!==Number.POSITIVE_INFINITY){const s=i-1;if(s<=0)return;n.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach(a=>{for(let o=0;o<a.length;){if(a[o].end<=s){a.shift();continue}else if(a[o].start<s)a[o].start=s;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(r,s,yn.SUBTITLE)}}onError(e,n){const r=n.frag;(r==null?void 0:r.type)===yn.SUBTITLE&&(n.details===st.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==wt.STOPPED&&(this.state=wt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:n}){if(this.levels&&Aye(this.levels,n)){this.levels=n.map(r=>new EC(r));return}this.tracksBuffered=[],this.levels=n.map(r=>{const i=new EC(r);return this.tracksBuffered[i.id]=[],i}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,yn.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,n){var r;if(this.currentTrackId=n.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const i=this.levels[this.currentTrackId];i!=null&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.state!==wt.STOPPED&&this.setInterval(tte)}onSubtitleTrackLoaded(e,n){var r;const{currentTrackId:i,levels:s}=this,{details:a,id:o}=n;if(!s){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const l=s[o];if(o>=s.length||!l)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let u=0;if(a.live||(r=l.details)!=null&&r.live){if(a.deltaUpdateFailed)return;const d=this.mainDetails;if(!d){this.startFragRequested=!1;return}const f=d.fragments[0];if(!l.details)a.hasProgramDateTime&&d.hasProgramDateTime?(HD(a,d),u=a.fragmentStart):f&&(u=f.start,d6(a,u));else{var c;u=this.alignPlaylists(a,l.details,(c=this.levelLastLoaded)==null?void 0:c.details),u===0&&f&&(u=f.start,d6(a,u))}d&&!this.startFragRequested&&this.setStartPosition(d,u)}l.details=a,this.levelLastLoaded=l,o===i&&(this.hls.trigger(Y.SUBTITLE_TRACK_UPDATED,{details:a,id:o,groupId:n.groupId}),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===wt.IDLE&&(ob(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),l.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:n,payload:r}=e,i=n.decryptdata,s=this.hls;if(!this.fragContextChanged(n)&&r&&r.byteLength>0&&i!=null&&i.key&&i.iv&&UE(i.method)){const a=performance.now();
vendor: 29,092 bytes, lines 674-685
674this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer,VH(i.method)).catch(o=>{throw s.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:n}),o}).then(o=>{const l=performance.now();s.trigger(Y.FRAG_DECRYPTED,{frag:n,payload:o,stats:{tstart:a,tdecrypt:l}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=wt.IDLE})}}doTick(){if(!this.media){this.state=wt.IDLE;return}if(this.state===wt.IDLE){const{currentTrackId:e,levels:n}=this,r=n==null?void 0:n[e];if(!r||!n.length||!r.details||this.waitForLive(r))return;const{config:i}=this,s=this.getLoadPosition(),a=ar.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],s,i.maxBufferHole),{end:o,len:l}=a,u=r.details,c=this.hls.maxBufferLength+u.levelTargetDuration;if(l>c)return;const d=u.fragments,f=d.length,h=u.edge;let g=null;const v=this.fragPrevious;if(o<h){const A=i.maxFragLookUpTolerance,w=o>h-A?0:A;g=ob(v,d,Math.max(d[0].start,o),w),!g&&v&&v.start<d[0].start&&(g=d[0])}else g=d[f-1];if(g=this.filterReplacedPrimary(g,r.details),!g)return;const b=g.sn-u.startSN,S=d[b-1];if(S&&S.cc===g.cc&&this.fragmentTracker.getState(S)===po.NOT_LOADED&&(g=S),this.fragmentTracker.getState(g)===po.NOT_LOADED){const A=this.mapToInitFragWhenRequired(g);A&&this.loadFragment(A,r,o)}}}loadFragment(e,n,r){Da(e)?super.loadFragment(e,n,r):this._loadInitSegment(e,n)}get mediaBufferTimeRanges(){return new xRt(this.tracksBuffered[this.currentTrackId]||[])}}class xRt{constructor(e){this.buffered=void 0;const n=(r,i,s)=>{if(i=i>>>0,i>s-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][r]};this.buffered={get length(){return e.length},end(r){return n("end",r,e.length)},start(r){return n("start",r,e.length)}}}}const IRt={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},Bye=t=>String.fromCharCode(IRt[t]||t),ff=15,Up=100,ORt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},PRt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},RRt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},LRt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},DRt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class kRt{constructor(){this.time=null,this.verboseLevel=0}log(e,n){if(this.verboseLevel>=e){const r=typeof n=="function"?n():n;ji.log(`${this.time} [${e}] ${r}`)}}}const Ny=function(e){const n=[];for(let r=0;r<e.length;r++)n.push(e[r].toString(16));return n};class Uye{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const n=["foreground","underline","italics","background","flash"];for(let r=0;r<n.length;r++){const i=n[r];e.hasOwnProperty(i)&&(this[i]=e[i])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class NRt{constructor(){this.uchar=" ",this.penState=new Uye}reset(){this.uchar=" ",this.penState.reset()}setChar(e,n){this.uchar=e,this.penState.copy(n)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class MRt{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Uye,this.cueStartTime=null,this.logger=void 0;for(let n=0;n<Up;n++)this.chars.push(new NRt);this.logger=e}equals(e){for(let n=0;n<Up;n++)if(!this.chars[n].equals(e.chars[n]))return!1;return!0}copy(e){for(let n=0;n<Up;n++)this.chars[n].copy(e.chars[n])}isEmpty(){let e=!0;for(let n=0;n<Up;n++)if(!this.chars[n].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Up&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Up)}moveCursor(e){const n=this.pos+e;if(e>1)for(let r=this.pos+1;r<n+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(n)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const n=Bye(e);if(this.pos>=Up){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+n+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1)}clearFromPos(e){let n;for(n=e;n<Up;n++)this.chars[n].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let n=!0;for(let r=0;r<Up;r++){const i=this.chars[r].uchar;i!==" "&&(n=!1),e.push(i)}return n?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class V5{constructor(e){this.rows=[],this.currRow=ff-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let n=0;n<ff;n++)this.rows.push(new MRt(e));this.logger=e}reset(){for(let e=0;e<ff;e++)this.rows[e].clear();this.currRow=ff-1}equals(e){let n=!0;for(let r=0;r<ff;r++)if(!this.rows[r].equals(e.rows[r])){n=!1;break}return n}copy(e){for(let n=0;n<ff;n++)this.rows[n].copy(e.rows[n])}isEmpty(){let e=!0;for(let n=0;n<ff;n++)if(!this.rows[n].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+us(e));let n=e.row-1;if(this.nrRollUpRows&&n<this.nrRollUpRows-1&&(n=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==n){for(let o=0;o<ff;o++)this.rows[o].clear();const s=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){const o=a.rows[s].cueStartTime,l=this.logger.time;if(o!==null&&l!==null&&o<l)for(let u=0;u<this.nrRollUpRows;u++)this.rows[n-this.nrRollUpRows+u+1].copy(a.rows[s+u])}}this.currRow=n;const r=this.rows[this.currRow];if(e.indent!==null){const s=e.indent,a=Math.max(s-1,0);r.setCursor(e.indent),e.color=r.chars[a].penState.foreground}const i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+us(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(e,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const n=[];let r="",i=-1;for(let s=0;s<ff;s++){const a=this.rows[s].getTextString();a&&(i=s+1,e?n.push("Row "+i+": '"+a+"'"):n.push(a.trim()))}return n.length>0&&(e?r="["+n.join(" | ")+"]":r=n.join(`
675`)),r}getTextAndFormat(){return this.rows}}class nte{constructor(e,n,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new V5(r),this.nonDisplayedMemory=new V5(r),this.lastOutputScreen=new V5(r),this.currRollUpRow=this.displayedMemory.rows[ff-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[ff-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),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=e)}insertChars(e){for(let r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);const n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>n+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const n={flash:!1};if(n.underline=e%2===1,n.italics=e>=46,n.italics)n.foreground="white";else{const r=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];n.foreground=i[r]}this.logger.log(2,"MIDROW: "+us(n)),this.writeScreen.setPen(n)}outputDataUpdate(e=!1){const n=this.logger.time;n!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=n:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,n,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:n),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class rte{constructor(e,n,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=$Rt(),this.logger=void 0;const i=this.logger=new kRt;this.channels=[null,new nte(e,n,i),new nte(e+1,r,i)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,n){this.channels[e].setHandler(n)}addData(e,n){this.logger.time=e;for(let r=0;r<n.length;r+=2){const i=n[r]&127,s=n[r+1]&127;let a=!1,o=null;if(i===0&&s===0)continue;this.logger.log(3,()=>"["+Ny([n[r],n[r+1]])+"] -> ("+Ny([i,s])+")");const l=this.cmdHistory;if(i>=16&&i<=31){if(FRt(i,s,l)){QO(null,null,l),this.logger.log(3,()=>"Repeated command ("+Ny([i,s])+") is dropped");continue}QO(i,s,this.cmdHistory),a=this.parseCmd(i,s),a||(a=this.parseMidrow(i,s)),a||(a=this.parsePAC(i,s)),a||(a=this.parseBackgroundAttributes(i,s))}else QO(null,null,l);if(!a&&(o=this.parseChars(i,s),o)){const c=this.currentChannel;c&&c>0?this.channels[c].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!a&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Ny([i,s])+" orig: "+Ny([n[r],n[r+1]]))}}parseCmd(e,n){const r=(e===20||e===28||e===21||e===29)&&n>=32&&n<=47,i=(e===23||e===31)&&n>=33&&n<=35;if(!(r||i))return!1;const s=e===20||e===21||e===23?1:2,a=this.channels[s];return e===20||e===21||e===28||e===29?n===32?a.ccRCL():n===33?a.ccBS():n===34?a.ccAOF():n===35?a.ccAON():n===36?a.ccDER():n===37?a.ccRU(2):n===38?a.ccRU(3):n===39?a.ccRU(4):n===40?a.ccFON():n===41?a.ccRDC():n===42?a.ccTR():n===43?a.ccRTD():n===44?a.ccEDM():n===45?a.ccCR():n===46?a.ccENM():n===47&&a.ccEOC():a.ccTO(n-32),this.currentChannel=s,!0}parseMidrow(e,n){let r=0;if((e===17||e===25)&&n>=32&&n<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[r];return i?(i.ccMIDROW(n),this.logger.log(3,()=>"MIDROW ("+Ny([e,n])+")"),!0):!1}return!1}parsePAC(e,n){let r;const i=(e>=17&&e<=23||e>=25&&e<=31)&&n>=64&&n<=127,s=(e===16||e===24)&&n>=64&&n<=95;if(!(i||s))return!1;const a=e<=23?1:2;n>=64&&n<=95?r=a===1?ORt[e]:RRt[e]:r=a===1?PRt[e]:LRt[e];const o=this.channels[a];return o?(o.setPAC(this.interpretPAC(r,n)),this.currentChannel=a,!0):!1}interpretPAC(e,n){let r;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return n>95?r=n-96:r=n-64,i.underline=(r&1)===1,r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=Math.floor((r-16)/2)*4,i}parseChars(e,n){let r,i=null,s=null;if(e>=25?(r=2,s=e-8):(r=1,s=e),s>=17&&s<=19){let a;s===17?a=n+80:s===18?a=n+112:a=n+144,this.logger.log(2,()=>"Special char '"+Bye(a)+"' in channel "+r),i=[a]}else e>=32&&e<=127&&(i=n===0?[e]:[e,n]);return i&&this.logger.log(3,()=>"Char codes =  "+Ny(i).join(",")),i}parseBackgroundAttributes(e,n){const r=(e===16||e===24)&&n>=32&&n<=47,i=(e===23||e===31)&&n>=45&&n<=47;if(!(r||i))return!1;let s;const a={};e===16||e===24?(s=Math.floor((n-32)/2),a.background=DRt[s],n%2===1&&(a.background=a.background+"_semi")):n===45?a.background="transparent":(a.foreground="black",n===47&&(a.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(a),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const n=this.channels[e];n&&n.reset()}QO(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let n=0;n<this.channels.length;n++){const r=this.channels[n];r&&r.cueSplitAtTime(e)}}}function QO(t,e,n){n.a=t,n.b=e}function FRt(t,e,n){return n.a===t&&n.b===e}function $Rt(){return{a:null,b:null}}var tj=function(){if(VD!=null&&VD.VTTCue)return self.VTTCue;const t=["","lr","rl"],e=["start","middle","end","left","right"];function n(o,l){if(typeof l!="string"||!Array.isArray(o))return!1;const u=l.toLowerCase();return~o.indexOf(u)?u:!1}function r(o){return n(t,o)}function i(o){return n(e,o)}function s(o,...l){let u=1;for(;u<arguments.length;u++){const c=arguments[u];for(const d in c)o[d]=c[d]}return o}function a(o,l,u){const c=this,d={enumerable:!0};c.hasBeenReset=!1;let f="",h=!1,g=o,v=l,b=u,S=null,A="",w=!0,x="auto",P="start",N=50,k="middle",U=50,H="middle";Object.defineProperty(c,"id",s({},d,{get:function(){return f},set:function(B){f=""+B}})),Object.defineProperty(c,"pauseOnExit",s({},d,{get:function(){return h},set:function(B){h=!!B}})),Object.defineProperty(c,"startTime",s({},d,{get:function(){return g},set:function(B){if(typeof B!="number")throw new TypeError("Start time must be set to a number.");g=B,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",s({},d,{get:function(){return v},set:function(B){if(typeof B!="number")throw new TypeError("End time must be set to a number.");v=B,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",s({},d,{get:function(){return b},set:function(B){b=""+B,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",s({},d,{get:function(){return S},set:function(B){S=B,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",s({},d,{get:function(){return A},set:function(B){const q=r(B);if(q===!1)throw new SyntaxError("An invalid or illegal string was specified.");A=q,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",s({},d,{get:function(){return w},set:function(B){w=!!B,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",s({},d,{get:function(){return x},set:function(B){if(typeof B!="number"&&B!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=B,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",s({},d,{get:function(){return P},set:function(B){const q=i(B);if(!q)throw new SyntaxError("An invalid or illegal string was specified.");P=q,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",s({},d,{get:function(){return N},set:function(B){if(B<0||B>100)throw new Error("Position must be between 0 and 100.");N=B,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",s({},d,{get:function(){return k},set:function(B){const q=i(B);if(!q)throw new SyntaxError("An invalid or illegal string was specified.");k=q,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",s({},d,{get:function(){return U},set:function(B){if(B<0||B>100)throw new Error("Size must be between 0 and 100.");U=B,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",s({},d,{get:function(){return H},set:function(B){const q=i(B);if(!q)throw new SyntaxError("An invalid or illegal string was specified.");H=q,this.hasBeenReset=!0}})),c.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class BRt{decode(e,n){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Vye(t){function e(r,i,s,a){return(r|0)*3600+(i|0)*60+(s|0)+parseFloat(a||0)}const n=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?e(n[2],n[3],0,n[4]):e(n[1],n[2],n[3],n[4]):null}class URt{constructor(){this.values=Object.create(null)}set(e,n){!this.get(e)&&n!==""&&(this.values[e]=n)}get(e,n,r){return r?this.has(e)?this.values[e]:n[r]:this.has(e)?this.values[e]:n}has(e){return e in this.values}alt(e,n,r){for(let i=0;i<r.length;++i)if(n===r[i]){this.set(e,n);break}}integer(e,n){/^-?\d+$/.test(n)&&this.set(e,parseInt(n,10))}percent(e,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){const r=parseFloat(n);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function Hye(t,e,n,r){const i=r?t.split(r):[t];for(const s in i){if(typeof i[s]!="string")continue;const a=i[s].split(n);if(a.length!==2)continue;const o=a[0],l=a[1];e(o,l)}}const b6=new tj(0,0,""),XO=b6.align==="middle"?"middle":"center";function VRt(t,e,n){const r=t;function i(){const o=Vye(t);if(o===null)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),o}function s(o,l){const u=new URt;Hye(o,function(f,h){let g;switch(f){case"region":for(let v=n.length-1;v>=0;v--)if(n[v].id===h){u.set(f,n[v].region);break}break;case"vertical":u.alt(f,h,["rl","lr"]);break;case"line":g=h.split(","),u.integer(f,g[0]),u.percent(f,g[0])&&u.set("snapToLines",!1),u.alt(f,g[0],["auto"]),g.length===2&&u.alt("lineAlign",g[1],["start",XO,"end"]);break;case"position":g=h.split(","),u.percent(f,g[0]),g.length===2&&u.alt("positionAlign",g[1],["start",XO,"end","line-left","line-right","auto"]);break;case"size":u.percent(f,h);break;case"align":u.alt(f,h,["start",XO,"end","left","right"]);break}},/:/,/\s/),l.region=u.get("region",null),l.vertical=u.get("vertical","");let c=u.get("line","auto");c==="auto"&&b6.line===-1&&(c=-1),l.line=c,l.lineAlign=u.get("lineAlign","start"),l.snapToLines=u.get("snapToLines",!0),l.size=u.get("size",100),l.align=u.get("align",XO);let d=u.get("position","auto");d==="auto"&&b6.position===50&&(d=l.align==="start"||l.align==="left"?0:l.align==="end"||l.align==="right"?100:50),l.position=d}function a(){t=t.replace(/^\s+/,"")}if(a(),e.startTime=i(),a(),t.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);t=t.slice(3),a(),e.endTime=i(),a(),s(t,e)}function jye(t){return t.replace(/<br(?: \/)?>/gi,`
676`)}class HRt{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new BRt,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const n=this;e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));function r(){let s=n.buffer,a=0;for(s=jye(s);a<s.length&&s[a]!=="\r"&&s[a]!==`
677`;)++a;const o=s.slice(0,a);return s[a]==="\r"&&++a,s[a]===`
678`&&++a,n.buffer=s.slice(a),o}function i(s){Hye(s,function(a,o){},/:/)}try{let s="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;s=r();const o=s.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");n.state="HEADER"}let a=!1;for(;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(a?a=!1:s=r(),n.state){case"HEADER":/:/.test(s)?i(s):s||(n.state="ID");continue;case"NOTE":s||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){n.state="NOTE";break}if(!s)continue;if(n.cue=new tj(0,0,""),n.state="CUE",s.indexOf("-->")===-1){n.cue.id=s;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{VRt(s,n.cue,n.regionList)}catch{n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{const o=s.indexOf("-->")!==-1;if(!s||o&&(a=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
679`),n.cue.text+=s}continue;case"BADCUE":s||(n.state="ID")}}}catch{n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
680
681`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){e.onparsingerror&&e.onparsingerror(n)}return e.onflush&&e.onflush(),this}}const jRt=/\r\n|\n\r|\n|\r/g,H5=function(e,n,r=0){return e.slice(r,r+n.length)===n},zRt=function(e){let n=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!sn(n)||!sn(r)||!sn(i)||!sn(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return n+=1e3*r,n+=60*1e3*i,n+=60*60*1e3*s,n};function nj(t,e,n){return l_(t.toString())+l_(e.toString())+l_(n)}const GRt=function(e,n,r){let i=e[n],s=e[i.prevCC];if(!s||!s.new&&i.new){e.ccOffset=e.presentationOffset=i.start,i.new=!1;return}for(;(a=s)!=null&&a.new;){var a;e.ccOffset+=i.start-s.start,i.new=!1,i=s,s=e[i.prevCC]}e.presentationOffset=r};function WRt(t,e,n,r,i,s,a){const o=new HRt,l=Dc(new Uint8Array(t)).trim().replace(jRt,`
682`).split(`
683`),u=[],c=e?XOt(e.baseTime,e.timescale):0;let d="00:00.000",f=0,h=0,g,v=!0;o.oncue=function(b){const S=n[r];let A=n.ccOffset;const w=(f-c)/9e4;if(S!=null&&S.new&&(h!==void 0?A=n.ccOffset=S.start:GRt(n,r,w)),w){if(!e){g=new Error("Missing initPTS for VTT MPEGTS");return}A=w-n.presentationOffset}const x=b.endTime-b.startTime,P=hc((b.startTime+A-h)*9e4,i*9e4)/9e4;b.startTime=Math.max(P,0),b.endTime=Math.max(P+x,0);const N=b.text.trim();b.text=decodeURIComponent(encodeURIComponent(N)),b.id||(b.id=nj(b.startTime,b.endTime,N)),b.endTime>0&&u.push(b)},o.onparsingerror=function(b){g=b},o.onflush=function(){if(g){a(g);return}s(u)},l.forEach(b=>{if(v)if(H5(b,"X-TIMESTAMP-MAP=")){v=!1,b.slice(16).split(",").forEach(S=>{H5(S,"LOCAL:")?d=S.slice(6):H5(S,"MPEGTS:")&&(f=parseInt(S.slice(7)))});try{h=zRt(d)/1e3}catch(S){g=S}return}else b===""&&(v=!1);o.parse(b+`
684`)}),o.flush()}const j5="stpp.ttml.im1t",zye=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Gye=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,qRt={left:"start",center:"center",right:"end",start:"start",end:"end"};function ite(t,e,n,r){const i=Lr(new Uint8Array(t),["mdat"]);if(i.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const s=i.map(o=>Dc(o)),a=QOt(e.baseTime,1,e.timescale);try{s.forEach(o=>n(KRt(o,a)))}catch(o){r(o)}}function KRt(t,e){const i=new DOMParser().parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const s={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(s).reduce((d,f)=>(d[f]=i.getAttribute(`ttp:${f}`)||s[f],d),{}),o=i.getAttribute("xml:space")!=="preserve",l=ste(z5(i,"styling","style")),u=ste(z5(i,"layout","region")),c=z5(i,"body","[begin]");return[].map.call(c,d=>{const f=Wye(d,o);if(!f||!d.hasAttribute("begin"))return null;const h=W5(d.getAttribute("begin"),a),g=W5(d.getAttribute("dur"),a);let v=W5(d.getAttribute("end"),a);if(h===null)throw ate(d);if(v===null){if(g===null)throw ate(d);v=h+g}const b=new tj(h-e,v-e,f);b.id=nj(b.startTime,b.endTime,b.text);const S=u[d.getAttribute("region")],A=l[d.getAttribute("style")],w=YRt(S,A,l),{textAlign:x}=w;if(x){const P=qRt[x];P&&(b.lineAlign=P),b.align=x}return ns(b,w),b}).filter(d=>d!==null)}function z5(t,e,n){const r=t.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function ste(t){return t.reduce((e,n)=>{const r=n.getAttribute("xml:id");return r&&(e[r]=n),e},{})}function Wye(t,e){return[].slice.call(t.childNodes).reduce((n,r,i)=>{var s;return r.nodeName==="br"&&i?n+`
685`:(s=r.childNodes)!=null&&s.length?Wye(r,e):e?n+r.textContent.trim().replace(/\s+/g," "):n+r.textContent},"")}function YRt(t,e,n){const r="http://www.w3.org/ns/ttml#styling";let i=null;const s=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=t!=null&&t.hasAttribute("style")?t.getAttribute("style"):null;return a&&n.hasOwnProperty(a)&&(i=n[a]),s.reduce((o,l)=>{const u=G5(e,r,l)||G5(t,r,l)||G5(i,r,l);return u&&(o[l]=u),o},{})}function G5(t,e,n){return t&&t.hasAttributeNS(e,n)?t.getAttributeNS(e,n):null}function ate(t){return new Error(`Could not parse ttml timestamp ${t}`)}function W5(t,e){if(!t)return null;let n=Vye(t);return n===null&&(zye.test(t)?n=ZRt(t,e):Gye.test(t)&&(n=QRt(t,e))),n}function ZRt(t,e){const n=zye.exec(t),r=(n[4]|0)+(n[5]|0)/e.subFrameRate;return(n[1]|0)*3600+(n[2]|0)*60+(n[3]|0)+r/e.frameRate}function QRt(t,e){const n=Gye.exec(t),r=Number(n[1]);switch(n[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class JO{constructor(e,n){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=n}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,n,r){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=n,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class XRt{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=lte(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}}
vendor: 3,597 bytes, line 685
685,e.on(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Y.FRAG_LOADING,this.onFragLoading,this),e.on(Y.FRAG_LOADED,this.onFragLoaded,this),e.on(Y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(Y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(Y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(Y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(Y.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Y.FRAG_LOADING,this.onFragLoading,this),e.off(Y.FRAG_LOADED,this.onFragLoaded,this),e.off(Y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(Y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(Y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(Y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new JO(this,"textTrack1"),n=new JO(this,"textTrack2"),r=new JO(this,"textTrack3"),i=new JO(this,"textTrack4");this.cea608Parser1=new rte(1,e,n),this.cea608Parser2=new rte(3,r,i)}addCues(e,n,r,i,s){let a=!1;for(let o=s.length;o--;){const l=s[o],u=JRt(l[0],l[1],n,r);if(u>=0&&(l[0]=Math.min(l[0],n),l[1]=Math.max(l[1],r),a=!0,u/(r-n)>.5))return}if(a||s.push([n,r]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,n,r,i)}else{const o=this.Cues.newCue(null,n,r,i);this.hls.trigger(Y.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:n,id:r,initPTS:i,timescale:s,trackId:a}){const{unparsedVttFrags:o}=this;r===yn.MAIN&&(this.initPTS[n.cc]={baseTime:i,timescale:s,trackId:a}),o.length&&(this.unparsedVttFrags=[],o.forEach(l=>{this.initPTS[l.frag.cc]?this.onFragLoaded(Y.FRAG_LOADED,l):this.hls.trigger(Y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:l.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,n){const{media:r}=this;if(r)for(let i=0;i<r.textTracks.length;i++){const s=r.textTracks[i];if(ote(s,{name:e,lang:n,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return s}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:n,captionsTracks:r,media:i}=this,{label:s,languageCode:a}=n[e],o=this.getExistingTrack(s,a);if(o)r[e]=o,vE(r[e]),Mye(r[e],i);else{const l=this.createTextTrack("captions",s,a);l&&(l[e]=!0,r[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const n=this.captionsProperties[e];if(!n)return;const r=n.label,i={_id:e,label:r,kind:"captions",default:n.media?!!n.media.default:!1,closedCaptions:n.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(Y.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,n,r){const i=this.media;if(i)return i.addTextTrack(e,n,r)}onMediaAttaching(e,n){this.media=n.media,n.mediaSource||this._cleanTracks()}onMediaDetaching(e,n){const r=!!n.transferMedia;if(this.media=null,r)return;const{captionsTracks:i}=this;
vendor: 21,556 bytes, line 685
685Object.keys(i).forEach(s=>{vE(i[s]),delete i[s]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=lte(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const n=e.textTracks;if(n)for(let r=0;r<n.length;r++)vE(n[r])}onSubtitleTracksUpdated(e,n){const r=n.subtitleTracks||[],i=r.some(s=>s.textCodec===j5);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(Aye(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const a=this.media,o=a?QP(a.textTracks):null;if(this.tracks.forEach((l,u)=>{let c;if(o){let d=null;for(let f=0;f<o.length;f++)if(o[f]&&ote(o[f],l)){d=o[f],o[f]=null;break}d&&(c=d)}if(c)vE(c);else{const d=qye(l);c=this.createTextTrack(d,l.name,l.lang),c&&(c.mode="disabled")}c&&this.textTracks.push(c)}),o!=null&&o.length){const l=o.filter(u=>u!==null).map(u=>u.label);l.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${l.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const a=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(Y.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:a})}}}onManifestLoaded(e,n){this.config.enableCEA708Captions&&n.captions&&n.captions.forEach(r=>{const i=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!i)return;const s=`textTrack${i[1]}`,a=this.captionsProperties[s];a&&(a.label=r.name,r.lang&&(a.languageCode=r.lang),a.media=r)})}closedCaptionsForLevel(e){const n=this.hls.levels[e.level];return n==null?void 0:n.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,n){if(this.enabled&&n.frag.type===yn.MAIN){var r,i;const{cea608Parser1:s,cea608Parser2:a,lastSn:o}=this,{cc:l,sn:u}=n.frag,c=(r=(i=n.part)==null?void 0:i.index)!=null?r:-1;s&&a&&(u!==o+1||u===o&&c!==this.lastPartIndex+1||l!==this.lastCc)&&(s.reset(),a.reset()),this.lastCc=l,this.lastSn=u,this.lastPartIndex=c}}onFragLoaded(e,n){const{frag:r,payload:i}=n;if(r.type===yn.SUBTITLE)if(i.byteLength){const s=r.decryptdata,a="stats"in n;if(s==null||!s.encrypted||a){const o=this.tracks[r.level],l=this.vttCCs;l[r.cc]||(l[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),o&&o.textCodec===j5?this._parseIMSC1(r,i):this._parseVTTs(n)}}else this.hls.trigger(Y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,n){const r=this.hls;ite(n,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),r.trigger(Y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{r.logger.log(`Failed to parse IMSC1: ${i}`),r.trigger(Y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:i})})}_parseVTTs(e){var n;const{frag:r,payload:i}=e,{initPTS:s,unparsedVttFrags:a}=this,o=s.length-1;if(!s[r.cc]&&o===-1){a.push(e);return}const l=this.hls,u=(n=r.initSegment)!=null&&n.data?Pd(r.initSegment.data,new Uint8Array(i)).buffer:i;WRt(u,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,c=>{this._appendCues(c,r.level),l.trigger(Y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},c=>{const d=c.message==="Missing initPTS for VTT MPEGTS";d?a.push(e):this._fallbackToIMSC1(r,i),l.logger.log(`Failed to parse VTT cue: ${c}`),!(d&&o>r.cc)&&l.trigger(Y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:c})})}_fallbackToIMSC1(e,n){const r=this.tracks[e.level];r.textCodec||ite(n,this.initPTS[e.cc],()=>{r.textCodec=j5,this._parseIMSC1(e,n)},()=>{r.textCodec="wvtt"})}_appendCues(e,n){const r=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[n];if(!i||i.mode==="disabled")return;e.forEach(s=>Fye(i,s))}else{const i=this.tracks[n];if(!i)return;const s=i.default?"default":"subtitles"+n;r.trigger(Y.CUES_PARSED,{type:"subtitles",cues:e,track:s})}}onFragDecrypted(e,n){const{frag:r}=n;r.type===yn.SUBTITLE&&this.onFragLoaded(Y.FRAG_LOADED,n)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,n){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:r,samples:i}=n;if(!(r.type===yn.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let s=0;s<i.length;s++){const a=i[s].bytes;if(a){this.cea608Parser1||this.initCea608Parsers();const o=this.extractCea608Data(a);this.cea608Parser1.addData(i[s].pts,o[0]),this.cea608Parser2.addData(i[s].pts,o[1])}}}onBufferFlushing(e,{startOffset:n,endOffset:r,endOffsetSubtitles:i,type:s}){const{media:a}=this;if(!(!a||a.currentTime<r)){if(!s||s==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(l=>y6(o[l],n,r))}if(this.config.renderTextTracksNatively&&n===0&&i!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(l=>y6(o[l],n,i))}}}extractCea608Data(e){const n=[[],[]],r=e[0]&31;let i=2;for(let s=0;s<r;s++){const a=e[i++],o=127&e[i++],l=127&e[i++];if(o===0&&l===0)continue;if((4&a)!==0){const c=3&a;(c===0||c===1)&&(n[c].push(o),n[c].push(l))}}return n}}function qye(t){return t.characteristics&&/transcribes-spoken-dialog/gi.test(t.characteristics)&&/describes-music-and-sound/gi.test(t.characteristics)?"captions":"subtitles"}function ote(t,e){return!!t&&t.kind===qye(e)&&p6(e,t)}function JRt(t,e,n,r){return Math.min(e,r)-Math.max(t,n)}function lte(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const eLt=/\s/,tLt={newCue(t,e,n,r){const i=[];let s,a,o,l,u;const c=self.VTTCue||self.TextTrackCue;for(let f=0;f<r.rows.length;f++)if(s=r.rows[f],o=!0,l=0,u="",!s.isEmpty()){var d;for(let v=0;v<s.chars.length;v++)eLt.test(s.chars[v].uchar)&&o?l++:(u+=s.chars[v].uchar,o=!1);s.cueStartTime=e,e===n&&(n+=1e-4),l>=16?l--:l++;const h=jye(u.trim()),g=nj(e,n,h);t!=null&&(d=t.cues)!=null&&d.getCueById(g)||(a=new c(e,n,h),a.id=g,a.line=f+1,a.align="left",a.position=10+Math.min(80,Math.floor(l*8/32)*10),i.push(a))}return t&&i.length&&(i.sort((f,h)=>f.line==="auto"||h.line==="auto"?0:f.line>8&&h.line>8?h.line-f.line:f.line-h.line),i.forEach(f=>Fye(t,f))),i}};function nLt(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const rLt=/(\d+)-(\d+)\/(\d+)/;class ute{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||oLt,this.controller=new self.AbortController,this.stats=new kH}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,n,r){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const s=iLt(e,this.controller.signal),a=e.responseType==="arraybuffer",o=a?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:u}=n.loadPolicy;this.context=e,this.config=n,this.callbacks=r,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),n.timeout=l&&sn(l)?l:u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(i,e,this.response))},n.timeout),(wC(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(d=>{var f;this.response=this.loader=d;const h=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),n.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(i,e,this.response))},u-(h-i.loading.start)),!d.ok){const{status:v,statusText:b}=d;throw new lLt(b||"fetch, bad network response",v,d)}i.loading.first=h,i.total=aLt(d.headers)||i.total;const g=(f=this.callbacks)==null?void 0:f.onProgress;return g&&sn(n.highWaterMark)?this.loadProgressively(d,i,e,n.highWaterMark,g):a?d.arrayBuffer():e.responseType==="json"?d.json():d.text()}).then(d=>{var f,h;const g=this.response;if(!g)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const v=d[o];v&&(i.loaded=i.total=v);const b={url:g.url,data:d,code:g.status},S=(f=this.callbacks)==null?void 0:f.onProgress;S&&!sn(n.highWaterMark)&&S(i,e,d,g),(h=this.callbacks)==null||h.onSuccess(b,i,e,g)}).catch(d=>{var f;if(self.clearTimeout(this.requestTimeout),i.aborted)return;const h=d&&d.code||0,g=d?d.message:null;(f=this.callbacks)==null||f.onError({code:h,text:g},e,d?d.details:null,i)})}getCacheAge(){let e=null;if(this.response){const n=this.response.headers.get("age");e=n?parseFloat(n):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,n,r,i=0,s){const a=new rye,o=e.body.getReader(),l=()=>o.read().then(u=>{if(u.done)return a.dataLength&&s(n,r,a.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const c=u.value,d=c.length;return n.loaded+=d,d<i||a.dataLength?(a.push(c),a.dataLength>=i&&s(n,r,a.flush().buffer,e)):s(n,r,c.buffer,e),l()}).catch(()=>Promise.reject());return l()}}function iLt(t,e){const n={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(ns({},t.headers))};return t.rangeEnd&&n.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),n}function sLt(t){const e=rLt.exec(t);if(e)return parseInt(e[2])-parseInt(e[1])+1}function aLt(t){const e=t.get("Content-Range");if(e){const r=sLt(e);if(sn(r))return r}const n=t.get("Content-Length");if(n)return parseInt(n)}function oLt(t,e){return new self.Request(t.url,e)}class lLt extends Error{constructor(e,n,r){super(e),this.code=void 0,this.details=void 0,this.code=n,this.details=r}}const uLt=/^age:\s*[\d.]+\s*$/im;class Kye{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new kH,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,n,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=n,this.callbacks=r,this.loadInternal()}loadInternal(){const{config:e,context:n}=this;if(!e||!n)return;const r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const s=this.xhrSetup;s?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return s(r,n.url)}).catch(a=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",n.url,!0),s(r,n.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,n,e)}).catch(a=>{var o;(o=this.callbacks)==null||o.onError({code:r.status,text:a.message},n,r,i)}):this.openAndSendXhr(r,n,e)}openAndSendXhr(e,n,r){e.readyState||e.open("GET",n.url,!0);const i=n.headers,{maxTimeToFirstByteMs:s,maxLoadTimeMs:a}=r.loadPolicy;if(i)for(const o in i)e.setRequestHeader(o,i[o]);n.rangeEnd&&e.setRequestHeader("Range","bytes="+n.rangeStart+"-"+(n.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=n.responseType,self.clearTimeout(this.requestTimeout),r.timeout=s&&sn(s)?s:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:n,stats:r}=this;if(!e||!n)return;const i=n.readyState,s=this.config;if(!r.aborted&&i>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),s.timeout!==s.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),s.timeout=s.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),n.onreadystatechange=null,n.onprogress=null;const u=n.status,c=n.responseType==="text"?n.responseText:null;if(u>=200&&u<300){const g=c??n.response;if(g!=null){var a,o;r.loading.end=Math.max(self.performance.now(),r.loading.first);const v=n.responseType==="arraybuffer"?g.byteLength:g.length;r.loaded=r.total=v,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const b=(a=this.callbacks)==null?void 0:a.onProgress;b&&b(r,e,g,n);const S={url:n.responseURL,data:g,code:u};(o=this.callbacks)==null||o.onSuccess(S,r,e,n);return}}const d=s.loadPolicy.errorRetry,f=r.retry,h={url:e.url,data:void 0,code:u};if(BD(d,f,!1,h))this.retry(d);else{var l;ji.error(`${u} while loading ${e.url}`),(l=this.callbacks)==null||l.onError({code:u,text:n.statusText},e,n,r)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,n=this.stats.retry;if(BD(e,n,!0))this.retry(e);else{var r;ji.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:n,stats:r}=this;this.retryDelay=$H(e,r.retry),r.retry++,ji.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${n==null?void 0:n.url}, retrying ${r.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total)}getCacheAge(){let e=null;if(this.loader&&uLt.test(this.loader.getAllResponseHeaders())){const n=this.loader.getResponseHeader("age");e=n?parseFloat(n):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const cLt={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},dLt=Ui(Ui({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:Kye,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:AIt,bufferController:hPt,capLevelController:XH,errorController:IIt,fpsController:pRt,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Wve,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:cLt},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},fLt()),{},{subtitleStreamController:CRt,subtitleTrackController:vRt,timelineController:XRt,audioStreamController:uPt,audioTrackController:cPt,emeController:VE,cmcdController:cRt,contentSteeringController:fRt,interstitialsController:_Rt});function fLt(){return{cueHandler:tLt,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function hLt(t,e,n){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=S6(t),i=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return i.forEach(a=>{const o=`${a==="level"?"playlist":a}LoadPolicy`,l=e[o]===void 0,u=[];s.forEach(c=>{const d=`${a}Loading${c}`,f=e[d];if(f!==void 0&&l){u.push(d);const h=r[o].default;switch(e[o]={default:h},c){case"TimeOut":h.maxLoadTimeMs=f,h.maxTimeToFirstByteMs=f;break;case"MaxRetry":h.errorRetry.maxNumRetry=f,h.timeoutRetry.maxNumRetry=f;break;case"RetryDelay":h.errorRetry.retryDelayMs=f,h.timeoutRetry.retryDelayMs=f;break;case"MaxRetryTimeout":h.errorRetry.maxRetryDelayMs=f,h.timeoutRetry.maxRetryDelayMs=f;break}}}),u.length&&n.warn(`hls.js config: "${u.join('", "')}" setting(s) are deprecated, use "${o}": ${us(e[o])}`)}),Ui(Ui({},r),e)}function S6(t){return t&&typeof t=="object"?Array.isArray(t)?t.map(S6):Object.keys(t).reduce((e,n)=>(e[n]=S6(t[n]),e),{}):t}function pLt(t,e){const n=t.loader;n!==ute&&n!==Kye?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):nLt()&&(t.loader=ute,t.progressive=!0,t.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const XP=2,gLt=.1,mLt=.05,vLt=100;class yLt extends Vve{constructor(e,n){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var r;(r=this.media)!=null&&r.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var r;this.ended=((r=this.media)==null?void 0:r.currentTime)||1,this.hls.trigger(Y.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=n,this.registerListeners()}registerListeners(){const{hls:e}=this;
vendor: 25,270 bytes, line 685
685e&&(e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,n){this.setInterval(vLt),this.mediaSource=n.mediaSource;const r=this.media=n.media;iu(r,"playing",this.onMediaPlaying),iu(r,"waiting",this.onMediaWaiting),iu(r,"ended",this.onMediaEnded)}onMediaDetaching(e,n){this.clearInterval();const{media:r}=this;r&&($u(r,"playing",this.onMediaPlaying),$u(r,"waiting",this.onMediaWaiting),$u(r,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,n){this.buffered=n.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const n=this.media.currentTime;this.poll(n,this.lastCurrentTime),this.lastCurrentTime=n}poll(e,n){var r,i;const s=(r=this.hls)==null?void 0:r.config;if(!s)return;const a=this.media;if(!a)return;const{seeking:o}=a,l=this.seeking&&!o,u=!this.seeking&&o,c=a.paused&&!o||a.ended||a.playbackRate===0;if(this.seeking=o,e!==n){n&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,s.nudgeOnVideoHole&&!c&&e>n&&this.nudgeOnVideoHole(e,n)),this.waiting===0&&this.stallResolved(e);return}if(u||l){l&&this.stallResolved(e);return}if(c){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&a.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(Y.MEDIA_ENDED,{stalled:!1}));return}if(!ar.getBuffered(a).length){this.nudgeRetry=0;return}const d=ar.bufferInfo(a,e,0),f=d.nextStart||0,h=this.fragmentTracker;if(o&&h&&this.hls){const N=cte(this.hls.inFlightFragments,e),k=d.len>XP,U=!f||N||f-e>XP&&!h.getPartialFragment(e);if(k||U)return;this.moved=!1}const g=(i=this.hls)==null?void 0:i.latestLevelDetails;if(!this.moved&&this.stalled!==null&&h){if(!(d.len>0)&&!f)return;const k=Math.max(f,d.start||0)-e,H=!!(g!=null&&g.live)?g.targetduration*2:XP,B=eP(e,h);if(k>0&&(k<=H||B)){a.paused||this._trySkipBufferHole(B);return}}const v=s.detectStallWithCurrentTimeMs,b=self.performance.now(),S=this.waiting;let A=this.stalled;if(A===null)if(S>0&&b-S<v)A=this.stalled=S;else{this.stalled=b;return}const w=b-A;if(!o&&(w>=v||S)&&this.hls){var x;if(((x=this.mediaSource)==null?void 0:x.readyState)==="ended"&&!(g!=null&&g.live)&&Math.abs(e-((g==null?void 0:g.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(Y.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(d),!this.media||!this.hls)return}const P=ar.bufferInfo(a,e,s.maxBufferHole);this._tryFixBufferStall(P,w,e)}stallResolved(e){const n=this.stalled;if(n&&this.hls&&(this.stalled=null,this.stallReported)){const r=self.performance.now()-n;this.log(`playback not stuck anymore @${e}, after ${Math.round(r)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(Y.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,n){var r;const i=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(r=this.buffered.audio)!=null&&r.length&&i&&i.length>1&&e>i.end(0)){const s=ar.bufferedInfo(ar.timeRangesToArray(this.buffered.audio),e,0);if(s.len>1&&n>=s.start){const a=ar.timeRangesToArray(i),o=ar.bufferedInfo(a,n,0).bufferedIndex;if(o>-1&&o<a.length-1){const l=ar.bufferedInfo(a,e,0).bufferedIndex,u=a[o].end,c=a[o+1].start;if((l===-1||l>o)&&c-u<1&&e-u<2){const d=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${u} -> ${c} buffered index: ${l}`);this.warn(d.message),this.media.currentTime+=1e-6;let f=eP(e,this.fragmentTracker);f&&"fragment"in f?f=f.fragment:f||(f=void 0);const h=ar.bufferInfo(this.media,e,0);this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:f,buffer:h.len,bufferInfo:h})}}}}}_tryFixBufferStall(e,n,r){var i,s;const{fragmentTracker:a,media:o}=this,l=(i=this.hls)==null?void 0:i.config;if(!o||!a||!l)return;const u=(s=this.hls)==null?void 0:s.latestLevelDetails,c=eP(r,a);if((c||u!=null&&u.live&&r<u.fragmentStart)&&(this._trySkipBufferHole(c)||!this.media))return;const d=e.buffered,f=this.adjacentTraversal(e,r);(d&&d.length>1&&e.len>l.maxBufferHole||e.nextStart&&(e.nextStart-r<l.maxBufferHole||f))&&(n>l.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,n){const r=this.fragmentTracker,i=e.nextStart;if(r&&i){const s=r.getFragAtPos(n,yn.MAIN),a=r.getFragAtPos(i,yn.MAIN);if(s&&a)return a.sn-s.sn<2}return!1}_reportStall(e){const{hls:n,media:r,stallReported:i,stalled:s}=this;if(!i&&s!==null&&r&&n){this.stallReported=!0;const a=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${us(e)})`);this.warn(a.message),n.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len,bufferInfo:e,stalled:{start:s}})}}_trySkipBufferHole(e){var n;const{fragmentTracker:r,media:i}=this,s=(n=this.hls)==null?void 0:n.config;if(!i||!r||!s)return 0;const a=i.currentTime,o=ar.bufferInfo(i,a,0),l=a<o.start?o.start:o.nextStart;if(l&&this.hls){const c=o.len<=s.maxBufferHole,d=o.len>0&&o.len<1&&i.readyState<3,f=l-a;if(f>0&&(c||d)){if(f>s.maxBufferHole){let g=!1;if(a===0){const v=r.getAppendedFrag(0,yn.MAIN);v&&l<v.end&&(g=!0)}if(!g&&e){var u;if(!((u=this.hls.loadLevelObj)!=null&&u.details)||cte(this.hls.inFlightFragments,l))return 0;let b=!1,S=e.end;for(;S<l;){const A=eP(S,r);if(A)S+=A.duration;else{b=!0;break}}if(b)return 0}}const h=Math.max(l+mLt,a+gLt);if(this.warn(`skipping hole, adjusting currentTime from ${a} to ${h}`),this.moved=!0,i.currentTime=h,!(e!=null&&e.gap)){const g=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${h}`),v={type:xn.MEDIA_ERROR,details:st.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:g,reason:g.message,buffer:o.len,bufferInfo:o};e&&("fragment"in e?v.part=e:v.frag=e),this.hls.trigger(Y.ERROR,v)}return h}}return 0}_tryNudgeBuffer(e){const{hls:n,media:r,nudgeRetry:i}=this,s=n==null?void 0:n.config;if(!r||!s)return 0;const a=r.currentTime;if(this.nudgeRetry++,i<s.nudgeMaxRetry){const o=a+(i+1)*s.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${a} to ${o}`);this.warn(l.message),r.currentTime=o,n.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${a} after ${s.nudgeMaxRetry} nudges`);this.error(o.message),n.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function cte(t,e){const n=dte(t.main);if(n&&n.start<=e)return n;const r=dte(t.audio);return r&&r.start<=e?r:null}function dte(t){if(!t)return null;switch(t.state){case wt.IDLE:case wt.STOPPED:case wt.ENDED:case wt.ERROR:return null}return t.frag}function eP(t,e){return e.getAppendedFrag(t,yn.MAIN)||e.getPartialFragment(t)}const bLt=.25;function E6(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function q5(t,e,n,r,i){let s=new t(e,n,"");try{s.value=r,i&&(s.type=i)}catch{s=new t(e,n,us(i?Ui({type:i},r):r))}return s}const tP=(()=>{const t=E6();try{t&&new t(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class SLt{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(Y.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Y.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(Y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(Y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Y.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,n){var r;this.media=n.media,((r=n.overrides)==null?void 0:r.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const n=(e=this.hls)==null?void 0:e.latestLevelDetails;n&&this.updateDateRangeCues(n)}onMediaDetaching(e,n){this.media=null,!n.transferMedia&&(this.id3Track&&(this.removeCues&&vE(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const n=this.getID3Track(e.textTracks);return n.mode="hidden",n}getID3Track(e){if(this.media){for(let n=0;n<e.length;n++){const r=e[n];if(r.kind==="metadata"&&r.label==="id3")return Mye(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,n){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:r,enableID3MetadataCues:i}=this.hls.config;if(!r&&!i)return;const{samples:s}=n;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=E6();if(a)for(let o=0;o<s.length;o++){const l=s[o].type;if(l===wc.emsg&&!r||!i)continue;const u=cye(s[o].data),c=s[o].pts;let d=c+s[o].duration;d>tP&&(d=tP),d-c<=0&&(d=c+bLt);for(let h=0;h<u.length;h++){const g=u[h];if(!dye(g)){this.updateId3CueEnds(c,l);const v=q5(a,c,d,g,l);v&&this.id3Track.addCue(v)}}}}updateId3CueEnds(e,n){var r;const i=(r=this.id3Track)==null?void 0:r.cues;if(i)for(let s=i.length;s--;){const a=i[s];a.type===n&&a.startTime<e&&a.endTime===tP&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:n,endOffset:r,type:i}){const{id3Track:s,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:l}}=a;if(s&&(o||l)){let u;i==="audio"?u=c=>c.type===wc.audioId3&&l:i==="video"?u=c=>c.type===wc.emsg&&o:u=c=>c.type===wc.audioId3&&l||c.type===wc.emsg&&o,y6(s,n,r,u)}}onLevelUpdated(e,{details:n}){this.updateDateRangeCues(n,!0)}onLevelPtsUpdated(e,n){Math.abs(n.drift)>.01&&this.updateDateRangeCues(n.details)}updateDateRangeCues(e,n){if(!this.hls||!this.media)return;const{assetPlayerId:r,timelineOffset:i,enableDateRangeMetadataCues:s,interstitialsController:a}=this.hls.config;if(!s)return;const o=E6();if(r&&i&&!a){const{fragmentStart:v,fragmentEnd:b}=e;let S=this.assetCue;S?(S.startTime=v,S.endTime=b):o&&(S=this.assetCue=q5(o,v,b,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),S&&(S.id=r,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(S),S.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:l}=this,{dateRanges:u}=e,c=Object.keys(u);let d=this.dateRangeCuesAppended;if(l&&n){var f;if((f=l.cues)!=null&&f.length){const v=Object.keys(d).filter(b=>!c.includes(b));for(let b=v.length;b--;){var h;const S=v[b],A=(h=d[S])==null?void 0:h.cues;delete d[S],A&&Object.keys(A).forEach(w=>{const x=A[w];if(x){x.removeEventListener("enter",this.onEventCueEnter);try{l.removeCue(x)}catch{}}})}}else d=this.dateRangeCuesAppended={}}const g=e.fragments[e.fragments.length-1];if(!(c.length===0||!sn(g==null?void 0:g.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let v=0;v<c.length;v++){const b=c[v],S=u[b],A=S.startTime,w=d[b],x=(w==null?void 0:w.cues)||{};let P=(w==null?void 0:w.durationKnown)||!1,N=tP;const{duration:k,endDate:U}=S;if(U&&k!==null)N=A+k,P=!0;else if(S.endOnNext&&!P){const B=c.reduce((q,Z)=>{if(Z!==S.id){const C=u[Z];if(C.class===S.class&&C.startDate>S.startDate&&(!q||S.startDate<q.startDate))return C}return q},null);B&&(N=B.startTime,P=!0)}const H=Object.keys(S.attr);for(let B=0;B<H.length;B++){const q=H[B];if(!VIt(q))continue;const Z=x[q];if(Z)P&&!(w!=null&&w.durationKnown)?Z.endTime=N:Math.abs(Z.startTime-A)>.01&&(Z.startTime=A,Z.endTime=N);else if(o){let C=S.attr[q];HIt(q)&&(C=Eve(C));const V=q5(o,A,N,{key:q,data:C},wc.dateRange);V&&(V.id=b,this.id3Track.addCue(V),x[q]=V,a&&(q==="X-ASSET-LIST"||q==="X-ASSET-URL")&&V.addEventListener("enter",this.onEventCueEnter))}}d[b]={cues:x,dateRange:S,durationKnown:P}}}}}class ELt{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:n}=this,r=this.levelDetails;if(!n||!r)return;this.currentTime=n.currentTime;const i=this.computeLatency();if(i===null)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:a}=this.config;if(!s||a===1||!r.live)return;const o=this.targetLatency;if(o===null)return;const l=i-o,u=Math.min(this.maxLatency,o+r.targetduration);if(l<u&&l>.05&&this.forwardBufferLength>1){const d=Math.min(2,Math.max(1,a)),f=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20,h=Math.min(d,Math.max(1,f));this.changeMediaPlaybackRate(n,h)}else n.playbackRate!==1&&n.playbackRate!==0&&this.changeMediaPlaybackRate(n,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const n=this.levelDetails;return n?e.liveMaxLatencyDurationCount*n.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:n,partHoldBack:r,targetduration:i}=e,{liveSyncDuration:s,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,l=this.hls.userConfig;let u=o&&r||n;(this._targetLatencyUpdated||l.liveSyncDuration||l.liveSyncDurationCount||u===0)&&(u=s!==void 0?s:a*i);const c=i;return u+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,c)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),n=this.targetLatency;if(e===null||n===null)return null;const r=this.levelDetails;if(r===null)return null;const i=r.edge,s=e-n-this.edgeStalled,a=i-r.totalduration,o=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(a,s),o)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const n=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-n,0)}get forwardBufferLength(){const{media:e}=this,n=this.levelDetails;if(!e||!n)return 0;const r=e.buffered.length;return(r?e.buffered.end(r-1):n.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Y.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(Y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Y.ERROR,this.onError,this))}onMediaAttached(e,n){this.media=n.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:n}){n.advanced&&this.onTimeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,n){var r;n.details===st.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(r=this.levelDetails)!=null&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,n){var r,i;e.playbackRate!==n&&((r=this.hls)==null||r.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(i=this.targetLatency)==null?void 0:i.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${n}`),e.playbackRate=n)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class TLt extends QH{constructor(e,n){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=n,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Y.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Y.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(n=>{n.loadError=0,n.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,n){this.resetLevels()}onManifestLoaded(e,n){const r=this.hls.config.preferManagedMediaSource,i=[],s={},a={};let o=!1,l=!1,u=!1;n.levels.forEach(c=>{const d=c.attrs;let{audioCodec:f,videoCodec:h}=c;f&&(c.audioCodec=f=ND(f,r)||void 0),h&&(h=c.videoCodec=iIt(h));const{width:g,height:v,unknownCodecs:b}=c,S=(b==null?void 0:b.length)||0;if(o||(o=!!(g&&v)),l||(l=!!h),u||(u=!!f),S||f&&!this.isAudioSupported(f)||h&&!this.isVideoSupported(h)){this.log(`Some or all CODECS not supported "${d.CODECS}"`);return}const{CODECS:A,"FRAME-RATE":w,"HDCP-LEVEL":x,"PATHWAY-ID":P,RESOLUTION:N,"VIDEO-RANGE":k}=d,H=`${`${P||"."}-`}${c.bitrate}-${N}-${w}-${A}-${k}-${x}`;if(s[H])if(s[H].uri!==c.url&&!c.attrs["PATHWAY-ID"]){const B=a[H]+=1;c.attrs["PATHWAY-ID"]=new Array(B+1).join(".");const q=this.createLevel(c);s[H]=q,i.push(q)}else s[H].addGroupId("audio",d.AUDIO),s[H].addGroupId("text",d.SUBTITLES);else{const B=this.createLevel(c);s[H]=B,a[H]=1,i.push(B)}}),this.filterAndSortMediaOptions(i,n,o,l,u)}createLevel(e){const n=new EC(e),r=e.supplemental;if(r!=null&&r.videoCodec&&!this.isVideoSupported(r.videoCodec)){const i=new Error(`SUPPLEMENTAL-CODECS not supported "${r.videoCodec}"`);this.log(i.message),n.supportedResult=Dve(i,[])}return n}isAudioSupported(e){return bC(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return bC(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,n,r,i,s){var a;let o=[],l=[],u=e;const c=((a=n.stats)==null?void 0:a.parsing)||{};if((r||i)&&s&&(u=u.filter(({videoCodec:A,videoRange:w,width:x,height:P})=>(!!A||!!(x&&P))&&pIt(w))),u.length===0){Promise.resolve().then(()=>{if(this.hls){let A="no level with compatible codecs found in manifest",w=A;n.levels.length&&(w=`one or more CODECS in variant not supported: ${us(n.levels.map(P=>P.attrs.CODECS).filter((P,N,k)=>k.indexOf(P)===N))}`,this.warn(w),A+=` (${w})`);const x=new Error(A);this.hls.trigger(Y.ERROR,{type:xn.MEDIA_ERROR,details:st.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:n.url,error:x,reason:w})}}),c.end=performance.now();return}n.audioTracks&&(o=n.audioTracks.filter(A=>!A.audioCodec||this.isAudioSupported(A.audioCodec)),fte(o)),n.subtitles&&(l=n.subtitles,fte(l));const d=u.slice(0);u.sort((A,w)=>{if(A.attrs["HDCP-LEVEL"]!==w.attrs["HDCP-LEVEL"])return(A.attrs["HDCP-LEVEL"]||"")>(w.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&A.height!==w.height)return A.height-w.height;if(A.frameRate!==w.frameRate)return A.frameRate-w.frameRate;if(A.videoRange!==w.videoRange)return MD.indexOf(A.videoRange)-MD.indexOf(w.videoRange);if(A.videoCodec!==w.videoCodec){const x=ree(A.videoCodec),P=ree(w.videoCodec);if(x!==P)return P-x}if(A.uri===w.uri&&A.codecSet!==w.codecSet){const x=kD(A.codecSet),P=kD(w.codecSet);if(x!==P)return P-x}return A.averageBitrate!==w.averageBitrate?A.averageBitrate-w.averageBitrate:0});let f=d[0];if(this.steering&&(u=this.steering.filterParsedLevels(u),u.length!==d.length)){for(let A=0;A<d.length;A++)if(d[A].pathwayId===u[0].pathwayId){f=d[A];break}}this._levels=u;for(let A=0;A<u.length;A++)if(u[A]===f){var h;this._firstLevel=A;const w=f.bitrate,x=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${u.length} level(s) found, first bitrate: ${w}`),((h=this.hls.userConfig)==null?void 0:h.abrEwmaDefaultEstimate)===void 0){const P=Math.min(w,this.hls.config.abrEwmaDefaultEstimateMax);P>x&&x===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=P)}break}const g=s&&!i,v=this.hls.config,b=!!(v.audioStreamController&&v.audioTrackController),S={levels:u,audioTracks:o,subtitleTracks:l,sessionData:n.sessionData,sessionKeys:n.sessionKeys,firstLevel:this._firstLevel,stats:n.stats,audio:s,video:i,altAudio:b&&!g&&o.some(A=>!!A.url)};c.end=performance.now(),this.hls.trigger(Y.MANIFEST_PARSED,S)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const n=this._levels;if(n.length===0)return;if(e<0||e>=n.length){const c=new Error("invalid level idx"),d=e<0;if(this.hls.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.LEVEL_SWITCH_ERROR,level:e,fatal:d,error:c,reason:c.message}),d)return;e=Math.min(e,n.length-1)}const r=this.currentLevelIndex,i=this.currentLevel,s=i?i.attrs["PATHWAY-ID"]:void 0,a=n[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,r===e&&i&&s===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${r}${s?" with Pathway "+s:""}`);const l={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(Y.LEVEL_SWITCHING,l);const u=a.details;if(!u||u.live){const c=this.switchParams(a.uri,i==null?void 0:i.details,u);this.loadPlaylist(c)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const n=this.steering.pathways(),r=e.filter(i=>n.indexOf(i)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${n}`);return}this.steering.pathwayPriority=r}}onError(e,n){n.fatal||!n.context||n.context.type===Mr.LEVEL&&n.context.level===this.level&&this.checkRetry(n)}onFragBuffered(e,{frag:n}){if(n!==void 0&&n.type===yn.MAIN){const r=n.elementaryStreams;if(!Object.keys(r).some(s=>!!r[s]))return;const i=this._levels[n.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,n){var r;const{level:i,details:s}=n,a=n.levelInfo;if(!a){var o;this.warn(`Invalid level index ${i}`),(o=n.deliveryDirectives)!=null&&o.skip&&(s.deltaUpdateFailed=!0);return}if(a===this.currentLevel||n.withoutMultiVariant){a.fragmentError===0&&(a.loadError=0);let l=a.details;l===n.details&&l.advanced&&(l=void 0),this.playlistLoaded(i,n,l)}else(r=n.deliveryDirectives)!=null&&r.skip&&(s.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLo
vendor: 4,461 bytes, line 685
685ading(this.currentLevel,e)}loadingPlaylist(e,n){super.loadingPlaylist(e,n);const r=this.getUrlWithDirectives(e.uri,n),i=this.currentLevelIndex,s=e.attrs["PATHWAY-ID"],a=e.details,o=a==null?void 0:a.age;this.log(`Loading level index ${i}${(n==null?void 0:n.msn)!==void 0?" at sn "+n.msn+" part "+n.part:""}${s?" Pathway "+s:""}${o&&a.live?" age "+o.toFixed(1)+(a.type&&" "+a.type||""):""} ${r}`),this.hls.trigger(Y.LEVEL_LOADING,{url:r,level:i,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:n||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var n;if(this._levels.length===1)return;const r=this._levels.filter((s,a)=>a!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(o=>o.level=-1)),!1));eye(r),this._levels=r,this.currentLevelIndex>-1&&(n=this.currentLevel)!=null&&n.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const i=r.length-1;this._firstLevel=Math.min(this._firstLevel,i),this._startLevel&&(this._startLevel=Math.min(this._startLevel,i)),this.hls.trigger(Y.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:n}){this._levels=n}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:n,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==n&&(this._maxAutoLevel=n,this.hls.trigger(Y.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:n,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function fte(t){const e={};t.forEach(n=>{const r=n.groupId||"";n.id=e[r]=e[r]||0,e[r]++})}function Yye(){return self.SourceBuffer||self.WebKitSourceBuffer}function Zye(){if(!Pv())return!1;const e=Yye();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function ALt(){if(!Zye())return!1;const t=Pv();return typeof(t==null?void 0:t.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>t.isTypeSupported(SC(e,"video")))||["mp4a.40.2","fLaC"].some(e=>t.isTypeSupported(SC(e,"audio"))))}function wLt(){var t;const e=Yye();return typeof(e==null||(t=e.prototype)==null?void 0:t.changeType)=="function"}const _Lt=100;class CLt extends jH{constructor(e,n,r){super(e,n,r,"stream-controller",yn.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const i=this.media,s=i?i.currentTime:null;if(s===null||!sn(s)||(this.log(`Media seeked to ${s.toFixed(3)}`),!this.getBufferedFrag(s)))return;const a=this.getFwdBufferInfoAtPos(i,s,yn.MAIN,0);if(a===null||a.len===0){this.warn(`Main forward buffer length at ${s} on "seeked" event ${a?a.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Y.LEVEL_LOADING,this.onLevelLoading,this),e.on(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Y.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(Y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Y.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(Y.BUFFER_CREATED,this.onBufferCreated,this),e.on(Y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(Y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Y.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(Y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Y.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(Y.BUFFER_CREATED,this.onBufferCreated,this),e.off(Y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Y.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}
vendor: 36,461 bytes, line 685
685startLoad(e,n){if(this.levels){const{lastCurrentTime:r,hls:i}=this;if(this.stopLoad(),this.setInterval(_Lt),this.level=-1,!this.startFragRequested){let s=i.startLevel;s===-1&&(i.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=i.firstAutoLevel),i.nextLoadLevel=s,this.level=i.loadLevel,this._hasEnoughToStart=!!n}r>0&&e===-1&&!n&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=wt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=n?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=wt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case wt.WAITING_LEVEL:{const{levels:e,level:n}=this,r=e==null?void 0:e[n],i=r==null?void 0:r.details;if(i&&(!i.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(i))break;this.state=wt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=wt.IDLE;break}break}case wt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===wt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:n,levels:r,media:i}=this;if(n===null||!i&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const s=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[s]))return;const a=r[s],o=this.getMainFwdBufferInfo();if(o===null)return;const l=this.getLevelDetails();if(l&&this._streamEnded(o,l)){const v={};this.altAudio===2&&(v.type="video"),this.hls.trigger(Y.BUFFER_EOS,v),this.state=wt.ENDED;return}if(!this.buffering)return;e.loadLevel!==s&&e.manualLevel===-1&&this.log(`Adapting to level ${s} from level ${this.level}`),this.level=e.nextLoadLevel=s;const u=a.details;if(!u||this.state===wt.WAITING_LEVEL||this.waitForLive(a)){this.level=s,this.state=wt.WAITING_LEVEL,this.startFragRequested=!1;return}const c=o.len,d=this.getMaxBufferLength(a.maxBitrate);if(c>=d)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:o.end;let h=this.getNextFragment(f,u);if(this.couldBacktrack&&!this.fragPrevious&&h&&Da(h)&&this.fragmentTracker.getState(h)!==po.OK){var g;const b=((g=this.backtrackFragment)!=null?g:h).sn-u.startSN,S=u.fragments[b-1];S&&h.cc===S.cc&&(h=S,this.fragmentTracker.removeFragment(S))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(h&&this.isLoopLoading(h,f)){if(!h.gap){const b=this.audioOnly&&!this.altAudio?ls.AUDIO:ls.VIDEO,S=(b===ls.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;S&&this.afterBufferFlushed(S,b,yn.MAIN)}h=this.getNextFragmentLoopLoading(h,u,o,yn.MAIN,d)}h&&(h.initSegment&&!h.initSegment.data&&!this.bitrateTest&&(h=h.initSegment),this.loadFragment(h,a,f))}loadFragment(e,n,r){const i=this.fragmentTracker.getState(e);i===po.NOT_LOADED||i===po.PARTIAL?Da(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,n)):super.loadFragment(e,n,r):this._loadInitSegment(e,n):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,yn.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:n}=this;if(n!=null&&n.readyState){let r;const i=this.getAppendedFrag(n.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const s=this.getLevelDetails();if(s!=null&&s.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<s.targetduration*2)return}if(!n.paused&&e){const o=this.hls.nextLoadLevel,l=e[o],u=this.fragLastKbps;u&&this.fragCurrent?r=this.fragCurrent.duration*l.maxBitrate/(1e3*u)+1:r=0}else r=0;const a=this.getBufferedFrag(n.currentTime+r);if(a){const o=this.followingBufferedFrag(a);if(o){this.abortCurrentFrag();const l=o.maxStartPTS?o.maxStartPTS:o.start,u=o.duration,c=Math.max(a.end,l+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,u*(this.couldBacktrack?.5:.125)),u*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(c,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case wt.KEY_LOADING:case wt.FRAG_LOADING:case wt.FRAG_LOADING_WAITING_RETRY:case wt.PARSING:case wt.PARSED:this.state=wt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,n){super.flushMainBuffer(e,n,this.altAudio===2?"video":null)}onMediaAttached(e,n){super.onMediaAttached(e,n);const r=n.media;iu(r,"playing",this.onMediaPlaying),iu(r,"seeked",this.onMediaSeeked)}onMediaDetaching(e,n){const{media:r}=this;r&&($u(r,"playing",this.onMediaPlaying),$u(r,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,n),!n.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(Y.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,n){let r=!1,i=!1;for(let s=0;s<n.levels.length;s++){const a=n.levels[s].audioCodec;a&&(r=r||a.indexOf("mp4a.40.2")!==-1,i=i||a.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=r&&i&&!wLt(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=n.levels,this.startFragRequested=!1}onLevelLoading(e,n){const{levels:r}=this;if(!r||this.state!==wt.IDLE)return;const i=n.levelInfo;(!i.details||i.details.live&&(this.levelLastLoaded!==i||i.details.expired)||this.waitForCdnTuneIn(i.details))&&(this.state=wt.WAITING_LEVEL)}onLevelLoaded(e,n){var r;const{levels:i,startFragRequested:s}=this,a=n.level,o=n.details,l=o.totalduration;if(!i){this.warn(`Levels were reset while loading level ${a}`);return}this.log(`Level ${a} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${l}`);const u=n.levelInfo,c=this.fragCurrent;c&&(this.state===wt.FRAG_LOADING||this.state===wt.FRAG_LOADING_WAITING_RETRY)&&c.level!==n.level&&c.loader&&this.abortCurrentFrag();let d=0;if(o.live||(r=u.details)!=null&&r.live){var f;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;d=this.alignPlaylists(o,u.details,(f=this.levelLastLoaded)==null?void 0:f.details)}if(u.details=o,this.levelLastLoaded=u,s||this.setStartPosition(o,d),this.hls.trigger(Y.LEVEL_UPDATED,{details:o,level:a}),this.state===wt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=wt.IDLE}s&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:n,media:r}=this;if(!r)return;const i=this.hls.liveSyncPosition,s=this.getLoadPosition(),a=e.fragmentStart,o=e.edge,l=s>=a-n.maxFragLookUpTolerance&&s<=o;if(i!==null&&r.duration>i&&(s<i||!l)){const c=n.liveMaxLatencyDuration!==void 0?n.liveMaxLatencyDuration:n.liveMaxLatencyDurationCount*e.targetduration;if((!l&&r.readyState<4||s<o-c)&&(this._hasEnoughToStart||(this.nextLoadPosition=i),r.readyState))if(this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${i.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var u;const d=ar.bufferInfo(r,i,0);if(!((u=d.buffered)!=null&&u.length)){r.currentTime=i;return}if(d.start<=s){r.currentTime=i;return}const{nextStart:h}=ar.bufferedInfo(d.buffered,s,0);h&&(r.currentTime=h)}else r.currentTime=i}}_handleFragmentLoadProgress(e){var n;const r=e.frag,{part:i,payload:s}=e,{levels:a}=this;if(!a){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const o=a[r.level];if(!o){this.warn(`Level ${r.level} not found on progress`);return}const l=o.details;if(!l){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const u=o.videoCodec,c=l.PTSKnown||!l.live,d=(n=r.initSegment)==null?void 0:n.data,f=this._getAudioCodec(o),h=this.transmuxer=this.transmuxer||new Tye(this.hls,yn.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=i?i.index:-1,v=g!==-1,b=new UH(r.level,r.sn,r.stats.chunkCount,s.byteLength,g,v),S=this.initPTS[r.cc];h.push(s,d,f,u,r,i,l.totalduration,c,b,S)}onAudioTrackSwitching(e,n){const r=this.hls,i=this.altAudio!==0;if(FD(n.url,r))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests(),this.fragmentTracker.removeFragment(a)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(i){this.altAudio=0,this.fragmentTracker.removeAllFragments(),r.once(Y.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(Y.AUDIO_TRACK_SWITCHED,n)}),r.trigger(Y.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(Y.AUDIO_TRACK_SWITCHED,n)}}onAudioTrackSwitched(e,n){const r=FD(n.url,this.hls);if(r){const i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r?2:0,this.tick()}onBufferCreated(e,n){const r=n.tracks;let i,s,a=!1;for(const o in r){const l=r[o];if(l.id==="main"){if(s=o,i=l,o==="video"){const u=r[o];u&&(this.videoBuffer=u.buffer)}}else a=!0}a&&i?(this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,n){const{frag:r,part:i}=n,s=r.type===yn.MAIN;if(s){if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${i?" p: "+i.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===wt.PARSED&&(this.state=wt.IDLE);return}const o=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),Da(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,i)}const a=this.media;a&&(!this._hasEnoughToStart&&ar.getBuffered(a).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),s&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,n){var r;if(n.fatal){this.state=wt.ERROR;return}switch(n.details){case st.FRAG_GAP:case st.FRAG_PARSING_ERROR:case st.FRAG_DECRYPT_ERROR:case st.FRAG_LOAD_ERROR:case st.FRAG_LOAD_TIMEOUT:case st.KEY_LOAD_ERROR:case st.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(yn.MAIN,n);break;case st.LEVEL_LOAD_ERROR:case st.LEVEL_LOAD_TIMEOUT:case st.LEVEL_PARSING_ERROR:!n.levelRetry&&this.state===wt.WAITING_LEVEL&&((r=n.context)==null?void 0:r.type)===Mr.LEVEL&&(this.state=wt.IDLE);break;case st.BUFFER_ADD_CODEC_ERROR:case st.BUFFER_APPEND_ERROR:if(n.parent!=="main")return;this.reduceLengthAndFlushBuffer(n)&&this.resetLoadingState();break;case st.BUFFER_FULL_ERROR:if(n.parent!=="main")return;this.reduceLengthAndFlushBuffer(n)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case st.INTERNAL_EXCEPTION:this.recoverWorkerError(n);break}}onFragLoadEmergencyAborted(){this.state=wt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:n}){if(n!==ls.AUDIO||!this.altAudio){const r=(n===ls.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,n,yn.MAIN),this.tick())}}onLevelsUpdated(e,n){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=n.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const n=e.currentTime;let r=this.startPosition;if(r>=0&&n<r){if(e.seeking){this.log(`could not seek to ${r}, already seeking at ${n}`);return}const i=this.timelineOffset;i&&r&&(r+=i);const s=this.getLevelDetails(),a=ar.getBuffered(e),o=a.length?a.start(0):0,l=o-r,u=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||l>0&&(l<u||this.loadingParts&&l<2*((s==null?void 0:s.partTarget)||0)))&&(this.log(`adjusting start position by ${l} to match buffer start`),r+=l,this.startPosition=r),n<r&&(this.log(`seek to target start position ${r} from current time ${n} buffer start ${o}`),e.currentTime=r)}}_getAudioCodec(e){let n=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&n&&(this.log("Swapping audio codec"),n.indexOf("mp4a.40.5")!==-1?n="mp4a.40.2":n="mp4a.40.5"),n}_loadBitrateTestFrag(e,n){e.bitrateTest=!0,this._doFragLoad(e,n).then(r=>{const{hls:i}=this,s=r==null?void 0:r.frag;if(!s||this.fragContextChanged(s))return;n.fragmentError=0,this.state=wt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const a=s.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(Y.FRAG_LOADED,r),s.bitrateTest=!1}).catch(r=>{this.state===wt.STOPPED||this.state===wt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const n=this.playlistType,{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,a=this.getCurrentContext(s);if(!a){this.resetWhenMissingContext(s);return}const{frag:o,part:l,level:u}=a,{video:c,text:d,id3:f,initSegment:h}=i,{details:g}=u,v=this.altAudio?void 0:i.audio;if(this.fragContextChanged(o)){this.fragmentTracker.removeFragment(o);return}if(this.state=wt.PARSING,h){const b=h.tracks;if(b){const x=o.initSegment||o;if(this.unhandledEncryptionError(h,o))return;this._bufferInitSegment(u,b,x,s),r.trigger(Y.FRAG_PARSING_INIT_SEGMENT,{frag:x,id:n,tracks:b})}const S=h.initPTS,A=h.timescale,w=this.initPTS[o.cc];if(sn(S)&&(!w||w.baseTime!==S||w.timescale!==A)){const x=h.trackId;this.initPTS[o.cc]={baseTime:S,timescale:A,trackId:x},r.trigger(Y.INIT_PTS_FOUND,{frag:o,id:n,initPTS:S,timescale:A,trackId:x})}}if(c&&g){v&&c.type==="audiovideo"&&this.logMuxedErr(o);const b=g.fragments[o.sn-1-g.startSN],S=o.sn===g.startSN,A=!b||o.cc>b.cc;if(i.independent!==!1){const{startPTS:w,endPTS:x,startDTS:P,endDTS:N}=c;if(l)l.elementaryStreams[c.type]={startPTS:w,endPTS:x,startDTS:P,endDTS:N};else if(c.firstKeyFrame&&c.independent&&s.id===1&&!A&&(this.couldBacktrack=!0),c.dropped&&c.independent){const k=this.getMainFwdBufferInfo(),U=(k?k.end:this.getLoadPosition())+this.config.maxBufferHole,H=c.firstKeyFramePTS?c.firstKeyFramePTS:w;if(!S&&U<H-this.config.maxBufferHole&&!A){this.backtrack(o);return}else A&&(o.gap=!0);o.setElementaryStreamInfo(c.type,o.start,x,o.start,N,!0)}else S&&w-(g.appliedTimelineOffset||0)>XP&&(o.gap=!0);o.setElementaryStreamInfo(c.type,w,x,P,N),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(c,o,l,s,S||A)}else if(S||A)o.gap=!0;else{this.backtrack(o);return}}if(v){const{startPTS:b,endPTS:S,startDTS:A,endDTS:w}=v;l&&(l.elementaryStreams[ls.AUDIO]={startPTS:b,endPTS:S,startDTS:A,endDTS:w}),o.setElementaryStreamInfo(ls.AUDIO,b,S,A,w),this.bufferFragmentData(v,o,l,s)}if(g&&f!=null&&f.samples.length){const b={id:n,frag:o,details:g,samples:f.samples};r.trigger(Y.FRAG_PARSING_METADATA,b)}if(g&&d){const b={id:n,frag:o,details:g,samples:d.samples};r.trigger(Y.FRAG_PARSING_USERDATA,b)}}logMuxedErr(e){this.warn(`${Da(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,n,r,i){if(this.state!==wt.PARSING)return;this.audioOnly=!!n.audio&&!n.video,this.altAudio&&!this.audioOnly&&(delete n.audio,n.audiovideo&&this.logMuxedErr(r));const{audio:s,video:a,audiovideo:o}=n;if(s){const u=e.audioCodec;let c=GP(s.codec,u);c==="mp4a"&&(c="mp4a.40.5");const d=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5");const f=s.metadata;f&&"channelCount"in f&&(f.channelCount||1)!==1&&d.indexOf("firefox")===-1&&(c="mp4a.40.5")}c&&c.indexOf("mp4a.40.5")!==-1&&d.indexOf("android")!==-1&&s.container!=="audio/mpeg"&&(c="mp4a.40.2",this.log(`Android: force audio codec to ${c}`)),u&&u!==c&&this.log(`Swapping manifest audio codec "${u}" for "${c}"`),s.levelCodec=c,s.id=yn.MAIN,this.log(`Init audio buffer, container:${s.container}, codecs[selected/level/parsed]=[${c||""}/${u||""}/${s.codec}]`),delete n.audiovideo}if(a){a.levelCodec=e.videoCodec,a.id=yn.MAIN;const u=a.codec;if((u==null?void 0:u.length)===4)switch(u){case"hvc1":case"hev1":a.codec="hvc1.1.6.L120.90";break;case"av01":a.codec="av01.0.04M.08";break;case"avc1":a.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${u}]${a.codec!==u?" parsed-corrected="+a.codec:""}${a.supplemental?" supplemental="+a.supplemental:""}`),delete n.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete n.video,delete n.audio);const l=Object.keys(n);if(l.length){if(this.hls.trigger(Y.BUFFER_CODECS,n),!this.hls)return;l.forEach(u=>{const d=n[u].initSegment;d!=null&&d.byteLength&&this.hls.trigger(Y.BUFFER_APPENDING,{type:u,data:d,frag:r,part:null,chunkMeta:i,parent:r.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,yn.MAIN)}get maxBufferLength(){const{levels:e,level:n}=this,r=e==null?void 0:e[n];return r?this.getMaxBufferLength(r.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=wt.IDLE}checkFragmentChanged(){const e=this.media;let n=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(ar.isBuffered(e,r)?n=this.getAppendedFrag(r):ar.isBuffered(e,r+.1)&&(n=this.getAppendedFrag(r+.1)),n){this.backtrackFragment=null;const i=this.fragPlaying,s=n.level;(!i||n.sn!==i.sn||i.level!==s)&&(this.fragPlaying=n,this.hls.trigger(Y.FRAG_CHANGED,{frag:n}),(!i||i.level!==s)&&this.hls.trigger(Y.LEVEL_SWITCHED,{level:s}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const n=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return sn(n)?this.getAppendedFrag(n):null}get currentProgramDateTime(){var e;const n=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(sn(n)){const r=this.getLevelDetails(),i=this.currentFrag||(r?ob(null,r.fragments,n):null);if(i){const s=i.programDateTime;if(s!==null){const a=s+(n-i.start)*1e3;return new Date(a)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class xLt extends Fd{constructor(e,n){super("key-loader",n),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyIdToKeyInfo){const i=this.keyIdToKeyInfo[r].loader;if(i){var n;if(e&&e!==((n=i.context)==null?void 0:n.frag.type))return;i.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const n=this.keyIdToKeyInfo[e];(n.mediaKeySessionContext||n.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const n=this.keyIdToKeyInfo[e].loader;n&&n.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,n=st.KEY_LOAD_ERROR,r,i,s){return new Yp({type:xn.NETWORK_ERROR,details:n,fatal:!1,frag:e,response:s,error:r,networkDetails:i})}loadClear(e,n,r){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(n.length)for(let i=0,s=n.length;i<s;i++){const a=n[i];if(e.cc<=a.cc&&(!Da(e)||!Da(a)||e.sn<a.sn)||!r&&i==s-1)return this.emeController.selectKeySystemFormat(a).then(o=>{if(!this.emeController)return;a.setKeyFormat(o);const l=qP(o);if(l)return this.emeController.getKeySystemAccess([l])})}if(this.config.requireKeySystemAccessOnStart){const i=bw(this.config);if(i.length)return this.emeController.getKeySystemAccess(i)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(n=>this.loadInternal(e,n)):this.loadInternal(e)}loadInternal(e,n){var r,i;n&&e.setKeyFormat(n);const s=e.decryptdata;if(!s){const u=new Error(n?`Expected frag.decryptdata to be defined after setting format ${n}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,st.KEY_LOAD_ERROR,u))}const a=s.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,st.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));const o=K5(s);let l=this.keyIdToKeyInfo[o];if((r=l)!=null&&r.decryptdata.key)return s.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if(this.emeController&&(i=l)!=null&&i.keyLoadPromise)switch(this.emeController.getKeyStatus(l.decryptdata)){case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>{const{keyInfo:d}=c;return s.key=d.decryptdata.key,{frag:e,keyInfo:d}})}switch(this.log(`${this.keyIdToKeyInfo[o]?"Rel":"L"}oading${s.keyId?" keyId: "+el(s.keyId):""} URI: ${s.uri} from ${e.type} ${e.level}`),l=this.keyIdToKeyInfo[o]={decryptdata:s,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},s.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return s.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,st.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${s.method}"`)))}}loadKeyEME(e,n){const r={frag:n,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var i;if(!e.decryptdata.keyId&&(i=n.initSegment)!=null&&i.data){const a=Wxt(n.initSegment.data);if(a.length){let o=a[0];o.some(l=>l!==0)?(this.log(`Using keyId found in init segment ${el(o)}`),Ev.setKeyIdForUri(e.decryptdata.uri,o)):(o=Ev.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${el(o)}`)),e.decryptdata.keyId=o}}if(!e.decryptdata.keyId&&!Da(n))return Promise.resolve(r);const s=this.emeController.loadKey(r);return(e.keyLoadPromise=s.then(a=>(e.mediaKeySessionContext=a,r))).catch(a=>{throw e.keyLoadPromise=null,"data"in a&&(a.data.frag=n),a})}return Promise.resolve(r)}loadKeyHTTP(e,n){const r=this.config,i=r.loader,s=new i(r);return n.keyLoader=e.loader=s,e.keyLoadPromise=new Promise((a,o)=>{const l={keyInfo:e,frag:n,responseType:"arraybuffer",url:e.decryptdata.uri},u=r.keyLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(f,h,g,v)=>{const{frag:b,keyInfo:S}=g,A=K5(S.decryptdata);if(!b.decryptdata||S!==this.keyIdToKeyInfo[A])return o(this.createKeyLoadError(b,st.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),v));S.decryptdata.key=b.decryptdata.key=new Uint8Array(f.data),b.keyLoader=null,S.loader=null,a({frag:b,keyInfo:S})},onError:(f,h,g,v)=>{this.resetLoader(h),o(this.createKeyLoadError(n,st.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),g,Ui({url:l.url,data:void 0},f)))},onTimeout:(f,h,g)=>{this.resetLoader(h),o(this.createKeyLoadError(n,st.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),g))},onAbort:(f,h,g)=>{this.resetLoader(h),o(this.createKeyLoadError(n,st.INTERNAL_ABORTED,new Error("key loading aborted"),g))}};s.load(l,c,d)})}resetLoader(e){const{frag:n,keyInfo:r,url:i}=e,s=r.loader;n.keyLoader===s&&(n.keyLoader=null,r.loader=null);const a=K5(r.decryptdata)||i;delete this.keyIdToKeyInfo[a],s&&s.destroy()}}function K5(t){if(t.keyFormat!==rl.FAIRPLAY){const e=t.keyId;if(e)return el(e)}return t.uri}function hte(t){const{type:e}=t;switch(e){case Mr.AUDIO_TRACK:return yn.AUDIO;case Mr.SUBTITLE_TRACK:return yn.SUBTITLE;default:return yn.MAIN}}function Y5(t,e){let n=t.url;return(n===void 0||n.indexOf("data:")===0)&&(n=e.url),n}class ILt{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Y.LEVEL_LOADING,this.onLevelLoading,this),e.on(Y.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(Y.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(Y.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(Y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Y.LEVEL_LOADING,this.onLevelLoading,this),e.off(Y.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(Y.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(Y.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const n=this.hls.config,r=n.pLoader,i=n.loader,s=r||i,a=new s(n);return this.loaders[e.type]=a,a}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const n=this.loaders[e];n&&n.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,n){const{url:r}=n;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:Mr.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,n){const{id:r,level:i,pathwayId:s,url:a,deliveryDirectives:o,levelInfo:l}=n;this.load({id:r,level:i,pathwayId:s,responseType:"text",type:Mr.LEVEL,url:a,deliveryDirectives:o,levelOrTrack:l})}onAudioTrackLoading(e,n){const{id:r,groupId:i,url:s,deliveryDirectives:a,track:o}=n;this.load({id:r,groupId:i,level:null,responseType:"text",type:Mr.AUDIO_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onSubtitleTrackLoading(e,n){const{id:r,groupId:i,url:s,deliveryDirectives:a,track:o}=n;this.load({id:r,groupId:i,level:null,responseType:"text",type:Mr.SUBTITLE_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onLevelsUpdated(e,n){const r=this.loaders[Mr.LEVEL];if(r){const i=r.context;i&&!n.levels.some(s=>s===i.levelOrTrack)&&(r.abort(),delete this.loaders[Mr.LEVEL])}}load(e){var n;const r=this.hls.config;let i=this.getInternalLoader(e);if(i){const u=this.hls.logger,c=i.context;if(c&&c.levelOrTrack===e.levelOrTrack&&(c.url===e.url||c.deliveryDirectives&&!e.deliveryDirectives)){c.url===e.url?u.log(`[playlist-loader]: ignore ${e.url} ongoing request`):u.log(`[playlist-loader]: ignore ${e.url} in favor of ${c.url}`);return}u.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),i.abort()}let s;if(e.type===Mr.MANIFEST?s=r.manifestLoadPolicy.default:s=ns({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),sn((n=e.deliveryDirectives)==null?void 0:n.part)){let u;if(e.type===Mr.LEVEL&&e.level!==null?u=this.hls.levels[e.level].details:e.type===Mr.AUDIO_TRACK&&e.id!==null?u=this.hls.audioTracks[e.id].details:e.type===Mr.SUBTITLE_TRACK&&e.id!==null&&(u=this.hls.subtitleTracks[e.id].details),u){const c=u.partTarget,d=u.targetduration;if(c&&d){const f=Math.max(c*3,d*.8)*1e3;s=ns({},s,{maxTimeToFirstByteMs:Math.min(f,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(f,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},l={onSuccess:(u,c,d,f)=>{const h=this.getInternalLoader(d);this.resetInternalLoader(d.type);const g=u.data;c.parsing.start=performance.now(),Vh.isMediaPlaylist(g)||d.type!==Mr.MANIFEST?this.handleTrackOrLevelPlaylist(u,c,d,f||null,h):this.handleMasterPlaylist(u,c,d,f)},onError:(u,c,d,f)=>{this.handleNetworkError(c,d,!1,u,f)},onTimeout:(u,c,d)=>{this.handleNetworkError(c,d,!0,void 0,u)}};i.load(e,o,l)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:n},forceStartLoad:r}=this.hls;(e||r)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${n}`),this.hls.startLoad(n))}handleMasterPlaylist(e,n,r,i){const s=this.hls,a=e.data,o=Y5(e,r),l=Vh.parseMasterPlaylist(a,o);if(l.playlistParsingError){n.parsing.end=performance.now(),this.handleManifestParsingError(e,r,l.playlistParsingError,i,n);return}const{contentSteering:u,levels:c,sessionData:d,sessionKeys:f,startTimeOffset:h,variableList:g}=l;this.variableList=g,c.forEach(A=>{const{unknownCodecs:w}=A;if(w){const{preferManagedMediaSource:x}=this.hls.config;let{audioCodec:P,videoCodec:N}=A;for(let k=w.length;k--;){const U=w[k];bC(U,"audio",x)?(A.audioCodec=P=P?`${P},${U}`:U,z1.audio[P.substring(0,4)]=2,w.splice(k,1)):bC(U,"video",x)&&(A.videoCodec=N=N?`${N},${U}`:U,z1.video[N.substring(0,4)]=2,w.splice(k,1))}}});const{AUDIO:v=[],SUBTITLES:b,"CLOSED-CAPTIONS":S}=Vh.parseMasterPlaylistMedia(a,o,l);v.length&&!v.some(w=>!w.url)&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new ra({}),bitrate:0,url:""})),s.trigger(Y.MANIFEST_LOADED,{levels:c,audioTracks:v,subtitles:b,captions:S,contentSteering:u,url:o,stats:n,networkDetails:i,sessionData:d,sessionKeys:f,startTimeOffset:h,variableList:g})}handleTrackOrLevelPlaylist(e,n,r,i,s){const a=this.hls,{id:o,level:l,type:u}=r,c=Y5(e,r),d=sn(l)?l:sn(o)?o:0,f=hte(r),h=Vh.parseLevelPlaylist(e.data,c,d,f,0,this.variableList);if(u===Mr.MANIFEST){const g={attrs:new ra({}),bitrate:0,details:h,name:"",url:c};h.requestScheduled=n.loading.start+Qve(h,0),a.trigger(Y.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:c,stats:n,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}n.parsing.end=performance.now(),r.levelDetails=h,this.handlePlaylistLoaded(h,e,n,r,i,s)}handleManifestParsingError(e,n,r,i,s){this.hls.trigger(Y.ERROR,{type:xn.NETWORK_ERROR,details:st.MANIFEST_PARSING_ERROR,fatal:n.type===Mr.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:n,networkDetails:i,stats:s})}handleNetworkError(e,n,r=!1,i,s){let a=`A network ${r?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===Mr.LEVEL?a+=`: ${e.level} id: ${e.id}`:(e.type===Mr.AUDIO_TRACK||e.type===Mr.SUBTITLE_TRACK)&&(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);this.hls.logger.warn(`[playlist-loader]: ${a}`);let l=st.UNKNOWN,u=!1;const c=this.getInternalLoader(e);switch(e.type){case Mr.MANIFEST:l=r?st.MANIFEST_LOAD_TIMEOUT:st.MANIFEST_LOAD_ERROR,u=!0;break;case Mr.LEVEL:l=r?st.LEVEL_LOAD_TIMEOUT:st.LEVEL_LOAD_ERROR,u=!1;break;case Mr.AUDIO_TRACK:l=r?st.AUDIO_TRACK_LOAD_TIMEOUT:st.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case Mr.SUBTITLE_TRACK:l=r?st.SUBTITLE_TRACK_LOAD_TIMEOUT:st.SUBTITLE_LOAD_ERROR,u=!1;break}c&&this.resetInternalLoader(e.type);const d={type:xn.NETWORK_ERROR,details:l,fatal:u,url:e.url,loader:c,context:e,error:o,networkDetails:n,stats:s};if(i){const f=(n==null?void 0:n.url)||e.url;d.response=Ui({url:f,data:void 0},i)}this.hls.trigger(Y.ERROR,d)}handlePlaylistLoaded(e,n,r,i,s,a){const o=this.hls,{type:l,level:u,levelOrTrack:c,id:d,groupId:f,deliveryDirectives:h}=i,g=Y5(n,i),v=hte(i);let b=typeof i.level=="number"&&v===yn.MAIN?u:void 0;const S=e.playlistParsingError;if(S){if(this.hls.logger.warn(`${S} ${e.url}`),!o.config.ignorePlaylistParsingErrors){o.trigger(Y.ERROR,{type:xn.NETWORK_ERROR,details:st.LEVEL_PARSING_ERROR,fatal:!1,url:g,error:S,reason:S.message,response:n,context:i,level:b,parent:v,networkDetails:s,stats:r});return}e.playlistParsingError=null}if(!e.fragments.length){const A=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(Y.ERROR,{type:xn.NETWORK_ERROR,details:st.LEVEL_EMPTY_ERROR,fatal:!1,url:g,error:A,reason:A.message,response:n,context:i,level:b,parent:v,networkDetails:s,stats:r});return}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),l){case Mr.MANIFEST:case Mr.LEVEL:if(b){if(!c)b=0;else if(c!==o.levels[b]){const A=o.levels.indexOf(c);A>-1&&(b=A)}}o.trigger(Y.LEVEL_LOADED,{details:e,levelInfo:c||o.levels[0],level:b||0,id:d||0,stats:r,networkDetails:s,deliveryDirectives:h,withoutMultiVariant:l===Mr.MANIFEST});break;case Mr.AUDIO_TRACK:o.trigger(Y.AUDIO_TRACK_LOADED,{details:e,track:c,id:d||0,groupId:f||"",stats:r,networkDetails:s,deliveryDirectives:h});break;case Mr.SUBTITLE_TRACK:o.trigger(Y.SUBTITLE_TRACK_LOADED,{details:e,track:c,id:d||0,groupId:f||"",stats:r,networkDetails:s,deliveryDirectives:h});break}}}class vd{static get version(){return TC}static isMSESupported(){return Zye()}static isSupported(){return ALt()}static getMediaSource(){return Pv()}static get Events(){return Y}static get MetadataSchema(){return wc}static get ErrorTypes(){return xn}static get ErrorDetails(){return st}static get DefaultConfig(){return vd.defaultConfig?vd.defaultConfig:dLt}static set DefaultConfig(e){vd.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new zH,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const n=this.logger=kxt(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=hLt(vd.DefaultConfig,e,n);this.userConfig=e,r.progressive&&pLt(r,n);const{abrController:i,bufferController:s,capLevelController:a,errorController:o,fpsController:l}=r,u=new o(this),c=this.abrController=new i(this),d=new OIt(this),f=r.interstitialsController,h=f?this.interstitialsController=new f(this,vd):null,g=this.bufferController=new s(this,d),v=this.capLevelController=new a(this),b=new l(this),S=new ILt(this),A=r.contentSteeringController,w=A?new A(this):null,x=this.levelController=new TLt(this,w),P=new SLt(this),N=new xLt(this.config,this.logger),k=this.streamController=new CLt(this,d,N),U=this.gapController=new yLt(this,d);v.setStreamController(k),b.setStreamController(k);const H=[S,x,k];h&&H.splice(1,0,h),w&&H.splice(1,0,w),this.networkControllers=H;const B=[c,g,U,v,b,P,d];this.audioTrackController=this.createController(r.audioTrackController,H);const q=r.audioStreamController;q&&H.push(this.audioStreamController=new q(this,d,N)),this.subtitleTrackController=this.createController(r.subtitleTrackController,H);const Z=r.subtitleStreamController;Z&&H.push(this.subtititleStreamController=new Z(this,d,N)),this.createController(r.timelineController,B),N.emeController=this.emeController=this.createController(r.emeController,B),this.cmcdController=this.createController(r.cmcdController,B),this.latencyController=this.createController(ELt,B),this.coreComponents=B,H.push(u);const C=u.onErrorOut;typeof C=="function"&&this.on(Y.ERROR,C,u),this.on(Y.MANIFEST_LOADED,S.onManifestLoaded,S)}createController(e,n){if(e){const r=new e(this);return n&&n.push(r),r}return null}on(e,n,r=this){this._emitter.on(e,n,r)}once(e,n,r=this){this._emitter.once(e,n,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}
vendor: 6,453 bytes, line 685
685off(e,n,r=this,i){this._emitter.off(e,n,r,i)}listeners(e){return this._emitter.listeners(e)}emit(e,n,r){return this._emitter.emit(e,n,r)}trigger(e,n){if(this.config.debug)return this.emit(e,e,n);try{return this.emit(e,e,n)}catch(r){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const i=e===Y.ERROR;this.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.INTERNAL_EXCEPTION,fatal:i,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(Y.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(n=>n.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(n=>n.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const s=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(Y.ERROR,{type:xn.OTHER_ERROR,details:st.ATTACH_MEDIA_ERROR,fatal:!0,error:s});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const n="media"in e,r=n?e.media:e,i=n?e:{media:r};this._media=r,this.trigger(Y.MEDIA_ATTACHING,i)}detachMedia(){this.logger.log("detachMedia"),this.trigger(Y.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(Y.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const n=this.media,r=this._url,i=this._url=DH.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${i}`),n&&r&&(r!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(n)),this.trigger(Y.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,n){this.logger.log(`startLoad(${e+(n?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,n),!(!this.started||!this.networkControllers));r++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[yn.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[yn.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[yn.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,n=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),n&&this.startLoad(n))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=yRt()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const n=!!e;n!==this.config.capLevelToPlayerSize&&(n?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=n)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){hIt(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:n}}=this;if(!e)return 0;const r=e.length;for(let i=0;i<r;i++)if(e[i].maxBitrate>=n)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:n,maxHdcpLevel:r}=this;let i;
685if(n===-1&&e!=null&&e.length?i=e.length-1:i=n,r)for(let s=i;s--;){const a=e[s].attrs["HDCP-LEVEL"];if(a&&a<=r)return s}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var n;return((n=this.audioTrackController)==null?void 0:n.setAudioOption(e))||null}setSubtitleOption(e){var n;return((n=this.subtitleTrackController)==null?void 0:n.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const n=this.audioTrackController;n&&(n.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const n=this.subtitleTrackController;n&&(n.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const n=this.subtitleTrackController;n&&(n.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,n=this.allAudioTracks){const r=Mve(n);return kve(e,r,navigator.mediaCapabilities)}}vd.defaultConfig=void 0;const OLt={albumArtUrl:"image",artist:"artist",canPause:"canPause",companionAdIframeUrl:"companionAdIframeUrl",duration:"duration",id:"trackId",image:"image",isLive:"isLive",is_live:"isLive",isSkippable:"isSkippable",playId:"playId",play_id:"playId",playlistTrackStartTime:"trackStart",playlist_track_start_time:"trackStart",playlistTailStartTime:"playlistTailStartTime",playlistNextStartTime:"playlistNextStartTime",liveTime:"liveTime",segmentStartTime:"segmentStartTime",skips:"skips",stationId:"stationId",title:"songOrShow",type:"contentType",datumStartTime:"datumTime",datum_start_time:"datumTime",isRewindable:"isRewindable","lsdr/X-SEGMENT-START-TIME":"segmentStartTime","lsdr/X-IMAGE":"image","lsdr/X-PLAYLIST-TRACK-START-TIME":"trackStart","lsdr/X-SESSION-PLAY-ID":"playId","lsdr/X-SESSION-SKIPS":"skips","lsdr/X-SONG-ALBUM-ART-URL":"image","lsdr/X-SONG-ARTIST":"artist","lsdr/X-SONG-CAN-PAUSE":"canPause","lsdr/X-SONG-DURATION":"duration","lsdr/X-SONG-ID":"trackId","lsdr/X-SONG-IS-SKIPPABLE":"isSkippable","lsdr/X-SONG-STATION-ID":"stationId","lsdr/X-SONG-TITLE":"songOrShow","lsdr/X-SONG-TYPE":"contentType","lsdr/X-DATUM-START-TIME":"datumTime","lsdr/X-IS-LIVE":"isLive","lsdr/X-IS-REWINDABLE":"isRewindable","lsdr/X-PLAYLIST-TAIL-START-TIME":"playlistTailStartTime","lsdr/X-PLAYLIST-NEXT-START-TIME":"playlistNextStartTime","lsdr/X-LIVE-TIME":"liveTime","X-SEGMENT-START-TIME":"segmentStartTime","X-IMAGE":"image","X-PLAYLIST-TRACK-START-TIME":"trackStart","X-SESSION-PLAY-ID":"playId","X-SESSION-SKIPS":"skips","X-SONG-ALBUM-ART-URL":"image","X-SONG-ARTIST":"artist","X-SONG-CAN-PAUSE":"canPause","X-SONG-DURATION":"duration","X-SONG-ID":"trackId","X-SONG-IS-SKIPPABLE":"isSkippable","X-SONG-STATION-ID":"stationId","X-SONG-TITLE":"songOrShow","X-SONG-TYPE":"contentType","X-DATUM-START-TIME":"datumTime","X-IS-LIVE":"isLive","X-IS-REWINDABLE":"isRewindable","X-PLAYLIST-TAIL-START-TIME":"playlistTailStartTime","X-PLAYLIST-NEXT-START-TIME":"playlistNextStartTime","X-LIVE-TIME":"liveTime",TIT2:"songOrShow",TPE1:"artist",WXXX:"image",TXXX:"shfId","id3/TIT2":"songOrShow","id3/TPE1":"artist","id3/WXXX":"image","id3/TXXX":"shfId",shfId:"shfId",available_skips:"skips",duration_ms:"duration",continuity:"continuity",station:"stationId",start_ms:"datumTime"},Qye=t=>{const e={},n=e;for(const r in t){const i=OLt[r];i&&(n[i]=t[r])}return Jl(e.datumTime)&&(e.datumTime=parseFloat(e.datumTime)),Jl(e.isLive)&&(e.isLive=e.isLive==="TRUE"),Jl(e.isRewindable)&&(e.isRewindable=e.isRewindable==="TRUE"),Jl(e.duration)&&(e.duration=parseFloat(e.duration)),Jl(e.skips)&&(e.skips=parseInt(e.skips)),Jl(e.trackStart)&&(e.trackStart=parseFloat(e.trackStart)),Jl(e.playlistTailStartTime)&&(e.playlistTailStartTime=parseFloat(e.playlistTailStartTime)),Jl(e.playlistNextStartTime)&&(e.playlistNextStartTime=parseFloat(e.playlistNextStartTime)),Jl(e.liveTime)&&(e.liveTime=parseFloat(e.liveTime)),e},Xye=t=>{var e;return((e=t==null?void 0:t.featureFlags)==null?void 0:e[vce])??!1},Jye=(t,e=1)=>{const{liveTime:n,trackStart:r}=t,i=n&&r?Math.floor(n-r):0,s=vYe*e;return i<=s};class PLt{constructor(e={}){et(this,"logger");et(this,"deferredMetadata",[]);et(this,"playerElement",document.body.appendChild(document.createElement("audio")));et(this,"silentAudioPlayed",!1);et(this,"silentAudioInProgress",!1);et(this,"defaultSpeed",1);et(this,"stalled",!1);et(this,"ignoreNextLoadingEvent",!1);et(this,"backOnline",!1);
685et(this,"ignoreZeroUpdateEvent",!1);et(this,"lastMetadata",{});et(this,"hls");et(this,"eventListeners",new Set);et(this,"ctxRate",1);et(this,"vodFeatureEnabled",!1);et(this,"loadParams");et(this,"getMuted",()=>this.playerElement.muted);et(this,"setMuted",e=>this.playerElement.muted=e);et(this,"getCurrentTime",()=>this.playerElement.currentTime);et(this,"getVolume",()=>this.playerElement.volume);et(this,"pause",()=>{var e;(e=this.logger)==null||e.trace("pause"),this.playerElement.pause()});et(this,"setDefaultRate",e=>this.defaultSpeed=e);et(this,"setPosition",e=>this.playerElement.currentTime=e);et(this,"setRate",e=>{this.ctxRate=e,this.playerElement.playbackRate=e});et(this,"getRate",()=>this.playerElement.playbackRate);et(this,"skip",e=>this.playerElement.currentTime+=e);et(this,"notify",e=>{this.eventListeners.forEach(n=>n(e))});et(this,"addEventListener",e=>this.eventListeners.add(e));et(this,"removeEventListener",e=>this.eventListeners.delete(e));this.logger=e.logger,this.vodFeatureEnabled=Xye(e);const n=1;let r=0;this.defaultSpeed=1,this.playerElement.autoplay=!1,this.playerElement.preload="auto",this.loadParams={url:"",isAudioPreroll:!1,liveContentUrl:""},this.playerElement.onended=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native Ended Event`),(s=this.logger)==null||s.trace("onEnded"),this.lastMetadata.playlistNextStartTime&&this.playerElement.currentTime>=this.playerElement.duration?this.notify({type:"continuePlaying",playlistNextStartTime:this.lastMetadata.playlistNextStartTime}):this.notify({type:"ended",raw:i})},this.playerElement.onerror=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native Error Event`),!this.isEmpty(i)&&((s=this.logger)==null||s.error("onError",i),this.silentAudioInProgress||this.notify({type:"error",raw:i}))},this.playerElement.onloadstart=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Load Start Event`),(s=this.logger)==null||s.trace("onLoadStart"),r=0,this.ignoreNextLoadingEvent===!0?this.ignoreNextLoadingEvent=!1:(this.stalled=!0,this.notify({type:"loading",raw:i}))},this.playerElement.onloadedmetadata=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Loaded Metadata Event`),(s=this.logger)==null||s.trace("onLoadedMetadata"),!this.silentAudioInProgress&&this.playerElement.readyState>=1&&this.notify({type:"loaded",raw:i})},this.playerElement.onpause=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Pause Event`),(s=this.logger)==null||s.trace("onPause"),this.lastMetadata.playlistNextStartTime&&this.playerElement.currentTime>=this.playerElement.duration?this.notify({type:"continuePlaying",playlistNextStartTime:this.lastMetadata.playlistNextStartTime}):this.notify({type:"paused",raw:i})},this.playerElement.onemptied=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Emptied Event`),(s=this.logger)==null||s.trace("onEmptied"),this.notify({type:"paused",raw:i})},this.playerElement.onplaying=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Playing Event`),(s=this.logger)==null||s.trace("onPlaying"),this.stalled=!1,this.notify({type:"playing",raw:i})},this.playerElement.onseeked=()=>{var i;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Seeked Event`),(i=this.logger)==null||i.trace("onSeeked"),r=0},this.playerElement.onstalled=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Stalled Event`),(s=this.logger)==null||s.trace("onStalled"),this.stalled=!0,this.notify({type:"loading",raw:i})},this.playerElement.onwaiting=i=>{var s;Pn.info(`[${Rn.Streaming}] HTML Player: Native On Waiting Event`),(s=this.logger)==null||s.trace("onWaiting"),this.stalled=!0,this.backOnline===!0&&(this.backOnline=!1),this.notify({type:"loading",raw:i})},this.playerElement.ontimeupdate=i=>{var a;(a=this.logger)==null||a.trace("onTimeUpdate"),this.stalled===!0&&(this.stalled=!1,this.notify({type:"playing",raw:i}));const s=this.playerElement.currentTime;s>=r&&(this.ignoreZeroUpdateEvent!==!0||s!==0)&&(this.ignoreZeroUpdateEvent=!1,r=s+n,this.notify({type:"update",time:s,duration:this.playerElement.duration,raw:i})),this.ignoreZeroUpdateEvent=!1}}parseHlsMetadata(e,n){var r,i;(r=this.logger)==null||r.trace("parseHlsMetadata");try{const s=Qye(JSON.parse(e));(this.lastMetadata.songOrShow!==s.songOrShow||this.lastMetadata.artist!==s.artist||this.lastMetadata.image!==s.image||this.lastMetadata.companionAdIframeUrl!==s.companionAdIframeUrl||this.lastMetadata.trackStart!==s.trackStart||this.lastMetadata.playlistNextStartTime!==s.playlistNextStartTime||this.lastMetadata.playlistTailStartTime!==s.playlistTailStartTime||this.lastMetadata.liveTime!==s.liveTime)&&(this.lastMetadata={...this.lastMetadata,...s},this.handleVod(),n!==void 0?this.deferredMetadata.push({data:s,time:n}):this.notify({type:"metadata",...s,raw:e}))}catch{(i=this.logger)==null||i.error(`Error parsing hls metadata: ${e}`)}}handleVod(){this.vodFeatureEnabled&&(this.handleVodLiveTransition(),this.handleVodPlaybackRate())}handleVodLiveTransition(){const{isLive:e,datumTime:n}=this.lastMetadata;!e&&Jye(this.lastMetadata)&&n&&(this.notify({type:"continuePlaying",playlistNextStartTime:n,playLive:!0}),this.lastMetadata.isLive=!0)}handleVodPlaybackRate(){const e=Qh(this.lastMetadata.contentType);this.lastMetadata.isLive||e?this.playerElement.playbackRate=this.defaultSpeed:this.playerElement.playbackRate=this.ctxRate}play(){var e,n;Pn.info(`[${Rn.Streaming}] HTML Player: Play Event`),(e=this.logger)==null||e.trace("play"),(n=this.playerElement.play())==null||n.catch(r=>{var i;this.loadParams.url?(this.load(this.loadParams),this.loadParams={url:"",isAudioPreroll:!1,liveContentUrl:""}):(this.notify({type:"error",raw:r}),(i=this.logger)==null||i.error(`play error: ${JSON.stringify(r,void 0,2)}`))})}playPrerollInProgress(){}playWithOffset(e){var n;Pn.info(`[${Rn.Streaming}] HTML Player: Play with Offset Event`),(n=this.logger)==null||n.trace("playWithOffset"),e!==void 0&&this.setPosition(e),this.play()}stop(){var e;Pn.info(`[${Rn.Streaming}] HTML Player: Stop Event`),(e=this.logger)==null||e.trace("stop"),this.pause(),this.playerElement.src=this.playerElement.src,this.ignoreNextLoadingEvent=!0,this.ignoreZeroUp
685dateEvent=!0,this.hls?(this.hls.destroy(),this.hls=void 0):this.playerElement.src=""}createHls(){var n;Pn.info(`[${Rn.Streaming}] HTML Player: Private Create Hls Event`),(n=this.logger)==null||n.trace("createHls");const e=new vd(yYe);return e.on(vd.Events.FRAG_CHANGED,(r,i)=>{var o,l;Pn.info(`[${Rn.Streaming}] HTML Player: Hls.Event FRAG_CHANGED Event`),(o=this.logger)==null||o.trace(`on${r}`);const s=i==null?void 0:i.frag,a=s==null?void 0:s.title;Jl(a)&&this.parseHlsMetadata(a),this.deferredMetadata.length>0&&this.deferredMetadata[0].time<=(s==null?void 0:s.start)&&this.notify({type:"metadata",...((l=this.deferredMetadata.shift())==null?void 0:l.data)??{}})}),e.on(vd.Events.FRAG_PARSING_METADATA,(r,i)=>{var u;Pn.info(`[${Rn.Streaming}] HTML Player: Hls.Event FRAG_PARSING_METADATA Event`),(u=this.logger)==null||u.trace(`on${r}`);const s=Array.from(i.samples[0].data).map(c=>String.fromCharCode(c)).join(""),a=s.indexOf("amperwave.metadata");if(a<0)return;const o=s.indexOf("{",a);if(o<0)return;const l=s.indexOf("}",o);l<0||this.parseHlsMetadata(s.slice(o,l+1),i.frag.start)}),e.on(vd.Events.MANIFEST_PARSED,r=>{var a;Pn.info(`[${Rn.Streaming}] HTML Player: Hls.Event MANIFEST_PARSED Event`),(a=this.logger)==null||a.trace(`on${r}`);const i=Math.max(...e.levels.map(o=>o.bitrate)),s=e.levels.findIndex(o=>o.bitrate===i);e.startLevel=s}),e.on(vd.Events.ERROR,(r,i)=>{Pn.info(`[${Rn.Streaming}] HTML Player: Hls.Event ERROR Event`),delete i.context,delete i.loader,i.fatal?(this.notify({type:"playbackFailed",raw:i}),Pn.error(`[${Rn.Streaming}] Hls Playback Failure: ${JSON.stringify(i,null,2)}`)):Pn.error(`[${Rn.Streaming}] HLSError: ${JSON.stringify(i,null,2)}`)}),e}load(e){var n;Pn.info(`[${Rn.Streaming}] HTML Player: Load Event`),(n=this.logger)==null||n.trace("load"),this.lastMetadata={},this.deferredMetadata=[],this.stop(),this.playerElement.defaultPlaybackRate=this.defaultSpeed,this.notify({type:"loading",raw:{url:e.url,isHLS:e.isPodcast}}),e.isPodcast?this.playerElement.src=e.url:(this.playerElement.src="",this.hls=this.createHls(),this.hls.attachMedia(this.playerElement),this.hls.loadSource(e.url)),this.silentAudioInProgress&&(this.silentAudioInProgress=!1)}setVolume(e){var n;isNaN(e)?(n=this.logger)==null||n.error(`Trying to set volume to something not a number = ${e}`):this.playerElement.volume=e}silentAudioHack(){var n;Pn.info(`[${Rn.Streaming}] HTML Player: Silent Audio Detection`),typeof document<"u"&&U9()&&!this.silentAudioPlayed&&((n=this.logger)==null||n.trace("silentAudioHack"),this.ignoreNextLoadingEvent=!0,this.silentAudioInProgress=!0,this.playerElement.defaultPlaybackRate=this.defaultSpeed,this.playerElement.src=fle,this.playerElement.load(),this.silentAudioPlayed=!0)}isEmpty(e){var s;const n=JSON.stringify(e);(s=this.logger)==null||s.debug(`isempty: ${n}`);const r=JSON.stringify({isTrusted:!0}),i=JSON.stringify({});return!n||n===r||n===i}}class e0e{async clearData(e,n=localStorage){n.removeItem(e)}getData(e,n=localStorage){return Promise.resolve(this.getDataSync(e,n))}getDataSync(e,n=localStorage){const r=n.getItem(e);try{return r?JSON.parse(r):void 0}catch{return}}async setData(e,n,r=localStorage){this.setDataSync(e,n,r)}setDataSync(e,n,r=localStorage){r.setItem(e,JSON.stringify(n))}}class RLt{constructor(e={}){et(this,"logger");et(this,"deferredMetadata",[]);et(this,"playerElement");et(this,"silentAudioPlayed",!1);et(this,"silentAudioInProgress",!1);et(this,"defaultSpeed",1);et(this,"stalled",!1);et(this,"ignoreNextLoadingEvent",!1);et(this,"backOnline",!1);et(this,"ignoreZeroUpdateEvent",!1);et(this,"lastMetadata",{});et(this,"eventListeners",new Set);et(this,"currentMetadata",{});et(this,"isExclusiveStation",!1);et(this,"exclusiveStationOffset",0);et(this,"currentTimeDelta");et(this,"ctxRate",1);et(this,"vodFeatureEnabled",!1);et(this,"registration");et(this,"continuity");et(this,"allowSkips",!0);et(this,"url","");et(this,"getMuted",()=>this.playerElement.muted);et(this,"setMuted",e=>this.playerElement.muted=e);et(this,"getCurrentTime",()=>this.playerElement.currentTime);et(this,"getVolume",()=>this.playerElement.volume);et(this,"pause",()=>{var e;(e=this.logger)==null||e.trace("pause"),this.playerElement.pause(),this.currentMetadata={},this.deferredMetadata=[]});et(this,"setDefaultRate",e=>this.defaultSpeed=e);et(this,"setPosition",e=>this.playerElement.currentTime=e);et(this,"setRate",e=>{this.ctxRate=e,this.playerElement.playbackRate=e});et(this,"getRate",()=>this.playerElement.playbackRate);et(this,"skip",e=>this.playerElement.currentTime+=e);et(this,"notify",e=>
685{this.eventListeners.forEach(n=>n(e))});et(this,"addEventListener",e=>this.eventListeners.add(e));et(this,"removeEventListener",e=>this.eventListeners.delete(e));this.logger=e.logger,this.vodFeatureEnabled=Xye(e),this.continuity=0;const n=1;let r=0;this.defaultSpeed=1,this.playerElement=document.body.appendChild(document.createElement("audio")),this.playerElement.autoplay=!1,this.playerElement.preload="auto",this.playerElement.onended=i=>{var s;Pn.info(`[${Rn.Streaming}] Native Hls Player: Native Ended Event`),this.lastMetadata.playlistNextStartTime&&this.playerElement.currentTime>=this.playerElement.duration?this.notify({type:"continuePlaying",playlistNextStartTime:this.lastMetadata.playlistNextStartTime}):((s=this.logger)==null||s.trace("onEnded"),this.notify({type:"ended",raw:i}))},this.playerElement.onerror=()=>{Pn.info(`[${Rn.Streaming}] Native Hls Player: On Error Event`)},this.playerElement.onloadstart=i=>{var s;Pn.info(`[${Rn.Streaming}] Native Hls Player: On Load Start Event`),(s=this.logger)==null||s.trace("onLoadStart"),r=0,this.ignoreNextLoadingEvent===!0?this.ignoreNextLoadingEvent=!1:(this.stalled=!0,this.notify({type:"loading",raw:i}))},this.playerElement.onloadedmetadata=i=>{var s;Pn.info(`[${Rn.Streaming}] Native Hls Player: On Loaded Metadata Event`),(s=this.logger)==null||s.trace("onLoadedMetadata"),!this.silentAudioInProgress&&this.playerElement.readyState>=0&&this.notify({type:"loaded",raw:i})},this.playerElement.onpause=i=>{var s;if(Pn.info(`[${Rn.Streaming}] Native Hls Player: On Pause Event`),this.lastMetadata.playlistNextStartTime&&this.playerElement.currentTime>=this.playerElement.duration){this.notify({type:"continuePlaying",playlistNextStartTime:this.lastMetadata.playlistNextStartTime});return}else(s=this.logger)==null||s.trace("onPause"),this.notify({type:"paused",raw:i})},this.playerElement.onemptied=i=>{var s;Pn.info(`[${Rn.Streaming}] Native Hls Player: On Emptied Event`),(s=this.logger)==null||s.trace("onEmptied"),this.notify({type:"paused",raw:i})},this.playerElement.onplaying=i=>{var s;(s=this.logger)==null||s.trace("onPlaying"),this.stalled=!1,this.notify({type:"playing",raw:i})},this.playerElement.onseeked=()=>{var i;(i=this.logger)==null||i.trace("onSeeked"),r=0},this.playerElement.onstalled=i=>{var s;Pn.info(`[${Rn.Streaming}] Native Hls Player: On Stalled Event`),(s=this.logger)==null||s.trace("onStalled"),this.stalled=!0,this.notify({type:"loading",raw:i})},this.playerElement.onwaiting=i=>{var s;Pn.info(`[${Rn.Streaming}] Native Hls Player: On Waiting Event`),(s=this.logger)==null||s.trace("onWaiting"),this.stalled=!0,this.backOnline===!0&&(this.backOnline=!1),this.notify({type:"loading",raw:i})},this.playerElement.ontimeupdate=i=>{var o,l,u;(o=this.logger)==null||o.trace("onTimeUpdate"),this.stalled&&(this.stalled=!1,this.notify({type:"playing",raw:i}));const s=this.playerElement.currentTime;(!this.currentTimeDelta||this.currentTimeDelta>s)&&(this.currentTimeDelta=s);const a=s+this.exclusiveStationOffset-this.currentTimeDelta;if((u=(l=this.deferredMetadata)==null?void 0:l[0])!=null&&u.time&&a>=this.deferredMetadata[0].time){const c=this.deferredMetadata.shift();this.notify({type:"metadata",...c==null?void 0:c.data,raw:c==null?void 0:c.data})}s>=r&&(!this.ignoreZeroUpdateEvent||s!==0)&&(this.ignoreZeroUpdateEvent=!1,r=s+n,this.notify({type:"update",time:s,duration:this.playerElement.duration,raw:i})),this.ignoreZeroUpdateEvent=!1},this.playerElement.textTracks.addEventListener("addtrack",i=>{Pn.info(`[${Rn.Streaming}] Native Hls Player: Add Track Event`);const s=i.track;s&&(s.mode="hidden",s.addEventListener("cuechange",a=>{if(Pn.info(`[${Rn.Streaming}] Native Hls Player: Cue Change Event`),!(a!=null&&a.target))return;const o=a.target.activeCues;if(!o||o.length===0)return;const l={},u=this.getCurrentTime();for(let c=0;c<=o.length-1;c++){const d=o[c];if(d.value.key==="PRIV"&&d.value.info==="amperwave.metadata"&&d.startTime<=u){const h=d.value.data;if(!h)continue;const g=new Uint8Array(h),v=String.fromCharCode.apply(null,g);v&&this.parseHlsMetadata(v)}else{const{key:h,data:g}=d.value;l[h]||(l[h]=g)}}if(Object.values(l).length){const c={...this.currentMetadata,...l};this.currentMetadata=c,this.parseHlsMetadata(JSON.stringify(c))}}))})}handleServiceWorkerMessages(){navigator.serviceWorker.onmessage=e=>{e.data==="Allow Skips"&&(this.allowSkips=!0)}}parseHlsMetadata(e){var n,r;(n=this.logger)==null||n.trace("parseHlsMetadata");try{const i=Qye(JSON.parse(e));if(this.lastMetadata.songOrShow!==i.songOrShow||this.lastMetadata.artist!==i.artist||this.lastMetadata.image!==i.image||this.lastMetadata.companionAdIframeUrl!==i.companionAdIframeUrl||this.lastMetadata.trackStart!==i.trackStart||this.lastMetadata.isLive!==i.isLive||this.lastMetadata.isRewindable!==i.isRewindable||this.lastMetadata.playlistNextStartTime!==i.playlistNextStartTime||this.lastMetadata.playlistTailStartTime!==i.playlistTailStartTime||this.lastMetadata.liveTime!==i.liveTime){if(this.lastMetadata={contentType:this.lastMetadata.contentType,...i},this.vodFeatureEnabled){const{isLive:s,datumTime:a}=this.lastMetadata;s||Jye(this.lastMetadata)&&a&&(this.notify({type:"continuePlaying",playlistNextStartTime:a,playLive:!0}),this.lastMetadata.isLive=!0);const o=Qh(this.lastMetadata.contentType);this.lastMetadata.isLive||o?this.playerElement.playbackRate=this.defaultSpeed:this.playerElement.playbackRate=this.ctxRate}this.isExclusiveStation?this.deferredMetadata.push({data:i,time:i.segmentStartTime}):this.notify({type:"metadata",...i,raw:e})}}catch{(r=this.logger)==null||r.error("Error parsing hls metadata: "+e)}}play(){var e;Pn.info(`[${Rn.Streaming}] Native Hls Player: Play Event`),(e=this.logger)==null||e.trace("play"),this.playerElement.play()}playWithOffset(e){var n;Pn.info(`[${Rn.Streaming}] Native Hls Player: Play With Offset Event`),(n=this.logger)==null||n.trace("playWithOffset"),e!==void 0&&this.setPosition(e),this.play()}stop(){var e;Pn.info(`[${Rn.Streaming}] Native Hls Player: Stop`),(e=this.logger)==null||e.trace("stop"),this.pause(),this.playerElement.src=this.playerElement.src,this.ignoreNextLoadingEvent=!0,this.ignoreZeroUp
685dateEvent=!0,this.playerElement.src=""}load(e){var n;if(Pn.info(`[${Rn.Streaming}] Native Hls Player: Load`),(n=this.logger)==null||n.trace("load"),this.lastMetadata={},this.deferredMetadata=[],this.currentMetadata={},this.stop(),this.playerElement.defaultPlaybackRate=this.defaultSpeed,this.notify({type:"loading",raw:{url:e.url}}),this.playerElement.src=e.url,this.silentAudioInProgress&&(this.silentAudioInProgress=!1),this.isExclusiveStation=e.url.includes("smartstreams.radio.com"),this.isExclusiveStation){const i=new URL(e.url).searchParams.get("playlistOffset");this.exclusiveStationOffset=i?Math.floor(Number(i)):0,this.currentTimeDelta=void 0}}playPrerollInProgress(){}setVolume(e){var n;isNaN(e)?(n=this.logger)==null||n.error("Trying to set volume to something not a number = "+e):this.playerElement.volume=e}silentAudioHack(){var n;Pn.info(`[${Rn.Streaming}] Native Hls Player: Silent Audio Detection`),typeof document<"u"&&U9()&&!this.silentAudioPlayed&&((n=this.logger)==null||n.trace("silentAudioHack"),this.ignoreNextLoadingEvent=!0,this.silentAudioInProgress=!0,this.playerElement.defaultPlaybackRate=this.defaultSpeed,this.playerElement.src=fle,this.playerElement.load(),this.silentAudioPlayed=!0)}}const LLt=Yn({default:rg.OPT_IN,key:"adTargetingState"});function DLt(t){return{href:t.href,protocol:t.protocol,username:t.username,password:t.password,host:t.host,hostname:t.hostname,port:t.port,pathname:t.pathname,search:t.search,searchParams:[...t.searchParams].map(([e,n])=>({key:e,value:n})),hash:t.hash,origin:t.origin}}const T6={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function A6(t,e,n,r=!1){const i=String(e),s=(l,u)=>`\x1B[${u[0]}m${l}\x1B[${u[1]}m`,a=(l,u)=>u!=null&&typeof u=="string"?s(l,T6[u]):u!=null&&Array.isArray(u)?u.reduce((c,d)=>a(c,d),l):u!=null&&u[l.trim()]!=null?a(l,u[l.trim()]):u!=null&&u["*"]!=null?a(l,u["*"]):l,o=null;return i.replace(/{{(.+?)}}/g,(l,u)=>{var d;const c=n[u]!=null?String(n[u]):r?"":l;return t.stylePrettyLogs?a(c,((d=t==null?void 0:t.prettyLogStyles)==null?void 0:d[u])??o)+s("",T6.reset):c})}function rd(t,e=2,n=0){return t!=null&&isNaN(t)?"":(t=t!=null?t+n:t,e===2?t==null?"--":t<10?"0"+t:t.toString():t==null?"---":t<10?"00"+t:t<100?"0"+t:t.toString())}function t0e(t,e){var o,l,u,c,d,f,h,g,v,b,S,A,w,x,P,N,k,U,H;if(e==null)return{text:"",template:t.prettyLogTemplate,placeholders:{}};let n=t.prettyLogTemplate;const r={};n.includes("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}")?n=n.replace("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}","{{dateIsoStr}}"):t.prettyLogTimeZone==="UTC"?(r.yyyy=((o=e.date)==null?void 0:o.getUTCFullYear())??"----",r.mm=rd((l=e.date)==null?void 0:l.getUTCMonth(),2,1),r.dd=rd((u=e.date)==null?void 0:u.getUTCDate(),2),r.hh=rd((c=e.date)==null?void 0:c.getUTCHours(),2),r.MM=rd((d=e.date)==null?void 0:d.getUTCMinutes(),2),r.ss=rd((f=e.date)==null?void 0:f.getUTCSeconds(),2),r.ms=rd((h=e.date)==null?void 0:h.getUTCMilliseconds(),3)):(r.yyyy=((g=e.date)==null?void 0:g.getFullYear())??"----",r.mm=rd((v=e.date)==null?void 0:v.getMonth(),2,1),r.dd=rd((b=e.date)==null?void 0:b.getDate(),2),r.hh=rd((S=e.date)==null?void 0:S.getHours(),2),r.MM=rd((A=e.date)==null?void 0:A.getMinutes(),2),r.ss=rd((w=e.date)==null?void 0:w.getSeconds(),2),r.ms=rd((x=e.date)==null?void 0:x.getMilliseconds(),3));const i=t.prettyLogTimeZone==="UTC"?e.date:e.date!=null?new Date(e.date.getTime()-e.date.getTimezoneOffset()*6e4):void 0;r.rawIsoStr=(i==null?void 0:i.toISOString())??"",r.dateIsoStr=(i==null?void 0:i.toISOString().replace("T"," ").replace("Z",""))??"",r.logLevelName=e.logLevelName,r.fileNameWithLine=((P=e.path)==null?void 0:P.fileNameWithLine)??"",r.filePathWithLine=((N=e.path)==null?void 0:N.filePathWithLine)??"",r.fullFilePath=((k=e.path)==null?void 0:k.fullFilePath)??"";let s=(U=t.parentNames)==null?void 0:U.join(t.prettyErrorParentNamesSeparator);s=s!=null&&e.name!=null?s+t.prettyErrorParentNamesSeparator:void 0;const a=e.name!=null||s!=null?`${s??""}${e.name??""}`:"";return r.name=a,r.nameWithDelimiterPrefix=a.length>0?t.prettyErrorLoggerNameDelimiter+a:"",r.nameWithDelimiterSuffix=a.length>0?a+t.prettyErrorLoggerNameDelimiter:"",((H=t.overwrite)==null?void 0:H.addPlaceholders)!=null&&t.overwrite.addPlaceholders(e,r),{text:A6(t,n,r),template:n,placeholders:r}}const n0e=[/(?:^|[\\/])node_modules[\\/].*tslog/i,/(?:^|[\\/])deps[\\/].*tslog/i,/tslog[\\/]+src[\\/]+internal[\\/]/i,/tslog[\\/]+src[\\/]BaseLogger/i,/tslog[\\/]+src[\\/]index/i];function kLt(t){const e=typeof(t==null?void 0:t.stack)=="string"?t.stack:void 0;return e==null||e.length===0?[]:e.split(`
686`).map(n=>n.trimEnd())}function NLt(t){return t.filter(e=>e.length>0&&!/^\s*Error\b/.test(e))}function MLt(t,e){const n=[];for(const r of t){const i=e(r);i!=null&&n.push(i)}return n}function FLt(t,e=n0e){for(let n=0;n<t.length;n+=1){const r=t[n],i=r.filePath??"",s=r.fullFilePath??"";
686if(!e.some(a=>a.test(i)||a.test(s)))return n}return 0}function $Lt(t){return NLt(kLt(t))}function Z5(t,e){return MLt($Lt(t),e)}function pte(t,e){return t<0?0:t>=e?Math.max(0,e-1):t}function gte(){return[...n0e]}const BLt=5;function ULt(t,e={}){const n=e.maxDepth??BLt,r=[],i=new Set;let s=t,a=0;for(;s!=null&&a<n;){const o=s==null?void 0:s.cause;if(o==null||i.has(o))break;i.add(o),r.push(r0e(o)),s=o,a+=1}return r}function r0e(t){if(t instanceof Error)return t;const e=new Error(typeof t=="string"?t:JSON.stringify(t));return typeof t=="object"&&t!=null&&Object.assign(e,t),e}function i0e(t){const e=new Set;return JSON.stringify(t,(n,r)=>{if(typeof r=="object"&&r!==null){if(e.has(r))return"[Circular]";e.add(r)}return typeof r=="bigint"?`${r}`:typeof r>"u"?"[undefined]":r})}function _l(t,e){const n={seen:[],stylize:s0e};return e!=null&&u0e(n,e),yE(n.showHidden)&&(n.showHidden=!1),yE(n.depth)&&(n.depth=2),yE(n.colors)&&(n.colors=!0),yE(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=HLt),GD(n,t,n.depth)}_l.colors=T6;_l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function VLt(t){return typeof t=="boolean"}function yE(t){return t===void 0}function s0e(t){return t}function HLt(t,e){var r,i,s,a;const n=_l.styles[e];return n!=null&&((i=(r=_l==null?void 0:_l.colors)==null?void 0:r[n])==null?void 0:i[0])!=null&&((a=(s=_l==null?void 0:_l.colors)==null?void 0:s[n])==null?void 0:a[1])!=null?"\x1B["+_l.colors[n][0]+"m"+t+"\x1B["+_l.colors[n][1]+"m":t}function nP(t){return typeof t=="function"}function a0e(t){return typeof t=="string"}function jLt(t){return typeof t=="number"}function o0e(t){return t===null}function l0e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Q5(t){return DN(t)&&rj(t)==="[object RegExp]"}function DN(t){return typeof t=="object"&&t!==null}function X5(t){return DN(t)&&(rj(t)==="[object Error]"||t instanceof Error)}function mte(t){return DN(t)&&rj(t)==="[object Date]"}function rj(t){return Object.prototype.toString.call(t)}function zLt(t){const e={};return t.forEach(n=>{e[n]=!0}),e}function GLt(t,e,n,r,i){const s=[];for(let a=0,o=e.length;a<o;++a)l0e(e,String(a))?s.push(w6(t,e,n,r,String(a),!0)):s.push("");return i.forEach(a=>{a.match(/^\d+$/)||s.push(w6(t,e,n,r,a,!0))}),s}function J5(t){return"["+Error.prototype.toString.call(t)+"]"}function GD(t,e,n=0){if(t.customInspect&&e!=null&&nP(e)&&(e==null?void 0:e.inspect)!==_l&&!(e!=null&&e.constructor&&(e==null?void 0:e.constructor.prototype)===e)){if(typeof e.inspect!="function"&&e.toString!=null)return e.toString();let c=e==null?void 0:e.inspect(n,t);return a0e(c)||(c=GD(t,c,n)),c}const r=Am(t,e);if(r)return r;let i=Object.keys(e);const s=zLt(i);try{t.showHidden&&Object.getOwnPropertyNames&&(i=Object.getOwnPropertyNames(e))}catch{}if(X5(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return J5(e);if(i.length===0)if(nP(t.stylize)){if(nP(e)){const c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(Q5(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(mte(e))return t.stylize(Date.prototype.toISOString.call(e),"date");if(X5(e))return J5(e)}else return e;let a="",o=!1,l=[`{
687`,`
688}`];if(Array.isArray(e)&&(o=!0,l=[`[
689`,`
690]`]),nP(e)&&(a=" [Function"+(e.name?": "+e.name:"")+"]"),Q5(e)&&(a=" "+RegExp.prototype.toString.call(e)),mte(e)&&(a=" "+Date.prototype.toUTCString.call(e)),X5(e)&&(a=" "+J5(e)),i.length===0&&(!o||e.length==0))return l[0]+a+l[1];if(n<0)return Q5(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);let u;return o?u=GLt(t,e,n,s,i):u=i.map(c=>w6(t,e,n,s,c,o)),t.seen.pop(),WLt(u,a,l)}function w6(t,e,n,r,i,s){let a,o,l={value:void 0};try{l.value=e[i]}catch{}try{Object.getOwnPropertyDescriptor&&(l=Object.getOwnPropertyDescriptor(e,i)||l)}catch{}if(l.get?l.set?o=t.stylize("[Getter/Setter]","special"):o=t.stylize("[Getter]","special"):l.set&&(o=t.stylize("[Setter]","special")),l0e(r,i)||(a="["+i+"]"),o||(t.seen.indexOf(l.value)<0?(o0e(n)?o=GD(t,l.value,void 0):o=GD(t,l.value,n-1),o.indexOf(`
691`)>-1&&(s?o=o.split(`
692`).map(u=>"  "+u).join(`
693`).substr(2):o=`
694`+o.split(`
695`).map(u=>"   "+u).join(`
696`))):o=t.stylize("[Circular]","special")),yE(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,"\\'").replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+o}function Am(t,e){if(yE(e))return t.stylize("undefined","undefined");if(a0e(e)){const n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\\'")+"'";return t.stylize(n,"string")}if(jLt(e))return t.stylize(""+e,"number");if(VLt(e))return t.stylize(""+e,"boolean");if(o0e(e))return t.stylize("null","null")}function WLt(t,e,n){return n[0]+(e===""?"":e+`
697`)+"  "+t.join(`,
698  `)+" "+n[1]}function u0e(t,e){const n={...t};if(!e||!DN(e))return t;const r={...e},i=Object.keys(e);let s=i.length;for(;s--;)n[i[s]]=r[i[s]];return n}function qLt(t,...e){const n={seen:[],stylize:s0e};t!=null&&u0e(n,t);const r=e[0];let i=0,s="",a="";if(typeof r=="string"){if(e.length===1)return r;let o,l=0;for(let u=0;u<r.length-1;u++)if(r.charCodeAt(u)===37){const c=r.charCodeAt(++u);if(i+1!==e.length){switch(c){case 115:{const d=e[++i];typeof d=="number"||typeof d=="bigint"?o=Am(n,d):typeof d!="object"||d===null?o=String(d):o=_l(d,{...t,compact:3,colors:!1,depth:0});break}case 106:o=i0e(e[++i]);break;case 100:{const d=e[++i];typeof d=="bigint"?o=Am(n,d):typeof d=="symbol"?o="NaN":o=Am(n,d);break}case 79:o=_l(e[++i],t);break;case 111:o=_l(e[++i],{...t,showHidden:!0,showProxy:!0,depth:4});break;case 105:{const d=e[++i];typeof d=="bigint"?o=Am(n,d):typeof d=="symbol"?o="NaN":o=Am(n,parseInt(o));break}case 102:{const d=e[++i];typeof d=="symbol"?o="NaN":o=Am(n,parseInt(d));break}case 99:i+=1,o="";break;case 37:s+=r.slice(l,u),l=u+1;continue;default:continue}l!==u-1&&(s+=r.slice(l,u-1)),s+=o,l=u+1}else c===37&&(s+=r.slice(l,u),l=u+1)}l!==0&&(i++,a=" ",l<r.length&&(s+=r.slice(l)))}for(;i<e.length;){const o=e[i];s+=a,s+=typeof o!="string"?_l(o,t):o,a=" ",i++}return s}function KLt(){try{const t=globalThis==null?void 0:globalThis.process;if(typeof(t==null?void 0:t.cwd)=="function")return t.cwd()}catch{}try{const t=globalThis==null?void 0:globalThis.Deno;if(typeof(t==null?void 0:t.cwd)=="function")return t.cwd()}catch{}}function c0e(){return typeof window<"u"&&typeof document<"u"}function YLt(){var r,i;if(!c0e())return!1;const t=globalThis==null?void 0:globalThis.navigator,e=(t==null?void 0:t.userAgent)??"";if(/firefox/i.test(e))return!0;const n=globalThis;
698return(i=(r=n==null?void 0:n.CSS)==null?void 0:r.supports)!=null&&i.call(r,"color","#000")?!0:/safari/i.test(e)&&!/chrome/i.test(e)}function ZLt(){const t=U(),e=x(t),n=t.name==="browser"||t.name==="worker",r=n?[...gte(),/node_modules[\\/].*tslog/i]:[...gte(),/node:(?:internal|vm)/i,/\binternal[\\/]/i];let i;const s={getMeta(C,L,V,j,X,G){return Object.assign({},e,{name:X,parentNames:G,date:new Date,logLevelId:C,logLevelName:L,path:j?void 0:s.getCallerStackFrame(V)})},getCallerStackFrame(C,L=new Error){const V=Z5(L,ie=>a(ie));if(V.length===0)return{};const j=FLt(V,r),X=Number.isFinite(C)&&C>=0,G=pte(X?C:j,V.length);return V[G]??{}},getErrorTrace(C){return Z5(C,L=>a(L))},isError(C){return Z(C)},isBuffer(C){return typeof Buffer<"u"&&typeof Buffer.isBuffer=="function"?Buffer.isBuffer(C):!1},prettyFormatLogObj(C,L){return C.reduce((V,j)=>(s.isError(j)?V.errors.push(s.prettyFormatErrorObj(j,L)):V.args.push(j),V),{args:[],errors:[]})},prettyFormatErrorObj(C,L){const V=u(s.getErrorTrace(C),L),j=ULt(C).map((G,ie)=>{const ae=`Caused by (${ie+1}): ${G.name??"Error"}${G.message?`: ${G.message}`:""}`,ue=u(Z5(G,Q=>a(Q)),L);return[ae,...ue].join(`
699`)}),X={errorName:` ${C.name} `,errorMessage:c(C),errorStack:[...V,...j].join(`
700`)};return A6(L,L.prettyErrorTemplate,X)},transportFormatted(C,L,V,j,X){const G=X.stylePrettyLogs!==!1,ie=(V.length>0&&L.length>0?`
701`:"")+V.join(`
702`),ae=f(C),ue=G?C:ae;if(d(G)){X.prettyInspectOptions.colors=!1;const de=P(X.prettyInspectOptions,L),le=j!=null?h(X,j):{text:ae,styles:[]},ye=le.text.length>0&&le.styles.length>0,We=(ye?le.text:ae)+de+ie;ye?console.log(We,...le.styles):console.log(We);return}X.prettyInspectOptions.colors=G;const Q=P(X.prettyInspectOptions,L);console.log(ue+Q+ie)},transportJSON(C){console.log(i0e(C))}};return q()==="test"&&(s.__resetWorkingDirectoryCacheForTests=()=>{i=void 0}),s;function a(C){return n?l(C):o(C)}function o(C){if(typeof C!="string"||C.length===0)return;const L=C.trim();if(!L.includes(" at ")&&!L.startsWith("at "))return;const V=L.replace(/^at\s+/,"");let j,X=V;const G=V.match(/^(.*?)\s+\((.*)\)$/);G&&(j=G[1],X=G[2]);const ie=X.replace(/^\(/,"").replace(/\)$/,""),ae=ie.replace(/\?.*$/,"");let ue,Q,de=ae;const le=ae.split(":");le.length>=3&&/^\d+$/.test(le[le.length-1]??"")?(Q=le.pop(),ue=le.pop(),de=le.join(":")):le.length>=2&&/^\d+$/.test(le[le.length-1]??"")&&(ue=le.pop(),de=le.join(":"));let ye=de.replace(/^file:\/\//,"");const fe=S();fe!=null&&ye.startsWith(fe)&&(ye=ye.slice(fe.length),ye=ye.replace(/^[\\/]/,"")),ye.length===0&&(ye=de);const We=k(ye),Le=We.length>0?We:ye,Ve=Le.split(/\\|\//),at=Ve[Ve.length-1],Et=at&&ue?`${at}:${ue}`:void 0,ne=Le&&ue?`${Le}:${ue}`:void 0;return{fullFilePath:ie,fileName:at,fileNameWithLine:Et,fileColumn:Q,fileLine:ue,filePath:Le,filePathWithLine:ne,method:j}}function l(C){var ue,Q;const L=(ue=globalThis.location)==null?void 0:ue.origin;if(C==null)return;const V=C.match(eDt);if(!V)return;const j=(Q=V[1])==null?void 0:Q.replace(/\?.*$/,"");if(j==null)return;const X=j.split("/"),G=V[2],ie=V[3],ae=X[X.length-1];return{fullFilePath:L?`${L}${j}`:j,fileName:ae,fileNameWithLine:ae&&G?`${ae}:${G}`:void 0,fileColumn:ie,fileLine:G,filePath:j,filePathWithLine:G?`${j}:${G}`:void 0,method:void 0}}function u(C,L){return C.map(V=>A6(L,L.prettyErrorStackTemplate,{...V},!0))}function c(C){return Object.getOwnPropertyNames(C).filter(L=>L!=="stack"&&L!=="cause").reduce((L,V)=>{const j=C[V];return typeof j=="function"||L.push(String(j)),L},[]).join(", ")}function d(C){return C&&(t.name==="browser"||t.name==="worker")&&YLt()}function f(C){return C.replace(QLt,"")}function h(C,L){var Q;if(L==null)return{text:"",styles:[]};const{template:V,placeholders:j}=t0e(C,L),X=[],G=[];let ie=0;const ae=/{{(.+?)}}/g;let ue;for(;(ue=ae.exec(V))!=null;){ue.index>ie&&X.push(V.slice(ie,ue.index));const de=ue[1],le=j[de]!=null?String(j[de]):"",ye=g((Q=C.prettyLogStyles)==null?void 0:Q[de],le),fe=v(ye);fe.length>0?(X.push(`%c${le}%c`),G.push(fe,"")):X.push(le),ie=ae.lastIndex}return ie<V.length&&X.push(V.slice(ie)),{text:X.join(""),styles:G}}function g(C,L){if(C==null)return[];if(typeof C=="string")return[C];if(Array.isArray(C))return C.flatMap(V=>g(V,L));if(typeof C=="object"){const V=L.trim(),j=C[V]??C["*"];return j==null?[]:g(j,L)}return[]}function v(C){const L=new Set,V=[];for(const j of C){const X=b(j);X!=null&&X.length>0&&!L.has(X)&&(L.add(X),V.push(X))}return V.join("; ")}function b(C){const L=XLt[C];if(L!=null)return`color: ${L}`;const V=JLt[C];if(V!=null)return`background-color: ${V}`;switch(C){case"bold":return"font-weight: bold";case"dim":return"opacity: 0.75";case"italic":return"font-style: italic";case"underline":return"text-decoration: underline";case"overline":return"text-decoration: overline";case"inverse":return"filter: invert(1)";case"hidden":return"visibility: hidden";case"strikethrough":return"text-decoration: line-through";default:return}}function S(){return i===void 0&&(i=KLt()??null),i??void 0}function A(){return t.name==="node"||t.name==="deno"||t.name==="bun"}function w(){return t.name==="node"||t.name==="deno"||t.name==="bun"}function x(C){if(C.name==="browser"||C.name==="worker")return{runtime:C.name,browser:C.userAgent};const L={runtime:C.name};return w()&&(L.runtimeVersion=C.version??"unknown"),A()&&(L.hostname=C.hostname??"unknown"),L}function P(C,L){try{return qLt(C,...L)}catch{return L.map(N).join(" ")}}function N(C){if(typeof C=="string")return C;try{return JSON.stringify(C)}catch{return String(C)}}function k(C){if(typeof C!="string"||C.length===0)return C;const L=C.replace(/\\+/g,"\\").replace(/\\/g,"/"),V=L.startsWith("//"),j=L.startsWith("/")&&!V,X=L.match(/^[A-Za-z]:/),G=X?X[0]:"",ae=(G?L.slice(G.length):L).split("/"),ue=[];for(const de of ae)if(!(de===""||de===".")){if(de===".."){ue.length>0&&ue.pop();continue}ue.push(de)}let Q=ue.join("/");return V?Q=`//${Q}`:j?Q=`/${Q}`:G!==""&&(Q=`${G}${Q.length>0?`/${Q}`:""}`),Q.length===0?C:Q}function U(){var V,j,X,G,ie,ae,ue,Q,de;if(c0e()){const le=globalThis.navigator;return{name:"browser",userAgent:le==null?void 0:le.userAgent}}const C=globalThis;if(typeof C.importScripts=="function")return{name:"worker",userAgent:(V=C.navigator)==null?void 0:V.userAgent};const L=globalThis;if(L.Bun!=null){const le=L.Bun.version;return{name:"bun",version:le!=null?`bun/${le}`:void 0,hostname:H(L.process,L.Deno,L.Bun,L.location)}}if(L.Deno!=null){const le=B(L.Deno),ye=(X=(j=L.Deno)==null?void 0:j.version)==null?void 0:X.deno;return{name:"deno",version:ye!=null?`deno/${ye}`:void 0,hostname:le??H(L.process,L.Deno,L.Bun,L.location)}}
702return((ie=(G=L.process)==null?void 0:G.versions)==null?void 0:ie.node)!=null||((ae=L.process)==null?void 0:ae.version)!=null?{name:"node",version:((Q=(ue=L.process)==null?void 0:ue.versions)==null?void 0:Q.node)??((de=L.process)==null?void 0:de.version),hostname:H(L.process,L.Deno,L.Bun,L.location)}:L.process!=null?{name:"node",version:"unknown",hostname:H(L.process,L.Deno,L.Bun,L.location)}:{name:"unknown"}}function H(C,L,V,j){var ie,ae,ue,Q,de,le,ye;const X=((ie=C==null?void 0:C.env)==null?void 0:ie.HOSTNAME)??((ae=C==null?void 0:C.env)==null?void 0:ae.HOST)??((ue=C==null?void 0:C.env)==null?void 0:ue.COMPUTERNAME);if(X!=null&&X.length>0)return X;const G=((Q=V==null?void 0:V.env)==null?void 0:Q.HOSTNAME)??((de=V==null?void 0:V.env)==null?void 0:de.HOST)??((le=V==null?void 0:V.env)==null?void 0:le.COMPUTERNAME);if(G!=null&&G.length>0)return G;try{const fe=(ye=L==null?void 0:L.env)==null?void 0:ye.get;if(typeof fe=="function"){const We=fe("HOSTNAME");if(We!=null&&We.length>0)return We}}catch{}if((j==null?void 0:j.hostname)!=null&&j.hostname.length>0)return j.hostname}function B(C){var V;try{if(typeof(C==null?void 0:C.hostname)=="function"){const j=C.hostname();if(j!=null&&j.length>0)return j}}catch{}const L=(V=globalThis.location)==null?void 0:V.hostname;if(L!=null&&L.length>0)return L}function q(){var L;const C=globalThis==null?void 0:globalThis.process;return(L=C==null?void 0:C.env)==null?void 0:L.NODE_ENV}function Z(C){if(C instanceof Error)return!0;if(C!=null&&typeof C=="object"){const L=Object.prototype.toString.call(C);if(/\[object .*Error\]/.test(L))return!0;const V=C.name;if(typeof V=="string"&&V.endsWith("Error"))return!0}return!1}}const QLt=/\u001b\[[0-9;]*m/g,XLt={black:"#000000",red:"#ef5350",green:"#66bb6a",yellow:"#fdd835",blue:"#42a5f5",magenta:"#ab47bc",cyan:"#26c6da",white:"#fafafa",blackBright:"#424242",redBright:"#ff7043",greenBright:"#81c784",yellowBright:"#ffe082",blueBright:"#64b5f6",magentaBright:"#ce93d8",cyanBright:"#4dd0e1",whiteBright:"#ffffff"},JLt={bgBlack:"#000000",bgRed:"#ef5350",bgGreen:"#66bb6a",bgYellow:"#fdd835",bgBlue:"#42a5f5",bgMagenta:"#ab47bc",bgCyan:"#26c6da",bgWhite:"#fafafa",bgBlackBright:"#424242",bgRedBright:"#ff7043",bgGreenBright:"#81c784",bgYellowBright:"#ffe082",bgBlueBright:"#64b5f6",bgMagentaBright:"#ce93d8",bgCyanBright:"#4dd0e1",bgWhiteBright:"#ffffff"},eDt=/(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/,nf=ZLt();class tDt{constructor(e,n,r=Number.NaN){var i,s,a,o,l,u,c,d;this.logObj=n,this.stackDepthLevel=r,this.runtime=nf,this.maxErrorCauseDepth=5,this.settings={type:(e==null?void 0:e.type)??"pretty",name:e==null?void 0:e.name,parentNames:e==null?void 0:e.parentNames,minLevel:(e==null?void 0:e.minLevel)??0,argumentsArrayName:e==null?void 0:e.argumentsArrayName,hideLogPositionForProduction:(e==null?void 0:e.hideLogPositionForProduction)??!1,prettyLogTemplate:(e==null?void 0:e.prettyLogTemplate)??"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}	{{logLevelName}}	{{filePathWithLine}}{{nameWithDelimiterPrefix}}	",prettyErrorTemplate:(e==null?void 0:e.prettyErrorTemplate)??`
703{{errorName}} {{errorMessage}}
704error stack:
705{{errorStack}}`,prettyErrorStackTemplate:(e==null?void 0:e.prettyErrorStackTemplate)??`  • {{fileName}}	{{method}}
706	{{filePathWithLine}}`,prettyErrorParentNamesSeparator:(e==null?void 0:e.prettyErrorParentNamesSeparator)??":",prettyErrorLoggerNameDelimiter:(e==null?void 0:e.prettyErrorLoggerNameDelimiter)??"	",stylePrettyLogs:(e==null?void 0:e.stylePrettyLogs)??!0,prettyLogTimeZone:(e==null?void 0:e.prettyLogTimeZone)??"UTC",prettyLogStyles:(e==null?void 0:e.prettyLogStyles)??{logLevelName:{"*":["bold","black","bgWhiteBright","dim"],SILLY:["bold","white"],TRACE:["bold","whiteBright"],DEBUG:["bold","green"],INFO:["bold","blue"],WARN:["bold","yellow"],ERROR:["bold","red"],FATAL:["bold","redBright"]},dateIsoStr:"white",filePathWithLine:"white",name:["white","bold"],nameWithDelimiterPrefix:["white","bold"],nameWithDelimiterSuffix:["white","bold"],errorName:["bold","bgRedBright","whiteBright"],fileName:["yellow"],fileNameWithLine
706:"white"},prettyInspectOptions:(e==null?void 0:e.prettyInspectOptions)??{colors:!0,compact:!1,depth:1/0},metaProperty:(e==null?void 0:e.metaProperty)??"_meta",maskPlaceholder:(e==null?void 0:e.maskPlaceholder)??"[***]",maskValuesOfKeys:(e==null?void 0:e.maskValuesOfKeys)??["password"],maskValuesOfKeysCaseInsensitive:(e==null?void 0:e.maskValuesOfKeysCaseInsensitive)??!1,maskValuesRegEx:e==null?void 0:e.maskValuesRegEx,prefix:[...(e==null?void 0:e.prefix)??[]],attachedTransports:[...(e==null?void 0:e.attachedTransports)??[]],overwrite:{mask:(i=e==null?void 0:e.overwrite)==null?void 0:i.mask,toLogObj:(s=e==null?void 0:e.overwrite)==null?void 0:s.toLogObj,addMeta:(a=e==null?void 0:e.overwrite)==null?void 0:a.addMeta,addPlaceholders:(o=e==null?void 0:e.overwrite)==null?void 0:o.addPlaceholders,formatMeta:(l=e==null?void 0:e.overwrite)==null?void 0:l.formatMeta,formatLogObj:(u=e==null?void 0:e.overwrite)==null?void 0:u.formatLogObj,transportFormatted:(c=e==null?void 0:e.overwrite)==null?void 0:c.transportFormatted,transportJSON:(d=e==null?void 0:e.overwrite)==null?void 0:d.transportJSON}},this.captureStackForMeta=this._shouldCaptureStack()}log(e,n,...r){var h,g,v,b,S,A,w,x,P,N,k,U;if(e<this.settings.minLevel)return;const i=this._resolveLogArguments(r),s=[...this.settings.prefix,...i],a=((h=this.settings.overwrite)==null?void 0:h.mask)!=null?(g=this.settings.overwrite)==null?void 0:g.mask(s):this.settings.maskValuesOfKeys!=null&&this.settings.maskValuesOfKeys.length>0?this._mask(s):s,o=this.logObj!=null?this._recursiveCloneAndExecuteFunctions(this.logObj):void 0,l=((v=this.settings.overwrite)==null?void 0:v.toLogObj)!=null?(b=this.settings.overwrite)==null?void 0:b.toLogObj(a,o):this._toLogObj(a,o),u=((S=this.settings.overwrite)==null?void 0:S.addMeta)!=null?(A=this.settings.overwrite)==null?void 0:A.addMeta(l,e,n):this._addMetaToLogObj(l,e,n),c=u==null?void 0:u[this.settings.metaProperty];let d,f;if(((w=this.settings.overwrite)==null?void 0:w.formatMeta)!=null&&(d=(x=this.settings.overwrite)==null?void 0:x.formatMeta(u==null?void 0:u[this.settings.metaProperty])),((P=this.settings.overwrite)==null?void 0:P.formatLogObj)!=null&&(f=(N=this.settings.overwrite)==null?void 0:N.formatLogObj(a,this.settings)),this.settings.type==="pretty"&&(d=d??this._prettyFormatLogObjMeta(u==null?void 0:u[this.settings.metaProperty]),f=f??nf.prettyFormatLogObj(a,this.settings)),d!=null&&f!=null)if(((k=this.settings.overwrite)==null?void 0:k.transportFormatted)!=null){const H=this.settings.overwrite.transportFormatted,B=H.length;B<4?H(d,f.args,f.errors):B===4?H(d,f.args,f.errors,c):H(d,f.args,f.errors,c,this.settings)}else nf.transportFormatted(d,f.args,f.errors,c,this.settings);else((U=this.settings.overwrite)==null?void 0:U.transportJSON)!=null?this.settings.overwrite.transportJSON(u):this.settings.type!=="hidden"&&nf.transportJSON(u);return this.settings.attachedTransports!=null&&this.settings.attachedTransports.length>0&&this.settings.attachedTransports.forEach(H=>{H(u)}),u}attachTransport(e){this.settings.attachedTransports.push(e)}getSubLogger(e,n){var s,a,o;const r={...this.settings,...e,parentNames:((s=this.settings)==null?void 0:s.parentNames)!=null&&((a=this.settings)==null?void 0:a.name)!=null?[...this.settings.parentNames,this.settings.name]:((o=this.settings)==null?void 0:o.name)!=null?[this.settings.name]:void 0,prefix:[...this.settings.prefix,...(e==null?void 0:e.prefix)??[]]};return new this.constructor(r,n??this.logObj,this.stackDepthLevel)}_mask(e){const n=this._getMaskKeys();return e==null?void 0:e.map(r=>this._recursiveCloneAndMaskValuesOfKeys(r,n))}_getMaskKeys(){var r;const e=this.settings.maskValuesOfKeys??[],n=e.map(String).join("|");if(this.settings.maskValuesOfKeysCaseInsensitive===!0){if(((r=this.maskKeysCache)==null?void 0:r.source)===e&&this.maskKeysCache.caseInsensitive===!0&&this.maskKeysCache.signature===n)return this.maskKeysCache.normalized;const i=e.map(s=>typeof s=="string"?s.toLowerCase():String(s).toLowerCase());return this.maskKeysCache={source:e,caseInsensitive:!0,normalized:i,signature:n},i}return this.maskKeysCache={source:e,caseInsensitive:!1,normalized:e,signature:n},e}_resolveLogArguments(e){if(e.length===1&&typeof e[0]=="function"){const n=e[0];if(n.length===0){const r=n();return Array.isArray(r)?r:[r]}}return e}_recursiveCloneAndMaskValuesOfKeys(e,n,r=[]){var i,s;if(r.includes(e))return{...e};if(typeof e=="object"&&e!==null&&r.push(e),nf.isError(e)||nf.isBuffer(e))return e;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Array.isArray(e))return e.map(a=>this._recursiveCloneAndMaskValuesOfKeys(a,n,r));if(e instanceof Date)return new Date(e.getTime());if(e instanceof URL)return DLt(e);if(e!==null&&typeof e=="object"){const a=nf.isError(e)?this._cloneError(e):Object.create(Object.getPrototypeOf(e));return Object.getOwnPropertyNames(e).reduce((o,l)=>{var c;const u=((c=this.settings)==null?void 0:c.maskValuesOfKeysCaseInsensitive)!==!0?l:typeof l=="string"?l.toLowerCase():String(l).toLowerCase();return o[l]=n.includes(u)?this.settings.maskPlaceholder:(()=>{try{return this._recursiveCloneAndMaskValuesOfKeys(e[l],n,r)}catch{return null}})(),o},a)}else{if(typeof e=="string"){let a=e;for(const o of((i=this.settings)==null?void 0:i.maskValuesRegEx)||[])a=a.replace(o,((s=this.settings)==null?void 0:s.maskPlaceholder)||"");return a}return e}}_recursiveCloneAndExecuteFunctions(e,n=[]){return this.isObjectOrArray(e)&&n.includes(e)?this.shallowCopy(e):(this.isObjectOrArray(e)&&n.push(e),Array.isArray(e)?e.map(r=>this._recursiveCloneAndExecuteFunctions(r,n)):e instanceof Date?new Date(e.getTime()):this.isObject(e)?Object.getOwnPropertyNames(e).reduce((r,i)=>{const s=Object.getOwnPropertyDescriptor(e,i);if(s){Object.defineProperty(r,i,s);const a=e[i];r[i]=typeof a=="function"?a():this._recursiveCloneAndExecuteFunctions(a,n)}return r},Object.create(Object.getPrototypeOf(e))):e)}isObjectOrArray(e){return typeof e=="object"&&e!==null}isObject(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}shallowCopy(e){return Array.isArray(e)?[...e]:{...e}}_toLogObj(e,n={}){return e=e==null?void 0:e.map(r=>nf.isError(r)?this._toErrorObject(r):r),this.settings.argumentsArrayName==null?e.length===1&&!Array.isArray(e[0])&&nf.isBuffer(e[0])!==!0&&!(e[0]instanceof Date)?n=typeof e[0]=="object"&&e[0]!=null?{...e[0],...n}:{0:e[0],...n}:n={...n,...e}:n={...n,[this.settings.argumentsArrayName]:e},n}_cloneError(e){const n=new e.constructor;return Object.getOwnPropertyNames(e).forEach(r=>{n[r]=e[r]}),n}_toErrorObject(e,n=0,r=new Set){r.has(e)||r.add(e);const i={nativeError:e,name:e.name??"Error",message:e.message,stack:nf.getErrorTrace(e)};if(n>=this.maxErrorCauseDepth)return i;const s=e.cause;if(s!=null){const a=r0e(s);r.has(a)||(i.cause=this._toErrorObject(a,n+1,r))}return i}_addMetaToLogObj(e,n,r){return{...e,[this.settings.metaProperty]:nf.getMeta(n,r,this.stackDepthLevel,!this.captureStackForMeta,this.settings.name,this.settings.parentNames)}}_shouldCaptureStack(){if(this.settings.hideLogPositionForProduction)return!1;if(this.settings.type==="json")return!0;const e=this.settings.prettyLogTemplate??"";return!!/{{\s*(file(Name|Path|Line|PathWithLine|NameWithLine)|fullFilePath)\s*}}/.test(e)}_prettyFormatLogObjMeta(e){return t0e(this.settings,e).text}}class nDt extends tDt{constructor(e,n){const r=typeof window<"u"&&typeof document<"u",i={...e??{}};r&&(i.stylePrettyLogs=(e==null?void 0:e.stylePrettyLogs)??!0),super(i,n,Number.NaN)}log(e,n,...r){return super.log(e,n,...r)}silly(...e){return super.log(0,"SILLY",...e)}trace(...e){return super.log(1,"TRACE",...e)}debug(...e){return super.log(2,"DEBUG",...e)}info(...e){return super.log(3,"INFO",...e)}warn(...e){return super.log(4,"WARN",...e)}error(...e){return super.log(5,"ERROR",...e)}fatal(...e){return super.log(6,"FATAL",...e)}getSubLogger(e,n){return super.getSubLogger(e,n)}}const rDt="marketing",d0e=()=>{var t;try{return((t=window.DG_BANNER_API)==null?void 0:t.categoryEnabled(rDt))===!0}catch{return!1}},ij=t=>{const e=()=>t(d0e());window.dgEvent=window.dgEvent||[],window.dgEvent.push({event:"initial_preference_callback",params:e}),window.dgEvent.push({event:"preference_callback",params:e})};ol.API_ENV;const iDt=t=>{if(!window.googletag)return;
706let e={restrictDataProcessing:!1,childDirectedTreatment:!1,underAgeOfConsent:!1,limitedAds:!1,nonPersonalizedAds:!1};t!==SL.OPT_IN&&(e={...e,restrictDataProcessing:!0,limitedAds:!0,nonPersonalizedAds:!0}),window.googletag.cmd.push(()=>{window.googletag.pubads().setPrivacySettings(e)})};let f0e=!1,_6,vte=!1;const h0e=()=>navigator.globalPrivacyControl===!0,sDt=()=>f0e&&!h0e()&&_6!==rg.OPT_OUT&&_6!==rg.INELIGIBLE,C6=()=>{const t=sDt();Zh.disableTargetedAds=!t,iDt(t?SL.OPT_IN:SL.OPT_OUT)},aDt=()=>{C6(),!vte&&(vte=!0,ij(t=>{f0e=t,C6()}))},p0e=t=>{_6=t,C6()},oDt=[zn.FOLLOW,As.PLAY,zn.REGISTRATION_ENTRY,zn.REGISTRATION_SUCCESSFUL],lDt=t=>t.filter(n=>oDt.includes(n.type));var g0e={exports:{}};(function(t,e){(function(){var n=typeof Object.defineProperties=="function"?Object.defineProperty:function(D,F,K){return D==Array.prototype||D==Object.prototype||(D[F]=K.value),D};function r(D){D=[typeof globalThis=="object"&&globalThis,D,typeof window=="object"&&window,typeof self=="object"&&self,typeof Ys=="object"&&Ys];for(var F=0;F<D.length;++F){var K=D[F];if(K&&K.Math==Math)return K}throw Error("Cannot find global object")}var i=r(this);function s(D,F){if(F)e:{var K=i;D=D.split(".");for(var pe=0;pe<D.length-1;pe++){var Te=D[pe];if(!(Te in K))break e;K=K[Te]}D=D[D.length-1],pe=K[D],F=F(pe),F!=pe&&F!=null&&n(K,D,{configurable:!0,writable:!0,value:F})}}s("Array.prototype.includes",function(D){return D||function(F,K){var pe=this;pe instanceof String&&(pe=String(pe));var Te=pe.length;for(K=K||0,0>K&&(K=Math.max(K+Te,0));K<Te;K++){var tt=pe[K];if(tt===F||Object.is(tt,F))return!0}return!1}});function a(D,F,K){return D.call.apply(D.bind,arguments)}function o(D,F,K){if(!D)throw Error();if(2<arguments.length){var pe=Array.prototype.slice.call(arguments,2);return function(){var Te=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(Te,pe),D.apply(F,Te)}}return function(){return D.apply(F,arguments)}}function l(D,F,K){return l=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?a:o,l.apply(null,arguments)}function u(D){const F=[];return d(new c,D,F),F.join("")}function c(){}function d(D,F,K){if(F==null)K.push("null");else{if(typeof F=="object"){if(Array.isArray(F)){var pe=F;F=pe.length,K.push("[");for(var Te="",tt=0;tt<F;tt++)K.push(Te),d(D,pe[tt],K),Te=",";K.push("]");return}if(F instanceof String||F instanceof Number||F instanceof Boolean)F=F.valueOf();else{K.push("{"),Te="";for(pe in F)Object.prototype.hasOwnProperty.call(F,pe)&&(tt=F[pe],typeof tt!="function"&&(K.push(Te),g(pe,K),K.push(":"),d(D,tt,K),Te=","));K.push("}");return}}switch(typeof F){case"string":g(F,K);break;case"number":K.push(isFinite(F)&&!isNaN(F)?String(F):"null");break;case"boolean":K.push(String(F));break;case"function":K.push("null");break;default:throw Error("Unknown type: "+typeof F)}}}var f={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","\v":"\\u000b"},h=/\uffff/.test("ï¿¿")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function g(D,F){F.push('"',D.replace(h,function(K){let pe=f[K];return pe||(pe="\\u"+(K.charCodeAt(0)|65536).toString(16).slice(1),f[K]=pe),pe}),'"')}var v="https://api2.branch.io";function b(D){D=String(D);try{return JSON.parse(D)}catch{}throw Error("Invalid JSON string: "+D)}function S(D){try{return typeof JSON=="object"&&typeof JSON.stringify=="function"?JSON.stringify(D):u(D)}catch{}throw Error("Could not stringify object")}var A=!1,w=2,x=200,P=5e3,N="",k=6048e5,U={},H=null,B=typeof window<"u"&&!!(window.performance&&window.performance.timing&&window.performance.timing.navigationStart),q="",Z={"/v1/open":"","/v1/pageview":"","/v2/event/standard":"user_data","/v2/event/custom":"user_data"};function C(D){return D&&typeof D=="number"?(Date.now()-D).toString():null}var L={didClickJourneyClose:"Button(X)",didClickJourneyContinue:"Dismiss Journey text",didClickJourneyBackgroundDismiss:"Background Dismiss",didScrollJourneyBackgroundDismiss:"Background Dismiss"},V=!1,j=!1,X={"/v1/open":{link_identifier:"\\d+"},"/v1/pageview":{event:"pageview"},"/v1/dismiss":{event:"dismiss"},"/v1/url":{}},G=!1;function ie(D,F){var K=document.createElement("a");K.href=D,D=[v,"https://app.link","https://bnc.lt"];var pe=K.origin;if(pe.endsWith("/")&&(pe=pe.substring(0,pe.length-1)),!D.includes(pe))return!1;if(K=K.pathname,K[0]!="/"&&(K="/"+K),K=X[K],!K)return!0;
706if(0<Object.keys(K).length){if(!F)return!0;for(var Te in K)if(D=new RegExp(K[Te]),!F.hasOwnProperty(Te)||!D.test(F[Te]))return!0}return!1}function ae(D,F){if(D||F){D="https://bnc.lt/a/"+D+"?";for(var K="tags alias channel feature stage campaign type duration sdk source data".split(" "),pe=0;pe<K.length;pe++){var Te=K[pe],tt=F[Te];if(tt)if(Te==="tags"&&Array.isArray(tt))for(var Qt=0;Qt<tt.length;Qt++)D=(D[D.length-1]==="?"?D+Te:D+"&"+Te)+"="+encodeURIComponent(tt[Qt]);else(typeof tt=="string"&&0<tt.length||typeof tt=="number")&&(Te==="data"&&typeof tt=="string"&&(tt=Fe(tt)),D=(D[D.length-1]==="?"?D+Te:D+"&"+Te)+"="+encodeURIComponent(tt))}return D}}function ue(D){D&&(D.Ga=null,D.ha=null,D.J=null,D.v=null,D.m=null,D.L=null,D.F&&delete D.F,D.G&&delete D.G,D.g.remove("branch_view_enabled"),yu(D.g,{},!0))}function Q(D,F,K){return D=D.replace(/\$(\d)/g,function(pe,Te){return F[parseInt(Te,10)-1]}),K&&(D+=`
707 Failure Code:`+K),A&&console&&console.log(D),D}function de(D){var F=D.has_app;return{data:D.data||"",data_parsed:D.data_parsed||{},has_app:F===void 0?null:F,identity:D.identity||null,developer_identity:D.identity||null,referring_identity:D.referring_identity||null,referring_link:D.referring_link||null}}function le(D){var F=/^\$journeys_\S+$/,K=D.data,pe={};if(!K)return{};switch(typeof K){case"string":try{K=b(K)}catch{K={}}break;case"object":break;default:K={}}return Object.keys(K).forEach(function(Te){F.test(Te)&&(pe[Te]=K[Te])}),pe}function ye(){return Yt()?document.referrer:String(window.location)}function fe(D){D.source="web-sdk";var F=D.data;switch(typeof F){case"string":try{F=b(F)}catch{F={_bncNoEval:!0}}break;case"object":break;default:F={}}var K=F.$og_redirect||F.$fallback_url||F.$desktop_url;F.$canonical_url||(F.$canonical_url=ye()),F.$og_title||(F.$og_title=K?null:qe("title")),F.$og_description||(F.$og_description=K?null:qe("description")),F.$og_image_url||(F.$og_image_url=K?null:qe("image")),F.$og_video||(F.$og_video=K?null:qe("video")),F.$og_type||(F.$og_type=K?null:qe("type")),typeof F.$desktop_url=="string"&&(F.$desktop_url=F.$desktop_url.replace(/#r:[a-z0-9-_]+$/i,"").replace(/([\?&]_branch_match_id=\d+)/,""));try{b(F)}catch{F=u(F)}return D.data=F,D}function We(D){function F(pe){return pe!==""}if(!D||typeof D!="string")return"";var K=document.createElement("a");return K.href=D,D=K.pathname&&K.pathname.split("/").filter(F),Array.isArray(D)&&D.length?D[D.length-1]+K.search:K.search}function Le(D,F,K){if(D&&typeof D=="object"||(D={}),!F||typeof F!="object")return D;for(var pe in F)if(F.hasOwnProperty(pe)){var Te=F[pe];!K||Te!=null?D[pe]=Te:delete D[pe]}return D}function Ve(){try{var D=(Yt()&&vn()?window.top.location.hash:window.location.hash).match(RegExp("r:([^&]*)"));if(D&&1<=D.length)return D[1]}catch{}}function at(D){return!!/^((?!chrome|android|crios|firefox|fxios|edg|yabrowser).)*safari/i.test(D)}function Et(D,F){if((D=/version\/([^ ]*)/i.exec(D))&&D[1])try{if(parseFloat(D[1])>=(F||11))return!0}catch{}return!1}function ne(){var D=navigator.userAgent;return D.match(/android/i)?"android":D.match(/ipad/i)||D&&at(D)&&D&&-1<D.indexOf("Macintosh")&&Et(D,13)&&screen.height>screen.width?"ipad":D.match(/i(os|p(hone|od))/i)?"ios":D.match(/\(BB[1-9][0-9]*;/i)?"blackberry":D.match(/Windows Phone/i)?"windows_phone":D.match(/Kindle/i)||D.match(/Silk/i)||D.match(/KFTT/i)||D.match(/KFOT/i)||D.match(/KFJWA/i)||D.match(/KFJWI/i)||D.match(/KFSOWI/i)||D.match(/KFTHWA/i)||D.match(/KFTHWI/i)||D.match(/KFAPWA/i)||D.match(/KFAPWI/i)?"kindle":D.match(/(Windows|Macintosh|Linux)/i)?"desktop":"other"}function Ze(){var D=navigator.userAgent;return at(D)?Et(D,11):!1}function lt(){var D=navigator.userAgent;return!!window.webkitURL&&D&&D&&/(iPad|iPod|iPhone)/.test(D)&&!/(chrome|crios)/i.test(D)&&!/(fxios|firefox)/i.test(D)&&!/edg/i.test(D)&&!/(opt|opr)/i.test(D)&&!/yabrowser/i.test(D)}function ot(D){try{var F=(Yt()&&vn()?window.top.location.search:window.location.search).substring(1).match(new RegExp(D+"=([^&]*)"));if(F&&1<=F.length)return F[1]}catch{}}function se(D){return D.replace(/(\-\w)/g,function(F){return F[1].toUpperCase()})}function Fe(D){var F="",K,pe=0;D=D.replace(/\r\n/g,`
708`);var Te="";for(K=0;K<D.length;
708K++){var tt=D.charCodeAt(K);128>tt?Te+=String.fromCharCode(tt):(127<tt&&2048>tt?Te+=String.fromCharCode(tt>>6|192):(Te+=String.fromCharCode(tt>>12|224),Te+=String.fromCharCode(tt>>6&63|128)),Te+=String.fromCharCode(tt&63|128))}for(D=Te;pe<D.length;){var Qt=D.charCodeAt(pe++);Te=D.charCodeAt(pe++),K=D.charCodeAt(pe++),tt=Qt>>2,Qt=(Qt&3)<<4|Te>>4;var Dt=(Te&15)<<2|K>>6,ct=K&63;isNaN(Te)?ct=Dt=64:isNaN(K)&&(ct=64),F=F+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(tt)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(Qt)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(Dt)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(ct)}return F}function ht(D){return Ct(D)?atob(D):D}function Ct(D){if(typeof D!="string"||D===""||D.trim()==="")return!1;try{return btoa(atob(D))===D}catch{return!1}}function pt(D){return D&&D.browser_fingerprint_id&&!Ct(D.browser_fingerprint_id)&&(D.browser_fingerprint_id=btoa(D.browser_fingerprint_id)),D&&D.alternative_browser_fingerprint_id&&!Ct(D.alternative_browser_fingerprint_id)&&(D.alternative_browser_fingerprint_id=btoa(D.alternative_browser_fingerprint_id)),D}function me(D){return D&&Ct(D.browser_fingerprint_id)&&(D.browser_fingerprint_id=atob(D.browser_fingerprint_id)),D&&Ct(D.alternative_browser_fingerprint_id)&&(D.alternative_browser_fingerprint_id=atob(D.alternative_browser_fingerprint_id)),D}function De(D,F,K){typeof D.addEventListener=="function"?D.addEventListener(F,K,void 0):typeof D.attachEvent=="function"?D.attachEvent("on"+F,K):D["on"+F]=K}function Me(D){return D?(-1<D.indexOf("://")?D=D.split("://")[1]:D.charAt(0)==="/"&&(D=D.slice(1)),D):null}function qe(D){D=String(D);var F=F||null;return(D=document.querySelector('meta[property="og:'+D+'"]'))&&D.content&&(F=D.content),F}function ut(){var D=document.getElementsByTagName("meta"),F={};if(!D||D.length===0)return F;for(var K={hostedIOS:null,hostedAndroid:null,applinksIOS:null,applinksAndroid:null,twitterIOS:null,twitterAndroid:null},pe=0;pe<D.length;pe++)if((D[pe].getAttribute("name")||D[pe].getAttribute("property"))&&D[pe].getAttribute("content")){var Te=D[pe].getAttribute("name"),tt=D[pe].getAttribute("property");Te=Te||tt,tt=Te.split(":"),tt.length===3&&tt[0]==="branch"&&tt[1]==="deeplink"&&(tt[2]==="$ios_deeplink_path"?K.hostedIOS=Me(D[pe].getAttribute("content")):tt[2]==="$android_deeplink_path"?K.hostedAndroid=Me(D[pe].getAttribute("content")):F[tt[2]]=D[pe].getAttribute("content")),Te==="al:ios:url"&&(K.applinksIOS=Me(D[pe].getAttribute("content"))),Te==="twitter:app:url:iphone"&&(K.twitterIOS=Me(D[pe].getAttribute("content"))),Te==="al:android:url"&&(K.applinksAndroid=Me(D[pe].getAttribute("content"))),Te==="twitter:app:url:googleplay"&&(K.twitterAndroid=Me(D[pe].getAttribute("content")))}return K&&typeof K=="object"&&Object.keys(K||{}).length!==0&&(K.hostedIOS?F.$ios_deeplink_path=K.hostedIOS:K.applinksIOS?F.$ios_deeplink_path=K.applinksIOS:K.twitterIOS&&(F.$ios_deeplink_path=K.twitterIOS),K.hostedAndroid?F.$android_deeplink_path=K.hostedAndroid:K.applinksAndroid?F.$android_deeplink_path=K.applinksAndroid:K.twitterAndroid&&(F.$android_deeplink_path=K.twitterAndroid),F.hasOwnProperty("$ios_deeplink_path")&&F.hasOwnProperty("$android_deeplink_path")&&F.$ios_deeplink_path===F.$android_deeplink_path&&(F.$deeplink_path=F.$ios_deeplink_path)),F}function Tt(){try{if(navigator.languages&&0<navigator.languages.length)var D=navigator.languages[0];else navigator.language&&(D=navigator.language);D=D.substring(0,2).toUpperCase()}catch{D=null}return D}function jt(D,F){var K=[];return F.forEach(function(pe){D.indexOf(pe)===-1&&K.push(pe)}),K}var on=["purchase"],wn={missingPurchaseEvent:"event name is either missing, of the wrong type or not valid. Please specify 'purchase' as the event name.",missingCommerceData:"commerce_data is either missing, of the wrong type or empty. Please ensure that commerce_data is constructed correctly.",invalidKeysForRoot:"Please remove the following keys from the root of commerce_data: ",invalidKeysForProducts:"Please remove the following keys from commerce_data.products: ",invalidProductListType:"commerce_data.products must be an array of objects",invali
708dProductType:"Each product in the products list must be an object"};function kr(D){var F="sku name price quantity brand category variant".split(" "),K=jt("common type transaction_id currency revenue revenue_in_usd exchange_rate shipping tax coupon affiliation persona products".split(" "),Object.keys(D));if(K.length)return wn.invalidKeysForRoot+K.join(", ");var pe=[],Te;if(D.hasOwnProperty("products")){if(!Array.isArray(D.products))return wn.invalidProductListType;if(D.products.forEach(function(tt){typeof tt!="object"&&(Te=wn.invalidProductType),pe=pe.concat(jt(F,Object.keys(tt)))}),Te)return Te;if(pe.length)return wn.invalidKeysForProducts+pe.join(", ")}return null}function Ir(D,F){return D&&typeof D=="string"&&on.indexOf(D.toLowerCase())!==-1?F&&typeof F=="object"&&Object.keys(F||{}).length!==0?(D=kr(F))?D:null:wn.missingCommerceData:wn.missingPurchaseEvent}function gi(D){return typeof D!="string"?null:D.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ln(D,F,K){if(K!=null){if(typeof K=="object"&&Object.keys(K||{}).length===0)return D;D[F]=K}return D}function Ua(){var D={},F={};return F=Ln(F,"$og_title",qe("title")),F=Ln(F,"$og_description",qe("description")),F=Ln(F,"$og_image_url",qe("image")),F=Ln(F,"$og_video",qe("video")),F=(F=Ln(F,"$og_type",qe("type")))&&0<Object.keys(F).length?F:null,D=Ln(D,"og_data",F),D=Ln(D,"hosted_deeplink_data",ut()),F=document.getElementsByTagName("title"),D=Ln(D,"title",0<F.length?F[0].innerText:null),F=document.querySelector('meta[name="description"]'),D=Ln(D,"description",F&&F.content?F.content:null),F=document.querySelector('link[rel="canonical"]'),(D=Ln(D,"canonical_url",F&&F.href?F.href:null))&&0<Object.keys(D).length?D:{}}var Qe="ADD_TO_CART ADD_TO_WISHLIST VIEW_CART INITIATE_PURCHASE ADD_PAYMENT_INFO PURCHASE SPEND_CREDITS SEARCH VIEW_ITEM VIEW_ITEMS RATE SHARE COMPLETE_REGISTRATION COMPLETE_TUTORIAL ACHIEVE_LEVEL UNLOCK_ACHIEVEMENT LOGIN SUBSCRIBE START_TRIAL INVITE RESERVE VIEW_AD CLICK_AD INITIATE_STREAM COMPLETE_STREAM".split(" "),Ue="transaction_id revenue currency shipping tax coupon affiliation search_query description".split(" ");function Rt(D){if(!D||Object.keys(D).length===0)return null;for(var F=jt(Ue,Object.keys(D)),K={},pe=0;pe<F.length;pe++){var Te=F[pe];K[Te]=D[Te],delete D[Te]}return{custom_data:fn(K),event_data:D}}function Ut(D,F){return!F||D===null&&F==="object"?!1:F==="array"?Array.isArray(D):typeof D===F&&!Array.isArray(D)}function zt(D){var F={};return F=Ln(F,"http_origin",document.URL),F=Ln(F,"user_agent",navigator.userAgent),F=Ln(F,"language",Tt()),F=Ln(F,"screen_width",screen.width||0),F=Ln(F,"screen_height",screen.height||0),F=Ln(F,"http_referrer",document.referrer),F=Ln(F,"browser_fingerprint_id",D.L),F=Ln(F,"developer_identity",D.m),F=Ln(F,"identity",D.m),F=Ln(F,"sdk","web"),F=Ln(F,"sdk_version","2.86.5"),F=jr(F,"model",H?H.model:""),F=jr(F,"os_version",H?H.platformVersion:"")}function Yt(){return window.self!==window.top}function vn(){var D="true";try{window.top.location.search&&(D="true")}catch{return!1}return D==="true"}function nn(D){return D||(Yt()?vn()?window.top.document.referrer:"":document.referrer)}function fn(D){if(!Ut(D,"object")||Object.keys(D).length===0)return{};for(var F in D)if(D.hasOwnProperty(F)){var K=F,pe=D[F];pe=Ut(pe,"object")||Ut(pe,"array")?S(pe):pe===null?"null":pe.toString(),D[K]=pe}return D}function tn(D,F){return D=D?Le({},D):{},F&&0<Object.keys(F).length?0<Object.keys(D).length?Le(D,F):Le({},F):D}function $n(D){N!==""&&D.setAttribute("nonce",N)}function Hr(D,F){isNaN(F)||0>=F?D():setTimeout(D,F)}function dr(){navigator.userAgentData?navigator.userAgentData.getHighEntropyValues(["model","platformVersion"]).then(function(D){var F=D.model;if(D=D.platformVersion){var K=/^([1-9]\d*)\.(0\d*)(\.[0]\d*){1,}$/;D.indexOf(".")!==-1&&(D=D.replace(K,D.substring(0,D.indexOf("."))))}H={model:F,platformVersion:D}}):H=null}function jr(D,F,K){return typeof K=="string"&&K&&(D[F]=K),D}function as(D,F={},K){const pe=["/v2/event/standard","/v2/event/custom"],Te={};if(Te.dma_eea=F.eeaRegion,Te.dma_ad_personalization=F.adPersonalizationConsent,Te.dma_ad_user_data=F.adUserDataUsageConsent,["/v1/open","/v1/pageview"].includes(K))Object.assign(D,Te);else if(pe.includes(K))try{let tt;D.user_data?tt=JSON.parse(D.user_data):tt={},Object.assign(tt,Te),D.user_data=JSON.stringify(tt)}catch{console.error(`setDMAParams:: ${D.user_data} is not a valid JSON string`)}}var ci={};function yt(D,F){return function(K,pe,Te){if(V)return!1;if(typeof Te=="number"||Te)if(F===0){if(typeof Te!="object")return Q("API request $1, parameter $2 is not $3",[K,pe,"an object"])}else if(F===3){if(!(Te instanceof Array))return Q("API request $1, parameter $2 is not $3",[K,pe,"an array"])}else if(F===2){if(typeof Te!="number")return Q("API request $1, parameter $2 is not $3",[K,pe,"a number"])}else if(F===4){if(typeof Te!="boolean")return Q("API request $1, parameter $2 is not $3",[K,pe,"a boolean"])}else{if(typeof Te!="string")return Q("API request $1, parameter $2 is not $3",[K,pe,"a string"]);if(F!==1&&!F.test(Te))return Q("API request $1, parameter $2 is not $3",[K,pe,"in the proper format"])}else if(D)return Q("API request $1 missing parameter $2",[K,pe]);return!1}}function _i(D){return Le(D,{browser_fingerprint_id:yt(!0,1),identity_id:yt(!0,1),sdk:yt(!0,1),session_id:yt(!0,1)})}var $i={destination:v,endpoint:"/v1/open",method:"POST",h:{browser_fingerprint_id:yt(!1,1),alternative_browser_fingerprint_id:yt(!1,1),identity_id:yt(!1,1),identity:yt(!1,1),link_identifier:yt(!1,1),sdk:yt(!1,1),options:yt(!1,0),initial_referrer:yt(!1,1),tracking_disabled:yt(!1,4),current_url:yt(!1,
7081),screen_height:yt(!1,2),screen_width:yt(!1,2),model:yt(!1,1),os_version:yt(!1,1)}},vu={destination:"https://app.link",endpoint:"/_r",method:"GET",S:!0,h:{sdk:yt(!0,1),_t:yt(!1,1),branch_key:yt(!0,1)}},$s={destination:v,endpoint:"/v1/url",method:"POST",ta:"obj",h:_i({alias:yt(!1,1),campaign:yt(!1,1),channel:yt(!1,1),data:yt(!1,1),feature:yt(!1,1),identity_id:yt(!0,1),stage:yt(!1,1),tags:yt(!1,3),type:yt(!1,2),source:yt(!1,1),instrumentation:yt(!1,1)})},Va={destination:v,endpoint:"/v1/qr-code",method:"POST",ta:"obj",h:_i({alias:yt(!1,1),campaign:yt(!1,1),channel:yt(!1,1),data:yt(!1,1),qr_code_settings:yt(!1,1),feature:yt(!1,1),identity_id:yt(!0,1),stage:yt(!1,1),tags:yt(!1,3),type:yt(!1,2),source:yt(!1,1)})},cs={destination:v,endpoint:"/v1/deepview",S:!0,method:"POST",h:_i({campaign:yt(!1,1),_t:yt(!1,1),channel:yt(!1,1),data:yt(!0,1),feature:yt(!1,1),link_click_id:yt(!1,1),open_app:yt(!1,4),append_deeplink_path:yt(!1,4),stage:yt(!1,1),tags:yt(!1,3),deepview_type:yt(!0,1),source:yt(!0,1)})},jc={destination:v,endpoint:"/v2/event/standard",method:"POST",h:{name:yt(!0,1),user_data:yt(!0,1),custom_data:yt(!1,1),event_data:yt(!1,1),content_items:yt(!1,1),customer_event_alias:yt(!1,1)}},op={destination:v,endpoint:"/v2/event/custom",method:"POST",h:{name:yt(!0,1),user_data:yt(!0,1),custom_data:yt(!1,1),event_data:yt(!1,1),content_items:yt(!1,1),customer_event_alias:yt(!1,1)}},Qu={destination:v,endpoint:"/v1/pageview",method:"POST",h:_i({event:yt(!0,1),metadata:yt(!1,0),initial_referrer:yt(!1,1),tracking_disabled:yt(!1,4),branch_view_id:yt(!1,1),no_journeys:yt(!1,4),user_language:yt(!1,1),open_app:yt(!1,4),has_app_websdk:yt(!1,4),source:yt(!1,1),feature:yt(!1,1),is_iframe:yt(!1,4),data:yt(!1,0),callback_string:yt(!1,1),journey_displayed:yt(!1,4),audience_rule_id:yt(!1,1),journey_dismissals:yt(!1,0),identity_id:yt(!1,1),identity:yt(!0,1),session_referring_link_data:yt(!1,1),session_link_click_id:yt(!1,1)})},cl={destination:v,endpoint:"/v1/dismiss",method:"POST",h:_i({event:yt(!0,1),metadata:yt(!1,0),initial_referrer:yt(!1,1),tracking_disabled:yt(!1,4),branch_view_id:yt(!1,1),no_journeys:yt(!1,4),user_language:yt(!1,1),open_app:yt(!1,4),has_app_websdk:yt(!1,4),source:yt(!1,1),feature:yt(!1,1),is_iframe:yt(!1,4),data:yt(!1,0),callback_string:yt(!1,1),journey_displayed:yt(!1,4),audience_rule_id:yt(!1,1),journey_dismissals:yt(!1,0),dismissal_source:yt(!1,1)})},lp={destination:v,endpoint:"/v1/cpid",method:"POST",h:{user_data:yt(!0,1)}},Fg={destination:v,endpoint:"/v1/cpid/latd",method:"POST",h:{user_data:yt(!0,1)}};function zc(){for(var D=["session","cookie","pojo"],F=0;F<D.length;F++){var K=this[D[F]];if(K=typeof K=="function"?K():K,K.isEnabled())return K.H={},K}}function yo(D){return D==="branch_session"||D==="branch_session_first"?D:"BRANCH_WEBSDK_KEY"+D}function up(D){return D==="true"?!0:D==="false"?!1:D}function An(D){return D==="branch_session"||D==="branch_session_first"||D.indexOf("BRANCH_WEBSDK_KEY")===0}function $e(D){D=D.trim();var F=D.indexOf("=");return{name:D.substring(0,F),value:up(D.substring(F+1,D.length))}}function $t(D){try{var F=D&&localStorage?localStorage:sessionStorage}catch{return{isEnabled:function(){return!1}}}return{getAll:function(){if(typeof F>"u")return null;var K=null,pe;for(pe in F)pe.indexOf("BRANCH_WEBSDK_KEY")===0&&(K===null&&(K={}),K[pe.replace("BRANCH_WEBSDK_KEY","")]=up(F.getItem(pe)));return me(K)},get:function(K,pe){return K==="browser_fingerprint_id"||K==="alternative_browser_fingerprint_id"?pe&&localStorage?ht(localStorage.getItem(yo(K))):ht(F.getItem(yo(K))):up(pe&&localStorage?localStorage.getItem(yo(K)):F.getItem(yo(K)))},set:function(K,pe,Te){Te&&localStorage?localStorage.setItem(yo(K),pe):F.setItem(yo(K),pe)},remove:function(K,pe){pe&&localStorage?localStorage.removeItem(yo(K)):F.removeItem(yo(K))},clear:function(){Object.keys(F).forEach(function(K){K.indexOf("BRANCH_WEBSDK_KEY")===0&&F.removeItem(K)})},isEnabled:function(){try{return F.setItem("test",""),F.removeItem("test"),!0}catch{return!1}}}}zc.prototype.local=function(){return $t(!0)},zc.prototype.session=function(){return $t(!1)};
708function Zt(){function D(F,K){K&&(F=yo(F)),document.cookie=F+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"}return{getAll:function(){for(var F={},K=document.cookie.split(";"),pe=0;pe<K.length;pe++){var Te=$e(K[pe]);Te&&Te.hasOwnProperty("name")&&Te.hasOwnProperty("value")&&An(Te.name)&&(F[Te.name.replace("BRANCH_WEBSDK_KEY","")]=Te.value)}return F},get:function(F){F=yo(F);for(var K=document.cookie.split(";"),pe=0;pe<K.length;pe++){var Te=$e(K[pe]);if(Te&&Te.hasOwnProperty("name")&&Te.hasOwnProperty("value")&&Te.name===F)return Te.value}return null},set:function(F,K){document.cookie=yo(F)+"="+K+"; path=/"},remove:function(F){D(F,!0)},clear:function(){for(var F=document.cookie.split(";"),K=0;K<F.length;K++){var pe=$e(F[K]);pe&&pe.hasOwnProperty("name")&&An(pe.name)&&D(pe.name,!1)}},isEnabled:function(){return navigator.cookieEnabled}}}zc.prototype.cookie=function(){return Zt()},zc.prototype.pojo={getAll:function(){return this.H},get:function(D){return this.H[D]||null},set:function(D,F){this.H[D]=F},remove:function(D){delete this.H[D]},clear:function(){this.H={}},isEnabled:function(){return!0}};function fr(){}fr.prototype.l=0;function ca(D,F,K){if(typeof F>"u")return"";var pe=[];if(F instanceof Array){for(D=0;D<F.length;D++)pe.push(encodeURIComponent(K)+"="+encodeURIComponent(F[D]));return pe.join("&")}for(var Te in F)F.hasOwnProperty(Te)&&(F[Te]instanceof Array||typeof F[Te]=="object"?pe.push(ca(D,F[Te],K?K+"."+Te:Te)):pe.push(encodeURIComponent(K?K+"."+Te:Te)+"="+encodeURIComponent(F[Te])));return pe.join("&")}function $r(D,F,K){var pe,Te=F.destination+F.endpoint,tt=/^[0-9]{15,20}$/,Qt=/key_(live|test)_[A-Za-z0-9]{32}/;if(typeof F.i<"u"){for(ct in F.i)if(F.i.hasOwnProperty(ct)){if(pe=typeof F.i[ct]=="function"?F.i[ct](F.endpoint,ct,K[ct]):pe)return{error:pe};Te+="/"+K[ct]}}var Dt={};if(typeof F.h<"u"&&F.endpoint!=="/v1/pageview"&&F.endpoint!=="/v1/dismiss"){for(ct in F.h)if(F.h.hasOwnProperty(ct)){if(pe=F.h[ct](F.endpoint,ct,K[ct]))return{error:pe};pe=K[ct],typeof pe<"u"&&pe!==""&&pe!==null&&(Dt[ct]=pe)}}else(F.endpoint==="/v1/pageview"||F.endpoint==="/v1/dismiss")&&(Le(Dt,K),Dt.branch_requestMetadata&&delete Dt.branch_requestMetadata);if(K.hasOwnProperty("branch_requestMetadata")&&K.branch_requestMetadata&&F.endpoint!=="/v1/pageview"&&F.endpoint!=="/v1/dismiss"&&(Dt.metadata=S(K.branch_requestMetadata)),K.branch_dma_data&&(as(Dt,K.branch_dma_data,F.endpoint),Dt.branch_dma_data&&delete Dt.branch_dma_data),F.method==="POST")try{var ct=Dt;if(typeof ct>"u"&&(ct={}),K.branch_key&&Qt.test(K.branch_key))ct.branch_key=K.branch_key;else if(K.app_id&&tt.test(K.app_id))ct.app_id=K.app_id;else if(K.instrumentation)ct.instrumentation=K.instrumentation;else throw Error(Q("API request $1 missing parameter $2",[F.endpoint,"branch_key or app_id"]))}catch(Jn){return{error:Jn.message}}return(F.endpoint==="/v1/pageview"||F.endpoint==="/v1/dismiss")&&Dt.metadata&&(Dt.metadata=S(Dt.metadata||{})),F.endpoint==="/v1/open"&&(Dt.options=S(Dt.options||{})),{data:ca(D,Dt,""),url:Te.replace(/^\//,"")}}fr.prototype.createScript=function(D,F,K){var pe=document.createElement("script");pe.type="text/javascript",pe.async=!0,pe.src=D,$n(pe),D=document.getElementsByTagName("head"),!D||1>D.length?typeof F=="function"&&F():(D[0].appendChild(pe),typeof F=="function"&&De(pe,"error",F),typeof K=="function"&&De(pe,"load",K))};function _s(D,F,K,pe,Te){var tt=Date.now(),Qt=q;D.l===0&&Ze()&&D.l++;var Dt="branch_callback__"+D.l++,ct=0<=F.indexOf("branch.io")?"&data=":"&post_data=";K=pe==="POST"?encodeURIComponent(Fe(u(K))):"";var Jn=window.setTimeout(function(){window[Dt]=function(){},Ln(U,Qt,C(tt)),Te(Error("Request timed out"),null,504)},P);window[Dt]=function(qt){window.clearTimeout(Jn),Te(null,qt)},D.createScript(F+(0>F.indexOf("?")?"?":"")+(K?ct+K:"")+(0<=F.indexOf("/c/")?"&click=1":"")+"&callback="+Dt,function(){Te(Error("Request blocked by client, probably adblock"),null)},function(){Ln(U,Qt,C(tt));try{typeof this.remove=="function"?this.remove():this.parentNode.removeChild(this)}catch{}delete window[Dt]})}function kl(D,F,K,pe,Te,tt,Qt,Dt){var ct=Date.now(),Jn=q,qt=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");Dt&&(qt.responseType=Dt),qt.ontimeout=function(){Ln(U,Jn,C(ct)),tt(Error("Request timed out"),null,504)},qt.onerror=function(Cn){var Hn="Error in API: URL - "+(qt.responseURL||"Unknown")+", Status - "+(qt.status||"No status available")+", Response - "+(qt.responseText||"No response text available");console.log(Hn),tt(Error(Cn.error||Hn),null,qt.status)},qt.onreadystatechange=function(){if(qt.readyState===4)if(Ln(U,Jn,C(ct)),qt.status===200){if(qt.responseType==="arraybuffer")var Cn=qt.response;else if(Qt)Cn=qt.responseText;else try{Cn=b(qt.responseText)}catch{Cn={}}tt(null,Cn,qt.status)}else(qt.status.toString().substring(0,1)==="4"||qt.status.toString().substring(0,1)==="5")&&(qt.responseURL&&qt.responseURL.includes("v2/event")?tt(qt.responseText,null,qt.status):(Cn="Error in API: URL - "+(qt.responseURL||"Unknown")+", Status - "+(qt.status||"No status available")+", Response - "+(qt.responseText||"No response text available"),console.log(Cn),tt(Error(Cn),null,qt.status)))};try{qt.open(pe,F,!0),qt.timeout=P,qt.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),qt.send(K)}catch{Te.set("use_jsonp",!0),_s(D,F,K,pe,tt)}}function Zn(D,F,K,pe,Te){function tt(){pe.get("use_jsonp")||F.S?_s(D,qt,K,F.method,Qt):kl(D,qt,Jn,F.method,pe,Qt,Kc,un)}function Qt(kn,Hs,ea){typeof D.ga=="function"&&D.ga(qt,F.method,Cn,kn,ea,Hs),kn&&0<Hn&&(ea||"").toString().substring(0,1)==="5"?(Hn--,window.setTimeout(function(){tt()},x)):Te(kn,Hs)}if(q=F.endpoint==="/v1/pageview"&&K&&K.journey_displayed?F.endpoint+"-1-brtt":F.endpoint+"-brtt",F.endpoint==="/v1/url"&&1<Object.keys(U).length&&(delete U["-brtt"],K.instrumentation=S(Le({},U)),U={}),V)for(var Dt=["browser_fingerprint_id","alternative_browser_fingerprint_id","identity_id","session_id","identity"],ct=0;ct<Dt.length;ct++)K.hasOwnProperty(Dt[ct])&&delete K[Dt[ct]];if(Dt=$r(D,F,K),Dt.error)return Te(Error(S({message:Dt.error,endpoint:F.endpoint,data:K})));var Jn="";if(F.method==="GET")var qt=Dt.url+"?"+Dt.data;else qt=Dt.url,Jn=Dt.data;var Cn;pe.get("use_jsonp")||F.S?Cn=K:Cn=Jn;var Hn=w;if(V&&ie(qt,K))return G?Qt(Error("Requested operation cannot be completed since tracking is disabled"),null,300):Qt(null,{},200);var Kc=!1;if(F.endpoint==="/v1/qr-code"){Kc=!0;var un="arraybuffer"}tt()}function wa(D){D&&D.parentNode&&D.parentNode.removeChild(D)}function dl(D,F){D&&!D.className.match(new RegExp("(\\s|^)"+F+"(\\s|$)"))&&(D.className+=" "+F)}function Yf(D){var F=document.body;F&&F.className.match(new RegExp("(\\s|^)"+D+"(\\s|$)"))&&(F.className=F.className.replace(new RegExp("(\\s|^)"+D+"(\\s|$)")," "))}function LT(D){var F=new Date;return F.setDate(F.getDate()+D)}function $g(D){return document.body.currentStyle?document.body.currentStyle[se(D)]:window.getComputedStyle(document.body).getPropertyValue(D)}function Vo(D){function F(K){function pe(){return Math.max(document.documentElement.clientHeight,window.innerHeight||0)/100}
708function Te(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)/100}if(!K)return 0;var tt=K.replace(/[0-9,\.]/g,"");K=K.match(/\d+/g);var Qt=parseInt(0<K.length?K[0]:"0",10);return parseInt({px:function(Dt){return Dt},em:function(Dt){return document.body.currentStyle?Dt*F(document.body.currentStyle.fontSize):Dt*parseFloat(window.getComputedStyle(document.body).fontSize)},rem:function(Dt){return document.documentElement.currentStyle?Dt*F(document.documentElement.currentStyle.fontSize):Dt*parseFloat(window.getComputedStyle(document.documentElement).fontSize)},vw:function(Dt){return Dt*Te()},vh:function(Dt){return Dt*pe()},vmin:function(Dt){return Dt*Math.min(pe(),Te())},vmax:function(Dt){return Dt*Math.max(pe(),Te())},"%":function(){return document.body.clientWidth/100*Qt}}[tt](Qt),10)}return(F("76px")+F(D)).toString()+"px"}function Bg(D,F){if(D=D.get("hideBanner",!0),F.ua&&navigator&&Number(navigator.doNotTrack))return!1;try{typeof D=="string"&&(D=b(D))}catch{D=!1}D=typeof D=="number"?new Date>=new Date(D):!D;var K=F.R;return typeof K=="number"&&(K=!1),!document.getElementById("branch-banner")&&!document.getElementById("branch-banner-iframe")&&(D||K)&&(F.V&&ne()==="android"||F.va&&ne()==="ipad"||F.Z&&ne()==="ios"||F.W&&ne()==="blackberry"||F.Y&&ne()==="windows_phone"||F.X&&ne()==="kindle")}function Ug(D,F){var K=`.branch-banner-is-active { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }
709#branch-banner { width:100%; z-index: 99999; font-family: Helvetica Neue, Sans-serif; -webkit-font-smoothing: antialiased; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }
710#branch-banner .button{ border: 1px solid `+(D.buttonBorderColor||(D.theme==="dark"?"transparent":"#ccc"))+"; background: "+(D.buttonBackgroundColor||"#fff")+"; color: "+(D.buttonFontColor||"#000")+`; cursor: pointer; margin-top: 0px; font-size: 14px; display: inline-block; margin-left: 5px; font-weight: 400; text-decoration: none;  border-radius: 4px; padding: 6px 12px; transition: all .2s ease;}
711#branch-banner .button:hover {  border: 1px solid `+(D.buttonBorderColorHover||(D.theme==="dark"?"transparent":"#BABABA"))+"; background: "+(D.buttonBackgroundColorHover||"#E0E0E0")+"; color: "+(D.buttonFontColorHover||"#000")+`;}
712#branch-banner .button:focus { outline: none; }
713#branch-banner * { margin-right: 4px; position: relative; line-height: 1.2em; }
714#branch-banner-close { font-weight: 400; cursor: pointer; float: left; z-index: 2;padding: 0 5px 0 5px; margin-right: 0; }
715#branch-banner .content { width:100%; overflow: hidden; height: 76px; background: rgba(255, 255, 255, 0.95); color: #333; `+(D.position==="top"?"border-bottom":"border-top")+`: 1px solid #ddd; }
716#branch-banner-close { color: #000; font-size: 24px; top: 14px; opacity: .5; transition: opacity .3s ease; }
717#branch-banner-close:hover { opacity: 1; }
718#branch-banner .title { font-size: 18px; font-weight:bold; color: #555; }
719#branch-banner .description { font-size: 12px; font-weight: normal; color: #777; max-height: 30px; overflow: hidden; }
720#branch-banner .icon { float: left; padding-bottom: 40px; margin-right: 10px; margin-left: 5px; }
721#branch-banner .icon img { width: 63px; height: 63px; margin-right: 0; }
722#branch-banner .reviews { font-size:13px; margin: 1px 0 3px 0; color: #777; }
723#branch-banner .reviews .star { display:inline-block; position: relative; margin-right:0; }
724#branch-banner .reviews .star span { display: inline-block; margin-right: 0; color: #555; position: absolute; top: 0; left: 0; }
725#branch-banner .reviews .review-count { font-size:10px; }
726#branch-banner .reviews .star .half { width: 50%; overflow: hidden; display: block; }
727#branch-banner .content .left { padding: 6px 5px 6px 5px; }
728#branch-banner .vertically-align-middle { top: 50%; transform: translateY(-50%); -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); }
729#branch-banner .details > * { display: block; }
730#branch-banner .content .left { height: 63px; }
731#branch-banner .content .right { float: right; height: 63px; margin-bottom: 50px; padding-top: 22px; z-index: 1; }
732#branch-banner .right > div { float: left; }
733#branch-banner-action { top: 17px; }
734#branch-banner .content:after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1px; background: rgba(0, 0, 0, 0.2); }
735#branch-banner .theme-dark.content { background: rgba(51, 51, 51, 0.95); }
736#branch-banner .theme-dark #branch-banner-close{ color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
737#branch-banner .theme-dark .details { text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
738#branch-banner .theme-dark .title { color: #fff; }
739#branch-banner .theme-dark .description { color: #fff; }
740#branch-banner .theme-dark .reviews { color: #888; }
741#branch-banner .theme-dark .reviews .star span{ color: #fff; }
742#branch-banner .theme-dark .reviews .review-count{ color: #fff; }
743`,pe=ne();pe!=="ios"&&pe!=="ipad"||!D.Z?pe==="android"&&D.V?K+=`#branch-banner { position: absolute; }
744#branch-banner .content .left .details .title { font-size: 12px; }
745#branch-mobile-action { white-space: nowrap; }
746#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }
747@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }
748@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }
749@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }
750#branch-banner #branch-banner-close,#branch-banner .theme-dark #branch-banner-close { height:17px; width: 17px; text-align: center; font-size: 15px; top: 24px;  border-radius:14px; border:0; line-height:14px; color:#b1b1b3; background:#efefef; padding: 0; opacity: 1; }
751#branch-banner .button { top: 0; text-decoration:none; border-bottom: 3px solid #A4C639; padding: 0 10px; height: 24px; line-height: 24px; text-align: center; color: #fff; margin-top: 2px;  font-weight: bold; background-color: #A4C639; border-radius: 5px; }
752#branch-banner .button:hover { border-bottom:3px solid #8c9c29; background-color: #c1d739; }
753`:(pe==="blackberry"&&D.W||pe==="windows_phone"&&D.Y||pe==="kindle"&&D.X)&&(K+=`#branch-banner { position: absolute; }
754#branch-banner .content .left .details .title { font-size: 12px; }
755#branch-mobile-action { white-space: nowrap; }
756#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }
757@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }
758@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }
759@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }
760`):K+=`#branch-banner { position: absolute; }
761#branch-banner .content .left .details .title { font-size: 12px; }
762#branch-mobile-action { white-space: nowrap; }
763#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }
764@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }
765@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }
766@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }
767`,K+=D.ma,D.M&&(K+=`body { margin: 0; }
768`,pe=document.createElement("style"),pe.type="text/css",pe.id="branch-iframe-css",$n(pe),pe.innerHTML=`body { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }
769#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width:100%; left: 0; right: 0; border: 0; height: 76px; z-index: 99999; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }
770#branch-banner-iframe { position: `+((D.position!=="top"||D.qa?"fixed":"absolute")+`; }
771`),(document.head||document.getElementsByTagName("head")[0]).appendChild(pe)),pe=document.createElement("style"),pe.type="text/css",pe.id="branch-css",pe.innerHTML=K,$n(pe),K=D.M?F.contentWindow.document:document,(K=K.head||K.getElementsByTagName("head")[0])&&typeof K.appendChild=="function"&&K.appendChild(pe),D.position==="top"?F.style.top="-76px":D.position==="bottom"&&(F.style.bottom="-76px")}function da(D,F){try{var K=b(D.get(F?"branch_session_first":"branch_session",F))||null;return me(K)}catch{return null}}function yu(D,F,K){K&&F.referring_link&&j&&(F.referringLinkExpiry=new Date().getTime()+k),F=pt(F),D.set("branch_session",u(F)),K&&D.set("branch_session_first",u(F),!0)}function cp(D,F){if(F){var K=da(D)||{};F=u(pt(Le(K,F))),D.set("branch_session",F)}}function Gc(D,F,K){function pe(tt,Qt){return pt(Le(b(tt),Qt,K))}var Te=D.get("branch_session",!1)||{};D.set("branch_session",u(pe(Te,F))),Te=D.get("branch_session_first",!0)||{},D.set("branch_session_first",u(pe(Te,F)),!0)}function Ho(D,F,K){var pe=document.createElement("iframe");pe.src="about:blank",pe.style.overflow="hidden",pe.scrolling="no",pe.id="branch-banner-iframe",pe.className="branch-animation",$n(pe),pe.onload=function(){var Te=ne(),tt=pe.contentDocument||pe.contentWindow.document;tt.head=tt.createElement("head"),tt.body=tt.createElement("body"),tt.body.className=Te==="ios"||Te==="ipad"?"branch-banner-ios":Te==="android"?"branch-banner-android":"branch-banner-other",Nl(D,F,tt),K(pe)},document.body.appendChild(pe)}function Nl(D,F,K){K=K||document;var pe=K.createElement("div");if(pe.id="branch-banner",pe.className="branch-animation",D.I||D.T){if(D.I){for(var Te="",tt=0;5>tt;tt++)Te+='<span class="star"><svg class="star" fill="#555555" height="12" viewBox="3 2 20 19" width="12"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/><path d="M0 0h24v24H0z" fill="none"/><foreignObject display="none"><span class="star">☆</span></foreignObject></svg>',D.I>tt&&(Te+=tt+1>D.I&&D.I%1?'<span class="half"><svg fill="#555555" height="12" viewBox="3 2 20 19" width="12"><defs><path d="M0 0h24v24H0V0z" id="a"/></defs><clipPath id="b"><use overflow="visible" xlink:href="#a"/></clipPath><path clip-path="url(#b)" d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg><foreignObject display="none"><span class="half">
771★</span></foreignObject></span>':'<span class="full"><svg fill="#555555" height="12" viewBox="3 2 20 19" width="12"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/><path d="M0 0h24v24H0z" fill="none"/><foreignObject display="none"><span class="full">★</span></foreignObject></svg> </span>'),Te+="</span>";Te='<span class="stars">'+Te+"</span>"}else Te="";Te='<div class="reviews">'+Te+(D.T?'<span class="review-count">'+D.T+"</span>":"")+"</div>"}else Te="";return pe.innerHTML='<div class="content'+(D.theme?" theme-"+D.theme:"")+'"><div class="right">'+F+'</div><div class="left">'+(D.na?"":'<div id="branch-banner-close" class="branch-animation" aria-label="Close">&times;</div>')+'<div class="icon"><img src="'+D.icon+'" alt="Application icon"></div><div class="details vertically-align-middle"><div class="title">'+D.title+"</div>"+Te+'<div class="description">'+D.description+"</div></div></div></div>",K.body.appendChild(pe),pe}function Wv(D,F,K){F='<div id="branch-banner-form-container"><a id="branch-mobile-action" class="button" href="#" target="_parent">'+(((da(F)||{}).has_app?D.ra:D.oa)+"</a></div>"),D.M?Ho(D,F,K):(D=Nl(D,F,document),K(D))}function qv(D,F,K,pe){function Te(ct,Jn){typeof ct=="function"&&(Jn=ct,ct={}),ct=ct||{},F.position==="top"?tt.style.top="-76px":F.position==="bottom"&&(tt.style.bottom="-76px"),typeof F.R=="number"?pe.set("hideBanner",LT(F.R),!0):pe.set("hideBanner",!0,!0),ct.da?(F.position==="top"?document.body.style.marginTop=Qt:F.position==="bottom"&&(document.body.style.marginBottom=Dt),Yf("branch-banner-is-active"),wa(tt),wa(document.getElementById("branch-css")),Jn()):(setTimeout(function(){wa(tt),wa(document.getElementById("branch-css")),Jn()},270),setTimeout(function(){F.position==="top"?document.body.style.marginTop=Qt:F.position==="bottom"&&(document.body.style.marginBottom=Dt),Yf("branch-banner-is-active")},20))}if(!Bg(pe,F))return ds(D,"willNotShowBanner"),null;ds(D,"willShowBanner");var tt,Qt=document.body.style.marginTop,Dt=document.body.style.marginBottom;return Wv(F,pe,function(ct){function Jn(){F.position==="top"?tt.style.top="0":F.position==="bottom"&&(tt.style.bottom="0"),ds(D,"didShowBanner")}if(tt=ct,Ug(F,tt),K.channel=K.channel||"app banner",ct=F.M?tt.contentWindow.document:document,!["other","desktop"].includes(ne())){F.open_app=F.sa,F.append_deeplink_path=F.ka,F.make_new_link=F.pa,F.deepview_type="banner",D.deepview(K,F);var qt=ct.getElementById("branch-mobile-action");
771qt&&(qt.onclick=function(Hn){Hn.preventDefault(),D.deepviewCta()})}qt=$g("margin-top");var Cn=$g("margin-bottom");dl(document.body,"branch-banner-is-active"),F.position==="top"?document.body.style.marginTop=Vo(qt):F.position==="bottom"&&(document.body.style.marginBottom=Vo(Cn)),(qt=ct.getElementById("branch-banner-close"))&&(qt.onclick=function(Hn){Hn.preventDefault(),ds(D,"willCloseBanner"),Te({},function(){ds(D,"didCloseBanner")})}),(ct=ct.getElementById("branch-banner-modal-background"))&&(ct.onclick=function(Hn){Hn.preventDefault(),ds(D,"willCloseBanner"),Te({},function(){ds(D,"didCloseBanner")})}),F.da?Jn():setTimeout(Jn,20)}),Te}function Vg(){function D(){F.length&&F[0](function(){F.shift(),D()})}var F=[];return function(K){F.push(K),F.length===1&&D()}}var Kv={},Bs,fl,Us,bo,dp,Zf,$d,Bd,Xu=1;function Yv(){Bs="top",fl="absolute",Us="76px",dp=bo=!1}Yv();var jo=[],hl=!1,Qf=window.innerHeight,bu=window.innerWidth;window.innerHeight<window.innerWidth&&(Qf=window.innerWidth,bu=window.innerHeight);var So=0,fa=0,zo=!1,Ki=/<script type="application\/json">((.|\s)*?)<\/script>/,Ha=/<script type="text\/javascript">((.|\s)*?)<\/script>/,fp=/<style type="text\/css" id="branch-css">((.|\s)*?)<\/style>/,Hg=/<style type="text\/css" id="branch-iframe-css">((.|\s)*?)<\/style>/,jg=/#branch-banner-spacer {((.|\s)*?)}/,Ud=/margin-bottom: (.*?);/,mi=null,Wc=null,oi=!1,Nr=!1,zg=!1,hp=!1,Gg=!1,ja="",pp=[],os=null;function Wg(D){Yv();var F=Zv(D)||{};F&&F.bannerHeight&&F.position&&F.sticky?(Us=F.bannerHeight,Bs=F.position,fl=F.sticky):(D=D.match(jg))?(Bs="top",(D=D[1].match(Ud))&&(Us=D[1]),fl="absolute"):(Bs="bottom",fl="fixed"),D=Us,F=/vh|%/gi,(D=F.test(D)?D.replace(F,""):!1)&&(Us=D/100*Qf+"px",100>D?dp=!0:bo=!0)}function Zv(D){if(D=D.match(Ki))return b(D[1])}function Ri(D){if(D=D.match(Hg))return D[1]}function Ml(D,F){var K;return F&&D&&D.ctaText&&D.ctaText.has_app?K=D.ctaText.has_app:D&&D.ctaText&&D.ctaText.no_app&&(K=D.ctaText.no_app),K}function pl(D){if(jo=[],D&&D.injectorSelector&&(D=document.querySelectorAll(D.injectorSelector)))for(var F=0;F<D.length;F++)jo.push(D[F].parentElement)}function gl(D){if(D=D.match(fp))return D[1]}function Cs(D){if(D=D.match(Ha)){D=D[1];var F=document.createElement("script");F.id="branch-journey-cta",$n(F),F.innerHTML=D,document.body.appendChild(F)}}function ha(D){var F=D.match(Ki),K=D.match(Ha),pe=D.match(fp),Te=D.match(Hg);return F&&(D=D.replace(Ki,"")),K&&(D=D.replace(Ha,"")),pe&&(D=D.replace(fp,"")),Te&&(D=D.replace(Hg,"")),D}function xb(){var D=document.createElement("iframe");return D.src="about:blank",D.style.overflow="hidden",D.scrolling="no",D.id="branch-banner-iframe",D.className="branch-animation",D.title="Branch Banner Frame",D.setAttribute("aria-label","Branch Banner Frame"),$n(D),D}function Qv(D){var F=document.createElement("style");F.type="text/css",F.id="branch-iframe-css",So=$g("margin-top");var K=+So.slice(0,-2);fa=$g("margin-bottom");var pe=+fa.slice(0,-2),Te=+Us.slice(0,-2);D||(Bs==="top"?document.body.style.marginTop=(+Te+K).toString()+"px":Bs==="bottom"&&(document.body.style.marginBottom=(+Te+pe).toString()+"px")),0<jo.length&&jo.forEach(function(tt){var Qt,Dt=window.getComputedStyle(tt);Dt&&(Qt=bo&&Dt.getPropertyValue("position")==="fixed"),Qt||(tt.style.marginTop=Us)}),ja==="top"&&ja!==Bs&&Gg&&pp&&0<pp.length&&pp.forEach(function(tt){tt.style.marginTop=0}),Gg=!1,ja="",pp=[],hp=!1,F.innerHTML=D||Ib(),$n(F),document.head.appendChild(F)}function Ib(){var D="",F="";if(document.body.style.transition="",document.getElementById("branch-banner-iframe")&&(document.getElementById("branch-banner-iframe").style.transition=""),zg||(D=`body { -webkit-transition: all 0.375s ease; }
772`,document.body.style.transition="all 00.375s ease",F="-webkit-transition: all 0.25s ease; transition: all 00.25s ease;"),D=D||"",Zf){var K=Us,pe=Kv.wa,Te=fl;$d==="overlay"&&(pe=K="100%!important",Te="fixed"),D=D+("#branch-banner-iframe-embed { z-index: 99999!important; height: "+K+"; width: "+pe+"; padding: 0px!important; margin: 0px!important; ; position: "+Te+`; }
773#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width: 100%; left: 0; right: 0; border: 0; height: 100%!important; width: 100%!important; `)+(F+"; position: "+Te+`; }
774`)}else D+="#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width:100%; left: 0; right: 0; border: 0; height: "+Us+"; z-index: 99999; "+F+` }
775#branch-banner-iframe { position: `+fl+`; }
776@media only screen and (orientation: landscape) { body { `+(Bs==="top"?"margin-top: ":"margin-bottom: ")+(bo?bu+"px":Us)+`; }
777#branch-banner-iframe { height: `+(bo?bu+"px":Us)+"; }";return D}function Xv(D,F){if(dl(document.body,"branch-banner-is-active"),bo&&fl==="fixed"){var K=document.createElement("style");K.type="text/css",K.innerHTML=".branch-banner-no-scroll {overflow: hidden;}",document.head.appendChild(K),dl(document.body,"branch-banner-no-scroll")}setTimeout(function(){F?(D.style.top=null,D.style.bottom=null):Bs==="top"?D.style.top="0":Bs==="bottom"&&(os&&os.journey_link_data&&!os.journey_link_data.safeAreaRequired?D.style.bottom="0":(hl=!0,document.getElementById("branch-banner-iframe").style.transition="all 0s",za(!1,!0),window.addEventListener("resize",qg),window.addEventListener("scroll",Xf))),ds(mi,"didShowJourney",os),oi=!0},20)}function qg(){hl&&za(!1,!1)}function Xf(){hl&&(window.pageYOffset>window.innerHeight?za(!0,!1):za(!1,!1))}function za(D,F){var K=document.getElementById("branch-banner-iframe"),pe=K.offsetHeight,Te=K.offsetTop,tt=window.innerHeight;F&&window.pageYOffset!==0?K.style.bottom="0":D?K.style.top=tt-pe+pe/2+"px":tt-Te!=pe&&(K.style.top=""+(tt-pe)+"px")}function DT(D){if(D=D.globalDismissPeriod,typeof D=="number"){if(D===-1)D=!0;else{var F=new Date;D=F.setSeconds(F.getSeconds()+D)}return D}}function Go(D,F,K,pe,Te,tt,Qt){var Dt=Vs;pe&&Te&&(Array.prototype.forEach.call(Te.contentWindow.document.querySelectorAll("#branch-mobile-action"),function(ct){ct.addEventListener("click",function(){ds(mi,"didClickJourneyCTA",os),hp=!0,pe(),$l(Te)})}),Kg(".branch-banner-continue","didClickJourneyContinue",K,Te,D,F,tt,Qt,Dt,"click"),Kg(".branch-banner-close","didClickJourneyClose",K,Te,D,F,tt,Qt,Dt,"click"),Kg(".branch-banner-dismiss-background","didClickJourneyBackgroun
777dDismiss",K,Te,D,F,tt,Qt,Dt,"click"),Kg(".branch-banner-dismiss-background","didScrollJourneyBackgroundDismiss",K,Te,D,F,tt,Qt,Dt,"touchmove"))}function Kg(D,F,K,pe,Te,tt,Qt,Dt,ct,Jn){Array.prototype.forEach.call(pe.contentWindow.document.querySelectorAll(D),function(qt){qt.addEventListener(Jn,function(){Jv(F,K,pe,Te,tt,Qt,Dt,ct)})})}function Ob(D,F,K){var pe=D.get("journeyDismissals",!0);pe=pe?b(pe):{},pe[K]={view_id:F,dismiss_time:Date.now()},D.set("journeyDismissals",S(pe),!0)}function Fl(D){return D==null?null:D.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&brvbar;/g,"¦").replace(/&laquo;/g,"«").replace(/&acute;/g,"´").replace(/&middot;/g,"·").replace(/&raquo;/g,"»").replace(/&amp;/g,"&").replace(/&iquest;/g,"¿").replace(/&times;/g,"×").replace(/&divide;/g,"÷").replace(/&Agrave;/g,"À").replace(/&Aacute;/g,"Á").replace(/&Acirc;/g,"Â").replace(/&Atilde;/g,"Ã").replace(/&Auml;/g,"Ä").replace(/&Aring;/g,"Å").replace(/&AElig;/g,"Æ").replace(/&Ccedil;/g,"Ç").replace(/&Egrave;/g,"È").replace(/&Eacute;/g,"É").replace(/&Ecirc;/g,"Ê").replace(/&Euml;/g,"Ë").replace(/&Igrave;/g,"Ì").replace(/&Iacute;/g,"Í").replace(/&Icirc;/g,"Î").replace(/&Iuml;/g,"Ï").replace(/&ETH;/g,"Ð").replace(/&Ntilde;/g,"Ñ").replace(/&Ograve;/g,"Ò").replace(/&Oacute;/g,"Ó").replace(/&Ocirc;/g,"Ô").replace(/&Otilde;/g,"Õ").replace(/&Ouml;/g,"Ö").replace(/&Oslash;/g,"Ø").replace(/&Ugrave;/g,"Ù").replace(/&Uacute;/g,"Ú").replace(/&Ucirc;/g,"Û").replace(/&Uuml;/g,"Ü").replace(/&Yacute;/g,"Ý").replace(/&THORN;/g,"Þ").replace(/&szlig;/g,"ß").replace(/&agrave;/g,"à").replace(/&aacute;/g,"á").replace(/&acirc;/g,"â").replace(/&atilde;/g,"ã").replace(/&auml;/g,"ä").replace(/&aring;/g,"å").replace(/&aelig;/g,"æ").replace(/&ccedil;/g,"ç").replace(/&egrave;/g,"è").replace(/&eacute;/g,"é").replace(/&ecirc;/g,"ê").replace(/&euml;/g,"ë").replace(/&igrave;/g,"ì").replace(/&iacute;/g,"í").replace(/&icirc;/g,"î").replace(/&iuml;/g,"ï").replace(/&eth;/g,"ð").replace(/&ntilde;/g,"ñ").replace(/&ograve;/g,"ò").replace(/&oacute;/g,"ó").replace(/&ocirc;/g,"ô").replace(/&otilde;/g,"õ").replace(/&ouml;/g,"ö").replace(/&oslash;/g,"ø").replace(/&ugrave;/g,"ù").replace(/&uacute;/g,"ú").replace(/&ucirc;/g,"û").replace(/&uuml;/g,"ü").replace(/&yacute;/g,"ý").replace(/&thorn;/g,"þ").replace(/&yuml;/g,"ÿ")}function gp(D,F){var K={},pe=ut();if(pe&&0<Object.keys(pe).length&&(K.hosted_deeplink_data=pe),D=D.O(vi(null,K),null,mi,!0),os&&os.journey_link_data){Ln(D,"journey_id",os.journey_link_data.journey_id),Ln(D,"journey_name",Fl(os.journey_link_data.journey_name)),Ln(D,"view_id",os.journey_link_data.view_id),Ln(D,"view_name",Fl(os.journey_link_data.view_name)),Ln(D,"channel",Fl(os.journey_link_data.channel)),Ln(D,"campaign",Fl(os.journey_link_data.campaign));try{Ln(D,"tags",JSON.stringify(os.journey_link_data.tags))}catch{D.tags=JSON.stringify([])}}return Ln(D,"dismissal_source",F),D}function Jv(D,F,K,pe,Te,tt,Qt,Dt){var ct=Qt?0:DT(tt);if(ds(mi,D,os),hp=!0,$l(K),!Qt){ct!==void 0&&F.set("globalJourneysDismiss",ct,!0),Ob(F,pe,Te);var Jn=function(){mi.removeListener(Jn);var qt=gp(Dt,L[D]);mi.j(cl,qt,function(Cn,Hn){!Cn&&tt&&tt.dismissRedirect?window.location=tt.dismissRedirect:!Cn&&typeof Hn=="object"&&Hn.template&&Dt.U(Hn,null,!1)&&Dt.P(Hn.template,qt,qt.branch_view_id||Hn.event_data.branch_view_data.id,Hn.event_data.branch_view_data,!1,Hn.journey_link_data)})};mi.addListener("branch_internal_event_didCloseJourney",Jn)}}function vi(D,F){return D=Le({url:D&&D.url||ye(),user_agent:navigator.userAgent,language:navigator.language,screen_width:screen.width||-1,screen_height:screen.height||-1,window_device_pixel_ratio:window.devicePixelRatio||1},F||{}),D=jr(D,"model",H?H.model:""),D=jr(D,"os_version",H?H.platformVersion:"")}function $l(D,F){if(Nr||(zo=!0),zg&&!Nr){document.body.style.transition="all 00.375s ease",document.getElementById("branch-banner-iframe").style.transition="all 00.25s ease";var K=document.getElementById("branch-iframe-css").innerHTML+`
778`;K+=`body { -webkit-transition: all 0.375s ease; }
779#branch-banner-iframe { -webkit-transition: all 0.25s ease; }
780`,document.getElementById("branch-iframe-css").innerHTML="",document.getElementById("branch-iframe-css").innerHTML=K}Bs==="top"?D.style.top="-"+Us:Bs==="bottom"&&(D.style.bottom="-"+Us),ds(mi,"willCloseJourney",os),setTimeout(function(){wa(D),wa(document.getElementById("branch-css")),wa(document.getElementById("branch-iframe-css")),wa(document.getElementById("branch-journey-cta")),(!Nr||hp)&&jo&&0<jo.length?jo.forEac
780h(function(pe){pe.style.marginTop=0}):(Gg=Nr,ja=Bs,pp=jo),Bs==="top"?document.body.style.marginTop=So:Bs==="bottom"&&(document.body.style.marginBottom=fa),Yf("branch-banner-is-active"),Yf("branch-banner-no-scroll"),hl&&(hl=!1,window.removeEventListener("resize",qg),window.removeEventListener("scroll",Xf)),ds(mi,"didCloseJourney",os),F||ds(mi,"branch_internal_event_didCloseJourney",os),oi=!1,setTimeout(function(){zo=!1},250)},Nr?0:270)}function ey(D){var F={banner_id:Bd};if(D&&typeof D=="object"&&0<Object.keys(D||{}).length){var K=["browser_fingerprint_id","app_id","source","open_app","link_click_id"];if(D&&typeof D=="object"&&!Array.isArray(D)&&0<Object.keys(D).length&&K&&Array.isArray(K)&&0<K.length)for(var pe in D)D.hasOwnProperty(pe)&&-1<K.indexOf(pe)&&delete D[pe];F.journey_link_data={},Le(F.journey_link_data,D)}os=F,Zf=F.journey_link_data.type==="desktop",$d=F.journey_link_data.variant||null}function mp(){return Kv&&mi&&mi.s&&mi.s.data?mi.s.data.$journeys_cta:!1}function vp(){if(mp())return mi.s.data.$journeys_cta}function Vd(D){try{if(mp()&&0<vp().length)return D.replace(/validate[(].+[)];/g,'validate("'+vp()+'")').replace("window.top.location.replace(","window.top.location = ")}catch{}return D}var Vs={};function Pb(D,F,K){var pe=F?"OPEN":"GET";Wg(D);var Te=Zv(D);Te&&(pe=Ml(Te,F),pl(Te));var tt=gl(D);Cs(D);var Qt=Ri(D);D=ha(D),F=document.createElement("div"),F.id="branch-banner-iframe-embed";var Dt=xb();Dt.onload=function(){var ct=D,Jn=ne(),qt=Dt.contentDocument||Dt.contentWindow.document;if(qt.head=qt.createElement("head"),qt.body=qt.createElement("body"),qt.body.innerHTML=ct,qt.body.className=Jn==="ios"||Jn==="ipad"?"branch-banner-ios":Jn==="android"?"branch-banner-android":"branch-banner-other",(ct=qt.querySelector('meta[name="accessibility"]'))&&ct.content==="wcag"&&(ct=qt.createElement("script"),ct.type="text/javascript",ct.text=`
781			var focusableElements = 'button, [href], input, select, textarea, [role="button"], h1, [role="text"], .branch-banner-content';
782			var modal = document.getElementById('branch-banner');
783			var focusableContent = modal.querySelectorAll(focusableElements);
784			var focusElementIdx = 0;
785
786			function handleKeyboardNavigation(e) {
787				var isTabPressed = e.key === 'Tab' || e.keyCode === 9;
788				var isEnterPressed = e.key === 'Enter' || e.keyCode === 13;
789				
790				// Handle Tab key for focus navigation
791				if (isTabPressed) {
792					if (e.shiftKey) {
793						if (focusElementIdx <= 0) {
794							focusElementIdx = focusableContent.length - 1;
795						} else {
796							focusElementIdx = focusElementIdx - 1;
797						}
798					} else {
799						if (focusElementIdx >= focusableContent.length - 1) {
800							focusElementIdx = 0;
801						} else {
802							focusElementIdx = focusElementIdx + 1;
803						}
804					}
805
806					focusableContent[focusElementIdx].focus();
807					e.preventDefault();
808					return;
809				}
810				
811				// Handle Enter key for activation
812				if (isEnterPressed) {
813					// Get the currently focused element
814					var focusedElement = document.activeElement;
815					if (focusedElement && (
816						focusedElement.tagName === 'BUTTON' || 
817						focusedElement.getAttribute('role') === 'button' ||
818						focusedElement.tagName === 'A'
819					)) {
820						// Simulate a click on the element
821						focusedElement.click();
822						e.preventDefault();
823					}
824				}
825			}
826
827			function autoFocus(delay) {
828				setTimeout(function() { focusableContent[focusElementIdx].focus() }, delay);
829			}
830
831			document.addEventListener('keydown', handleKeyboardNavigation);
832			autoFocus(100);
833			
834		`,qt.querySelector("body").append(ct)),Qv(Qt),ct=document.createElement("style"),ct.type="text/css",ct.id="branch-css",ct.innerHTML=tt,$n(ct),qt=Dt.contentWindow.document,qt.head.appendChild(ct),ct=Zf&&$d==="overlay",(dp||bo)&&!ct){var Cn=qt.getElementsByClassName("branch-banner-content")[0];!qt.getElementsByClassName("branch-banner-dismiss-background")[0]&&Cn&&(Cn.style.height=Us)}Bs==="top"?Dt.style.top="-"+Us:Bs==="bottom"&&(Dt.style.bottom="-"+Us);try{Cn=qt.getElementsByClassName("branch-banner-content")[0];var Hn=window.getComputedStyle(Cn).getPropertyValue("background-color").split(", ");Hn[3]&&parseFloat(Hn[3])===0&&(Dt.style.boxShadow="none")}catch{}Cn=pe,(Hn=Dt.contentWindow.document)&&Hn.getElementById("branch-mobile-action")&&(Hn=Hn.getElementById("branch-mobile-action"),Hn.innerHTML=Cn,Hn.setAttribute("aria-label",Cn)),Cn=Object.assign({},os),Cn.bannerHeight=Us,Cn.isFullPageBanner=bo,Cn.bannerPagePlacement=Bs,Cn.isBannerInline=fl==="absolute",Cn.isBannerSticky=fl==="fixed",ds(mi,"willShowJourney",Cn),Xv(Dt,Qt),K(Dt)},Zf?(F.appendChild(Dt),document.body.appendChild(F)):document.body.prepend(Dt)}Vs.U=function(D,F,K){return document.getElementById("branch-banner")||document.getElementById("branch-banner-iframe")||document.getElementById("branch-banner-container")||ne()=="other"||!D.event_data||!D.template?!1:K?!0:((D=!D.event_data.branch_view_data.id||F&&F.no_journeys)||(D=mi,F=D.g.get("globalJourneysDismiss",!0),F===!0||F>Date.now()?D=!0:(D.g.remove("globalJourneysDismiss",!0),D=!1)),D?(Vs.Da=1,!1):!0)},Vs.ea=function(D){D={event:"pageview",journey_displayed:!0,audience_rule_id:D.audience_rule_id,branch_view_id:D.branch_view_id};var F=da(mi.g)||{};F=F.hasOwnProperty("identity")?F.identity:null,D=Ln(D,"identity",F),mi.j(Qu,D,function(){})},Vs.P=function(D,F,K,pe,Te,tt){if(!zo){Bd=K,ey(tt);var Qt=pe.audience_rule_id;(tt=document.getElementById("branch-iframe-css"))&&tt.parentElement&&tt.parentElement.removeChild(tt);var Dt=document.createElement("div");Dt.id="branch-banner",document.body.insertBefore(Dt,null),dl(Dt,"branch-banner-is-active");var ct=!1,Jn=F.callback_string,qt=null,Cn=mi.g;if(D){var Hn=Zv(D)||{};D=Vd(D);var Kc=window.setTimeout(function(){window[Jn]=function(){}},P);window[Jn]=function(un){window.clearTimeout(Kc),ct||(qt=un,Go(K,Qt,Cn,qt,null,Hn,Te))},Pb(D,F.has_app_websdk,function(un){Wc=un,un===null?ct=!0:(Go(K,Qt,Cn,qt,un,Hn,Te),B&&(U["journey-load-time"]=(Date.now()-window.performance.timing.navigationStart).toString()),document.body.removeChild(Dt),V||Te||Vs.ea(pe))})}else document.body.removeChild(Dt),V||Te||Vs.ea(pe)}},Vs.O=function(D,F,K,pe){mi=K,F||(F={}),D||(D={}),zg=F.disable_entry_animation||!1,Nr=F.disable_exit_animation||!1;var Te=Le({},K.s),tt=da(K.g)||{},Qt=tt.hasOwnProperty("has_app")?tt.has_app:!1,Dt=tt.hasOwnProperty("identity")?tt.identity:null,ct=K.g.get("journeyDismissals",!0),Jn=(F.user_language||Tt()||"en").toLowerCase()||null,qt=nn(Ju(K)),Cn;(Cn=F.branch_view_id)||(Cn="_branch_view_id".replace(/[\[\]]/g,"\\$&"),Cn=(Cn=new RegExp("[?&]"+Cn+"(=([^&#]*)|&|#|$)").exec(ye()))&&Cn[2]?decode
834URIComponent(Cn[2].replace(/\+/g," ")):""),Cn=Cn||null,K=F.make_new_link?null:We(Ju(K,!0));var Hn=tt.hasOwnProperty("session_link_click_id")?tt.session_link_click_id:null;return Te.event=pe?"dismiss":"pageview",Te.metadata=D,Te=Ln(Te,"initial_referrer",qt),Te=Ln(Te,"branch_view_id",Cn),Te=Ln(Te,"no_journeys",F.no_journeys),Te=Ln(Te,"is_iframe",Yt()),Te=Ln(Te,"journey_dismissals",ct),Te=Ln(Te,"identity",Dt),Te=Ln(Te,"session_link_click_id",Hn),Te.user_language=Jn,Te.open_app=F.open_app||!1,Te.has_app_websdk=Qt,Te.feature="journeys",Te.callback_string="branch_view_callback__"+Xu++,Te.data||(Te.data={}),Te.data=Le(ut(),Te.data),Te.data=Le(le(tt||{}),Te.data),K&&(Te.data.link_click_id=K),(D=tt.data?b(tt.data):null)&&D["+referrer"]&&(Te.data["+referrer"]=D["+referrer"]),Te.session_referring_link_data=tt.data||null,Te=fe(Te)};var qc;function zr(D,F,K){return function(){var pe=this,Te=arguments[arguments.length-1];if(D===0||typeof Te!="function")var tt=function(){},Qt=Array.prototype.slice.call(arguments);else Qt=Array.prototype.slice.call(arguments,0,arguments.length-1)||[],tt=Te;pe.ia(function(Dt){function ct(Jn,qt){try{if(Jn&&D===0)throw Jn;D===1?tt(Jn):D===2&&tt(Jn,qt)}finally{Dt()}}if(!K){if(pe.A===1)return ct(Error(Q("Branch SDK initialization pending and a Branch method was called outside of the queue order")),null);if(pe.A===2)return ct(Error(Q("Branch SDK initialization failed, so further methods cannot be called",pe.B,pe.D)),null);if(pe.A===0||!pe.A)return ct(Error(Q("Branch SDK not initialized")),null)}Qt.unshift(ct),F.apply(pe,Qt)})}}function ir(){if(!(this instanceof ir))return qc||(qc=new ir),qc;this.ia=Vg(),this.g=new zc,this.$=new fr,this.u=[],this.ca="web2.86.5",this.l={},this.B=this.A=0,this.D=null}ir.prototype.j=function(D,F,K){if(this.aa&&(F.app_id=this.aa),this.o&&(F.branch_key=this.o),(D.h&&D.h.session_id||D.i&&D.i.session_id)&&this.J&&(F.session_id=this.J),(D.h&&D.h.identity_id||D.i&&D.i.identity_id)&&this.v&&(F.identity_id=this.v),0>D.endpoint.indexOf("/v1/")?(D.h&&D.h.developer_identity||D.i&&D.i.developer_identity)&&this.m&&(F.developer_identity=this.m):(D.h&&D.h.identity||D.i&&D.i.identity)&&this.m&&(F.identity=this.m),(D.h&&D.h.link_click_id||D.i&&D.i.link_click_id)&&this.fa&&(F.link_click_id=this.fa),(D.h&&D.h.sdk||D.i&&D.i.sdk)&&this.ca&&(F.sdk=this.ca),(D.h&&D.h.browser_fingerprint_id||D.i&&D.i.browser_fingerprint_id)&&this.L&&(F.browser_fingerprint_id=this.L),V&&(F.tracking_disabled=V),this.l)for(var pe in this.l)this.l.hasOwnProperty(pe)&&(F.branch_requestMetadata||(F.branch_requestMetadata={}),F.branch_requestMetadata[pe]=this.l[pe]);return Z.hasOwnProperty(D.endpoint)&&(pe=this.g.get("branch_dma_data",!0),F.branch_dma_data=pe?b(pe):null),D.endpoint!=="/_r"&&(D.destination=v),Zn(this.$,D,F,this.g,function(Te,tt){K(Te,tt)})};function Ju(D,F){var K=da(D.g);if(K=K&&K.referring_link)return K;if(j&&F&&(F=(K=da(D.g,!0))&&K.referring_link,K=K&&K.referringLinkExpiry,F&&K))if(new Date().getTime()>K)Gc(D.g,{referringLinkExpiry:null},!0);else return F;return(D=D.g.get("click_id"))?"https://bnc.lt/c/"+D:null}function ds(D,F,K){for(var pe=0;pe<D.u.length;pe++)D.u[pe].event&&D.u[pe].event!==F||D.u[pe].listener(F,K)}ir.prototype.init=zr(2,function(D,F,K){function pe(){if(typeof document.hidden<"u")var un="hidden",kn="visibilitychange";else typeof document.mozHidden<"u"?(un="mozHidden",kn="mozvisibilitychange"):typeof document.msHidden<"u"?(un="msHidden",kn="msvisibilitychange"):typeof document.webkitHidden<"u"&&(un="webkitHidden",kn="webkitvisibilitychange");kn&&!ct.la&&(ct.la=!0,document.addEventListener(kn,function(){document[un]||(Qt(null),typeof ct.G=="function"&&ct.G())},!1))}function Te(un,kn){if(kn&&(kn=Dt(kn),V||(kn=tt(kn),yu(ct.g,kn,Cn)),ct.A=3,kn.data_parsed=kn.data&&kn.data.length!==0?b(kn.data):{}),un)return ct.A=2,ct.B||(ct.B=1,ct.D=un.message),D(un,kn&&de(kn));try{D(un,kn&&de(kn))}catch{}finally{ct.renderFinalize()}un=Ua(),(kn=Ut(K.metadata,"object")?K.metadata:null)&&(kn=tn(un.hosted_deeplink_data,kn))&&0<Object.keys(kn).length&&(un.hosted_deeplink_data=kn);var Hs=Vs.O(vi(K,un),K,ct,!1);ct.renderQueue(function(){ct.j(Qu,Hs,function(ea,Ga){ea||typeof Ga!="object"||(ea=!!Hs.branch_view_id,Vs.U(Ga,K,ea)?Vs.P(Ga.template,Hs,Hs.branch_view_id||Ga.event_data.branch_view_data.id,Ga.event_data.branch_view_data,ea,Ga.journey_link_data):((Ga.auto_branchify||!Jn&&ot("branchify_url")&&Ju(ct))&&this.branch.deepview({},{make_new_link:!1,open_app:!0,auto_branchify:!0}),ds(mi,"willNotShowJourney"))),V&&(G=!0)})})}function tt(un){return Cn&&(un.identity=ct.m),un}function Qt(un){var kn={sdk:"2.86.5",branch_key:ct.o},Hs=da(ct.g)||{},ea=da(ct.g,!0)||{};ea.browser_fingerprint_id&&(kn._t=ea.browser_fingerprint_id),Ze()||lt()||ct.j(vu,kn,function(Ga,ec){Ga&&(ct.B=3,ct.D=Ga.message),ec&&(Hs.browser_fingerprint_id=ec)}),un&&un(null,Hs)}function Dt(un){if(un.link_click_id&&(ct.fa=un.link_click_id.toString()),un.session_link_click_id&&(ct.Ha=un.session_link_click_id.toString()),un.session_id&&(ct.J=un.session_id.toString()),un.identity_id&&(ct.v=un.identity_id.toString()),un.identity&&(ct.m=un.identity.toString()),un.link&&(ct.ha=un.link),un.referring_link){var kn=un.referring_link;un.referring_link=kn?kn.substring(0,4)!=="http"?"https://bnc.lt"+kn:kn:null}return!un.click_id&&un.referring_link&&(un.click_id=We(un.referring_link)),ct.L=un.browser_fingerprint_id,un}B&&(U["init-began-at"]=(Date.now()-window.performance.timing.navigationStart).toString());var ct=this;ct.A=1,-1<F.indexOf("key_")?ct.o=F:ct.aa=F,K=K&&Ut(K,"object")?K:{},w=(ct.N=K)&&K.retries&&Number.isInteger(K.retries)?K.retries:w,x=K&&K.retry_delay&&Number.isInteger(K.retry_delay)?K.retry_delay:x,P=K&&K.timeout&&Number.isInteger(K.timeout)?K.timeout:P,N=K&&K.nonce?K.nonce:N,A=K&&K.enableLogging?K.enableLogging:A,V=!!(K&&K.tracking_disabled&&K.tracking_disabled===!0),j=K&&K.enableExtendedJourneysAssist?K.enableExtendedJourneysAssist:j,k=K&&K.extendedJourneysAssistExpiryTime&&Number.isInteger(K.extendedJourneysAssistExpiryTime)?K.extendedJourneysAssistExpiryTime:k,G=!1,dr(),V&&ue(ct),F=da(ct.g,!0),ct.v=F&&F.identity_id,F=da(ct.g);var Jn=K&&typeof K.branch_match_id<"u"&&K.branch_match_id!==null?K.branch_match_id:null,qt=Jn||ot("_branch_match_id")||Ve(),Cn=!ct.v;if(ct.K=!!ct.g.get("branch_view_enabled"),F&&F.session_id&&!qt&&!ot("branchify_url"))cp(ct.g,{data:""}),cp(ct.g,{referring_link:""}),pe(),Qt(Te);else{F={sdk:"2.86.5",branch_key:ct.o};var Hn=da(ct.g,!0)||{};Hn.browser_fingerprint_id&&(F._t=Hn.browser_fingerprint_id),Hn.identity&&(ct.m=Hn.identity);var Kc=parseInt(ot("[?&]_open_delay_ms"),10);Ze()||lt()?Hr(function(){ct.j($i,{link_identifier:qt,browser_fingerprint_id:qt||Hn.browser_fingerprint_id,identity:Hn.identity?Hn.identity:null,alternative_browser_fingerprint_id:Hn.browser_fingerprint_id,options:K,initial_referrer:nn(Ju(ct)),current_url:Yt()&&vn()?window.top.location.href:window.location.href,screen_height:screen.height||0,screen_width:screen.width||0,model:H?H.model:null,os_version:H?H.platformVersion:null},function(un,kn){un&&(ct.B=2,ct.D=un.message),un||typeof kn!="object"||(kn.branch_view_enabled&&(ct.K=!!kn.branch_view_enabled,ct.g.set("branch_view_enabled",ct.K)),qt&&(kn.click_id=qt)),pe(),Te(un,kn)})},Kc):ct.j(vu,F,function(un,kn){if(un)return ct.B=3,ct.D=un.message,Te(un,null);Hr(function(){ct.j($i,{link_identifier:qt,browser_fingerprint_id:qt||kn,identity:Hn.identity?Hn.identity:null,alternative_browser_fingerprint_id:Hn.browser_fingerprint_id,options:K,initial_referrer:nn(Ju(ct)),current_url:Yt()&&vn()?window.top.location.href:window.location.href,screen_height:screen.height||0,screen_width:screen.width||0,model:H?H.model:null,os_version:H?H.platformVersion:null},function(Hs,ea){Hs&&(ct.B=2,ct.D=Hs.message),Hs||typeof ea!="object"||(ea.branch_view_enabled&&(ct.K=!!ea.branch_view_enabled,ct.g.set("branch_view_enabled",ct.K)),qt&&(ea.click_id=qt)),pe(),Te(Hs,ea)})},Kc)})}},!0),ir.prototype.renderQueue=zr(0,function(D,F){this.ja?F():(this.C=this.C||[],this.C.push(F)),D(null,null)}),ir.prototype.renderFinalize=zr(2,function(D){this.C&&0<this.C.length&&(this.C.forEac
834h(function(F){F.call(this)}),delete this.C),this.ja=!0,D(null,null)}),ir.prototype.data=zr(2,function(D){var F=de(da(this.g));F.referring_link=Ju(this),F.data_parsed=F.data&&F.data.length!==0?b(F.data):{},D(null,F)}),ir.prototype.first=zr(2,function(D){D(null,de(da(this.g,!0)))}),ir.prototype.setIdentity=zr(2,function(D,F){if(F){var K={v:this.v,J:this.J,link:this.ha,Fa:F};this.m=F,Gc(this.g,{identity:F}),D(null,K)}else D(Error(Q("setIdentity - required argument identity should have a non-null value")))}),ir.prototype.logout=zr(1,function(D){this.m=null,Gc(this.g,{identity:null},!0),D(null)}),ir.prototype.getBrowserFingerprintId=zr(2,function(D){var F=da(this.g,!0)||{};D(null,F.browser_fingerprint_id||null)}),ir.prototype.crossPlatformIds=zr(2,function(D){this.j(lp,{user_data:S(zt(this))},function(F,K){return D(F||null,K&&K.user_data||null)})}),ir.prototype.lastAttributedTouchData=zr(2,function(D,F){F=Ut(F,"number")?F:null;var K=zt(this);Ln(K,"attribution_window",F),this.j(Fg,{user_data:S(K)},function(pe,Te){return D(pe||null,Te||null)})}),ir.prototype.track=zr(1,function(D,F,K,pe){if(K=K||{},pe=pe||{},N=pe.nonce?pe.nonce:N,F==="pageview"){(F=tn(ut(),K))&&0<Object.keys(F).length&&(K.hosted_deeplink_data=F);var Te=Vs.O(vi(pe,K),pe,this,!1);this.j(Qu,Te,function(tt,Qt){if(!tt&&typeof Qt=="object"){var Dt=!!Te.branch_view_id;Vs.U(Qt,pe,Dt)?Vs.P(Qt.template,Te,Te.branch_view_id||Qt.event_data.branch_view_data.id,Qt.event_data.branch_view_data,Dt,Qt.journey_link_data):ds(mi,"willNotShowJourney")}typeof D=="function"&&D.apply(this,arguments)})}else console.warn("track method currently supports only pageview event.")}),ir.prototype.logEvent=zr(1,function(D,F,K,pe,Te){F=Ut(F,"string")?F:null,K=Ut(K,"object")?K:null,Te=Ut(Te,"string")?Te:null,K=Rt(K),F&&-1<Qe.indexOf(F)?(pe=Ut(pe,"array")?pe:null,this.j(jc,{name:F,user_data:S(zt(this)),custom_data:S(K&&K.custom_data||{}),event_data:S(K&&K.event_data||{}),content_items:S(pe||[]),customer_event_alias:Te},function(tt){return D(tt||null)})):this.j(op,{name:F,user_data:S(zt(this)),custom_data:S(K&&K.custom_data||{}),event_data:S(K&&K.event_data||{}),content_items:S(pe||[]),customer_event_alias:Te},function(tt){return D(tt||null)})}),ir.prototype.link=zr(2,function(D,F){var K=fe(F),pe=this.o;this.j($s,K,function(Te,tt){if(Te)return D(Te,ae(pe,K));D(null,tt&&tt.url)})}),ir.prototype.qrCode=zr(2,function(D,F,K){fe(F).qr_code_settings=S(fn(K||{})),this.j(Va,fe(F),function(pe,Te){function tt(){}return pe||(tt.rawBuffer=Te,tt.base64=function(){if(this.rawBuffer){const Qt=Array.from(new Uint8Array(Te)).map(Dt=>String.fromCharCode(Dt)).join("");return btoa(Qt)}throw Error("QrCode.rawBuffer is empty.")}),D(pe||null,tt||null)})}),ir.prototype.deepview=zr(1,function(D,F,K){var pe=this;K||(K={}),K.deepview_type=typeof K.deepview_type>"u"?"deepview":"banner",F.data=Le(ut(),F.data),F=Yt()?Le({is_iframe:!0},F):F,F=fe(F);var Te=ae(this.o,F);(K.open_app||K.open_app===null||typeof K.open_app>"u")&&(F.open_app=!0),F.append_deeplink_path=!!K.append_deeplink_path,F.deepview_type=K.deepview_type;var tt=Ju(pe);tt&&!K.make_new_link&&(F.link_click_id=We(tt)),F.banner_options=K,K.auto_branchify&&(F.auto_branchify=!0),pe.G=l(this.j,pe,cs,F,function(Qt,Dt){if(Qt)return V||(pe.F=function(){window.top.location=Te}),D(Qt);typeof Dt=="function"&&(pe.F=Dt),D(null)}),pe.G()}),ir.prototype.deepviewCta=zr(1,function(D){if(typeof this.F>"u")return D(Error(V?"Requested operation cannot be completed since tracking is disabled":"Cannot call Deepview CTA, please call branch.deepview() first"),null);window.event&&(window.event.preventDefault?window.event.preventDefault():window.event.returnValue=!1),ds(this,"didDeepviewCTA"),this.F(),D()}),ir.prototype.addListener=function(D,F){typeof D=="function"&&F===void 0&&(F=D,D=null),F&&this.u.push({listener:F,event:D||null})},ir.prototype.removeListener=function(D){D&&(this.u=this.u.filter(function(F){if(F.listener!==D)return F}))};function yp(D,F,K){K=K||{};try{D.s=b(S(K))}finally{D.s=D.s||{}}F()}ir.prototype.setBranchViewData=zr(1,function(D,F){yp.call(null,this,D,F)},!0),ir.prototype.closeJourney=zr(1,function(D){var F=this;F.renderQueue(function(){if(Wc&&oi)ds(F,"didCallJourneyClose",os),$l(Wc,!0);else return D("Journey already dismissed.")}
834),D()}),ir.prototype.banner=zr(1,function(D,F,K){if(console.warn('The "banner" method is deprecated and will be removed in future versions. Please use Branch Journeys instead. For more information and migration steps, visit: https://help.branch.io/using-branch/docs/journeys-overview'),["other","desktop"].includes(ne()))console.info("banner functionality is not supported on this platform");else{K=K||{},yp.call(null,this,function(){},K),typeof F.showAgain>"u"&&typeof F.forgetHide<"u"&&(F.showAgain=F.forgetHide);var pe={icon:gi(F.icon)||"",title:gi(F.title)||"",description:gi(F.description)||"",T:typeof F.reviewCount=="number"&&0<F.reviewCount?Math.floor(F.reviewCount):null,I:typeof F.rating=="number"&&5>=F.rating&&0<F.rating?Math.round(2*F.rating)/2:null,ra:gi(F.openAppButtonText)||"View in app",oa:gi(F.downloadAppButtonText)||"Download App",M:typeof F.iframe>"u"?!0:F.iframe,Z:typeof F.showiOS>"u"?!0:F.showiOS,va:typeof F.showiPad>"u"?!0:F.showiPad,V:typeof F.showAndroid>"u"?!0:F.showAndroid,W:typeof F.showBlackberry>"u"?!0:F.showBlackberry,Y:typeof F.showWindowsPhone>"u"?!0:F.showWindowsPhone,X:typeof F.showKindle>"u"?!0:F.showKindle,na:!!F.disableHide,R:typeof F.forgetHide=="number"?F.forgetHide:!!F.forgetHide,ua:typeof F.respectDNT>"u"?!1:F.respectDNT,position:F.position||"top",ma:F.customCSS||"",qa:typeof F.mobileSticky>"u"?!1:F.mobileSticky,za:F.buttonBorderColor||"",xa:F.buttonBackgroundColor||"",Ba:F.buttonFontColor||"",Aa:F.buttonBorderColorHover||"",ya:F.buttonBackgroundColorHover||"",Ca:F.buttonFontColorHover||"",pa:!!F.make_new_link,sa:!!F.open_app,da:!!F.immediate,ka:!!F.append_deeplink_path};typeof F.showMobile<"u"&&(pe.Z=F.showMobile,pe.V=F.showMobile,pe.W=F.showMobile,pe.Y=F.showMobile,pe.X=F.showMobile),K.data=Le(ut(),K.data);var Te=this;Te.renderQueue(function(){Te.ba=qv(Te,pe,K,Te.g)})}D()}),ir.prototype.closeBanner=zr(0,function(D){var F=this;F.renderQueue(function(){F.ba&&(ds(F,"willCloseBanner"),F.ba(function(){ds(F,"didCloseBanner")}))}),D()}),ir.prototype.trackCommerceEvent=zr(1,function(D,F,K,pe){var Te=this;Te.renderQueue(function(){var tt=Ir(F,K);if(tt)return D(Error(tt));Te.j(ci.Ea,{event:F,metadata:Le({url:document.URL,user_agent:navigator.userAgent,language:navigator.language},pe||{}),initial_referrer:nn(Ju(Te)),commerce_data:K},function(Qt){D(Qt||null)})}),D()}),ir.prototype.disableTracking=zr(1,function(D,F){F===!1||F==="false"?(G=V=!1,this.o&&this.N&&(this.N.tracking_disabled===!0&&delete this.N.tracking_disabled,this.init(this.o,this.N))):(F===void 0||F===!0||F==="true")&&(ue(this),G=V=!0,this.closeBanner(),this.closeJourney()),D()},!0),ir.prototype.setAPIResponseCallback=zr(0,function(D,F){this.$.ga=F,D()},!0),ir.prototype.referringLink=function(D){return Ju(this,D)},ir.prototype.setDMAParamsForEEA=zr(1,function(D,F,K,pe){try{var Te=(tt,Qt)=>tt!==!0&&tt!==!1?(console.warn(`setDMAParamsForEEA: ${Qt} must be boolean, but got ${tt}`),!1):!0;if(!(Te(F,"eeaRegion")&&Te(K,"adPersonalizationConsent")&&Te(pe,"adUserDataUsageConsent")))return;Te={},Te.eeaRegion=F,Te.adPersonalizationConsent=K,Te.adUserDataUsageConsent=pe,this.g.set("branch_dma_data",S(Te),!0)}catch(tt){console.error("setDMAParamsForEEA::An error occurred while setting DMA parameters for EEA",tt)}D()},!0),ir.prototype.setRequestMetaData=function(D,F){try{typeof D<"u"&&D!==null&&D.length!==0&&typeof F<"u"&&(this.l.hasOwnProperty(D)&&F===null&&delete this.l[D],this.l=Ln(this.l,D,F))}catch(K){console.error("An error occured while setting request metadata",K)}},ir.prototype.setAPIUrl=function(D){D&&D.trim()!==""&&RegExp("^(https?)://((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(D)?v=D:console.error("setAPIUrl: Invalid URL format. Default URL will be set.")},ir.prototype.getAPIUrl=function(){return v};var Hd=new ir;if(window.branch&&window.branch._q)for(var yr=window.branch._q,bp=0;bp<yr.length;bp++){var Rb=yr[bp];Hd[Rb[0]].apply(Hd,Rb[1])}t.exports=Hd,window&&(window.branch=Hd)})()})(g0e);var uDt=g0e.exports;const zy=pi(uDt),cDt=t=>{lDt(t).forEach(n=>{zy.logEvent(n.type)})},dDt=()=>typeof window<"u",fDt=()=>{var t;return!!((t=navigator==null?void 0:navigator.userAgent)!=null&&t.match(/iPhone/i)||navigator.userAgent.match(/iPod/i))},hDt=[As.PLAY,zn.REGISTRATION_SUCCESSFUL],pDt=t=>t.filter(n=>
834hDt.includes(n.type)),gDt=t=>{if(!d0e()||typeof window.fbq!="function")return;pDt(t).forEach(n=>{window.fbq("trackCustom",n.type,n)})};let yte=!1;const mDt=fDt(),m0e={appBuildNumber:"",appName:"Audacy",appVersion:ol.APP_VERSION??""},vDt={env:ol.API_ENV?Jp[ol.API_ENV]:Jp.PROD,platform:bs.WEB,webcastMetricsStr:"DIST=CBS&TGT=radiocomDev&SRS=CBS"},yDt=Number(ol.LOG_LEVEL)||4,bDt=new nDt({minLevel:yDt,hideLogPositionForProduction:!0}),v0e=t=>({debug:t.debug.bind(t),error:t.error.bind(t),info:t.info.bind(t),trace:t.trace.bind(t),warn:t.warn.bind(t),log:t.info.bind(t),getSubLogger(e){return v0e(t.getSubLogger(e))}}),x6=v0e(bDt),SDt=t=>{let e;return mDt?e=new RLt({logger:x6.getSubLogger({name:"NativeHlsPlayer "}),featureFlags:t}):e=new PLt({logger:x6.getSubLogger({name:"HtmlPlayer "}),featureFlags:t}),e},EDt=t=>({analyticsEventListener:e=>{const n=e.filter(r=>r.type!==As.CONTINUE_LISTEN);if(!Tx)try{urt(tC,n,m0e)}catch{}cDt(n),gDt(n)},dataStore:typeof document<"u"?new e0e:{clearData:async()=>{},getData:async()=>{},getDataSync:()=>{},setData:async()=>{},setDataSync:()=>{}},featureFlags:t,player:SDt(t),logger:x6,callBrazeEvent:tC.bind(Bfe)});async function TDt(){if(yte)return Uf();yte=!0,oo.set(oo.brazeFlags,await Vfe());const t=oo.getAll();return Fet(m0e,vDt,EDt(t)),Uf()}const ADt=()=>{const t=new e0e,e=t.getDataSync(tr.REFRESH_TOKEN),n=t.getDataSync(tr.USER_TOKEN),r=t.getDataSync(tr.BRAZE_DEVICE_ID);if(e&&n)return{state:Bn.AUTH,deviceId:r};if(n)return{state:Bn.ANON,deviceId:n};const i=`f8k:${ug(aw()).substring(3,35)}`;return t.setData(tr.BRAZE_DEVICE_ID,i),{state:Bn.NONE,deviceId:i}},wDt=()=>{var n;if(Tx){console.warn(`Braze disabled, if this was a mistake remove the DISABLE_BRAZE var from your config. env.DISABLE_BRAZE: ${ol.DISABLE_BRAZE}`);return}const t={},{deviceId:e}=ADt();t.deviceId=e,bfe(ol.BRAZE_API_KEY,{baseUrl:ol.BRAZE_SDK_ENDPOINT,allowUserSuppliedJavascript:!0,minimumIntervalBetweenTriggerActionsInSeconds:1,...t}),tfe(),Tfe(),e&&((n=md())==null||n.addAlias("USER_ALIAS",e)),Hgt(),lrt(Bfe),MP.getFeatureFlag("meteredContent").then(r=>{Uf().then(i=>{var s,a,o;(s=r==null?void 0:r.properties)!=null&&s.active&&((o=(a=r.properties)==null?void 0:a.duration)==null?void 0:o.value)!==void 0?i.getPersonalizationServices().dataStore.setDataSync(tr.UNAUTHENTICATED_PLAYBACK_MAX_DURATION,r.properties.duration.value):i.getPersonalizationServices().dataStore.clearData(tr.UNAUTHENTICATED_PLAYBACK_MAX_DURATION)})})},y0e=async()=>{const t=await lr.getPersonalizationServices().getAdTargetingStatus();let e=rg.OPT_IN;(t==null?void 0:t.adTargeting)===rg.INELIGIBLE?e=rg.INELIGIBLE:((t==null?void 0:t.adTargeting)===rg.OPT_OUT||h0e())&&(e=rg.OPT_OUT),xc(LLt,e),p0e(e)},_Dt=async()=>{aDt(),lr.getPersonalizationServices().getAuthState()===Bn.AUTH&&await y0e()},CDt="2500460110090923",xDt=`!(function (f, b, e, v, n, t, s) {
835  if (f.fbq) return;
836  n = f.fbq = function () {
837    n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
838  };
839  if (!f._fbq) f._fbq = n;
840  n.push = n;
841  n.loaded = !0;
842  n.version = '2.0';
843  n.queue = [];
844  t = b.createElement(e);
845  t.async = !0;
846  t.src = v;
847  s = b.getElementsByTagName(e)[0];
848  s.parentNode.insertBefore(t, s);
849})(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');`,IDt=()=>{const t=document.createElement("script");t.text=xDt,document.head.appendChild(t)},e$=(...t)=>{window.fbq(...t)},ODt=()=>($.useEffect(()=>{let t=!1;ij(e=>{if(!t){if(!e)return;IDt(),e$("init",CDt),e$("track","PageView"),t=!0;return}e$("consent",e?"grant":"revoke")})},[]),null),PDt={mainContentId:"main-content"},xo={defaultPadding:30,menuWidth:{[ve.Small]:"100%",[ve.Medium]:286,[ve.Large]:220},navPadding:{[ve.Medium]:23,[ve.Large]:58},searchWidth:308},bte={skipToMainContentContainer:{position:"absolute",zIndex:Ai.skipToMainContent,width:xo.menuWidth[ve.Large]},skipToMainContentButton:{...Bt.transition(["opacity","transform"]),opacity:0,position:"absolute",right:0,transform:"translate3d(0, -100%, 0)","&:focus":{opacity:1,transform:"translate3d(-20px, 20px, 0)",[Be(ve.Medium)]:{transform:"translate3d(0, 20px, 0)"},[Be(ve.Large)]:{transform:"translate3d(0, 45px, 0)"}}}},RDt=()=>{const{t}=dn(),e=$.useCallback(()=>{const r=document.querySelector(`#${PDt.mainContentId}`);if(r){const i=Bme(r);i.length>0&&i[0]instanceof HTMLElement&&i[0].focus()}},[]),n=$.useCallback(({key:r})=>{r===a0.Enter&&e()},[e]);return I("div",{css:bte.skipToMainContentContainer,children:I(xv,{as:Fi.Anchor,buttonCss:bte.skipToMainContentButton,label:t("navigation.skipToMainContent"),onClick:e,onKeyUp:n})})},LDt={assertiveMessage:"",politeMessage:""},P0=Yn({default:LDt,key:"LiveRegions"});ss({key:"LiveRegionsAssertive",get:({get:t})=>t(P0).assertiveMessage,set:({get:t,set:e},n)=>{const r=t(P0);e(P0,{...r,assertiveMessage:n instanceof Kse?"":n})}});ss({key:"LiveRegionsPolite",get:({get:t})=>t(P0).politeMessage,set:({get:t,set:e},n)=>{const r=t(P0);e(P0,{...r,politeMessage:n instanceof Kse?"":n})}});const DDt=()=>{const[{assertiveMessage:t,politeMessage:e}]=Fo(P0);return be(Dn,{children:[I("div",{"aria-live":"assertive",role:"log","aria-atomic":!0,css:aC.visHidden,children:t}),I("div",{"aria-live":"polite",role:"log","aria-atomic":!0,css:aC.visHidden,children:e})]})},Ste={imageSize:20},Ete={link:{...Bt.accessibleMinButtonSize(),...cn.metadataSmall,...AT,gap:8},image:{height:Ste.imageSize,width:Ste.imageSize}},Tte=({as:t=Fi.Anchor,buttonCss:e,label:n,media:r,...i})=>{const s=be(Dn,{children:[$st(r)?I(Yr,{name:r,ariaHidden:!0}):I(zf,{...r,entityImageCss:Ete.image}),I("span",{children:n})]}),a=[Ete.link,e];return xd({props:{as:t,...i},children:s,styles:a})},t$={link:{...AT,gap:10},primaryNav:{...cn.titleMainNav},secondaryNav:{...cn.titleMisc}},jA=({as:t=Fi.Anchor,hasArrow:e,icon:n,isSecondary:r,label:i,...s})=>{const a=!!n&&!r,o=e?j2(i):i,l=be(Dn,{children:[a&&I(Yr,{ariaHidden:!0,name:n}),I("span",{children:o})]}),u=[t$.link,r?t$.secondaryNav:t$.primaryNav];return xd({props:{as:t,...s},children:l,styles:u})};var b0e=(t=>(t.Icon="Icon",t.Horizontal="Horizontal",t.Vertical="Vertical",t))(b0e||{});const n$=({ariaLabel:t,children:e,height:n,width:r})=>be("svg",{width:r,height:n,viewBox:`0 0 ${r} ${n}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":"title",children:[I("title",{id:"title",children:t}),e]}),kDt=({ariaLabel:t="Audacy Brand",color:e=_e.audacyOrange,containerCss:n,variant:r="Icon"})=>{let i;
849switch(r){case"Vertical":i=I(n$,{width:"102",height:"72",ariaLabel:t,children:I("path",{d:"M34.309 56.489v10.338H30.97V65.24c-1.227 1.172-3.085 1.804-5.25 1.804-4.006 0-6.243-2.075-6.243-5.792V56.49h3.338v4.294c0 2.598 1.209 3.825 3.789 3.825 2.742 0 4.366-1.317 4.366-4.6v-3.519h3.338Zm17.51-2.688v13.026h-3.337V65.51c-1.155.992-2.905 1.534-5.214 1.534-4.403 0-7.181-1.949-7.181-5.269 0-3.355 2.815-5.502 7.054-5.502 2.292 0 4.132.63 5.341 1.767V53.8h3.338Zm-3.337 7.848c0-1.894-1.606-2.94-4.529-2.94-2.922 0-4.528 1.046-4.528 2.94s1.606 2.959 4.528 2.959c2.905 0 4.529-1.065 4.529-2.959Zm19.829-1.407v6.585h-3.067v-1.66c-1.3 1.281-3.068 1.877-5.792 1.877-3.789 0-5.737-1.137-5.737-3.32 0-2.111 1.876-3.121 6.278-3.338l5.25-.27c-.09-.939-1.37-1.408-3.842-1.408-2.617 0-4.655.541-6.622 1.768l-.054-.036v-2.796c2.02-.957 4.33-1.371 6.892-1.371 4.493 0 6.694 1.298 6.694 3.969Zm-3.067 2.057v-.163l-5.684.307c-1.678.09-2.49.451-2.49 1.137 0 .703.776 1.028 2.761 1.028 3.338 0 5.413-.902 5.413-2.31ZM78 56.273c2.273 0 4.258.45 6.116 1.407v3.03l-.072.019c-1.714-1.19-3.572-1.877-6.044-1.877-2.959 0-4.547.975-4.547 2.815 0 1.84 1.588 2.797 4.547 2.797 2.472 0 4.348-.668 6.044-1.859l.072.018v3.013c-1.858.957-3.843 1.408-6.116 1.408-4.944 0-7.885-2.111-7.885-5.377 0-3.284 2.941-5.395 7.885-5.395Zm23.217.288L93.675 68.65c-1.209 1.948-2.598 2.724-5.034 2.724h-.758v-2.436l.109-.072h.36c1.642 0 2.166-.379 2.941-1.678l.208-.346-6.757-10.28.054-.073h3.717l4.655 7.253 4.492-7.253h3.501l.054.072ZM15.625 66.827h3.68l-7.884-13.026H7.884L0 66.827h3.68l1.555-2.616h8.835l1.555 2.616ZM6.81 61.56l2.842-4.783 2.841 4.783H6.811Zm28.551-43.057c-7.456 0-13.5 6.044-13.5 13.5 0 7.455 6.045 13.5 13.5 13.5 7.456 0 13.5-6.045 13.5-13.5 0-7.456-6.044-13.5-13.5-13.5ZM55.414 0H36.142l24.355 45.501h19.271L55.414 0Z",fill:e})});break;case"Horizontal":i=I(n$,{width:"280",height:"55",ariaLabel:t,children:I("path",{d:"M140.988 24.131v21.48h-6.935v-3.3c-2.549 2.437-6.41 3.749-10.908 3.749-8.322 0-12.97-4.31-12.97-12.033v-9.896h6.935v8.922c0 5.398 2.511 7.947 7.872 7.947 5.698 0 9.071-2.737 9.071-9.56v-7.309h6.935Zm36.382-5.585V45.61h-6.934v-2.736c-2.399 2.062-6.036 3.186-10.834 3.186-9.146 0-14.919-4.049-14.919-10.946 0-6.972 5.848-11.433 14.657-11.433 4.76 0 8.584 1.312 11.096 3.674v-8.81h6.934Zm-6.934 16.306c0-3.936-3.337-6.11-9.409-6.11-6.073 0-9.409 2.174-9.409 6.11 0 3.936 3.336 6.148 9.409 6.148 6.035 0 9.409-2.212 9.409-6.148Zm41.197-2.924V45.61h-6.373v-3.448c-2.699 2.661-6.372 3.898-12.032 3.898-7.873 0-11.921-2.362-11.921-6.897 0-4.386 3.899-6.485 13.045-6.935l10.908-.562c-.187-1.95-2.849-2.924-7.984-2.924-5.435 0-9.671 1.124-13.757 3.673l-.113-.075v-5.81c4.199-1.987 8.997-2.849 14.32-2.849 9.334 0 13.907 2.7 13.907 8.247Zm-6.373 4.273v-.337l-11.808.637c-3.486.188-5.173.938-5.173 2.362 0 1.462 1.612 2.137 5.736 2.137 6.934 0 11.245-1.875 11.245-4.799Zm26.503-12.52c4.724 0 8.847.937 12.708 2.924v6.298l-.15.037c-3.561-2.474-7.422-3.898-12.558-3.898-6.147 0-9.446 2.024-9.446 5.848 0 3.823 3.299 5.81 9.446 5.81 5.136 0 9.034-1.387 12.558-3.861l.15.037v6.26c-3.861 1.987-7.984 2.924-12.708 2.924-10.271 0-16.381-4.386-16.381-11.17 0-6.823 6.11-11.209 16.381-11.209Zm48.237.6-15.669 25.116c-2.512 4.048-5.398 5.66-10.458 5.66h-1.575v-5.06l.225-.15h.75c3.411 0 4.498-.788 6.11-3.487l.432-.72-14.039-21.359.112-.15h7.722l9.671 15.07 9.334-15.07h7.272l.113.15Zm-177.831 21.33h7.647l-16.38-27.065h-7.348L69.707 45.61h7.647l3.23-5.435H98.94l3.229 5.435ZM83.858 34.663l5.904-9.936 5.903 9.936H83.858ZM27.064 31.973c0 7.473-6.058 13.532-13.532 13.532C6.06 45.505 0 39.446 0 31.972 0 24.5 6.059 18.44 13.532 18.44c7.474 0 13.532 6.059 13.532 13.532ZM33.633 0H14.314l24.413 45.61h19.318L33.632 0Z",fill:e})});break;default:i=I(n$,{width:"32",height:"32",ariaLabel:t,children:I("path",{d:"M7.83 27.299a6.705 6.705 0 1 0 0-13.41 6.705 6.705 0 0 0 0 13.41ZM18.78 4.701H9.208L21.305 27.3h9.571L18.78 4.7Z",fill:e})})}return I("span",{css:n,children:i})},S0e=({containerCss:t,logoCss:e,onClose:n,navigate:r,isHome:i})=>{const{t:s}=dn();return I("button",{type:"button",css:t,"aria-label":s("navigation.ariaLabels.logo"),onClick:()=>{n(),i?window.scrollTo(0,0):r(bi.Home)}
849,children:I(kDt,{containerCss:e,color:_e.white,variant:b0e.Horizontal})})},zA={container:{alignSelf:"center",borderRadius:"50%",height:20,position:"relative",width:20},line:{backgroundColor:_e.white,height:1,left:0,position:"absolute",top:0,transformOrigin:"left center",width:14,...Bt.transition(["width, transform"]),...Bt.reduceMotion(),"&:nth-of-type(1)":{transform:"translate3d(3px, 6px, 0)"},"&:nth-of-type(2)":{transform:"translate3d(3px, 13px, 0)"}},lineClosed:{width:18,"&:nth-of-type(1)":{transform:"translate3d(4px, 3px, 0) rotate(45deg)"},"&:nth-of-type(2)":{transform:"translate3d(4px, 16px, 0) rotate(-45deg)"}}},E0e=({ariaHidden:t,containerCss:e,containerRef:n,isMenuOpen:r,onClick:i,tabIndex:s=0})=>{const{t:a}=dn();return be("button",{type:"button","aria-expanded":r,"aria-haspopup":!0,"aria-hidden":t,"aria-label":a(r?"global.hamburger.close":"global.hamburger.open"),css:[zA.container,e],onClick:i,ref:n,tabIndex:s,children:[I("span",{css:[zA.line,r&&zA.lineClosed]}),I("span",{css:[zA.line,r&&zA.lineClosed]})]})},Ate={translateY:12},NDt={[fi.initial]:{y:Ate.translateY},[fi.animate]:{y:0,transition:{ease:"easeOut",duration:cu.navigationMenuOpen,type:"tween"}},[fi.exit]:{y:Ate.translateY,transition:{duration:cu.navigationMenuOpen/2}}},T0e={duration:cu.navigationPanel,ease:Mat.navigation,type:"tween"},_c={barHeight:70,logoHeight:23,logoWidth:118,verticalSpacingMd:42},Gs={container:{...Bt.verticalScrollBar,backgroundColor:_e.audacyDarkNavy,color:_e.white,overflowX:"hidden",overflowY:"scroll",padding:20,position:"fixed",top:_c.barHeight,width:xo.menuWidth[ve.Small],zIndex:Ai.navigationWithBranchJourney,[Be(ve.Medium)]:{borderTop:"none",padding:`${xo.navPadding[ve.Medium]}px 40px 0 85px`,top:0,width:xo.menuWidth[ve.Medium],zIndex:Ai.navigation},[Be(ve.Large)]:{padding:`${xo.navPadding[ve.Large]}px 20px 0 ${xo.navPadding[ve.Large]}px`,width:xo.menuWidth[ve.Large]}},innerContainer:{display:"flex",flexDirection:"column",height:`calc(100vh - ${_c.barHeight}px)`,position:"relative",[Be(ve.Medium)]:{height:`calc(100vh - ${xo.navPadding[ve.Medium]}px)`},[Zst(ve.Medium)]:{height:"-webkit-fit-available",paddingBottom:xo.navPadding[ve.Medium]},[Be(ve.Large)]:{height:`calc(100vh - ${xo.navPadding[ve.Large]}px)`}},bordered:{borderBottom:Ng.separator},navLinks:{[Be(ve.Medium)]:{marginTop:40},[Be(ve.Large)]:{marginTop:20}},linksList:{padding:`${xo.defaultPadding}px 0`,[Be(ve.Large)]:{width:142}},listItem:{display:"flex","&:not(:last-child)":{marginBottom:11}},logo:{alignItems:"center",display:"flex",height:_c.logoHeight,width:_c.logoWidth,...Bt.transition("opacity"),...Dr({opacity:.6})},close:{left:42,position:"absolute",top:25},loggedInContainer:{paddingTop:xo.defaultPadding},signInButton:{marginTop:20,[Be(ve.Medium)]:{marginTop:0}},bottomContainer:{paddingBottom:_c.barHeight,marginTop:10,[Be(ve.Medium)]:{marginTop:"auto",paddingBottom:xo.navPadding[ve.Large]}},joinText:{...cn.metadataSmall,paddingTop:xo.defaultPadding},joinButton:{marginTop:_c.barHeight,[Be(ve.Medium)]:{marginTop:20}},searchContainer:{position:"absolute",width:xo.searchWidth,right:xo.navPadding[ve.Large],top:xo.navPadding[ve.Large],zIndex:Ai.navigation}},MDt=({containerCss:t,innerContainerCss:e,closeButtonRef:n,isLoggedIn:r,logIn:i,onClose:s,sections:a,isMenuOpen:o,navigate:l,isHome:u})=>{var g;const{t:c}=dn(),{greaterThan:d,is:f}=Fs(),h=()=>{i(),s()};return I(bv.FadeInOut,{isVisible:o||d.MD,motionCss:[Gs.container,t||{}],transition:T0e,children:be("div",{children:[f.MD&&I(E0e,{containerRef:n,containerCss:Gs.close,isMenuOpen:o,onClick:s}),be(Il.div,{css:[Gs.innerContainer,e],variants:f.SM?NDt:{},...fi,children:[I(S0e,{navigate:l,isHome:u,containerCss:vF.mediumAndAbove,logoCss:Gs.logo,onClose:s}),be("nav",{css:Gs.navLinks,"aria-label":c("navigation.ariaLabels.main"),children:[I("ul",{css:[Gs.linksList,Gs.bordered],children:a.main.map(v=>I("li",{css:Gs.listItem,children:I(jA,{icon:en[v.iconRef],href:v.href,label:v.label,onClick:s})},v.id))}),r&&be("ul",{css:[Gs.linksList,Gs.bordered],children:[I("li",{css:Gs.listItem,children:I(jA,{href:a.myAudio.title.href,icon:en.Profile,label:a.myAudio.title.label,onClick:s})}),I("li",{css:Gs.listItem,children:I(jA,{href:a.settings.title.href,icon:en.Gear,label:a.settings.title.label,onClick:s})}),(g=a.myAudio.links)==null?void 0:g.map(v=>I("li",{css:Gs.listItem,children:I(Tte,{media:v.media,href:v.href,label:v.label,onClick:s})},v.id))]}),I("ul",{css:[Gs.linksList,!r&&Gs.bordered],children:a.all.map(v=>I("li",{css:Gs.listItem,children:I(jA,{hasArrow:!0,href:v.href,label:v.label,onClick:s})},v.id))})]}),ol.APP_MODE!=="production"&&I("div",{css:Gs.loggedInContainer,children:I(jA,{hasArrow:!0,href:a.devMenu.href,label:a.devMenu.label,onClick:s})}),!r&&be(Dn,{children:[I("div",{css:Gs.loggedInContainer,children:I(Tte,{buttonCss:Gs.signInButton,media:en.Account,label:c("navigation.signIn"),as:Fi.Button,onClick:h})}),be("div",{css:Gs.bottomContainer,children:[I(xv,{buttonCss:[Gs.joinButton,vF.smallOnly],label:c("navigation.join.buttonSm"),size:"Extended",theme:"White",onClick:h}),be("div",{css:vF.mediumAndAbove,children:[I("p",{css:Gs.joinText,children:c("navigation.join.description")}),I(xv,{buttonCss:Gs.joinButton,label:c("navigation.join.button"),onClick:h,size:"Small",theme:"White"})]})]})]})]})]})})},FDt=t=>{const{isLoggedIn:e,logIn:n}=Ax();return I(MDt,{isLoggedIn:e,isHome:location.pathname===bi.Home,logIn:n,...t})},$Dt={iconRef:"Music",label:"Music",id:"music",href:"/music"},BDt={iconRef:"Mic",label:"Podcasts",id:"podcasts",href:"/podcast"},UDt={iconRef:"Home",label:"For you",id:"home",href:bi.Home},VDt={iconRef:"Sports",label:"Sports",id:"sports",href:"/sports"},HDt={iconRef:"Broadcast",label:"News",id:"news",href:"/news"},jDt=[{label:"All podcasts",id:"all-podcasts",href:"/podcast/all"},{label:"All stations",id:"all-stations",href:"/stations"}],zDt={title:{label:"My audio",id:"myaudio",href:fw.MyAudio}},GDt={title:{label:"Settings",id:"settings",href:bi.Account}},WDt={label:"Dev Utilities",id:"devUtils",href:bi.Dev},qDt={main:[UDt,$Dt,BDt,VDt,HDt],all:jDt,devMenu:WDt,myAudio:zDt,settings:GDt};var kx=t=>t.type==="checkbox",l0=t=>t instanceof Date,Lu=t=>t==null;const A0e=t=>typeof t=="object";var no=t=>!Lu(t)&&!Array.isArray(t)&&A0e(t)&&!l0(t),w0e=t=>no(t)&&t.target?kx(t.target)?t.target.checked:t.target.value:t,KDt=t=>
vendor: 7,477 bytes, line 849
849t.substring(0,t.search(/\.\d+(\.|$)/))||t,_0e=(t,e)=>t.has(KDt(e)),YDt=t=>{const e=t.constructor&&t.constructor.prototype;return no(e)&&e.hasOwnProperty("isPrototypeOf")},sj=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function qa(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(sj&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(no(t)&&YDt(t)))return t;const r=n?[]:Object.create(Object.getPrototypeOf(t));for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=qa(t[i]));return r}var kN=t=>/^\w*$/.test(t),Ws=t=>t===void 0,aj=t=>Array.isArray(t)?t.filter(Boolean):[],oj=t=>aj(t.replace(/["|']|\]/g,"").split(/\.|\[/)),ln=(t,e,n)=>{if(!e||!no(t))return n;const r=(kN(e)?[e]:oj(e)).reduce((i,s)=>Lu(i)?i:i[s],t);return Ws(r)||r===t?Ws(t[e])?n:t[e]:r},bc=t=>typeof t=="boolean",nu=t=>typeof t=="function",ms=(t,e,n)=>{let r=-1;const i=kN(e)?[e]:oj(e),s=i.length,a=s-1;for(;++r<s;){const o=i[r];let l=n;if(r!==a){const u=t[o];l=no(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;t[o]=l,t=t[o]}};const WD={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xf={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Vp={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},lj=mt.createContext(null);lj.displayName="HookFormContext";const uj=()=>mt.useContext(lj),TMt=t=>{const{children:e,...n}=t;return mt.createElement(lj.Provider,{value:n},e)};var C0e=(t,e,n,r=!0)=>{const i={defaultValues:e._defaultValues};for(const s in t)Object.defineProperty(i,s,{get:()=>{const a=s;return e._proxyFormState[a]!==xf.all&&(e._proxyFormState[a]=!r||xf.all),n&&(n[a]=!0),t[a]}});return i};const cj=typeof window<"u"?mt.useLayoutEffect:mt.useEffect;function ZDt(t){const e=uj(),{control:n=e.control,disabled:r,name:i,exact:s}=t||{},[a,o]=mt.useState(n._formState),l=mt.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return cj(()=>n._subscribe({name:i,formState:l.current,exact:s,callback:u=>{!r&&o({...n._formState,...u})}}),[i,r,s]),mt.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),mt.useMemo(()=>C0e(a,n,l.current,!1),[a,n])}var Oc=t=>typeof t=="string",I6=(t,e,n,r,i)=>Oc(t)?(r&&e.watch.add(t),ln(n,t,i)):Array.isArray(t)?t.map(s=>(r&&e.watch.add(s),ln(n,s))):(r&&(e.watchAll=!0),n),O6=t=>Lu(t)||!A0e(t);function If(t,e,n=new WeakSet){if(O6(t)||O6(e))return Object.is(t,e);if(l0(t)&&l0(e))return Object.is(t.getTime(),e.getTime());const r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const s of r){const a=t[s];if(!i.includes(s))return!1;if(s!=="ref"){const o=e[s];if(l0(a)&&l0(o)||no(a)&&no(o)||Array.isArray(a)&&Array.isArray(o)?!If(a,o,n):!Object.is(a,o))return!1}}return!0}function QDt(t){const e=uj(),{control:n=e.control,name:r,defaultValue:i,disabled:s,exact:a,compute:o}=t||{},l=mt.useRef(i),u=mt.useRef(o),c=mt.useRef(void 0),d=mt.useRef(n),f=mt.useRef(r);u.current=o;const[h,g]=mt.useState(()=>{const x=n._getWatch(r,l.current);return u.current?u.current(x):x}),v=mt.useCallback(x=>{const P=I6(r,n._names,x||n._formValues,!1,l.current);return u.current?u.current(P):P},[n._formValues,n._names,r]),b=mt.useCallback(x=>{if(!s){const P=I6(r,n._names,x||n._formValues,!1,l.current);if(u.current){const N=u.current(P);If(N,c.current)||(g(N),c.current=N)}else g(P)}},[n._formValues,n._names,s,r]);cj(()=>((d.current!==n||!If(f.current,r))&&(d.current=n,f.current=r,b()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:x=>{b(x.values)}})),[n,a,r,b]),mt.useEffect(()=>n._removeUnmounted());const S=d.current!==n,A=f.current,w=mt.useMemo(()=>{if(s)return null;const x=!S&&!If(A,r);return S||x?v():null},[s,S,r,A,v]);return w!==null?w:h}function XDt(t){const e=uj(),{name:n,disabled:r,control:i=e.control,shouldUnregister:s,defaultValue:a,exact:o=!0}=t,l=_0e(i._names.array,n),u=mt.useMemo(()=>ln(i._formValues,n,ln(i._defaultValues,n,a)),[i,n,a]),c=QDt({control:i,name:n,defaultValue:u,exact:o}),d=ZDt({control:i,name:n,exact:o}),f=mt.useRef(t),h=mt.useRef(void 0),g=mt.useRef(i.register(n,{...t.rules,value:c,...bc(t.disabled)?{disabled:t.disabled}:{}}));f.current=t;const v=mt.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ln(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!ln(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ln(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ln(d.validatingFields,n)},error:{enumerable:!0,get:()=>ln(d.errors,n)}}),[d,n]),b=mt.useCallback(x=>g.current.onChange({target:{value:w0e(x),name:n},type:WD.CHANGE}),[n]),S=mt.useCallback(()=>g.current.onBlur({target:{value:ln(i._formValues,n),name:n},type:WD.BLUR}),[n,i._formValues]),A=mt.useCallback(x=>{const P=ln(i._fields,n);P&&P._f&&x&&(P._f.ref={focus:()=>nu(x.focus)&&x.focus(),select:()=>nu(x.select)&&x.select(),setCustomValidity:N=>nu(x.setCustomValidity)&&x.setCustomValidity(N),reportValidity:()=>nu(x.reportValidity)&&x.reportValidity()})},[i._fields,n]),w=mt.useMemo(()=>({name:n,value:c,...bc(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:b,onBlur:S,ref:A}),[n,r,d.disabled,b,S,A,c]);return mt.useEffect(()=>{const x=i._options.shouldUnregister||s,P=h.current;P&&P!==n&&!l&&i.unregister(P),i.register(n,{...f.current.rules,...bc(f.current.disabled)?{disabled:f.current.disabled}:{}});const N=(k,U)=>{const H=ln(i._fields,k);H&&H._f&&(H._f.mount=U)};if(N(n,!0),x){const k=qa(ln(i._options.defaultValues,n,f.current.defaultValue));ms(i._defaultValues,n,k),Ws(ln(i._formValues,n))&&ms(i._formValues,n,k)}return!l&&i.register(n),h.current=n,()=>{(l?x&&!i._state.action:x)?i.unregister(n):N(n,!1)}},[n,i,l,s]),mt.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),mt.useMemo(()=>({field:w,formState:d,fieldState:v}),[w,d,v])}const AMt=t=>t.render(XDt(t));var JDt=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},u_=t=>Array.isArray(t)?t:[t],wte=()=>{let t=[];return{get observers(){return t},next:i=>{for(const s of t)s.next&&s.next(i)},subscribe:i=>(t.push(i),{unsubscribe:()=>{t=t.filter(s=>s!==i)}}),unsubscribe:()=>{t=[]}}};function x0e(t,e){const n={};for(const r in t)if(t.hasOwnProperty(r)){const i=t[r],s=e[r];if(i&&no(i)&&s){const a=x0e(i,s);no(a)&&(n[r]=a)}else t[r]&&(n[r]=s)}return n}var Yl=t=>no(t)&&!Object.keys(t).length,dj=t=>t.type==="file",qD=t=>{if(!sj)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},I0e=t=>t.type==="select-multiple",fj=t=>t.type==="radio",ekt=t=>fj(t)||kx(t),r$=t=>qD(t)&&t.isConnected;function tkt(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=Ws(t)?r++:t[e[r++]];return t}function nkt(t){for(const e in t)if(t.hasOwnProperty(e)&&!Ws(t[e]))return!1;return!0}function Ka(t,e){const n=Array.isArray(e)?e:kN(e)?[e]:oj(e),r=n.length===1?t:tkt(t,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(no(r)&&Yl(r)||Array.isArray(r)&&nkt(r))&&Ka(t,n.slice(0,-1)),t}var rkt=t=>{for(const e in t)if(nu(t[e]))return!0;return!1};function O0e(t){return Array.isArray(t)||no(t)&&!rkt(t)}function P6(t,e={}){for(const n in t){const r=t[n];O0e(r)?(e[n]=Array.isArray(r)?[]:{},P6(r,e[n])):Ws(r)||(e[n]=!0)}return e}function US(t,e,n){n||(n=P6(e));for(const r in t){const i=t[r];
vendor: 4,417 bytes, line 849
849if(O0e(i))Ws(e)||O6(n[r])?n[r]=P6(i,Array.isArray(i)?[]:{}):US(i,Lu(e)?{}:e[r],n[r]);else{const s=e[r];n[r]=!If(i,s)}}return n}const _te={value:!1,isValid:!1},Cte={value:!0,isValid:!0};var P0e=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Ws(t[0].attributes.value)?Ws(t[0].value)||t[0].value===""?Cte:{value:t[0].value,isValid:!0}:Cte:_te}return _te},R0e=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Ws(t)?t:e?t===""?NaN:t&&+t:n&&Oc(t)?new Date(t):r?r(t):t;const xte={isValid:!1,value:null};var L0e=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,xte):xte;function Ite(t){const e=t.ref;return dj(e)?e.files:fj(e)?L0e(t.refs).value:I0e(e)?[...e.selectedOptions].map(({value:n})=>n):kx(e)?P0e(t.refs).value:R0e(Ws(e.value)?t.ref.value:e.value,t)}var ikt=(t,e,n,r)=>{const i={};for(const s of t){const a=ln(e,s);a&&ms(i,s,a._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},KD=t=>t instanceof RegExp,GA=t=>Ws(t)?t:KD(t)?t.source:no(t)?KD(t.value)?t.value.source:t.value:t,Ote=t=>({isOnSubmit:!t||t===xf.onSubmit,isOnBlur:t===xf.onBlur,isOnChange:t===xf.onChange,isOnAll:t===xf.all,isOnTouch:t===xf.onTouched});const Pte="AsyncFunction";var skt=t=>!!t&&!!t.validate&&!!(nu(t.validate)&&t.validate.constructor.name===Pte||no(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Pte)),akt=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Rte=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const c_=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const s=ln(t,i);if(s){const{_f:a,...o}=s;if(a){if(a.refs&&a.refs[0]&&e(a.refs[0],i)&&!r)return!0;if(a.ref&&e(a.ref,a.name)&&!r)return!0;if(c_(o,e))break}else if(no(o)&&c_(o,e))break}}};function Lte(t,e,n){const r=ln(t,n);if(r||kN(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),a=ln(e,s),o=ln(t,s);if(a&&!Array.isArray(a)&&n!==s)return{name:n};if(o&&o.type)return{name:s,error:o};if(o&&o.root&&o.root.type)return{name:`${s}.root`,error:o.root};i.pop()}return{name:n}}var okt=(t,e,n,r)=>{n(t);const{name:i,...s}=t;return Yl(s)||Object.keys(s).length>=Object.keys(e).length||Object.keys(s).find(a=>e[a]===(!r||xf.all))},lkt=(t,e,n)=>!t||!e||t===e||u_(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),ukt=(t,e,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:(n?r.isOnChange:i.isOnChange)?t:!0,ckt=(t,e)=>!aj(ln(t,e)).length&&Ka(t,e),dkt=(t,e,n)=>{const r=u_(ln(t,n));return ms(r,"root",e[n]),ms(t,n,r),t};function Dte(t,e,n="validate"){if(Oc(t)||Array.isArray(t)&&t.every(Oc)||bc(t)&&!t)return{type:n,message:Oc(t)?t:"",ref:e}}var PS=t=>no(t)&&!KD(t)?t:{value:t,message:""},kte=async(t,e,n,r,i,s)=>{const{ref:a,refs:o,required:l,maxLength:u,minLength:c,min:d,max:f,pattern:h,validate:g,name:v,valueAsNumber:b,mount:S}=t._f,A=ln(n,v);if(!S||e.has(v))return{};const w=o?o[0]:a,x=Z=>{i&&w.reportValidity&&(w.setCustomValidity(bc(Z)?"":Z||""),w.reportValidity())},P={},N=fj(a),k=kx(a),U=N||k,H=(b||dj(a))&&Ws(a.value)&&Ws(A)||qD(a)&&a.value===""||A===""||Array.isArray(A)&&!A.length,B=JDt.bind(null,v,r,P),q=(Z,C,L,V=Vp.maxLength,j=Vp.minLength)=>{const X=Z?C:L;P[v]={type:Z?V:j,message:X,ref:a,...B(Z?V:j,X)}};if(s?!Array.isArray(A)||!A.length:l&&(!U&&(H||Lu(A))||bc(A)&&!A||k&&!P0e(o).isValid||N&&!L0e(o).isValid)){const{value:Z,message:C}=Oc(l)?{value:!!l,message:l}:PS(l);if(Z&&(P[v]={type:Vp.required,message:C,ref:w,...B(Vp.required,C)},!r))return x(C),P}if(!H&&(!Lu(d)||!Lu(f))){let Z,C;const L=PS(f),V=PS(d);if(!Lu(A)&&!isNaN(A)){const j=a.valueAsNumber||A&&+A;Lu(L.value)||(Z=j>L.value),Lu(V.value)||(C=j<V.value)}else{const j=a.valueAsDate||new Date(A),X=ae=>new Date(new Date().toDateString()+" "+ae),G=a.type=="time",ie=a.type=="week";Oc(L.value)&&A&&(Z=G?X(A)>X(L.value):ie?A>L.value:j>new Date(L.value)),Oc(V.value)&&A&&(C=G?X(A)<X(V.value):ie?A<V.value:j<new Date(V.value))}if((Z||C)&&(q(!!Z,L.message,V.message,Vp.max,Vp.min),!r))return x(P[v].message),P}if((u||c)&&!H&&(Oc(A)||s&&Array.isArray(A))){const Z=PS(u),C=PS(c),L=!Lu(Z.value)&&A.length>+Z.value,V=!Lu(C.value)&&A.length<+C.value;if((L||V)&&(q(L,Z.message,C.message),!r))return x(P[v].message),P}
vendor: 4,336 bytes, line 849
849if(h&&!H&&Oc(A)){const{value:Z,message:C}=PS(h);if(KD(Z)&&!A.match(Z)&&(P[v]={type:Vp.pattern,message:C,ref:a,...B(Vp.pattern,C)},!r))return x(C),P}if(g){if(nu(g)){const Z=await g(A,n),C=Dte(Z,w);if(C&&(P[v]={...C,...B(Vp.validate,C.message)},!r))return x(C.message),P}else if(no(g)){let Z={};for(const C in g){if(!Yl(Z)&&!r)break;const L=Dte(await g[C](A,n),w,C);L&&(Z={...L,...B(C,L.message)},x(L.message),r&&(P[v]=Z))}if(!Yl(Z)&&(P[v]={ref:w,...Z},!r))return P}}return x(!0),P};const fkt={mode:xf.onSubmit,reValidateMode:xf.onChange,shouldFocusError:!0};function hkt(t={}){let e={...fkt,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:nu(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},i=no(e.defaultValues)||no(e.values)?qa(e.defaultValues||e.values)||{}:{},s=e.shouldUnregister?{}:qa(i),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...c};let f={...d};const h={array:wte(),state:wte()},g=e.criteriaMode===xf.all,v=me=>De=>{clearTimeout(u),u=setTimeout(me,De)},b=async me=>{if(!a.keepIsValid&&!e.disabled&&(d.isValid||f.isValid||me)){let De;e.resolver?(De=Yl((await U()).errors),S()):De=await B(r,!0),De!==n.isValid&&h.state.next({isValid:De})}},S=(me,De)=>{!e.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((me||Array.from(o.mount)).forEach(Me=>{Me&&(De?ms(n.validatingFields,Me,De):Ka(n.validatingFields,Me))}),h.state.next({validatingFields:n.validatingFields,isValidating:!Yl(n.validatingFields)}))},A=(me,De=[],Me,qe,ut=!0,Tt=!0)=>{if(qe&&Me&&!e.disabled){if(a.action=!0,Tt&&Array.isArray(ln(r,me))){const jt=Me(ln(r,me),qe.argA,qe.argB);ut&&ms(r,me,jt)}if(Tt&&Array.isArray(ln(n.errors,me))){const jt=Me(ln(n.errors,me),qe.argA,qe.argB);ut&&ms(n.errors,me,jt),ckt(n.errors,me)}if((d.touchedFields||f.touchedFields)&&Tt&&Array.isArray(ln(n.touchedFields,me))){const jt=Me(ln(n.touchedFields,me),qe.argA,qe.argB);ut&&ms(n.touchedFields,me,jt)}(d.dirtyFields||f.dirtyFields)&&(n.dirtyFields=US(i,s)),h.state.next({name:me,isDirty:Z(me,De),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ms(s,me,De)},w=(me,De)=>{ms(n.errors,me,De),h.state.next({errors:n.errors})},x=me=>{n.errors=me,h.state.next({errors:n.errors,isValid:!1})},P=(me,De,Me,qe)=>{const ut=ln(r,me);if(ut){const Tt=ln(s,me,Ws(Me)?ln(i,me):Me);Ws(Tt)||qe&&qe.defaultChecked||De?ms(s,me,De?Tt:Ite(ut._f)):V(me,Tt),a.mount&&!a.action&&b()}},N=(me,De,Me,qe,ut)=>{let Tt=!1,jt=!1;const on={name:me};if(!e.disabled){if(!Me||qe){(d.isDirty||f.isDirty)&&(jt=n.isDirty,n.isDirty=on.isDirty=Z(),Tt=jt!==on.isDirty);const wn=If(ln(i,me),De);jt=!!ln(n.dirtyFields,me),wn?Ka(n.dirtyFields,me):ms(n.dirtyFields,me,!0),on.dirtyFields=n.dirtyFields,Tt=Tt||(d.dirtyFields||f.dirtyFields)&&jt!==!wn}if(Me){const wn=ln(n.touchedFields,me);wn||(ms(n.touchedFields,me,Me),on.touchedFields=n.touchedFields,Tt=Tt||(d.touchedFields||f.touchedFields)&&wn!==Me)}Tt&&ut&&h.state.next(on)}return Tt?on:{}},k=(me,De,Me,qe)=>{const ut=ln(n.errors,me),Tt=(d.isValid||f.isValid)&&bc(De)&&n.isValid!==De;if(e.delayError&&Me?(l=v(()=>w(me,Me)),l(e.delayError)):(clearTimeout(u),l=null,Me?ms(n.errors,me,Me):Ka(n.errors,me)),(Me?!If(ut,Me):ut)||!Yl(qe)||Tt){const jt={...qe,...Tt&&bc(De)?{isValid:De}:{},errors:n.errors,name:me};n={...n,...jt},h.state.next(jt)}},U=async me=>(S(me,!0),await e.resolver(s,e.context,ikt(me||o.mount,r,e.criteriaMode,e.shouldUseNativeValidation))),H=async me=>{const{errors:De}=await U(me);if(S(me),me)for(const Me of me){const qe=ln(De,Me);qe?ms(n.errors,Me,qe):Ka(n.errors,Me)}else n.errors=De;return De},B=async(me,De,Me={valid:!0})=>{for(const qe in me){const ut=me[qe];if(ut){const{_f:Tt,...jt}=ut;if(Tt){const on=o.array.has(Tt.name),wn=ut._f&&skt(ut._f);wn&&d.validatingFields&&S([Tt.name],!0);const kr=await kte(ut,o.disabled,s,g,e.shouldUseNativeValidation&&!De,on);if(wn&&d.validatingFields&&S([Tt.name]),kr[Tt.name]&&(Me.valid=!1,De||t.shouldUseNativeValidation))break;!De&&(ln(kr,Tt.name)?on?dkt(n.errors,kr,Tt.name):ms(n.errors,Tt.name,kr[Tt.n
vendor: 6,147 bytes, line 849
849ame]):Ka(n.errors,Tt.name))}!Yl(jt)&&await B(jt,De,Me)}}return Me.valid},q=()=>{for(const me of o.unMount){const De=ln(r,me);De&&(De._f.refs?De._f.refs.every(Me=>!r$(Me)):!r$(De._f.ref))&&Le(me)}o.unMount=new Set},Z=(me,De)=>!e.disabled&&(me&&De&&ms(s,me,De),!If(ue(),i)),C=(me,De,Me)=>I6(me,o,{...a.mount?s:Ws(De)?i:Oc(me)?{[me]:De}:De},Me,De),L=me=>aj(ln(a.mount?s:i,me,e.shouldUnregister?ln(i,me,[]):[])),V=(me,De,Me={})=>{const qe=ln(r,me);let ut=De;if(qe){const Tt=qe._f;Tt&&(!Tt.disabled&&ms(s,me,R0e(De,Tt)),ut=qD(Tt.ref)&&Lu(De)?"":De,I0e(Tt.ref)?[...Tt.ref.options].forEach(jt=>jt.selected=ut.includes(jt.value)):Tt.refs?kx(Tt.ref)?Tt.refs.forEach(jt=>{(!jt.defaultChecked||!jt.disabled)&&(Array.isArray(ut)?jt.checked=!!ut.find(on=>on===jt.value):jt.checked=ut===jt.value||!!ut)}):Tt.refs.forEach(jt=>jt.checked=jt.value===ut):dj(Tt.ref)?Tt.ref.value="":(Tt.ref.value=ut,Tt.ref.type||h.state.next({name:me,values:qa(s)})))}(Me.shouldDirty||Me.shouldTouch)&&N(me,ut,Me.shouldTouch,Me.shouldDirty,!0),Me.shouldValidate&&ae(me)},j=(me,De,Me)=>{for(const qe in De){if(!De.hasOwnProperty(qe))return;const ut=De[qe],Tt=me+"."+qe,jt=ln(r,Tt);(o.array.has(me)||no(ut)||jt&&!jt._f)&&!l0(ut)?j(Tt,ut,Me):V(Tt,ut,Me)}},X=(me,De,Me={})=>{const qe=ln(r,me),ut=o.array.has(me),Tt=qa(De);ms(s,me,Tt),ut?(h.array.next({name:me,values:qa(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&Me.shouldDirty&&h.state.next({name:me,dirtyFields:US(i,s),isDirty:Z(me,Tt)})):qe&&!qe._f&&!Lu(Tt)?j(me,Tt,Me):V(me,Tt,Me),Rte(me,o)?h.state.next({...n,name:me,values:qa(s)}):h.state.next({name:a.mount?me:void 0,values:qa(s)})},G=async me=>{a.mount=!0;const De=me.target;let Me=De.name,qe=!0;const ut=ln(r,Me),Tt=wn=>{qe=Number.isNaN(wn)||l0(wn)&&isNaN(wn.getTime())||If(wn,ln(s,Me,wn))},jt=Ote(e.mode),on=Ote(e.reValidateMode);if(ut){let wn,kr;const Ir=De.type?Ite(ut._f):w0e(me),gi=me.type===WD.BLUR||me.type===WD.FOCUS_OUT,Ln=!akt(ut._f)&&!e.resolver&&!ln(n.errors,Me)&&!ut._f.deps||ukt(gi,ln(n.touchedFields,Me),n.isSubmitted,on,jt),Ua=Rte(Me,o,gi);ms(s,Me,Ir),gi?(!De||!De.readOnly)&&(ut._f.onBlur&&ut._f.onBlur(me),l&&l(0)):ut._f.onChange&&ut._f.onChange(me);const Qe=N(Me,Ir,gi),Ue=!Yl(Qe)||Ua;if(!gi&&h.state.next({name:Me,type:me.type,values:qa(s)}),Ln)return(d.isValid||f.isValid)&&(e.mode==="onBlur"?gi&&b():gi||b()),Ue&&h.state.next({name:Me,...Ua?{}:Qe});if(!gi&&Ua&&h.state.next({...n}),e.resolver){const{errors:Rt}=await U([Me]);if(S([Me]),Tt(Ir),qe){const Ut=Lte(n.errors,r,Me),zt=Lte(Rt,r,Ut.name||Me);wn=zt.error,Me=zt.name,kr=Yl(Rt)}}else S([Me],!0),wn=(await kte(ut,o.disabled,s,g,e.shouldUseNativeValidation))[Me],S([Me]),Tt(Ir),qe&&(wn?kr=!1:(d.isValid||f.isValid)&&(kr=await B(r,!0)));qe&&(ut._f.deps&&(!Array.isArray(ut._f.deps)||ut._f.deps.length>0)&&ae(ut._f.deps),k(Me,kr,wn,Qe))}},ie=(me,De)=>{if(ln(n.errors,De)&&me.focus)return me.focus(),1},ae=async(me,De={})=>{let Me,qe;const ut=u_(me);if(e.resolver){const Tt=await H(Ws(me)?me:ut);Me=Yl(Tt),qe=me?!ut.some(jt=>ln(Tt,jt)):Me}else me?(qe=(await Promise.all(ut.map(async Tt=>{const jt=ln(r,Tt);return await B(jt&&jt._f?{[Tt]:jt}:jt)}))).every(Boolean),!(!qe&&!n.isValid)&&b()):qe=Me=await B(r);return h.state.next({...!Oc(me)||(d.isValid||f.isValid)&&Me!==n.isValid?{}:{name:me},...e.resolver||!me?{isValid:Me}:{},errors:n.errors}),De.shouldFocus&&!qe&&c_(r,ie,me?ut:o.mount),qe},ue=(me,De)=>{let Me={...a.mount?s:i};return De&&(Me=x0e(De.dirtyFields?n.dirtyFields:n.touchedFields,Me)),Ws(me)?Me:Oc(me)?ln(Me,me):me.map(qe=>ln(Me,qe))},Q=(me,De)=>({invalid:!!ln((De||n).errors,me),isDirty:!!ln((De||n).dirtyFields,me),error:ln((De||n).errors,me),isValidating:!!ln(n.validatingFields,me),isTouched:!!ln((De||n).touchedFields,me)}),de=me=>{me&&u_(me).forEach(De=>Ka(n.errors,De)),h.state.next({errors:me?n.errors:{}})},le=(me,De,Me)=>{const qe=(ln(r,me,{_f:{}})._f||{}).ref,ut=ln(n.errors,me)||{},{ref:Tt,message:jt,type:on,...wn}=ut;ms(n.errors,me,{...wn,...De,ref:qe}),h.state.next({name:me,errors:n.errors,isValid:!1}),Me&&Me.shouldFocus&&qe&&qe.focus&&qe.focus()},ye=(me,De)=>nu(me)?h.state.subscribe({next:Me=>"values"in Me&&me(C(void 0,De),Me)}):C(me,De,!0),fe=me=>h.state.subscribe({next:De=>{lkt(me.name,De.name,me.exact)&&okt(De,me.formState||d,ht,me.reRenderRoot)&&me.callback({values:{...s},...n,...De,defaultValues:i})}}).unsubscribe,We=me=>(a.mount=!0,f={...f,...me.formState},fe({...me,formState:{...c,...me.formState}})),Le=(me,De={})=>{for(const Me of me?u_(me):o.mount)o.mount.delete(Me),o.array.delete(Me),De.keepValue||(Ka(r,Me),Ka(s,Me)),!De.keepError&&Ka(n.errors,Me),!De.keepDirty&&Ka(n.dirtyFields,Me),!De.keepTouched&&Ka(n.touchedFields,Me),!De.keepIsValidating&&Ka(n.validatingFields,Me),!e.shouldUnregister&&!De.keepDefaultValue&&Ka(i,Me);h.state.next({values:qa(s)}),h.state.next({...n,...De.keepDirty?{isDirty:Z()}:{}}),!De.keepIsValid&&b()},Ve=({disabled:me,name:De})=>{(bc(me)&&a.mount||me||o.disabled.has(De))&&(me?o.disabled.add(De):o.disabled.delete(De))},at=(me,De={})=>{let Me=ln(r,me);const qe=bc(De.disabled)||bc(e.disabled);return ms(r,me,{...Me||{},_f:{...Me&&Me._f?Me._f:{ref:{name:me}},name:me,mount:!0,...De}}),o.mount.add(me),Me?Ve({disabled:bc(De.disabled)?De.disabled:e.disabled,name:me}):P(me,!0,De.value),{...qe?{disabled:De.disabled||e.disabled}:{},...e.progressive?{required:!!De.required,min:GA(De.min),max:GA(De.max),minLength:GA(De.minLength),maxLength:GA(De.maxLength),pattern:GA(De.pattern)}:{},name:me,onChange:G,onBlur:G,ref:ut=>{if(ut){at(me,De),Me=ln(r,me);const Tt=Ws(ut.value)&&ut.querySelectorAll&&ut.querySelectorAll("input,select,textarea")[0]||ut,jt=ekt(Tt),on=Me._f.refs||[];if(jt?on.find(wn=>wn===Tt):Tt===Me._f.ref)return;ms(r,me,{_f:{...Me._f,...jt?{refs:[...on.filter(r$),Tt,...Array.isArray(ln(i,me))?[{}]:[]],ref:{type:Tt.type,name:me}}:{ref:Tt}}}),P(me,!1,void 0,Tt)}else Me=ln(r,me,{}),Me._f&&(Me._f.mount=!1),(e.shouldUnregister||De.shouldUnregister)&&!(_0e(o.array,me)&&a.action)&&o.unMount.add(me)}}},Et=()=>e.shouldFocusError&&c_(r,ie,o.mount),ne=me=>{bc(me)&&(h.state.next({disabled:me}),c_(r,(De,Me)=>{const qe=ln(r,Me);qe&&(De.disabled=qe._f.disabled||me,Array.isArray(qe._f.refs)&&qe._f.refs.forEac
vendor: 4,434 bytes, line 849
849h(ut=>{ut.disabled=qe._f.disabled||me}))},0,!1))},Ze=(me,De)=>async Me=>{let qe;Me&&(Me.preventDefault&&Me.preventDefault(),Me.persist&&Me.persist());let ut=qa(s);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:Tt,values:jt}=await U();S(),n.errors=Tt,ut=qa(jt)}else await B(r);if(o.disabled.size)for(const Tt of o.disabled)Ka(ut,Tt);if(Ka(n.errors,"root"),Yl(n.errors)){h.state.next({errors:{}});try{await me(ut,Me)}catch(Tt){qe=Tt}}else De&&await De({...n.errors},Me),Et(),setTimeout(Et);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Yl(n.errors)&&!qe,submitCount:n.submitCount+1,errors:n.errors}),qe)throw qe},lt=(me,De={})=>{ln(r,me)&&(Ws(De.defaultValue)?X(me,qa(ln(i,me))):(X(me,De.defaultValue),ms(i,me,qa(De.defaultValue))),De.keepTouched||Ka(n.touchedFields,me),De.keepDirty||(Ka(n.dirtyFields,me),n.isDirty=De.defaultValue?Z(me,qa(ln(i,me))):Z()),De.keepError||(Ka(n.errors,me),d.isValid&&b()),h.state.next({...n}))},ot=(me,De={})=>{const Me=me?qa(me):i,qe=qa(Me),ut=Yl(me),Tt=ut?i:qe;if(De.keepDefaultValues||(i=Me),!De.keepValues){if(De.keepDirtyValues){const jt=new Set([...o.mount,...Object.keys(US(i,s))]);for(const on of Array.from(jt)){const wn=ln(n.dirtyFields,on),kr=ln(s,on),Ir=ln(Tt,on);wn&&!Ws(kr)?ms(Tt,on,kr):!wn&&!Ws(Ir)&&X(on,Ir)}}else{if(sj&&Ws(me))for(const jt of o.mount){const on=ln(r,jt);if(on&&on._f){const wn=Array.isArray(on._f.refs)?on._f.refs[0]:on._f.ref;if(qD(wn)){const kr=wn.closest("form");if(kr){kr.reset();break}}}}if(De.keepFieldsRef)for(const jt of o.mount)X(jt,ln(Tt,jt));else r={}}s=e.shouldUnregister?De.keepDefaultValues?qa(i):{}:qa(Tt),h.array.next({values:{...Tt}}),h.state.next({values:{...Tt}})}o={mount:De.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!De.keepIsValid||!!De.keepDirtyValues||!e.shouldUnregister&&!Yl(Tt),a.watch=!!e.shouldUnregister,a.keepIsValid=!!De.keepIsValid,a.action=!1,De.keepErrors||(n.errors={}),h.state.next({submitCount:De.keepSubmitCount?n.submitCount:0,isDirty:ut?!1:De.keepDirty?n.isDirty:!!(De.keepDefaultValues&&!If(me,i)),isSubmitted:De.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ut?{}:De.keepDirtyValues?De.keepDefaultValues&&s?US(i,s):n.dirtyFields:De.keepDefaultValues&&me?US(i,me):De.keepDirty?n.dirtyFields:{},touchedFields:De.keepTouched?n.touchedFields:{},errors:De.keepErrors?n.errors:{},isSubmitSuccessful:De.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},se=(me,De)=>ot(nu(me)?me(s):me,{...e.resetOptions,...De}),Fe=(me,De={})=>{const Me=ln(r,me),qe=Me&&Me._f;if(qe){const ut=qe.refs?qe.refs[0]:qe.ref;ut.focus&&setTimeout(()=>{ut.focus(),De.shouldSelect&&nu(ut.select)&&ut.select()})}},ht=me=>{n={...n,...me}},pt={control:{register:at,unregister:Le,getFieldState:Q,handleSubmit:Ze,setError:le,_subscribe:fe,_runSchema:U,_updateIsValidating:S,_focusError:Et,_getWatch:C,_getDirty:Z,_setValid:b,_setFieldArray:A,_setDisabledField:Ve,_setErrors:x,_getFieldArray:L,_reset:ot,_resetDefaultValues:()=>nu(e.defaultValues)&&e.defaultValues().then(me=>{se(me,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:q,_disableForm:ne,_subjects:h,_proxyFormState:d,get _fields(){return r},get _formValues(){return s},get _state(){return a},set _state(me){a=me},get _defaultValues(){return i},get _names(){return o},set _names(me){o=me},get _formState(){return n},get _options(){return e},set _options(me){e={...e,...me}}},subscribe:We,trigger:ae,register:at,handleSubmit:Ze,watch:ye,setValue:X,getValues:ue,reset:se,resetField:lt,clearErrors:de,unregister:Le,setError:le,setFocus:Fe,getFieldState:Q};return{...pt,formControl:pt}}function pkt(t={}){const e=mt.useRef(void 0),n=mt.useRef(void 0),[r,i]=mt.useState({isDirty:!1,isValidating:!1,isLoading:nu(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:nu(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!nu(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:a,...o}=hkt(t);e.current={...o,formState:r}}const s=e.current.control;return s._options=t,cj(()=>{const a=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}
849),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),s._formState.isReady=!0,a},[s]),mt.useEffect(()=>s._disableForm(t.disabled),[s,t.disabled]),mt.useEffect(()=>{t.mode&&(s._options.mode=t.mode),t.reValidateMode&&(s._options.reValidateMode=t.reValidateMode)},[s,t.mode,t.reValidateMode]),mt.useEffect(()=>{t.errors&&(s._setErrors(t.errors),s._focusError())},[s,t.errors]),mt.useEffect(()=>{t.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,t.shouldUnregister]),mt.useEffect(()=>{if(s._proxyFormState.isDirty){const a=s._getDirty();a!==r.isDirty&&s._subjects.state.next({isDirty:a})}},[s,r.isDirty]),mt.useEffect(()=>{var a;t.values&&!If(t.values,n.current)?(s._reset(t.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((a=s._options.resetOptions)===null||a===void 0)&&a.keepIsValid||s._setValid(),n.current=t.values,i(o=>({...o}))):s._resetDefaultValues()},[s,t.values]),mt.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),e.current.formState=C0e(r,s),e.current}const R0={container:{backgroundColor:_e.white15,borderRadius:6,display:"flex",width:"100%",position:"relative"},iconContainer:{position:"absolute",top:0,left:0,height:"100%",width:46,display:"flex",alignItems:"center",justifyContent:"center",[Be(ve.Large)]:{left:8,width:40}},clearIconContainer:{position:"relative"},iconClear:{position:"absolute",right:15,top:10,[Be(ve.Large)]:{right:20,top:15}},input:{...Bt.focusOutline({}),backgroundColor:"transparent",border:"none",outline:"none",width:"100%",margin:0,height:40,padding:"12px 40px 12px 41px",[Be(ve.Small)]:{fontSize:16},[Be(ve.Medium)]:{...cn.metadataSmall},[Be(ve.Large)]:{height:50,padding:"12px 40px 12px 48px"},"::placeholder":{color:_e.white60}},form:{width:"100%"},clearButton:{opacity:.6}},gkt=({name:t,onChange:e,register:n,tabIndex:r})=>{const{t:i}=dn();return I("input",{...n(t),css:[R0.input],placeholder:i("searchNavLandingScreen.overview.searchInput.placeholder"),tabIndex:r,type:"text",autoComplete:"off",onChange:e})},mkt=()=>{const{t}=dn();return be(Dn,{children:[I("label",{htmlFor:"term",css:aC.visHidden,children:t("searchNavLandingScreen.overview.searchInput.accessibilityLabel")}),I("span",{css:[R0.iconContainer],children:I(Yr,{name:en.Search,sizeInPx:16})})]})},vkt=({showClearButton:t,onClear:e})=>{const{t:n}=dn();return I(Dn,{children:t&&I("span",{css:[R0.clearIconContainer],children:I(Mc,{buttonCss:R0.iconClear,icon:en.Close,ariaLabel:n("searchNavLandingScreen.overview.searchInput.clearSearch"),buttonSizeInPx:20,iconSizeInPx:10,theme:Um.Fill,onClick:e,css:R0.clearButton})})})},ykt=t=>({get:e=>{const n=t.getObjectSync(e);return n?bkt(n):null},pageLength:t.getNumInCore(),total:t.getNum()}),bkt=t=>{var e,n,r,i;return{entitySubtype:t.getEntitySubtype(),entityType:t.getEntityType(),genres:t.getGenres(),id:t==null?void 0:t.getId(),image:(e=t.getImages())==null?void 0:e.square,imageAlt:(n=t.getImages())==null?void 0:n.alt,marketTitle:t.getMarketTitle(),author:"getAuthor"in t?t.getAuthor():void 0,title:t.getTitle(),url:t.getUrl()??void 0,duration:"getDuration"in t?t.getDuration():void 0,itemsIdList:"getItemsIdList"in t?t.getItemsIdList():void 0,showContentId:"getParentShowId"in t?t.getParentShowId():void 0,publishDate:"getPublishDate"in t?sl(t.getPublishDate()):void 0,parentTitle:"getParentTitle"in t?t.getParentTitle():"getParentStation"in t?(r=t.getParentStation())==null?void 0:r.getTitle():void 0,parentImage:"getParentImageSquare"in t?t.getParentImageSquare():void 0,parentGenres:"getParentStation"in t?(i=t.getParentStation())==null?void 0:i.getGenres():void 0,updateDate:"getUpdatedDate"in t?sl(t.getUpdatedDate(
849)):void 0}};var R6=(t=>(t.FeaturedResults="featuredResults",t.Results="results",t))(R6||{}),D0e=(t=>(t.ALL="All",t.PODCASTS="Podcasts",t.SHOWS="Shows",t.STATIONS="Stations",t.EPISODES="Episodes",t.PLAYLISTS="Playlists",t.TOPICS="Topics",t))(D0e||{});const Skt={All:{entitySubtypes:[],entityTypes:[],excludeEntitySubtypes:[],excludeEntityTypes:[gt.EPISODE]},Podcasts:{entitySubtypes:[ui.PODCAST],entityTypes:[],excludeEntitySubtypes:[],excludeEntityTypes:[gt.EPISODE]},Shows:{entitySubtypes:[],entityTypes:[gt.SHOW],excludeEntitySubtypes:[ui.PODCAST],excludeEntityTypes:[gt.EPISODE]},Stations:{entitySubtypes:[],entityTypes:[gt.STATION],excludeEntitySubtypes:[],excludeEntityTypes:[gt.EPISODE]},Episodes:{entitySubtypes:[Vn.PODCAST_EPISODE],entityTypes:[gt.EPISODE],excludeEntitySubtypes:[ui.PODCAST],excludeEntityTypes:[gt.SHOW,gt.STATION]},Playlists:{entitySubtypes:[iT.PLAYLIST],entityTypes:[gt.COLLECTION],excludeEntitySubtypes:[],excludeEntityTypes:[]},Topics:{entitySubtypes:[],entityTypes:[gt.TAG,gt.TOPIC],excludeEntitySubtypes:[],excludeEntityTypes:[]}},i$={defaultRequest:{...Skt.Stations,page:0,term:""},emptyAllResults:{featuredResults:[],results:[],totalResults:0},minTermLength:1,defaultSearchAssistantProps:{audacyAssistantFlag:"No",audacyAssistantSessionId:"",audacyAssistantUserId:"",audacyAssistantUtterance:""}},Ekt=(t,e)=>{const{pageLength:n,get:r,total:i}=e,s=t===0?t+n-1:t+n,a=[];for(let u=t;u<=s;u++){const c=r(u);c&&a.push(c)}const o=a.filter(u=>u.isFeatured),l=a.filter(u=>!u.isFeatured);return{[R6.FeaturedResults]:o,[R6.Results]:l,totalResults:i}},wMt=({searchType:t,getViewContext:e})=>{const n=$.useRef(0),{clientServices:r,loading:i}=Fa(),[s,a]=$.useState(i$.emptyAllResults),[o,l]=$.useState(!0),u=$.useCallback(()=>{a(i$.emptyAllResults)},[]),c=$.useCallback(d=>{if(i||d.term.length<i$.minTermLength)return;d.page===0&&u(),n.current++;const f=n.current;l(!0);let h={};t.includes("Audacy Assistant")?d.searchAssistantProps&&(h=d.searchAssistantProps):h.audacyAssistantFlag="No",r.getAnalyticServices().sendSearchEvent(e(),d.term,t,t==="Onboarding"),r.getDataServices().search(d.term,d.entityTypes,d.entitySubtypes,d.excludeEntityTypes,d.excludeEntitySubtypes,d.page).then(g=>{f===n.current&&a(v=>{const b=ykt(g),S=v.results.length,A=S>0?S-1:0,w=Ekt(A,b);return{featuredResults:[...v.featuredResults,...w.featuredResults],results:[...v.results,...w.results],totalResults:w.totalResults}})}).finally(()=>{f===n.current&&l(!1)})},[i,t,r,e,u]);return{allResults:s,clearAllResults:u,getSearchResults:c,isLoading:o,setIsLoading:l}},_Mt=Yn({default:D0e.STATIONS,key:"searchTabState"}),Tkt=Yn({default:"",key:"searchQueryState"}),rf="term",k0e=({tabIndex:t,onSubmitCallback:e})=>{const[n,r]=Xk(),i=decodeURIComponent(n.get(rf)??""),s=!!Qoe({path:bi.Search}),a=rT(),o=Qs(Tkt),{register:l,handleSubmit:u,setFocus:c,getValues:d,setValue:f}=pkt({defaultValues:{[rf]:i}});$.useEffect(()=>{i&&g(i)},[]);const h=d(rf).length>0,g=$.useMemo(()=>Mi.debounce(w=>{r({[rf]:w},{replace:!0}),o(w)},500),[r,o]),v=$.useCallback(w=>{f(rf,w.target.value),s&&g(w.target.value)},[s,g,f]),b=$.useCallback(()=>{c(rf),f(rf,"")},[c,f]),S=$.useMemo(()=>Mi.debounce(w=>{s?r({[rf]:w},{replace:!0}):a({pathname:bi.Search,search:`?${rf}=${encodeURIComponent(w)}`}),o(w)},500),[s,a,r,o]),A=w=>{S(w[rf]),e==null||e()};return I("form",{action:bi.Search,css:R0.form,onSubmit:u(A),children:be("div",{css:[R0.container],children:[I(mkt,{}),I(gkt,{type:"search",name:rf,onChange:v,register:l,tabIndex:t}),I(vkt,{showClearButton:h,onClear:b})]})})},ph={container:{alignItems:"center",backgroundColor:_e.audacyDarkNavy,borderBottom:Ng.separator,display:"flex",height:_c.barHeight,justifyContent:"space-between",padding:"15px 20px",position:"fixed",width:"100%",zIndex:Ai.navigationBarSmall,[Be(ve.Medium)]:{padding:`0 ${_c.verticalSpacingMd}px`,zIndex:Ai.navigationBar},"&::before":{content:'""',backgroundColor:_e.audacyDarkNavy,position:"absolute",left:0,top:"-100vh",height:"100vh",width:"100%"}},brandLink:{...Bt.transition(["transform"],cu.navigationMenuOpen),...Bt.reduceMotion()},brandLinkOpen:{transform:`translate3d(calc(50vw - ${_c.logoWidth}px), 0, 0)`},logo:{alignItems:"center",display:"flex",height:_c.logoHeight,width:_c.logoWidth},navLeft:{display:"flex",gap:23},navLeftSmall:{width:"100%"},navRight:{display:"flex",gap:17,[Be(ve.Medium)]:{gap:20}},navRightSearchOpen:{position:"absolute",width:"100%",left:0,padding:"0 20px",backgroundColor:_e.audacyDarkNavy},getAppButton:{alignSelf:"center"}
849,searchButtonMobile:{alignSelf:"center",[Be(ve.Medium)]:{display:"none"}}},Akt=({onClose:t,navigate:e,isHome:n,isMenuOpen:r,onClickMenu:i,isLoggedIn:s,shouldShowSearch:a},o)=>{const[l,u]=$.useState(!1),{is:c,greaterThan:d,lessThan:f}=Fs(),{t:h}=dn(),g=r&&f.LG,v=r&&c.MD,b=r&&c.SM,S=l||d.SM,A=g?-1:0,w=()=>{u(P=>!P)},x=l?I(Mg,{as:Fi.Button,ariaLabel:h("global.search.close"),onClick:w,ariaHidden:b,tabIndex:A,isTiny:!0,children:"Cancel"}):I(Mc,{ariaHasPopup:!0,ariaHidden:b,ariaLabel:h("global.search.open"),css:ph.searchButtonMobile,icon:en.Search,onClick:w,tabIndex:A});return be("nav",{"aria-label":h("navigation.ariaLabels.main"),css:ph.container,ref:o,children:[be("div",{css:[ph.navLeft,b&&ph.navLeftSmall],children:[I(E0e,{ariaHidden:v,onClick:i,isMenuOpen:r,tabIndex:v?-1:0}),I(S0e,{isHome:n,navigate:e,onClose:t,containerCss:[ph.brandLink,b&&!s?ph.brandLinkOpen:{}],logoCss:ph.logo})]}),be("div",{css:[ph.navRight,l&&c.SM&&ph.navRightSearchOpen],children:[s&&I(xv,{buttonCss:ph.getAppButton,label:h("global.getTheApp"),onClick:()=>console.info("get app"),theme:"Secondary",size:"Small",tabIndex:A}),a&&be(Dn,{children:[S&&I(k0e,{tabIndex:A,onSubmitCallback:w}),c.SM&&x]})]})]})},wkt=$.forwardRef(Akt),_kt=t=>{var n,r;const e=t.find(i=>i.type===gn.VIEW_TITLE);return(r=(n=e==null?void 0:e.config)==null?void 0:n.titleFragments)==null?void 0:r.join(" ")},Ckt=({onOpen:t,onClose:e})=>{const[n,r]=$.useState(!1),[i,s]=$.useState(),{t:a}=dn(),{showToast:o}=gu(),l=$.useCallback(({data_parsed:d})=>{if("action"in d)switch(d.action){case"REAUTHENTICATE":o({title:a("authState.resetPassword.success")});break}},[o,a]);$.useEffect(()=>(!n&&i&&(()=>{const f={no_journeys:!0};zy.init(ol.BRANCH_API_KEY,f,(h,g)=>{g&&l(g),r(!0)})})(),()=>zy.closeJourney()),[l,n,i]);const u=Rd();return $.useEffect(()=>{n&&zy.closeJourney()},[n,u]),$.useEffect(()=>{zy.addListener(void 0,d=>{d==="didShowJourney"?t==null||t():d==="didClickJourneyClose"&&(e==null||e())})},[t,e]),{branchJourneyElement:I("div",{className:"branch-journeys-top"}),metadata:i,onPageLoad:({view:d,viewContext:f}={})=>
849{if(f){const{viewId:h}=f;let g={viewId:h,viewType:"",title:""};if(d){if(g={...g,viewType:d.type,title:_kt(d.modules)||""},d.rootObject){const v=d.rootObject;g={...g,title:v.title,contentId:v.id,entityType:v.type,entitySubtype:v.subtype,description:v.description&&!_de(v.description)?v.description:void 0,image:v.image,category:v.category,genre:v.genres?v.genres.join(","):void 0,market:v.marketTitle}}s(g)}zy.setBranchViewData({data:g})}zy.track("pageview")}}},xkt=()=>{const[t,e]=$.useState(!1),n=$.useRef(null),{is:r}=Fs(),i=()=>e(!1),s=()=>{e(a=>!a)};return $.useEffect(()=>{var a;t&&r.MD&&((a=n==null?void 0:n.current)==null||a.focus())},[t,r]),{closeButtonRef:n,isMenuOpen:t,handleCloseMenu:i,handleToggleMenu:s}},Ikt=()=>{const{logOut:t}=Ax(),{clientServices:e}=Fa(),n=!!Qoe({path:bi.Search}),{t:r}=dn(),i=Ht(kg),s=e==null?void 0:e.getPersonalizationServices();$.useEffect(()=>(i?s.setEventListener(()=>{console.warn(r("authState.sessionExpired"),r("authState.logInAgain"),[{onPress:t,text:r("global.ok")}])}):s.setEventListener(void 0),()=>s.setEventListener(void 0)),[i,t,s,r]),$.useEffect(()=>{i?y0e():p0e(void 0)},[i]);const{is:a,lessThan:o,isLoading:l}=Fs(),{isMenuOpen:u,handleCloseMenu:c,handleToggleMenu:d,closeButtonRef:f}=xkt(),h=rT(),v=Rd().pathname===bi.Home,b=$.useRef(null),S=$.useRef(null),[A,w]=$.useState({}),[x,P]=$.useState({}),N=u&&a.MD,k=u&&a.SM,{branchJourneyElement:U}=Ckt({onOpen:c,onClose:c});return _D(N||k,S.current),$.useEffect(()=>{if(b.current){const H=b.current.offsetTop;H>0?(w({top:_c.barHeight+H,[Be(ve.Medium)]:{top:`${H}px`}}),P({height:`calc(100vh - ${_c.barHeight+H}px)`,[Be(ve.Medium)]:{height:`calc(100vh - ${xo.navPadding[ve.Medium]+H}px)`}})):(w({}),P({}))}},[u]),l?null:be(Dn,{children:[U,I("div",{children:I(W2,{active:k||N,children:be("header",{children:[o.LG?I(wkt,{isMenuOpen:u,onClickMenu:d,shouldShowSearch:!n||n&&a.MD,ref:b,navigate:h,isHome:v,onClose:c}):!n&&I("div",{css:Gs.searchContainer,children:I(k0e,{})}),be("div",{ref:S,children:[I(FDt,{isMenuOpen:u,onClose:c,closeButtonRef:f,sections:qDt,containerCss:A,innerContainerCss:x,isHome:v,navigate:h}),I(Xpe,{isAnimated:!0,isVisible:N,onClick:d,motionTransition:T0e,zIndex:Ai.navOverlay})]})]})})})]})},Okt=()=>{const{clientServices:t,loading:e}=Fa(),n=Qs(VV),r=Qs(iN),i=Qs(ipe),s=Qs(sN);return $.useEffect(()=>{if(!e){const a=({currentId:o,items:l,itemsRemoved:u})=>{s({currentId:o??"",items:l.map(c=>Oge(c))}),n(!!u),i(Date.now()),r(!1)};return t.getPersonalizationServices().addQueueListener(a),()=>t.getPersonalizationServices().removeQueueListener(a)}},[t,e,n,r,i,s]),null},Pkt=()=>{var a,o;const{clientServices:t,loading:e}=Fa(),n=Oet(),r=Ht(ws),i=$.useMemo(()=>{var l,u;return((l=r==null?void 0:r.episodeDataObject)==null?void 0:l.episodeId)||((u=r==null?void 0:r.dataObject)==null?void 0:u.id)||""},[(a=r==null?void 0:r.dataObject)==null?void 0:a.id,(o=r==null?void 0:r.episodeDataObject)==null?void 0:o.episodeId]),s=Ht(kg);return $.useEffect(()=>{n(!0)},[s,n]),$.useEffect(()=>{if(e)return;const l=setTimeout(()=>{n(!0)},1e3);return()=>clearTimeout(l)},[n,t,i,e]),null},Rkt=()=>{const{t}=dn(),e=Ht(KV),{isLoggedIn:n}=Ax(),r=Yu(),[i,s]=$.useState(!1),[a]=Xk(),{isIdle:o,duration:l}=Hc(),u=Ht(ws),c={startTime:void 0,endTime:void 0,subtype:void 0},{startTime:d,endTime:f,subtype:h}=(u==null?void 0:u.episodeDataObject)||c,{follow:g}=Mge(TT()),{showToast:v}=gu(),b=Oa(Z=>Z.setDuration);$.useEffect(()=>{l&&b(l)},[l,b]);const S=Qs(Tb),A=a.get(vf.Action),w=a.get(vf.ActionContentId),x=a.get(vf.ActionOffset),P=a.get(vf.utmCampaign),N=a.get(vf.utmContent),k=a.get(vf.utmMedium),U=a.get(vf.utmSource),H=a.get(vf.utmTerm),B=$.useCallback(()=>{w&&n&&g(w,{onSuccess:C=>{v({cta:{action:()=>{C()},title:t("global.undo")},title:t("entityHeader.followSuccess",{title:w})})},onError:C=>{v({cta:{action:C,title:t("global.retry")},title:t("entityHeader.followError",{title:w})})},onUndoError:C=>{v({cta:{action:C,title:t("global.retry")},title:t("entityHeader.undoError")})}})},[w,g,n,v,t]),q=$.useCallback(Z=>{w&&o&&r.playFromId(w,{feature:Ei.EXTERNAL},{...x&&{startOffset:Number(x)},viewId:Z,autoPlay:!1}
849)},[r,w,x,o]);return $.useEffect(()=>{if(x&&h===Vn.BROADCAST_SHOW_EPISODE){const Z=d/1e3,C=f/1e3,L=Number(x),V=C-Z,j=L-Z;V<=j?S({duration:l,offset:0,playbackFraction:0}):S({duration:V,offset:j,playbackFraction:j/V,remaining:V-j});return}if(x&&l){const Z=Number(x);l<=Z?S({duration:l,offset:0,playbackFraction:0}):S({duration:l,offset:Z,playbackFraction:Z/l,remaining:l-Z})}},[l,x,S,f,d,h]),$.useEffect(()=>{if(!(!e||!A||i)){switch(A){case mg.AutoplayFull:q(_n.Player);break;case mg.AutoplayMini:q();break;case mg.Follow:B();break}s(!0)}},[q,i,e,o,B,A,w]),$.useEffect(()=>{(P||N||k||U||H)&&Uf().then(Z=>Z.getPersonalizationServices().setCampaignData({content:N==null?void 0:N.toString(),medium:k==null?void 0:k.toString(),name:P==null?void 0:P.toString(),source:U==null?void 0:U.toString(),term:H==null?void 0:H.toString()}))},[P,N,k,U,H]),I(Dn,{})},Lkt=$.memo(Rkt),Dkt=()=>{const t=Qs(mV);return $.useEffect(()=>{const e=localStorage.getItem("featureFlags");e&&t(JSON.parse(e))},[t]),I(Dn,{})},kkt=()=>{const t=Qs(A2);return $.useEffect(()=>{(async()=>{var s;const n=localStorage.getItem("locationMarketsState");t({markets:[],isLoading:!0});const i=await(await Uf()).getDataServices().getUserMarkets(void 0,void 0,!0);if(i){t({markets:i,isLoading:!1});const a=JSON.parse(localStorage.getItem("locationMarketsState")||'{ "markets": [] }'),o=i.map(u=>u.marketId),l=(s=a==null?void 0:a.markets)==null?void 0:s.map(u=>u.marketId);o.length&&!Mi.isEqual(o,l)&&rH({attributeKey:dpe.attributeKey,attributeValue:o}),localStorage.setItem("locationMarketsState",JSON.stringify({markets:i}))}else if(n){const a=JSON.parse(n);a.isLoading=!1,t(a)}})()},[t]),I(Dn,{})},Nkt=()=>{const t=Ht(ws),{clientServices:e,loading:n}=Fa();$.useEffect(()=>{if(!n){const r=e.getPersonalizationServices().localCollectionId,i=e.getPersonalizationServices().localActivePlaylistItems,s=(t==null?void 0:t.id)&&(i==null?void 0:i.includes(t.id));r&&s&&(async()=>{const o=await u4(r);e.getAudioServices().updateCollection(o.orderedContent),e.getAudioServices().setCollectionPlaybackMode(tu.Playlist)})().catch(o=>console.error(o))}},[e,n,t])},N0e=()=>navigator.userAgent.toLowerCase().includes("android"),Mkt=()=>{const t=Oa(d=>d.duration)||0,{scrubberIsUserControlled:e,scrubberBarType:n}=Ht(Bv)||{},r=Ht(ws),i=!!r,{title:s,artist:a,image:o,station:l}=r||{},u=N0e()?l:a,c="mediaSession"in navigator;$.useEffect(()=>{c&&(navigator.mediaSession.metadata=new MediaMetadata(i?{title:s,artist:a??u,album:l,artwork:o!=null&&o.src?[{src:o.src}]:[]}:{}))},[a,t,c,i,o,e,l,s,u,n])},Fkt=()=>{const t=HV(),{ff15sButton:e,pauseButton:n,rw15sButton:r,skipButton:i,stopButton:s}=Ht(Bv)||{},a=Oa(f=>f.duration)||0,{playState:o}=Ht(mo),l=Ht(ws),u=o4e.skip15,c=$.useCallback(f=>{if(a&&f){const h=f/a;t.seekToProgress(h)}},[a,t]),d="mediaSession"in navigator;$.useEffect(()=>{if(!d)return;const{dataObject:f,episodeDataObject:h}=l||{},{title:g,artist:v,image:b,station:S}=l||{},A=N0e()?S:v,w={contentId:(h==null?void 0:h.id)||(f==null?void 0:f.id),feature:Ei.EXTERNAL},x=[["play",()=>{t.resume(w),navigator.mediaSession.playbackState="playing",l&&(navigator.mediaSession.metadata=new MediaMetadata({title:g,artist:v??A,album:S,artwork:b!=null&&b.src?[{src:b.src}]:[]}))}],["pause",()=>{t.pause(w),navigator.mediaSession.playbackState="paused",l&&(navigator.mediaSession.metadata=new MediaMetadata({title:g,artist:v??A,album:S,artwork:b!=null&&b.src?[{src:b.src}]:[]}))}],["stop",()=>{t.stop(w),navigator.mediaSession.playbackState="none"}],["nexttrack",fo(i)?()=>{t.skip({...w,artist:v,songTitle:g})}:null],["seekforward",fo(e,!0)?()=>{t.skipByTime(u,w)}:null],["seekbackward",fo(r,!0)?()=>{t.skipByTime(-1*u,w)}:null],["seekto",fo(e,!0)&&fo(r,!0)?({seekTime:P})=>{c(P)}:null]];for(const[P,N]of x)try{navigator.mediaSession.setActionHandler(P,N)}catch{console.info(`The media session action "${P}" is not supported yet.`)}},[t,d,e,n,l,o,r,u,i,s,c])},$kt=()=>{Mkt(),Fkt()},Bkt=()=>{$kt(),Nkt();const{t}=dn(),{showToast:e}=gu(),n=IR(mo),r=IR(Tb),i=Oa(o=>o.setDuration),s=$.useCallback(()=>{i(0),n(),r(),e({title:t("playerControls.toast.errorPlaying")})},[i,n,r,e,t]),a=$.useCallback(()=>{s(),e({title:t("global.contentUnavailable")})},[e,s,t]);return I(f4,{onPlaybackError:a})},Nte=()=>be(Dn,{children:[I(Bkt,{}),I(Dkt,{}),I(kkt,{}),I(Okt,{}),I(Pkt,{}),I(Lkt,{})]}),Ukt=()=>{const[t]=Xk(),e=t.get(vf.Action),n=e===mg.AutoplayFull||e===mg.AutoplayMini,{playFromId:r}=HV(),i=$.useRef(!1),s=Met();return $.useEffect(()=>{!n&&!i.current&&(s!=null&&s.item)&&(r(s.item.id,{feature:Ei.MINI_PLAYER},{autoPlay:!1,startOffset:s.resumePoint}),i.current=!0)},[r,s,n]),I(Dn,{})},Vkt=()=>{const t=navigator.userAgent,e=!!window.chrome,n=t.includes("Edg/"),r=t.includes("OPR/")||t.includes("Opera"),i=navigator.brave!==void 0,s=/CriOS\//.test(t),a=/; wv\)/.test(t);return n||r||i||a?!1:s||e&&t.includes("Chrome/")},Hkt=t=>{const e=`${t}${t.includes("?")?"&":"?"}cb=${Date.now()}`;try{const n=new Image(1,1);n.referrerPolicy="no-referrer-when-downgrade",n.width=1,n.height=1,n.style.position="absolute",n.style.left="-9999px",n.style.top="0",n.alt="",n.onload=()=>{try{n.remove()}catch{}},n.onerror=()=>{try{n.remove()}catch{}},typeof document<"u"&&document.body&&document.body.appendChild(n),n.src=e}catch(n){Pn.debug(`[${Rn.Analytics}]: components/TapadPixel/index.tsx: firePixel: beacon failed: ${String(n)}`)}},jkt=()=>($.useEffect(()=>{const t=async()=>{try{const n=await Uf();await n.onReady();const r=n.getPersonalizationServices().userToken,i=n.getPersonalizationServices().userDeviceId,s=r??i;if(!s||!(s.startsWith("1ac")||s.startsWith("f8k")))return;const o=`https://pixel.tapad.com/idsync/ex/receive?partner_id=${Vkt()?"3441":"3547"}&partner_device_id=${encodeURIComponent(s)}`;Hkt(o)}catch(n){Pn.debug(`[${Rn.Analytics}]: components/TapadPixel/index.tsx: TapadPixel exception occured: ${String(n)}`)}};let e=!1;ij(n=>{n&&!e&&(e=!0,t())})},[]),null),RS={container:{alignItems:"center",backgroundColor:_e.white,borderRadius:100,color:_e.audacyDarkNavy,display:"inline-flex",justifyContent:"center",padding:20,pointerEvents:"initial"},title:{...cn.metadataSmall,marginRight:30},cta:{...Bt.accessibleMinButtonSize(),...Bt.focusOutline({outline:`${jf.focusDark}`})},ctaDivider:{display:"flex",alignItems:"center","&::after":{backgroundColor:_e.greyC5,content:'""',height:9,margin:"0 20px",width:1}}
849,ctaLabel:{...Bt.accessibleMinButtonSize(),...Bt.transition("color"),color:_e.audacyDarkNavy,fontWeight:700,...Dr({color:_e.audacyDarkNavy60})},closeButton:{...Bt.focusOutline({outline:`${jf.focusDark}`})}},zkt=({cta:t,onClick:e,onClose:n,title:r})=>{const{t:i}=dn(),s=()=>{var a;(a=t==null?void 0:t.action)==null||a.call(t),e==null||e()};return be("div",{css:RS.container,children:[I("span",{css:RS.title,children:r}),!!t&&I("div",{css:RS.ctaDivider,children:I(Mg,{as:Fi.Button,css:RS.cta,isTiny:!0,labelCss:RS.ctaLabel,onClick:s,children:t.title})}),I(Mc,{ariaLabel:i("toast.ariaLabels.close"),buttonCss:RS.closeButton,buttonSizeInPx:12,colorTheme:qV.Light,icon:en.Close,iconSizeInPx:12,onClick:n})]})},vm={large:30,small:20},Gkt={container:{display:"inline-flex",justifyContent:"center",left:vm.small,pointerEvents:"none",position:"fixed",right:vm.small,top:vm.small,width:`calc(100% - ${vm.small*2}px)`,zIndex:Ai.toast,[Be(ve.Large)]:{bottom:vm.large,justifyContent:"flex-start",left:vm.large,right:vm.large,top:"auto",width:`calc(100% - ${vm.large*2}px)`}}},Mte={close:4e3,toastTransition:.4},Wkt=({amountQueued:t,nextToast:e,toast:n})=>{const{greaterThan:r}=Fs(),i=$.useRef(),[s,a]=$.useState(!0),[o,l]=$.useState(!1),u=$.useCallback(()=>{a(!1),d()},[]);$.useEffect(()=>{e&&t&&t>1&&u()},[t,u,e]);const c=()=>{o?l(!1):(l(!0),i.current=setTimeout(u,Mte.close))},d=()=>{i.current&&(clearTimeout(i.current),i.current=void 0)},f=()=>{t&&t>0&&(e==null||e()),a(!0)},h=()=>{u()};return I(hH,{children:I(Yh,{onExitComplete:f,children:s&&n&&I(Il.div,{initial:{opacity:0,y:r.MD?300:-300},animate:{opacity:1,y:0},exit:{opacity:0,y:0},transition:{bounce:.15,duration:Mte.toastTransition,type:"spring"},css:Gkt.container,onAnimationComplete:c,children:I(zkt,{onClose:u,onClick:h,...n})},n.id)})})},qkt=()=>{const{amountQueued:t,currentToast:e,popToast:n}=gu();return I(Wkt,{amountQueued:t,nextToast:n,toast:e})},M0e=2,Fte=(t,e=M0e)=>{const n=10**e;return Math.trunc(t*n)/n},Kkt=(t,e=M0e)=>({latitude:Fte(t.latitude,e),longitude:Fte(t.longitude,e)}),Ykt=async()=>await navigator.permissions.query({name:"geolocation"}),sf=(t,e,n={})=>{const r={level:n.level??"log",force:n.force??!1};((ol.APP_MODE==="development"&&ol.ENABLE_DEBUG)??r.force)&&console[r.level](t,e)},F0e=({onChange:t}={})=>{sf("#! useLocationPermission -> Initializing");const e=$.useRef(),{clientServices:n}=Fa(),r=$.useCallback((s,a)=>{n.setLatLong(s,a)},[n]),i=$.useCallback(()=>{sf("#! useLocationPermission -> Requesting location permission"),navigator.geolocation.getCurrentPosition(s=>{sf("#! useLocationPermission -> Got location: ",s);const{latitude:a,longitude:o}=Kkt({latitude:s.coords.latitude,longitude:s.coords.longitude});r(a,o)},s=>{sf("#! useLocationPermission -> Error getting location: ",s,{level:"error"})})},[r]);return $.useEffect(()=>(sf("#! useLocationPermission -> Checking location permission"),Ykt().then(s=>{sf("#! useLocationPermission -> Location permission status: ",s),e.current=s,s.onchange=t??null,s.state==="granted"&&(sf("#! useLocationPermission -> Location permission granted, requesting location"),i()),s.state==="prompt"&&(sf("#! useLocationPermission -> Sending braze event to prompt user for location permissions"),tC("LOCATION_PROMPT"))}).catch(s=>{sf("#! useLocationPermission -> Error getting location: ",s,{level:"error"})}),()=>{sf("#! useLocationPermission -> Cleaning up"),e.current&&(sf("#! useLocationPermission -> Removing onchange listener"),e.current.onchange=null)}),[i,t]),{requestPermission:i}},Zkt=()=>{const t=$.useRef(),{requestPermission:e}=F0e();$.useEffect(()=>{const n=r=>{var i;r.data.source===Kpe.Braze&&r.data.type===qpe.Location&&((i=t.current)==null?void 0:i.state)!=="denied"&&e()};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[e])};var Qkt=ap,Xkt=function(){return Qkt.Date.now()},Jkt=Xkt,e2t=Dg,s$=Jkt,$te=C7,t2t="Expected a function",n2t=Math.max,r2t=Math.min;function i2t(t,e,n){var r,i,s,a,o,l,u=0,c=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(t2t);e=$te(e)||0,e2t(n)&&(c=!!n.leading,d="maxWait"in n,s=d?n2t($te(n.maxWait)||0,e):s,f="trailing"in n?!!n.trailing:f);function h(N){var k=r,U=i;return r=i=void 0,u=N,a=t.apply(U,k),a}function g(N){return u=N,o=setTimeout(S,e),c?h(N):a}function v(N){var k=N-l,U=N-u,H=e-k;return d?r2t(H,s-U):H}function b(N){var k=N-l,U=N-u;return l===void 0||k>=e||k<0||d&&U>=s}function S(){var N=s$();if(b(N))return A(N);o=setTimeout(S,v(N))}function A(N){return o=void 0,f&&r?h(N):(r=i=void 0,a)}function w(){o!==void 0&&clearTimeout(o),u=0,r=l=i=o=void 0}function x(){return o===void 0?a:A(s$())}function P(){var N=s$(),k=b(N);if(r=arguments,i=this,l=N,k){if(o===void 0)return g(l);if(d)return clearTimeout(o),o=setTimeout(S,e),h(l)}return o===void 0&&(o=setTimeout(S,e)),a}return P.cancel=w,P.flush=x,P}
849var s2t=i2t,a2t=s2t,o2t=Dg,l2t="Expected a function";function u2t(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(l2t);return o2t(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),a2t(t,e,{leading:r,maxWait:e,trailing:i})}var c2t=u2t;const d2t=pi(c2t),f2t=()=>{const t=dDt(),e=Qs(npe);$.useLayoutEffect(()=>{if(!t)return;const n=()=>{e({height:document.documentElement.clientHeight,width:document.documentElement.clientWidth})},r=d2t(n,100);return window.addEventListener("resize",r),n(),()=>{r.cancel(),window.removeEventListener("resize",r)}},[t,e])},h2t=()=>I(mhe,{}),p2t=Yn({default:{currentPath:"/",previousPath:""},key:"NavigationPathState"}),g2t=$.lazy(()=>Cr(()=>import("./index-Cp9MNSi-.js"),__vite__mapDeps([30,2,4,5,6]))),m2t=$.lazy(()=>Cr(()=>import("./index-C2oE_RTB.js"),__vite__mapDeps([31,4]))),v2t=$.lazy(()=>Cr(()=>import("./index-BYZVucKB.js"),__vite__mapDeps([32,2,4]))),Bte=$.lazy(()=>Cr(()=>import("./index-CU0eqiNB.js"),__vite__mapDeps([33,2,4,15,5,6]))),y2t=$.lazy(()=>Cr(()=>import("./index-w-NOGtXi.js"),__vite__mapDeps([34,35,4]))),a$=$.lazy(()=>Cr(()=>import("./index-CJ1NJ9gh.js"),__vite__mapDeps([36,35,4,5,6]))),b2t=()=>{const t=a3e(),e=Rd(),[n,r]=Fo(KV),[{currentPath:i,previousPath:s},a]=Fo(p2t),{clientServices:o,loading:l}=Fa();if($.useEffect(()=>{l||o.getAnalyticServices().sendAppStart()},[o,l]),$.useEffect(()=>{async function u(){try{wDt(),await TDt(),_Dt(),Bet(c=>{var f;const d=o.getPersonalizationServices().userToken;if(c===Bn.AUTH&&d&&!Tx){fV(d);const h=o.getPersonalizationServices().dataStore.getDataSync(tr.BRAZE_DEVICE_ID);h&&((f=md())==null||f.addAlias("USER_ALIAS",h))}}),r(!0)}catch(c){t(c)}}u()},[t,r,o]),$.useEffect(()=>{i!==e.pathname&&a({previousPath:i,currentPath:e.pathname+e.search||""})},[e,i,a]),n){const u=document.querySelector("#initial-loading");u&&u.remove()}return n?be(GZ,{children:[I(f4,{onPlaybackError:t}),I(Nte,{}),I(S2t,{})]}):be(GZ,{children:[I(f4,{onPlaybackError:t}),I(Nte,{})]})},S2t=()=>{f2t();const t=Ht(kg),e=rT(),n=Ht(xde),r=Ht(Sde),i=Rd(),s=Qs(Fhe);$.useEffect(()=>{var o;window.scrollTo(0,0),(o=window.googletag)!=null&&o.apiReady&&s(!1)},[i.pathname,s]),$.useEffect(()=>{try{const o=document.createElement("script");o.type="module",o.defer=!0,o.textContent=`
850        (async () => {
851          try {
852            const module = await import("${ol.USER_COOKIE_SYNC_URL}");
853            window.syncCookies = module.syncCookies;
854          } catch (error) {
855            console.warn('Failed to load cookie sync script:', error);
856          }
857        })();
858      `,o.onerror=l=>{console.warn("Cookie sync script failed to load:",l)},document.head.appendChild(o)}catch(o){console.warn("Failed to create cookie sync script:",o)}},[]),Zkt(),F0e();const a=!lot.some(o=>i.pathname.startsWith(o));return $.useEffect(()=>{r&&e(bi.ReactivateAccount);const l=(n==null?void 0:n.includes("firstName"))||(n==null?void 0:n.includes("lastName"))?bi.RegistrationStepOne:bi.RegistrationStepTwo;n&&n.length>0&&a&&e(l)},[t,e,a,n,r]),be(Dn,{children:[I(RDt,{}),a&&I(Ikt,{}),be(AFe,{children:[I(id,{path:bi.Account,element:I(g2t,{})}),I(id,{path:bi.DeleteAccountConfirmation,element:I(m2t,{})}),I(id,{path:bi.Registration,element:I(a$,{currentStepIndex:0})}),I(id,{path:bi.ReactivateAccount,element:I(y2t,{})}),I(id,{path:bi.Loading,element:I(h2t,{})}),I(id,{path:bi.RegistrationStepOne,element:I(a$,{currentStepIndex:0})}),I(id,{path:bi.RegistrationStepTwo,element:I(a$,{currentStepIndex:1})}),I(id,{path:bi.MyAudio,element:I(Bte,{}),children:I(id,{path:bi.MyAudioTab,element:I(Bte,{})})}),ol.APP_MODE!=="production"&&I(id,{path:bi.Dev,element:I(v2t,{})}),I(id,{path:"*",element:I(Yot,{},i.pathname)})]}),a&&I($.Suspense,{fallback:null,children:be(gut,{children:[I(_xt,{}),I(Mme,{}),I(Ukt,{})]})}),I(DDt,{}),I(qkt,{}),I(ODt,{}),I(jkt,{})]})},E2t="/assets-a2/MaisonNeueExtendedWEB-Black-BjhK0QBT.woff",T2t="/assets-a2/MaisonNeueExtendedWEB-Black-QOtIhaz_.woff2",A2t="/assets-a2/MaisonNeueExtendedWEB-BlackItalic-C2LIIG9m.woff",w2t="/assets-a2/MaisonNeueExtendedWEB-BlackItalic-DXQxJ2KD.woff2",_2t="/assets-a2/MaisonNeueExtendedWEB-Bold-BiXkiIGm.woff",C2t="/assets-a2/MaisonNeueExtendedWEB-Bold-BxV3ezXZ.woff2",x2t="/assets-a2/MaisonNeueExtendedWEB-BoldItalic-r3AmcZb5.woff",I2t="/assets-a2/MaisonNeueExtendedWEB-BoldItalic-BKo65gaT.woff2",O2t="/assets-a2/MaisonNeueExtendedWEB-Book-sEt6bzKG.woff",P2t="/assets-a2/MaisonNeueExtendedWEB-Book-BmQfODmo.woff2",R2t="/assets-a2/MaisonNeueExtendedWEB-BookItalic-J5b-eGfd.woff",L2t="/assets-a2/MaisonNeueExtendedWEB-BookItalic-D8_pHfuU.woff2",D2t="/assets-a2/MaisonNeueExtendedWEB-Demi-2qRWJWPn.woff",k2t="/assets-a2/MaisonNeueExtendedWEB-Demi-CKLWPD2s.woff2",N2t="/assets-a2/MaisonNeueExtendedWEB-DemiItalic-CyM7mUO2.woff",M2t="/assets-a2/MaisonNeueExtendedWEB-DemiItalic-DIU_Pmo7.woff2",F2t="/assets-a2/MaisonNeueExtendedWEB-ExtraBold-BE_S3Q2F.woff",$2t="/assets-a2/MaisonNeueExtendedWEB-ExtraBold-CL97kp0O.woff2",B2t="/assets-a2/MaisonNeueExtendedWEB-ExtraBoldItalic-Cr1CsvZ7.woff",U2t="/assets-a2/MaisonNeueExtendedWEB-ExtraBoldItalic-DzG-XzVX.woff2",V2t="/assets-a2/MaisonNeueExtendedWEB-ExtraThin-C49eMx_2.woff",H2t="/assets-a2/MaisonNeueExtendedWEB-ExtraThin-DBGbGEzU.woff2",j2t="/assets-a2/MaisonNeueExtendedWEB-ExtraThinItalic-Z1ctN72Y.woff",z2t="/assets-a2/MaisonNeueExtendedWEB-ExtraThinItalic-DAm3Q6G2.woff2",G2t="/assets-a2/MaisonNeueExtendedWEB-Light-D5yWXLJQ.woff",W2t="/assets-a2/MaisonNeueExtendedWEB-Light-aMi_TmZG.woff2",q2t="/assets-a2/MaisonNeueExtendedWEB-LightItalic-CIm3XGXe.woff",K2t="/assets-a2/MaisonNeueExtendedWEB-LightItalic-D09_eCsd.woff2",Y2t="/assets-a2/MaisonNeueExtendedWEB-Medium-D-mENJF6.woff",Z2t="/assets-a2/MaisonNeueExtendedWEB-Medium-DmUfp4UT.woff2",Q2t="/assets-a2/MaisonNeueExtendedWEB-MediumItalic-CAEfJHDO.woff",X2t="/assets-a2/MaisonNeueExtendedWEB-MediumItalic-DkYpQh5W.woff2",J2t="/assets-a2/MaisonNeueExtendedWEB-Thin-ew_0NZue.woff",eNt="/assets-a2/MaisonNeueExtendedWEB-Thin-EKaJe8oH.woff2",tNt="/assets-a2/MaisonNeueExtendedWEB-ThinItalic-3jfDRI1k.woff",nNt="/assets-a2/MaisonNeueExtendedWEB-ThinItalic-Dver942y.woff2",rNt="/assets-a2/MaisonNeueWEB-Bold-DsjfQzFU.woff",iNt="/assets-a2/MaisonNeueWEB-Bold-C4cLCX6d.woff2",sNt="/assets-a2/MaisonNeueWEB-BoldItalic-D2kngAxU.woff",aNt="/assets-a2/MaisonNeueWEB-BoldItalic-B5rE7PxE.woff2",oNt="/assets-a2/MaisonNeueWEB-Book-CCGCZG9j.woff",lNt="/assets-a2/MaisonNeueWEB-Book-DPprNDSQ.woff2",uNt="/assets-a2/MaisonNeueWEB-BookItalic-DWCgz4pR.woff",cNt="/assets-a2/MaisonNeueWEB-BookItalic-DKkVXice.woff2",ma=({fontDisplay:t,fontFamily:e,fontStyle:n,fontWeight:r,source:i,source2:s})=>`
859    @font-face {
860      ${`font-display: ${t};`}
861      font-family: "${e}";
862      font-style: ${n};
863      font-weight: ${r};
864      src:
865        url('${s}') format('woff2'),
866        url('${i}') format('woff')
867    }
868  `,dNt=`
869  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue",fontStyle:"normal",fontWeight:"normal",source:oNt,source2:lNt})}
870
871  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue",fontStyle:"italic",fontWeight:"normal",source:uNt,source2:cNt})}
872
873  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue",fontStyle:"normal",fontWeight:"700",source:rNt,source2:iNt})}
874
875  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue",fontStyle:"italic",fontWeight:"700",source:sNt,source2:aNt})}
876
877  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"100",source:V2t,source2:H2t})}
878
879  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"100",source:j2t,source2:z2t})}
880
881  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"200",source:J2t,source2:eNt})}
882
883  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"200",source:tNt,source2:nNt})}
884
885  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"300",source:G2t,source2:W2t})}
886
887  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"300",source:q2t,source2:K2t})}
888
889  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"normal",source:O2t,source2:P2t})}
890
891  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"normal",source:R2t,source2:L2t})}
892
893  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"500",source:Y2t,source2:Z2t})}
894
895  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"500",source:Q2t,source2:X2t})}
896
897  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"600",source:D2t,source2:k2t})}
898
899  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"600",source:N2t,source2:M2t})}
900
901  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"700",source:_2t,source2:C2t})}
902
903  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"700",source:x2t,source2:I2t})}
904
905  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"800",source:F2t,source2:$2t})}
906
907  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"800",source:B2t,source2:U2t})}
908
909  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"normal",fontWeight:"900",source:E2t,source2:T2t})}
910
911  ${ma({fontDisplay:"swap",fontFamily:"Maison Neue Extended",fontStyle:"italic",fontWeight:"900",source:A2t,source2:w2t})}
912`,fNt=`
913  body {
914    font-family: "Maison Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
915    font-style: normal;
916    font-weight: normal;
917  }
918`,hNt=`
919  html {
920    box-sizing: border-box;
921    -webkit-tap-highlight-color: transparent;
922  }
923
924  *,
925  *:after,
926  *:before {
927    box-sizing: inherit;
928  }
929
930  html,
931  body,
932  div,
933  span,
934  applet,
935  object,
936  iframe,
937  table,
938  caption,
939  tbody,
940  tfoot,
941  thead,
942  tr,
943  th,
944  td,
945  del,
946  dfn,
947  em,
948  font,
949  img,
950  ins,
951  kbd,
952  q,
953  s,
954  samp,
955  small,
956  strike,
957  strong,
958  sub,
959  sup,
960  tt,
961  var,
962  h1,
963  h2,
964  h3,
965  h4,
966  h5,
967  h6,
968  p,
969  blockquote,
970  pre,
971  a,
972  abbr,
973  acronym,
974  address,
975  big,
976  cite,
977  code,
978  dl,
979  dt,
980  dd,
981  ol,
982  ul,
983  li,
984  fieldset,
985  figure,
986  form,
987  label,
988  legend,
989  button,
990  input,
991  textarea {
992    border: 0 none;
993    color: inherit;
994    font-family: inherit;
995    font-size: inherit;
996    font-style: inherit;
997    font-weight: inherit;
998    letter-spacing: inherit;
999    line-height: inherit;
1000    margin: 0;
1001    padding: 0;
1002    vertical-align: baseline;
1003  }
1004
1005  a,
1006  button {
1007    vertical-align: inherit;
1008  }
1009
1010  html {
1011    font-size: 62.5%;
1012    -webkit-font-smoothing: antialiased;
1013  }
1014
1015  body {
1016    font-size: 1.6rem;
1017    overscroll-behavior-x: none;
1018  }
1019
1020  img,
1021  picture,
1022  video,
1023  canvas {
1024    display: block;
1025    height: auto;
1026    width: 100%;
1027  }
1028
1029  button {
1030    background-color: transparent;
1031    border: none;
1032    border-radius: 0;
1033  }
1034
1035  button:not(:disabled) {
1036    cursor: pointer;
1037  }
1038
1039  input[type='submit'],
1040  input[type='reset'],
1041  input[type='button'],
1042  button {
1043    appearance: button;
1044    background: none;
1045    border: 0;
1046    color: inherit;
1047    font: inherit;
1048    line-height: normal;
1049    overflow: visible;
1050    padding: 0;
1051    user-select: none;
1052  }
1053
1054  li {
1055    list-style-type: none;
1056  }
1057
1058  a {
1059    cursor: pointer;
1060    line-height: normal;
1061    text-decoration: none;
1062  }
1063
1064  strong {
1065    font-weight: bold;
1066  }
1067
1068  em {
1069    font-style: italic;
1070  }
1071
1072  // station tracking pixel override
1073  .triton-pixel {
1074    height: 0;
1075    width: 0;
1076  }
1077`,Ute="outline: none;",Vte=`outline: ${jf.focus}; outline-offset: ${sC}px;`,pNt=`
1078  *:active {${Ute}}
1079
1080  *:focus {${Vte}}
1081
1082  *:focus:not(:focus-visible){${Ute}}
1083
1084  *:focus-visible {${Vte}}
1085
1086  body {
1087    background-color: ${_e.audacyDarkNavy};
1088    color: ${_e.white};
1089  }
1090`,gNt=`
1091  /* New theme colors need to be added to src/styles/theme-colors.ts */
1092  :root,
1093  :root[data-theme='default'] {
1094    /* backgrounds */
1095    --color-bg-primary: ${_e.audacyDarkNavy};
1096
1097    /* text */
1098    --color-text-primary: ${_e.white};
1099    --color-text-secondary: ${_e.white60};
1100
1101    /* button primary */
1102    --color-button-bg-primary: ${_e.audacyOrange};
1103    --color-button-color-primary: ${_e.white};
1104
1105    /* button primary hover */
1106    --color-button-bg-primary-hover: ${yv.primaryHover};
1107
1108    /* button secondary */
1109    --color-button-bg-secondary: transparent;
1110    --color-button-border-secondary: ${_e.white30};
1111    --color-button-color-secondary: ${_e.white};
1112
1113    /* button secondary hover */
1114    --color-button-bg-secondary-hover: transparent;
1115    --color-button-border-secondary-hover: ${_e.greyA6};
1116  }
1117
1118  /* NB: there are no Figma theme annotations; light theme is currently FPO */
1119  :root[data-theme='light'] {
1120    /* backgrounds */
1121    --color-bg-primary: ${_e.white};
1122
1123    /* text */
1124    --color-text-primary: ${_e.black};
1125    --color-text-secondary: ${_e.audacyDarkNavy};
1126
1127    /* button primary */
1128    --color-button-bg-primary: ${_e.audacyOrange};
1129    --color-button-color-primary: ${_e.white};
1130
1131    /* button primary hover */
1132    --color-button-bg-primary-hover: ${yv.primaryHover};
1133
1134    /* button secondary */
1135    --color-button-bg-secondary: transparent;
1136    --color-button-border-secondary: ${_e.greyA6};
1137    --color-button-color-secondary: ${_e.black};
1138
1139    /* button secondary hover */
1140    --color-button-bg-secondary-hover: transparent;
1141    --color-button-border-secondary-hover: ${_e.grey80};
1142  }
1143`,mNt=OR`
1144  ${hNt}
1145  ${dNt}
1146  ${fNt}
1147  ${gNt}
1148  ${pNt}
1149`;function vNt(){return new lDe({defaultOptions:{queries:{gcTime:Number.POSITIVE_INFINITY}}})}const yNt=vNt();Fgt();V0.use([$$e]);const bNt=()=>ol.BASE_NAME||"/";$ie.render(I(mt.StrictMode,{children:I(RFe,{basename:bNt(),children:be(NLe,{children:[I(MLe,{}),I(XMe,{reducedMotion:"user",children:be(tE,{children:[I($Le,{styles:mNt}),I(Zk,{FallbackComponent:({error:t})=>I(wV,{error:t}),children:I($.Suspense,{fallback:null,children:I(uDe,{client:yNt,children:I(b2t,{})})})})]})})]})})}),document.getElementById("root"));export{Ad as $,Ei as A,Ng as B,_e as C,Wfe as D,mV as E,Dn as F,awt as G,yMt as H,Mc as I,oo as J,gu as K,Mg as L,Bt as M,ipe as N,au as O,bi as P,Oet as Q,Ht as R,Gv as S,cn as T,Mge as U,_n as V,BSt as W,Kbt as X,Sxt as Y,Mi as Z,_H as _,I as a,AMt as a$,gxt as a0,bZe as a1,Nf as a2,fL as a3,TZe as a4,rMt as a5,xo as a6,Ai as a7,aD as a8,ghe as a9,Oce as aA,cL as aB,uL as aC,Xn as aD,vr as aE,MZe as aF,Ra as aG,DZe as aH,dx as aI,Rce as aJ,BZe as aK,jZe as aL,JY as aM,HZe as aN,IZe as aO,FU as aP,mZe as aQ,F7 as aR,Tc as aS,Kt as aT,eZ as aU,xZe as aV,ln as aW,ms as aX,JDt as aY,pSt as aZ,uj as a_,Zk as aa,Eb as ab,MNt as ac,fot as ad,ahe as ae,Fo as af,Sde as ag,pi as ah,Nwe as ai,f$ as aj,Uwe as ak,Fwe as al,ip as am,Hwe as an,Bu as ao,Rne as ap,Lce as aq,$f as ar,NC as as,uk as at,qf as au,hg as av,Kf as aw,P7 as ax,O7 as ay,hZe as az,j2 as b,bAt as b$,og as b0,mMt as b1,vc as b2,Yr as b3,T0 as b4,Ww as b5,PDt as b6,sMt as b7,BW as b8,xde as b9,dwt as bA,zR as bB,xd as bC,D0e as bD,i$ as bE,Pge as bF,Tkt as bG,_Mt as bH,wMt as bI,Skt as bJ,qfe as bK,k0e as bL,jTt as bM,bme as bN,Fr as bO,vet as bP,yet as bQ,QNt as bR,JF as bS,tMt as bT,nMt as bU,fC as bV,ZNt as bW,XNt as bX,Fi as bY,Iy as bZ,eu as b_,pkt as ba,TMt as bb,lr as bc,vMt as bd,y0e as be,xwt as bf,dC as bg,H7 as bh,I2 as bi,VTt as bj,sme as bk,pMt as bl,Qp as bm,gT as bn,gN as bo,IR as bp,JNt as bq,wet as br,CD as bs,bN as bt,gMt as bu,AH as bv,dle as bw,eMt as bx,iMt as by,_V as bz,xv as c,Oi as c0,a0 as c1,Bbt as c2,lme as c3,mo as c4,ro as c5,V2 as c6,Cd as c7,Xfe as c8,gt as c9,jf as cA,_D as cB,Jpe as cC,bv as cD,W2 as cE,Xpe as cF,hH as cG,LLt as cH,rg as cI,p0e as cJ,SL as cK,xD as cL,xkt as cM,ws as cN,wV as cO,jV as cP,_de as cQ,Fw as cR,Ys as cS,emt as cT,Xte as cU,ENt as cV,lu as cW,iT as ca,prt as cb,tr as cc,Za as cd,eT as ce,Mp as cf,gC as cg,Il as ch,Sn as ci,Um as cj,gSt as ck,g0t as cl,I0 as cm,pH as cn,$he as co,V4 as cp,zf as cq,U1 as cr,TD as cs,xx as ct,Fge as cu,TT as cv,p2t as cw,Ph as cx,Wl as cy,cw as cz,ve as d,iwt as e,Dr as f,en as g,rT as h,Fa as i,be as j,Ax as k,P2 as l,Be as m,Qs as n,hrt as o,Ckt as p,kg as q,$ as r,_c as s,Fs as t,dn as u,wb as v,kDt as w,b0e as x,Yu as y,Ec as z};
1150//# sourceMappingURL=index-BgcUcd2q.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.