@liveryvideo/player
Version:
Livery video player for use in web browsers.
60 lines (58 loc) • 680 kB
JavaScript
(function(W,qt){typeof exports=="object"&&typeof module<"u"?qt(exports):typeof define=="function"&&define.amd?define(["exports"],qt):(W=typeof globalThis<"u"?globalThis:W||self,qt(W.livery={}))})(this,function(W){"use strict";var vi;const os=class os extends Event{constructor(e,t){super(os.type,t),this.config=e}};os.type="livery-config-change";let qt=os;const as=class as extends Event{constructor(e,t){super(as.type,t),this.display=e}};as.type="livery-display-change";let qn=as;const cs=class cs extends Event{constructor(e,t){super(cs.type,t),this.error=e}};cs.type="livery-error";let wi=cs;const us=class us extends Event{constructor(e,t){super(us.type,t),this.features=e}};us.type="livery-features-change";let Fn=us;const ls=class ls extends Event{constructor(e,t){super(ls.type,t),this.fullscreen=e}};ls.type="livery-fullscreen-change";let jn=ls;const ds=class ds extends Event{constructor(e,t){super(ds.type,t),this.mode=e}};ds.type="livery-mode-change";let Vn=ds;const hs=class hs extends Event{constructor(e,t){super(hs.type,t),this.phase=e}};hs.type="livery-phase-change";let zn=hs;const ps=class ps extends Event{constructor(e,t){super(ps.type,t),this.playbackState=e,this.paused=["ENDED","PAUSED"].includes(e),this.playing=["FAST_FORWARD","PLAYING","REWIND","SLOW_MO"].includes(e),this.stalled=["BUFFERING","SEEKING"].includes(e)}};ps.type="livery-playback-change";let Hn=ps;const fs=class fs extends Event{constructor(e,t){super(fs.type,t),this.qualities=e}};fs.type="livery-qualities-change";let Gn=fs;const ms=class ms extends Event{constructor(e,t){super(ms.type,t),this.quality=e}};ms.type="livery-quality-change";let Wn=ms;const gs=class gs extends Event{constructor(e){super(gs.type,e)}};gs.type="livery-recovered";let Kn=gs;const ys=class ys extends Event{constructor(e,t,i){super(ys.type,i),this.volume=e,this.muted=t}};ys.type="livery-volume-change";let Vi=ys;/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Zn=globalThis,Bs=Zn.ShadowRoot&&(Zn.ShadyCSS===void 0||Zn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,qs=Symbol(),Ia=new WeakMap;let xa=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==qs)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Bs&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ia.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ia.set(t,e))}return e}toString(){return this.cssText}};const Hu=o=>new xa(typeof o=="string"?o:o+"",void 0,qs),ni=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,n,r)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[r+1],o[0]);return new xa(t,o,qs)},Gu=(o,e)=>{if(Bs)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),n=Zn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=t.cssText,o.appendChild(i)}},Ra=Bs?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Hu(t)})(o):o;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{is:Wu,defineProperty:Ku,getOwnPropertyDescriptor:Zu,getOwnPropertyNames:Qu,getOwnPropertySymbols:Yu,getPrototypeOf:Xu}=Object,Qn=globalThis,ka=Qn.trustedTypes,Ju=ka?ka.emptyScript:"",el=Qn.reactiveElementPolyfillSupport,zi=(o,e)=>o,Yn={toAttribute(o,e){switch(e){case Boolean:o=o?Ju:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Fs=(o,e)=>!Wu(o,e),Na={attribute:!0,type:String,converter:Yn,reflect:!1,useDefault:!1,hasChanged:Fs};Symbol.metadata??=Symbol("metadata"),Qn.litPropertyMetadata??=new WeakMap;let Si=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Na){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Ku(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){const{get:n,set:r}=Zu(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){const c=n?.call(this);r?.call(this,s),this.requestUpdate(e,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Na}static _$Ei(){if(this.hasOwnProperty(zi("elementProperties")))return;const e=Xu(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zi("properties"))){const t=this.properties,i=[...Qu(t),...Yu(t)];for(const n of i)this.createProperty(n,t[n])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,n]of t)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const n=this._$Eu(t,i);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(Ra(n))}else e!==void 0&&t.push(Ra(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Gu(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(n!==void 0&&i.reflect===!0){const r=(i.converter?.toAttribute!==void 0?i.converter:Yn).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,n=i._$Eh.get(e);if(n!==void 0&&this._$Em!==n){const r=i.getPropertyOptions(n),s=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Yn;this._$Em=n,this[n]=s.fromAttribute(t,r.type)??this._$Ej?.get(n)??null,this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){const n=this.constructor,r=this[e];if(i??=n.getPropertyOptions(e),!((i.hasChanged??Fs)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:n,wrapped:r},s){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),r!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i){const{wrapped:s}=r,c=this[n];s!==!0||this._$AL.has(n)||c===void 0||this.C(n,void 0,r,c)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};Si.elementStyles=[],Si.shadowRootOptions={mode:"open"},Si[zi("elementProperties")]=new Map,Si[zi("finalized")]=new Map,el?.({ReactiveElement:Si}),(Qn.reactiveElementVersions??=[]).push("2.1.0");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const js=globalThis,Xn=js.trustedTypes,Pa=Xn?Xn.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ma="$lit$",Ft=`lit$${Math.random().toFixed(9).slice(2)}$`,La="?"+Ft,tl=`<${La}>`,ri=document,Hi=()=>ri.createComment(""),Gi=o=>o===null||typeof o!="object"&&typeof o!="function",Vs=Array.isArray,il=o=>Vs(o)||typeof o?.[Symbol.iterator]=="function",zs=`[
\f\r]`,Wi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Da=/-->/g,Oa=/>/g,si=RegExp(`>|${zs}(?:([^\\s"'>=/]+)(${zs}*=${zs}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),$a=/'/g,Ua=/"/g,Ba=/^(?:script|style|textarea|title)$/i,nl=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),bt=nl(1),jt=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),qa=new WeakMap,oi=ri.createTreeWalker(ri,129);function Fa(o,e){if(!Vs(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pa!==void 0?Pa.createHTML(e):e}const rl=(o,e)=>{const t=o.length-1,i=[];let n,r=e===2?"<svg>":e===3?"<math>":"",s=Wi;for(let c=0;c<t;c++){const a=o[c];let d,l,u=-1,h=0;for(;h<a.length&&(s.lastIndex=h,l=s.exec(a),l!==null);)h=s.lastIndex,s===Wi?l[1]==="!--"?s=Da:l[1]!==void 0?s=Oa:l[2]!==void 0?(Ba.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=si):l[3]!==void 0&&(s=si):s===si?l[0]===">"?(s=n??Wi,u=-1):l[1]===void 0?u=-2:(u=s.lastIndex-l[2].length,d=l[1],s=l[3]===void 0?si:l[3]==='"'?Ua:$a):s===Ua||s===$a?s=si:s===Da||s===Oa?s=Wi:(s=si,n=void 0);const p=s===si&&o[c+1].startsWith("/>")?" ":"";r+=s===Wi?a+tl:u>=0?(i.push(d),a.slice(0,u)+Ma+a.slice(u)+Ft+p):a+Ft+(u===-2?c:p)}return[Fa(o,r+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};let Hs=class Vu{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let r=0,s=0;const c=e.length-1,a=this.parts,[d,l]=rl(e,t);if(this.el=Vu.createElement(d,i),oi.currentNode=this.el.content,t===2||t===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=oi.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(const u of n.getAttributeNames())if(u.endsWith(Ma)){const h=l[s++],p=n.getAttribute(u).split(Ft),f=/([.?@])?(.*)/.exec(h);a.push({type:1,index:r,name:f[2],strings:p,ctor:f[1]==="."?ol:f[1]==="?"?al:f[1]==="@"?cl:er}),n.removeAttribute(u)}else u.startsWith(Ft)&&(a.push({type:6,index:r}),n.removeAttribute(u));if(Ba.test(n.tagName)){const u=n.textContent.split(Ft),h=u.length-1;if(h>0){n.textContent=Xn?Xn.emptyScript:"";for(let p=0;p<h;p++)n.append(u[p],Hi()),oi.nextNode(),a.push({type:2,index:++r});n.append(u[h],Hi())}}}else if(n.nodeType===8)if(n.data===La)a.push({type:2,index:r});else{let u=-1;for(;(u=n.data.indexOf(Ft,u+1))!==-1;)a.push({type:7,index:r}),u+=Ft.length-1}r++}}static createElement(e,t){const i=ri.createElement("template");return i.innerHTML=e,i}};function Ei(o,e,t=o,i){if(e===jt)return e;let n=i!==void 0?t._$Co?.[i]:t._$Cl;const r=Gi(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(o),n._$AT(o,t,i)),i!==void 0?(t._$Co??=[])[i]=n:t._$Cl=n),n!==void 0&&(e=Ei(o,n._$AS(o,e.values),n,i)),e}let sl=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,n=(e?.creationScope??ri).importNode(t,!0);oi.currentNode=n;let r=oi.nextNode(),s=0,c=0,a=i[0];for(;a!==void 0;){if(s===a.index){let d;a.type===2?d=new Jn(r,r.nextSibling,this,e):a.type===1?d=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(d=new ul(r,this,e)),this._$AV.push(d),a=i[++c]}s!==a?.index&&(r=oi.nextNode(),s++)}return oi.currentNode=ri,n}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},Jn=class zu{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,n){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ei(this,e,t),Gi(e)?e===tt||e==null||e===""?(this._$AH!==tt&&this._$AR(),this._$AH=tt):e!==this._$AH&&e!==jt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):il(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==tt&&Gi(this._$AH)?this._$AA.nextSibling.data=e:this.T(ri.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Hs.createElement(Fa(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(t);else{const r=new sl(n,this),s=r.u(this.options);r.p(t),this.T(s),this._$AH=r}}_$AC(e){let t=qa.get(e.strings);return t===void 0&&qa.set(e.strings,t=new Hs(e)),t}k(e){Vs(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const r of e)n===t.length?t.push(i=new zu(this.O(Hi()),this.O(Hi()),this,this.options)):i=t[n],i._$AI(r),n++;n<t.length&&(this._$AR(i&&i._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class er{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,n,r){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=tt}_$AI(e,t=this,i,n){const r=this.strings;let s=!1;if(r===void 0)e=Ei(this,e,t,0),s=!Gi(e)||e!==this._$AH&&e!==jt,s&&(this._$AH=e);else{const c=e;let a,d;for(e=r[0],a=0;a<r.length-1;a++)d=Ei(this,c[i+a],t,a),d===jt&&(d=this._$AH[a]),s||=!Gi(d)||d!==this._$AH[a],d===tt?e=tt:e!==tt&&(e+=(d??"")+r[a+1]),this._$AH[a]=d}s&&!n&&this.j(e)}j(e){e===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ol extends er{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===tt?void 0:e}}let al=class extends er{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==tt)}},cl=class extends er{constructor(e,t,i,n,r){super(e,t,i,n,r),this.type=5}_$AI(e,t=this){if((e=Ei(this,e,t,0)??tt)===jt)return;const i=this._$AH,n=e===tt&&i!==tt||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==tt&&(i===tt||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ul=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Ei(this,e)}};const ll={I:Jn},dl=js.litHtmlPolyfillSupport;dl?.(Hs,Jn),(js.litHtmlVersions??=[]).push("3.3.0");const hl=(o,e,t)=>{const i=t?.renderBefore??e;let n=i._$litPart$;if(n===void 0){const r=t?.renderBefore??null;i._$litPart$=n=new Jn(e.insertBefore(Hi(),r),r,void 0,t??{})}return n._$AI(o),n};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Gs=globalThis;let vt=class extends Si{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=hl(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return jt}};vt._$litElement$=!0,vt.finalized=!0,Gs.litElementHydrateSupport?.({LitElement:vt});const pl=Gs.litElementPolyfillSupport;pl?.({LitElement:vt}),(Gs.litElementVersions??=[]).push("4.2.0");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const tr=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const fl={attribute:!0,type:String,converter:Yn,reflect:!1,hasChanged:Fs},ml=(o=fl,e,t)=>{const{kind:i,metadata:n}=t;let r=globalThis.litPropertyMetadata.get(n);if(r===void 0&&globalThis.litPropertyMetadata.set(n,r=new Map),i==="setter"&&((o=Object.create(o)).wrapped=!0),r.set(t.name,o),i==="accessor"){const{name:s}=t;return{set(c){const a=e.get.call(this);e.set.call(this,c),this.requestUpdate(s,a,o)},init(c){return c!==void 0&&this.C(s,void 0,o,c),c}}}if(i==="setter"){const{name:s}=t;return function(c){const a=this[s];e.call(this,c),this.requestUpdate(s,a,o)}}throw Error("Unsupported decorator location: "+i)};function Se(o){return(e,t)=>typeof t=="object"?ml(o,e,t):((i,n,r)=>{const s=n.hasOwnProperty(r);return n.constructor.createProperty(r,i),s?Object.getOwnPropertyDescriptor(n,r):void 0})(o,e,t)}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function ct(o){return Se({...o,state:!0,attribute:!1})}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function gl(o){return(e,t)=>{const i=typeof e=="function"?e:e[t];Object.assign(i,o)}}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const ja=(o,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(o,e,t),t);/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function Vt(o,e){return(t,i,n)=>{const r=s=>s.renderRoot?.querySelector(o)??null;if(e){const{get:s,set:c}=typeof i=="object"?t:n??(()=>{const a=Symbol();return{get(){return this[a]},set(d){this[a]=d}}})();return ja(t,i,{get(){let a=s.call(this);return a===void 0&&(a=r(this),(a!==null||this.hasUpdated)&&c.call(this,a)),a}})}return ja(t,i,{get(){return r(this)}})}}function ir(o){const e=typeof o=="number"?`Timed out after ${o}ms`:o;return new DOMException(e,"TimeoutError")}let Ws=!0;try{const o=new EventTarget,e=new AbortController;e.abort(),o.addEventListener("test",()=>{Ws=!1},{signal:e.signal}),o.dispatchEvent(new Event("test"))}catch{Ws=!1}let Va=!1;const Ks=new Error("test");try{AbortSignal.abort(Ks).throwIfAborted()}catch(o){Va=o===Ks&&Ks.message==="test"}class Be extends AbortController{constructor(...e){super(),this.promise=new Promise((t,i)=>{this.onAbort(i)}),this.promise.catch(()=>{});for(const t of e){if(!t)continue;const i=()=>this.abort(Be.getAbortError(t));if(t.aborted){i();return}this.eventListener(t,"abort",i)}}get aborted(){return this.signal.aborted}get reason(){return this.signal.reason}static abort(e=Be.createAbortError()){if(AbortSignal.abort)return AbortSignal.abort(e);const t=new Be;return t.abort(e),t.signal}static catchAbortError(e){if(!Be.isAbortError(e))throw e}static createAbortError(e="Aborted"){return new DOMException(e,"AbortError")}static getAbortError(e){if(!e.aborted)throw new Error("Signal is not aborted");return e.reason instanceof Error?e.reason:e.reason===void 0?Be.createAbortError():Be.createAbortError(String(e.reason))}static isAbortError(e){return e instanceof Error&&e.name==="AbortError"}static timeout(e){if(AbortSignal.timeout)return AbortSignal.timeout(e);const t=new Be;return window.setTimeout(()=>{t.abort(ir(e))},e),t.signal}abort(e=Be.createAbortError()){this.aborted||(super.abort(e),this.reason!==e&&(this.signal.reason=e))}all(e){return this.race(t=>[Promise.all(e(t))])}any(e){return this.race(t=>[Promise.any(e(t))])}call(e){let t,i;return this.race(n=>[new Promise((r,s)=>{t=e(r,s,n),t&&(i=this.onAbort(t))})]).finally(()=>{i?.()})}child(){return new Be(this.signal)}delay(e){return this.call(t=>{const i=window.setTimeout(t,e);return()=>window.clearTimeout(i)})}eventListener(e,t,i,n={}){if(this.aborted)return()=>{};const r={...n,signal:this.signal};e.addEventListener(t,i,r);const s=()=>e.removeEventListener(t,i,r);if(Ws)return s;const c=this.onAbort(s);return()=>{s(),c()}}interval(e,t,...i){const n=window.setInterval(e,t,...i),r=()=>window.clearInterval(n),s=this.onAbort(r);return()=>{r(),s()}}onAbort(e){const t=()=>e(this.reason);return this.aborted?(t(),()=>{}):(this.signal.addEventListener("abort",t,{once:!0}),()=>{this.signal.removeEventListener("abort",t)})}race(e){if(this.reason)return Promise.reject(this.reason);const t=new Be(this.signal),i=e(t.signal),n=this.promise;return Promise.race([n,...i]).finally(()=>{t.abort(Be.createAbortError("Settled"))})}throwIfAborted(){if(Va){this.signal.throwIfAborted();return}if(this.reason)throw this.reason}timeout(e,t,...i){const n=window.setTimeout(()=>{s(),e(...i)},t),r=()=>window.clearTimeout(n),s=this.onAbort(r);return()=>{r(),s()}}}const Zs=60,Qs=60*Zs,Ci=24*Qs,yl=7*Ci,bl=365*Ci,vl=["","k","M","G","T","P","E","Z","Y"],wl=["","m","μ","n","p","f","a","z","y"];function ai(o){return rr(o,"b/s")}function nr(o){const e=o/1e3;return e>=bl?ci(e/Ci,"y"):e>=yl?ci(e/Ci,"w"):e>=Ci?ci(e/Ci,"d"):e>=Qs?ci(e/Qs,"h"):e>=Zs?ci(e/Zs,"m"):rr(e,"s")}function rr(o,e=""){if(Number.isNaN(o))return`NaN${e}`;const t=o<0,i=t?"-":"";if(!Number.isFinite(o))return`${i}∞${e}`;const n=t?-o:o,r=n===0?0:Math.log10(n),s=Math.floor(r),c=Math.floor(s/3),a=10**(c*3),d=n/a,l=ci(d),u=c<0?wl[-c]:vl[c];return`${i}${l}${u??"⁉️"}${e}`}function wt(o,e=[],t=!1){if(e.includes(o))return"[circular reference]";if(Array.isArray(o)){const i=e.slice(0);return i.push(o),`[${o.map(r=>wt(r,i,!0)).join(", ")}]`}if(o instanceof Error)return`${o.name}: ${o.message}`;if(typeof o=="object"&&o!==null){const i=e.concat(o);return`{ ${Object.entries(o).map(([r,s])=>`${r}: ${wt(s,i,!0)}`).join(", ")} }`}return typeof o=="function"||typeof o=="symbol"?`[${typeof o}]`:typeof o=="string"?t?`'${o}'`:o:typeof o=="number"?rr(o):String(o)}function Sl(o,e=1){const t=e===1?o:o/e;return ci(100*t,"%")}function ci(o,e){const t=o<10?o.toFixed(2):o<1e3?o.toPrecision(3):Math.round(o),i=Number(t);return e===void 0?String(i):`${i}${e}`}function El(o=new Date,e=3){const t=o instanceof Date?o:new Date(o),i=t.toTimeString().substring(0,8),n=(t.getMilliseconds()/1e3).toFixed(e).substring(1);return`${i}${n}`}function Ge(o){return o instanceof Error?o:new Error(String(o))}const Ys={DEBUG:{consoleMethod:"debug",emoji:"🔸",weight:2},ERROR:{consoleMethod:"error",emoji:"❌",weight:5},INFO:{consoleMethod:"info",emoji:"🔹",weight:3},QUIET:{weight:6},SPAM:{consoleMethod:"debug",emoji:"⬩",weight:1},WARN:{consoleMethod:"warn",emoji:"⚠️",weight:4}},Cl=Object.keys(Ys),dt=class dt{constructor(e){const t=dt.nameCountMap.get(e)||0;this.name=e,this.nr=t+1,dt.nameCountMap.set(e,this.nr)}static addLogListener(e){if(dt.logListeners.has(e))throw new Error("listener has already been added");return dt.logListeners.add(e),()=>{dt.logListeners.delete(e)}}static createPrefix(e){const{emoji:t,name:i,nr:n,timestamp:r}=e,s=n===1?"":`#${n}`;return`${r} ${t} [${i}${s}]`}static createStack(e,t){const{stack:i}=e;if(!i)return"Error stack unsupported";const n=i.split(`
`);return n[0]===e.toString()&&n.shift(),e.message===""&&n.shift(),n[n.length-1]===""&&n.pop(),n.length>t&&(n.length=t),n.map(r=>r.trim()).join(`
`)}static createString(e){const t=[dt.createPrefix(e)],{details:i,error:n,message:r}=e;if(r&&t.push(r),i&&t.push(wt(i)),n){const s=dt.createStack(n,3).split(`
`).map(c=>` ${c}`).join(`
`);t.push(`${n.toString()}
${s}`)}return t.join(" ")}static isLevelName(e){return Cl.includes(e)}assert(e,t,i){if(!e){const n=new Error(t);throw this.log("ERROR",{message:t,details:i,error:n}),n}}debug(e,t){this.log("DEBUG",{message:e,details:t})}error(e,t,i=new Error("Stack trace")){if(e instanceof Error){this.log("ERROR",{details:t,error:e});return}this.log("ERROR",{message:e,details:t,error:i})}handleError(){return e=>this.error(Ge(e))}handleWarn(){return e=>this.warn(Ge(e))}info(e,t){this.log("INFO",{message:e,details:t})}log(e,{details:t,error:i,message:n}){if(e==="QUIET")throw new Error("Can not log at level QUIET");const{options:r}=dt,s=Ys[e],c=r.level?s.weight>=Ys[r.level].weight:!1,a={details:t,emoji:s.emoji,enabled:c,error:i,level:e,message:n,name:this.name,nr:this.nr,timestamp:El()};for(const d of dt.logListeners)d(a);if(c&&r.console){const d=[dt.createPrefix(a),n,t,i].filter(l=>l!==void 0);console[s.consoleMethod](...d)}}spam(e,t){this.log("SPAM",{message:e,details:t})}warn(e,t,i=new Error("Stack trace")){if(e instanceof Error){this.log("WARN",{error:e});return}this.log("WARN",{message:e,details:t,error:i})}};dt.options={console:!0,level:"INFO"},dt.logListeners=new Set,dt.nameCountMap=new Map;let Ne=dt;var Tl=Object.defineProperty,Al=Object.getOwnPropertyDescriptor,ot=(o,e,t,i)=>{for(var n=i>1?void 0:i?Al(e,t):e,r=o.length-1,s;r>=0;r--)(s=o[r])&&(n=(i?s(e,t,n):s(n))||n);return i&&n&&Tl(e,t,n),n};W.LiveryBufferGraph=class extends vt{constructor(){super(...arguments),this.abrBandwidthColor=null,this.abrBufferColor=null,this.audioColor=null,this.backgroundColor=null,this.bubbles=!1,this.bufferColor=null,this.decodedColor=null,this.droppedColor=null,this.latencyColor=null,this.maxRows=60,this.player=null,this.textColor=null,this.updateInterval=500,this.videoColor=null,this.log=new Ne("livery-buffer-graph")}get eventInit(){return{bubbles:this.bubbles,composed:this.bubbles}}connectedCallback(){super.connectedCallback(),this.onStateChange()}disconnectedCallback(){super.disconnectedCallback(),this.onStateChange()}render(){return bt`<div id="container"></div>`}updated(){this.onStateChange(!0)}addRow(){const{chart:e,marks:t,rows:i}=this.active;i.push(this.createRow());const n=this.maxRows*this.updateInterval,r=Date.now();let s=i.findIndex(({date:a})=>r-a<n);s>2&&i.splice(0,s-2),s=t.findIndex(({date:a})=>r-a<n),s>=0&&t.splice(0,s);const c=(a,d)=>i.map(l=>({name:String(l.date),value:[l.date,d?d(l[a]):l[a]]}));e.setOption({series:[{data:c("audioBuffer")},{data:c("videoBuffer"),markPoint:{data:t.map(({date:a,quality:d,targetLatency:l,up:u})=>({coord:[a,l],symbolRotate:u?0:180,value:d})),symbol:"triangle",symbolSize:18}},{data:c("abrBuffer")},{data:c("latency")},{data:c("decodedFrames",a=>Math.max(0,a))},{data:c("droppedFrames",a=>Math.max(0,a))},{data:c("abrBandwidth")}],xAxis:{min:r-n}},!1)}createChart(){const e=this.container,t=window.echarts.init(e),i=new ResizeObserver(()=>t.resize());return i.observe(e),t.setOption({animation:!1,grid:{backgroundColor:this.backgroundColor??"transparent"},legend:{show:!0,textStyle:{align:"",color:this.textColor??"#eee"},width:"75%"},series:[{itemStyle:{color:this.audioColor??this.bufferColor??"#0b8"},name:"Audio",symbol:"none",type:"line"},{itemStyle:{color:this.videoColor??this.bufferColor??"#00bfff"},name:"Video",symbol:"none",type:"line"},{itemStyle:{color:this.abrBufferColor??this.bufferColor??"#bbddff"},name:"ABR B̅uf",symbol:"none",type:"line"},{itemStyle:{color:this.latencyColor??"#ffa500"},name:"Latency",symbol:"none",type:"line"},{itemStyle:{color:this.decodedColor??"#f6c2f3"},lineStyle:{opacity:.5},name:"Decoded",showSymbol:!1,symbol:"triangle",type:"line",yAxisIndex:1},{itemStyle:{color:this.droppedColor??"#fc1c1c"},lineStyle:{opacity:.5},name:"Dropped",showSymbol:!1,symbol:"triangle",type:"line",yAxisIndex:1},{itemStyle:{color:this.abrBandwidthColor??"#ffcccc"},name:"ABR B̅w",showSymbol:!1,symbol:"square",type:"line",yAxisIndex:2}],xAxis:{axisLabel:{rotate:30},axisLine:{lineStyle:{color:this.textColor??"#eee"}},type:"time"},yAxis:[{axisLine:{lineStyle:{color:this.textColor??"#eee"}},max:({max:n})=>Math.ceil((n+.01)*10)/10,min:({min:n})=>Math.trunc((n-.01)*10)/10,minInterval:.1,name:"● Seconds",triggerEvent:!0,type:"value"},{axisLine:{lineStyle:{color:this.textColor??"#eee"}},name:"▲ FPS",splitLine:{show:!1},triggerEvent:!0,type:"value"},{axisLine:{lineStyle:{color:this.textColor??"#eee"},onZero:!1},name:"■ MBPS",offset:50,position:"right",splitLine:{show:!1},triggerEvent:!0,type:"value"}]}),t.on("click",{componentType:"yAxis",targetType:"axisName"},n=>{if(n.name==="● Seconds")for(const r of["Audio","Video","ABR B̅uf","Latency"])t.dispatchAction({name:r,type:"legendToggleSelect"});if(n.name==="▲ FPS")for(const r of["Decoded","Dropped"])t.dispatchAction({name:r,type:"legendToggleSelect"});n.name==="■ MBPS"&&t.dispatchAction({name:"ABR B̅w",type:"legendToggleSelect"})}),{chart:t,resizeObserver:i}}createRow(){const e=this.active,{lastDecoded:t,lastDropped:i,lastTime:n,player:{engine:r}}=e,s=Date.now();if(!r)return{abrBandwidth:Number.NaN,abrBuffer:Number.NaN,audioBuffer:Number.NaN,date:s,decodedFrames:Number.NaN,droppedFrames:Number.NaN,latency:Number.NaN,videoBuffer:Number.NaN};const{abrBandwidth:c,abrBuffer:a,audioBuffer:d,buffer:l,decodedFrames:u,droppedFrames:h,latency:p,playing:f,videoBuffer:m}=r,y=(s-n)/1e3;return e.lastTime=s,e.lastDecoded=u,e.lastDropped=h,{abrBandwidth:c/1e6,abrBuffer:a,audioBuffer:Number.isNaN(d)?l:d,date:s,decodedFrames:(u-t)/y||Number.NaN,droppedFrames:(h-i)/y||Number.NaN,latency:f?p:Number.NaN,videoBuffer:Number.isNaN(m)?l:m}}handleEngine(e){const t=this.active;if(window.clearInterval(t.intervalId),t.intervalId=Number.NaN,t.lastDecoded=Number.NaN,t.lastDropped=Number.NaN,t.lastTime=Number.NaN,!e){this.addRow();return}e.onProperty("paused",n=>{window.clearInterval(t.intervalId),t.intervalId=Number.NaN,this.addRow(),!n&&(t.intervalId=window.setInterval(()=>this.addRow(),this.updateInterval))});let i=-1;e.onProperty("activeQuality",n=>{this.active&&n>=0&&this.active.marks.push({date:Date.now(),quality:n,targetLatency:e.targetLatency,up:n>i}),i=n})}loadScript(){if(!!document.getElementById(W.LiveryBufferGraph.scriptId))return;this.log.debug("loadScript");const t=document.createElement("script");t.id=W.LiveryBufferGraph.scriptId,t.onload=()=>this.onStateChange(),t.onerror=()=>this.onError(new Error(`Error loading script: ${t.src}`)),t.src="https://cdn.jsdelivr.net/npm/echarts@5.6.0/dist/echarts.min.js",document.head.appendChild(t)}onError(e){const t=Ge(e);this.log.error(t),this.dispatchEvent(new wi(t,this.eventInit))}onStateChange(e=!1){if(!window.echarts){this.loadScript();return}this.isConnected?(e&&this.stop(),this.start()):this.stop()}start(){if(this.active){this.log.debug("start(): already active");return}const e=this.player??document.querySelector("livery-player");if(!e){this.log.debug("start(): wait for player reference to be set");return}this.log.debug("start");const t=new Be,{chart:i,resizeObserver:n}=this.createChart();this.active={abortable:t,chart:i,intervalId:Number.NaN,lastDecoded:Number.NaN,lastDropped:Number.NaN,lastTime:Number.NaN,marks:[],player:e,resizeObserver:n,rows:[]},this.handleEngine(e.engine),t.eventListener(e,"livery-engine-change",({engine:r})=>this.handleEngine(r))}stop(){if(!this.active)return;this.log.debug("stop");const{abortable:e,chart:t,intervalId:i,resizeObserver:n}=this.active;e.abort(),window.clearInterval(i),t.dispose(),n.disconnect(),this.active=void 0}},W.LiveryBufferGraph.styles=ni`
:host {
display: block;
}
:host([hidden]) {
display: none;
}
#container {
height: 300px;
}
`,W.LiveryBufferGraph.scriptId="livery-buffer-graph-loader",ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"abrBandwidthColor",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"abrBufferColor",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"audioColor",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"backgroundColor",2),ot([Se({reflect:!0,type:Boolean})],W.LiveryBufferGraph.prototype,"bubbles",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"bufferColor",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"decodedColor",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"droppedColor",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"latencyColor",2),ot([Se({reflect:!0,type:Number})],W.LiveryBufferGraph.prototype,"maxRows",2),ot([Se({type:Object})],W.LiveryBufferGraph.prototype,"player",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"textColor",2),ot([Se({reflect:!0,type:Number})],W.LiveryBufferGraph.prototype,"updateInterval",2),ot([Se({reflect:!0,type:String})],W.LiveryBufferGraph.prototype,"videoColor",2),ot([Vt("#container")],W.LiveryBufferGraph.prototype,"container",2),W.LiveryBufferGraph=ot([tr("livery-buffer-graph")],W.LiveryBufferGraph);var _l="1.0.37",sr="",za="?",Xs="function",Js="undefined",eo="object",or="string",Ha="major",Q="model",ee="name",z="type",Y="vendor",se="version",St="architecture",Ki="console",De="mobile",Oe="tablet",yt="smarttv",Ti="wearable",to="embedded",io=500,ar="Amazon",Zi="Apple",Ga="ASUS",Wa="BlackBerry",ui="Browser",cr="Chrome",Il="Edge",ur="Firefox",lr="Google",Ka="Huawei",no="LG",ro="Microsoft",Za="Motorola",dr="Opera",hr="Samsung",Qa="Sharp",pr="Sony",so="Xiaomi",oo="Zebra",Ya="Facebook",Xa="Chromium OS",Ja="Mac OS",xl=function(o,e){var t={};for(var i in o)e[i]&&e[i].length%2===0?t[i]=e[i].concat(o[i]):t[i]=o[i];return t},fr=function(o){for(var e={},t=0;t<o.length;t++)e[o[t].toUpperCase()]=o[t];return e},ec=function(o,e){return typeof o===or?Qi(e).indexOf(Qi(o))!==-1:!1},Qi=function(o){return o.toLowerCase()},Rl=function(o){return typeof o===or?o.replace(/[^\d\.]/g,sr).split(".")[0]:void 0},ao=function(o,e){if(typeof o===or)return o=o.replace(/^\s\s*/,sr),typeof e===Js?o:o.substring(0,io)},Yi=function(o,e){for(var t=0,i,n,r,s,c,a;t<e.length&&!c;){var d=e[t],l=e[t+1];for(i=n=0;i<d.length&&!c&&d[i];)if(c=d[i++].exec(o),c)for(r=0;r<l.length;r++)a=c[++n],s=l[r],typeof s===eo&&s.length>0?s.length===2?typeof s[1]==Xs?this[s[0]]=s[1].call(this,a):this[s[0]]=s[1]:s.length===3?typeof s[1]===Xs&&!(s[1].exec&&s[1].test)?this[s[0]]=a?s[1].call(this,a,s[2]):void 0:this[s[0]]=a?a.replace(s[1],s[2]):void 0:s.length===4&&(this[s[0]]=a?s[3].call(this,a.replace(s[1],s[2])):void 0):this[s]=a||void 0;t+=2}},co=function(o,e){for(var t in e)if(typeof e[t]===eo&&e[t].length>0){for(var i=0;i<e[t].length;i++)if(ec(e[t][i],o))return t===za?void 0:t}else if(ec(e[t],o))return t===za?void 0:t;return o},kl={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},tc={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ic={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[se,[ee,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[se,[ee,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ee,se],[/opios[\/ ]+([\w\.]+)/i],[se,[ee,dr+" Mini"]],[/\bopr\/([\w\.]+)/i],[se,[ee,dr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[se,[ee,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[ee,se],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[se,[ee,"UC"+ui]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[se,[ee,"WeChat"]],[/konqueror\/([\w\.]+)/i],[se,[ee,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[se,[ee,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[se,[ee,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[se,[ee,"Smart Lenovo "+ui]],[/(avast|avg)\/([\w\.]+)/i],[[ee,/(.+)/,"$1 Secure "+ui],se],[/\bfocus\/([\w\.]+)/i],[se,[ee,ur+" Focus"]],[/\bopt\/([\w\.]+)/i],[se,[ee,dr+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[se,[ee,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[se,[ee,"Dolphin"]],[/coast\/([\w\.]+)/i],[se,[ee,dr+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[se,[ee,"MIUI "+ui]],[/fxios\/([-\w\.]+)/i],[se,[ee,ur]],[/\bqihu|(qi?ho?o?|360)browser/i],[[ee,"360 "+ui]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[ee,/(.+)/,"$1 "+ui],se],[/samsungbrowser\/([\w\.]+)/i],[se,[ee,hr+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[ee,/_/g," "],se],[/metasr[\/ ]?([\d\.]+)/i],[se,[ee,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ee,"Sogou Mobile"],se],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[ee,se],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[ee],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ee,Ya],se],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[ee,se],[/\bgsa\/([\w\.]+) .*safari\//i],[se,[ee,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[se,[ee,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[se,[ee,cr+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ee,cr+" WebView"],se],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[se,[ee,"Android "+ui]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ee,se],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[se,[ee,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[se,ee],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ee,[se,co,kl]],[/(webkit|khtml)\/([\w\.]+)/i],[ee,se],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ee,"Netscape"],se],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[se,[ee,ur+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[ee,se],[/(cobalt)\/([\w\.]+)/i],[ee,[se,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[St,"amd64"]],[/(ia32(?=;))/i],[[St,Qi]],[/((?:i[346]|x)86)[;\)]/i],[[St,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[St,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[St,"armhf"]],[/windows (ce|mobile); ppc;/i],[[St,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[St,/ower/,sr,Qi]],[/(sun4\w)[;\)]/i],[[St,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[St,Qi]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Q,[Y,hr],[z,Oe]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[Q,[Y,hr],[z,De]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Q,[Y,Zi],[z,De]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Q,[Y,Zi],[z,Oe]],[/(macintosh);/i],[Q,[Y,Zi]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Q,[Y,Qa],[z,De]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[Q,[Y,Ka],[z,Oe]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Q,[Y,Ka],[z,De]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[Q,/_/g," "],[Y,so],[z,De]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[Q,/_/g," "],[Y,so],[z,Oe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Q,[Y,"OPPO"],[z,De]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Q,[Y,"Vivo"],[z,De]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Q,[Y,"Realme"],[z,De]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Q,[Y,Za],[z,De]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Q,[Y,Za],[z,Oe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Q,[Y,no],[z,Oe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[Q,[Y,no],[z,De]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[Q,[Y,"Lenovo"],[z,Oe]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[Q,/_/g," "],[Y,"Nokia"],[z,De]],[/(pixel c)\b/i],[Q,[Y,lr],[z,Oe]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Q,[Y,lr],[z,De]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Q,[Y,pr],[z,De]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Q,"Xperia Tablet"],[Y,pr],[z,Oe]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Q,[Y,"OnePlus"],[z,De]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Q,[Y,ar],[z,Oe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Q,/(.+)/g,"Fire Phone $1"],[Y,ar],[z,De]],[/(playbook);[-\w\),; ]+(rim)/i],[Q,Y,[z,Oe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Q,[Y,Wa],[z,De]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Q,[Y,Ga],[z,Oe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Q,[Y,Ga],[z,De]],[/(nexus 9)/i],[Q,[Y,"HTC"],[z,Oe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Y,[Q,/_/g," "],[z,De]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Q,[Y,"Acer"],[z,Oe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Q,[Y,"Meizu"],[z,De]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Q,[Y,"Ulefone"],[z,De]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[Y,Q,[z,De]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[Y,Q,[z,Oe]],[/(surface duo)/i],[Q,[Y,ro],[z,Oe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Q,[Y,"Fairphone"],[z,De]],[/(u304aa)/i],[Q,[Y,"AT&T"],[z,De]],[/\bsie-(\w*)/i],[Q,[Y,"Siemens"],[z,De]],[/\b(rct\w+) b/i],[Q,[Y,"RCA"],[z,Oe]],[/\b(venue[\d ]{2,7}) b/i],[Q,[Y,"Dell"],[z,Oe]],[/\b(q(?:mv|ta)\w+) b/i],[Q,[Y,"Verizon"],[z,Oe]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[Q,[Y,"Barnes & Noble"],[z,Oe]],[/\b(tm\d{3}\w+) b/i],[Q,[Y,"NuVision"],[z,Oe]],[/\b(k88) b/i],[Q,[Y,"ZTE"],[z,Oe]],[/\b(nx\d{3}j) b/i],[Q,[Y,"ZTE"],[z,De]],[/\b(gen\d{3}) b.+49h/i],[Q,[Y,"Swiss"],[z,De]],[/\b(zur\d{3}) b/i],[Q,[Y,"Swiss"],[z,Oe]],[/\b((zeki)?tb.*\b) b/i],[Q,[Y,"Zeki"],[z,Oe]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[Y,"Dragon Touch"],Q,[z,Oe]],[/\b(ns-?\w{0,9}) b/i],[Q,[Y,"Insignia"],[z,Oe]],[/\b((nxa|next)-?\w{0,9}) b/i],[Q,[Y,"NextBook"],[z,Oe]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[Y,"Voice"],Q,[z,De]],[/\b(lvtel\-)?(v1[12]) b/i],[[Y,"LvTel"],Q,[z,De]],[/\b(ph-1) /i],[Q,[Y,"Essential"],[z,De]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[Q,[Y,"Envizen"],[z,Oe]],[/\b(trio[-\w\. ]+) b/i],[Q,[Y,"MachSpeed"],[z,Oe]],[/\btu_(1491) b/i],[Q,[Y,"Rotor"],[z,Oe]],[/(shield[\w ]+) b/i],[Q,[Y,"Nvidia"],[z,Oe]],[/(sprint) (\w+)/i],[Y,Q,[z,De]],[/(kin\.[onetw]{3})/i],[[Q,/\./g," "],[Y,ro],[z,De]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Q,[Y,oo],[z,Oe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Q,[Y,oo],[z,De]],[/smart-tv.+(samsung)/i],[Y,[z,yt]],[/hbbtv.+maple;(\d+)/i],[[Q,/^/,"SmartTV"],[Y,hr],[z,yt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Y,no],[z,yt]],[/(apple) ?tv/i],[Y,[Q,Zi+" TV"],[z,yt]],[/crkey/i],[[Q,cr+"cast"],[Y,lr],[z,yt]],[/droid.+aft(\w+)( bui|\))/i],[Q,[Y,ar],[z,yt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Q,[Y,Qa],[z,yt]],[/(bravia[\w ]+)( bui|\))/i],[Q,[Y,pr],[z,yt]],[/(mitv-\w{5}) bui/i],[Q,[Y,so],[z,yt]],[/Hbbtv.*(technisat) (.*);/i],[Y,Q,[z,yt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Y,ao],[Q,ao],[z,yt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[z,yt]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[Y,Q,[z,Ki]],[/droid.+; (shield) bui/i],[Q,[Y,"Nvidia"],[z,Ki]],[/(playstation [345portablevi]+)/i],[Q,[Y,pr],[z,Ki]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Q,[Y,ro],[z,Ki]],[/((pebble))app/i],[Y,Q,[z,Ti]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Q,[Y,Zi],[z,Ti]],[/droid.+; (glass) \d/i],[Q,[Y,lr],[z,Ti]],[/droid.+; (wt63?0{2,3})\)/i],[Q,[Y,oo],[z,Ti]],[/(quest( 2| pro)?)/i],[Q,[Y,Ya],[z,Ti]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Y,[z,to]],[/(aeobc)\b/i],[Q,[Y,ar],[z,to]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[Q,[z,De]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[Q,[z,Oe]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[z,Oe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[z,De]],[/(android[-\w\. ]{0,9});.+buil/i],[Q,[Y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[se,[ee,Il+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[se,[ee,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ee,se],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[se,ee]],os:[[/microsoft (windows) (vista|xp)/i],[ee,se],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[ee,[se,co,tc]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[se,co,tc],[ee,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[se,/_/g,"."],[ee,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ee,Ja],[se,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[se,ee],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[ee,se],[/\(bb(10);/i],[se,[ee,Wa]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[se,[ee,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[se,[ee,ur+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[se,[ee,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[se,[ee,"watchOS"]],[/crkey\/([\d\.]+)/i],[se,[ee,cr+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ee,Xa],se],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ee,se],[/(sunos) ?([\w\.\d]*)/i],[[ee,"Solaris"],se],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ee,se]]};function Dt(o,e){if(typeof o===eo&&(e=o,o=void 0),!(this instanceof Dt))return new Dt(o,e).getResult();var t=typeof window!==Js&&window.navigator?window.navigator:void 0,i=o||(t&&t.userAgent?t.userAgent:sr),n=t&&t.userAgentData?t.userAgentData:void 0,r=e?xl(ic,e):ic,s=t&&t.userA