www.iboxwebapps.com Open in urlscan Pro
108.157.150.77  Public Scan

Submitted URL: http://www.iboxwebapps.com/assets/index-df4d7467.js
Effective URL: https://www.iboxwebapps.com/assets/index-df4d7467.js
Submission: On January 21 via api from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();function Dm(t,e){const r=Object.create(null),n=t.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return e?i=>!!r[i.toLowerCase()]:i=>!!r[i]}const Tr={},al=[],xi=()=>{},cD=()=>!1,uD=/^on[^a-z]/,Td=t=>uD.test(t),Om=t=>t.startsWith("onUpdate:"),Ur=Object.assign,km=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},fD=Object.prototype.hasOwnProperty,Gt=(t,e)=>fD.call(t,e),It=Array.isArray,ol=t=>Sd(t)==="[object Map]",S1=t=>Sd(t)==="[object Set]",kt=t=>typeof t=="function",vr=t=>typeof t=="string",Mm=t=>typeof t=="symbol",fr=t=>t!==null&&typeof t=="object",w1=t=>fr(t)&&kt(t.then)&&kt(t.catch),C1=Object.prototype.toString,Sd=t=>C1.call(t),dD=t=>Sd(t).slice(8,-1),I1=t=>Sd(t)==="[object Object]",Fm=t=>vr(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Cf=Dm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wd=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},hD=/-(\w)/g,Bi=wd(t=>t.replace(hD,(e,r)=>r?r.toUpperCase():"")),pD=/\B([A-Z])/g,Cl=wd(t=>t.replace(pD,"-$1").toLowerCase()),Cd=wd(t=>t.charAt(0).toUpperCase()+t.slice(1)),Oh=wd(t=>t?`on${Cd(t)}`:""),tu=(t,e)=>!Object.is(t,e),kh=(t,e)=>{for(let r=0;r<t.length;r++)t[r](e)},Bf=(t,e,r)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},vD=t=>{const e=parseFloat(t);return isNaN(e)?t:e},mD=t=>{const e=vr(t)?Number(t):NaN;return isNaN(e)?t:e};let _y;const cv=()=>_y||(_y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Au(t){if(It(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],i=vr(n)?xD(n):Au(n);if(i)for(const a in i)e[a]=i[a]}return e}else{if(vr(t))return t;if(fr(t))return t}}const gD=/;(?![^(]*\))/g,yD=/:([^]+)/,bD=/\/\*[^]*?\*\//g;function xD(t){const e={};return t.replace(bD,"").split(gD).forEach(r=>{if(r){const n=r.split(yD);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function bi(t){let e="";if(vr(t))e=t;else if(It(t))for(let r=0;r<t.length;r++){const n=bi(t[r]);n&&(e+=n+" ")}else if(fr(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}function oce(t){if(!t)return null;let{class:e,style:r}=t;return e&&!vr(e)&&(t.class=bi(e)),r&&(t.style=Au(r)),t}const AD="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ED=Dm(AD);function _1(t){return!!t||t===""}const R1=t=>vr(t)?t:t==null?"":It(t)||fr(t)&&(t.toString===C1||!kt(t.toString))?JSON.stringify(t,L1,2):String(t),L1=(t,e)=>e&&e.__v_isRef?L1(t,e.value):ol(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,i])=>(r[`${n} =>`]=i,r),{})}:S1(e)?{[`Set(${e.size})`]:[...e.values()]}:fr(e)&&!It(e)&&!I1(e)?String(e):e;let ri;class D1{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ri,!e&&ri&&(this.index=(ri.scopes||(ri.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=ri;try{return ri=this,e()}finally{ri=r}}}on(){ri=this}off(){ri=this.parent}stop(e){if(this._active){let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.scopes)for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function TD(t){return new D1(t)}function SD(t,e=ri){e&&e.active&&e.effects.push(t)}function O1(){return ri}function wD(t){ri&&ri.cleanups.push(t)}const Pm=t=>{const e=new Set(t);return e.w=0,e.n=0,e},k1=t=>(t.w&Eo)>0,M1=t=>(t.n&Eo)>0,CD=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=Eo},ID=t=>{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n<e.length;n++){const i=e[n];k1(i)&&!M1(i)?i.delete(t):e[r++]=i,i.w&=~Eo,i.n&=~Eo}e.length=r}},Uf=new WeakMap;let pc=0,Eo=1;const uv=30;let Mi;const us=Symbol(""),fv=Symbol("");class Nm{constructor(e,r=null,n){this.fn=e,this.scheduler=r,this.active=!0,this.deps=[],this.parent=void 0,SD(this,n)}run(){if(!this.active)return this.fn();let e=Mi,r=vo;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=Mi,Mi=this,vo=!0,Eo=1<<++pc,pc<=uv?CD(this):Ry(this),this.fn()}finally{pc<=uv&&ID(this),Eo=1<<--pc,Mi=this.parent,vo=r,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Mi===this?this.deferStop=!0:this.active&&(Ry(this),this.onStop&&this.onStop(),this.active=!1)}}function Ry(t){const{deps:e}=t;if(e.length){for(let r=0;r<e.length;r++)e[r].delete(t);e.length=0}}let vo=!0;const F1=[];function Il(){F1.push(vo),vo=!1}function _l(){const t=F1.pop();vo=t===void 0?!0:t}function Wn(t,e,r){if(vo&&Mi){let n=Uf.get(t);n||Uf.set(t,n=new Map);let i=n.get(r);i||n.set(r,i=Pm()),P1(i)}}function P1(t,e){let r=!1;pc<=uv?M1(t)||(t.n|=Eo,r=!k1(t)):r=!t.has(Mi),r&&(t.add(Mi),Mi.deps.push(t))}function La(t,e,r,n,i,a){const o=Uf.get(t);if(!o)return;let l=[];if(e==="clear")l=[...o.values()];else if(r==="length"&&It(t)){const s=Number(n);o.forEach((c,u)=>{(u==="length"||u>=s)&&l.push(c)})}else switch(r!==void 0&&l.push(o.get(r)),e){case"add":It(t)?Fm(r)&&l.push(o.get("length")):(l.push(o.get(us)),ol(t)&&l.push(o.get(fv)));break;case"delete":It(t)||(l.push(o.get(us)),ol(t)&&l.push(o.get(fv)));break;case"set":ol(t)&&l.push(o.get(us));break}if(l.length===1)l[0]&&dv(l[0]);else{const s=[];for(const c of l)c&&s.push(...c);dv(Pm(s))}}function dv(t,e){const r=It(t)?t:[...t];for(const n of r)n.computed&&Ly(n);for(const n of r)n.computed||Ly(n)}function Ly(t,e){(t!==Mi||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function _D(t,e){var r;return(r=Uf.get(t))==null?void 0:r.get(e)}const RD=Dm("__proto__,__v_isRef,__isVue"),N1=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Mm)),LD=$m(),DD=$m(!1,!0),OD=$m(!0),Dy=kD();function kD(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=Qt(this);for(let a=0,o=this.length;a<o;a++)Wn(n,"get",a+"");const i=n[e](...r);return i===-1||i===!1?n[e](...r.map(Qt)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...r){Il();const n=Qt(this)[e].apply(this,r);return _l(),n}}),t}function MD(t){const e=Qt(this);return Wn(e,"has",t),e.hasOwnProperty(t)}function $m(t=!1,e=!1){return function(n,i,a){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&a===(t?e?XD:V1:e?H1:U1).get(n))return n;const o=It(n);if(!t){if(o&&Gt(Dy,i))return Reflect.get(Dy,i,a);if(i==="hasOwnProperty")return MD}const l=Reflect.get(n,i,a);return(Mm(i)?N1.has(i):RD(i))||(t||Wn(n,"get",i),e)?l:Fr(l)?o&&Fm(i)?l:l.value:fr(l)?t?Hm(l):Jt(l):l}}const FD=$1(),PD=$1(!0);function $1(t=!1){return function(r,n,i,a){let o=r[n];if(pl(o)&&Fr(o)&&!Fr(i))return!1;if(!t&&(!Hf(i)&&!pl(i)&&(o=Qt(o),i=Qt(i)),!It(r)&&Fr(o)&&!Fr(i)))return o.value=i,!0;const l=It(r)&&Fm(n)?Number(n)<r.length:Gt(r,n),s=Reflect.set(r,n,i,a);return r===Qt(a)&&(l?tu(i,o)&&La(r,"set",n,i):La(r,"add",n,i)),s}}function ND(t,e){const r=Gt(t,e);t[e];const n=Reflect.deleteProperty(t,e);return n&&r&&La(t,"delete",e,void 0),n}function $D(t,e){const r=Reflect.has(t,e);return(!Mm(e)||!N1.has(e))&&Wn(t,"has",e),r}function BD(t){return Wn(t,"iterate",It(t)?"length":us),Reflect.ownKeys(t)}const B1={get:LD,set:FD,deleteProperty:ND,has:$D,ownKeys:BD},UD={get:OD,set(t,e){return!0},deleteProperty(t,e){return!0}},HD=Ur({},B1,{get:DD,set:PD}),Bm=t=>t,Id=t=>Reflect.getPrototypeOf(t);function zu(t,e,r=!1,n=!1){t=t.__v_raw;const i=Qt(t),a=Qt(e);r||(e!==a&&Wn(i,"get",e),Wn(i,"get",a));const{has:o}=Id(i),l=n?Bm:r?jm:ru;if(o.call(i,e))return l(t.get(e));if(o.call(i,a))return l(t.get(a));t!==i&&t.get(e)}function Ku(t,e=!1){const r=this.__v_raw,n=Qt(r),i=Qt(t);return e||(t!==i&&Wn(n,"has",t),Wn(n,"has",i)),t===i?r.has(t):r.has(t)||r.has(i)}function Yu(t,e=!1){return t=t.__v_raw,!e&&Wn(Qt(t),"iterate",us),Reflect.get(t,"size",t)}function Oy(t){t=Qt(t);const e=Qt(this);return Id(e).has.call(e,t)||(e.add(t),La(e,"add",t,t)),this}function ky(t,e){e=Qt(e);const r=Qt(this),{has:n,get:i}=Id(r);let a=n.call(r,t);a||(t=Qt(t),a=n.call(r,t));const o=i.call(r,t);return r.set(t,e),a?tu(e,o)&&La(r,"set",t,e):La(r,"add",t,e),this}function My(t){const e=Qt(this),{has:r,get:n}=Id(e);let i=r.call(e,t);i||(t=Qt(t),i=r.call(e,t)),n&&n.call(e,t);const a=e.delete(t);return i&&La(e,"delete",t,void 0),a}function Fy(){const t=Qt(this),e=t.size!==0,r=t.clear();return e&&La(t,"clear",void 0,void 0),r}function qu(t,e){return function(n,i){const a=this,o=a.__v_raw,l=Qt(o),s=e?Bm:t?jm:ru;return!t&&Wn(l,"iterate",us),o.forEach((c,u)=>n.call(i,s(c),s(u),a))}}function Xu(t,e,r){return function(...n){const i=this.__v_raw,a=Qt(i),o=ol(a),l=t==="entries"||t===Symbol.iterator&&o,s=t==="keys"&&o,c=i[t](...n),u=r?Bm:e?jm:ru;return!e&&Wn(a,"iterate",s?fv:us),{next(){const{value:f,done:d}=c.next();return d?{value:f,done:d}:{value:l?[u(f[0]),u(f[1])]:u(f),done:d}},[Symbol.iterator](){return this}}}}function Ga(t){return function(...e){return t==="delete"?!1:this}}function VD(){const t={get(a){return zu(this,a)},get size(){return Yu(this)},has:Ku,add:Oy,set:ky,delete:My,clear:Fy,forEach:qu(!1,!1)},e={get(a){return zu(this,a,!1,!0)},get size(){return Yu(this)},has:Ku,add:Oy,set:ky,delete:My,clear:Fy,forEach:qu(!1,!0)},r={get(a){return zu(this,a,!0)},get size(){return Yu(this,!0)},has(a){return Ku.call(this,a,!0)},add:Ga("add"),set:Ga("set"),delete:Ga("delete"),clear:Ga("clear"),forEach:qu(!0,!1)},n={get(a){return zu(this,a,!0,!0)},get size(){return Yu(this,!0)},has(a){return Ku.call(this,a,!0)},add:Ga("add"),set:Ga("set"),delete:Ga("delete"),clear:Ga("clear"),forEach:qu(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{t[a]=Xu(a,!1,!1),r[a]=Xu(a,!0,!1),e[a]=Xu(a,!1,!0),n[a]=Xu(a,!0,!0)}),[t,r,e,n]}const[jD,WD,GD,zD]=VD();function Um(t,e){const r=e?t?zD:GD:t?WD:jD;return(n,i,a)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(Gt(r,i)&&i in n?r:n,i,a)}const KD={get:Um(!1,!1)},YD={get:Um(!1,!0)},qD={get:Um(!0,!1)},U1=new WeakMap,H1=new WeakMap,V1=new WeakMap,XD=new WeakMap;function ZD(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function JD(t){return t.__v_skip||!Object.isExtensible(t)?0:ZD(dD(t))}function Jt(t){return pl(t)?t:Vm(t,!1,B1,KD,U1)}function j1(t){return Vm(t,!1,HD,YD,H1)}function Hm(t){return Vm(t,!0,UD,qD,V1)}function Vm(t,e,r,n,i){if(!fr(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const a=i.get(t);if(a)return a;const o=JD(t);if(o===0)return t;const l=new Proxy(t,o===2?n:r);return i.set(t,l),l}function sl(t){return pl(t)?sl(t.__v_raw):!!(t&&t.__v_isReactive)}function pl(t){return!!(t&&t.__v_isReadonly)}function Hf(t){return!!(t&&t.__v_isShallow)}function W1(t){return sl(t)||pl(t)}function Qt(t){const e=t&&t.__v_raw;return e?Qt(e):t}function G1(t){return Bf(t,"__v_skip",!0),t}const ru=t=>fr(t)?Jt(t):t,jm=t=>fr(t)?Hm(t):t;function Wm(t){vo&&Mi&&(t=Qt(t),P1(t.dep||(t.dep=Pm())))}function Gm(t,e){t=Qt(t);const r=t.dep;r&&dv(r)}function Fr(t){return!!(t&&t.__v_isRef===!0)}function je(t){return K1(t,!1)}function z1(t){return K1(t,!0)}function K1(t,e){return Fr(t)?t:new QD(t,e)}class QD{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:Qt(e),this._value=r?e:ru(e)}get value(){return Wm(this),this._value}set value(e){const r=this.__v_isShallow||Hf(e)||pl(e);e=r?e:Qt(e),tu(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:ru(e),Gm(this))}}function Et(t){return Fr(t)?t.value:t}const eO={get:(t,e,r)=>Et(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return Fr(i)&&!Fr(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function Y1(t){return sl(t)?t:new Proxy(t,eO)}class tO{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:r,set:n}=e(()=>Wm(this),()=>Gm(this));this._get=r,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function sce(t){return new tO(t)}class rO{constructor(e,r,n){this._object=e,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return _D(Qt(this._object),this._key)}}class nO{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function lce(t,e,r){return Fr(t)?t:kt(t)?new nO(t):fr(t)&&arguments.length>1?iO(t,e,r):je(t)}function iO(t,e,r){const n=t[e];return Fr(n)?n:new rO(t,e,r)}class aO{constructor(e,r,n,i){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Nm(e,()=>{this._dirty||(this._dirty=!0,Gm(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Qt(this);return Wm(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function oO(t,e,r=!1){let n,i;const a=kt(t);return a?(n=t,i=xi):(n=t.get,i=t.set),new aO(n,i,a||!i,r)}function sO(t,...e){}function mo(t,e,r,n){let i;try{i=n?t(...n):t()}catch(a){_d(a,e,r)}return i}function Ai(t,e,r,n){if(kt(t)){const a=mo(t,e,r,n);return a&&w1(a)&&a.catch(o=>{_d(o,e,r)}),a}const i=[];for(let a=0;a<t.length;a++)i.push(Ai(t[a],e,r,n));return i}function _d(t,e,r,n=!0){const i=e?e.vnode:null;if(e){let a=e.parent;const o=e.proxy,l=r;for(;a;){const c=a.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,o,l)===!1)return}a=a.parent}const s=e.appContext.config.errorHandler;if(s){mo(s,null,10,[t,o,l]);return}}lO(t,r,i,n)}function lO(t,e,r,n=!0){console.error(t)}let nu=!1,hv=!1;const bn=[];let na=0;const ll=[];let Ta=null,Zo=0;const q1=Promise.resolve();let zm=null;function Ie(t){const e=zm||q1;return t?e.then(this?t.bind(this):t):e}function cO(t){let e=na+1,r=bn.length;for(;e<r;){const n=e+r>>>1;iu(bn[n])<t?e=n+1:r=n}return e}function Km(t){(!bn.length||!bn.includes(t,nu&&t.allowRecurse?na+1:na))&&(t.id==null?bn.push(t):bn.splice(cO(t.id),0,t),X1())}function X1(){!nu&&!hv&&(hv=!0,zm=q1.then(J1))}function uO(t){const e=bn.indexOf(t);e>na&&bn.splice(e,1)}function fO(t){It(t)?ll.push(...t):(!Ta||!Ta.includes(t,t.allowRecurse?Zo+1:Zo))&&ll.push(t),X1()}function Py(t,e=nu?na+1:0){for(;e<bn.length;e++){const r=bn[e];r&&r.pre&&(bn.splice(e,1),e--,r())}}function Z1(t){if(ll.length){const e=[...new Set(ll)];if(ll.length=0,Ta){Ta.push(...e);return}for(Ta=e,Ta.sort((r,n)=>iu(r)-iu(n)),Zo=0;Zo<Ta.length;Zo++)Ta[Zo]();Ta=null,Zo=0}}const iu=t=>t.id==null?1/0:t.id,dO=(t,e)=>{const r=iu(t)-iu(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function J1(t){hv=!1,nu=!0,bn.sort(dO);const e=xi;try{for(na=0;na<bn.length;na++){const r=bn[na];r&&r.active!==!1&&mo(r,null,14)}}finally{na=0,bn.length=0,Z1(),nu=!1,zm=null,(bn.length||ll.length)&&J1()}}function hO(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Tr;let i=r;const a=e.startsWith("update:"),o=a&&e.slice(7);if(o&&o in n){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:f,trim:d}=n[u]||Tr;d&&(i=r.map(h=>vr(h)?h.trim():h)),f&&(i=r.map(vD))}let l,s=n[l=Oh(e)]||n[l=Oh(Bi(e))];!s&&a&&(s=n[l=Oh(Cl(e))]),s&&Ai(s,t,6,i);const c=n[l+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,Ai(c,t,6,i)}}function Q1(t,e,r=!1){const n=e.emitsCache,i=n.get(t);if(i!==void 0)return i;const a=t.emits;let o={},l=!1;if(!kt(t)){const s=c=>{const u=Q1(c,e,!0);u&&(l=!0,Ur(o,u))};!r&&e.mixins.length&&e.mixins.forEach(s),t.extends&&s(t.extends),t.mixins&&t.mixins.forEach(s)}return!a&&!l?(fr(t)&&n.set(t,null),null):(It(a)?a.forEach(s=>o[s]=null):Ur(o,a),fr(t)&&n.set(t,o),o)}function Rd(t,e){return!t||!Td(e)?!1:(e=e.slice(2).replace(/Once$/,""),Gt(t,e[0].toLowerCase()+e.slice(1))||Gt(t,Cl(e))||Gt(t,e))}let pn=null,Ld=null;function Vf(t){const e=pn;return pn=t,Ld=t&&t.type.__scopeId||null,e}function cce(t){Ld=t}function uce(){Ld=null}function yc(t,e=pn,r){if(!e||t._n)return t;const n=(...i)=>{n._d&&qy(-1);const a=Vf(e);let o;try{o=t(...i)}finally{Vf(a),n._d&&qy(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Mh(t){const{type:e,vnode:r,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:l,attrs:s,emit:c,render:u,renderCache:f,data:d,setupState:h,ctx:p,inheritAttrs:v}=t;let g,m;const b=Vf(t);try{if(r.shapeFlag&4){const T=i||n;g=ea(u.call(T,T,f,a,h,d,p)),m=s}else{const T=e;g=ea(T.length>1?T(a,{attrs:s,slots:l,emit:c}):T(a,null)),m=e.props?s:pO(s)}}catch(T){Ec.length=0,_d(T,t,1),g=Rt(Ei)}let x=g;if(m&&v!==!1){const T=Object.keys(m),{shapeFlag:A}=x;T.length&&A&7&&(o&&T.some(Om)&&(m=vO(m,o)),x=To(x,m))}return r.dirs&&(x=To(x),x.dirs=x.dirs?x.dirs.concat(r.dirs):r.dirs),r.transition&&(x.transition=r.transition),g=x,Vf(b),g}const pO=t=>{let e;for(const r in t)(r==="class"||r==="style"||Td(r))&&((e||(e={}))[r]=t[r]);return e},vO=(t,e)=>{const r={};for(const n in t)(!Om(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function mO(t,e,r){const{props:n,children:i,component:a}=t,{props:o,children:l,patchFlag:s}=e,c=a.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&s>=0){if(s&1024)return!0;if(s&16)return n?Ny(n,o,c):!!o;if(s&8){const u=e.dynamicProps;for(let f=0;f<u.length;f++){const d=u[f];if(o[d]!==n[d]&&!Rd(c,d))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?Ny(n,o,c):!0:!!o;return!1}function Ny(t,e,r){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let i=0;i<n.length;i++){const a=n[i];if(e[a]!==t[a]&&!Rd(r,a))return!0}return!1}function gO({vnode:t,parent:e},r){for(;e&&e.subTree===t;)(t=e.vnode).el=r,e=e.parent}const yO=t=>t.__isSuspense;function bO(t,e){e&&e.pendingBranch?It(t)?e.effects.push(...t):e.effects.push(t):fO(t)}function fce(t,e){return Ym(t,null,e)}const Zu={};function st(t,e,r){return Ym(t,e,r)}function Ym(t,e,{immediate:r,deep:n,flush:i,onTrack:a,onTrigger:o}=Tr){var l;const s=O1()===((l=en)==null?void 0:l.scope)?en:null;let c,u=!1,f=!1;if(Fr(t)?(c=()=>t.value,u=Hf(t)):sl(t)?(c=()=>t,n=!0):It(t)?(f=!0,u=t.some(T=>sl(T)||Hf(T)),c=()=>t.map(T=>{if(Fr(T))return T.value;if(sl(T))return rs(T);if(kt(T))return mo(T,s,2)})):kt(t)?e?c=()=>mo(t,s,2):c=()=>{if(!(s&&s.isUnmounted))return d&&d(),Ai(t,s,3,[h])}:c=xi,e&&n){const T=c;c=()=>rs(T())}let d,h=T=>{d=b.onStop=()=>{mo(T,s,4)}},p;if(ou)if(h=xi,e?r&&Ai(e,s,3,[c(),f?[]:void 0,h]):c(),i==="sync"){const T=fk();p=T.__watcherHandles||(T.__watcherHandles=[])}else return xi;let v=f?new Array(t.length).fill(Zu):Zu;const g=()=>{if(b.active)if(e){const T=b.run();(n||u||(f?T.some((A,O)=>tu(A,v[O])):tu(T,v)))&&(d&&d(),Ai(e,s,3,[T,v===Zu?void 0:f&&v[0]===Zu?[]:v,h]),v=T)}else b.run()};g.allowRecurse=!!e;let m;i==="sync"?m=g:i==="post"?m=()=>Un(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),m=()=>Km(g));const b=new Nm(c,m);e?r?g():v=b.run():i==="post"?Un(b.run.bind(b),s&&s.suspense):b.run();const x=()=>{b.stop(),s&&s.scope&&km(s.scope.effects,b)};return p&&p.push(x),x}function xO(t,e,r){const n=this.proxy,i=vr(t)?t.includes(".")?eS(n,t):()=>n[t]:t.bind(n,n);let a;kt(e)?a=e:(a=e.handler,r=e);const o=en;ml(this);const l=Ym(i,a.bind(n),r);return o?ml(o):fs(),l}function eS(t,e){const r=e.split(".");return()=>{let n=t;for(let i=0;i<r.length&&n;i++)n=n[r[i]];return n}}function rs(t,e){if(!fr(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),Fr(t))rs(t.value,e);else if(It(t))for(let r=0;r<t.length;r++)rs(t[r],e);else if(S1(t)||ol(t))t.forEach(r=>{rs(r,e)});else if(I1(t))for(const r in t)rs(t[r],e);return t}function qm(t,e){const r=pn;if(r===null)return t;const n=Fd(r)||r.proxy,i=t.dirs||(t.dirs=[]);for(let a=0;a<e.length;a++){let[o,l,s,c=Tr]=e[a];o&&(kt(o)&&(o={mounted:o,updated:o}),o.deep&&rs(l),i.push({dir:o,instance:n,value:l,oldValue:void 0,arg:s,modifiers:c}))}return t}function Bo(t,e,r,n){const i=t.dirs,a=e&&e.dirs;for(let o=0;o<i.length;o++){const l=i[o];a&&(l.oldValue=a[o].value);let s=l.dir[n];s&&(Il(),Ai(s,r,8,[t.el,l,t,e]),_l())}}function AO(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Er(()=>{t.isMounted=!0}),Rl(()=>{t.isUnmounting=!0}),t}const pi=[Function,Array],tS={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:pi,onEnter:pi,onAfterEnter:pi,onEnterCancelled:pi,onBeforeLeave:pi,onLeave:pi,onAfterLeave:pi,onLeaveCancelled:pi,onBeforeAppear:pi,onAppear:pi,onAfterAppear:pi,onAppearCancelled:pi},EO={name:"BaseTransition",props:tS,setup(t,{slots:e}){const r=xn(),n=AO();let i;return()=>{const a=e.default&&nS(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const v of a)if(v.type!==Ei){o=v;break}}const l=Qt(t),{mode:s}=l;if(n.isLeaving)return Fh(o);const c=$y(o);if(!c)return Fh(o);const u=pv(c,l,n,r);vv(c,u);const f=r.subTree,d=f&&$y(f);let h=!1;const{getTransitionKey:p}=c.type;if(p){const v=p();i===void 0?i=v:v!==i&&(i=v,h=!0)}if(d&&d.type!==Ei&&(!Jo(c,d)||h)){const v=pv(d,l,n,r);if(vv(d,v),s==="out-in")return n.isLeaving=!0,v.afterLeave=()=>{n.isLeaving=!1,r.update.active!==!1&&r.update()},Fh(o);s==="in-out"&&c.type!==Ei&&(v.delayLeave=(g,m,b)=>{const x=rS(n,d);x[String(d.key)]=d,g._leaveCb=()=>{m(),g._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=b})}return o}}},TO=EO;function rS(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function pv(t,e,r,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:l,onEnter:s,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:v,onAppear:g,onAfterAppear:m,onAppearCancelled:b}=e,x=String(t.key),T=rS(r,t),A=(_,k)=>{_&&Ai(_,n,9,k)},O=(_,k)=>{const L=k[1];A(_,k),It(_)?_.every(P=>P.length<=1)&&L():_.length<=1&&L()},I={mode:a,persisted:o,beforeEnter(_){let k=l;if(!r.isMounted)if(i)k=v||l;else return;_._leaveCb&&_._leaveCb(!0);const L=T[x];L&&Jo(t,L)&&L.el._leaveCb&&L.el._leaveCb(),A(k,[_])},enter(_){let k=s,L=c,P=u;if(!r.isMounted)if(i)k=g||s,L=m||c,P=b||u;else return;let W=!1;const q=_._enterCb=V=>{W||(W=!0,V?A(P,[_]):A(L,[_]),I.delayedLeave&&I.delayedLeave(),_._enterCb=void 0)};k?O(k,[_,q]):q()},leave(_,k){const L=String(t.key);if(_._enterCb&&_._enterCb(!0),r.isUnmounting)return k();A(f,[_]);let P=!1;const W=_._leaveCb=q=>{P||(P=!0,k(),q?A(p,[_]):A(h,[_]),_._leaveCb=void 0,T[L]===t&&delete T[L])};T[L]=t,d?O(d,[_,W]):W()},clone(_){return pv(_,e,r,n)}};return I}function Fh(t){if(Dd(t))return t=To(t),t.children=null,t}function $y(t){return Dd(t)?t.children?t.children[0]:void 0:t}function vv(t,e){t.shapeFlag&6&&t.component?vv(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function nS(t,e=!1,r){let n=[],i=0;for(let a=0;a<t.length;a++){let o=t[a];const l=r==null?o.key:String(r)+String(o.key!=null?o.key:a);o.type===Hn?(o.patchFlag&128&&i++,n=n.concat(nS(o.children,e,l))):(e||o.type!==Ei)&&n.push(l!=null?To(o,{key:l}):o)}if(i>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}function xt(t,e){return kt(t)?(()=>Ur({name:t.name},e,{setup:t}))():t}const bc=t=>!!t.type.__asyncLoader,Dd=t=>t.type.__isKeepAlive;function Od(t,e){iS(t,"a",e)}function Xm(t,e){iS(t,"da",e)}function iS(t,e,r=en){const n=t.__wdc||(t.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(kd(e,n,r),r){let i=r.parent;for(;i&&i.parent;)Dd(i.parent.vnode)&&SO(n,e,r,i),i=i.parent}}function SO(t,e,r,n){const i=kd(e,t,n,!0);Rr(()=>{km(n[e],i)},r)}function kd(t,e,r=en,n=!1){if(r){const i=r[t]||(r[t]=[]),a=e.__weh||(e.__weh=(...o)=>{if(r.isUnmounted)return;Il(),ml(r);const l=Ai(e,r,t,o);return fs(),_l(),l});return n?i.unshift(a):i.push(a),a}}const Ma=t=>(e,r=en)=>(!ou||t==="sp")&&kd(t,(...n)=>e(...n),r),aS=Ma("bm"),Er=Ma("m"),wO=Ma("bu"),oS=Ma("u"),Rl=Ma("bum"),Rr=Ma("um"),CO=Ma("sp"),IO=Ma("rtg"),_O=Ma("rtc");function RO(t,e=en){kd("ec",t,e)}const Zm="components",LO="directives";function nr(t,e){return Jm(Zm,t,!0,e)||t}const sS=Symbol.for("v-ndc");function DO(t){return vr(t)?Jm(Zm,t,!1)||t:t||sS}function OO(t){return Jm(LO,t)}function Jm(t,e,r=!0,n=!1){const i=pn||en;if(i){const a=i.type;if(t===Zm){const l=lk(a,!1);if(l&&(l===e||l===Bi(e)||l===Cd(Bi(e))))return a}const o=By(i[t]||a[t],e)||By(i.appContext[t],e);return!o&&n?a:o}}function By(t,e){return t&&(t[e]||t[Bi(e)]||t[Cd(Bi(e))])}function dce(t,e,r,n){let i;const a=r&&r[n];if(It(t)||vr(t)){i=new Array(t.length);for(let o=0,l=t.length;o<l;o++)i[o]=e(t[o],o,void 0,a&&a[o])}else if(typeof t=="number"){i=new Array(t);for(let o=0;o<t;o++)i[o]=e(o+1,o,void 0,a&&a[o])}else if(fr(t))if(t[Symbol.iterator])i=Array.from(t,(o,l)=>e(o,l,void 0,a&&a[l]));else{const o=Object.keys(t);i=new Array(o.length);for(let l=0,s=o.length;l<s;l++){const c=o[l];i[l]=e(t[c],c,l,a&&a[l])}}else i=[];return r&&(r[n]=i),i}function hce(t,e){for(let r=0;r<e.length;r++){const n=e[r];if(It(n))for(let i=0;i<n.length;i++)t[n[i].name]=n[i].fn;else n&&(t[n.name]=n.key?(...i)=>{const a=n.fn(...i);return a&&(a.key=n.key),a}:n.fn)}return t}function Qm(t,e,r={},n,i){if(pn.isCE||pn.parent&&bc(pn.parent)&&pn.parent.isCE)return e!=="default"&&(r.name=e),Rt("slot",r,n&&n());let a=t[e];a&&a._c&&(a._d=!1),Xt();const o=a&&lS(a(r)),l=ho(Hn,{key:r.key||o&&o.key||`_${e}`},o||(n?n():[]),o&&t._===1?64:-2);return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),a&&a._c&&(a._d=!0),l}function lS(t){return t.some(e=>ys(e)?!(e.type===Ei||e.type===Hn&&!lS(e.children)):!0)?t:null}const mv=t=>t?xS(t)?Fd(t)||t.proxy:mv(t.parent):null,xc=Ur(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>mv(t.parent),$root:t=>mv(t.root),$emit:t=>t.emit,$options:t=>eg(t),$forceUpdate:t=>t.f||(t.f=()=>Km(t.update)),$nextTick:t=>t.n||(t.n=Ie.bind(t.proxy)),$watch:t=>xO.bind(t)}),Ph=(t,e)=>t!==Tr&&!t.__isScriptSetup&&Gt(t,e),kO={get({_:t},e){const{ctx:r,setupState:n,data:i,props:a,accessCache:o,type:l,appContext:s}=t;let c;if(e[0]!=="$"){const h=o[e];if(h!==void 0)switch(h){case 1:return n[e];case 2:return i[e];case 4:return r[e];case 3:return a[e]}else{if(Ph(n,e))return o[e]=1,n[e];if(i!==Tr&&Gt(i,e))return o[e]=2,i[e];if((c=t.propsOptions[0])&&Gt(c,e))return o[e]=3,a[e];if(r!==Tr&&Gt(r,e))return o[e]=4,r[e];gv&&(o[e]=0)}}const u=xc[e];let f,d;if(u)return e==="$attrs"&&Wn(t,"get",e),u(t);if((f=l.__cssModules)&&(f=f[e]))return f;if(r!==Tr&&Gt(r,e))return o[e]=4,r[e];if(d=s.config.globalProperties,Gt(d,e))return d[e]},set({_:t},e,r){const{data:n,setupState:i,ctx:a}=t;return Ph(i,e)?(i[e]=r,!0):n!==Tr&&Gt(n,e)?(n[e]=r,!0):Gt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(a[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:i,propsOptions:a}},o){let l;return!!r[o]||t!==Tr&&Gt(t,o)||Ph(e,o)||(l=a[0])&&Gt(l,o)||Gt(n,o)||Gt(xc,o)||Gt(i.config.globalProperties,o)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:Gt(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function pce(){return cS().slots}function vce(){return cS().attrs}function cS(){const t=xn();return t.setupContext||(t.setupContext=ES(t))}function Uy(t){return It(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let gv=!0;function MO(t){const e=eg(t),r=t.proxy,n=t.ctx;gv=!1,e.beforeCreate&&Hy(e.beforeCreate,t,"bc");const{data:i,computed:a,methods:o,watch:l,provide:s,inject:c,created:u,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:v,deactivated:g,beforeDestroy:m,beforeUnmount:b,destroyed:x,unmounted:T,render:A,renderTracked:O,renderTriggered:I,errorCaptured:_,serverPrefetch:k,expose:L,inheritAttrs:P,components:W,directives:q,filters:V}=e;if(c&&FO(c,n,null),o)for(const J in o){const N=o[J];kt(N)&&(n[J]=N.bind(r))}if(i){const J=i.call(r,r);fr(J)&&(t.data=Jt(J))}if(gv=!0,a)for(const J in a){const N=a[J],Z=kt(N)?N.bind(r,r):kt(N.get)?N.get.bind(r,r):xi,le=!kt(N)&&kt(N.set)?N.set.bind(r):xi,ye=_e({get:Z,set:le});Object.defineProperty(n,J,{enumerable:!0,configurable:!0,get:()=>ye.value,set:me=>ye.value=me})}if(l)for(const J in l)uS(l[J],n,r,J);if(s){const J=kt(s)?s.call(r):s;Reflect.ownKeys(J).forEach(N=>{sr(N,J[N])})}u&&Hy(u,t,"c");function pe(J,N){It(N)?N.forEach(Z=>J(Z.bind(r))):N&&J(N.bind(r))}if(pe(aS,f),pe(Er,d),pe(wO,h),pe(oS,p),pe(Od,v),pe(Xm,g),pe(RO,_),pe(_O,O),pe(IO,I),pe(Rl,b),pe(Rr,T),pe(CO,k),It(L))if(L.length){const J=t.exposed||(t.exposed={});L.forEach(N=>{Object.defineProperty(J,N,{get:()=>r[N],set:Z=>r[N]=Z})})}else t.exposed||(t.exposed={});A&&t.render===xi&&(t.render=A),P!=null&&(t.inheritAttrs=P),W&&(t.components=W),q&&(t.directives=q)}function FO(t,e,r=xi){It(t)&&(t=yv(t));for(const n in t){const i=t[n];let a;fr(i)?"default"in i?a=ct(i.from||n,i.default,!0):a=ct(i.from||n):a=ct(i),Fr(a)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>a.value,set:o=>a.value=o}):e[n]=a}}function Hy(t,e,r){Ai(It(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function uS(t,e,r,n){const i=n.includes(".")?eS(r,n):()=>r[n];if(vr(t)){const a=e[t];kt(a)&&st(i,a)}else if(kt(t))st(i,t.bind(r));else if(fr(t))if(It(t))t.forEach(a=>uS(a,e,r,n));else{const a=kt(t.handler)?t.handler.bind(r):e[t.handler];kt(a)&&st(i,a,t)}}function eg(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=t.appContext,l=a.get(e);let s;return l?s=l:!i.length&&!r&&!n?s=e:(s={},i.length&&i.forEach(c=>jf(s,c,o,!0)),jf(s,e,o)),fr(e)&&a.set(e,s),s}function jf(t,e,r,n=!1){const{mixins:i,extends:a}=e;a&&jf(t,a,r,!0),i&&i.forEach(o=>jf(t,o,r,!0));for(const o in e)if(!(n&&o==="expose")){const l=PO[o]||r&&r[o];t[o]=l?l(t[o],e[o]):e[o]}return t}const PO={data:Vy,props:jy,emits:jy,methods:vc,computed:vc,beforeCreate:Rn,created:Rn,beforeMount:Rn,mounted:Rn,beforeUpdate:Rn,updated:Rn,beforeDestroy:Rn,beforeUnmount:Rn,destroyed:Rn,unmounted:Rn,activated:Rn,deactivated:Rn,errorCaptured:Rn,serverPrefetch:Rn,components:vc,directives:vc,watch:$O,provide:Vy,inject:NO};function Vy(t,e){return e?t?function(){return Ur(kt(t)?t.call(this,this):t,kt(e)?e.call(this,this):e)}:e:t}function NO(t,e){return vc(yv(t),yv(e))}function yv(t){if(It(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function Rn(t,e){return t?[...new Set([].concat(t,e))]:e}function vc(t,e){return t?Ur(Object.create(null),t,e):e}function jy(t,e){return t?It(t)&&It(e)?[...new Set([...t,...e])]:Ur(Object.create(null),Uy(t),Uy(e??{})):e}function $O(t,e){if(!t)return e;if(!e)return t;const r=Ur(Object.create(null),t);for(const n in e)r[n]=Rn(t[n],e[n]);return r}function fS(){return{app:null,config:{isNativeTag:cD,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let BO=0;function UO(t,e){return function(n,i=null){kt(n)||(n=Ur({},n)),i!=null&&!fr(i)&&(i=null);const a=fS(),o=new Set;let l=!1;const s=a.app={_uid:BO++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:TS,get config(){return a.config},set config(c){},use(c,...u){return o.has(c)||(c&&kt(c.install)?(o.add(c),c.install(s,...u)):kt(c)&&(o.add(c),c(s,...u))),s},mixin(c){return a.mixins.includes(c)||a.mixins.push(c),s},component(c,u){return u?(a.components[c]=u,s):a.components[c]},directive(c,u){return u?(a.directives[c]=u,s):a.directives[c]},mount(c,u,f){if(!l){const d=Rt(n,i);return d.appContext=a,u&&e?e(d,c):t(d,c,f),l=!0,s._container=c,c.__vue_app__=s,Fd(d.component)||d.component.proxy}},unmount(){l&&(t(null,s._container),delete s._container.__vue_app__)},provide(c,u){return a.provides[c]=u,s},runWithContext(c){Wf=s;try{return c()}finally{Wf=null}}};return s}}let Wf=null;function sr(t,e){if(en){let r=en.provides;const n=en.parent&&en.parent.provides;n===r&&(r=en.provides=Object.create(n)),r[t]=e}}function ct(t,e,r=!1){const n=en||pn;if(n||Wf){const i=n?n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:Wf._context.provides;if(i&&t in i)return i[t];if(arguments.length>1)return r&&kt(e)?e.call(n&&n.proxy):e}}function HO(t,e,r,n=!1){const i={},a={};Bf(a,Md,1),t.propsDefaults=Object.create(null),dS(t,e,i,a);for(const o in t.propsOptions[0])o in i||(i[o]=void 0);r?t.props=n?i:j1(i):t.type.props?t.props=i:t.props=a,t.attrs=a}function VO(t,e,r,n){const{props:i,attrs:a,vnode:{patchFlag:o}}=t,l=Qt(i),[s]=t.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let f=0;f<u.length;f++){let d=u[f];if(Rd(t.emitsOptions,d))continue;const h=e[d];if(s)if(Gt(a,d))h!==a[d]&&(a[d]=h,c=!0);else{const p=Bi(d);i[p]=bv(s,l,p,h,t,!1)}else h!==a[d]&&(a[d]=h,c=!0)}}}else{dS(t,e,i,a)&&(c=!0);let u;for(const f in l)(!e||!Gt(e,f)&&((u=Cl(f))===f||!Gt(e,u)))&&(s?r&&(r[f]!==void 0||r[u]!==void 0)&&(i[f]=bv(s,l,f,void 0,t,!0)):delete i[f]);if(a!==l)for(const f in a)(!e||!Gt(e,f))&&(delete a[f],c=!0)}c&&La(t,"set","$attrs")}function dS(t,e,r,n){const[i,a]=t.propsOptions;let o=!1,l;if(e)for(let s in e){if(Cf(s))continue;const c=e[s];let u;i&&Gt(i,u=Bi(s))?!a||!a.includes(u)?r[u]=c:(l||(l={}))[u]=c:Rd(t.emitsOptions,s)||(!(s in n)||c!==n[s])&&(n[s]=c,o=!0)}if(a){const s=Qt(r),c=l||Tr;for(let u=0;u<a.length;u++){const f=a[u];r[f]=bv(i,s,f,c[f],t,!Gt(c,f))}}return o}function bv(t,e,r,n,i,a){const o=t[r];if(o!=null){const l=Gt(o,"default");if(l&&n===void 0){const s=o.default;if(o.type!==Function&&!o.skipFactory&&kt(s)){const{propsDefaults:c}=i;r in c?n=c[r]:(ml(i),n=c[r]=s.call(null,e),fs())}else n=s}o[0]&&(a&&!l?n=!1:o[1]&&(n===""||n===Cl(r))&&(n=!0))}return n}function hS(t,e,r=!1){const n=e.propsCache,i=n.get(t);if(i)return i;const a=t.props,o={},l=[];let s=!1;if(!kt(t)){const u=f=>{s=!0;const[d,h]=hS(f,e,!0);Ur(o,d),h&&l.push(...h)};!r&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!a&&!s)return fr(t)&&n.set(t,al),al;if(It(a))for(let u=0;u<a.length;u++){const f=Bi(a[u]);Wy(f)&&(o[f]=Tr)}else if(a)for(const u in a){const f=Bi(u);if(Wy(f)){const d=a[u],h=o[f]=It(d)||kt(d)?{type:d}:Ur({},d);if(h){const p=Ky(Boolean,h.type),v=Ky(String,h.type);h[0]=p>-1,h[1]=v<0||p<v,(p>-1||Gt(h,"default"))&&l.push(f)}}}const c=[o,l];return fr(t)&&n.set(t,c),c}function Wy(t){return t[0]!=="$"}function Gy(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function zy(t,e){return Gy(t)===Gy(e)}function Ky(t,e){return It(e)?e.findIndex(r=>zy(r,t)):kt(e)&&zy(e,t)?0:-1}const pS=t=>t[0]==="_"||t==="$stable",tg=t=>It(t)?t.map(ea):[ea(t)],jO=(t,e,r)=>{if(e._n)return e;const n=yc((...i)=>tg(e(...i)),r);return n._c=!1,n},vS=(t,e,r)=>{const n=t._ctx;for(const i in t){if(pS(i))continue;const a=t[i];if(kt(a))e[i]=jO(i,a,n);else if(a!=null){const o=tg(a);e[i]=()=>o}}},mS=(t,e)=>{const r=tg(e);t.slots.default=()=>r},WO=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=Qt(e),Bf(e,"_",r)):vS(e,t.slots={})}else t.slots={},e&&mS(t,e);Bf(t.slots,Md,1)},GO=(t,e,r)=>{const{vnode:n,slots:i}=t;let a=!0,o=Tr;if(n.shapeFlag&32){const l=e._;l?r&&l===1?a=!1:(Ur(i,e),!r&&l===1&&delete i._):(a=!e.$stable,vS(e,i)),o=e}else e&&(mS(t,e),o={default:1});if(a)for(const l in i)!pS(l)&&!(l in o)&&delete i[l]};function xv(t,e,r,n,i=!1){if(It(t)){t.forEach((d,h)=>xv(d,e&&(It(e)?e[h]:e),r,n,i));return}if(bc(n)&&!i)return;const a=n.shapeFlag&4?Fd(n.component)||n.component.proxy:n.el,o=i?null:a,{i:l,r:s}=t,c=e&&e.r,u=l.refs===Tr?l.refs={}:l.refs,f=l.setupState;if(c!=null&&c!==s&&(vr(c)?(u[c]=null,Gt(f,c)&&(f[c]=null)):Fr(c)&&(c.value=null)),kt(s))mo(s,l,12,[o,u]);else{const d=vr(s),h=Fr(s);if(d||h){const p=()=>{if(t.f){const v=d?Gt(f,s)?f[s]:u[s]:s.value;i?It(v)&&km(v,a):It(v)?v.includes(a)||v.push(a):d?(u[s]=[a],Gt(f,s)&&(f[s]=u[s])):(s.value=[a],t.k&&(u[t.k]=s.value))}else d?(u[s]=o,Gt(f,s)&&(f[s]=o)):h&&(s.value=o,t.k&&(u[t.k]=o))};o?(p.id=-1,Un(p,r)):p()}}}const Un=bO;function zO(t){return KO(t)}function KO(t,e){const r=cv();r.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:l,createComment:s,setText:c,setElementText:u,parentNode:f,nextSibling:d,setScopeId:h=xi,insertStaticContent:p}=t,v=(B,w,C,j=null,ie=null,ne=null,X=!1,ee=null,de=!!w.dynamicChildren)=>{if(B===w)return;B&&!Jo(B,w)&&(j=ce(B),me(B,ie,ne,!0),B=null),w.patchFlag===-2&&(de=!1,w.dynamicChildren=null);const{type:oe,ref:te,shapeFlag:he}=w;switch(oe){case Eu:g(B,w,C,j);break;case Ei:m(B,w,C,j);break;case If:B==null&&b(w,C,j,X);break;case Hn:W(B,w,C,j,ie,ne,X,ee,de);break;default:he&1?A(B,w,C,j,ie,ne,X,ee,de):he&6?q(B,w,C,j,ie,ne,X,ee,de):(he&64||he&128)&&oe.process(B,w,C,j,ie,ne,X,ee,de,ve)}te!=null&&ie&&xv(te,B&&B.ref,ne,w||B,!w)},g=(B,w,C,j)=>{if(B==null)n(w.el=l(w.children),C,j);else{const ie=w.el=B.el;w.children!==B.children&&c(ie,w.children)}},m=(B,w,C,j)=>{B==null?n(w.el=s(w.children||""),C,j):w.el=B.el},b=(B,w,C,j)=>{[B.el,B.anchor]=p(B.children,w,C,j,B.el,B.anchor)},x=({el:B,anchor:w},C,j)=>{let ie;for(;B&&B!==w;)ie=d(B),n(B,C,j),B=ie;n(w,C,j)},T=({el:B,anchor:w})=>{let C;for(;B&&B!==w;)C=d(B),i(B),B=C;i(w)},A=(B,w,C,j,ie,ne,X,ee,de)=>{X=X||w.type==="svg",B==null?O(w,C,j,ie,ne,X,ee,de):k(B,w,ie,ne,X,ee,de)},O=(B,w,C,j,ie,ne,X,ee)=>{let de,oe;const{type:te,props:he,shapeFlag:ke,transition:se,dirs:ue}=B;if(de=B.el=o(B.type,ne,he&&he.is,he),ke&8?u(de,B.children):ke&16&&_(B.children,de,null,j,ie,ne&&te!=="foreignObject",X,ee),ue&&Bo(B,null,j,"created"),I(de,B,B.scopeId,X,j),he){for(const De in he)De!=="value"&&!Cf(De)&&a(de,De,null,he[De],ne,B.children,j,ie,we);"value"in he&&a(de,"value",null,he.value),(oe=he.onVnodeBeforeMount)&&qi(oe,j,B)}ue&&Bo(B,null,j,"beforeMount");const xe=(!ie||ie&&!ie.pendingBranch)&&se&&!se.persisted;xe&&se.beforeEnter(de),n(de,w,C),((oe=he&&he.onVnodeMounted)||xe||ue)&&Un(()=>{oe&&qi(oe,j,B),xe&&se.enter(de),ue&&Bo(B,null,j,"mounted")},ie)},I=(B,w,C,j,ie)=>{if(C&&h(B,C),j)for(let ne=0;ne<j.length;ne++)h(B,j[ne]);if(ie){let ne=ie.subTree;if(w===ne){const X=ie.vnode;I(B,X,X.scopeId,X.slotScopeIds,ie.parent)}}},_=(B,w,C,j,ie,ne,X,ee,de=0)=>{for(let oe=de;oe<B.length;oe++){const te=B[oe]=ee?oo(B[oe]):ea(B[oe]);v(null,te,w,C,j,ie,ne,X,ee)}},k=(B,w,C,j,ie,ne,X)=>{const ee=w.el=B.el;let{patchFlag:de,dynamicChildren:oe,dirs:te}=w;de|=B.patchFlag&16;const he=B.props||Tr,ke=w.props||Tr;let se;C&&Uo(C,!1),(se=ke.onVnodeBeforeUpdate)&&qi(se,C,w,B),te&&Bo(w,B,C,"beforeUpdate"),C&&Uo(C,!0);const ue=ie&&w.type!=="foreignObject";if(oe?L(B.dynamicChildren,oe,ee,C,j,ue,ne):X||N(B,w,ee,null,C,j,ue,ne,!1),de>0){if(de&16)P(ee,w,he,ke,C,j,ie);else if(de&2&&he.class!==ke.class&&a(ee,"class",null,ke.class,ie),de&4&&a(ee,"style",he.style,ke.style,ie),de&8){const xe=w.dynamicProps;for(let De=0;De<xe.length;De++){const U=xe[De],ge=he[U],Se=ke[U];(Se!==ge||U==="value")&&a(ee,U,ge,Se,ie,B.children,C,j,we)}}de&1&&B.children!==w.children&&u(ee,w.children)}else!X&&oe==null&&P(ee,w,he,ke,C,j,ie);((se=ke.onVnodeUpdated)||te)&&Un(()=>{se&&qi(se,C,w,B),te&&Bo(w,B,C,"updated")},j)},L=(B,w,C,j,ie,ne,X)=>{for(let ee=0;ee<w.length;ee++){const de=B[ee],oe=w[ee],te=de.el&&(de.type===Hn||!Jo(de,oe)||de.shapeFlag&70)?f(de.el):C;v(de,oe,te,null,j,ie,ne,X,!0)}},P=(B,w,C,j,ie,ne,X)=>{if(C!==j){if(C!==Tr)for(const ee in C)!Cf(ee)&&!(ee in j)&&a(B,ee,C[ee],null,X,w.children,ie,ne,we);for(const ee in j){if(Cf(ee))continue;const de=j[ee],oe=C[ee];de!==oe&&ee!=="value"&&a(B,ee,oe,de,X,w.children,ie,ne,we)}"value"in j&&a(B,"value",C.value,j.value)}},W=(B,w,C,j,ie,ne,X,ee,de)=>{const oe=w.el=B?B.el:l(""),te=w.anchor=B?B.anchor:l("");let{patchFlag:he,dynamicChildren:ke,slotScopeIds:se}=w;se&&(ee=ee?ee.concat(se):se),B==null?(n(oe,C,j),n(te,C,j),_(w.children,C,te,ie,ne,X,ee,de)):he>0&&he&64&&ke&&B.dynamicChildren?(L(B.dynamicChildren,ke,C,ie,ne,X,ee),(w.key!=null||ie&&w===ie.subTree)&&rg(B,w,!0)):N(B,w,C,te,ie,ne,X,ee,de)},q=(B,w,C,j,ie,ne,X,ee,de)=>{w.slotScopeIds=ee,B==null?w.shapeFlag&512?ie.ctx.activate(w,C,j,X,de):V(w,C,j,ie,ne,X,de):G(B,w,de)},V=(B,w,C,j,ie,ne,X)=>{const ee=B.component=ik(B,j,ie);if(Dd(B)&&(ee.ctx.renderer=ve),ak(ee),ee.asyncDep){if(ie&&ie.registerDep(ee,pe),!B.el){const de=ee.subTree=Rt(Ei);m(null,de,w,C)}return}pe(ee,B,w,C,ie,ne,X)},G=(B,w,C)=>{const j=w.component=B.component;if(mO(B,w,C))if(j.asyncDep&&!j.asyncResolved){J(j,w,C);return}else j.next=w,uO(j.update),j.update();else w.el=B.el,j.vnode=w},pe=(B,w,C,j,ie,ne,X)=>{const ee=()=>{if(B.isMounted){let{next:te,bu:he,u:ke,parent:se,vnode:ue}=B,xe=te,De;Uo(B,!1),te?(te.el=ue.el,J(B,te,X)):te=ue,he&&kh(he),(De=te.props&&te.props.onVnodeBeforeUpdate)&&qi(De,se,te,ue),Uo(B,!0);const U=Mh(B),ge=B.subTree;B.subTree=U,v(ge,U,f(ge.el),ce(ge),B,ie,ne),te.el=U.el,xe===null&&gO(B,U.el),ke&&Un(ke,ie),(De=te.props&&te.props.onVnodeUpdated)&&Un(()=>qi(De,se,te,ue),ie)}else{let te;const{el:he,props:ke}=w,{bm:se,m:ue,parent:xe}=B,De=bc(w);if(Uo(B,!1),se&&kh(se),!De&&(te=ke&&ke.onVnodeBeforeMount)&&qi(te,xe,w),Uo(B,!0),he&&Pe){const U=()=>{B.subTree=Mh(B),Pe(he,B.subTree,B,ie,null)};De?w.type.__asyncLoader().then(()=>!B.isUnmounted&&U()):U()}else{const U=B.subTree=Mh(B);v(null,U,C,j,B,ie,ne),w.el=U.el}if(ue&&Un(ue,ie),!De&&(te=ke&&ke.onVnodeMounted)){const U=w;Un(()=>qi(te,xe,U),ie)}(w.shapeFlag&256||xe&&bc(xe.vnode)&&xe.vnode.shapeFlag&256)&&B.a&&Un(B.a,ie),B.isMounted=!0,w=C=j=null}},de=B.effect=new Nm(ee,()=>Km(oe),B.scope),oe=B.update=()=>de.run();oe.id=B.uid,Uo(B,!0),oe()},J=(B,w,C)=>{w.component=B;const j=B.vnode.props;B.vnode=w,B.next=null,VO(B,w.props,j,C),GO(B,w.children,C),Il(),Py(),_l()},N=(B,w,C,j,ie,ne,X,ee,de=!1)=>{const oe=B&&B.children,te=B?B.shapeFlag:0,he=w.children,{patchFlag:ke,shapeFlag:se}=w;if(ke>0){if(ke&128){le(oe,he,C,j,ie,ne,X,ee,de);return}else if(ke&256){Z(oe,he,C,j,ie,ne,X,ee,de);return}}se&8?(te&16&&we(oe,ie,ne),he!==oe&&u(C,he)):te&16?se&16?le(oe,he,C,j,ie,ne,X,ee,de):we(oe,ie,ne,!0):(te&8&&u(C,""),se&16&&_(he,C,j,ie,ne,X,ee,de))},Z=(B,w,C,j,ie,ne,X,ee,de)=>{B=B||al,w=w||al;const oe=B.length,te=w.length,he=Math.min(oe,te);let ke;for(ke=0;ke<he;ke++){const se=w[ke]=de?oo(w[ke]):ea(w[ke]);v(B[ke],se,C,null,ie,ne,X,ee,de)}oe>te?we(B,ie,ne,!0,!1,he):_(w,C,j,ie,ne,X,ee,de,he)},le=(B,w,C,j,ie,ne,X,ee,de)=>{let oe=0;const te=w.length;let he=B.length-1,ke=te-1;for(;oe<=he&&oe<=ke;){const se=B[oe],ue=w[oe]=de?oo(w[oe]):ea(w[oe]);if(Jo(se,ue))v(se,ue,C,null,ie,ne,X,ee,de);else break;oe++}for(;oe<=he&&oe<=ke;){const se=B[he],ue=w[ke]=de?oo(w[ke]):ea(w[ke]);if(Jo(se,ue))v(se,ue,C,null,ie,ne,X,ee,de);else break;he--,ke--}if(oe>he){if(oe<=ke){const se=ke+1,ue=se<te?w[se].el:j;for(;oe<=ke;)v(null,w[oe]=de?oo(w[oe]):ea(w[oe]),C,ue,ie,ne,X,ee,de),oe++}}else if(oe>ke)for(;oe<=he;)me(B[oe],ie,ne,!0),oe++;else{const se=oe,ue=oe,xe=new Map;for(oe=ue;oe<=ke;oe++){const Je=w[oe]=de?oo(w[oe]):ea(w[oe]);Je.key!=null&&xe.set(Je.key,oe)}let De,U=0;const ge=ke-ue+1;let Se=!1,$e=0;const Ue=new Array(ge);for(oe=0;oe<ge;oe++)Ue[oe]=0;for(oe=se;oe<=he;oe++){const Je=B[oe];if(U>=ge){me(Je,ie,ne,!0);continue}let nt;if(Je.key!=null)nt=xe.get(Je.key);else for(De=ue;De<=ke;De++)if(Ue[De-ue]===0&&Jo(Je,w[De])){nt=De;break}nt===void 0?me(Je,ie,ne,!0):(Ue[nt-ue]=oe+1,nt>=$e?$e=nt:Se=!0,v(Je,w[nt],C,null,ie,ne,X,ee,de),U++)}const We=Se?YO(Ue):al;for(De=We.length-1,oe=ge-1;oe>=0;oe--){const Je=ue+oe,nt=w[Je],Qe=Je+1<te?w[Je+1].el:j;Ue[oe]===0?v(null,nt,C,Qe,ie,ne,X,ee,de):Se&&(De<0||oe!==We[De]?ye(nt,C,Qe,2):De--)}}},ye=(B,w,C,j,ie=null)=>{const{el:ne,type:X,transition:ee,children:de,shapeFlag:oe}=B;if(oe&6){ye(B.component.subTree,w,C,j);return}if(oe&128){B.suspense.move(w,C,j);return}if(oe&64){X.move(B,w,C,ve);return}if(X===Hn){n(ne,w,C);for(let he=0;he<de.length;he++)ye(de[he],w,C,j);n(B.anchor,w,C);return}if(X===If){x(B,w,C);return}if(j!==2&&oe&1&&ee)if(j===0)ee.beforeEnter(ne),n(ne,w,C),Un(()=>ee.enter(ne),ie);else{const{leave:he,delayLeave:ke,afterLeave:se}=ee,ue=()=>n(ne,w,C),xe=()=>{he(ne,()=>{ue(),se&&se()})};ke?ke(ne,ue,xe):xe()}else n(ne,w,C)},me=(B,w,C,j=!1,ie=!1)=>{const{type:ne,props:X,ref:ee,children:de,dynamicChildren:oe,shapeFlag:te,patchFlag:he,dirs:ke}=B;if(ee!=null&&xv(ee,null,C,B,!0),te&256){w.ctx.deactivate(B);return}const se=te&1&&ke,ue=!bc(B);let xe;if(ue&&(xe=X&&X.onVnodeBeforeUnmount)&&qi(xe,w,B),te&6)Ce(B.component,C,j);else{if(te&128){B.suspense.unmount(C,j);return}se&&Bo(B,null,w,"beforeUnmount"),te&64?B.type.remove(B,w,C,ie,ve,j):oe&&(ne!==Hn||he>0&&he&64)?we(oe,w,C,!1,!0):(ne===Hn&&he&384||!ie&&te&16)&&we(de,w,C),j&&Re(B)}(ue&&(xe=X&&X.onVnodeUnmounted)||se)&&Un(()=>{xe&&qi(xe,w,B),se&&Bo(B,null,w,"unmounted")},C)},Re=B=>{const{type:w,el:C,anchor:j,transition:ie}=B;if(w===Hn){be(C,j);return}if(w===If){T(B);return}const ne=()=>{i(C),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(B.shapeFlag&1&&ie&&!ie.persisted){const{leave:X,delayLeave:ee}=ie,de=()=>X(C,ne);ee?ee(B.el,ne,de):de()}else ne()},be=(B,w)=>{let C;for(;B!==w;)C=d(B),i(B),B=C;i(w)},Ce=(B,w,C)=>{const{bum:j,scope:ie,update:ne,subTree:X,um:ee}=B;j&&kh(j),ie.stop(),ne&&(ne.active=!1,me(X,B,w,C)),ee&&Un(ee,w),Un(()=>{B.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&B.asyncDep&&!B.asyncResolved&&B.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},we=(B,w,C,j=!1,ie=!1,ne=0)=>{for(let X=ne;X<B.length;X++)me(B[X],w,C,j,ie)},ce=B=>B.shapeFlag&6?ce(B.component.subTree):B.shapeFlag&128?B.suspense.next():d(B.anchor||B.el),re=(B,w,C)=>{B==null?w._vnode&&me(w._vnode,null,null,!0):v(w._vnode||null,B,w,null,null,null,C),Py(),Z1(),w._vnode=B},ve={p:v,um:me,m:ye,r:Re,mt:V,mc:_,pc:N,pbc:L,n:ce,o:t};let Te,Pe;return e&&([Te,Pe]=e(ve)),{render:re,hydrate:Te,createApp:UO(re,Te)}}function Uo({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function rg(t,e,r=!1){const n=t.children,i=e.children;if(It(n)&&It(i))for(let a=0;a<n.length;a++){const o=n[a];let l=i[a];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[a]=oo(i[a]),l.el=o.el),r||rg(o,l)),l.type===Eu&&(l.el=o.el)}}function YO(t){const e=t.slice(),r=[0];let n,i,a,o,l;const s=t.length;for(n=0;n<s;n++){const c=t[n];if(c!==0){if(i=r[r.length-1],t[i]<c){e[n]=i,r.push(n);continue}for(a=0,o=r.length-1;a<o;)l=a+o>>1,t[r[l]]<c?a=l+1:o=l;c<t[r[a]]&&(a>0&&(e[n]=r[a-1]),r[a]=n)}}for(a=r.length,o=r[a-1];a-- >0;)r[a]=o,o=e[o];return r}const qO=t=>t.__isTeleport,Ac=t=>t&&(t.disabled||t.disabled===""),Yy=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Av=(t,e)=>{const r=t&&t.to;return vr(r)?e?e(r):null:r},XO={__isTeleport:!0,process(t,e,r,n,i,a,o,l,s,c){const{mc:u,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:v,createComment:g}}=c,m=Ac(e.props);let{shapeFlag:b,children:x,dynamicChildren:T}=e;if(t==null){const A=e.el=v(""),O=e.anchor=v("");h(A,r,n),h(O,r,n);const I=e.target=Av(e.props,p),_=e.targetAnchor=v("");I&&(h(_,I),o=o||Yy(I));const k=(L,P)=>{b&16&&u(x,L,P,i,a,o,l,s)};m?k(r,O):I&&k(I,_)}else{e.el=t.el;const A=e.anchor=t.anchor,O=e.target=t.target,I=e.targetAnchor=t.targetAnchor,_=Ac(t.props),k=_?r:O,L=_?A:I;if(o=o||Yy(O),T?(d(t.dynamicChildren,T,k,i,a,o,l),rg(t,e,!0)):s||f(t,e,k,L,i,a,o,l,!1),m)_||Ju(e,r,A,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const P=e.target=Av(e.props,p);P&&Ju(e,P,null,c,0)}else _&&Ju(e,O,I,c,1)}gS(e)},remove(t,e,r,n,{um:i,o:{remove:a}},o){const{shapeFlag:l,children:s,anchor:c,targetAnchor:u,target:f,props:d}=t;if(f&&a(u),(o||!Ac(d))&&(a(c),l&16))for(let h=0;h<s.length;h++){const p=s[h];i(p,e,r,!0,!!p.dynamicChildren)}},move:Ju,hydrate:ZO};function Ju(t,e,r,{o:{insert:n},m:i},a=2){a===0&&n(t.targetAnchor,e,r);const{el:o,anchor:l,shapeFlag:s,children:c,props:u}=t,f=a===2;if(f&&n(o,e,r),(!f||Ac(u))&&s&16)for(let d=0;d<c.length;d++)i(c[d],e,r,2);f&&n(l,e,r)}function ZO(t,e,r,n,i,a,{o:{nextSibling:o,parentNode:l,querySelector:s}},c){const u=e.target=Av(e.props,s);if(u){const f=u._lpa||u.firstChild;if(e.shapeFlag&16)if(Ac(e.props))e.anchor=c(o(t),e,l(t),r,n,i,a),e.targetAnchor=f;else{e.anchor=o(t);let d=f;for(;d;)if(d=o(d),d&&d.nodeType===8&&d.data==="teleport anchor"){e.targetAnchor=d,u._lpa=e.targetAnchor&&o(e.targetAnchor);break}c(f,e,u,r,n,i,a)}gS(e)}return e.anchor&&o(e.anchor)}const Ll=XO;function gS(t){const e=t.ctx;if(e&&e.ut){let r=t.children[0].el;for(;r!==t.targetAnchor;)r.nodeType===1&&r.setAttribute("data-v-owner",e.uid),r=r.nextSibling;e.ut()}}const Hn=Symbol.for("v-fgt"),Eu=Symbol.for("v-txt"),Ei=Symbol.for("v-cmt"),If=Symbol.for("v-stc"),Ec=[];let Pi=null;function Xt(t=!1){Ec.push(Pi=t?null:[])}function JO(){Ec.pop(),Pi=Ec[Ec.length-1]||null}let au=1;function qy(t){au+=t}function yS(t){return t.dynamicChildren=au>0?Pi||al:null,JO(),au>0&&Pi&&Pi.push(t),t}function wr(t,e,r,n,i,a){return yS(lr(t,e,r,n,i,a,!0))}function ho(t,e,r,n,i){return yS(Rt(t,e,r,n,i,!0))}function ys(t){return t?t.__v_isVNode===!0:!1}function Jo(t,e){return t.type===e.type&&t.key===e.key}const Md="__vInternal",bS=({key:t})=>t??null,_f=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?vr(t)||Fr(t)||kt(t)?{i:pn,r:t,k:e,f:!!r}:t:null);function lr(t,e=null,r=null,n=0,i=null,a=t===Hn?0:1,o=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&bS(e),ref:e&&_f(e),scopeId:Ld,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:pn};return l?(ng(s,r),a&128&&t.normalize(s)):r&&(s.shapeFlag|=vr(r)?8:16),au>0&&!o&&Pi&&(s.patchFlag>0||a&6)&&s.patchFlag!==32&&Pi.push(s),s}const Rt=QO;function QO(t,e=null,r=null,n=0,i=null,a=!1){if((!t||t===sS)&&(t=Ei),ys(t)){const l=To(t,e,!0);return r&&ng(l,r),au>0&&!a&&Pi&&(l.shapeFlag&6?Pi[Pi.indexOf(t)]=l:Pi.push(l)),l.patchFlag|=-2,l}if(ck(t)&&(t=t.__vccOpts),e){e=ek(e);let{class:l,style:s}=e;l&&!vr(l)&&(e.class=bi(l)),fr(s)&&(W1(s)&&!It(s)&&(s=Ur({},s)),e.style=Au(s))}const o=vr(t)?1:yO(t)?128:qO(t)?64:fr(t)?4:kt(t)?2:0;return lr(t,e,r,n,i,o,a,!0)}function ek(t){return t?W1(t)||Md in t?Ur({},t):t:null}function To(t,e,r=!1){const{props:n,ref:i,patchFlag:a,children:o}=t,l=e?vl(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:l,key:l&&bS(l),ref:e&&e.ref?r&&i?It(i)?i.concat(_f(e)):[i,_f(e)]:_f(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Hn?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&To(t.ssContent),ssFallback:t.ssFallback&&To(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function tk(t=" ",e=0){return Rt(Eu,null,t,e)}function mce(t,e){const r=Rt(If,null,t);return r.staticCount=e,r}function $t(t="",e=!1){return e?(Xt(),ho(Ei,null,t)):Rt(Ei,null,t)}function ea(t){return t==null||typeof t=="boolean"?Rt(Ei):It(t)?Rt(Hn,null,t.slice()):typeof t=="object"?oo(t):Rt(Eu,null,String(t))}function oo(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:To(t)}function ng(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(It(e))r=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),ng(t,i()),i._c&&(i._d=!0));return}else{r=32;const i=e._;!i&&!(Md in e)?e._ctx=pn:i===3&&pn&&(pn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else kt(e)?(e={default:e,_ctx:pn},r=32):(e=String(e),n&64?(r=16,e=[tk(e)]):r=8);t.children=e,t.shapeFlag|=r}function vl(...t){const e={};for(let r=0;r<t.length;r++){const n=t[r];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=bi([e.class,n.class]));else if(i==="style")e.style=Au([e.style,n.style]);else if(Td(i)){const a=e[i],o=n[i];o&&a!==o&&!(It(a)&&a.includes(o))&&(e[i]=a?[].concat(a,o):o)}else i!==""&&(e[i]=n[i])}return e}function qi(t,e,r,n=null){Ai(t,e,7,[r,n])}const rk=fS();let nk=0;function ik(t,e,r){const n=t.type,i=(e?e.appContext:t.appContext)||rk,a={uid:nk++,vnode:t,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new D1(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:hS(n,i),emitsOptions:Q1(n,i),emit:null,emitted:null,propsDefaults:Tr,inheritAttrs:n.inheritAttrs,ctx:Tr,data:Tr,props:Tr,attrs:Tr,slots:Tr,refs:Tr,setupState:Tr,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=e?e.root:a,a.emit=hO.bind(null,a),t.ce&&t.ce(a),a}let en=null;const xn=()=>en||pn;let ig,Ms,Xy="__VUE_INSTANCE_SETTERS__";(Ms=cv()[Xy])||(Ms=cv()[Xy]=[]),Ms.push(t=>en=t),ig=t=>{Ms.length>1?Ms.forEach(e=>e(t)):Ms[0](t)};const ml=t=>{ig(t),t.scope.on()},fs=()=>{en&&en.scope.off(),ig(null)};function xS(t){return t.vnode.shapeFlag&4}let ou=!1;function ak(t,e=!1){ou=e;const{props:r,children:n}=t.vnode,i=xS(t);HO(t,r,i,e),WO(t,n);const a=i?ok(t,e):void 0;return ou=!1,a}function ok(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=G1(new Proxy(t.ctx,kO));const{setup:n}=r;if(n){const i=t.setupContext=n.length>1?ES(t):null;ml(t),Il();const a=mo(n,t,0,[t.props,i]);if(_l(),fs(),w1(a)){if(a.then(fs,fs),e)return a.then(o=>{Zy(t,o,e)}).catch(o=>{_d(o,t,0)});t.asyncDep=a}else Zy(t,a,e)}else AS(t,e)}function Zy(t,e,r){kt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:fr(e)&&(t.setupState=Y1(e)),AS(t,r)}let Jy;function AS(t,e,r){const n=t.type;if(!t.render){if(!e&&Jy&&!n.render){const i=n.template||eg(t).template;if(i){const{isCustomElement:a,compilerOptions:o}=t.appContext.config,{delimiters:l,compilerOptions:s}=n,c=Ur(Ur({isCustomElement:a,delimiters:l},o),s);n.render=Jy(i,c)}}t.render=n.render||xi}ml(t),Il(),MO(t),_l(),fs()}function sk(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,r){return Wn(t,"get","$attrs"),e[r]}}))}function ES(t){const e=r=>{t.exposed=r||{}};return{get attrs(){return sk(t)},slots:t.slots,emit:t.emit,expose:e}}function Fd(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Y1(G1(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in xc)return xc[r](t)},has(e,r){return r in e||r in xc}}))}function lk(t,e=!0){return kt(t)?t.displayName||t.name:t.name||e&&t.__name}function ck(t){return kt(t)&&"__vccOpts"in t}const _e=(t,e)=>oO(t,e,ou);function D(t,e,r){const n=arguments.length;return n===2?fr(e)&&!It(e)?ys(e)?Rt(t,null,[e]):Rt(t,e):Rt(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&ys(r)&&(r=[r]),Rt(t,e,r))}const uk=Symbol.for("v-scx"),fk=()=>ct(uk),TS="3.3.4",dk="http://www.w3.org/2000/svg",Qo=typeof document<"u"?document:null,Qy=Qo&&Qo.createElement("template"),hk={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const i=e?Qo.createElementNS(dk,t):Qo.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>Qo.createTextNode(t),createComment:t=>Qo.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Qo.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,i,a){const o=r?r.previousSibling:e.lastChild;if(i&&(i===a||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),r),!(i===a||!(i=i.nextSibling)););else{Qy.innerHTML=n?`<svg>${t}</svg>`:t;const l=Qy.content;if(n){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}e.insertBefore(l,r)}return[o?o.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function pk(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function vk(t,e,r){const n=t.style,i=vr(r);if(r&&!i){if(e&&!vr(e))for(const a in e)r[a]==null&&Ev(n,a,"");for(const a in r)Ev(n,a,r[a])}else{const a=n.display;i?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=a)}}const eb=/\s*!important$/;function Ev(t,e,r){if(It(r))r.forEach(n=>Ev(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=mk(t,e);eb.test(r)?t.setProperty(Cl(n),r.replace(eb,""),"important"):t[n]=r}}const tb=["Webkit","Moz","ms"],Nh={};function mk(t,e){const r=Nh[e];if(r)return r;let n=Bi(e);if(n!=="filter"&&n in t)return Nh[e]=n;n=Cd(n);for(let i=0;i<tb.length;i++){const a=tb[i]+n;if(a in t)return Nh[e]=a}return e}const rb="http://www.w3.org/1999/xlink";function gk(t,e,r,n,i){if(n&&e.startsWith("xlink:"))r==null?t.removeAttributeNS(rb,e.slice(6,e.length)):t.setAttributeNS(rb,e,r);else{const a=ED(e);r==null||a&&!_1(r)?t.removeAttribute(e):t.setAttribute(e,a?"":r)}}function yk(t,e,r,n,i,a,o){if(e==="innerHTML"||e==="textContent"){n&&o(n,i,a),t[e]=r??"";return}const l=t.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){t._value=r;const c=l==="OPTION"?t.getAttribute("value"):t.value,u=r??"";c!==u&&(t.value=u),r==null&&t.removeAttribute(e);return}let s=!1;if(r===""||r==null){const c=typeof t[e];c==="boolean"?r=_1(r):r==null&&c==="string"?(r="",s=!0):c==="number"&&(r=0,s=!0)}try{t[e]=r}catch{}s&&t.removeAttribute(e)}function bk(t,e,r,n){t.addEventListener(e,r,n)}function xk(t,e,r,n){t.removeEventListener(e,r,n)}function Ak(t,e,r,n,i=null){const a=t._vei||(t._vei={}),o=a[e];if(n&&o)o.value=n;else{const[l,s]=Ek(e);if(n){const c=a[e]=wk(n,i);bk(t,l,c,s)}else o&&(xk(t,l,o,s),a[e]=void 0)}}const nb=/(?:Once|Passive|Capture)$/;function Ek(t){let e;if(nb.test(t)){e={};let n;for(;n=t.match(nb);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Cl(t.slice(2)),e]}let $h=0;const Tk=Promise.resolve(),Sk=()=>$h||(Tk.then(()=>$h=0),$h=Date.now());function wk(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Ai(Ck(n,r.value),e,5,[n])};return r.value=t,r.attached=Sk(),r}function Ck(t,e){if(It(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const ib=/^on[a-z]/,Ik=(t,e,r,n,i=!1,a,o,l,s)=>{e==="class"?pk(t,n,i):e==="style"?vk(t,r,n):Td(e)?Om(e)||Ak(t,e,r,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):_k(t,e,n,i))?yk(t,e,n,a,o,l,s):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),gk(t,e,n,i))};function _k(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&ib.test(e)&&kt(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||ib.test(e)&&vr(r)?!1:e in t}const za="transition",ql="animation",Pd=(t,{slots:e})=>D(TO,Rk(t),e);Pd.displayName="Transition";const SS={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Pd.props=Ur({},tS,SS);const Ho=(t,e=[])=>{It(t)?t.forEach(r=>r(...e)):t&&t(...e)},ab=t=>t?It(t)?t.some(e=>e.length>1):t.length>1:!1;function Rk(t){const e={};for(const W in t)W in SS||(e[W]=t[W]);if(t.css===!1)return e;const{name:r="v",type:n,duration:i,enterFromClass:a=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:l=`${r}-enter-to`,appearFromClass:s=a,appearActiveClass:c=o,appearToClass:u=l,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=t,p=Lk(i),v=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:b,onEnterCancelled:x,onLeave:T,onLeaveCancelled:A,onBeforeAppear:O=m,onAppear:I=b,onAppearCancelled:_=x}=e,k=(W,q,V)=>{Vo(W,q?u:l),Vo(W,q?c:o),V&&V()},L=(W,q)=>{W._isLeaving=!1,Vo(W,f),Vo(W,h),Vo(W,d),q&&q()},P=W=>(q,V)=>{const G=W?I:b,pe=()=>k(q,W,V);Ho(G,[q,pe]),ob(()=>{Vo(q,W?s:a),Ka(q,W?u:l),ab(G)||sb(q,n,v,pe)})};return Ur(e,{onBeforeEnter(W){Ho(m,[W]),Ka(W,a),Ka(W,o)},onBeforeAppear(W){Ho(O,[W]),Ka(W,s),Ka(W,c)},onEnter:P(!1),onAppear:P(!0),onLeave(W,q){W._isLeaving=!0;const V=()=>L(W,q);Ka(W,f),kk(),Ka(W,d),ob(()=>{W._isLeaving&&(Vo(W,f),Ka(W,h),ab(T)||sb(W,n,g,V))}),Ho(T,[W,V])},onEnterCancelled(W){k(W,!1),Ho(x,[W])},onAppearCancelled(W){k(W,!0),Ho(_,[W])},onLeaveCancelled(W){L(W),Ho(A,[W])}})}function Lk(t){if(t==null)return null;if(fr(t))return[Bh(t.enter),Bh(t.leave)];{const e=Bh(t);return[e,e]}}function Bh(t){return mD(t)}function Ka(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t._vtc||(t._vtc=new Set)).add(e)}function Vo(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const{_vtc:r}=t;r&&(r.delete(e),r.size||(t._vtc=void 0))}function ob(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Dk=0;function sb(t,e,r,n){const i=t._endId=++Dk,a=()=>{i===t._endId&&n()};if(r)return setTimeout(a,r);const{type:o,timeout:l,propCount:s}=Ok(t,e);if(!o)return n();const c=o+"end";let u=0;const f=()=>{t.removeEventListener(c,d),a()},d=h=>{h.target===t&&++u>=s&&f()};setTimeout(()=>{u<s&&f()},l+1),t.addEventListener(c,d)}function Ok(t,e){const r=window.getComputedStyle(t),n=p=>(r[p]||"").split(", "),i=n(`${za}Delay`),a=n(`${za}Duration`),o=lb(i,a),l=n(`${ql}Delay`),s=n(`${ql}Duration`),c=lb(l,s);let u=null,f=0,d=0;e===za?o>0&&(u=za,f=o,d=a.length):e===ql?c>0&&(u=ql,f=c,d=s.length):(f=Math.max(o,c),u=f>0?o>c?za:ql:null,d=u?u===za?a.length:s.length:0);const h=u===za&&/\b(transform|all)(,|$)/.test(n(`${za}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:h}}function lb(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((r,n)=>cb(r)+cb(t[n])))}function cb(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function kk(){return document.body.offsetHeight}const Mk=["ctrl","shift","alt","meta"],Fk={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Mk.some(r=>t[`${r}Key`]&&!e.includes(r))},Pk=(t,e)=>(r,...n)=>{for(let i=0;i<e.length;i++){const a=Fk[e[i]];if(a&&a(r,e))return}return t(r,...n)},wS={beforeMount(t,{value:e},{transition:r}){t._vod=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Xl(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Xl(t,!0),n.enter(t)):n.leave(t,()=>{Xl(t,!1)}):Xl(t,e))},beforeUnmount(t,{value:e}){Xl(t,e)}};function Xl(t,e){t.style.display=e?t._vod:"none"}const Nk=Ur({patchProp:Ik},hk);let ub;function CS(){return ub||(ub=zO(Nk))}const fb=(...t)=>{CS().render(...t)},IS=(...t)=>{const e=CS().createApp(...t),{mount:r}=e;return e.mount=n=>{const i=$k(n);if(!i)return;const a=e._component;!kt(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=r(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e};function $k(t){return vr(t)?document.querySelector(t):t}const Bk=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},Uk={};function Hk(t,e){const r=nr("router-view");return Xt(),ho(r)}const Vk=Bk(Uk,[["render",Hk]]),jk={file:{table:{header:{file_name:"اسم الملف",size:"مقاس",type:"يكتب",date:"تاريخ",share:"يشارك",action:"فعل"}}},h5_page:{install_btn:"تثبيت التطبيق",download_apk:"تحميل apk",all_file:"كل الملف",file_not_exist:"الملف غير موجود",open_app:"افتح التطبيق",download_btn:"عرض المزيد",play_btn:"العب مع iPlayer",last_upload:"تم الرفع مؤخرًا",popular:"حار",recent:"حديثاً",view_more:"عرض المزيد"},report:{report:"تقرير",reason:"سبب",rea1:"المواد الإباحية للأطفال",rea2:"تعزيز الإرهاب",rea3:"محتوى يحض على الكراهية والمسيء",rea4:"محتوى عنيف أو مسيء",rea5:"شكوى المخالفة",rea6:"آخر",desc:"ملخص",email:"بريد إلكتروني",email_fb:"أدخل عنوان بريدك الإلكتروني لتقديم ملاحظاتك حول نتائج التقرير",report_fb:"لقد تلقت المنصة بلاغك وستقوم بالتعامل معه في أقرب وقت ممكن.",tip:"الرجاء إدخال النظرة العامة",btn:"يُقدِّم"}},Wk=Object.freeze(Object.defineProperty({__proto__:null,default:jk},Symbol.toStringTag,{value:"Module"})),Gk={file:{table:{header:{file_name:"File Name",size:"Size",type:"Type",date:"Date",share:"Share",action:"Action"}}},h5_page:{install_btn:"Install App",download_apk:"Download apk",all_file:"All file",file_not_exist:"File does not exist",open_app:"Open App",download_btn:"View more",play_btn:"Play with iPlayer",last_upload:"Recently uploaded",popular:"Hot",recent:"Recently",view_more:"View more"},report:{report:"Report",reason:"Reason",rea1:"Child pornography",rea2:"Promote terrorism",rea3:"Hateful and abusive content",rea4:"Violent or offensive content",rea5:"Infringement complaint",rea6:"Other",desc:"Overview",email:"Email",email_fb:"Enter your email address to give feedback on the report results",report_fb:"The platform has received your report and will handle it as soon as possible.",tip:"Please input the Overview",btn:"Submit"}},zk=Object.freeze(Object.defineProperty({__proto__:null,default:Gk},Symbol.toStringTag,{value:"Module"})),Kk={file:{table:{header:{file_name:"Nombre del archivo",size:"Tamaño",type:"Tipo",date:"Fecha",share:"Compartir",action:"Acción"}}},h5_page:{install_btn:"Instalar aplicación",download_apk:"Descargar apk",all_file:"todo el archivo",file_not_exist:"El archivo no existe",open_app:"Abre la app",download_btn:"Ver más",play_btn:"Juega con iPlayer",last_upload:"subido recientemente",popular:"Caliente",recent:"Recientemente",view_more:"Ver más"},report:{report:"Informe",reason:"Razón",rea1:"Pornografía infantil",rea2:"Promover el terrorismo",rea3:"Contenido odioso y abusivo",rea4:"Contenido violento u ofensivo",rea5:"Denuncia por infracción",rea6:"Otro",desc:"Descripción general",email:"Correo electrónico",email_fb:"Ingrese su dirección de correo electrónico para enviar comentarios sobre los resultados del informe.",report_fb:"La plataforma ha recibido su informe y lo gestionará lo antes posible.",tip:"Por favor ingrese la descripción general",btn:"Entregar"}},Yk=Object.freeze(Object.defineProperty({__proto__:null,default:Kk},Symbol.toStringTag,{value:"Module"})),qk={file:{table:{header:{file_name:"फ़ाइल का नाम",size:"आकार",type:"प्रकार",date:"तारीख",share:"शेयर करना",action:"कार्रवाई"}}},h5_page:{install_btn:"एप्लिकेशन इंस्टॉल करो",download_apk:"एपीके डाउनलोड करें",all_file:"सभी फ़ाइल",file_not_exist:"फ़ाइल मौजूद नहीं है",open_app:"ऐप खोलो",download_btn:"और देखें",play_btn:"आईप्लेयर के साथ खेलें",last_upload:"हाल ही में अपलोड किया गया",popular:"गर्म",recent:"हाल ही में",view_more:"और देखें"},report:{report:"प्रतिवेदन",reason:"कारण",rea1:"बाल अश्लीलता",rea2:"आतंकवाद को बढ़ावा देना",rea3:"घृणित और अपमानजनक सामग्री",rea4:"हिंसक या आपत्तिजनक सामग्री",rea5:"उल्लंघन की शिकायत",rea6:"अन्य",desc:"अवलोकन",email:"ईमेल",email_fb:"रिपोर्ट परिणामों पर प्रतिक्रिया देने के लिए अपना ईमेल पता दर्ज करें",report_fb:"प्लेटफ़ॉर्म को आपकी रिपोर्ट मिल गई है और वह इसे यथाशीघ्र संभाल लेगा।",tip:"कृपया अवलोकन इनपुट करें",btn:"जमा करना"}},Xk=Object.freeze(Object.defineProperty({__proto__:null,default:qk},Symbol.toStringTag,{value:"Module"})),Zk={file:{table:{header:{file_name:"Nama file",size:"Ukuran",type:"Jenis",date:"Tanggal",share:"Membagikan",action:"Tindakan"}}},h5_page:{install_btn:"Instal aplikasi",download_apk:"Unduh apk",all_file:"Semua berkas",file_not_exist:"File tidak ada",open_app:"Buka Aplikasi",download_btn:"Lihat lebih banyak",play_btn:"Mainkan dengan iPlayer",last_upload:"Baru saja diunggah",popular:"Panas",recent:"Baru-baru ini",view_more:"Lihat lebih banyak"},report:{report:"Laporan",reason:"Alasan",rea1:"Pornografi anak",rea2:"Mempromosikan terorisme",rea3:"Konten yang penuh kebencian dan kasar",rea4:"Konten kekerasan atau menyinggung",rea5:"Keluhan pelanggaran",rea6:"Lainnya",desc:"Ringkasan",email:"Surel",email_fb:"Masukkan alamat email Anda untuk memberikan tanggapan terhadap hasil laporan",report_fb:"Platform telah menerima laporan Anda dan akan menanganinya sesegera mungkin.",tip:"Silakan masukkan Ikhtisarnya",btn:"Kirim"}},Jk=Object.freeze(Object.defineProperty({__proto__:null,default:Zk},Symbol.toStringTag,{value:"Module"})),Qk={file:{table:{header:{file_name:"Nome do arquivo",size:"Tamanho",type:"Tipo",date:"Data",share:"Compartilhar",action:"Ação"}}},h5_page:{install_btn:"Instalar aplicativo",download_apk:"Baixar APK",all_file:"Todos os arquivos",file_not_exist:"Arquivo não existe",open_app:"Abra o aplicativo",download_btn:"Veja mais",play_btn:"Jogue com iPlayer",last_upload:"Carregado recentemente",popular:"Quente",recent:"Recentemente",view_more:"Ver mais"},report:{report:"Relatório",reason:"Razão",rea1:"Pornografia infantil",rea2:"Promova o terrorismo",rea3:"Conteúdo odioso e abusivo",rea4:"Conteúdo violento ou ofensivo",rea5:"Reclamação de violação",rea6:"Outro",desc:"Visão geral",email:"E-mail",email_fb:"Digite seu endereço de e-mail para fornecer feedback sobre os resultados do relatório",report_fb:"A plataforma recebeu o seu relatório e irá tratá-lo o mais breve possível.",tip:"Por favor insira a visão geral",btn:"Enviar"}},eM=Object.freeze(Object.defineProperty({__proto__:null,default:Qk},Symbol.toStringTag,{value:"Module"}));/*!
  * shared v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const Tv=typeof window<"u",tM=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Io=t=>tM?Symbol(t):t,rM=(t,e,r)=>nM({l:t,k:e,s:r}),nM=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Wr=t=>typeof t=="number"&&isFinite(t),iM=t=>og(t)==="[object Date]",So=t=>og(t)==="[object RegExp]",Nd=t=>Mt(t)&&Object.keys(t).length===0;function aM(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const tn=Object.assign;let db;const Tc=()=>db||(db=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hb(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const oM=Object.prototype.hasOwnProperty;function ag(t,e){return oM.call(t,e)}const br=Array.isArray,kr=t=>typeof t=="function",lt=t=>typeof t=="string",zt=t=>typeof t=="boolean",xr=t=>t!==null&&typeof t=="object",_S=Object.prototype.toString,og=t=>_S.call(t),Mt=t=>og(t)==="[object Object]",sM=t=>t==null?"":br(t)||Mt(t)&&t.toString===_S?JSON.stringify(t,null,2):String(t);/*!
  * message-compiler v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const rr={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function $d(t,e,r={}){const{domain:n,messages:i,args:a}=r,o=t,l=new SyntaxError(String(o));return l.code=t,e&&(l.location=e),l.domain=n,l}function lM(t){throw t}function cM(t,e,r){return{line:t,column:e,offset:r}}function Sv(t,e,r){const n={start:t,end:e};return r!=null&&(n.source=r),n}const ya=" ",uM="\r",Ln=`
`,fM=String.fromCharCode(8232),dM=String.fromCharCode(8233);function hM(t){const e=t;let r=0,n=1,i=1,a=0;const o=I=>e[I]===uM&&e[I+1]===Ln,l=I=>e[I]===Ln,s=I=>e[I]===dM,c=I=>e[I]===fM,u=I=>o(I)||l(I)||s(I)||c(I),f=()=>r,d=()=>n,h=()=>i,p=()=>a,v=I=>o(I)||s(I)||c(I)?Ln:e[I],g=()=>v(r),m=()=>v(r+a);function b(){return a=0,u(r)&&(n++,i=0),o(r)&&r++,r++,i++,e[r]}function x(){return o(r+a)&&a++,a++,e[r+a]}function T(){r=0,n=1,i=1,a=0}function A(I=0){a=I}function O(){const I=r+a;for(;I!==r;)b();a=0}return{index:f,line:d,column:h,peekOffset:p,charAt:v,currentChar:g,currentPeek:m,next:b,peek:x,reset:T,resetPeek:A,skipToPeek:O}}const Ya=void 0,pb="'",pM="tokenizer";function vM(t,e={}){const r=e.location!==!1,n=hM(t),i=()=>n.index(),a=()=>cM(n.line(),n.column(),n.index()),o=a(),l=i(),s={currentType:14,offset:l,startLoc:o,endLoc:o,lastType:14,lastOffset:l,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>s,{onError:u}=e;function f(w,C,j,...ie){const ne=c();if(C.column+=j,C.offset+=j,u){const X=Sv(ne.startLoc,C),ee=$d(w,X,{domain:pM,args:ie});u(ee)}}function d(w,C,j){w.endLoc=a(),w.currentType=C;const ie={type:C};return r&&(ie.loc=Sv(w.startLoc,w.endLoc)),j!=null&&(ie.value=j),ie}const h=w=>d(w,14);function p(w,C){return w.currentChar()===C?(w.next(),C):(f(rr.EXPECTED_TOKEN,a(),0,C),"")}function v(w){let C="";for(;w.currentPeek()===ya||w.currentPeek()===Ln;)C+=w.currentPeek(),w.peek();return C}function g(w){const C=v(w);return w.skipToPeek(),C}function m(w){if(w===Ya)return!1;const C=w.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C===95}function b(w){if(w===Ya)return!1;const C=w.charCodeAt(0);return C>=48&&C<=57}function x(w,C){const{currentType:j}=C;if(j!==2)return!1;v(w);const ie=m(w.currentPeek());return w.resetPeek(),ie}function T(w,C){const{currentType:j}=C;if(j!==2)return!1;v(w);const ie=w.currentPeek()==="-"?w.peek():w.currentPeek(),ne=b(ie);return w.resetPeek(),ne}function A(w,C){const{currentType:j}=C;if(j!==2)return!1;v(w);const ie=w.currentPeek()===pb;return w.resetPeek(),ie}function O(w,C){const{currentType:j}=C;if(j!==8)return!1;v(w);const ie=w.currentPeek()===".";return w.resetPeek(),ie}function I(w,C){const{currentType:j}=C;if(j!==9)return!1;v(w);const ie=m(w.currentPeek());return w.resetPeek(),ie}function _(w,C){const{currentType:j}=C;if(!(j===8||j===12))return!1;v(w);const ie=w.currentPeek()===":";return w.resetPeek(),ie}function k(w,C){const{currentType:j}=C;if(j!==10)return!1;const ie=()=>{const X=w.currentPeek();return X==="{"?m(w.peek()):X==="@"||X==="%"||X==="|"||X===":"||X==="."||X===ya||!X?!1:X===Ln?(w.peek(),ie()):m(X)},ne=ie();return w.resetPeek(),ne}function L(w){v(w);const C=w.currentPeek()==="|";return w.resetPeek(),C}function P(w){const C=v(w),j=w.currentPeek()==="%"&&w.peek()==="{";return w.resetPeek(),{isModulo:j,hasSpace:C.length>0}}function W(w,C=!0){const j=(ne=!1,X="",ee=!1)=>{const de=w.currentPeek();return de==="{"?X==="%"?!1:ne:de==="@"||!de?X==="%"?!0:ne:de==="%"?(w.peek(),j(ne,"%",!0)):de==="|"?X==="%"||ee?!0:!(X===ya||X===Ln):de===ya?(w.peek(),j(!0,ya,ee)):de===Ln?(w.peek(),j(!0,Ln,ee)):!0},ie=j();return C&&w.resetPeek(),ie}function q(w,C){const j=w.currentChar();return j===Ya?Ya:C(j)?(w.next(),j):null}function V(w){return q(w,j=>{const ie=j.charCodeAt(0);return ie>=97&&ie<=122||ie>=65&&ie<=90||ie>=48&&ie<=57||ie===95||ie===36})}function G(w){return q(w,j=>{const ie=j.charCodeAt(0);return ie>=48&&ie<=57})}function pe(w){return q(w,j=>{const ie=j.charCodeAt(0);return ie>=48&&ie<=57||ie>=65&&ie<=70||ie>=97&&ie<=102})}function J(w){let C="",j="";for(;C=G(w);)j+=C;return j}function N(w){g(w);const C=w.currentChar();return C!=="%"&&f(rr.EXPECTED_TOKEN,a(),0,C),w.next(),"%"}function Z(w){let C="";for(;;){const j=w.currentChar();if(j==="{"||j==="}"||j==="@"||j==="|"||!j)break;if(j==="%")if(W(w))C+=j,w.next();else break;else if(j===ya||j===Ln)if(W(w))C+=j,w.next();else{if(L(w))break;C+=j,w.next()}else C+=j,w.next()}return C}function le(w){g(w);let C="",j="";for(;C=V(w);)j+=C;return w.currentChar()===Ya&&f(rr.UNTERMINATED_CLOSING_BRACE,a(),0),j}function ye(w){g(w);let C="";return w.currentChar()==="-"?(w.next(),C+=`-${J(w)}`):C+=J(w),w.currentChar()===Ya&&f(rr.UNTERMINATED_CLOSING_BRACE,a(),0),C}function me(w){g(w),p(w,"'");let C="",j="";const ie=X=>X!==pb&&X!==Ln;for(;C=q(w,ie);)C==="\\"?j+=Re(w):j+=C;const ne=w.currentChar();return ne===Ln||ne===Ya?(f(rr.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),ne===Ln&&(w.next(),p(w,"'")),j):(p(w,"'"),j)}function Re(w){const C=w.currentChar();switch(C){case"\\":case"'":return w.next(),`\\${C}`;case"u":return be(w,C,4);case"U":return be(w,C,6);default:return f(rr.UNKNOWN_ESCAPE_SEQUENCE,a(),0,C),""}}function be(w,C,j){p(w,C);let ie="";for(let ne=0;ne<j;ne++){const X=pe(w);if(!X){f(rr.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${C}${ie}${w.currentChar()}`);break}ie+=X}return`\\${C}${ie}`}function Ce(w){g(w);let C="",j="";const ie=ne=>ne!=="{"&&ne!=="}"&&ne!==ya&&ne!==Ln;for(;C=q(w,ie);)j+=C;return j}function we(w){let C="",j="";for(;C=V(w);)j+=C;return j}function ce(w){const C=(j=!1,ie)=>{const ne=w.currentChar();return ne==="{"||ne==="%"||ne==="@"||ne==="|"||!ne||ne===ya?ie:ne===Ln?(ie+=ne,w.next(),C(j,ie)):(ie+=ne,w.next(),C(!0,ie))};return C(!1,"")}function re(w){g(w);const C=p(w,"|");return g(w),C}function ve(w,C){let j=null;switch(w.currentChar()){case"{":return C.braceNest>=1&&f(rr.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),w.next(),j=d(C,2,"{"),g(w),C.braceNest++,j;case"}":return C.braceNest>0&&C.currentType===2&&f(rr.EMPTY_PLACEHOLDER,a(),0),w.next(),j=d(C,3,"}"),C.braceNest--,C.braceNest>0&&g(w),C.inLinked&&C.braceNest===0&&(C.inLinked=!1),j;case"@":return C.braceNest>0&&f(rr.UNTERMINATED_CLOSING_BRACE,a(),0),j=Te(w,C)||h(C),C.braceNest=0,j;default:let ne=!0,X=!0,ee=!0;if(L(w))return C.braceNest>0&&f(rr.UNTERMINATED_CLOSING_BRACE,a(),0),j=d(C,1,re(w)),C.braceNest=0,C.inLinked=!1,j;if(C.braceNest>0&&(C.currentType===5||C.currentType===6||C.currentType===7))return f(rr.UNTERMINATED_CLOSING_BRACE,a(),0),C.braceNest=0,Pe(w,C);if(ne=x(w,C))return j=d(C,5,le(w)),g(w),j;if(X=T(w,C))return j=d(C,6,ye(w)),g(w),j;if(ee=A(w,C))return j=d(C,7,me(w)),g(w),j;if(!ne&&!X&&!ee)return j=d(C,13,Ce(w)),f(rr.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,j.value),g(w),j;break}return j}function Te(w,C){const{currentType:j}=C;let ie=null;const ne=w.currentChar();switch((j===8||j===9||j===12||j===10)&&(ne===Ln||ne===ya)&&f(rr.INVALID_LINKED_FORMAT,a(),0),ne){case"@":return w.next(),ie=d(C,8,"@"),C.inLinked=!0,ie;case".":return g(w),w.next(),d(C,9,".");case":":return g(w),w.next(),d(C,10,":");default:return L(w)?(ie=d(C,1,re(w)),C.braceNest=0,C.inLinked=!1,ie):O(w,C)||_(w,C)?(g(w),Te(w,C)):I(w,C)?(g(w),d(C,12,we(w))):k(w,C)?(g(w),ne==="{"?ve(w,C)||ie:d(C,11,ce(w))):(j===8&&f(rr.INVALID_LINKED_FORMAT,a(),0),C.braceNest=0,C.inLinked=!1,Pe(w,C))}}function Pe(w,C){let j={type:14};if(C.braceNest>0)return ve(w,C)||h(C);if(C.inLinked)return Te(w,C)||h(C);switch(w.currentChar()){case"{":return ve(w,C)||h(C);case"}":return f(rr.UNBALANCED_CLOSING_BRACE,a(),0),w.next(),d(C,3,"}");case"@":return Te(w,C)||h(C);default:if(L(w))return j=d(C,1,re(w)),C.braceNest=0,C.inLinked=!1,j;const{isModulo:ne,hasSpace:X}=P(w);if(ne)return X?d(C,0,Z(w)):d(C,4,N(w));if(W(w))return d(C,0,Z(w));break}return j}function B(){const{currentType:w,offset:C,startLoc:j,endLoc:ie}=s;return s.lastType=w,s.lastOffset=C,s.lastStartLoc=j,s.lastEndLoc=ie,s.offset=i(),s.startLoc=a(),n.currentChar()===Ya?d(s,14):Pe(n,s)}return{nextToken:B,currentOffset:i,currentPosition:a,context:c}}const mM="parser",gM=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function yM(t,e,r){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||r,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function bM(t={}){const e=t.location!==!1,{onError:r}=t;function n(m,b,x,T,...A){const O=m.currentPosition();if(O.offset+=T,O.column+=T,r){const I=Sv(x,O),_=$d(b,I,{domain:mM,args:A});r(_)}}function i(m,b,x){const T={type:m,start:b,end:b};return e&&(T.loc={start:x,end:x}),T}function a(m,b,x,T){m.end=b,T&&(m.type=T),e&&m.loc&&(m.loc.end=x)}function o(m,b){const x=m.context(),T=i(3,x.offset,x.startLoc);return T.value=b,a(T,m.currentOffset(),m.currentPosition()),T}function l(m,b){const x=m.context(),{lastOffset:T,lastStartLoc:A}=x,O=i(5,T,A);return O.index=parseInt(b,10),m.nextToken(),a(O,m.currentOffset(),m.currentPosition()),O}function s(m,b){const x=m.context(),{lastOffset:T,lastStartLoc:A}=x,O=i(4,T,A);return O.key=b,m.nextToken(),a(O,m.currentOffset(),m.currentPosition()),O}function c(m,b){const x=m.context(),{lastOffset:T,lastStartLoc:A}=x,O=i(9,T,A);return O.value=b.replace(gM,yM),m.nextToken(),a(O,m.currentOffset(),m.currentPosition()),O}function u(m){const b=m.nextToken(),x=m.context(),{lastOffset:T,lastStartLoc:A}=x,O=i(8,T,A);return b.type!==12?(n(m,rr.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),O.value="",a(O,T,A),{nextConsumeToken:b,node:O}):(b.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,Xi(b)),O.value=b.value||"",a(O,m.currentOffset(),m.currentPosition()),{node:O})}function f(m,b){const x=m.context(),T=i(7,x.offset,x.startLoc);return T.value=b,a(T,m.currentOffset(),m.currentPosition()),T}function d(m){const b=m.context(),x=i(6,b.offset,b.startLoc);let T=m.nextToken();if(T.type===9){const A=u(m);x.modifier=A.node,T=A.nextConsumeToken||m.nextToken()}switch(T.type!==10&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(T)),T=m.nextToken(),T.type===2&&(T=m.nextToken()),T.type){case 11:T.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(T)),x.key=f(m,T.value||"");break;case 5:T.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(T)),x.key=s(m,T.value||"");break;case 6:T.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(T)),x.key=l(m,T.value||"");break;case 7:T.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(T)),x.key=c(m,T.value||"");break;default:n(m,rr.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const A=m.context(),O=i(7,A.offset,A.startLoc);return O.value="",a(O,A.offset,A.startLoc),x.key=O,a(x,A.offset,A.startLoc),{nextConsumeToken:T,node:x}}return a(x,m.currentOffset(),m.currentPosition()),{node:x}}function h(m){const b=m.context(),x=b.currentType===1?m.currentOffset():b.offset,T=b.currentType===1?b.endLoc:b.startLoc,A=i(2,x,T);A.items=[];let O=null;do{const k=O||m.nextToken();switch(O=null,k.type){case 0:k.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(k)),A.items.push(o(m,k.value||""));break;case 6:k.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(k)),A.items.push(l(m,k.value||""));break;case 5:k.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(k)),A.items.push(s(m,k.value||""));break;case 7:k.value==null&&n(m,rr.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Xi(k)),A.items.push(c(m,k.value||""));break;case 8:const L=d(m);A.items.push(L.node),O=L.nextConsumeToken||null;break}}while(b.currentType!==14&&b.currentType!==1);const I=b.currentType===1?b.lastOffset:m.currentOffset(),_=b.currentType===1?b.lastEndLoc:m.currentPosition();return a(A,I,_),A}function p(m,b,x,T){const A=m.context();let O=T.items.length===0;const I=i(1,b,x);I.cases=[],I.cases.push(T);do{const _=h(m);O||(O=_.items.length===0),I.cases.push(_)}while(A.currentType!==14);return O&&n(m,rr.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),a(I,m.currentOffset(),m.currentPosition()),I}function v(m){const b=m.context(),{offset:x,startLoc:T}=b,A=h(m);return b.currentType===14?A:p(m,x,T,A)}function g(m){const b=vM(m,tn({},t)),x=b.context(),T=i(0,x.offset,x.startLoc);return e&&T.loc&&(T.loc.source=m),T.body=v(b),x.currentType!==14&&n(b,rr.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,m[x.offset]||""),a(T,b.currentOffset(),b.currentPosition()),T}return{parse:g}}function Xi(t){if(t.type===14)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function xM(t,e={}){const r={ast:t,helpers:new Set};return{context:()=>r,helper:a=>(r.helpers.add(a),a)}}function vb(t,e){for(let r=0;r<t.length;r++)sg(t[r],e)}function sg(t,e){switch(t.type){case 1:vb(t.cases,e),e.helper("plural");break;case 2:vb(t.items,e);break;case 6:sg(t.key,e),e.helper("linked"),e.helper("type");break;case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function AM(t,e={}){const r=xM(t);r.helper("normalize"),t.body&&sg(t.body,r);const n=r.context();t.helpers=Array.from(n.helpers)}function EM(t,e){const{sourceMap:r,filename:n,breakLineCode:i,needIndent:a}=e,o={source:t.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0},l=()=>o;function s(v,g){o.code+=v}function c(v,g=!0){const m=g?i:"";s(a?m+"  ".repeat(v):m)}function u(v=!0){const g=++o.indentLevel;v&&c(g)}function f(v=!0){const g=--o.indentLevel;v&&c(g)}function d(){c(o.indentLevel)}return{context:l,push:s,indent:u,deindent:f,newline:d,helper:v=>`_${v}`,needIndent:()=>o.needIndent}}function TM(t,e){const{helper:r}=t;t.push(`${r("linked")}(`),gl(t,e.key),e.modifier?(t.push(", "),gl(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function SM(t,e){const{helper:r,needIndent:n}=t;t.push(`${r("normalize")}([`),t.indent(n());const i=e.items.length;for(let a=0;a<i&&(gl(t,e.items[a]),a!==i-1);a++)t.push(", ");t.deindent(n()),t.push("])")}function wM(t,e){const{helper:r,needIndent:n}=t;if(e.cases.length>1){t.push(`${r("plural")}([`),t.indent(n());const i=e.cases.length;for(let a=0;a<i&&(gl(t,e.cases[a]),a!==i-1);a++)t.push(", ");t.deindent(n()),t.push("])")}}function CM(t,e){e.body?gl(t,e.body):t.push("null")}function gl(t,e){const{helper:r}=t;switch(e.type){case 0:CM(t,e);break;case 1:wM(t,e);break;case 2:SM(t,e);break;case 6:TM(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${r("interpolate")}(${r("list")}(${e.index}))`,e);break;case 4:t.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break}}const IM=(t,e={})=>{const r=lt(e.mode)?e.mode:"normal",n=lt(e.filename)?e.filename:"message.intl",i=!!e.sourceMap,a=e.breakLineCode!=null?e.breakLineCode:r==="arrow"?";":`
`,o=e.needIndent?e.needIndent:r!=="arrow",l=t.helpers||[],s=EM(t,{mode:r,filename:n,sourceMap:i,breakLineCode:a,needIndent:o});s.push(r==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),l.length>0&&(s.push(`const { ${l.map(f=>`${f}: _${f}`).join(", ")} } = ctx`),s.newline()),s.push("return "),gl(s,t),s.deindent(o),s.push("}");const{code:c,map:u}=s.context();return{ast:t,code:c,map:u?u.toJSON():void 0}};function _M(t,e={}){const r=tn({},e),i=bM(r).parse(t);return AM(i,r),IM(i,r)}/*!
  * devtools-if v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const RS={I18nInit:"i18n:init",FunctionTranslate:"function:translate"};/*!
  * core-base v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const _o=[];_o[0]={w:[0],i:[3,0],["["]:[4],o:[7]};_o[1]={w:[1],["."]:[2],["["]:[4],o:[7]};_o[2]={w:[2],i:[3,0],[0]:[3,0]};_o[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};_o[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};_o[5]={["'"]:[4,0],o:8,l:[5,0]};_o[6]={['"']:[4,0],o:8,l:[6,0]};const RM=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function LM(t){return RM.test(t)}function DM(t){const e=t.charCodeAt(0),r=t.charCodeAt(t.length-1);return e===r&&(e===34||e===39)?t.slice(1,-1):t}function OM(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function kM(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:LM(e)?DM(e):"*"+e}function MM(t){const e=[];let r=-1,n=0,i=0,a,o,l,s,c,u,f;const d=[];d[0]=()=>{o===void 0?o=l:o+=l},d[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},d[2]=()=>{d[0](),i++},d[3]=()=>{if(i>0)i--,n=4,d[0]();else{if(i=0,o===void 0||(o=kM(o),o===!1))return!1;d[1]()}};function h(){const p=t[r+1];if(n===5&&p==="'"||n===6&&p==='"')return r++,l="\\"+p,d[0](),!0}for(;n!==null;)if(r++,a=t[r],!(a==="\\"&&h())){if(s=OM(a),f=_o[n],c=f[s]||f.l||8,c===8||(n=c[0],c[1]!==void 0&&(u=d[c[1]],u&&(l=a,u()===!1))))return;if(n===7)return e}}const mb=new Map;function FM(t,e){return xr(t)?t[e]:null}function PM(t,e){if(!xr(t))return null;let r=mb.get(e);if(r||(r=MM(e),r&&mb.set(e,r)),!r)return null;const n=r.length;let i=t,a=0;for(;a<n;){const o=i[r[a]];if(o===void 0)return null;i=o,a++}return i}const NM=t=>t,$M=t=>"",BM="text",UM=t=>t.length===0?"":t.join(""),HM=sM;function gb(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function VM(t){const e=Wr(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Wr(t.named.count)||Wr(t.named.n))?Wr(t.named.count)?t.named.count:Wr(t.named.n)?t.named.n:e:e}function jM(t,e){e.count||(e.count=t),e.n||(e.n=t)}function WM(t={}){const e=t.locale,r=VM(t),n=xr(t.pluralRules)&&lt(e)&&kr(t.pluralRules[e])?t.pluralRules[e]:gb,i=xr(t.pluralRules)&&lt(e)&&kr(t.pluralRules[e])?gb:void 0,a=m=>m[n(r,m.length,i)],o=t.list||[],l=m=>o[m],s=t.named||{};Wr(t.pluralIndex)&&jM(r,s);const c=m=>s[m];function u(m){const b=kr(t.messages)?t.messages(m):xr(t.messages)?t.messages[m]:!1;return b||(t.parent?t.parent.message(m):$M)}const f=m=>t.modifiers?t.modifiers[m]:NM,d=Mt(t.processor)&&kr(t.processor.normalize)?t.processor.normalize:UM,h=Mt(t.processor)&&kr(t.processor.interpolate)?t.processor.interpolate:HM,p=Mt(t.processor)&&lt(t.processor.type)?t.processor.type:BM,g={list:l,named:c,plural:a,linked:(m,...b)=>{const[x,T]=b;let A="text",O="";b.length===1?xr(x)?(O=x.modifier||O,A=x.type||A):lt(x)&&(O=x||O):b.length===2&&(lt(x)&&(O=x||O),lt(T)&&(A=T||A));let I=u(m)(g);return A==="vnode"&&br(I)&&O&&(I=I[0]),O?f(O)(I,A):I},message:u,type:p,interpolate:h,normalize:d};return g}let su=null;function GM(t){su=t}function zM(t,e,r){su&&su.emit(RS.I18nInit,{timestamp:Date.now(),i18n:t,version:e,meta:r})}const KM=YM(RS.FunctionTranslate);function YM(t){return e=>su&&su.emit(t,e)}function qM(t,e,r){return[...new Set([r,...br(e)?e:xr(e)?Object.keys(e):lt(e)?[e]:[r]])]}function LS(t,e,r){const n=lt(r)?r:Tu,i=t;i.__localeChainCache||(i.__localeChainCache=new Map);let a=i.__localeChainCache.get(n);if(!a){a=[];let o=[r];for(;br(o);)o=yb(a,o,e);const l=br(e)||!Mt(e)?e:e.default?e.default:null;o=lt(l)?[l]:l,br(o)&&yb(a,o,!1),i.__localeChainCache.set(n,a)}return a}function yb(t,e,r){let n=!0;for(let i=0;i<e.length&&zt(n);i++){const a=e[i];lt(a)&&(n=XM(t,e[i],r))}return n}function XM(t,e,r){let n;const i=e.split("-");do{const a=i.join("-");n=ZM(t,a,r),i.splice(-1,1)}while(i.length&&n===!0);return n}function ZM(t,e,r){let n=!1;if(!t.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const i=e.replace(/!/g,"");t.push(i),(br(r)||Mt(r))&&r[i]&&(n=r[i])}return n}const JM="9.2.2",Bd=-1,Tu="en-US",bb="",xb=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function QM(){return{upper:(t,e)=>e==="text"&&lt(t)?t.toUpperCase():e==="vnode"&&xr(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&lt(t)?t.toLowerCase():e==="vnode"&&xr(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&lt(t)?xb(t):e==="vnode"&&xr(t)&&"__v_isVNode"in t?xb(t.children):t}}let DS;function eF(t){DS=t}let OS;function tF(t){OS=t}let kS;function rF(t){kS=t}let MS=null;const Ab=t=>{MS=t},nF=()=>MS;let FS=null;const Eb=t=>{FS=t},iF=()=>FS;let Tb=0;function aF(t={}){const e=lt(t.version)?t.version:JM,r=lt(t.locale)?t.locale:Tu,n=br(t.fallbackLocale)||Mt(t.fallbackLocale)||lt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:r,i=Mt(t.messages)?t.messages:{[r]:{}},a=Mt(t.datetimeFormats)?t.datetimeFormats:{[r]:{}},o=Mt(t.numberFormats)?t.numberFormats:{[r]:{}},l=tn({},t.modifiers||{},QM()),s=t.pluralRules||{},c=kr(t.missing)?t.missing:null,u=zt(t.missingWarn)||So(t.missingWarn)?t.missingWarn:!0,f=zt(t.fallbackWarn)||So(t.fallbackWarn)?t.fallbackWarn:!0,d=!!t.fallbackFormat,h=!!t.unresolving,p=kr(t.postTranslation)?t.postTranslation:null,v=Mt(t.processor)?t.processor:null,g=zt(t.warnHtmlMessage)?t.warnHtmlMessage:!0,m=!!t.escapeParameter,b=kr(t.messageCompiler)?t.messageCompiler:DS,x=kr(t.messageResolver)?t.messageResolver:OS||FM,T=kr(t.localeFallbacker)?t.localeFallbacker:kS||qM,A=xr(t.fallbackContext)?t.fallbackContext:void 0,O=kr(t.onWarn)?t.onWarn:aM,I=t,_=xr(I.__datetimeFormatters)?I.__datetimeFormatters:new Map,k=xr(I.__numberFormatters)?I.__numberFormatters:new Map,L=xr(I.__meta)?I.__meta:{};Tb++;const P={version:e,cid:Tb,locale:r,fallbackLocale:n,messages:i,modifiers:l,pluralRules:s,missing:c,missingWarn:u,fallbackWarn:f,fallbackFormat:d,unresolving:h,postTranslation:p,processor:v,warnHtmlMessage:g,escapeParameter:m,messageCompiler:b,messageResolver:x,localeFallbacker:T,fallbackContext:A,onWarn:O,__meta:L};return P.datetimeFormats=a,P.numberFormats=o,P.__datetimeFormatters=_,P.__numberFormatters=k,__INTLIFY_PROD_DEVTOOLS__&&zM(P,e,L),P}function lg(t,e,r,n,i){const{missing:a,onWarn:o}=t;if(a!==null){const l=a(t,r,e,i);return lt(l)?l:e}else return e}function Zl(t,e,r){const n=t;n.__localeChainCache=new Map,t.localeFallbacker(t,r,e)}const oF=t=>t;let Sb=Object.create(null);function sF(t,e={}){{const n=(e.onCacheKey||oF)(t),i=Sb[n];if(i)return i;let a=!1;const o=e.onError||lM;e.onError=c=>{a=!0,o(c)};const{code:l}=_M(t,e),s=new Function(`return ${l}`)();return a?s:Sb[n]=s}}let PS=rr.__EXTEND_POINT__;const Uh=()=>++PS,Zs={INVALID_ARGUMENT:PS,INVALID_DATE_ARGUMENT:Uh(),INVALID_ISO_DATE_ARGUMENT:Uh(),__EXTEND_POINT__:Uh()};function Js(t){return $d(t,null,void 0)}const wb=()=>"",ta=t=>kr(t);function Cb(t,...e){const{fallbackFormat:r,postTranslation:n,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:l}=t,[s,c]=wv(...e),u=zt(c.missingWarn)?c.missingWarn:t.missingWarn,f=zt(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,d=zt(c.escapeParameter)?c.escapeParameter:t.escapeParameter,h=!!c.resolvedMessage,p=lt(c.default)||zt(c.default)?zt(c.default)?a?s:()=>s:c.default:r?a?s:()=>s:"",v=r||p!=="",g=lt(c.locale)?c.locale:t.locale;d&&lF(c);let[m,b,x]=h?[s,g,l[g]||{}]:NS(t,s,g,o,f,u),T=m,A=s;if(!h&&!(lt(T)||ta(T))&&v&&(T=p,A=T),!h&&(!(lt(T)||ta(T))||!lt(b)))return i?Bd:s;let O=!1;const I=()=>{O=!0},_=ta(T)?T:$S(t,s,b,T,A,I);if(O)return T;const k=fF(t,b,x,c),L=WM(k),P=cF(t,_,L),W=n?n(P,s):P;if(__INTLIFY_PROD_DEVTOOLS__){const q={timestamp:Date.now(),key:lt(s)?s:ta(T)?T.key:"",locale:b||(ta(T)?T.locale:""),format:lt(T)?T:ta(T)?T.source:"",message:W};q.meta=tn({},t.__meta,nF()||{}),KM(q)}return W}function lF(t){br(t.list)?t.list=t.list.map(e=>lt(e)?hb(e):e):xr(t.named)&&Object.keys(t.named).forEach(e=>{lt(t.named[e])&&(t.named[e]=hb(t.named[e]))})}function NS(t,e,r,n,i,a){const{messages:o,onWarn:l,messageResolver:s,localeFallbacker:c}=t,u=c(t,n,r);let f={},d,h=null;const p="translate";for(let v=0;v<u.length&&(d=u[v],f=o[d]||{},(h=s(f,e))===null&&(h=f[e]),!(lt(h)||kr(h)));v++){const g=lg(t,e,d,a,p);g!==e&&(h=g)}return[h,d,f]}function $S(t,e,r,n,i,a){const{messageCompiler:o,warnHtmlMessage:l}=t;if(ta(n)){const c=n;return c.locale=c.locale||r,c.key=c.key||e,c}if(o==null){const c=()=>n;return c.locale=r,c.key=e,c}const s=o(n,uF(t,r,i,n,l,a));return s.locale=r,s.key=e,s.source=n,s}function cF(t,e,r){return e(r)}function wv(...t){const[e,r,n]=t,i={};if(!lt(e)&&!Wr(e)&&!ta(e))throw Js(Zs.INVALID_ARGUMENT);const a=Wr(e)?String(e):(ta(e),e);return Wr(r)?i.plural=r:lt(r)?i.default=r:Mt(r)&&!Nd(r)?i.named=r:br(r)&&(i.list=r),Wr(n)?i.plural=n:lt(n)?i.default=n:Mt(n)&&tn(i,n),[a,i]}function uF(t,e,r,n,i,a){return{warnHtmlMessage:i,onError:o=>{throw a&&a(o),o},onCacheKey:o=>rM(e,r,o)}}function fF(t,e,r,n){const{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:l,fallbackWarn:s,missingWarn:c,fallbackContext:u}=t,d={locale:e,modifiers:i,pluralRules:a,messages:h=>{let p=o(r,h);if(p==null&&u){const[,,v]=NS(u,h,e,l,s,c);p=o(v,h)}if(lt(p)){let v=!1;const m=$S(t,h,e,p,h,()=>{v=!0});return v?wb:m}else return ta(p)?p:wb}};return t.processor&&(d.processor=t.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),Wr(n.plural)&&(d.pluralIndex=n.plural),d}function Ib(t,...e){const{datetimeFormats:r,unresolving:n,fallbackLocale:i,onWarn:a,localeFallbacker:o}=t,{__datetimeFormatters:l}=t,[s,c,u,f]=Cv(...e),d=zt(u.missingWarn)?u.missingWarn:t.missingWarn;zt(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const h=!!u.part,p=lt(u.locale)?u.locale:t.locale,v=o(t,i,p);if(!lt(s)||s==="")return new Intl.DateTimeFormat(p,f).format(c);let g={},m,b=null;const x="datetime format";for(let O=0;O<v.length&&(m=v[O],g=r[m]||{},b=g[s],!Mt(b));O++)lg(t,s,m,d,x);if(!Mt(b)||!lt(m))return n?Bd:s;let T=`${m}__${s}`;Nd(f)||(T=`${T}__${JSON.stringify(f)}`);let A=l.get(T);return A||(A=new Intl.DateTimeFormat(m,tn({},b,f)),l.set(T,A)),h?A.formatToParts(c):A.format(c)}const BS=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Cv(...t){const[e,r,n,i]=t,a={};let o={},l;if(lt(e)){const s=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!s)throw Js(Zs.INVALID_ISO_DATE_ARGUMENT);const c=s[3]?s[3].trim().startsWith("T")?`${s[1].trim()}${s[3].trim()}`:`${s[1].trim()}T${s[3].trim()}`:s[1].trim();l=new Date(c);try{l.toISOString()}catch{throw Js(Zs.INVALID_ISO_DATE_ARGUMENT)}}else if(iM(e)){if(isNaN(e.getTime()))throw Js(Zs.INVALID_DATE_ARGUMENT);l=e}else if(Wr(e))l=e;else throw Js(Zs.INVALID_ARGUMENT);return lt(r)?a.key=r:Mt(r)&&Object.keys(r).forEach(s=>{BS.includes(s)?o[s]=r[s]:a[s]=r[s]}),lt(n)?a.locale=n:Mt(n)&&(o=n),Mt(i)&&(o=i),[a.key||"",l,a,o]}function _b(t,e,r){const n=t;for(const i in r){const a=`${e}__${i}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function Rb(t,...e){const{numberFormats:r,unresolving:n,fallbackLocale:i,onWarn:a,localeFallbacker:o}=t,{__numberFormatters:l}=t,[s,c,u,f]=Iv(...e),d=zt(u.missingWarn)?u.missingWarn:t.missingWarn;zt(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const h=!!u.part,p=lt(u.locale)?u.locale:t.locale,v=o(t,i,p);if(!lt(s)||s==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,b=null;const x="number format";for(let O=0;O<v.length&&(m=v[O],g=r[m]||{},b=g[s],!Mt(b));O++)lg(t,s,m,d,x);if(!Mt(b)||!lt(m))return n?Bd:s;let T=`${m}__${s}`;Nd(f)||(T=`${T}__${JSON.stringify(f)}`);let A=l.get(T);return A||(A=new Intl.NumberFormat(m,tn({},b,f)),l.set(T,A)),h?A.formatToParts(c):A.format(c)}const US=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Iv(...t){const[e,r,n,i]=t,a={};let o={};if(!Wr(e))throw Js(Zs.INVALID_ARGUMENT);const l=e;return lt(r)?a.key=r:Mt(r)&&Object.keys(r).forEach(s=>{US.includes(s)?o[s]=r[s]:a[s]=r[s]}),lt(n)?a.locale=n:Mt(n)&&(o=n),Mt(i)&&(o=i),[a.key||"",l,a,o]}function Lb(t,e,r){const n=t;for(const i in r){const a=`${e}__${i}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Tc().__INTLIFY_PROD_DEVTOOLS__=!1);/*!
  * vue-i18n v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const dF="9.2.2";function hF(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Tc().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Tc().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Tc().__INTLIFY_PROD_DEVTOOLS__=!1)}let HS=rr.__EXTEND_POINT__;const Pn=()=>++HS,Br={UNEXPECTED_RETURN_TYPE:HS,INVALID_ARGUMENT:Pn(),MUST_BE_CALL_SETUP_TOP:Pn(),NOT_INSLALLED:Pn(),NOT_AVAILABLE_IN_LEGACY_MODE:Pn(),REQUIRED_VALUE:Pn(),INVALID_VALUE:Pn(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Pn(),NOT_INSLALLED_WITH_PROVIDE:Pn(),UNEXPECTED_ERROR:Pn(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Pn(),BRIDGE_SUPPORT_VUE_2_ONLY:Pn(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Pn(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Pn(),__EXTEND_POINT__:Pn()};function Gr(t,...e){return $d(t,null,void 0)}const _v=Io("__transrateVNode"),Rv=Io("__datetimeParts"),Lv=Io("__numberParts"),VS=Io("__setPluralRules");Io("__intlifyMeta");const jS=Io("__injectWithOption");function Dv(t){if(!xr(t))return t;for(const e in t)if(ag(t,e))if(!e.includes("."))xr(t[e])&&Dv(t[e]);else{const r=e.split("."),n=r.length-1;let i=t;for(let a=0;a<n;a++)r[a]in i||(i[r[a]]={}),i=i[r[a]];i[r[n]]=t[e],delete t[e],xr(i[r[n]])&&Dv(i[r[n]])}return t}function Ud(t,e){const{messages:r,__i18n:n,messageResolver:i,flatJson:a}=e,o=Mt(r)?r:br(n)?{}:{[t]:{}};if(br(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:s,resource:c}=l;s?(o[s]=o[s]||{},Sc(c,o[s])):Sc(c,o)}else lt(l)&&Sc(JSON.parse(l),o)}),i==null&&a)for(const l in o)ag(o,l)&&Dv(o[l]);return o}const Qu=t=>!xr(t)||br(t);function Sc(t,e){if(Qu(t)||Qu(e))throw Gr(Br.INVALID_VALUE);for(const r in t)ag(t,r)&&(Qu(t[r])||Qu(e[r])?e[r]=t[r]:Sc(t[r],e[r]))}function WS(t){return t.type}function GS(t,e,r){let n=xr(e.messages)?e.messages:{};"__i18nGlobal"in r&&(n=Ud(t.locale.value,{messages:n,__i18n:r.__i18nGlobal}));const i=Object.keys(n);i.length&&i.forEach(a=>{t.mergeLocaleMessage(a,n[a])});{if(xr(e.datetimeFormats)){const a=Object.keys(e.datetimeFormats);a.length&&a.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(xr(e.numberFormats)){const a=Object.keys(e.numberFormats);a.length&&a.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function Db(t){return Rt(Eu,null,t,0)}const Ob="__INTLIFY_META__";let kb=0;function Mb(t){return(e,r,n,i)=>t(r,n,xn()||void 0,i)}const pF=()=>{const t=xn();let e=null;return t&&(e=WS(t)[Ob])?{[Ob]:e}:null};function cg(t={},e){const{__root:r}=t,n=r===void 0;let i=zt(t.inheritLocale)?t.inheritLocale:!0;const a=je(r&&i?r.locale.value:lt(t.locale)?t.locale:Tu),o=je(r&&i?r.fallbackLocale.value:lt(t.fallbackLocale)||br(t.fallbackLocale)||Mt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),l=je(Ud(a.value,t)),s=je(Mt(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),c=je(Mt(t.numberFormats)?t.numberFormats:{[a.value]:{}});let u=r?r.missingWarn:zt(t.missingWarn)||So(t.missingWarn)?t.missingWarn:!0,f=r?r.fallbackWarn:zt(t.fallbackWarn)||So(t.fallbackWarn)?t.fallbackWarn:!0,d=r?r.fallbackRoot:zt(t.fallbackRoot)?t.fallbackRoot:!0,h=!!t.fallbackFormat,p=kr(t.missing)?t.missing:null,v=kr(t.missing)?Mb(t.missing):null,g=kr(t.postTranslation)?t.postTranslation:null,m=r?r.warnHtmlMessage:zt(t.warnHtmlMessage)?t.warnHtmlMessage:!0,b=!!t.escapeParameter;const x=r?r.modifiers:Mt(t.modifiers)?t.modifiers:{};let T=t.pluralRules||r&&r.pluralRules,A;A=(()=>{n&&Eb(null);const te={version:dF,locale:a.value,fallbackLocale:o.value,messages:l.value,modifiers:x,pluralRules:T,missing:v===null?void 0:v,missingWarn:u,fallbackWarn:f,fallbackFormat:h,unresolving:!0,postTranslation:g===null?void 0:g,warnHtmlMessage:m,escapeParameter:b,messageResolver:t.messageResolver,__meta:{framework:"vue"}};te.datetimeFormats=s.value,te.numberFormats=c.value,te.__datetimeFormatters=Mt(A)?A.__datetimeFormatters:void 0,te.__numberFormatters=Mt(A)?A.__numberFormatters:void 0;const he=aF(te);return n&&Eb(he),he})(),Zl(A,a.value,o.value);function I(){return[a.value,o.value,l.value,s.value,c.value]}const _=_e({get:()=>a.value,set:te=>{a.value=te,A.locale=a.value}}),k=_e({get:()=>o.value,set:te=>{o.value=te,A.fallbackLocale=o.value,Zl(A,a.value,te)}}),L=_e(()=>l.value),P=_e(()=>s.value),W=_e(()=>c.value);function q(){return kr(g)?g:null}function V(te){g=te,A.postTranslation=te}function G(){return p}function pe(te){te!==null&&(v=Mb(te)),p=te,A.missing=v}const J=(te,he,ke,se,ue,xe)=>{I();let De;if(__INTLIFY_PROD_DEVTOOLS__)try{Ab(pF()),n||(A.fallbackContext=r?iF():void 0),De=te(A)}finally{Ab(null),n||(A.fallbackContext=void 0)}else De=te(A);if(Wr(De)&&De===Bd){const[U,ge]=he();return r&&d?se(r):ue(U)}else{if(xe(De))return De;throw Gr(Br.UNEXPECTED_RETURN_TYPE)}};function N(...te){return J(he=>Reflect.apply(Cb,null,[he,...te]),()=>wv(...te),"translate",he=>Reflect.apply(he.t,he,[...te]),he=>he,he=>lt(he))}function Z(...te){const[he,ke,se]=te;if(se&&!xr(se))throw Gr(Br.INVALID_ARGUMENT);return N(he,ke,tn({resolvedMessage:!0},se||{}))}function le(...te){return J(he=>Reflect.apply(Ib,null,[he,...te]),()=>Cv(...te),"datetime format",he=>Reflect.apply(he.d,he,[...te]),()=>bb,he=>lt(he))}function ye(...te){return J(he=>Reflect.apply(Rb,null,[he,...te]),()=>Iv(...te),"number format",he=>Reflect.apply(he.n,he,[...te]),()=>bb,he=>lt(he))}function me(te){return te.map(he=>lt(he)||Wr(he)||zt(he)?Db(String(he)):he)}const be={normalize:me,interpolate:te=>te,type:"vnode"};function Ce(...te){return J(he=>{let ke;const se=he;try{se.processor=be,ke=Reflect.apply(Cb,null,[se,...te])}finally{se.processor=null}return ke},()=>wv(...te),"translate",he=>he[_v](...te),he=>[Db(he)],he=>br(he))}function we(...te){return J(he=>Reflect.apply(Rb,null,[he,...te]),()=>Iv(...te),"number format",he=>he[Lv](...te),()=>[],he=>lt(he)||br(he))}function ce(...te){return J(he=>Reflect.apply(Ib,null,[he,...te]),()=>Cv(...te),"datetime format",he=>he[Rv](...te),()=>[],he=>lt(he)||br(he))}function re(te){T=te,A.pluralRules=T}function ve(te,he){const ke=lt(he)?he:a.value,se=B(ke);return A.messageResolver(se,te)!==null}function Te(te){let he=null;const ke=LS(A,o.value,a.value);for(let se=0;se<ke.length;se++){const ue=l.value[ke[se]]||{},xe=A.messageResolver(ue,te);if(xe!=null){he=xe;break}}return he}function Pe(te){const he=Te(te);return he??(r?r.tm(te)||{}:{})}function B(te){return l.value[te]||{}}function w(te,he){l.value[te]=he,A.messages=l.value}function C(te,he){l.value[te]=l.value[te]||{},Sc(he,l.value[te]),A.messages=l.value}function j(te){return s.value[te]||{}}function ie(te,he){s.value[te]=he,A.datetimeFormats=s.value,_b(A,te,he)}function ne(te,he){s.value[te]=tn(s.value[te]||{},he),A.datetimeFormats=s.value,_b(A,te,he)}function X(te){return c.value[te]||{}}function ee(te,he){c.value[te]=he,A.numberFormats=c.value,Lb(A,te,he)}function de(te,he){c.value[te]=tn(c.value[te]||{},he),A.numberFormats=c.value,Lb(A,te,he)}kb++,r&&Tv&&(st(r.locale,te=>{i&&(a.value=te,A.locale=te,Zl(A,a.value,o.value))}),st(r.fallbackLocale,te=>{i&&(o.value=te,A.fallbackLocale=te,Zl(A,a.value,o.value))}));const oe={id:kb,locale:_,fallbackLocale:k,get inheritLocale(){return i},set inheritLocale(te){i=te,te&&r&&(a.value=r.locale.value,o.value=r.fallbackLocale.value,Zl(A,a.value,o.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:L,get modifiers(){return x},get pluralRules(){return T||{}},get isGlobal(){return n},get missingWarn(){return u},set missingWarn(te){u=te,A.missingWarn=u},get fallbackWarn(){return f},set fallbackWarn(te){f=te,A.fallbackWarn=f},get fallbackRoot(){return d},set fallbackRoot(te){d=te},get fallbackFormat(){return h},set fallbackFormat(te){h=te,A.fallbackFormat=h},get warnHtmlMessage(){return m},set warnHtmlMessage(te){m=te,A.warnHtmlMessage=te},get escapeParameter(){return b},set escapeParameter(te){b=te,A.escapeParameter=te},t:N,getLocaleMessage:B,setLocaleMessage:w,mergeLocaleMessage:C,getPostTranslationHandler:q,setPostTranslationHandler:V,getMissingHandler:G,setMissingHandler:pe,[VS]:re};return oe.datetimeFormats=P,oe.numberFormats=W,oe.rt=Z,oe.te=ve,oe.tm=Pe,oe.d=le,oe.n=ye,oe.getDateTimeFormat=j,oe.setDateTimeFormat=ie,oe.mergeDateTimeFormat=ne,oe.getNumberFormat=X,oe.setNumberFormat=ee,oe.mergeNumberFormat=de,oe[jS]=t.__injectWithOption,oe[_v]=Ce,oe[Rv]=ce,oe[Lv]=we,oe}function vF(t){const e=lt(t.locale)?t.locale:Tu,r=lt(t.fallbackLocale)||br(t.fallbackLocale)||Mt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,n=kr(t.missing)?t.missing:void 0,i=zt(t.silentTranslationWarn)||So(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,a=zt(t.silentFallbackWarn)||So(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=zt(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,s=Mt(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=kr(t.postTranslation)?t.postTranslation:void 0,f=lt(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,d=!!t.escapeParameterHtml,h=zt(t.sync)?t.sync:!0;let p=t.messages;if(Mt(t.sharedMessages)){const A=t.sharedMessages;p=Object.keys(A).reduce((I,_)=>{const k=I[_]||(I[_]={});return tn(k,A[_]),I},p||{})}const{__i18n:v,__root:g,__injectWithOption:m}=t,b=t.datetimeFormats,x=t.numberFormats,T=t.flatJson;return{locale:e,fallbackLocale:r,messages:p,flatJson:T,datetimeFormats:b,numberFormats:x,missing:n,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:l,modifiers:s,pluralRules:c,postTranslation:u,warnHtmlMessage:f,escapeParameter:d,messageResolver:t.messageResolver,inheritLocale:h,__i18n:v,__root:g,__injectWithOption:m}}function Ov(t={},e){{const r=cg(vF(t)),n={id:r.id,get locale(){return r.locale.value},set locale(i){r.locale.value=i},get fallbackLocale(){return r.fallbackLocale.value},set fallbackLocale(i){r.fallbackLocale.value=i},get messages(){return r.messages.value},get datetimeFormats(){return r.datetimeFormats.value},get numberFormats(){return r.numberFormats.value},get availableLocales(){return r.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(i){},get missing(){return r.getMissingHandler()},set missing(i){r.setMissingHandler(i)},get silentTranslationWarn(){return zt(r.missingWarn)?!r.missingWarn:r.missingWarn},set silentTranslationWarn(i){r.missingWarn=zt(i)?!i:i},get silentFallbackWarn(){return zt(r.fallbackWarn)?!r.fallbackWarn:r.fallbackWarn},set silentFallbackWarn(i){r.fallbackWarn=zt(i)?!i:i},get modifiers(){return r.modifiers},get formatFallbackMessages(){return r.fallbackFormat},set formatFallbackMessages(i){r.fallbackFormat=i},get postTranslation(){return r.getPostTranslationHandler()},set postTranslation(i){r.setPostTranslationHandler(i)},get sync(){return r.inheritLocale},set sync(i){r.inheritLocale=i},get warnHtmlInMessage(){return r.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){r.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return r.escapeParameter},set escapeParameterHtml(i){r.escapeParameter=i},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(i){},get pluralizationRules(){return r.pluralRules||{}},__composer:r,t(...i){const[a,o,l]=i,s={};let c=null,u=null;if(!lt(a))throw Gr(Br.INVALID_ARGUMENT);const f=a;return lt(o)?s.locale=o:br(o)?c=o:Mt(o)&&(u=o),br(l)?c=l:Mt(l)&&(u=l),Reflect.apply(r.t,r,[f,c||u||{},s])},rt(...i){return Reflect.apply(r.rt,r,[...i])},tc(...i){const[a,o,l]=i,s={plural:1};let c=null,u=null;if(!lt(a))throw Gr(Br.INVALID_ARGUMENT);const f=a;return lt(o)?s.locale=o:Wr(o)?s.plural=o:br(o)?c=o:Mt(o)&&(u=o),lt(l)?s.locale=l:br(l)?c=l:Mt(l)&&(u=l),Reflect.apply(r.t,r,[f,c||u||{},s])},te(i,a){return r.te(i,a)},tm(i){return r.tm(i)},getLocaleMessage(i){return r.getLocaleMessage(i)},setLocaleMessage(i,a){r.setLocaleMessage(i,a)},mergeLocaleMessage(i,a){r.mergeLocaleMessage(i,a)},d(...i){return Reflect.apply(r.d,r,[...i])},getDateTimeFormat(i){return r.getDateTimeFormat(i)},setDateTimeFormat(i,a){r.setDateTimeFormat(i,a)},mergeDateTimeFormat(i,a){r.mergeDateTimeFormat(i,a)},n(...i){return Reflect.apply(r.n,r,[...i])},getNumberFormat(i){return r.getNumberFormat(i)},setNumberFormat(i,a){r.setNumberFormat(i,a)},mergeNumberFormat(i,a){r.mergeNumberFormat(i,a)},getChoiceIndex(i,a){return-1},__onComponentInstanceCreated(i){const{componentInstanceCreatedListener:a}=t;a&&a(i,n)}};return n}}const ug={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function mF({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((n,i)=>n=[...n,...br(i.children)?i.children:[i]],[]):e.reduce((r,n)=>{const i=t[n];return i&&(r[n]=i()),r},{})}function zS(t){return Hn}const Fb={name:"i18n-t",props:tn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Wr(t)||!isNaN(t)}},ug),setup(t,e){const{slots:r,attrs:n}=e,i=t.i18n||fg({useScope:t.scope,__useComponent:!0});return()=>{const a=Object.keys(r).filter(f=>f!=="_"),o={};t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=lt(t.plural)?+t.plural:t.plural);const l=mF(e,a),s=i[_v](t.keypath,l,o),c=tn({},n),u=lt(t.tag)||xr(t.tag)?t.tag:zS();return D(u,c,s)}}};function gF(t){return br(t)&&!lt(t[0])}function KS(t,e,r,n){const{slots:i,attrs:a}=e;return()=>{const o={part:!0};let l={};t.locale&&(o.locale=t.locale),lt(t.format)?o.key=t.format:xr(t.format)&&(lt(t.format.key)&&(o.key=t.format.key),l=Object.keys(t.format).reduce((d,h)=>r.includes(h)?tn({},d,{[h]:t.format[h]}):d,{}));const s=n(t.value,o,l);let c=[o.key];br(s)?c=s.map((d,h)=>{const p=i[d.type],v=p?p({[d.type]:d.value,index:h,parts:s}):[d.value];return gF(v)&&(v[0].key=`${d.type}-${h}`),v}):lt(s)&&(c=[s]);const u=tn({},a),f=lt(t.tag)||xr(t.tag)?t.tag:zS();return D(f,u,c)}}const Pb={name:"i18n-n",props:tn({value:{type:Number,required:!0},format:{type:[String,Object]}},ug),setup(t,e){const r=t.i18n||fg({useScope:"parent",__useComponent:!0});return KS(t,e,US,(...n)=>r[Lv](...n))}},Nb={name:"i18n-d",props:tn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},ug),setup(t,e){const r=t.i18n||fg({useScope:"parent",__useComponent:!0});return KS(t,e,BS,(...n)=>r[Rv](...n))}};function yF(t,e){const r=t;if(t.mode==="composition")return r.__getInstance(e)||t.global;{const n=r.__getInstance(e);return n!=null?n.__composer:t.global.__composer}}function bF(t){const e=o=>{const{instance:l,modifiers:s,value:c}=o;if(!l||!l.$)throw Gr(Br.UNEXPECTED_ERROR);const u=yF(t,l.$),f=$b(c);return[Reflect.apply(u.t,u,[...Bb(f)]),u]};return{created:(o,l)=>{const[s,c]=e(l);Tv&&t.global===c&&(o.__i18nWatcher=st(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),o.__composer=c,o.textContent=s},unmounted:o=>{Tv&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:l})=>{if(o.__composer){const s=o.__composer,c=$b(l);o.textContent=Reflect.apply(s.t,s,[...Bb(c)])}},getSSRProps:o=>{const[l]=e(o);return{textContent:l}}}}function $b(t){if(lt(t))return{path:t};if(Mt(t)){if(!("path"in t))throw Gr(Br.REQUIRED_VALUE,"path");return t}else throw Gr(Br.INVALID_VALUE)}function Bb(t){const{path:e,locale:r,args:n,choice:i,plural:a}=t,o={},l=n||{};return lt(r)&&(o.locale=r),Wr(i)&&(o.plural=i),Wr(a)&&(o.plural=a),[e,l,o]}function xF(t,e,...r){const n=Mt(r[0])?r[0]:{},i=!!n.useI18nComponentName;(zt(n.globalInstall)?n.globalInstall:!0)&&(t.component(i?"i18n":Fb.name,Fb),t.component(Pb.name,Pb),t.component(Nb.name,Nb)),t.directive("t",bF(e))}function AF(t,e,r){return{beforeCreate(){const n=xn();if(!n)throw Gr(Br.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const a=i.i18n;i.__i18n&&(a.__i18n=i.__i18n),a.__root=e,this===this.$root?this.$i18n=Ub(t,a):(a.__injectWithOption=!0,this.$i18n=Ov(a))}else i.__i18n?this===this.$root?this.$i18n=Ub(t,i):this.$i18n=Ov({__i18n:i.__i18n,__injectWithOption:!0,__root:e}):this.$i18n=t;i.__i18nGlobal&&GS(e,i,i),t.__onComponentInstanceCreated(this.$i18n),r.__setInstance(n,this.$i18n),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$tc=(...a)=>this.$i18n.tc(...a),this.$te=(a,o)=>this.$i18n.te(a,o),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a)},mounted(){},unmounted(){const n=xn();if(!n)throw Gr(Br.UNEXPECTED_ERROR);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__deleteInstance(n),delete this.$i18n}}}function Ub(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[VS](e.pluralizationRules||t.pluralizationRules);const r=Ud(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(r).forEach(n=>t.mergeLocaleMessage(n,r[n])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(n=>t.mergeDateTimeFormat(n,e.datetimeFormats[n])),e.numberFormats&&Object.keys(e.numberFormats).forEach(n=>t.mergeNumberFormat(n,e.numberFormats[n])),t}const EF=Io("global-vue-i18n");function TF(t={},e){const r=__VUE_I18N_LEGACY_API__&&zt(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=zt(t.globalInjection)?t.globalInjection:!0,i=__VUE_I18N_LEGACY_API__&&r?!!t.allowComposition:!0,a=new Map,[o,l]=SF(t,r),s=Io("");function c(d){return a.get(d)||null}function u(d,h){a.set(d,h)}function f(d){a.delete(d)}{const d={get mode(){return __VUE_I18N_LEGACY_API__&&r?"legacy":"composition"},get allowComposition(){return i},async install(h,...p){h.__VUE_I18N_SYMBOL__=s,h.provide(h.__VUE_I18N_SYMBOL__,d),!r&&n&&kF(h,d.global),__VUE_I18N_FULL_INSTALL__&&xF(h,d,...p),__VUE_I18N_LEGACY_API__&&r&&h.mixin(AF(l,l.__composer,d));const v=h.unmount;h.unmount=()=>{d.dispose(),v()}},get global(){return l},dispose(){o.stop()},__instances:a,__getInstance:c,__setInstance:u,__deleteInstance:f};return d}}function fg(t={}){const e=xn();if(e==null)throw Gr(Br.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Gr(Br.NOT_INSLALLED);const r=wF(e),n=IF(r),i=WS(e),a=CF(t,i);if(__VUE_I18N_LEGACY_API__&&r.mode==="legacy"&&!t.__useComponent){if(!r.allowComposition)throw Gr(Br.NOT_AVAILABLE_IN_LEGACY_MODE);return LF(e,a,n,t)}if(a==="global")return GS(n,t,i),n;if(a==="parent"){let s=_F(r,e,t.__useComponent);return s==null&&(s=n),s}const o=r;let l=o.__getInstance(e);if(l==null){const s=tn({},t);"__i18n"in i&&(s.__i18n=i.__i18n),n&&(s.__root=n),l=cg(s),RF(o,e),o.__setInstance(e,l)}return l}function SF(t,e,r){const n=TD();{const i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Ov(t)):n.run(()=>cg(t));if(i==null)throw Gr(Br.UNEXPECTED_ERROR);return[n,i]}}function wF(t){{const e=ct(t.isCE?EF:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Gr(t.isCE?Br.NOT_INSLALLED_WITH_PROVIDE:Br.UNEXPECTED_ERROR);return e}}function CF(t,e){return Nd(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function IF(t){return t.mode==="composition"?t.global:t.global.__composer}function _F(t,e,r=!1){let n=null;const i=e.root;let a=e.parent;for(;a!=null;){const o=t;if(t.mode==="composition")n=o.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const l=o.__getInstance(a);l!=null&&(n=l.__composer,r&&n&&!n[jS]&&(n=null))}if(n!=null||i===a)break;a=a.parent}return n}function RF(t,e,r){Er(()=>{},e),Rr(()=>{t.__deleteInstance(e)},e)}function LF(t,e,r,n={}){const i=e==="local",a=z1(null);if(i&&t.proxy&&!(t.proxy.$options.i18n||t.proxy.$options.__i18n))throw Gr(Br.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=zt(n.inheritLocale)?n.inheritLocale:!0,l=je(i&&o?r.locale.value:lt(n.locale)?n.locale:Tu),s=je(i&&o?r.fallbackLocale.value:lt(n.fallbackLocale)||br(n.fallbackLocale)||Mt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:l.value),c=je(Ud(l.value,n)),u=je(Mt(n.datetimeFormats)?n.datetimeFormats:{[l.value]:{}}),f=je(Mt(n.numberFormats)?n.numberFormats:{[l.value]:{}}),d=i?r.missingWarn:zt(n.missingWarn)||So(n.missingWarn)?n.missingWarn:!0,h=i?r.fallbackWarn:zt(n.fallbackWarn)||So(n.fallbackWarn)?n.fallbackWarn:!0,p=i?r.fallbackRoot:zt(n.fallbackRoot)?n.fallbackRoot:!0,v=!!n.fallbackFormat,g=kr(n.missing)?n.missing:null,m=kr(n.postTranslation)?n.postTranslation:null,b=i?r.warnHtmlMessage:zt(n.warnHtmlMessage)?n.warnHtmlMessage:!0,x=!!n.escapeParameter,T=i?r.modifiers:Mt(n.modifiers)?n.modifiers:{},A=n.pluralRules||i&&r.pluralRules;function O(){return[l.value,s.value,c.value,u.value,f.value]}const I=_e({get:()=>a.value?a.value.locale.value:l.value,set:C=>{a.value&&(a.value.locale.value=C),l.value=C}}),_=_e({get:()=>a.value?a.value.fallbackLocale.value:s.value,set:C=>{a.value&&(a.value.fallbackLocale.value=C),s.value=C}}),k=_e(()=>a.value?a.value.messages.value:c.value),L=_e(()=>u.value),P=_e(()=>f.value);function W(){return a.value?a.value.getPostTranslationHandler():m}function q(C){a.value&&a.value.setPostTranslationHandler(C)}function V(){return a.value?a.value.getMissingHandler():g}function G(C){a.value&&a.value.setMissingHandler(C)}function pe(C){return O(),C()}function J(...C){return a.value?pe(()=>Reflect.apply(a.value.t,null,[...C])):pe(()=>"")}function N(...C){return a.value?Reflect.apply(a.value.rt,null,[...C]):""}function Z(...C){return a.value?pe(()=>Reflect.apply(a.value.d,null,[...C])):pe(()=>"")}function le(...C){return a.value?pe(()=>Reflect.apply(a.value.n,null,[...C])):pe(()=>"")}function ye(C){return a.value?a.value.tm(C):{}}function me(C,j){return a.value?a.value.te(C,j):!1}function Re(C){return a.value?a.value.getLocaleMessage(C):{}}function be(C,j){a.value&&(a.value.setLocaleMessage(C,j),c.value[C]=j)}function Ce(C,j){a.value&&a.value.mergeLocaleMessage(C,j)}function we(C){return a.value?a.value.getDateTimeFormat(C):{}}function ce(C,j){a.value&&(a.value.setDateTimeFormat(C,j),u.value[C]=j)}function re(C,j){a.value&&a.value.mergeDateTimeFormat(C,j)}function ve(C){return a.value?a.value.getNumberFormat(C):{}}function Te(C,j){a.value&&(a.value.setNumberFormat(C,j),f.value[C]=j)}function Pe(C,j){a.value&&a.value.mergeNumberFormat(C,j)}const B={get id(){return a.value?a.value.id:-1},locale:I,fallbackLocale:_,messages:k,datetimeFormats:L,numberFormats:P,get inheritLocale(){return a.value?a.value.inheritLocale:o},set inheritLocale(C){a.value&&(a.value.inheritLocale=C)},get availableLocales(){return a.value?a.value.availableLocales:Object.keys(c.value)},get modifiers(){return a.value?a.value.modifiers:T},get pluralRules(){return a.value?a.value.pluralRules:A},get isGlobal(){return a.value?a.value.isGlobal:!1},get missingWarn(){return a.value?a.value.missingWarn:d},set missingWarn(C){a.value&&(a.value.missingWarn=C)},get fallbackWarn(){return a.value?a.value.fallbackWarn:h},set fallbackWarn(C){a.value&&(a.value.missingWarn=C)},get fallbackRoot(){return a.value?a.value.fallbackRoot:p},set fallbackRoot(C){a.value&&(a.value.fallbackRoot=C)},get fallbackFormat(){return a.value?a.value.fallbackFormat:v},set fallbackFormat(C){a.value&&(a.value.fallbackFormat=C)},get warnHtmlMessage(){return a.value?a.value.warnHtmlMessage:b},set warnHtmlMessage(C){a.value&&(a.value.warnHtmlMessage=C)},get escapeParameter(){return a.value?a.value.escapeParameter:x},set escapeParameter(C){a.value&&(a.value.escapeParameter=C)},t:J,getPostTranslationHandler:W,setPostTranslationHandler:q,getMissingHandler:V,setMissingHandler:G,rt:N,d:Z,n:le,tm:ye,te:me,getLocaleMessage:Re,setLocaleMessage:be,mergeLocaleMessage:Ce,getDateTimeFormat:we,setDateTimeFormat:ce,mergeDateTimeFormat:re,getNumberFormat:ve,setNumberFormat:Te,mergeNumberFormat:Pe};function w(C){C.locale.value=l.value,C.fallbackLocale.value=s.value,Object.keys(c.value).forEach(j=>{C.mergeLocaleMessage(j,c.value[j])}),Object.keys(u.value).forEach(j=>{C.mergeDateTimeFormat(j,u.value[j])}),Object.keys(f.value).forEach(j=>{C.mergeNumberFormat(j,f.value[j])}),C.escapeParameter=x,C.fallbackFormat=v,C.fallbackRoot=p,C.fallbackWarn=h,C.missingWarn=d,C.warnHtmlMessage=b}return aS(()=>{if(t.proxy==null||t.proxy.$i18n==null)throw Gr(Br.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const C=a.value=t.proxy.$i18n.__composer;e==="global"?(l.value=C.locale.value,s.value=C.fallbackLocale.value,c.value=C.messages.value,u.value=C.datetimeFormats.value,f.value=C.numberFormats.value):i&&w(C)}),B}const DF=["locale","fallbackLocale","availableLocales"],OF=["t","rt","d","n","tm"];function kF(t,e){const r=Object.create(null);DF.forEach(n=>{const i=Object.getOwnPropertyDescriptor(e,n);if(!i)throw Gr(Br.UNEXPECTED_ERROR);const a=Fr(i.value)?{get(){return i.value.value},set(o){i.value.value=o}}:{get(){return i.get&&i.get()}};Object.defineProperty(r,n,a)}),t.config.globalProperties.$i18n=r,OF.forEach(n=>{const i=Object.getOwnPropertyDescriptor(e,n);if(!i||!i.value)throw Gr(Br.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${n}`,i)})}eF(sF);tF(PM);rF(LS);hF();if(__INTLIFY_PROD_DEVTOOLS__){const t=Tc();t.__INTLIFY__=!0,GM(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const MF=Object.fromEntries(Object.entries(Object.assign({"../../locales/ar.js":Wk,"../../locales/en.js":zk,"../../locales/es.js":Yk,"../../locales/in.js":Xk,"../../locales/ind.js":Jk,"../../locales/pt.js":eM})).map(([t,e])=>[t.slice(14,-3),e.default])),FF=localStorage.getItem("language")||"en",PF=t=>{const e=TF({legacy:!1,locale:FF,messages:MF,globalInjection:!0});t.use(e)};var kv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var NF={cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1},Fa=NF;function $F(t,e,r){if(t)if(t.forEach)t.forEach(e,r);else for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t)}var Gn=$F,BF=Object.prototype.toString,YS=BF,UF=YS;function HF(t){return function(e){return"[object "+t+"]"===UF.call(e)}}var Su=HF,VF=Su,jF=Array.isArray||VF("Array"),mr=jF;function WF(t,e){return t&&t.hasOwnProperty?t.hasOwnProperty(e):!1}var Hi=WF,GF=Hi;function zF(t,e,r){if(t)for(var n in t)GF(t,n)&&e.call(r,t[n],n,t)}var wu=zF,KF=mr,YF=Gn,qF=wu;function XF(t,e,r){return t&&(KF(t)?YF:qF)(t,e,r)}var Yr=XF;function ZF(t){return function(e){return typeof e===t}}var Dl=ZF,JF=Dl,QF=JF("function"),li=QF,e2=Yr;function t2(t,e){var r=Object[t];return function(n){var i=[];if(n){if(r)return r(n);e2(n,e>1?function(a){i.push([""+a,n[a]])}:function(){i.push(arguments[e])})}return i}}var hg=t2,r2=hg,n2=r2("keys",1),Pa=n2,i2=YS,a2=wu,o2=Gn;function Hh(t,e){var r=t.__proto__.constructor;return e?new r(e):new r}function ef(t,e){return e?qS(t,e):t}function qS(t,e){if(t)switch(i2.call(t)){case"[object Object]":{var r=Object.create(t.__proto__);return a2(t,function(o,l){r[l]=ef(o,e)}),r}case"[object Date]":case"[object RegExp]":return Hh(t,t.valueOf());case"[object Array]":case"[object Arguments]":{var n=[];return o2(t,function(o){n.push(ef(o,e))}),n}case"[object Set]":{var i=Hh(t);return i.forEach(function(o){i.add(ef(o,e))}),i}case"[object Map]":{var a=Hh(t);return a.forEach(function(o,l){a.set(l,ef(o,e))}),a}}return t}function s2(t,e){return t&&qS(t,e)}var pg=s2,l2=Gn,c2=Pa,u2=mr,f2=pg,Hb=Object.assign;function Vb(t,e,r){for(var n=e.length,i,a=1;a<n;a++)i=e[a],l2(c2(e[a]),r?function(o){t[o]=f2(i[o],r)}:function(o){t[o]=i[o]});return t}var d2=function(t){if(t){var e=arguments;if(t===!0){if(e.length>1)return t=u2(t[1])?[]:{},Vb(t,e,!0)}else return Hb?Hb.apply(Object,e):Vb(t,e)}return t},Vi=d2,h2=Fa,p2=Gn,v2=Yr,m2=li,g2=Vi,ds=function(){};function y2(){p2(arguments,function(t){v2(t,function(e,r){ds[r]=m2(e)?function(){var n=e.apply(ds.$context,arguments);return ds.$context=null,n}:e})})}function b2(t){return g2(h2,t)}ds.VERSION="3.5.13";ds.mixin=y2;ds.setup=b2;var x2=ds;function A2(t,e,r){for(var n=t.length-1;n>=0;n--)e.call(r,t[n],n,t)}var vg=A2,E2=vg,T2=Pa;function S2(t,e,r){E2(T2(t),function(n){e.call(r,t[n],n,t)})}var XS=S2;function w2(t){return t===null}var Na=w2,C2=Na;function I2(t,e){return function(r){return C2(r)?e:r[t]}}var Ol=I2,_2=Yr,R2=li,L2=Ol;function D2(t,e,r){var n={};if(t)if(e)R2(e)||(e=L2(e)),_2(t,function(i,a){n[a]=e.call(r,i,a,t)});else return t;return n}var O2=D2;function k2(t){return t?t.constructor===Object:!1}var kl=k2,jb=mr,Wb=kl,M2=Yr;function ZS(t,e){return Wb(t)&&Wb(e)||jb(t)&&jb(e)?(M2(e,function(r,n){t[n]=ZS(t[n],r)}),t):e}var F2=function(t){t||(t={});for(var e=arguments,r=e.length,n,i=1;i<r;i++)n=e[i],n&&ZS(t,n);return t},P2=F2,N2=Yr;function $2(t,e,r){var n=[];if(t&&arguments.length>1){if(t.map)return t.map(e,r);N2(t,function(){n.push(e.apply(r,arguments))})}return n}var Ml=$2,B2=Hi,U2=mr;function H2(t,e,r,n,i){return function(a,o,l){if(a&&o){if(t&&a[t])return a[t](o,l);if(e&&U2(a)){for(var s=0,c=a.length;s<c;s++)if(!!o.call(l,a[s],s,a)===n)return[!0,!1,s,a[s]][r]}else for(var u in a)if(B2(a,u)&&!!o.call(l,a[u],u,a)===n)return[!0,!1,u,a[u]][r]}return i}}var Hd=H2,V2=Hd,j2=V2("some",1,0,!0,!1),JS=j2,W2=Hd,G2=W2("every",1,1,!1,!0),QS=G2,z2=Hi;function K2(t,e){if(t){if(t.includes)return t.includes(e);for(var r in t)if(z2(t,r)&&e===t[r])return!0}return!1}var Cu=K2,Gb=mr,zb=Cu;function Y2(t,e){var r,n=0;if(Gb(t)&&Gb(e)){for(r=e.length;n<r;n++)if(!zb(t,e[n]))return!1;return!0}return zb(t,e)}var ew=Y2,Kb=Yr,q2=Cu,X2=li,Z2=Ol;function J2(t,e,r){var n=[];if(e){X2(e)||(e=Z2(e));var i,a={};Kb(t,function(o,l){i=e.call(r,o,l,t),a[i]||(a[i]=1,n.push(o))})}else Kb(t,function(o){q2(n,o)||n.push(o)});return n}var tw=J2,Q2=Ml;function eP(t){return Q2(t,function(e){return e})}var mg=eP,tP=tw,rP=mg;function nP(){for(var t=arguments,e=[],r=0,n=t.length;r<n;r++)e=e.concat(rP(t[r]));return tP(e)}var iP=nP,aP="undefined",ji=aP,oP=ji,sP=Dl,lP=sP(oP),ua=lP,cP=Na,uP=ua;function fP(t){return cP(t)||uP(t)}var Ro=fP,dP=/(.+)?\[(\d+)\]$/,rw=dP;function hP(t){return t?t.splice&&t.join?t:(""+t).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}var gg=hP,pP=rw,vP=gg,mP=Hi,gP=ua,nw=Ro;function yP(t,e,r){if(nw(t))return r;var n=xP(t,e);return gP(n)?r:n}function bP(t,e){var r=e?e.match(pP):"";return r?r[1]?t[r[1]]?t[r[1]][r[2]]:void 0:t[r[2]]:t[e]}function xP(t,e){if(t){var r,n,i,a=0;if(t[e]||mP(t,e))return t[e];if(n=vP(e),i=n.length,i){for(r=t;a<i;a++)if(r=bP(r,n[a]),nw(r))return a===i-1?r:void 0}return r}}var Iu=yP,Yb=Gn,AP=mg,qb=Ml,Xb=mr,EP=li,TP=kl,Zb=ua,SP=Na,wP=Ro,CP=Iu,IP=Ol,_P="asc",RP="desc";function Mv(t,e){return Zb(t)?1:SP(t)?Zb(e)?-1:1:t&&t.localeCompare?t.localeCompare(e):t>e?1:-1}function LP(t,e,r){return function(n,i){var a=n[t],o=i[t];return a===o?r?r(n,i):0:e.order===RP?Mv(o,a):Mv(a,o)}}function DP(t,e,r,n){var i=[];return r=Xb(r)?r:[r],Yb(r,function(a,o){if(a){var l=a,s;Xb(a)?(l=a[0],s=a[1]):TP(a)&&(l=a.field,s=a.order),i.push({field:l,order:s||_P}),Yb(e,EP(l)?function(c,u){c[o]=l.call(n,c.data,u,t)}:function(c){c[o]=l?CP(c.data,l):c.data})}}),i}function OP(t,e,r){if(t){if(wP(e))return AP(t).sort(Mv);for(var n,i=qb(t,function(l){return{data:l}}),a=DP(t,i,e,r),o=a.length-1;o>=0;)n=LP(o,a[o],n),o--;return n&&(i=i.sort(n)),qb(i,IP("data"))}return[]}var yg=OP,kP=yg,MP=kP,FP=MP;function PP(t,e){return t>=e?t:(t=t>>0)+Math.round(Math.random()*((e||9)-t))}var iw=PP,NP=hg,$P=NP("values",0),Fl=$P,BP=iw,UP=Fl;function HP(t){for(var e,r=[],n=UP(t),i=n.length-1;i>=0;i--)e=i>0?BP(0,i):0,r.push(n[e]),n.splice(e,1);return r}var aw=HP,VP=aw;function jP(t,e){var r=VP(t);return arguments.length<=1?r[0]:(e<r.length&&(r.length=e||0),r)}var WP=jP;function GP(t){return function(e){if(e){var r=t(e);if(!isNaN(r))return r}return 0}}var ow=GP,zP=ow,KP=zP(parseFloat),ws=KP,Jb=ws;function YP(t,e,r){var n=[],i=arguments.length;if(t){if(e=i>=2?Jb(e):0,r=i>=3?Jb(r):t.length,t.slice)return t.slice(e,r);for(;e<r;e++)n.push(t[e])}return n}var Cs=YP,qP=Yr;function XP(t,e,r){var n=[];if(t&&e){if(t.filter)return t.filter(e,r);qP(t,function(i,a){e.call(r,i,a,t)&&n.push(i)})}return n}var ZP=XP,JP=Hd,QP=JP("",0,2,!0),eN=QP,tN=Hd,rN=tN("find",1,3,!0),nN=rN,iN=mr,aN=Fl;function oN(t,e,r){if(t){iN(t)||(t=aN(t));for(var n=t.length-1;n>=0;n--)if(e.call(r,t[n],n,t))return t[n]}}var sN=oN,lN=Pa;function cN(t,e,r){if(t){var n,i,a=0,o=null,l=r,s=arguments.length>2,c=lN(t);if(t.length&&t.reduce)return i=function(){return e.apply(o,arguments)},s?t.reduce(i,l):t.reduce(i);for(s&&(a=1,l=t[c[0]]),n=c.length;a<n;a++)l=e.call(o,l,t[c[a]],a,t);return l}}var uN=cN,fN=mr;function dN(t,e,r,n){if(fN(t)&&t.copyWithin)return t.copyWithin(e,r,n);var i,a,o=e>>0,l=r>>0,s=t.length,c=arguments.length>3?n>>0:s;if(o<s&&(o=o>=0?o:s+o,o>=0&&(l=l>=0?l:s+l,c=c>=0?c:s+c,l<c)))for(i=0,a=t.slice(l,c);o<s&&!(a.length<=i);o++)t[o]=a[i++];return t}var hN=dN,pN=mr;function vN(t,e){var r,n=[],i=e>>0||1;if(pN(t))if(i>=0&&t.length>i)for(r=0;r<t.length;)n.push(t.slice(r,r+i)),r+=i;else n=t.length?[t]:t;return n}var mN=vN,gN=Ml,yN=Ol;function bN(t,e){return gN(t,yN(e))}var sw=bN,xN=li,Qb=Ro,AN=Iu,EN=Gn;function TN(t){return function(e,r){if(e&&e.length){var n,i;return EN(e,function(a,o){r&&(a=xN(r)?r(a,o,e):AN(a,r)),!Qb(a)&&(Qb(n)||t(n,a))&&(i=o,n=a)}),e[i]}return n}}var lw=TN,SN=lw,wN=SN(function(t,e){return t<e}),cw=wN,CN=sw,IN=cw;function _N(t){var e,r,n,i=[];if(t&&t.length)for(e=0,r=IN(t,function(a){return a?a.length:0}),n=r?r.length:0;e<n;e++)i.push(CN(t,e));return i}var uw=_N,RN=uw;function LN(){return RN(arguments)}var DN=LN,ON=Fl,kN=Yr;function MN(t,e){var r={};return e=e||[],kN(ON(t),function(n,i){r[n]=e[i]}),r}var FN=MN,fw=mr,PN=Gn;function dw(t,e){var r=[];return PN(t,function(n){r=r.concat(fw(n)?e?dw(n,e):n:[n])}),r}function NN(t,e){return fw(t)?dw(t,e):[]}var $N=NN,BN=Ml,UN=mr;function HN(t,e){for(var r=0,n=e.length;t&&r<n;)t=t[e[r++]];return n&&t?t:0}function VN(t,e){for(var r,n=arguments,i=[],a=[],o=2,l=n.length;o<l;o++)i.push(n[o]);if(UN(e)){for(l=e.length-1,o=0;o<l;o++)a.push(e[o]);e=e[l]}return BN(t,function(s){if(a.length&&(s=HN(s,a)),r=s[e]||e,r&&r.apply)return r.apply(s,i)})}var jN=VN;function WN(t,e){try{delete t[e]}catch{t[e]=void 0}}var hw=WN,GN=mr,zN=vg,KN=XS;function YN(t,e,r){return t&&(GN(t)?zN:KN)(t,e,r)}var pw=YN,qN=Dl,XN=qN("object"),Vd=XN,ZN=hw,JN=kl,QN=Vd,e$=mr,t$=Na,r$=Vi,n$=wu;function i$(t,e,r){if(t){var n,i=arguments.length>1&&(t$(e)||!QN(e)),a=i?r:e;if(JN(t))n$(t,i?function(o,l){t[l]=e}:function(o,l){ZN(t,l)}),a&&r$(t,a);else if(e$(t)){if(i)for(n=t.length;n>0;)n--,t[n]=e;else t.length=0;a&&t.push.apply(t,a)}}return t}var vw=i$,a$=hw,o$=li,s$=mr,l$=Yr,c$=Gn,u$=pw,f$=vw,d$=Ro;function h$(t){return function(e,r){return r===t}}function p$(t,e,r){if(t){if(!d$(e)){var n=[],i=[];return o$(e)||(e=h$(e)),l$(t,function(a,o,l){e.call(r,a,o,l)&&n.push(o)}),s$(t)?u$(n,function(a,o){i.push(t[a]),t.splice(a,1)}):(i={},c$(n,function(a){i[a]=t[a],a$(t,a)})),i}return f$(t)}return t}var mw=p$,v$=Fa,m$=yg,g$=pg,y$=Ro,Fv=Yr,b$=mw,x$=Vi;function A$(t,e){Fv(t,function(r){r[e]&&!r[e].length&&b$(r,e)})}function E$(t,e){var r=x$({},v$.treeOptions,e),n=r.strict,i=r.key,a=r.parentKey,o=r.children,l=r.mapChildren,s=r.sortKey,c=r.reverse,u=r.data,f=[],d={},h={},p,v,g;return s&&(t=m$(g$(t),s),c&&(t=t.reverse())),Fv(t,function(m){p=m[i],h[p]=!0}),Fv(t,function(m){p=m[i],u?(v={},v[u]=m):v=m,g=m[a],d[p]=d[p]||[],d[g]=d[g]||[],d[g].push(v),v[i]=p,v[a]=g,v[o]=d[p],l&&(v[l]=d[p]),(!n||n&&y$(g))&&(h[g]||f.push(v))}),n&&A$(t,o),f}var T$=E$,S$=Fa,w$=Yr,C$=Vi;function gw(t,e,r){var n=r.children,i=r.data,a=r.clear;return w$(e,function(o){var l=o[n];i&&(o=o[i]),t.push(o),l&&l.length&&gw(t,l,r),a&&delete o[n]}),t}function I$(t,e){return gw([],t,C$({},S$.treeOptions,e))}var _$=I$;function R$(t){return function(e,r,n,i){var a=n||{},o=a.children||"children";return t(null,e,r,i,[],[],o,a)}}var jd=R$,L$=jd;function yw(t,e,r,n,i,a,o,l){if(e){var s,c,u,f,d,h;for(c=0,u=e.length;c<u;c++){if(s=e[c],f=i.concat([""+c]),d=a.concat([s]),r.call(n,s,c,e,f,t,d))return{index:c,item:s,path:f,items:e,parent:t,nodes:d};if(o&&s&&(h=yw(s,s[o],r,n,f.concat([o]),d,o),h))return h}}}var D$=L$(yw),O$=D$,k$=jd,M$=Yr;function bw(t,e,r,n,i,a,o,l){var s,c;M$(e,function(u,f){s=i.concat([""+f]),c=a.concat([u]),r.call(n,u,f,e,s,t,c),u&&o&&(s.push(o),bw(u,u[o],r,n,s,c,o))})}var F$=k$(bw),xw=F$,P$=jd,N$=Ml;function Aw(t,e,r,n,i,a,o,l){var s,c,u,f=l.mapChildren||o;return N$(e,function(d,h){return s=i.concat([""+h]),c=a.concat([d]),u=r.call(n,d,h,e,s,t,c),u&&d&&o&&d[o]&&(u[f]=Aw(d,d[o],r,n,s,c,o,l)),u})}var $$=P$(Aw),B$=$$,U$=xw;function H$(t,e,r,n){var i=[];return t&&e&&U$(t,function(a,o,l,s,c,u){e.call(n,a,o,l,s,c,u)&&i.push(a)},r),i}var V$=H$,j$=jd,W$=Gn,G$=Vi;function Ew(t,e,r,n,i,a,o,l,s){var c,u,f,d,h,p=[],v=s.original,g=s.data,m=s.mapChildren||l;return W$(r,function(b,x){c=a.concat([""+x]),u=o.concat([b]),d=t||n.call(i,b,x,r,c,e,u),h=l&&b[l],d||h?(v?f=b:(f=G$({},b),g&&(f[g]=b)),f[m]=Ew(d,b,b[l],n,i,c,u,l,s),(d||f[m].length)&&p.push(f)):d&&p.push(f)}),p}var z$=j$(function(t,e,r,n,i,a,o,l){return Ew(0,t,e,r,n,i,a,o,l)}),K$=z$;function Y$(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(e===t[r])return r}var Tw=Y$;function q$(t,e){if(t.lastIndexOf)return t.lastIndexOf(e);for(var r=t.length-1;r>=0;r--)if(e===t[r])return r;return-1}var Sw=q$,X$=Dl,Z$=X$("number"),fa=Z$,J$=fa;function Q$(t){return J$(t)&&isNaN(t)}var e3=Q$,t3=Dl,r3=t3("string"),$a=r3,n3=Su,i3=n3("Date"),Lo=i3,a3=parseInt,_u=a3;function o3(t){return Date.UTC(t.y,t.M||0,t.d||1,t.H||0,t.m||0,t.s||0,t.S||0)}var s3=o3;function l3(t){return t.getTime()}var Si=l3,Gf=_u,ex=s3,c3=Si,u3=$a,f3=Lo;function Ru(t){return"(\\d{"+t+"})"}function d3(t){return t<10?t*100:t<100?t*10:t}function tx(t){return isNaN(t)?t:Gf(t)}var Fs=Ru(2),qs=Ru("1,2"),ww=Ru("1,7"),Cw=Ru("3,4"),Iw=".{1}",Jl=Iw+qs,_w="(([zZ])|([-+]\\d{2}:?\\d{2}))",rx=[Cw,Jl,Jl,Jl,Jl,Jl,Iw+ww,_w],Pv=[];for(var Vh=rx.length-1;Vh>=0;Vh--){for(var nx="",hs=0;hs<Vh+1;hs++)nx+=rx[hs];Pv.push(new RegExp("^"+nx+"$"))}function h3(t){for(var e,r={},n=0,i=Pv.length;n<i;n++)if(e=t.match(Pv[n]),e){r.y=e[1],r.M=e[2],r.d=e[3],r.H=e[4],r.m=e[5],r.s=e[6],r.S=e[7],r.Z=e[8];break}return r}var ix=[["yyyy",Cw],["yy",Fs],["MM",Fs],["M",qs],["dd",Fs],["d",qs],["HH",Fs],["H",qs],["mm",Fs],["m",qs],["ss",Fs],["s",qs],["SSS",Ru(3)],["S",ww],["Z",_w]],Rw={},Lw=["\\[([^\\]]+)\\]"];for(var hs=0;hs<ix.length;hs++){var jh=ix[hs];Rw[jh[0]]=jh[1]+"?",Lw.push(jh[0])}var p3=new RegExp(Lw.join("|"),"g"),ax={};function v3(t,e){var r=ax[e];if(!r){var n=[],i=e.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(p3,function(u,f){var d=u.charAt(0);return d==="["?f:(n.push(d),Rw[u])});r=ax[e]={_i:n,_r:new RegExp(i)}}var a={},o=t.match(r._r);if(o){for(var l=r._i,s=1,c=o.length;s<c;s++)a[l[s-1]]=o[s];return a}return a}function m3(t){if(/^[zZ]/.test(t.Z))return new Date(ex(t));var e=t.Z.match(/([-+])(\d{2}):?(\d{2})/);return e?new Date(ex(t)-(e[1]==="-"?-1:1)*Gf(e[2])*36e5+Gf(e[3])*6e4):new Date("")}function g3(t,e){if(t){var r=f3(t);if(r||!e&&/^[0-9]{11,15}$/.test(t))return new Date(r?c3(t):Gf(t));if(u3(t)){var n=e?v3(t,e):h3(t);if(n.y)return n.M&&(n.M=tx(n.M)-1),n.S&&(n.S=d3(tx(n.S.substring(0,3)))),n.Z?m3(n):new Date(n.y,n.M||0,n.d||1,n.H||0,n.m||0,n.s||0,n.S||0)}}return new Date("")}var ci=g3;function y3(){return new Date}var Wd=y3,b3=Lo,x3=ci,A3=Wd;function E3(t){var e,r=t?x3(t):A3();return b3(r)?(e=r.getFullYear(),e%4===0&&(e%100!==0||e%400===0)):!1}var Dw=E3,T3=mr,S3=Hi;function w3(t,e,r){if(t){if(T3(t))for(var n=0,i=t.length;n<i&&e.call(r,t[n],n,t)!==!1;n++);else for(var a in t)if(S3(t,a)&&e.call(r,t[a],a,t)===!1)break}}var C3=w3,I3=mr,_3=Hi;function R3(t,e,r){if(t){var n,i;if(I3(t))for(n=t.length-1;n>=0&&e.call(r,t[n],n,t)!==!1;n--);else for(i=_3(t),n=i.length-1;n>=0&&e.call(r,t[i[n]],i[n],t)!==!1;n--);}}var L3=R3,D3=mr,O3=$a,k3=Hi;function M3(t,e){return function(r,n){if(r){if(r[t])return r[t](n);if(O3(r)||D3(r))return e(r,n);for(var i in r)if(k3(r,i)&&n===r[i])return i}return-1}}var Ow=M3,F3=Ow,P3=Tw,N3=F3("indexOf",P3),$3=N3,B3=Ow,U3=Sw,H3=B3("lastIndexOf",U3),kw=H3,V3=mr,j3=$a,W3=Yr;function G3(t){var e=0;return j3(t)||V3(t)?t.length:(W3(t,function(){e++}),e)}var Mw=G3,z3=fa;function K3(t){return z3(t)&&isFinite(t)}var Y3=K3,q3=mr,X3=Na,Z3=function(t){return!X3(t)&&!isNaN(t)&&!q3(t)&&t%1===0},Fw=Z3,J3=mr,Q3=Fw,eB=Na;function tB(t){return!eB(t)&&!isNaN(t)&&!J3(t)&&!Q3(t)}var rB=tB,nB=Dl,iB=nB("boolean"),Pw=iB,aB=Su,oB=aB("RegExp"),bg=oB,sB=Su,lB=sB("Error"),Nw=lB;function cB(t){return t?t.constructor===TypeError:!1}var uB=cB;function fB(t){for(var e in t)return!1;return!0}var $w=fB,dB=ji,hB=typeof Symbol!==dB;function pB(t){return hB&&Symbol.isSymbol?Symbol.isSymbol(t):typeof t=="symbol"}var Bw=pB,vB=Su,mB=vB("Arguments"),gB=mB,yB=$a,bB=fa;function xB(t){return!!(t&&yB(t.nodeName)&&bB(t.nodeType))}var AB=xB,EB=ji,TB=typeof document===EB?0:document,xg=TB,SB=xg;function wB(t){return!!(t&&SB&&t.nodeType===9)}var CB=wB,IB=ji,_B=typeof window===IB?0:window,Uw=_B,RB=Uw;function LB(t){return RB&&!!(t&&t===t.window)}var DB=LB,OB=ji,kB=typeof FormData!==OB;function MB(t){return kB&&t instanceof FormData}var FB=MB,PB=ji,NB=typeof Map!==PB;function $B(t){return NB&&t instanceof Map}var BB=$B,UB=ji,HB=typeof WeakMap!==UB;function VB(t){return HB&&t instanceof WeakMap}var jB=VB,WB=ji,GB=typeof Set!==WB;function zB(t){return GB&&t instanceof Set}var KB=zB,YB=ji,qB=typeof WeakSet!==YB;function XB(t){return qB&&t instanceof WeakSet}var ZB=XB,JB=li,QB=$a,e8=mr,t8=Hi;function r8(t){return function(e,r,n){if(e&&JB(r)){if(e8(e)||QB(e))return t(e,r,n);for(var i in e)if(t8(e,i)&&r.call(n,e[i],i,e))return i}return-1}}var Hw=r8,n8=Hw,i8=n8(function(t,e,r){for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return n;return-1}),Ag=i8,ox=fa,sx=mr,lx=$a,a8=bg,o8=Lo,s8=Pw,l8=ua,cx=Pa,c8=QS;function Vw(t,e,r,n,i,a,o){if(t===e)return!0;if(t&&e&&!ox(t)&&!ox(e)&&!lx(t)&&!lx(e)){if(a8(t))return r(""+t,""+e,i,a,o);if(o8(t)||s8(t))return r(+t,+e,i,a,o);var l,s,c,u=sx(t),f=sx(e);if(u||f?u&&f:t.constructor===e.constructor)return s=cx(t),c=cx(e),n&&(l=n(t,e,i)),s.length===c.length?l8(l)?c8(s,function(d,h){return d===c[h]&&Vw(t[d],e[c[h]],r,n,u||f?h:d,t,e)}):!!l:!1}return r(t,e,i,a,o)}var jw=Vw;function u8(t,e){return t===e}var Ww=u8,f8=jw,d8=Ww;function h8(t,e){return f8(t,e,d8)}var Gw=h8,ux=Pa,p8=Ag,fx=Gw,v8=JS,m8=ew;function g8(t,e){var r=ux(t),n=ux(e);if(n.length){if(m8(r,n))return v8(n,function(i){return p8(r,function(a){return a===i&&fx(t[a],e[i])})>-1})}else return!0;return fx(t,e)}var y8=g8,dx=jw,hx=Ww,b8=li,x8=ua;function A8(t,e,r){return b8(r)?dx(t,e,function(n,i,a,o,l){var s=r(n,i,a,o,l);return x8(s)?hx(n,i):!!s},r):dx(t,e,hx)}var E8=A8,T8=Bw,S8=Lo,w8=mr,C8=bg,I8=Nw,_8=Na;function R8(t){return _8(t)?"null":T8(t)?"symbol":S8(t)?"date":w8(t)?"array":C8(t)?"regexp":I8(t)?"error":typeof t}var L8=R8,D8=0;function O8(t){return[t,++D8].join("")}var k8=O8,M8=Hw,F8=M8(function(t,e,r){for(var n=t.length-1;n>=0;n--)if(e.call(r,t[n],n,t))return n;return-1}),P8=F8,N8=kl,$8=$a;function B8(t){if(N8(t))return t;if($8(t))try{return JSON.parse(t)}catch{}return{}}var U8=B8,H8=Ro;function V8(t){return H8(t)?"":JSON.stringify(t)}var j8=V8,W8=hg,G8=W8("entries",2),z8=G8,K8=li,Y8=mr,q8=Yr,X8=Ag;function Z8(t,e){return function(r,n){var i,a,o={},l=[],s=this,c=arguments,u=c.length;if(!K8(n)){for(a=1;a<u;a++)i=c[a],l.push.apply(l,Y8(i)?i:[i]);n=0}return q8(r,function(f,d){((n?n.call(s,f,d,r):X8(l,function(h){return h===d})>-1)?t:e)&&(o[d]=f)}),o}}var zw=Z8,J8=zw,Q8=J8(1,0),e4=Q8,t4=zw,r4=t4(0,1),n4=r4,i4=Fl;function a4(t){return i4(t)[0]}var o4=a4,s4=Fl;function l4(t){var e=s4(t);return e[e.length-1]}var c4=l4,u4=rw,f4=gg,tf=Hi;function d4(t,e){if(t){if(tf(t,e))return!0;var r,n,i,a,o,l,s=f4(e),c=0,u=s.length;for(o=t;c<u&&(l=!1,r=s[c],a=r?r.match(u4):"",a?(n=a[1],i=a[2],n?o[n]&&tf(o[n],i)&&(l=!0,o=o[n][i]):tf(o,i)&&(l=!0,o=o[i])):tf(o,r)&&(l=!0,o=o[r]),l);c++)if(c===u-1)return!0}return!1}var h4=d4,px=_u,p4=gg,v4=Hi,vx=/(.+)?\[(\d+)\]$/;function m4(t,e,r,n,i){if(t[e])r&&(t[e]=i);else{var a,o,l=e?e.match(vx):null;if(r)o=i;else{var s=n?n.match(vx):null;s&&!s[1]?o=new Array(px(s[2])+1):o={}}return l?l[1]?(a=px(l[2]),t[l[1]]?r?t[l[1]][a]=o:t[l[1]][a]?o=t[l[1]][a]:t[l[1]][a]=o:(t[l[1]]=new Array(a+1),t[l[1]][a]=o)):t[l[2]]=o:t[e]=o,o}return t[e]}function g4(t,e,r){if(t){if((t[e]||v4(t,e))&&!mx(e))t[e]=r;else for(var n=t,i=p4(e),a=i.length,o=0;o<a;o++)if(!mx(i[o])){var l=o===a-1;n=m4(n,i[o],l,l?null:i[o+1],r)}}return t}function mx(t){return t==="__proto__"||t==="constructor"||t==="prototype"}var y4=g4,b4=$w,x4=Vd,A4=li,E4=Ol,T4=Yr;function S4(t){return function(){return b4(t)}}function w4(t,e,r){var n,i={};return t&&(e&&x4(e)?e=S4(e):A4(e)||(e=E4(e)),T4(t,function(a,o){n=e?e.call(r,a,o,t):a,i[n]?i[n].push(a):i[n]=[a]})),i}var Kw=w4,C4=Kw,I4=wu;function _4(t,e,r){var n=C4(t,e,r||this);return I4(n,function(i,a){n[a]=i.length}),n}var R4=_4;function L4(t,e,r){var n,i,a=[],o=arguments;if(o.length<2&&(e=o[0],t=0),n=t>>0,i=e>>0,n<e)for(r=r>>0||1;n<i;n+=r)a.push(n);return a}var D4=L4,gx=Pa,O4=Cs,k4=Cu,M4=Gn,F4=Vi;function P4(t,e){if(t&&e){var r=F4.apply(this,[{}].concat(O4(arguments,1))),n=gx(r);M4(gx(t),function(i){k4(n,i)&&(t[i]=r[i])})}return t}var N4=P4,$4=lw,B4=$4(function(t,e){return t>e}),U4=B4;function H4(t){return(t.split(".")[1]||"").length}var Gd=H4,V4=_u;function j4(t,e){if(t.repeat)return t.repeat(e);var r=isNaN(e)?[]:new Array(V4(e));return r.join(t)+(r.length>0?t:"")}var Lu=j4;function W4(t,e){return t.substring(0,e)+"."+t.substring(e,t.length)}var Yw=W4,rf=Lu,Wh=Yw;function G4(t){var e=""+t,r=e.match(/^([-+]?)((\d+)|((\d+)?[.](\d+)?))e([-+]{1})([0-9]+)$/);if(r){var n=t<0,i=n?"-":"",a=r[3]||"",o=r[5]||"",l=r[6]||"",s=r[7],c=r[8],u=c-l.length,f=c-a.length,d=c-o.length;return s==="+"?a?i+a+rf("0",c):u>0?i+o+l+rf("0",u):i+o+Wh(l,c):a?f>0?i+"0."+rf("0",Math.abs(f))+a:i+Wh(a,f):d>0?i+"0."+rf("0",Math.abs(d))+o+l:i+Wh(o,d)+l}return e}var Do=G4,yx=Gd,bx=Do;function z4(t,e){var r=bx(t),n=bx(e);return parseInt(r.replace(".",""))*parseInt(n.replace(".",""))/Math.pow(10,yx(r)+yx(n))}var qw=z4,K4=qw,xx=ws,Y4=Do;function q4(t){return function(e,r){var n=xx(e),i=n;if(n){r=r>>0;var a=Y4(n),o=a.split("."),l=o[0],s=o[1]||"",c=s.substring(0,r+1),u=l+(c?"."+c:"");if(r>=s.length)return xx(u);if(u=n,r>0){var f=Math.pow(10,r);i=Math[t](K4(u,f))/f}else i=Math[t](u)}return i}}var Eg=q4,X4=Eg,Z4=X4("round"),Tg=Z4,J4=Eg,Q4=J4("ceil"),Xw=Q4,e6=Eg,t6=e6("floor"),Zw=t6,r6=Ro,n6=fa,i6=Do;function a6(t){return n6(t)?i6(t):""+(r6(t)?"":t)}var zn=a6,o6=Tg,s6=zn,l6=Lu,c6=Yw;function u6(t,e){e=e>>0;var r=s6(o6(t,e)),n=r.split("."),i=n[0],a=n[1]||"",o=e-a.length;return e?o>0?i+"."+a+l6("0",o):i+c6(a,Math.abs(o)):i}var Sg=u6,f6=Fa,d6=Tg,h6=Xw,p6=Zw,v6=fa,m6=zn,g6=Sg,y6=Do,b6=Vi;function x6(t,e){var r=b6({},f6.commafyOptions,e),n=r.digits,i=v6(t),a,o,l,s,c;return i?(a=(r.ceil?h6:r.floor?p6:d6)(t,n),o=y6(n?g6(a,n):a).split("."),s=o[0],c=o[1],l=s&&a<0,l&&(s=s.substring(1,s.length))):(a=m6(t).replace(/,/g,""),o=a?[a]:[],s=o[0]),o.length?(l?"-":"")+s.replace(new RegExp("(?=(?!(\\b))(.{"+(r.spaceNumber||3)+"})+$)","g"),r.separator||",")+(c?"."+c:""):a}var A6=x6,E6=_u,T6=ow,S6=T6(E6),w6=S6,C6=qw,Ax=ws;function I6(t,e){var r=Ax(t),n=Ax(e);return C6(r,n)}var wg=I6,Ex=Gd,Tx=Do,Sx=wg;function _6(t,e){var r=Tx(t),n=Tx(e),i=Math.pow(10,Math.max(Ex(r),Ex(n)));return(Sx(t,i)+Sx(e,i))/i}var Jw=_6,R6=Jw,wx=ws;function L6(t,e){return R6(wx(t),wx(e))}var D6=L6,Cx=Gd,Ix=Do,_x=ws,O6=Sg;function k6(t,e){var r=_x(t),n=_x(e),i=Ix(r),a=Ix(n),o=Cx(i),l=Cx(a),s=Math.pow(10,Math.max(o,l)),c=o>=l?o:l;return parseFloat(O6((r*s-n*s)/s,c))}var M6=k6,Rx=Gd,Lx=Do,F6=wg;function P6(t,e){var r=Lx(t),n=Lx(e),i=Rx(r),a=Rx(n),o=a-i,l=o<0,s=Math.pow(10,l?Math.abs(o):o);return F6(r.replace(".","")/n.replace(".",""),l?1/s:s)}var Qw=P6,N6=Qw,Dx=ws;function $6(t,e){return N6(Dx(t),Dx(e))}var B6=$6,Gh=Jw,U6=li,H6=Yr,V6=Iu;function j6(t,e,r){var n=0;return H6(t,e?U6(e)?function(){n=Gh(n,e.apply(r,arguments))}:function(i){n=Gh(n,V6(i,e))}:function(i){n=Gh(n,i)}),n}var eC=j6,W6=Qw,G6=Mw,z6=eC;function K6(t,e,r){return W6(z6(t,e,r),G6(t))}var Y6=K6,q6="first",Du=q6,X6="last",zd=X6;function Z6(t){return t.getFullYear()}var Ou=Z6,J6=864e5,ku=J6;function Q6(t){return t.getMonth()}var Kd=Q6,e5=Lo,t5=Si;function r5(t){return e5(t)&&!isNaN(t5(t))}var wi=r5,Ox=Du,n5=zd,i5=ku,a5=Ou,kx=Si,Mx=Kd,o5=ci,s5=wi,l5=fa;function tC(t,e,r){var n=e&&!isNaN(e)?e:0;if(t=o5(t),s5(t)){if(r===Ox)return new Date(a5(t),Mx(t)+n,1);if(r===n5)return new Date(kx(tC(t,n+1,Ox))-1);if(l5(r)&&t.setDate(r),n){var i=t.getDate();if(t.setMonth(Mx(t)+n),i!==t.getDate())return t.setDate(1),new Date(kx(t)-i5)}}return t}var Mu=tC,c5=Du,Fx=zd,Px=Ou,u5=Mu,f5=ci,d5=wi;function h5(t,e,r){var n;if(t=f5(t),d5(t)&&(e&&(n=e&&!isNaN(e)?e:0,t.setFullYear(Px(t)+n)),r||!isNaN(r))){if(r===c5)return new Date(Px(t),0,1);if(r===Fx)return t.setMonth(11),u5(t,0,Fx);t.setMonth(r)}return t}var Yd=h5,p5=Mu,v5=ci,m5=wi;function g5(t){var e=t.getMonth();return e<3?1:e<6?2:e<9?3:4}function y5(t,e,r){var n,i=e&&!isNaN(e)?e*3:0;return t=v5(t),m5(t)?(n=(g5(t)-1)*3,t.setMonth(n),p5(t,i,r)):t}var b5=y5,Nx=Du,x5=zd,A5=_u,E5=Ou,T5=Kd,S5=Si,w5=ci,C5=wi;function rC(t,e,r){if(t=w5(t),C5(t)&&!isNaN(e)){if(t.setDate(t.getDate()+A5(e)),r===Nx)return new Date(E5(t),T5(t),t.getDate());if(r===x5)return new Date(S5(rC(t,1,Nx))-1)}return t}var nC=rC;function I5(t){return t.toUpperCase()}var iC=I5,_5=ku,R5=_5*7,aC=R5,L5=Fa,zh=ku,D5=aC,O5=Si,k5=ci,M5=wi,$x=fa;function F5(t,e,r,n){if(t=k5(t),M5(t)){var i=$x(r),a=$x(n),o=O5(t);if(i||a){var l=a?n:L5.firstDayOfWeek,s=t.getDay(),c=i?r:s;if(s!==c){var u=0;l>s?u=-(7-l+s):l<s&&(u=l-s),c>l?o+=((c===0?7:c)-l+u)*zh:c<l?o+=(7-l+c+u)*zh:o+=u*zh}}return e&&!isNaN(e)&&(o+=e*D5),new Date(o)}return t}var oC=F5,P5=Fa,N5=aC,$5=fa,B5=wi,U5=oC,Bx=Si;function H5(t){return function(e,r){var n=$5(r)?r:P5.firstDayOfWeek,i=U5(e,0,n,n);if(B5(i)){var a=new Date(i.getFullYear(),i.getMonth(),i.getDate()),o=t(i),l=o.getDay();return l>n&&o.setDate(7-l+n+1),l<n&&o.setDate(n-l+1),Math.floor((Bx(a)-Bx(o))/N5+1)}return NaN}}var sC=H5,V5=sC,j5=V5(function(t){return new Date(t.getFullYear(),0,1)}),lC=j5,W5=Ou,G5=Kd;function z5(t){return new Date(W5(t),G5(t),t.getDate())}var K5=z5,Y5=Si,q5=K5;function X5(t){return Y5(q5(t))}var Z5=X5,J5=ku,Q5=Du,Ux=Z5,eU=Yd,tU=ci,rU=wi;function nU(t){return t=tU(t),rU(t)?Math.floor((Ux(t)-Ux(eU(t,0,Q5)))/J5)+1:NaN}var cC=nU,iU=zn,aU=ua,oU=Lu;function sU(t,e,r){var n=iU(t);return e=e>>0,r=aU(r)?" ":""+r,n.padStart?n.padStart(e,r):e>n.length?(e-=n.length,e>r.length&&(r+=oU(r,e/r.length)),r.slice(0,e)+n):n}var uC=sU,Ql=Fa,lU=iC,cU=Ou,Hx=Kd,uU=ci,fU=lC,dU=cC,hU=Vi,pU=wi,vU=li,Zi=uC;function qa(t,e,r,n){var i=e[r];return i?vU(i)?i(n,r,t):i[n]:n}var mU=/\[([^\]]+)]|y{2,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|S{1,3}|Z{1,2}|W{1,2}|D{1,3}|[aAeEq]/g;function gU(t,e,r){if(t){if(t=uU(t),pU(t)){var n=e||Ql.parseDateFormat||Ql.formatString,i=t.getHours(),a=i<12?"am":"pm",o=hU({},Ql.parseDateRules||Ql.formatStringMatchs,r?r.formats:null),l=function(x,T){return(""+cU(t)).substr(4-T)},s=function(x,T){return Zi(Hx(t)+1,T,"0")},c=function(x,T){return Zi(t.getDate(),T,"0")},u=function(x,T){return Zi(i,T,"0")},f=function(x,T){return Zi(i<=12?i:i-12,T,"0")},d=function(x,T){return Zi(t.getMinutes(),T,"0")},h=function(x,T){return Zi(t.getSeconds(),T,"0")},p=function(x,T){return Zi(t.getMilliseconds(),T,"0")},v=function(x,T){var A=t.getTimezoneOffset()/60*-1;return qa(t,o,x,(A>=0?"+":"-")+Zi(A,2,"0")+(T===1?":":"")+"00")},g=function(x,T){return Zi(qa(t,o,x,fU(t,(r?r.firstDay:null)||Ql.firstDayOfWeek)),T,"0")},m=function(x,T){return Zi(qa(t,o,x,dU(t)),T,"0")},b={yyyy:l,yy:l,MM:s,M:s,dd:c,d:c,HH:u,H:u,hh:f,h:f,mm:d,m:d,ss:h,s:h,SSS:p,S:p,ZZ:v,Z:v,WW:g,W:g,DDD:m,D:m,a:function(x){return qa(t,o,x,a)},A:function(x){return qa(t,o,x,lU(a))},e:function(x){return qa(t,o,x,t.getDay())},E:function(x){return qa(t,o,x,t.getDay())},q:function(x){return qa(t,o,x,Math.floor((Hx(t)+3)/3))}};return n.replace(mU,function(x,T){return T||(b[x]?b[x](x,x.length):x)})}return"Invalid Date"}return""}var fC=gU,yU=Si,bU=Wd,xU=Date.now||function(){return yU(bU())},dC=xU,AU=Si,EU=dC,TU=ci,SU=Lo,wU=function(t,e){if(t){var r=TU(t,e);return SU(r)?AU(r):r}return EU()},CU=wU,Vx=fC;function IU(t,e,r){return t&&e?(t=Vx(t,r),t!=="Invalid Date"&&t===Vx(e,r)):!1}var _U=IU,RU=sC,LU=RU(function(t){return new Date(t.getFullYear(),t.getMonth(),1)}),DU=LU,OU=Yd,kU=ci,MU=wi,FU=Dw;function PU(t,e){return t=kU(t),MU(t)?FU(OU(t,e))?366:365:NaN}var NU=PU,$U=ku,BU=Du,UU=zd,jx=Si,Wx=Mu,HU=ci,VU=wi;function jU(t,e){return t=HU(t),VU(t)?Math.floor((jx(Wx(t,e,UU))-jx(Wx(t,e,BU)))/$U)+1:NaN}var WU=jU,Gx=Si,GU=Wd,zx=ci,Kx=wi,Yx=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function zU(t,e){var r,n,i,a,o,l,s={done:!1,time:0};if(t=zx(t),e=e?zx(e):GU(),Kx(t)&&Kx(e)&&(r=Gx(t),n=Gx(e),r<n))for(a=s.time=n-r,s.done=!0,l=0,o=Yx.length;l<o;l++)i=Yx[l],a>=i[1]?l===o-1?s[i[0]]=a||0:(s[i[0]]=Math.floor(a/i[1]),a-=s[i[0]]*i[1]):s[i[0]]=0;return s}var KU=zU,YU=zn,qU=ua,XU=Lu;function ZU(t,e,r){var n=YU(t);return e=e>>0,r=qU(r)?" ":""+r,n.padEnd?n.padEnd(e,r):e>n.length?(e-=n.length,e>r.length&&(r+=XU(r,e/r.length)),n+r.slice(0,e)):n}var JU=ZU,QU=zn,eH=Lu;function tH(t,e){return eH(QU(t),e)}var rH=tH,nH=zn;function iH(t){return t&&t.trimRight?t.trimRight():nH(t).replace(/[\s\uFEFF\xA0]+$/g,"")}var hC=iH,aH=zn;function oH(t){return t&&t.trimLeft?t.trimLeft():aH(t).replace(/^[\s\uFEFF\xA0]+/g,"")}var pC=oH,sH=hC,lH=pC;function cH(t){return t&&t.trim?t.trim():sH(lH(t))}var vC=cH,uH={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},mC=uH,fH=zn,dH=Pa;function hH(t){var e=new RegExp("(?:"+dH(t).join("|")+")","g");return function(r){return fH(r).replace(e,function(n){return t[n]})}}var gC=hH,pH=mC,vH=gC,mH=vH(pH),gH=mH,qx=mC,yH=gC,bH=Yr,yC={};bH(qx,function(t,e){yC[qx[e]]=e});var xH=yH(yC),AH=xH;function EH(t,e,r){return t.substring(e,r)}var bC=EH;function TH(t){return t.toLowerCase()}var xC=TH,SH=zn,Xa=bC,ec=iC,wH=xC,Kh={};function CH(t){if(t=SH(t),Kh[t])return Kh[t];var e=t.length,r=t.replace(/([-]+)/g,function(n,i,a){return a&&a+i.length<e?"-":""});return e=r.length,r=r.replace(/([A-Z]+)/g,function(n,i,a){var o=i.length;return i=wH(i),a?o>2&&a+o<e?ec(Xa(i,0,1))+Xa(i,1,o-1)+ec(Xa(i,o-1,o)):ec(Xa(i,0,1))+Xa(i,1,o):o>1&&a+o<e?Xa(i,0,o-1)+ec(Xa(i,o-1,o)):i}).replace(/(-[a-zA-Z])/g,function(n,i){return ec(Xa(i,1,i.length))}),Kh[t]=r,r}var IH=CH,_H=zn,Ps=bC,Za=xC,Yh={};function RH(t){if(t=_H(t),Yh[t])return Yh[t];if(/^[A-Z]+$/.test(t))return Za(t);var e=t.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(r,n,i,a){var o=i.length;return o>1?n+"-"+Za(Ps(i,0,o-1))+"-"+Za(Ps(i,o-1,o))+a:Za(n+"-"+i+a)}).replace(/^([A-Z]+)([a-z]+)?$/,function(r,n,i){var a=n.length;return Za(Ps(n,0,a-1)+"-"+Ps(n,a-1,a)+(i||""))}).replace(/([a-z]?)([A-Z]+)([a-z]?)/g,function(r,n,i,a,o){var l=i.length;return l>1&&(n&&(n+="-"),a)?(n||"")+Za(Ps(i,0,l-1))+"-"+Za(Ps(i,l-1,l))+a:(n||"")+(o?"-":"")+Za(i)+(a||"")});return e=e.replace(/([-]+)/g,function(r,n,i){return i&&i+n.length<e.length?"-":""}),Yh[t]=e,e}var LH=RH,DH=zn;function OH(t,e,r){var n=DH(t);return(arguments.length===1?n:n.substring(r)).indexOf(e)===0}var kH=OH,MH=zn;function FH(t,e,r){var n=MH(t),i=arguments.length;return i>1&&(i>2?n.substring(0,r).indexOf(e)===r-1:n.indexOf(e)===n.length-1)}var PH=FH,NH=Fa,$H=zn,BH=vC,UH=Iu;function HH(t,e,r){return $H(t).replace((r||NH).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(n,i){return UH(e,BH(i))})}var AC=HH,VH=AC;function jH(t,e){return VH(t,e,{tmplRE:/\{([.\w[\]\s]+)\}/g})}var WH=jH;function GH(){}var zH=GH,Xx=Cs;function KH(t,e){var r=Xx(arguments,2);return function(){return t.apply(e,Xx(arguments).concat(r))}}var YH=KH,Zx=Cs;function qH(t,e){var r=!1,n=null,i=Zx(arguments,2);return function(){return r||(n=t.apply(e,Zx(arguments).concat(i)),r=!0),n}}var XH=qH,ZH=Cs;function JH(t,e,r){var n=0,i=[];return function(){var a=arguments;n++,n<=t&&i.push(a[0]),n>=t&&e.apply(r,[i].concat(ZH(a)))}}var QH=JH,eV=Cs;function tV(t,e,r){var n=0,i=[];return r=r||this,function(){var a=arguments;n++,n<t&&(i.push(a[0]),e.apply(r,[i].concat(eV(a))))}}var rV=tV;function nV(t,e,r){var n,i,a=r||{},o=!1,l=0,s="leading"in a?a.leading:!0,c="trailing"in a?a.trailing:!1,u=function(){o=!0,t.apply(i,n),l=setTimeout(f,e)},f=function(){l=0,!o&&c===!0&&u()},d=function(){var p=l!==0;return clearTimeout(l),n=null,i=null,o=!1,l=0,p},h=function(){n=arguments,i=this,o=!1,l===0&&(s===!0?u():c===!0&&(l=setTimeout(f,e)))};return h.cancel=d,h}var iV=nV;function aV(t,e,r){var n,i,a=r||{},o=!1,l=0,s=typeof r=="boolean",c="leading"in a?a.leading:s,u="trailing"in a?a.trailing:!s,f=function(){o=!0,l=0,t.apply(i,n)},d=function(){c===!0&&(l=0),!o&&u===!0&&f()},h=function(){var v=l!==0;return clearTimeout(l),n=null,i=null,l=0,v},p=function(){o=!1,n=arguments,i=this,l===0?c===!0&&f():clearTimeout(l),l=setTimeout(d,e)};return p.cancel=h,p}var oV=aV,sV=Cs;function lV(t,e){var r=sV(arguments,2),n=this;return setTimeout(function(){t.apply(n,r)},e)}var cV=lV,uV=decodeURIComponent,EC=uV,Jx=EC,fV=Gn,dV=$a;function hV(t){var e,r={};return t&&dV(t)&&fV(t.split("&"),function(n){e=n.split("="),r[Jx(e[0])]=Jx(e[1]||"")}),r}var TC=hV,pV=encodeURIComponent,SC=pV,zf=SC,wC=Yr,CC=mr,IC=Na,vV=ua,_C=kl;function RC(t,e,r){var n,i=[];return wC(t,function(a,o){n=CC(a),_C(a)||n?i=i.concat(RC(a,e+"["+o+"]",n)):i.push(zf(e+"["+(r?"":o)+"]")+"="+zf(IC(a)?"":a))}),i}function mV(t){var e,r=[];return wC(t,function(n,i){vV(n)||(e=CC(n),_C(n)||e?r=r.concat(RC(n,i,e)):r.push(zf(i)+"="+zf(IC(n)?"":n)))}),r.join("&").replace(/%20/g,"+")}var gV=mV,yV=ji,bV=typeof location===yV?0:location,qd=bV,nf=qd;function xV(){return nf?nf.origin||nf.protocol+"//"+nf.host:""}var LC=xV,Qx=qd,AV=TC,EV=LC;function eA(t){return AV(t.split("?")[1]||"")}function TV(t){var e,r,n,i,a=""+t;return a.indexOf("//")===0?a=(Qx?Qx.protocol:"")+a:a.indexOf("/")===0&&(a=EV()+a),n=a.replace(/#.*/,"").match(/(\?.*)/),i={href:a,hash:"",host:"",hostname:"",protocol:"",port:"",search:n&&n[1]&&n[1].length>1?n[1]:""},i.path=a.replace(/^([a-z0-9.+-]*:)\/\//,function(o,l){return i.protocol=l,""}).replace(/^([a-z0-9.+-]*)(:\d+)?\/?/,function(o,l,s){return r=s||"",i.port=r.replace(":",""),i.hostname=l,i.host=l+r,"/"}).replace(/(#.*)/,function(o,l){return i.hash=l.length>1?l:"",""}),e=i.hash.match(/#((.*)\?|(.*))/),i.pathname=i.path.replace(/(\?|#.*).*/,""),i.origin=i.protocol+"//"+i.host,i.hashKey=e&&(e[2]||e[1])||"",i.hashQuery=eA(i.hash),i.searchQuery=eA(i.search),i}var DC=TV,tA=qd,SV=LC,wV=kw;function CV(){if(tA){var t=tA.pathname,e=wV(t,"/")+1;return SV()+(e===t.length?t:t.substring(0,e))}return""}var IV=CV,rA=qd,_V=DC;function RV(){return rA?_V(rA.href):{}}var LV=RV,OC=Fa,qh=xg,nA=EC,iA=SC,DV=mr,aA=Vd,kC=Lo,OV=ua,kV=Cu,MV=Pa,Kf=Vi,Xh=Gn,FV=Wd,af=Si,PV=Yd,NV=Mu,$V=nC;function oA(t,e){var r=parseFloat(e),n=FV(),i=af(n);switch(t){case"y":return af(PV(n,r));case"M":return af(NV(n,r));case"d":return af($V(n,r));case"h":case"H":return i+r*60*60*1e3;case"m":return i+r*60*1e3;case"s":return i+r*1e3}return i}function Zh(t){return(kC(t)?t:new Date(t)).toUTCString()}function wo(t,e,r){if(qh){var n,i,a,o,l,s,c=[],u=arguments;return DV(t)?c=t:u.length>1?c=[Kf({name:t,value:e},r)]:aA(t)&&(c=[t]),c.length>0?(Xh(c,function(f){n=Kf({},OC.cookies,f),a=[],n.name&&(i=n.expires,a.push(iA(n.name)+"="+iA(aA(n.value)?JSON.stringify(n.value):n.value)),i&&(isNaN(i)?i=i.replace(/^([0-9]+)(y|M|d|H|h|m|s)$/,function(d,h,p){return Zh(oA(p,h))}):/^[0-9]{11,13}$/.test(i)||kC(i)?i=Zh(i):i=Zh(oA("d",i)),n.expires=i),Xh(["expires","path","domain","secure"],function(d){OV(n[d])||a.push(n[d]&&d==="secure"?d:d+"="+n[d])})),qh.cookie=a.join("; ")}),!0):(o={},l=qh.cookie,l&&Xh(l.split("; "),function(f){s=f.indexOf("="),o[nA(f.substring(0,s))]=nA(f.substring(s+1)||"")}),u.length===1?o[t]:o)}return!1}function BV(t){return kV(MC(),t)}function sA(t){return wo(t)}function lA(t,e,r){return wo(t,e,r),wo}function cA(t,e){wo(t,"",Kf({expires:-1},OC.cookies,e))}function MC(){return MV(wo())}function UV(){return wo()}Kf(wo,{has:BV,set:lA,setItem:lA,get:sA,getItem:sA,remove:cA,removeItem:cA,keys:MC,getJSON:UV});var HV=wo,VV=ji,Jh=xg,Qh=Uw,jV=Vi,WV=Gn;function uA(t){try{var e="__xe_t";return t.setItem(e,1),t.removeItem(e),!0}catch{return!1}}function of(t){return navigator.userAgent.indexOf(t)>-1}function GV(){var t,e,r,n=!1,i=!1,a=!1,o={isNode:!1,isMobile:n,isPC:!1,isDoc:!!Jh};if(!Qh&&typeof process!==VV)o.isNode=!0;else{r=of("Edge"),e=of("Chrome"),n=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),o.isDoc&&(t=Jh.body||Jh.documentElement,WV(["webkit","khtml","moz","ms","o"],function(l){o["-"+l]=!!t[l+"MatchesSelector"]}));try{i=uA(Qh.localStorage)}catch{}try{a=uA(Qh.sessionStorage)}catch{}jV(o,{edge:r,firefox:of("Firefox"),msie:!r&&o["-ms"],safari:!e&&!r&&of("Safari"),isMobile:n,isPC:!n,isLocalStorage:i,isSessionStorage:a})}return o}var zV=GV,FC=x2,fA=Vi,KV=wu,YV=XS,qV=O2,XV=P2,ZV=Ml,JV=JS,QV=QS,ej=ew,tj=Gn,rj=vg,nj=tw,ij=iP,aj=mg,oj=FP,sj=yg,lj=aw,cj=WP,uj=Cs,fj=ZP,dj=eN,hj=Cu,pj=nN,vj=sN,mj=uN,gj=hN,yj=mN,bj=DN,xj=uw,Aj=FN,Ej=$N,Tj=sw,Sj=jN,wj=T$,Cj=_$,Ij=O$,_j=xw,Rj=B$,Lj=V$,Dj=K$,Oj=Tw,kj=Sw,Mj=Hi,Fj=mr,Pj=Na,Nj=e3,$j=ua,Bj=li,Uj=Vd,Hj=$a,Vj=kl,jj=Dw,Wj=Lo,Gj=Ro,zj=Yr,Kj=C3,Yj=L3,qj=$3,Xj=kw,Zj=Pa,Jj=Fl,Qj=pg,eW=Mw,tW=pw,rW=mw,nW=vw,iW=Y3,aW=rB,oW=Fw,sW=Pw,lW=fa,cW=bg,uW=Nw,fW=uB,dW=$w,hW=Bw,pW=gB,vW=AB,mW=CB,gW=DB,yW=FB,bW=BB,xW=jB,AW=KB,EW=ZB,TW=y8,SW=Gw,wW=E8,CW=L8,IW=k8,_W=Ag,RW=P8,LW=U8,DW=j8,OW=z8,kW=e4,MW=n4,FW=o4,PW=c4,NW=h4,$W=Iu,BW=y4,UW=Kw,HW=R4,VW=D4,jW=N4,WW=iw,GW=cw,zW=U4,KW=A6,YW=Tg,qW=Xw,XW=Zw,ZW=Sg,JW=w6,QW=ws,e9=Do,t9=D6,r9=M6,n9=wg,i9=B6,a9=eC,o9=Y6,s9=Yd,l9=b5,c9=Mu,u9=nC,f9=ci,d9=fC,h9=dC,p9=CU,v9=wi,m9=_U,g9=oC,y9=cC,b9=lC,x9=DU,A9=NU,E9=WU,T9=KU,S9=JU,w9=uC,C9=rH,I9=vC,_9=hC,R9=pC,L9=gH,D9=AH,O9=IH,k9=LH,M9=kH,F9=PH,P9=AC,N9=WH,dA=zn,$9=zH,B9=Ol,U9=YH,H9=XH,V9=QH,j9=rV,W9=iV,G9=oV,z9=cV,K9=TC,Y9=gV,q9=DC,X9=IV,Z9=LV,J9=HV,Q9=zV;fA(FC,{assign:fA,objectEach:KV,lastObjectEach:YV,objectMap:qV,merge:XV,uniq:nj,union:ij,sortBy:oj,orderBy:sj,shuffle:lj,sample:cj,some:JV,every:QV,slice:uj,filter:fj,find:pj,findLast:vj,findKey:dj,includes:hj,arrayIndexOf:Oj,arrayLastIndexOf:kj,map:ZV,reduce:mj,copyWithin:gj,chunk:yj,zip:bj,unzip:xj,zipObject:Aj,flatten:Ej,toArray:aj,includeArrays:ej,pluck:Tj,invoke:Sj,arrayEach:tj,lastArrayEach:rj,toArrayTree:wj,toTreeArray:Cj,findTree:Ij,eachTree:_j,mapTree:Rj,filterTree:Lj,searchTree:Dj,hasOwnProp:Mj,eqNull:Gj,isNaN:Nj,isFinite:iW,isUndefined:$j,isArray:Fj,isFloat:aW,isInteger:oW,isFunction:Bj,isBoolean:sW,isString:Hj,isNumber:lW,isRegExp:cW,isObject:Uj,isPlainObject:Vj,isDate:Wj,isError:uW,isTypeError:fW,isEmpty:dW,isNull:Pj,isSymbol:hW,isArguments:pW,isElement:vW,isDocument:mW,isWindow:gW,isFormData:yW,isMap:bW,isWeakMap:xW,isSet:AW,isWeakSet:EW,isLeapYear:jj,isMatch:TW,isEqual:SW,isEqualWith:wW,getType:CW,uniqueId:IW,getSize:eW,indexOf:qj,lastIndexOf:Xj,findIndexOf:_W,findLastIndexOf:RW,toStringJSON:LW,toJSONString:DW,keys:Zj,values:Jj,entries:OW,pick:kW,omit:MW,first:FW,last:PW,each:zj,forOf:Kj,lastForOf:Yj,lastEach:tW,has:NW,get:$W,set:BW,groupBy:UW,countBy:HW,clone:Qj,clear:nW,remove:rW,range:VW,destructuring:jW,random:WW,min:zW,max:GW,commafy:KW,round:YW,ceil:qW,floor:XW,toFixed:ZW,toNumber:QW,toNumberString:e9,toInteger:JW,add:t9,subtract:r9,multiply:n9,divide:i9,sum:a9,mean:o9,now:h9,timestamp:p9,isValidDate:v9,isDateSame:m9,toStringDate:f9,toDateString:d9,getWhatYear:s9,getWhatQuarter:l9,getWhatMonth:c9,getWhatWeek:g9,getWhatDay:u9,getYearDay:y9,getYearWeek:b9,getMonthWeek:x9,getDayOfYear:A9,getDayOfMonth:E9,getDateDiff:T9,trim:I9,trimLeft:R9,trimRight:_9,escape:L9,unescape:D9,camelCase:O9,kebabCase:k9,repeat:C9,padStart:w9,padEnd:S9,startsWith:M9,endsWith:F9,template:P9,toFormatString:N9,toString:dA,toValueString:dA,noop:$9,property:B9,bind:U9,once:H9,after:V9,before:j9,throttle:W9,debounce:G9,delay:z9,unserialize:K9,serialize:Y9,parseUrl:q9,getBaseURL:X9,locat:Z9,browse:Q9,cookie:J9});var e7=FC;const E=dg(e7);var pt="vxe-icon-",H={size:null,zIndex:999,version:0,emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,minHeight:144,resizeConfig:{refreshDelay:250},radioConfig:{strict:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,message:"inline",msgMode:"single"},columnConfig:{maxFixedSize:4},sortConfig:{showIcon:!0},filterConfig:{showIcon:!0},treeConfig:{rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0},editConfig:{showIcon:!0,showAsterisk:!0},importConfig:{modes:["insert","covering"]},exportConfig:{modes:["current","selected"]},printConfig:{modes:["current","selected"]},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{selectCellByHeader:!0},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},scrollX:{gt:60},scrollY:{gt:100}},export:{types:{}},icon:{LOADING:pt+"spinner roll vxe-loading--default-icon",TABLE_SORT_ASC:pt+"caret-up",TABLE_SORT_DESC:pt+"caret-down",TABLE_FILTER_NONE:pt+"funnel",TABLE_FILTER_MATCH:pt+"funnel",TABLE_EDIT:pt+"edit",TABLE_HELP:pt+"question-circle-fill",TABLE_TREE_LOADED:pt+"spinner roll",TABLE_TREE_OPEN:pt+"caret-right rotate90",TABLE_TREE_CLOSE:pt+"caret-right",TABLE_EXPAND_LOADED:pt+"spinner roll",TABLE_EXPAND_OPEN:pt+"arrow-right rotate90",TABLE_EXPAND_CLOSE:pt+"arrow-right",TABLE_CHECKBOX_CHECKED:pt+"checkbox-checked",TABLE_CHECKBOX_UNCHECKED:pt+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:pt+"checkbox-indeterminate",TABLE_RADIO_CHECKED:pt+"radio-checked",TABLE_RADIO_UNCHECKED:pt+"radio-unchecked",BUTTON_DROPDOWN:pt+"arrow-down",BUTTON_LOADING:pt+"spinner roll",SELECT_LOADED:pt+"spinner roll",SELECT_OPEN:pt+"caret-down rotate180",SELECT_CLOSE:pt+"caret-down",PAGER_JUMP_PREV:pt+"arrow-double-left",PAGER_JUMP_NEXT:pt+"arrow-double-right",PAGER_PREV_PAGE:pt+"arrow-left",PAGER_NEXT_PAGE:pt+"arrow-right",PAGER_JUMP_MORE:pt+"ellipsis-h",INPUT_CLEAR:pt+"error-circle-fill",INPUT_PWD:pt+"eye-fill",INPUT_SHOW_PWD:pt+"eye-fill-close",INPUT_PREV_NUM:pt+"caret-up",INPUT_NEXT_NUM:pt+"caret-down",INPUT_DATE:pt+"calendar",INPUT_SEARCH:pt+"search",MODAL_ZOOM_IN:pt+"square",MODAL_ZOOM_OUT:pt+"maximize",MODAL_CLOSE:pt+"close",MODAL_INFO:pt+"info-circle-fill",MODAL_SUCCESS:pt+"success-circle-fill",MODAL_WARNING:pt+"warnion-circle-fill",MODAL_ERROR:pt+"error-circle-fill",MODAL_QUESTION:pt+"question-circle-fill",MODAL_LOADING:pt+"spinner roll",TOOLBAR_TOOLS_REFRESH:pt+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:pt+"repeat roll",TOOLBAR_TOOLS_IMPORT:pt+"upload",TOOLBAR_TOOLS_EXPORT:pt+"download",TOOLBAR_TOOLS_PRINT:pt+"print",TOOLBAR_TOOLS_FULLSCREEN:pt+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:pt+"minimize",TOOLBAR_TOOLS_CUSTOM:pt+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:pt+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED:pt+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:pt+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED:pt+"fixed-right-fill",FORM_PREFIX:pt+"question-circle-fill",FORM_SUFFIX:pt+"question-circle-fill",FORM_FOLDING:pt+"arrow-up rotate180",FORM_UNFOLDING:pt+"arrow-up"},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,message:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300},pager:{},form:{validConfig:{showMessage:!0,autoPos:!0},tooltipConfig:{enterable:!0},titleAsterisk:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},textarea:{},select:{multiCharOverflow:8},toolbar:{custom:{allowFixed:!0,showFooter:!0}},button:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},checkbox:{},switch:{},modal:{top:15,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,draggable:!0,storageKey:"VXE_MODAL_POSITION"},list:{scrollY:{enabled:!0,gt:100}},i18n:function(t){return t}};function Cg(t,e){return"[vxe-table v".concat("4.5.10","] ").concat(H.i18n(t,e))}function PC(t){return function(e,r){var n=Cg(e,r);return console[t](n),n}}var t7=PC("warn"),jr=PC("error"),tc={},wc={mixin:function(t){return E.each(t,function(e,r){return wc.add(r,e)}),wc},get:function(t){return tc[t]||[]},add:function(t,e){if(e){var r=tc[t];r||(r=tc[t]=[]),r.push(e)}return wc},delete:function(t,e){var r=tc[t];r&&(e?E.remove(r,function(n){return n===e}):delete tc[t])}},r7=function(){function t(){this.store={}}return t.prototype.mixin=function(e){var r=this;return E.each(e,function(n,i){r.add(i,n)}),this},t.prototype.has=function(e){return!!this.get(e)},t.prototype.get=function(e){return this.store[e]},t.prototype.add=function(e,r){var n=this.store[e];return E.isFunction(r)&&(r={cellFormatMethod:r}),this.store[e]=n?E.merge(n,r):r,this},t.prototype.delete=function(e){delete this.store[e]},t.prototype.forEach=function(e){E.objectEach(this.store,e)},t}(),NC=new r7,Ja=null,hA="z-index-manage",$C="m",BC="s",lu={m:1e3,s:1e3};function UC(){return Ja||typeof document<"u"&&(Ja=document.getElementById(hA),Ja||(Ja=document.createElement("div"),Ja.id=hA,Ja.style.display="none",document.body.appendChild(Ja),Ig(lu.m),Rg(lu.s))),Ja}function HC(t){return function(e){if(e){e=Number(e),lu[t]=e;var r=UC();r&&(r.dataset?r.dataset[t]=e+"":r.setAttribute("data-"+t,e+""))}return lu[t]}}var Ig=HC($C);function VC(t){return function(){var r,n=UC();return n&&(r=n.dataset?n.dataset[t]:n.getAttribute("data-"+t)),r?Number(r):lu[t]}}var _g=VC($C);function n7(){return Ig(_g()+1)}var Rg=HC(BC),jC=VC(BC);function WC(){return _g()+jC()}function i7(){return Rg(jC()+1),WC()}var GC={setCurrent:Ig,getCurrent:_g,getNext:n7,setSubCurrent:Rg,getSubCurrent:WC,getSubNext:i7};function wt(t){return t&&t.enabled!==!1}function Lg(t){return t==null||t===""}function Dg(t){var e=t.name,r=E.lastIndexOf(e,"."),n=e.substring(r+1,e.length).toLowerCase(),i=e.substring(0,r);return{filename:i,type:n}}function sa(){return GC.getNext()}function Ba(){return GC.getCurrent()}function Qs(t){return t&&t.children&&t.children.length>0}function Ar(t){return t?E.toValueString(H.translate?H.translate(""+t):t):""}function Mr(t,e){return""+(Lg(t)?e?H.emptyCell:"":t)}function Oi(t){return t===""||E.eqNull(t)}var Nv=function(){function t(e,r,n){var i=n===void 0?{}:n,a=i.renderHeader,o=i.renderCell,l=i.renderFooter,s=i.renderData,c=e.xegrid,u=r.formatter,f=E.isBoolean(r.visible)?r.visible:!0;if(Object.assign(this,{type:r.type,property:r.field,field:r.field,title:r.title,width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,resizable:r.resizable,fixed:r.fixed,align:r.align,headerAlign:r.headerAlign,footerAlign:r.footerAlign,showOverflow:r.showOverflow,showHeaderOverflow:r.showHeaderOverflow,showFooterOverflow:r.showFooterOverflow,className:r.className,headerClassName:r.headerClassName,footerClassName:r.footerClassName,formatter:u,sortable:r.sortable,sortBy:r.sortBy,sortType:r.sortType,filters:qC(r.filters),filterMultiple:E.isBoolean(r.filterMultiple)?r.filterMultiple:!0,filterMethod:r.filterMethod,filterResetMethod:r.filterResetMethod,filterRecoverMethod:r.filterRecoverMethod,filterRender:r.filterRender,treeNode:r.treeNode,cellType:r.cellType,cellRender:r.cellRender,editRender:r.editRender,contentRender:r.contentRender,headerExportMethod:r.headerExportMethod,exportMethod:r.exportMethod,footerExportMethod:r.footerExportMethod,titleHelp:r.titleHelp,titlePrefix:r.titlePrefix,params:r.params,id:r.colId||E.uniqueId("col_"),parentId:null,visible:f,halfVisible:!1,defaultVisible:f,defaultFixed:r.fixed,checked:!1,halfChecked:!1,disabled:!1,level:1,rowSpan:1,colSpan:1,order:null,sortTime:0,customOrder:0,renderWidth:0,renderHeight:0,resizeWidth:0,renderLeft:0,renderArgs:[],model:{},renderHeader:a||r.renderHeader,renderCell:o||r.renderCell,renderFooter:l||r.renderFooter,renderData:s,slots:r.slots}),c){var d=c.getComputeMaps().computeProxyOpts,h=d.value;h.beforeColumn&&h.beforeColumn({$grid:c,column:this})}}return t.prototype.getTitle=function(){return Ar(this.title||(this.type==="seq"?H.i18n("vxe.table.seqTitle"):""))},t.prototype.getKey=function(){return this.field||(this.type?"type=".concat(this.type):null)},t.prototype.update=function(e,r){e!=="filters"&&(e==="field"&&(this.property=r),this[e]=r)},t}(),ep={},ii=E.browse();function ns(t,e){return t?E.isFunction(t)?t(e):t:""}function zC(t){return ep[t]||(ep[t]=new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g")),ep[t]}function KC(t,e,r){if(t){var n=t.parentNode;if(r.top+=t.offsetTop,r.left+=t.offsetLeft,n&&n!==document.documentElement&&n!==document.body&&(r.top-=n.scrollTop,r.left-=n.scrollLeft),!(e&&(t===e||t.offsetParent===e))&&t.offsetParent)return KC(t.offsetParent,e,r)}return r}function $v(t){return t&&/^\d+(px)?$/.test(t)}function mc(t){return t&&/^\d+%$/.test(t)}function Da(t,e){return t&&t.className&&t.className.match&&t.className.match(zC(e))}function po(t,e){t&&Da(t,e)&&(t.className=t.className.replace(zC(e),""))}function is(t,e){t&&!Da(t,e)&&(po(t,e),t.className="".concat(t.className," ").concat(e))}function go(){var t=document.documentElement,e=document.body;return{scrollTop:t.scrollTop||e.scrollTop,scrollLeft:t.scrollLeft||e.scrollLeft,visibleHeight:t.clientHeight||e.clientHeight,visibleWidth:t.clientWidth||e.clientWidth}}function rc(t){return t?t.offsetHeight:0}function Bv(t){if(t){var e=getComputedStyle(t),r=E.toNumber(e.paddingTop),n=E.toNumber(e.paddingBottom);return r+n}return 0}function sf(t,e){t&&(t.scrollTop=e)}function pA(t,e){t&&(t.scrollLeft=e)}function Og(t,e){var r=e.type==="html"?t.innerText:t.textContent;t.getAttribute("title")!==r&&t.setAttribute("title",r)}function Pt(t,e,r,n){for(var i,a=t.target.shadowRoot&&t.composed&&t.composedPath()[0]||t.target;a&&a.nodeType&&a!==document;){if(r&&Da(a,r)&&(!n||n(a)))i=a;else if(a===e)return{flag:r?!!i:!0,container:e,targetElem:i};a=a.parentNode}return{flag:!1}}function a7(t,e){return KC(t,e,{left:0,top:0})}function Ia(t){var e=t.getBoundingClientRect(),r=e.top,n=e.left,i=go(),a=i.scrollTop,o=i.scrollLeft,l=i.visibleHeight,s=i.visibleWidth;return{boundingTop:r,top:a+r,boundingLeft:n,left:o+n,visibleHeight:l,visibleWidth:s}}var vA="scrollIntoViewIfNeeded",mA="scrollIntoView";function YC(t){t&&(t[vA]?t[vA]():t[mA]&&t[mA]())}function o7(t,e){t&&t.dispatchEvent(new Event(e))}function tp(t){return t&&t.nodeType===1}function rp(t,e,r){var n=t.internalData;return t.clearScroll().then(function(){if(e||r)return n.lastScrollLeft=0,n.lastScrollTop=0,t.scrollTo(e,r)})}function gA(t){t&&t._onscroll&&(t.onscroll=null)}function Yf(t){t&&t._onscroll&&(t.onscroll=t._onscroll)}function np(){return E.uniqueId("row_")}function Ko(t){var e=t.props,r=t.getComputeMaps().computeRowOpts,n=e.rowId,i=r.value;return n||i.keyField||"_X_ROW_KEY"}function tt(t,e){var r=E.get(e,Ko(t));return E.eqNull(r)?"":encodeURIComponent(r)}var Dn=function(t,e){return e?E.isString(e)?t.getColumnByField(e):e:null};function ip(t){if(t){var e=getComputedStyle(t),r=E.toNumber(e.paddingLeft),n=E.toNumber(e.paddingRight);return r+n}return 0}function nc(t){if(t){var e=getComputedStyle(t),r=E.toNumber(e.marginLeft),n=E.toNumber(e.marginRight);return t.offsetWidth+r+n}return 0}function jo(t,e){return t.querySelector(".vxe-cell"+e)}function qC(t){return t&&E.isArray(t)?t.map(function(e){var r=e.label,n=e.value,i=e.data,a=e.resetValue,o=e.checked;return{label:r,value:n,data:i,resetValue:a,checked:!!o,_checked:!!o}}):t}function s7(t){return t.map(function(e,r){return r%2===0?Number(e)+1:"."}).join("")}function la(t,e){return E.get(t,e.field)}function Ca(t,e,r){return E.set(t,e.field,r)}function l7(t){var e=t.$table,r=t.column,n=t.cell,i=e.props,a=e.getComputeMaps().computeResizableOpts,o=a.value,l=o.minWidth;if(l){var s=E.isFunction(l)?l(t):l;if(s!=="auto")return Math.max(1,E.toNumber(s))}var c=i.showHeaderOverflow,u=r.showHeaderOverflow,f=r.minWidth,d=E.isUndefined(u)||E.isNull(u)?c:u,h=d==="ellipsis",p=d==="title",v=d===!0||d==="tooltip",g=p||v||h,m=E.floor((E.toNumber(getComputedStyle(n).fontSize)||14)*1.6),b=ip(n)+ip(jo(n,"")),x=m+b;if(g){var T=ip(jo(n,"--title>.vxe-cell--checkbox")),A=nc(jo(n,">.vxe-cell--required-icon")),O=nc(jo(n,">.vxe-cell--edit-icon")),I=nc(jo(n,">.vxe-cell-help-icon")),_=nc(jo(n,">.vxe-cell--sort")),k=nc(jo(n,">.vxe-cell--filter"));x+=T+A+O+I+k+_}if(f){var L=e.getRefMaps().refTableBody,P=L.value,W=P?P.$el:null;if(W){if(mc(f)){var q=W.clientWidth-1,V=q/100;return Math.max(x,Math.floor(E.toInteger(f)*V))}else if($v(f))return Math.max(x,E.toInteger(f))}}return x}function Rf(t){return t&&(t.constructor===Nv||t instanceof Nv)}function c7(t,e,r){return Rf(e)?e:Jt(new Nv(t,e,r))}function XC(t,e,r){Object.keys(e).forEach(function(n){st(function(){return e[n]},function(i){r.update(n,i),t&&(n==="filters"?(t.setFilter(r,i),t.handleUpdateDataQueue()):["visible","fixed","width","minWidth","maxWidth"].includes(n)&&t.handleRefreshColumnQueue())})})}function ZC(t,e,r,n){var i=t.reactData,a=i.staticColumns,o=e.parentNode,l=n?n.column:null,s=l?l.children:a;o&&s&&(s.splice(E.arrayIndexOf(o.children,e),0,r),i.staticColumns=a.slice(0))}function JC(t,e){var r=t.reactData,n=r.staticColumns,i=E.findTree(n,function(a){return a.id===e.id},{children:"children"});i&&i.items.splice(i.index,1),r.staticColumns=n.slice(0)}function yA(t,e){var r=t.internalData,n=r.fullColumnIdData;if(!e)return null;for(var i=e.parentId;n[i];){var a=n[i].column;if(i=a.parentId,!i)return a}return e}function QC(t,e,r){for(var n=0;n<t.length;n++){var i=t[n],a=i.row,o=i.col,l=i.rowspan,s=i.colspan;if(o>-1&&a>-1&&l&&s){if(a===e&&o===r)return{rowspan:l,colspan:s};if(e>=a&&e<a+l&&r>=o&&r<o+s)return{rowspan:0,colspan:0}}}}function u7(t){var e=t.props,r=t.internalData;return r.initStatus=!1,t.clearSort(),t.clearCurrentRow(),t.clearCurrentColumn(),t.clearRadioRow(),t.clearRadioReserve(),t.clearCheckboxRow(),t.clearCheckboxReserve(),t.clearRowExpand(),t.clearTreeExpand(),t.clearTreeExpandReserve(),t.clearFilter&&t.clearFilter(),t.clearSelected&&(e.keyboardConfig||e.mouseConfig)&&t.clearSelected(),t.clearCellAreas&&e.mouseConfig&&(t.clearCellAreas(),t.clearCopyCellArea()),t.clearScroll()}function f7(t){return t.clearFilter&&t.clearFilter(),u7(t)}function bA(t,e){var r=t.reactData,n=t.internalData,i=t.getRefMaps().refTableBody,a=r.scrollYLoad,o=n.afterFullData,l=n.scrollYStore,s=i.value,c=s?s.$el:null;if(c){var u=c.querySelector('[rowid="'.concat(tt(t,e),'"]'));if(u){var f=c.clientHeight,d=c.scrollTop,h=u.offsetParent,p=u.offsetTop+(h?h.offsetTop:0),v=u.clientHeight;if(p<d||p>d+f)return t.scrollTo(null,p);if(p+v>=f+d)return t.scrollTo(null,d+v)}else if(a)return t.scrollTo(null,(o.indexOf(e)-1)*l.rowHeight)}return Promise.resolve()}function d7(t,e){var r=t.reactData,n=t.internalData,i=t.getRefMaps().refTableBody,a=r.scrollXLoad,o=n.visibleColumn,l=i.value,s=l?l.$el:null;if(s){var c=s.querySelector(".".concat(e.id));if(c){var u=s.clientWidth,f=s.scrollLeft,d=c.offsetParent,h=c.offsetLeft+(d?d.offsetLeft:0),p=c.clientWidth;if(h<f||h>f+u)return t.scrollTo(h);if(h+p>=u+f)return t.scrollTo(f+p)}else if(a){for(var v=0,g=0;g<o.length&&o[g]!==e;g++)v+=o[g].renderWidth;return t.scrollTo(v)}}return Promise.resolve()}function cl(t){return"on"+t.substring(0,1).toLocaleUpperCase()+t.substring(1)}function pr(t){return E.isArray(t)?t:[t]}var jt=globalThis&&globalThis.__assign||function(){return jt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jt.apply(this,arguments)},qf=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},kg="modelValue",Mg={transfer:!0};function eI(t){switch(t.name){case"input":case"textarea":return"input"}return"update:modelValue"}function tI(t){switch(t.name){case"input":case"textarea":case"$input":case"$textarea":return"input"}return"change"}function h7(t,e){return t&&e.valueFormat?E.toStringDate(t,e.valueFormat):t}function p7(t,e,r){var n=e.dateConfig,i=n===void 0?{}:n;return E.toDateString(h7(t,e),i.labelFormat||r)}function v7(t,e){return p7(t,e,H.i18n("vxe.input.date.labelFormat.".concat(e.type)))}function rI(t){return"vxe-".concat(t.replace("$",""))}function yl(t){var e=t.name;return nr(rI(e))}function nI(t,e,r){var n=t.$panel;n.changeOption({},e,r)}function bl(t){var e=t.name,r=t.attrs;return e==="input"&&(r=Object.assign({type:"text"},r)),r}function iI(t){var e=t.name,r=t.immediate,n=t.props;if(!r){if(e==="$input"){var i=(n||{}).type;return!(!i||i==="text"||i==="number"||i==="integer"||i==="float")}return!(e==="input"||e==="textarea"||e==="$textarea")}return r}function Fg(t,e,r,n){var i;return E.assign({immediate:iI(t)},Mg,n,t.props,(i={},i[kg]=r,i))}function aI(t,e,r,n){var i;return E.assign({},Mg,n,t.props,(i={},i[kg]=r,i))}function cu(t,e,r,n){var i;return E.assign({},Mg,n,t.props,(i={},i[kg]=r,i))}function Xd(t,e){return e.$type==="cell"||iI(t)}function ap(t,e,r){var n=t.placeholder;return[D("span",{class:"vxe-cell--label"},n&&Lg(r)?[D("span",{class:"vxe-cell--placeholder"},Mr(Ar(n),1))]:Mr(r,1))]}function Pg(t,e,r,n){var i=t.events,a=eI(t),o=tI(t),l=o===a,s={};return i&&E.objectEach(i,function(c,u){s[cl(u)]=function(){for(var f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];c.apply(void 0,qf([e],f,!1))}}),r&&(s[cl(a)]=function(c){r(c),l&&n&&n(c),i&&i[a]&&i[a](e,c)}),!l&&n&&(s[cl(o)]=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];n.apply(void 0,c),i&&i[o]&&i[o].apply(i,qf([e],c,!1))}),s}function Fu(t,e,r,n){var i=t.events,a=eI(t),o=tI(t),l={};return E.objectEach(i,function(s,c){l[cl(c)]=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];s.apply(void 0,qf([e],u,!1))}}),r&&(l[cl(a)]=function(s){r(s),i&&i[a]&&i[a](e,s)}),n&&(l[cl(o)]=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];n.apply(void 0,s),i&&i[o]&&i[o].apply(i,qf([e],s,!1))}),l}function oI(t,e){var r=e.$table,n=e.row,i=e.column,a=t.name,o=i.model,l=Xd(t,e);return Fu(t,e,function(s){l?Ca(n,i,s):(o.update=!0,o.value=s)},function(s){if(!l&&(a==="$input"||a==="$textarea")){var c=s.value;o.update=!0,o.value=c,r.updateStatus(e,c)}else r.updateStatus(e)})}function sI(t,e,r){return Fu(t,e,function(n){r.data=n},function(){nI(e,!E.eqNull(r.data),r)})}function Xf(t,e){var r=e.$form,n=e.data,i=e.property;return Fu(t,e,function(a){E.set(n,i,a)},function(){r.updateStatus(e)})}function lI(t,e){var r=e.$table,n=e.row,i=e.column,a=i.model;return Pg(t,e,function(o){var l=o.target.value;Xd(t,e)?Ca(n,i,l):(a.update=!0,a.value=l)},function(o){var l=o.target.value;r.updateStatus(e,l)})}function cI(t,e,r){return Pg(t,e,function(n){r.data=n.target.value},function(){nI(e,!E.eqNull(r.data),r)})}function uI(t,e){var r=e.$form,n=e.data,i=e.property;return Pg(t,e,function(a){var o=a.target.value;E.set(n,i,o)},function(){r.updateStatus(e)})}function op(t,e){var r=e.row,n=e.column,i=t.name,a=Xd(t,e)?la(r,n):n.model.value;return[D(i,jt(jt(jt({class:"vxe-default-".concat(i)},bl(t)),{value:a}),lI(t,e)))]}function lf(t,e){var r=e.row,n=e.column,i=la(r,n);return[D(yl(t),jt(jt({},Fg(t,e,i)),oI(t,e)))]}function fI(t,e){return[D(nr("vxe-button"),jt(jt({},Fg(t,e,null)),Fu(t,e)))]}function m7(t,e){return t.children.map(function(r){return fI(r,e)[0]})}function Uv(t,e,r){var n=t.optionGroups,i=t.optionGroupProps,a=i===void 0?{}:i,o=a.options||"options",l=a.label||"label";return n.map(function(s,c){return D("optgroup",{key:c,label:s[l]},r(s[o],t,e))})}function Zf(t,e,r){var n=e.optionProps,i=n===void 0?{}:n,a=r.row,o=r.column,l=i.label||"label",s=i.value||"value",c=i.disabled||"disabled",u=Xd(e,r)?la(a,o):o.model.value;return t.map(function(f,d){return D("option",{key:d,value:f[s],disabled:f[c],selected:f[s]==u},f[l])})}function g7(t,e){var r=e.column,n=t.name,i=bl(t);return r.filters.map(function(a,o){return D(n,jt(jt(jt({key:o,class:"vxe-default-".concat(n)},i),{value:a.data}),cI(t,e,a)))})}function y7(t,e){var r=e.column;return r.filters.map(function(n,i){var a=n.data;return D(yl(t),jt(jt({key:i},aI(t,t,a)),sI(t,e,n)))})}function cf(t){var e=t.option,r=t.row,n=t.column,i=e.data,a=E.get(r,n.property);return a==i}function xA(t,e){return[D("select",jt(jt({class:"vxe-default-select"},bl(t)),lI(t,e)),t.optionGroups?Uv(t,e,Zf):Zf(t.options,t,e))]}function AA(t,e){var r=e.row,n=e.column,i=t.options,a=t.optionProps,o=t.optionGroups,l=t.optionGroupProps,s=la(r,n);return[D(yl(t),jt(jt({},Fg(t,e,s,{options:i,optionProps:a,optionGroups:o,optionGroupProps:l})),oI(t,e)))]}function Hv(t,e){var r=e.row,n=e.column,i=t.props,a=i===void 0?{}:i,o=t.options,l=t.optionGroups,s=t.optionProps,c=s===void 0?{}:s,u=t.optionGroupProps,f=u===void 0?{}:u,d=E.get(r,n.property),h,p=c.label||"label",v=c.value||"value";return Lg(d)?"":E.map(a.multiple?d:[d],l?function(g){for(var m=f.options||"options",b=0;b<l.length&&(h=E.find(l[b][m],function(x){return x[v]==g}),!h);b++);return h?h[p]:g}:function(g){return h=E.find(o,function(m){return m[v]==g}),h?h[p]:g}).join(", ")}function EA(t,e){var r=e.data,n=e.property,i=t.name,a=bl(t),o=E.get(r,n);return[D(i,jt(jt(jt({class:"vxe-default-".concat(i)},a),{value:a&&i==="input"&&(a.type==="submit"||a.type==="reset")?null:o}),uI(t,e)))]}function sp(t,e){var r=e.data,n=e.property,i=E.get(r,n);return[D(yl(t),jt(jt({},cu(t,e,i)),Xf(t,e)))]}function dI(t,e){return[D(nr("vxe-button"),jt(jt({},cu(t,e,null)),Fu(t,e)))]}function b7(t,e){return t.children.map(function(r){return dI(r,e)[0]})}function TA(t,e,r){var n=r.data,i=r.property,a=e.optionProps,o=a===void 0?{}:a,l=o.label||"label",s=o.value||"value",c=o.disabled||"disabled",u=E.get(n,i);return t.map(function(f,d){return D("option",{key:d,value:f[s],disabled:f[c],selected:f[s]==u},f[l])})}function SA(t){var e=t.row,r=t.column,n=t.options;return n.original?la(e,r):Hv(r.editRender||r.cellRender,t)}function wA(t,e){var r=t.name,n=t.options,i=t.optionProps,a=i===void 0?{}:i,o=e.data,l=e.property,s=a.label||"label",c=a.value||"value",u=a.disabled||"disabled",f=E.get(o,l),d=rI(r);return n?[D(nr("".concat(d,"-group")),jt(jt({},cu(t,e,f)),Xf(t,e)),{default:function(){return n.map(function(h,p){return D(nr(d),{key:p,label:h[c],content:h[s],disabled:h[u]})})}})]:[D(nr(d),jt(jt({},cu(t,e,f)),Xf(t,e)))]}var uf={input:{autofocus:"input",renderEdit:op,renderDefault:op,renderFilter:g7,defaultFilterMethod:cf,renderItemContent:EA},textarea:{autofocus:"textarea",renderEdit:op,renderItemContent:EA},select:{renderEdit:xA,renderDefault:xA,renderCell:function(t,e){return ap(t,e,Hv(t,e))},renderFilter:function(t,e){var r=e.column;return r.filters.map(function(n,i){return D("select",jt(jt({key:i,class:"vxe-default-select"},bl(t)),cI(t,e,n)),t.optionGroups?Uv(t,e,Zf):Zf(t.options,t,e))})},defaultFilterMethod:cf,renderItemContent:function(t,e){return[D("select",jt(jt({class:"vxe-default-select"},bl(t)),uI(t,e)),t.optionGroups?Uv(t,e,TA):TA(t.options,t,e))]},cellExportMethod:SA},$input:{autofocus:".vxe-input--inner",renderEdit:lf,renderCell:function(t,e){var r=t.props,n=r===void 0?{}:r,i=e.row,a=e.column,o=n.digits||H.input.digits,l=E.get(i,a.property);if(l)switch(n.type){case"date":case"week":case"month":case"year":l=v7(l,n);break;case"float":l=E.toFixed(E.floor(l,o),o);break}return ap(t,e,l)},renderDefault:lf,renderFilter:y7,defaultFilterMethod:cf,renderItemContent:sp},$textarea:{autofocus:".vxe-textarea--inner",renderItemContent:sp},$button:{renderDefault:fI,renderItemContent:dI},$buttons:{renderDefault:m7,renderItemContent:b7},$select:{autofocus:".vxe-input--inner",renderEdit:AA,renderDefault:AA,renderCell:function(t,e){return ap(t,e,Hv(t,e))},renderFilter:function(t,e){var r=e.column,n=t.options,i=t.optionProps,a=t.optionGroups,o=t.optionGroupProps;return r.filters.map(function(l,s){var c=l.data;return D(yl(t),jt(jt({key:s},aI(t,e,c,{options:n,optionProps:i,optionGroups:a,optionGroupProps:o})),sI(t,e,l)))})},defaultFilterMethod:cf,renderItemContent:function(t,e){var r=e.data,n=e.property,i=t.options,a=t.optionProps,o=t.optionGroups,l=t.optionGroupProps,s=E.get(r,n);return[D(yl(t),jt(jt({},cu(t,e,s,{options:i,optionProps:a,optionGroups:o,optionGroupProps:l})),Xf(t,e)))]},cellExportMethod:SA},$radio:{autofocus:".vxe-radio--input",renderItemContent:wA},$checkbox:{autofocus:".vxe-checkbox--input",renderItemContent:wA},$switch:{autofocus:".vxe-switch--button",renderEdit:lf,renderDefault:lf,renderItemContent:sp}},as={mixin:function(t){return E.each(t,function(e,r){return as.add(r,e)}),as},get:function(t){return uf[t]||null},add:function(t,e){if(t&&e){var r=uf[t];r?Object.assign(r,e):uf[t]=e}return as},delete:function(t){return delete uf[t],as}},x7=function(){function t(){this.store={}}return t.prototype.mixin=function(e){var r=this;return E.each(e,function(n,i){r.add(i,n)}),this},t.prototype.has=function(e){return!!this.get(e)},t.prototype.get=function(e){return this.store[e]},t.prototype.add=function(e,r){var n=this.store[e];return E.isFunction(r)&&(r={commandMethod:r}),this.store[e]=n?E.merge(n,r):r,this},t.prototype.delete=function(e){delete this.store[e]},t.prototype.forEach=function(e){E.objectEach(this.store,e)},t}(),hI=new x7,A7=function(){function t(){this.store={}}return t.prototype.mixin=function(e){var r=this;return E.each(e,function(n,i){r.add(i,n)}),this},t.prototype.has=function(e){return!!this.get(e)},t.prototype.get=function(e){return this.store[e]},t.prototype.add=function(e,r){var n=this.store[e];return E.isFunction(r)&&(r={menuMethod:r}),this.store[e]=n?E.merge(n,r):r,this},t.prototype.delete=function(e){delete this.store[e]},t.prototype.forEach=function(e){E.objectEach(this.store,e)},t}(),pI=new A7,vI=function(){function t(){this.store={}}return t.prototype.mixin=function(e){var r=this;return E.each(e,function(n,i){r.add(i,n)}),this},t.prototype.has=function(e){return!!this.get(e)},t.prototype.get=function(e){return this.store[e]},t.prototype.add=function(e,r){var n=this.store[e];return this.store[e]=n?E.merge(n,r):r,this},t.prototype.delete=function(e){delete this.store[e]},t.prototype.forEach=function(e){E.objectEach(this.store,e)},t}(),mI=new vI,gI=new vI,Ng=function(t){return E.merge(H,t)};function CA(t,e){var r=[];return E.objectEach(t,function(n,i){(n===0||n===e)&&r.push(i)}),r}var IA=[];function yI(t,e){return t&&t.install&&IA.indexOf(t)===-1&&(t.install(ot,e),IA.push(t)),ot}function bI(t,e){return H.i18n(t,e)}function xI(t,e){return t?E.toValueString(H.translate?H.translate(t,e):t):""}var E7=function(){function t(){}return Object.defineProperty(t.prototype,"zIndex",{get:function(){return Ba()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextZIndex",{get:function(){return sa()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exportTypes",{get:function(){return CA(H.export.types,1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"importTypes",{get:function(){return CA(H.export.types,2)},enumerable:!1,configurable:!0}),t}(),T7=new E7,AI="v4",Zd=Ng,ot={v:AI,version:"4.5.10",setup:Zd,config:Ng,interceptor:wc,renderer:as,commands:hI,formats:NC,validators:mI,menus:pI,hooks:gI,use:yI,t:bI,_t:xI};const Cc=xt({name:"VxeTableFilter",props:{filterStore:Object},setup:function(t){var e=ct("$xetable",{}),r=e.reactData,n=e.internalData,i=_e(function(){var g=t.filterStore;return g&&g.options.some(function(m){return m.checked})}),a=function(g,m){var b=t.filterStore;b.options.forEach(function(x){x._checked=m,x.checked=m}),b.isAllSelected=m,b.isIndeterminate=!1},o=function(g){var m=t.filterStore;m.options.forEach(function(b){b.checked=b._checked}),e.confirmFilterEvent(g)},l=function(g,m,b){var x=t.filterStore;x.options.forEach(function(T){T._checked=!1}),b._checked=m,e.checkFilterOptions(),o(g)},s=function(g){var m=t.filterStore;e.handleClearFilter(m.column),e.confirmFilterEvent(g)},c=function(g,m,b){b._checked=m,e.checkFilterOptions()},u=function(g,m,b){var x=t.filterStore;x.multiple?c(g,m,b):l(g,m,b)},f=function(g,m){var b=t.filterStore;b.multiple?a(g,m):s(g)},d={changeRadioOption:l,changeMultipleOption:c,changeAllOption:f,changeOption:u,confirmFilter:o,resetFilter:s},h=function(g,m){var b=t.filterStore,x=b.column,T=b.multiple,A=b.maxHeight,O=x.slots,I=O?O.filter:null,_=Object.assign({},n._currFilterParams,{$panel:d,$table:e});if(I)return[D("div",{class:"vxe-table--filter-template"},e.callSlot(I,_))];if(m&&m.renderFilter)return[D("div",{class:"vxe-table--filter-template"},pr(m.renderFilter(g,_)))];var k=T?b.isAllSelected:!b.options.some(function(P){return P._checked}),L=T&&b.isIndeterminate;return[D("ul",{class:"vxe-table--filter-header"},[D("li",{class:["vxe-table--filter-option",{"is--checked":k,"is--indeterminate":L}],title:H.i18n(T?"vxe.table.allTitle":"vxe.table.allFilter"),onClick:function(P){f(P,!b.isAllSelected)}},(T?[D("span",{class:["vxe-checkbox--icon",L?H.icon.TABLE_CHECKBOX_INDETERMINATE:k?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]})]:[]).concat([D("span",{class:"vxe-checkbox--label"},H.i18n("vxe.table.allFilter"))]))]),D("ul",{class:"vxe-table--filter-body",style:A?{maxHeight:"".concat(A,"px")}:{}},b.options.map(function(P){var W=P._checked;return D("li",{class:["vxe-table--filter-option",{"is--checked":P._checked}],title:P.label,onClick:function(q){u(q,!P._checked,P)}},(T?[D("span",{class:["vxe-checkbox--icon",W?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]})]:[]).concat([D("span",{class:"vxe-checkbox--label"},Mr(P.label,1))]))}))]},p=function(){var g=t.filterStore,m=g.column,b=g.multiple,x=i.value,T=m.filterRender,A=T?ot.renderer.get(T.name):null,O=!x&&!g.isAllSelected&&!g.isIndeterminate;return b&&(!A||A.showFilterFooter!==!1)?[D("div",{class:"vxe-table--filter-footer"},[D("button",{class:{"is--disabled":O},disabled:O,onClick:o},H.i18n("vxe.table.confirmFilter")),D("button",{onClick:s},H.i18n("vxe.table.resetFilter"))])]:[]},v=function(){var g=t.filterStore,m=r.initStore,b=g.column,x=b?b.filterRender:null,T=x?ot.renderer.get(x.name):null,A=T?T.filterClassName:"",O=Object.assign({},n._currFilterParams,{$panel:d,$table:e});return D("div",{class:["vxe-table--filter-wrapper","filter--prevent-default",ns(A,O),{"is--animat":e.props.animat,"is--multiple":g.multiple,"is--active":g.visible}],style:g.style},m.filter&&g.visible?h(x,T).concat(p()):[])};return v}});var Jf=globalThis&&globalThis.__assign||function(){return Jf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Jf.apply(this,arguments)},S7=["setFilter","clearFilter","getCheckedFilters"],w7={setupTable:function(t){var e=t.props,r=t.reactData,n=t.internalData,i=t.getRefMaps(),a=i.refTableBody,o=i.refTableFilter,l=t.getComputeMaps(),s=l.computeFilterOpts,c=l.computeMouseOpts,u={checkFilterOptions:function(){var d=r.filterStore;d.isAllSelected=d.options.every(function(h){return h._checked}),d.isIndeterminate=!d.isAllSelected&&d.options.some(function(h){return h._checked})},triggerFilterEvent:function(d,h,p){var v=r.initStore,g=r.filterStore;if(g.column===h&&g.visible)g.visible=!1;else{var m=d.target,b=d.pageX,x=go().visibleWidth,T=h.filters,A=h.filterMultiple,O=h.filterRender,I=O?ot.renderer.get(O.name):null,_=h.filterRecoverMethod||(I?I.filterRecoverMethod:null);n._currFilterParams=p,Object.assign(g,{multiple:A,options:T,column:h,style:null}),g.options.forEach(function(k){var L=k._checked,P=k.checked;k._checked=P,!P&&L!==P&&_&&_({option:k,column:h,$table:t})}),this.checkFilterOptions(),g.visible=!0,v.filter=!0,Ie(function(){var k=a.value,L=k.$el,P=o.value,W=P?P.$el:null,q=0,V=0,G=null,pe=null;W&&(q=W.offsetWidth,V=W.offsetHeight,G=W.querySelector(".vxe-table--filter-header"),pe=W.querySelector(".vxe-table--filter-footer"));var J=q/2,N=10,Z=L.clientWidth-q-N,le,ye,me={top:"".concat(m.offsetTop+m.offsetParent.offsetTop+m.offsetHeight+8,"px")},Re=null;if(V>=L.clientHeight&&(Re=Math.max(60,L.clientHeight-(pe?pe.offsetHeight:0)-(G?G.offsetHeight:0))),h.fixed==="left"?le=m.offsetLeft+m.offsetParent.offsetLeft-J:h.fixed==="right"?ye=m.offsetParent.offsetWidth-m.offsetLeft+(m.offsetParent.offsetParent.offsetWidth-m.offsetParent.offsetLeft)-h.renderWidth-J:le=m.offsetLeft+m.offsetParent.offsetLeft-J-L.scrollLeft,le){var be=b+q-J+N-x;be>0&&(le-=be),me.left="".concat(Math.min(Z,Math.max(N,le)),"px")}else if(ye){var be=b+q-J+N-x;be>0&&(ye+=be),me.right="".concat(Math.max(N,ye),"px")}g.style=me,g.maxHeight=Re})}t.dispatchEvent("filter-visible",{column:h,field:h.field,property:h.field,filterList:t.getCheckedFilters(),visible:g.visible},d)},handleClearFilter:function(d){if(d){var h=d.filters,p=d.filterRender;if(h){var v=p?ot.renderer.get(p.name):null,g=d.filterResetMethod||(v?v.filterResetMethod:null);h.forEach(function(m){m._checked=!1,m.checked=!1,g||(m.data=E.clone(m.resetValue,!0))}),g&&g({options:h,column:d,$table:t})}}},confirmFilterEvent:function(d){var h=e.mouseConfig,p=r.filterStore,v=r.scrollXLoad,g=r.scrollYLoad,m=s.value,b=c.value,x=p.column,T=x.field,A=[],O=[];x.filters.forEach(function(k){k.checked&&(A.push(k.value),O.push(k.data))});var I=t.getCheckedFilters(),_={$table:t,$event:d,column:x,field:T,property:T,values:A,datas:O,filters:I,filterList:I};m.remote||(t.handleTableData(!0),t.checkSelectionStatus()),h&&b.area&&t.handleFilterEvent&&t.handleFilterEvent(d,_),t.dispatchEvent("filter-change",_,d),t.closeFilter(),t.updateFooter().then(function(){var k=r.scrollXLoad,L=r.scrollYLoad;if(v||k||g||L)return(v||k)&&t.updateScrollXSpace(),(g||L)&&t.updateScrollYSpace(),t.refreshScroll()}).then(function(){return t.updateCellAreas(),t.recalculate(!0)}).then(function(){setTimeout(function(){return t.recalculate()},50)})}},f={openFilter:function(d){var h=Dn(t,d);if(h&&h.filters){var p=n.elemStore,v=h.fixed;return t.scrollToColumn(h).then(function(){var g=p["".concat(v||"main","-header-wrapper")]||p["main-header-wrapper"],m=g?g.value:null;if(m){var b=m.querySelector(".vxe-header--column.".concat(h.id," .vxe-filter--btn"));o7(b,"click")}})}return Ie()},setFilter:function(d,h){var p=Dn(t,d);return p&&p.filters&&(p.filters=qC(h||[])),Ie()},clearFilter:function(d){var h=r.filterStore,p=n.tableFullColumn,v=s.value,g;return d?(g=Dn(t,d),g&&u.handleClearFilter(g)):p.forEach(u.handleClearFilter),(!d||g!==h.column)&&Object.assign(h,{isAllSelected:!1,isIndeterminate:!1,style:null,options:[],column:null,multiple:!1,visible:!1}),v.remote?Ie():t.updateData()},getCheckedFilters:function(){var d=n.tableFullColumn,h=[];return d.forEach(function(p){var v=p.field,g=p.filters,m=[],b=[];g&&g.length&&(g.forEach(function(x){x.checked&&(m.push(x.value),b.push(x.data))}),m.length&&h.push({column:p,field:v,property:v,values:m,datas:b}))}),h}};return Jf(Jf({},f),u)},setupGrid:function(t){return t.extendTableMethods(S7)}},ic,Lf=Jt({modals:[]}),C7=xt({setup:function(){return function(){var t=Lf.modals;return D("div",{class:"vxe-dynamics--modal"},t.map(function(e){return D(nr("vxe-modal"),e)}))}}}),Kt=IS(C7);function I7(){ic||(ic=document.createElement("div"),ic.className="vxe-dynamics",document.body.appendChild(ic),Kt.mount(ic))}var $g={Panel:Cc,install:function(t){ot.hooks.add("$tableFilter",w7),t.component(Cc.name,Cc)}},_7=$g;Kt.component(Cc.name,Cc);const Ic=xt({name:"VxeTableContextMenu",setup:function(t,e){var r=E.uniqueId(),n=ct("$xetable",{}),i=n.reactData,a=je(),o={refElem:a},l={xID:r,props:t,context:e,getRefMaps:function(){return o}},s=function(){var c=i.ctxMenuStore,u=n.getComputeMaps().computeMenuOpts,f=u.value;return D(Ll,{to:"body",disabled:!1},[D("div",{ref:a,class:["vxe-table--context-menu-wrapper",f.className,{"is--visible":c.visible}],style:c.style},c.list.map(function(d,h){return d.every(function(p){return p.visible===!1})?$t():D("ul",{class:"vxe-context-menu--option-wrapper",key:h},d.map(function(p,v){var g=p.children&&p.children.some(function(m){return m.visible!==!1});return p.visible===!1?null:D("li",{class:[p.className,{"link--disabled":p.disabled,"link--active":p===c.selected}],key:"".concat(h,"_").concat(v)},[D("a",{class:"vxe-context-menu--link",onClick:function(m){n.ctxMenuLinkEvent(m,p)},onMouseover:function(m){n.ctxMenuMouseoverEvent(m,p)},onMouseout:function(m){n.ctxMenuMouseoutEvent(m,p)}},[D("i",{class:["vxe-context-menu--link-prefix",p.prefixIcon]}),D("span",{class:"vxe-context-menu--link-content"},Ar(p.name)),D("i",{class:["vxe-context-menu--link-suffix",g?p.suffixIcon||"suffix--haschild":p.suffixIcon]})]),g?D("ul",{class:["vxe-table--context-menu-clild-wrapper",{"is--show":p===c.selected&&c.showChild}]},p.children.map(function(m,b){return m.visible===!1?null:D("li",{class:[m.className,{"link--disabled":m.disabled,"link--active":m===c.selectChild}],key:"".concat(h,"_").concat(v,"_").concat(b)},[D("a",{class:"vxe-context-menu--link",onClick:function(x){n.ctxMenuLinkEvent(x,m)},onMouseover:function(x){n.ctxMenuMouseoverEvent(x,p,m)},onMouseout:function(x){n.ctxMenuMouseoutEvent(x,p)}},[D("i",{class:["vxe-context-menu--link-prefix",m.prefixIcon]}),D("span",{class:"vxe-context-menu--link-content"},Ar(m.name))])])})):null])}))}))])};return l.renderVN=s,l},render:function(){return this.renderVN()}});var gt={F2:"F2",ESCAPE:"Escape",ENTER:"Enter",TAB:"Tab",DELETE:"Delete",BACKSPACE:"Backspace",SPACEBAR:" ",CONTEXT_MENU:"ContextMenu",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"},_A={" ":"Spacebar",Apps:gt.CONTEXT_MENU,Del:gt.DELETE,Up:gt.ARROW_UP,Down:gt.ARROW_DOWN,Left:gt.ARROW_LEFT,Right:gt.ARROW_RIGHT},EI=ii.firefox?"DOMMouseScroll":"mousewheel",Vv=[],_t=function(t,e){var r=t.key;return e=e.toLowerCase(),r?e===r.toLowerCase()||!!(_A[r]&&_A[r].toLowerCase()===e):!1};function Ji(t){var e=t.type===EI;Vv.forEach(function(r){var n=r.type,i=r.cb;t.cancelBubble||(n===t.type||e&&n==="mousewheel")&&i(t)})}var bt={on:function(t,e,r){Vv.push({comp:t,type:e,cb:r})},off:function(t,e){E.remove(Vv,function(r){return r.comp===t&&r.type===e})},trigger:Ji,eqKeypad:function(t,e){var r=t.key;return e.toLowerCase()===r.toLowerCase()}};ii.isDoc&&(ii.msie||(document.addEventListener("copy",Ji,!1),document.addEventListener("cut",Ji,!1),document.addEventListener("paste",Ji,!1)),document.addEventListener("keydown",Ji,!1),document.addEventListener("contextmenu",Ji,!1),window.addEventListener("mousedown",Ji,!1),window.addEventListener("blur",Ji,!1),window.addEventListener("resize",Ji,!1),window.addEventListener(EI,E.throttle(Ji,100,{leading:!0,trailing:!1}),{passive:!0,capture:!1}));var Qf=globalThis&&globalThis.__assign||function(){return Qf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Qf.apply(this,arguments)},R7=["closeMenu"],L7={setupTable:function(t){var e=t.xID,r=t.props,n=t.reactData,i=t.internalData,a=t.getRefMaps(),o=a.refElem,l=a.refTableFilter,s=a.refTableMenu,c=t.getComputeMaps(),u=c.computeMouseOpts,f=c.computeIsMenu,d=c.computeMenuOpts,h={},p={},v=function(g,m,b){var x=n.ctxMenuStore,T=f.value,A=d.value,O=A[m],I=A.visibleMethod;if(O){var _=O.options,k=O.disabled;k?g.preventDefault():T&&_&&_.length&&(b.options=_,t.preventEvent(g,"event.showMenu",b,function(){if(!I||I(b)){g.preventDefault(),t.updateZindex();var L=go(),P=L.scrollTop,W=L.scrollLeft,q=L.visibleHeight,V=L.visibleWidth,G=g.clientY+P,pe=g.clientX+W,J=function(){i._currMenuParams=b,Object.assign(x,{visible:!0,list:_,selected:null,selectChild:null,showChild:!1,style:{zIndex:i.tZindex,top:"".concat(G,"px"),left:"".concat(pe,"px")}}),Ie(function(){var ye=s.value,me=ye.getRefMaps().refElem.value,Re=me.clientHeight,be=me.clientWidth,Ce=Ia(me),we=Ce.boundingTop,ce=Ce.boundingLeft,re=we+Re-q,ve=ce+be-V;re>-10&&(x.style.top="".concat(Math.max(P+2,G-Re-2),"px")),ve>-10&&(x.style.left="".concat(Math.max(W+2,pe-be-2),"px"))})},N=b.keyboard,Z=b.row,le=b.column;N&&Z&&le?t.scrollToRow(Z,le).then(function(){var ye=t.getCell(Z,le);if(ye){var me=Ia(ye),Re=me.boundingTop,be=me.boundingLeft;G=Re+P+Math.floor(ye.offsetHeight/2),pe=be+W+Math.floor(ye.offsetWidth/2)}J()}):J()}else h.closeMenu()}))}t.closeFilter()};return h={closeMenu:function(){return Object.assign(n.ctxMenuStore,{visible:!1,selected:null,selectChild:null,showChild:!1}),Ie()}},p={moveCtxMenu:function(g,m,b,x,T,A){var O,I=E.findIndexOf(A,function(L){return m[b]===L});if(x)T&&Qs(m.selected)?m.showChild=!0:(m.showChild=!1,m.selectChild=null);else if(_t(g,gt.ARROW_UP)){for(var _=I-1;_>=0;_--)if(A[_].visible!==!1){O=A[_];break}m[b]=O||A[A.length-1]}else if(_t(g,gt.ARROW_DOWN)){for(var k=I+1;k<A.length;k++)if(A[k].visible!==!1){O=A[k];break}m[b]=O||A[0]}else m[b]&&(_t(g,gt.ENTER)||_t(g,gt.SPACEBAR))&&p.ctxMenuLinkEvent(g,m[b])},handleGlobalContextmenuEvent:function(g){var m=r.mouseConfig,b=r.menuConfig,x=n.editStore,T=n.ctxMenuStore,A=i.visibleColumn,O=l.value,I=s.value,_=u.value,k=d.value,L=o.value,P=x.selected,W=["header","body","footer"];if(wt(b)){if(T.visible&&I&&Pt(g,I.getRefMaps().refElem.value).flag){g.preventDefault();return}if(i._keyCtx){var q="body",V={type:q,$table:t,keyboard:!0,columns:A.slice(0),$event:g};if(m&&_.area){var G=t.getActiveCellArea();if(G&&G.row&&G.column){V.row=G.row,V.column=G.column,v(g,q,V);return}}else if(m&&_.selected&&P.row&&P.column){V.row=P.row,V.column=P.column,v(g,q,V);return}}for(var pe=0;pe<W.length;pe++){var J=W[pe],N=Pt(g,L,"vxe-".concat(J,"--column"),function(ce){return ce.parentNode.parentNode.parentNode.getAttribute("xid")===e}),V={type:J,$table:t,columns:A.slice(0),$event:g};if(N.flag){var Z=N.targetElem,le=t.getColumnNode(Z),ye=le?le.item:null,me="".concat(J,"-");if(ye&&Object.assign(V,{column:ye,columnIndex:t.getColumnIndex(ye),cell:Z}),J==="body"){var Re=t.getRowNode(Z.parentNode),be=Re?Re.item:null;me="",be&&(V.row=be,V.rowIndex=t.getRowIndex(be))}var Ce="".concat(me,"cell-menu");v(g,J,V),t.dispatchEvent(Ce,V,g);return}else if(Pt(g,L,"vxe-table--".concat(J,"-wrapper"),function(ce){return ce.getAttribute("xid")===e}).flag){k.trigger==="cell"?g.preventDefault():v(g,J,V);return}}}O&&!Pt(g,O.$el).flag&&t.closeFilter(),h.closeMenu()},ctxMenuMouseoverEvent:function(g,m,b){var x=g.currentTarget,T=n.ctxMenuStore;g.preventDefault(),g.stopPropagation(),T.selected=m,T.selectChild=b,b||(T.showChild=Qs(m),T.showChild&&Ie(function(){var A=x.nextElementSibling;if(A){var O=Ia(x),I=O.boundingTop,_=O.boundingLeft,k=O.visibleHeight,L=O.visibleWidth,P=I+x.offsetHeight,W=_+x.offsetWidth,q="",V="";W+A.offsetWidth>L-10&&(q="auto",V="".concat(x.offsetWidth,"px"));var G="",pe="";P+A.offsetHeight>k-10&&(G="auto",pe="0"),A.style.left=q,A.style.right=V,A.style.top=G,A.style.bottom=pe}}))},ctxMenuMouseoutEvent:function(g,m){var b=n.ctxMenuStore;m.children||(b.selected=null),b.selectChild=null},ctxMenuLinkEvent:function(g,m){if(!m.disabled&&(m.code||!m.children||!m.children.length)){var b=ot.menus.get(m.code),x=Object.assign({},i._currMenuParams,{menu:m,$table:t,$grid:t.xegrid,$event:g});b&&b.menuMethod&&b.menuMethod(x,g),t.dispatchEvent("menu-click",x,g),h.closeMenu()}}},Qf(Qf({},h),p)},setupGrid:function(t){return t.extendTableMethods(R7)}},Bg={Panel:Ic,install:function(t){ot.hooks.add("$tableMenu",L7),t.component(Ic.name,Ic)}},D7=Bg;Kt.component(Ic.name,Ic);var es=globalThis&&globalThis.__assign||function(){return es=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},es.apply(this,arguments)},lp=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},O7=["insert","insertAt","remove","removeCheckboxRow","removeRadioRow","removeCurrentRow","getRecordset","getInsertRecords","getRemoveRecords","getUpdateRecords","getEditRecord","getActiveRecord","getSelectedCell","clearEdit","clearActived","clearSelected","isEditByRow","isActiveByRow","setEditRow","setActiveRow","setEditCell","setActiveCell","setSelectCell"],k7={setupTable:function(t){var e=t.props,r=t.reactData,n=t.internalData,i=t.getRefMaps().refElem,a=t.getComputeMaps(),o=a.computeMouseOpts,l=a.computeEditOpts,s=a.computeCheckboxOpts,c=a.computeTreeOpts,u={},f={},d=function(b,x){var T=x.model,A=x.editRender;A&&(T.value=la(b,x),T.update=!1)},h=function(b,x){var T=x.model,A=x.editRender;A&&T.update&&(Ca(b,x,T.value),T.update=!1,T.value=null)},p=function(){var b=i.value;if(b){var x=b.querySelector(".col--selected");x&&po(x,"col--selected")}};function v(){var b=r.editStore,x=r.tableColumn,T=l.value,A=b.actived,O=A.row,I=A.column;(O||I)&&(T.mode==="row"?x.forEach(function(_){return h(O,_)}):h(O,I))}function g(b,x){var T=n.tableFullTreeData,A=n.afterFullData,O=n.fullDataRowIdData,I=n.fullAllDataRowIdData,_=c.value,k=_.rowField,L=_.parentField,P=_.mapChildrenField,W=_.children||_.childrenField,q=x?"push":"unshift";b.forEach(function(V){var G=V[L],pe=tt(t,V),J=G?E.findTree(T,function(be){return G===be[k]},{children:P}):null;if(J){var N=J.item,Z=I[tt(t,N)],le=Z?Z.level:0,ye=N[W],me=N[P];E.isArray(ye)||(ye=N[W]=[]),E.isArray(me)||(me=N[W]=[]),ye[q](V),me[q](V);var Re={row:V,rowid:pe,seq:-1,index:-1,_index:-1,$index:-1,items:ye,parent,level:le+1};O[pe]=Re,I[pe]=Re}else{A[q](V),T[q](V);var Re={row:V,rowid:pe,seq:-1,index:-1,_index:-1,$index:-1,items:T,parent:null,level:0};O[pe]=Re,I[pe]=Re}})}var m=function(b,x,T){var A=e.treeConfig,O=r.mergeList,I=r.editStore,_=n.tableFullTreeData,k=n.afterFullData,L=n.tableFullData,P=n.fullDataRowIdData,W=n.fullAllDataRowIdData,q=c.value,V=q.transform,G=q.rowField,pe=q.mapChildrenField,J=q.children||q.childrenField;E.isArray(b)||(b=[b]);var N=Jt(t.defineField(b.map(function(ve){var Te;return Object.assign(A&&V?(Te={},Te[pe]=[],Te[J]=[],Te):{},ve)})));if(!x)A&&V?g(N,!1):(k.unshift.apply(k,N),L.unshift.apply(L,N),O.forEach(function(ve){var Te=ve.row;Te>0&&(ve.row=Te+N.length)}));else if(x===-1)A&&V?g(N,!0):(k.push.apply(k,N),L.push.apply(L,N),O.forEach(function(ve){var Te=ve.row,Pe=ve.rowspan;Te+Pe>k.length&&(ve.rowspan=Pe+N.length)}));else if(A&&V){var Z=E.findTree(_,function(ve){return x[G]===ve[G]},{children:pe});if(Z){var le=Z.parent,ye=le?le[pe]:_,me=W[tt(t,le)],Re=me?me.level:0;if(N.forEach(function(ve,Te){var Pe=tt(t,ve);le&&(ve[q.parentField]=le[G]);var B=Z.index+Te;T&&(B=B+1),ye.splice(B,0,ve);var w={row:ve,rowid:Pe,seq:-1,index:-1,_index:-1,$index:-1,items:ye,parent:le,level:Re+1};P[Pe]=w,W[Pe]=w}),le){var be=E.findTree(_,function(ve){return x[G]===ve[G]},{children:J});if(be){var Ce=be.items,we=be.index;T&&(we=we+1),Ce.splice.apply(Ce,lp([we,0],N,!1))}}}else g(N,!0)}else{if(A)throw new Error(Cg("vxe.error.noTree",["insert"]));var ce=-1;if(E.isNumber(x)?x<k.length&&(ce=x):ce=t.findRowIndexOf(k,x),T&&(ce=Math.max(k.length,ce+1)),ce===-1)throw new Error(jr("vxe.error.unableInsert"));k.splice.apply(k,lp([ce,0],N,!1)),L.splice.apply(L,lp([t.findRowIndexOf(L,x),0],N,!1)),O.forEach(function(ve){var Te=ve.row,Pe=ve.rowspan;Te>ce?ve.row=Te+N.length:Te+Pe>ce&&(ve.rowspan=Pe+N.length)})}var re=I.insertMaps;return N.forEach(function(ve){var Te=tt(t,ve);re[Te]=ve}),t.cacheRowMap(),t.updateScrollYStatus(),t.handleTableData(A&&V),A&&V||t.updateAfterDataIndex(),t.updateFooter(),t.checkSelectionStatus(),r.scrollYLoad&&t.updateScrollYSpace(),Ie().then(function(){return t.updateCellAreas(),t.recalculate()}).then(function(){return{row:N.length?N[N.length-1]:null,rows:N}})};return u={insert:function(b){return m(b,null)},insertAt:function(b,x){return m(b,x)},insertNextAt:function(b,x){return m(b,x,!0)},remove:function(b){var x=e.treeConfig,T=r.mergeList,A=r.editStore,O=r.selectCheckboxMaps,I=n.tableFullTreeData,_=n.afterFullData,k=n.tableFullData,L=s.value,P=c.value,W=P.transform,q=P.mapChildrenField,V=P.children||P.childrenField,G=A.actived,pe=A.removeMaps,J=A.insertMaps,N=L.checkField,Z=[];if(b?E.isArray(b)||(b=[b]):b=k,b.forEach(function(ye){if(!t.isInsertByRow(ye)){var me=tt(t,ye);pe[me]=ye}}),!N){var le=es({},O);b.forEach(function(ye){var me=tt(t,ye);le[me]&&delete le[me]}),r.selectCheckboxMaps=le}return k===b?(b=Z=k.slice(0),n.tableFullData=[],n.afterFullData=[],t.clearMergeCells()):x&&W?b.forEach(function(ye){var me=tt(t,ye),Re=E.findTree(I,function(ce){return me===tt(t,ce)},{children:q});if(Re){var be=Re.items.splice(Re.index,1);Z.push(be[0])}var Ce=E.findTree(I,function(ce){return me===tt(t,ce)},{children:V});Ce&&Ce.items.splice(Ce.index,1);var we=t.findRowIndexOf(_,ye);we>-1&&_.splice(we,1)}):b.forEach(function(ye){var me=t.findRowIndexOf(k,ye);if(me>-1){var Re=k.splice(me,1);Z.push(Re[0])}var be=t.findRowIndexOf(_,ye);be>-1&&(T.forEach(function(Ce){var we=Ce.row,ce=Ce.rowspan;we>be?Ce.row=we-1:we+ce>be&&(Ce.rowspan=ce-1)}),_.splice(be,1))}),G.row&&t.findRowIndexOf(b,G.row)>-1&&u.clearEdit(),b.forEach(function(ye){var me=tt(t,ye);J[me]&&delete J[me]}),t.updateFooter(),t.cacheRowMap(),t.handleTableData(x&&W),x&&W||t.updateAfterDataIndex(),t.checkSelectionStatus(),r.scrollYLoad&&t.updateScrollYSpace(),Ie().then(function(){return t.updateCellAreas(),t.recalculate()}).then(function(){return{row:Z.length?Z[Z.length-1]:null,rows:Z}})},removeCheckboxRow:function(){return u.remove(t.getCheckboxRecords()).then(function(b){return t.clearCheckboxRow(),b})},removeRadioRow:function(){var b=t.getRadioRecord();return u.remove(b||[]).then(function(x){return t.clearRadioRow(),x})},removeCurrentRow:function(){var b=t.getCurrentRecord();return u.remove(b||[]).then(function(x){return t.clearCurrentRow(),x})},getRecordset:function(){return{insertRecords:u.getInsertRecords(),removeRecords:u.getRemoveRecords(),updateRecords:u.getUpdateRecords()}},getInsertRecords:function(){var b=r.editStore,x=n.fullAllDataRowIdData,T=b.insertMaps,A=[];return E.each(T,function(O,I){x[I]&&A.push(O)}),A},getRemoveRecords:function(){var b=r.editStore,x=b.removeMaps,T=[];return E.each(x,function(A){T.push(A)}),T},getUpdateRecords:function(){var b=e.keepSource,x=e.treeConfig,T=n.tableFullData,A=c.value;return b?(v(),x?E.filterTree(T,function(O){return t.isUpdateByRow(O)},A):T.filter(function(O){return t.isUpdateByRow(O)})):[]},getActiveRecord:function(){return this.getEditRecord()},getEditRecord:function(){var b=r.editStore,x=n.afterFullData,T=i.value,A=b.actived,O=A.args,I=A.row;return O&&t.findRowIndexOf(x,I)>-1&&T.querySelectorAll(".vxe-body--column.col--actived").length?Object.assign({},O):null},getSelectedCell:function(){var b=r.editStore,x=b.selected,T=x.args,A=x.column;return T&&A?Object.assign({},T):null},clearActived:function(b){return this.clearEdit(b)},clearEdit:function(b){var x=r.editStore,T=x.actived,A=T.row,O=T.column;return(A||O)&&(v(),T.args=null,T.row=null,T.column=null,t.updateFooter(),t.dispatchEvent("edit-closed",{row:A,rowIndex:t.getRowIndex(A),$rowIndex:t.getVMRowIndex(A),column:O,columnIndex:t.getColumnIndex(O),$columnIndex:t.getVMColumnIndex(O)},b||null)),H.cellVaildMode==="obsolete"&&t.clearValidate?t.clearValidate():Ie()},clearSelected:function(){var b=r.editStore,x=b.selected;return x.row=null,x.column=null,p(),Ie()},isActiveByRow:function(b){return this.isEditByRow(b)},isEditByRow:function(b){var x=r.editStore;return x.actived.row===b},setActiveRow:function(b){return u.setEditRow(b)},setEditRow:function(b){var x=n.visibleColumn;return t.setEditCell(b,E.find(x,function(T){return wt(T.editRender)}))},setActiveCell:function(b,x){return u.setEditCell(b,x)},setEditCell:function(b,x){var T=e.editConfig,A=E.isString(x)?t.getColumnByField(x):x;return b&&A&&wt(T)&&wt(A.editRender)?t.scrollToRow(b,A).then(function(){var O=t.getCell(b,A);return O&&(f.handleActived({row:b,rowIndex:t.getRowIndex(b),column:A,columnIndex:t.getColumnIndex(A),cell:O,$table:t}),n._lastCallTime=Date.now()),Ie()}):Ie()},setSelectCell:function(b,x){var T=r.tableData,A=l.value,O=E.isString(x)?t.getColumnByField(x):x;if(b&&O&&A.trigger!=="manual"){var I=t.findRowIndexOf(T,b);if(I>-1&&O){var _=t.getCell(b,O),k={row:b,rowIndex:I,column:O,columnIndex:t.getColumnIndex(O),cell:_};t.handleSelected(k,{})}}return Ie()}},f={handleActived:function(b,x){var T=e.editConfig,A=e.mouseConfig,O=r.editStore,I=r.tableColumn,_=l.value,k=_.mode,L=O.actived,P=b.row,W=b.column,q=W.editRender,V=b.cell||t.getCell(P,W),G=_.beforeEditMethod||_.activeMethod;if(b.cell=V,wt(T)&&wt(q)&&V){if(L.row!==P||k==="cell"&&L.column!==W){var pe="edit-disabled";(!G||G(es(es({},b),{$table:t})))&&(A&&(u.clearSelected(),t.clearCellAreas&&(t.clearCellAreas(),t.clearCopyCellArea())),t.closeTooltip(),L.column&&u.clearEdit(x),pe="edit-actived",W.renderHeight=V.offsetHeight,L.args=b,L.row=P,L.column=W,k==="row"?I.forEach(function(Z){return d(P,Z)}):d(P,W),Ie(function(){f.handleFocus(b,x)})),t.dispatchEvent(pe,{row:P,rowIndex:t.getRowIndex(P),$rowIndex:t.getVMRowIndex(P),column:W,columnIndex:t.getColumnIndex(W),$columnIndex:t.getVMColumnIndex(W)},x)}else{var J=L.column;if(A&&(u.clearSelected(),t.clearCellAreas&&(t.clearCellAreas(),t.clearCopyCellArea())),J!==W){var N=J.model;N.update&&Ca(P,J,N.value),t.clearValidate&&t.clearValidate(P,W)}W.renderHeight=V.offsetHeight,L.args=b,L.column=W,setTimeout(function(){f.handleFocus(b,x)})}t.focus()}return Ie()},handleFocus:function(b){var x=b.row,T=b.column,A=b.cell,O=T.editRender;if(wt(O)){var I=as.get(O.name),_=O.autofocus,k=O.autoselect,L=void 0;if(!_&&I&&(_=I.autofocus),!k&&I&&(k=I.autoselect),E.isFunction(_)?L=_.call(this,b):_&&(L=A.querySelector(_),L&&L.focus()),L){if(k)L.select();else if(ii.msie){var P=L.createTextRange();P.collapse(!1),P.select()}}else t.scrollToRow(x,T)}},handleSelected:function(b,x){var T=e.mouseConfig,A=r.editStore,O=o.value,I=l.value,_=A.actived,k=A.selected,L=b.row,P=b.column,W=T&&O.selected,q=function(){return W&&(k.row!==L||k.column!==P)&&(_.row!==L||I.mode==="cell"&&_.column!==P)&&(u.clearEdit(x),u.clearSelected(),t.clearCellAreas&&(t.clearCellAreas(),t.clearCopyCellArea()),k.args=b,k.row=L,k.column=P,W&&f.addCellSelectedClass(),t.focus(),x&&t.dispatchEvent("cell-selected",b,x)),Ie()};return q()},addCellSelectedClass:function(){var b=r.editStore,x=b.selected,T=x.row,A=x.column;if(p(),T&&A){var O=t.getCell(T,A);O&&is(O,"col--selected")}}},es(es({},u),f)},setupGrid:function(t){return t.extendTableMethods(O7)}},Ug={install:function(){ot.hooks.add("$tableEdit",k7)}},M7=Ug;function qr(t){var e=ct("xesize",null),r=_e(function(){return t.size||(e?e.value:null)});return sr("xesize",r),r}const $i=xt({name:"VxeButton",props:{type:String,className:[String,Function],popupClassName:[String,Function],size:{type:String,default:function(){return H.button.size||H.size}},name:[String,Number],content:String,placement:String,status:String,icon:String,round:Boolean,circle:Boolean,disabled:Boolean,loading:Boolean,destroyOnClose:Boolean,transfer:{type:Boolean,default:function(){return H.button.transfer}}},emits:["click","dropdown-click"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=Jt({inited:!1,showPanel:!1,animatVisible:!1,panelIndex:0,panelStyle:{},panelPlacement:""}),l={showTime:null},s=je(),c=je(),u=je(),f={refElem:s},d={xID:i,props:t,context:e,reactData:o,internalData:l,getRefMaps:function(){return f}},h={},p=_e(function(){var P=t.type;return P?["submit","reset","button"].indexOf(P)>-1:!1}),v=_e(function(){var P=t.type;return P&&P==="text"?P:"button"}),g=function(){o.panelIndex<Ba()&&(o.panelIndex=sa())},m=function(){return Ie().then(function(){var P=t.transfer,W=t.placement,q=o.panelIndex,V=c.value,G=u.value;if(G&&V){var pe=V.offsetHeight,J=V.offsetWidth,N=G.offsetHeight,Z=G.offsetWidth,le=5,ye={zIndex:q},me=Ia(V),Re=me.top,be=me.left,Ce=me.boundingTop,we=me.visibleHeight,ce=me.visibleWidth,re="bottom";if(P){var ve=be+J-Z,Te=Re+pe;W==="top"?(re="top",Te=Re-N):W||(Ce+pe+N+le>we&&(re="top",Te=Re-N),Te<le&&(re="bottom",Te=Re+pe)),ve+Z+le>ce&&(ve-=ve+Z+le-ce),ve<le&&(ve=le),Object.assign(ye,{left:"".concat(ve,"px"),right:"auto",top:"".concat(Te,"px"),minWidth:"".concat(J,"px")})}else W==="top"?(re="top",ye.bottom="".concat(pe,"px")):W||Ce+pe+N>we&&Ce-pe-N>le&&(re="top",ye.bottom="".concat(pe,"px"));return o.panelStyle=ye,o.panelPlacement=re,Ie()}})},b=function(P){h.dispatchEvent("click",{$event:P},P)},x=function(P){var W=P.button===0;W&&P.stopPropagation()},T=function(P){var W=P.currentTarget,q=u.value,V=Pt(P,W,"vxe-button"),G=V.flag,pe=V.targetElem;G&&(q&&(q.dataset.active="N"),o.showPanel=!1,setTimeout(function(){(!q||q.dataset.active!=="Y")&&(o.animatVisible=!1)},350),h.dispatchEvent("dropdown-click",{name:pe.getAttribute("name"),$event:P},P))},A=function(){var P=u.value;P&&(P.dataset.active="Y",o.animatVisible=!0,setTimeout(function(){P.dataset.active==="Y"&&(o.showPanel=!0,g(),m(),setTimeout(function(){o.showPanel&&m()},50))},20))},O=function(){var P=u.value;P&&(P.dataset.active="Y",o.inited||(o.inited=!0),l.showTime=setTimeout(function(){P.dataset.active==="Y"?A():o.animatVisible=!1},250))},I=function(){var P=u.value;clearTimeout(l.showTime),P?(P.dataset.active="N",setTimeout(function(){P.dataset.active!=="Y"&&(o.showPanel=!1,setTimeout(function(){P.dataset.active!=="Y"&&(o.animatVisible=!1)},350))},100)):(o.animatVisible=!1,o.showPanel=!1)},_=function(){I()},k=function(){var P=t.content,W=t.icon,q=t.loading,V=[];return q?V.push(D("i",{class:["vxe-button--loading-icon",H.icon.BUTTON_LOADING]})):r.icon?V.push(D("span",{class:"vxe-button--custom-icon"},r.icon({}))):W&&V.push(D("i",{class:["vxe-button--icon",W]})),r.default?V.push(D("span",{class:"vxe-button--content"},r.default({}))):P&&V.push(D("span",{class:"vxe-button--content"},Ar(P))),V};h={dispatchEvent:function(P,W,q){n(P,Object.assign({$button:d,$event:q},W))},focus:function(){var P=c.value;return P.focus(),Ie()},blur:function(){var P=c.value;return P.blur(),Ie()}},Object.assign(d,h),Er(function(){bt.on(d,"mousewheel",function(P){var W=u.value;o.showPanel&&!Pt(P,W).flag&&I()})}),Rr(function(){bt.off(d,"mousewheel")});var L=function(){var P,W,q,V,G=t.className,pe=t.popupClassName,J=t.transfer,N=t.type,Z=t.round,le=t.circle,ye=t.destroyOnClose,me=t.status,Re=t.name,be=t.disabled,Ce=t.loading,we=o.inited,ce=o.showPanel,re=p.value,ve=v.value,Te=a.value;return r.dropdowns?D("div",{ref:s,class:["vxe-button--dropdown",G?E.isFunction(G)?G({$button:d}):G:"",(P={},P["size--".concat(Te)]=Te,P["is--active"]=ce,P)]},[D("button",{ref:c,class:["vxe-button","type--".concat(ve),(W={},W["size--".concat(Te)]=Te,W["theme--".concat(me)]=me,W["is--round"]=Z,W["is--circle"]=le,W["is--disabled"]=be||Ce,W["is--loading"]=Ce,W)],name:Re,type:re?N:"button",disabled:be||Ce,onMouseenter:O,onMouseleave:_,onClick:b},k().concat([D("i",{class:"vxe-button--dropdown-arrow ".concat(H.icon.BUTTON_DROPDOWN)})])),D(Ll,{to:"body",disabled:J?!we:!0},[D("div",{ref:u,class:["vxe-button--dropdown-panel",pe?E.isFunction(pe)?pe({$button:d}):pe:"",(q={},q["size--".concat(Te)]=Te,q["animat--leave"]=o.animatVisible,q["animat--enter"]=ce,q)],placement:o.panelPlacement,style:o.panelStyle},we?[D("div",{class:"vxe-button--dropdown-wrapper",onMousedown:x,onClick:T,onMouseenter:A,onMouseleave:_},ye&&!ce?[]:r.dropdowns({}))]:[])])]):D("button",{ref:c,class:["vxe-button","type--".concat(ve),(V={},V["size--".concat(Te)]=Te,V["theme--".concat(me)]=me,V["is--round"]=Z,V["is--circle"]=le,V["is--disabled"]=be||Ce,V["is--loading"]=Ce,V)],name:Re,type:re?N:"button",disabled:be||Ce,onClick:b},k())};return d.renderVN=L,d},render:function(){return this.renderVN()}}),cp=xt({name:"VxeLoading",props:{modelValue:Boolean,icon:String,text:String},setup:function(t,e){var r=e.slots,n=_e(function(){return t.icon||H.icon.LOADING}),i=_e(function(){var a=H.loadingText;return t.text||(a===null?a:H.i18n("vxe.loading.text"))});return function(){var a=n.value,o=i.value;return D("div",{class:["vxe-loading",{"is--visible":t.modelValue}]},r.default?[D("div",{class:"vxe-loading--warpper"},r.default({}))]:[D("div",{class:"vxe-loading--chunk"},[a?D("i",{class:a}):D("div",{class:"vxe-loading--spinner"}),o?D("div",{class:"vxe-loading--text"},"".concat(o)):null])])}}});var Jd=Object.assign(cp,{install:function(t){t.component(cp.name,cp)}}),jv=globalThis&&globalThis.__assign||function(){return jv=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jv.apply(this,arguments)},os=[],ac=[];const ps=xt({name:"VxeModal",props:{modelValue:Boolean,id:String,type:{type:String,default:"modal"},loading:{type:Boolean,default:null},status:String,iconStatus:String,className:String,top:{type:[Number,String],default:function(){return H.modal.top}},position:[String,Object],title:String,duration:{type:[Number,String],default:function(){return H.modal.duration}},message:[Number,String],content:[Number,String],cancelButtonText:{type:String,default:function(){return H.modal.cancelButtonText}},confirmButtonText:{type:String,default:function(){return H.modal.confirmButtonText}},lockView:{type:Boolean,default:function(){return H.modal.lockView}},lockScroll:Boolean,mask:{type:Boolean,default:function(){return H.modal.mask}},maskClosable:{type:Boolean,default:function(){return H.modal.maskClosable}},escClosable:{type:Boolean,default:function(){return H.modal.escClosable}},resize:Boolean,showHeader:{type:Boolean,default:function(){return H.modal.showHeader}},showFooter:{type:Boolean,default:function(){return H.modal.showFooter}},showZoom:Boolean,showClose:{type:Boolean,default:function(){return H.modal.showClose}},dblclickZoom:{type:Boolean,default:function(){return H.modal.dblclickZoom}},width:[Number,String],height:[Number,String],minWidth:{type:[Number,String],default:function(){return H.modal.minWidth}},minHeight:{type:[Number,String],default:function(){return H.modal.minHeight}},zIndex:Number,marginSize:{type:[Number,String],default:function(){return H.modal.marginSize}},fullscreen:Boolean,draggable:{type:Boolean,default:function(){return H.modal.draggable}},remember:{type:Boolean,default:function(){return H.modal.remember}},destroyOnClose:{type:Boolean,default:function(){return H.modal.destroyOnClose}},showTitleOverflow:{type:Boolean,default:function(){return H.modal.showTitleOverflow}},transfer:{type:Boolean,default:function(){return H.modal.transfer}},storage:{type:Boolean,default:function(){return H.modal.storage}},storageKey:{type:String,default:function(){return H.modal.storageKey}},animat:{type:Boolean,default:function(){return H.modal.animat}},size:{type:String,default:function(){return H.modal.size||H.size}},beforeHideMethod:{type:Function,default:function(){return H.modal.beforeHideMethod}},slots:Object},emits:["update:modelValue","show","hide","before-hide","close","confirm","cancel","zoom"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=Jt({inited:!1,visible:!1,contentVisible:!1,modalTop:0,modalZindex:0,zoomLocat:null,firstOpen:!0}),l=je(),s=je(),c=je(),u=je(),f={refElem:l},d={xID:i,props:t,context:e,reactData:o,getRefMaps:function(){return f}},h={},p=_e(function(){return t.type==="message"}),v=function(){var w=s.value;return w},g=function(){var w=t.width,C=t.height,j=v();return j.style.width="".concat(w?isNaN(w)?w:"".concat(w,"px"):""),j.style.height="".concat(C?isNaN(C)?C:"".concat(C,"px"):""),Ie()},m=function(){var w=t.zIndex,C=o.modalZindex;w?o.modalZindex=w:C<Ba()&&(o.modalZindex=sa())},b=function(){return Ie().then(function(){var w=t.position,C=E.toNumber(t.marginSize),j=v(),ie=document.documentElement.clientWidth||document.body.clientWidth,ne=document.documentElement.clientHeight||document.body.clientHeight,X=w==="center",ee=E.isString(w)?{top:w,left:w}:Object.assign({},w),de=ee.top,oe=ee.left,te=X||de==="center",he=X||oe==="center",ke="",se="";oe&&!he?se=isNaN(oe)?oe:"".concat(oe,"px"):se="".concat(Math.max(C,ie/2-j.offsetWidth/2),"px"),de&&!te?ke=isNaN(de)?de:"".concat(de,"px"):ke="".concat(Math.max(C,ne/2-j.offsetHeight/2),"px"),j.style.top=ke,j.style.left=se})},x=function(){Ie(function(){var w=0;ac.forEach(function(C){var j=C.getBox();w+=E.toNumber(C.props.top),C.reactData.modalTop=w,w+=j.clientHeight})})},T=function(){ac.indexOf(d)>-1&&E.remove(ac,function(w){return w===d}),x()},A=function(w){var C=t.remember,j=t.beforeHideMethod,ie=o.visible,ne=p.value,X={type:w};return ie&&Promise.resolve(j?j(X):null).then(function(ee){E.isError(ee)||(ne&&T(),o.contentVisible=!1,C||(o.zoomLocat=null),E.remove(os,function(de){return de===d}),h.dispatchEvent("before-hide",X),setTimeout(function(){o.visible=!1,n("update:modelValue",!1),h.dispatchEvent("hide",X)},200))}).catch(function(ee){return ee}),Ie()},O=function(w){var C="close";h.dispatchEvent(C,{type:C},w),A(C)},I=function(w){var C="confirm";h.dispatchEvent(C,{type:C},w),A(C)},_=function(w){var C="cancel";h.dispatchEvent(C,{type:C},w),A(C)},k=function(w){var C=H.version,j=E.toStringJSON(localStorage.getItem(w)||"");return j&&j._v===C?j:{_v:C}},L=function(){var w=t.id,C=t.remember,j=t.storage,ie=t.storageKey;return!!(w&&C&&j&&k(ie)[w])},P=function(){var w=t.id,C=t.remember,j=t.storage,ie=t.storageKey;if(w&&C&&j){var ne=k(ie)[w];if(ne){var X=v(),ee=ne.split(","),de=ee[0],oe=ee[1],te=ee[2],he=ee[3],ke=ee[4],se=ee[5],ue=ee[6],xe=ee[7];de&&(X.style.left="".concat(de,"px")),oe&&(X.style.top="".concat(oe,"px")),te&&(X.style.width="".concat(te,"px")),he&&(X.style.height="".concat(he,"px")),ke&&se&&(o.zoomLocat={left:ke,top:se,width:ue,height:xe})}}},W=function(){ac.indexOf(d)===-1&&ac.push(d),x()},q=function(){var w=t.id,C=t.remember,j=t.storage,ie=t.storageKey,ne=o.zoomLocat;if(w&&C&&j){var X=v(),ee=k(ie);ee[w]=[X.style.left,X.style.top,X.style.width,X.style.height].concat(ne?[ne.left,ne.top,ne.width,ne.height]:[]).map(function(de){return de?E.toNumber(de):""}).join(","),localStorage.setItem(ie,E.toJSONString(ee))}},V=function(){return Ie().then(function(){if(!o.zoomLocat){var w=Math.max(0,E.toNumber(t.marginSize)),C=v(),j=go(),ie=j.visibleHeight,ne=j.visibleWidth;o.zoomLocat={top:C.offsetTop,left:C.offsetLeft,width:C.offsetWidth+(C.style.width?0:1),height:C.offsetHeight+(C.style.height?0:1)},Object.assign(C.style,{top:"".concat(w,"px"),left:"".concat(w,"px"),width:"".concat(ne-w*2,"px"),height:"".concat(ie-w*2,"px")}),q()}})},G=function(){var w=t.duration,C=t.remember,j=t.showFooter,ie=o.inited,ne=o.visible,X=p.value;return ie||(o.inited=!0),ne||(C||g(),o.visible=!0,o.contentVisible=!1,m(),os.push(d),setTimeout(function(){o.contentVisible=!0,Ie(function(){if(j){var ee=c.value,de=u.value,oe=ee||de;oe&&oe.focus()}var te="",he={type:te};n("update:modelValue",!0),h.dispatchEvent("show",he)})},10),X?(W(),w!==-1&&setTimeout(function(){return A("close")},E.toNumber(w))):Ie(function(){var ee=t.fullscreen,de=o.firstOpen;(!C||de)&&b().then(function(){setTimeout(function(){return b()},20)}),de?(o.firstOpen=!1,L()?P():ee&&Ie(function(){return V()})):ee&&Ie(function(){return V()})})),Ie()},pe=function(w){var C=l.value;if(t.maskClosable&&w.target===C){var j="mask";A(j)}},J=function(w){var C=_t(w,gt.ESCAPE);if(C){var j=E.max(os,function(ie){return ie.reactData.modalZindex});j&&setTimeout(function(){j===d&&j.props.escClosable&&A("exit")},10)}},N=function(){return!!o.zoomLocat},Z=function(){return Ie().then(function(){var w=o.zoomLocat;if(w){var C=v();o.zoomLocat=null,Object.assign(C.style,{top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),width:"".concat(w.width,"px"),height:"".concat(w.height,"px")}),q()}})},le=function(){return o.zoomLocat?Z().then(function(){return N()}):V().then(function(){return N()})},ye=function(w){var C=o.zoomLocat,j={type:C?"revert":"max"};return le().then(function(){h.dispatchEvent("zoom",j,w)})},me=function(){var w=p.value;if(!w){var C=v();if(C)return{top:C.offsetTop,left:C.offsetLeft}}return null},Re=function(w,C){var j=p.value;if(!j){var ie=v();E.isNumber(w)&&(ie.style.top="".concat(w,"px")),E.isNumber(C)&&(ie.style.left="".concat(C,"px"))}return Ie()},be=function(){var w=o.modalZindex;os.some(function(C){return C.reactData.visible&&C.reactData.modalZindex>w})&&m()},Ce=function(w){var C=t.remember,j=t.storage,ie=o.zoomLocat,ne=E.toNumber(t.marginSize),X=v();if(!ie&&w.button===0&&!Pt(w,X,"trigger--btn").flag){w.preventDefault();var ee=document.onmousemove,de=document.onmouseup,oe=w.clientX-X.offsetLeft,te=w.clientY-X.offsetTop,he=go(),ke=he.visibleHeight,se=he.visibleWidth;document.onmousemove=function(ue){ue.preventDefault();var xe=X.offsetWidth,De=X.offsetHeight,U=ne,ge=se-xe-ne-1,Se=ne,$e=ke-De-ne-1,Ue=ue.clientX-oe,We=ue.clientY-te;Ue>ge&&(Ue=ge),Ue<U&&(Ue=U),We>$e&&(We=$e),We<Se&&(We=Se),X.style.left="".concat(Ue,"px"),X.style.top="".concat(We,"px"),X.className=X.className.replace(/\s?is--drag/,"")+" is--drag"},document.onmouseup=function(){document.onmousemove=ee,document.onmouseup=de,C&&j&&Ie(function(){q()}),setTimeout(function(){X.className=X.className.replace(/\s?is--drag/,"")},50)}}},we=function(w){w.preventDefault();var C=t.remember,j=t.storage,ie=go(),ne=ie.visibleHeight,X=ie.visibleWidth,ee=E.toNumber(t.marginSize),de=w.target,oe=de.getAttribute("type"),te=E.toNumber(t.minWidth),he=E.toNumber(t.minHeight),ke=X,se=ne,ue=v(),xe=document.onmousemove,De=document.onmouseup,U=ue.clientWidth,ge=ue.clientHeight,Se=w.clientX,$e=w.clientY,Ue=ue.offsetTop,We=ue.offsetLeft,Je={type:"resize"};document.onmousemove=function(nt){nt.preventDefault();var Qe,Ke,at,Q;switch(oe){case"wl":Qe=Se-nt.clientX,at=Qe+U,We-Qe>ee&&at>te&&(ue.style.width="".concat(at<ke?at:ke,"px"),ue.style.left="".concat(We-Qe,"px"));break;case"swst":Qe=Se-nt.clientX,Ke=$e-nt.clientY,at=Qe+U,Q=Ke+ge,We-Qe>ee&&at>te&&(ue.style.width="".concat(at<ke?at:ke,"px"),ue.style.left="".concat(We-Qe,"px")),Ue-Ke>ee&&Q>he&&(ue.style.height="".concat(Q<se?Q:se,"px"),ue.style.top="".concat(Ue-Ke,"px"));break;case"swlb":Qe=Se-nt.clientX,Ke=nt.clientY-$e,at=Qe+U,Q=Ke+ge,We-Qe>ee&&at>te&&(ue.style.width="".concat(at<ke?at:ke,"px"),ue.style.left="".concat(We-Qe,"px")),Ue+Q+ee<ne&&Q>he&&(ue.style.height="".concat(Q<se?Q:se,"px"));break;case"st":Ke=$e-nt.clientY,Q=ge+Ke,Ue-Ke>ee&&Q>he&&(ue.style.height="".concat(Q<se?Q:se,"px"),ue.style.top="".concat(Ue-Ke,"px"));break;case"wr":Qe=nt.clientX-Se,at=Qe+U,We+at+ee<X&&at>te&&(ue.style.width="".concat(at<ke?at:ke,"px"));break;case"sest":Qe=nt.clientX-Se,Ke=$e-nt.clientY,at=Qe+U,Q=Ke+ge,We+at+ee<X&&at>te&&(ue.style.width="".concat(at<ke?at:ke,"px")),Ue-Ke>ee&&Q>he&&(ue.style.height="".concat(Q<se?Q:se,"px"),ue.style.top="".concat(Ue-Ke,"px"));break;case"selb":Qe=nt.clientX-Se,Ke=nt.clientY-$e,at=Qe+U,Q=Ke+ge,We+at+ee<X&&at>te&&(ue.style.width="".concat(at<ke?at:ke,"px")),Ue+Q+ee<ne&&Q>he&&(ue.style.height="".concat(Q<se?Q:se,"px"));break;case"sb":Ke=nt.clientY-$e,Q=Ke+ge,Ue+Q+ee<ne&&Q>he&&(ue.style.height="".concat(Q<se?Q:se,"px"));break}ue.className=ue.className.replace(/\s?is--drag/,"")+" is--drag",C&&j&&q(),h.dispatchEvent("zoom",Je,nt)},document.onmouseup=function(){o.zoomLocat=null,document.onmousemove=xe,document.onmouseup=De,setTimeout(function(){ue.className=ue.className.replace(/\s?is--drag/,"")},50)}},ce=function(){var w=t.slots,C=w===void 0?{}:w,j=t.showClose,ie=t.showZoom,ne=t.title,X=o.zoomLocat,ee=r.title||C.title,de=r.corner||C.corner,oe=[D("div",{class:"vxe-modal--header-title"},ee?pr(ee({$modal:d})):ne?Ar(ne):H.i18n("vxe.alert.title"))],te=[];return de&&te.push(D("span",{class:"vxe-modal--corner-warpper"},pr(de({$modal:d})))),ie&&te.push(D("i",{class:["vxe-modal--zoom-btn","trigger--btn",X?H.icon.MODAL_ZOOM_OUT:H.icon.MODAL_ZOOM_IN],title:H.i18n("vxe.modal.zoom".concat(X?"Out":"In")),onClick:ye})),j&&te.push(D("i",{class:["vxe-modal--close-btn","trigger--btn",H.icon.MODAL_CLOSE],title:H.i18n("vxe.modal.close"),onClick:O})),oe.push(D("div",{class:"vxe-modal--header-right"},te)),oe},re=function(){var w=t.slots,C=w===void 0?{}:w,j=t.showZoom,ie=t.draggable,ne=p.value,X=r.header||C.header,ee=[];if(t.showHeader){var de={};ie&&(de.onMousedown=Ce),j&&t.dblclickZoom&&t.type==="modal"&&(de.onDblclick=ye),ee.push(D("div",jv({class:["vxe-modal--header",{"is--draggable":ie,"is--ellipsis":!ne&&t.showTitleOverflow}]},de),X?!o.inited||t.destroyOnClose&&!o.visible?[]:pr(X({$modal:d})):ce()))}return ee},ve=function(){var w=t.slots,C=w===void 0?{}:w,j=t.status,ie=t.message,ne=t.content||ie,X=p.value,ee=r.default||C.default,de=[];return j&&de.push(D("div",{class:"vxe-modal--status-wrapper"},[D("i",{class:["vxe-modal--status-icon",t.iconStatus||H.icon["MODAL_".concat(j).toLocaleUpperCase()]]})])),de.push(D("div",{class:"vxe-modal--content"},ee?!o.inited||t.destroyOnClose&&!o.visible?[]:pr(ee({$modal:d})):Ar(ne))),X||de.push(D(Jd,{class:"vxe-modal--loading",modelValue:t.loading})),[D("div",{class:"vxe-modal--body"},de)]},Te=function(){var w=t.type,C=[];return w==="confirm"&&C.push(D($i,{ref:u,content:t.cancelButtonText||H.i18n("vxe.button.cancel"),onClick:_})),C.push(D($i,{ref:c,status:"primary",content:t.confirmButtonText||H.i18n("vxe.button.confirm"),onClick:I})),C},Pe=function(){var w=t.slots,C=w===void 0?{}:w,j=p.value,ie=r.footer||C.footer,ne=[];return t.showFooter&&ne.push(D("div",{class:"vxe-modal--footer"},ie?!o.inited||t.destroyOnClose&&!o.visible?[]:pr(ie({$modal:d})):Te())),!j&&t.resize&&ne.push(D("span",{class:"vxe-modal--resize"},["wl","wr","swst","sest","st","swlb","selb","sb"].map(function(X){return D("span",{class:"".concat(X,"-resize"),type:X,onMousedown:we})}))),ne};h={dispatchEvent:function(w,C,j){n(w,Object.assign({$modal:d,$event:j},C))},open:G,close:function(){return A("close")},getBox:v,getPosition:me,setPosition:Re,isMaximized:N,zoom:le,maximize:V,revert:Z},Object.assign(d,h),st(function(){return t.width},g),st(function(){return t.height},g),st(function(){return t.modelValue},function(w){w?G():A("model")}),Er(function(){Ie(function(){t.storage&&!t.id&&jr("vxe.error.reqProp",["modal.id"]),t.modelValue&&G(),g()}),t.escClosable&&bt.on(d,"keydown",J)}),Rr(function(){bt.off(d,"keydown"),T()});var B=function(){var w,C=t.className,j=t.type,ie=t.animat,ne=t.loading,X=t.status,ee=t.lockScroll,de=t.lockView,oe=t.mask,te=t.resize,he=o.inited,ke=o.zoomLocat,se=o.modalTop,ue=o.contentVisible,xe=o.visible,De=a.value;return D(Ll,{to:"body",disabled:t.transfer?!he:!0},[D("div",{ref:l,class:["vxe-modal--wrapper","type--".concat(j),C||"",(w={},w["size--".concat(De)]=De,w["status--".concat(X)]=X,w["is--animat"]=ie,w["lock--scroll"]=ee,w["lock--view"]=de,w["is--resize"]=te,w["is--mask"]=oe,w["is--maximize"]=ke,w["is--visible"]=ue,w["is--active"]=xe,w["is--loading"]=ne,w)],style:{zIndex:o.modalZindex,top:se?"".concat(se,"px"):null},onClick:pe},[D("div",{ref:s,class:"vxe-modal--box",onMousedown:be},re().concat(ve(),Pe()))])])};return d.renderVN=B,d},render:function(){return this.renderVN()}});function F7(t){if(t){var e=new Date,r=0,n=0,i=0;if(E.isDate(t))r=t.getHours(),n=t.getMinutes(),i=t.getSeconds();else{t=E.toValueString(t);var a=t.match(/^(\d{1,2})(:(\d{1,2}))?(:(\d{1,2}))?/);a&&(r=E.toNumber(a[1]),n=E.toNumber(a[3]),i=E.toNumber(a[5]))}return e.setHours(r),e.setMinutes(n),e.setSeconds(i),e}return new Date("")}function RA(t){var e=t.getMonth();return e<3?1:e<6?2:e<9?3:4}function Ns(t){return E.isString(t)?t.replace(/,/g,""):t}function LA(t,e){return/^-/.test(""+t)?E.toFixed(E.ceil(t,e),e):E.toFixed(E.floor(t,e),e)}var DA=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},ba=12,P7=20,N7=8;const _a=xt({name:"VxeInput",props:{modelValue:[String,Number,Date],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"text"},clearable:{type:Boolean,default:function(){return H.input.clearable}},readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:function(){return E.eqNull(H.input.placeholder)?H.i18n("vxe.base.pleaseInput"):H.input.placeholder}},maxlength:[String,Number],autocomplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:function(){return H.input.size||H.size}},multiple:Boolean,showWordCount:Boolean,countMethod:Function,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],exponential:{type:Boolean,default:function(){return H.input.exponential}},controls:{type:Boolean,default:function(){return H.input.controls}},digits:{type:[String,Number],default:function(){return H.input.digits}},startDate:{type:[String,Number,Date],default:function(){return H.input.startDate}},endDate:{type:[String,Number,Date],default:function(){return H.input.endDate}},minDate:[String,Number,Date],maxDate:[String,Number,Date],startWeek:Number,startDay:{type:[String,Number],default:function(){return H.input.startDay}},labelFormat:{type:String,default:function(){return H.input.labelFormat}},valueFormat:{type:String,default:function(){return H.input.valueFormat}},editable:{type:Boolean,default:!0},festivalMethod:{type:Function,default:function(){return H.input.festivalMethod}},disabledMethod:{type:Function,default:function(){return H.input.disabledMethod}},selectDay:{type:[String,Number],default:function(){return H.input.selectDay}},prefixIcon:String,suffixIcon:String,placement:String,transfer:{type:Boolean,default:function(){return H.input.transfer}}},emits:["update:modelValue","input","change","keydown","keyup","wheel","click","focus","blur","clear","search-click","toggle-visible","prev-number","next-number","prefix-click","suffix-click","date-prev","date-today","date-next"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l=qr(t),s=Jt({inited:!1,panelIndex:0,showPwd:!1,visiblePanel:!1,animatVisible:!1,panelStyle:null,panelPlacement:"",isActivated:!1,inputValue:t.modelValue,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),c=je(),u=je(),f=je(),d=je(),h={refElem:c,refInput:u},p={xID:o,props:t,context:e,reactData:s,getRefMaps:function(){return h}},v={},g=function($,Ee){var Oe=t.type;return Oe==="time"?F7($):E.toStringDate($,Ee)},m=_e(function(){var $=t.type;return $==="time"||$==="datetime"}),b=_e(function(){return["number","integer","float"].indexOf(t.type)>-1}),x=_e(function(){return E.getSize(s.inputValue)}),T=_e(function(){var $=x.value;return t.maxlength&&$>E.toNumber(t.maxlength)}),A=_e(function(){var $=m.value;return $||["date","week","month","quarter","year"].indexOf(t.type)>-1}),O=_e(function(){return t.type==="password"}),I=_e(function(){return t.type==="search"}),_=_e(function(){return E.toInteger(t.digits)||1}),k=_e(function(){var $=t.type,Ee=_.value,Oe=t.step;return $==="integer"?E.toInteger(Oe)||1:$==="float"?E.toNumber(Oe)||1/Math.pow(10,Ee):E.toNumber(Oe)||1}),L=_e(function(){var $=t.type,Ee=b.value,Oe=A.value,Ve=O.value;return t.clearable&&(Ve||Ee||Oe||$==="text"||$==="search")}),P=_e(function(){return t.startDate?E.toStringDate(t.startDate):null}),W=_e(function(){return t.endDate?E.toStringDate(t.endDate):null}),q=_e(function(){return["date","week","month","quarter","year"].includes(t.type)}),V=_e(function(){var $=t.modelValue,Ee=t.multiple,Oe=A.value,Ve=J.value;return Ee&&$&&Oe?E.toValueString($).split(",").map(function(y){var S=g(y,Ve);return E.isValidDate(S)?S:null}):[]}),G=_e(function(){var $=V.value,Ee=J.value;return $.map(function(Oe){return E.toDateString(Oe,Ee)})}),pe=_e(function(){var $=V.value,Ee=Re.value;return $.map(function(Oe){return E.toDateString(Oe,Ee)}).join(", ")}),J=_e(function(){var $=t.type;return $==="time"?"HH:mm:ss":t.valueFormat||($==="datetime"?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd")}),N=_e(function(){var $=t.modelValue,Ee=A.value,Oe=J.value,Ve=null;if($&&Ee){var y=g($,Oe);E.isValidDate(y)&&(Ve=y)}return Ve}),Z=_e(function(){var $=P.value,Ee=s.selectMonth;return Ee&&$?Ee<=$:!1}),le=_e(function(){var $=W.value,Ee=s.selectMonth;return Ee&&$?Ee>=$:!1}),ye=_e(function(){var $=s.datetimePanelValue;return $?E.toDateString($,"HH:mm:ss"):""}),me=_e(function(){var $=N.value,Ee=m.value;return $&&Ee?($.getHours()*3600+$.getMinutes()*60+$.getSeconds())*1e3:0}),Re=_e(function(){var $=A.value;return $?t.labelFormat||H.i18n("vxe.input.date.labelFormat.".concat(t.type)):null}),be=_e(function(){var $=s.selectMonth,Ee=s.currentDate,Oe=[];if($&&Ee)for(var Ve=Ee.getFullYear(),y=$.getFullYear(),S=new Date(y-y%ba,0,1),R=-4;R<ba+4;R++){var M=E.getWhatYear(S,R,"first"),F=M.getFullYear();Oe.push({date:M,isCurrent:!0,isPrev:R<0,isNow:Ve===F,isNext:R>=ba,year:F})}return Oe}),Ce=_e(function(){var $=A.value;if($){var Ee=s.datePanelType,Oe=s.selectMonth,Ve=be.value,y="",S=void 0;return Oe&&(y=Oe.getFullYear(),S=Oe.getMonth()+1),Ee==="quarter"?H.i18n("vxe.input.date.quarterLabel",[y]):Ee==="month"?H.i18n("vxe.input.date.monthLabel",[y]):Ee==="year"?Ve.length?"".concat(Ve[0].year," - ").concat(Ve[Ve.length-1].year):"":H.i18n("vxe.input.date.dayLabel",[y,S?H.i18n("vxe.input.date.m".concat(S)):"-"])}return""}),we=_e(function(){var $=t.startDay,Ee=t.startWeek;return E.toNumber(E.isNumber($)||E.isString($)?$:Ee)}),ce=_e(function(){var $=[],Ee=A.value;if(Ee){var Oe=we.value;$.push(Oe);for(var Ve=0;Ve<6;Ve++)Oe>=6?Oe=0:Oe++,$.push(Oe)}return $}),re=_e(function(){var $=A.value;if($){var Ee=ce.value;return Ee.map(function(Oe){return{value:Oe,label:H.i18n("vxe.input.date.weeks.w".concat(Oe))}})}return[]}),ve=_e(function(){var $=A.value;if($){var Ee=re.value;return[{label:H.i18n("vxe.input.date.weeks.w")}].concat(Ee)}return[]}),Te=_e(function(){var $=be.value;return E.chunk($,4)}),Pe=_e(function(){var $=s.selectMonth,Ee=s.currentDate,Oe=[];if($&&Ee)for(var Ve=Ee.getFullYear(),y=RA(Ee),S=E.getWhatYear($,0,"first"),R=S.getFullYear(),M=-2;M<N7-2;M++){var F=E.getWhatQuarter(S,M),K=F.getFullYear(),Y=RA(F),ae=K<R;Oe.push({date:F,isPrev:ae,isCurrent:K===R,isNow:K===Ve&&Y===y,isNext:!ae&&K>R,quarter:Y})}return Oe}),B=_e(function(){var $=Pe.value;return E.chunk($,2)}),w=_e(function(){var $=s.selectMonth,Ee=s.currentDate,Oe=[];if($&&Ee)for(var Ve=Ee.getFullYear(),y=Ee.getMonth(),S=E.getWhatYear($,0,"first").getFullYear(),R=-4;R<P7-4;R++){var M=E.getWhatYear($,0,R),F=M.getFullYear(),K=M.getMonth(),Y=F<S;Oe.push({date:M,isPrev:Y,isCurrent:F===S,isNow:F===Ve&&K===y,isNext:!Y&&F>S,month:K})}return Oe}),C=_e(function(){var $=w.value;return E.chunk($,4)}),j=_e(function(){var $=s.selectMonth,Ee=s.currentDate,Oe=[];if($&&Ee)for(var Ve=me.value,y=ce.value,S=Ee.getFullYear(),R=Ee.getMonth(),M=Ee.getDate(),F=$.getFullYear(),K=$.getMonth(),Y=$.getDay(),ae=-y.indexOf(Y),fe=new Date(E.getWhatDay($,ae).getTime()+Ve),Ae=0;Ae<42;Ae++){var Le=E.getWhatDay(fe,Ae),Fe=Le.getFullYear(),Ge=Le.getMonth(),Ye=Le.getDate(),Be=Le<$;Oe.push({date:Le,isPrev:Be,isCurrent:Fe===F&&Ge===K,isNow:Fe===S&&Ge===R&&Ye===M,isNext:!Be&&K!==Ge,label:Ye})}return Oe}),ie=_e(function(){var $=j.value;return E.chunk($,7)}),ne=_e(function(){var $=ie.value,Ee=we.value;return $.map(function(Oe){var Ve=Oe[0],y={date:Ve.date,isWeekNumber:!0,isPrev:!1,isCurrent:!1,isNow:!1,isNext:!1,label:E.getYearWeek(Ve.date,Ee)};return[y].concat(Oe)})}),X=_e(function(){var $=[],Ee=m.value;if(Ee)for(var Oe=0;Oe<24;Oe++)$.push({value:Oe,label:(""+Oe).padStart(2,"0")});return $}),ee=_e(function(){var $=[],Ee=m.value;if(Ee)for(var Oe=0;Oe<60;Oe++)$.push({value:Oe,label:(""+Oe).padStart(2,"0")});return $}),de=_e(function(){var $=ee.value;return $}),oe=_e(function(){var $=t.type,Ee=t.readonly,Oe=t.editable,Ve=t.multiple;return Ee||Ve||!Oe||$==="week"||$==="quarter"}),te=_e(function(){var $=t.type,Ee=s.showPwd,Oe=b.value,Ve=A.value,y=O.value;return Ve||Oe||y&&Ee||$==="number"?"text":$}),he=_e(function(){var $=t.placeholder;return $?Ar($):""}),ke=_e(function(){var $=t.maxlength,Ee=b.value;return Ee&&!E.toNumber($)?16:$}),se=_e(function(){var $=t.type,Ee=t.immediate;return Ee||!($==="text"||$==="number"||$==="integer"||$==="float")}),ue=_e(function(){var $=t.type,Ee=s.inputValue,Oe=b.value;return Oe?$==="integer"?E.toInteger(Ns(Ee)):E.toNumber(Ns(Ee)):0}),xe=_e(function(){var $=t.min,Ee=s.inputValue,Oe=b.value,Ve=ue.value;return(Ee||Ee===0)&&Oe&&$!==null?Ve<=E.toNumber($):!1}),De=_e(function(){var $=t.max,Ee=s.inputValue,Oe=b.value,Ve=ue.value;return(Ee||Ee===0)&&Oe&&$!==null?Ve>=E.toNumber($):!1}),U=function($){var Ee=t.type,Oe=t.exponential,Ve=ke.value,y=_.value,S=Ee==="float"?LA($,y):E.toValueString($);return Oe&&($===S||E.toValueString($).toLowerCase()===E.toNumber(S).toExponential())?$:S.slice(0,Ve)},ge=function($){var Ee=s.inputValue;v.dispatchEvent($.type,{value:Ee},$)},Se=function($,Ee){s.inputValue=$,n("update:modelValue",$),v.dispatchEvent("input",{value:$},Ee),E.toValueString(t.modelValue)!==$&&(v.dispatchEvent("change",{value:$},Ee),i&&a&&i.triggerItemEvent(Ee,a.itemConfig.field,$))},$e=function($,Ee){var Oe=A.value,Ve=se.value;s.inputValue=$,Oe||(Ve?Se($,Ee):v.dispatchEvent("input",{value:$},Ee))},Ue=function($){var Ee=$.target,Oe=Ee.value;$e(Oe,$)},We=function($){var Ee=se.value;Ee||ge($)},Je=function($){s.isActivated=!0;var Ee=A.value;Ee&&wn($),ge($)},nt=function($){var Ee=t.disabled;if(!Ee){var Oe=s.inputValue;v.dispatchEvent("prefix-click",{value:Oe},$)}},Qe,Ke=function(){return new Promise(function($){s.visiblePanel=!1,Qe=window.setTimeout(function(){s.animatVisible=!1,$()},350)})},at=function($,Ee){var Oe=t.type,Ve=b.value,y=A.value;y&&Ke(),(Ve||["text","search","password"].indexOf(Oe)>-1)&&focus(),v.dispatchEvent("clear",{value:Ee},$)},Q=function($){var Ee=t.disabled;if(!Ee)if(Da($.currentTarget,"is--clear"))Se("",$),at($,"");else{var Oe=s.inputValue;v.dispatchEvent("suffix-click",{value:Oe},$)}},Ot=function($){var Ee=t.type,Oe=t.valueFormat,Ve=Re.value,y=we.value,S=null,R="";if($&&(S=g($,Oe)),E.isValidDate(S)){if(R=E.toDateString(S,Ve,{firstDay:y}),Ve&&Ee==="week"){var M=E.getWhatWeek(S,0,y,y);if(M.getFullYear()<S.getFullYear()){var F=Ve.indexOf("yyyy");if(F>-1){var K=Number(R.substring(F,F+4));K&&!isNaN(K)&&(R=R.replace("".concat(K),"".concat(K-1)))}}}}else S=null;s.datePanelValue=S,s.datePanelLabel=R},Yt=function(){var $=A.value,Ee=s.inputValue;$&&(Ot(Ee),s.inputValue=t.multiple?pe.value:s.datePanelLabel)},Ht=function(){var $=t.type,Ee=s.inputValue,Oe=A.value,Ve=_.value;if(Oe)Yt();else if($==="float"&&Ee){var y=LA(Ee,Ve);Ee!==y&&Se(y,{type:"init"})}},yt=function($){return t.max===null||E.toNumber($)<=E.toNumber(t.max)},At=function($){return t.min===null||E.toNumber($)>=E.toNumber(t.min)},Wt=function(){s.inputValue=t.multiple?pe.value:s.datePanelLabel},ut=function($){var Ee=E.getWhatMonth($,0,"first");E.isEqual(Ee,s.selectMonth)||(s.selectMonth=Ee)},Bt=function($){var Ee=t.modelValue,Oe=t.multiple,Ve=s.datetimePanelValue,y=m.value,S=J.value,R=we.value;if(t.type==="week"){var M=E.toNumber(t.selectDay);$=E.getWhatWeek($,0,M,R)}else y&&($.setHours(Ve.getHours()),$.setMinutes(Ve.getMinutes()),$.setSeconds(Ve.getSeconds()));var F=E.toDateString($,S,{firstDay:R});if(ut($),Oe){var K=G.value;if(y){var Y=DA([],V.value,!0),ae=[],fe=E.findIndexOf(Y,function(Ae){return E.isDateSame($,Ae,"yyyyMMdd")});fe===-1?Y.push($):Y.splice(fe,1),Y.forEach(function(Ae){Ae&&(Ae.setHours(Ve.getHours()),Ae.setMinutes(Ve.getMinutes()),Ae.setSeconds(Ve.getSeconds()),ae.push(Ae))}),Se(ae.map(function(Ae){return E.toDateString(Ae,S)}).join(","),{type:"update"})}else K.some(function(Ae){return E.isEqual(Ae,F)})?Se(K.filter(function(Ae){return!E.isEqual(Ae,F)}).join(","),{type:"update"}):Se(K.concat([F]).join(","),{type:"update"})}else E.isEqual(Ee,F)||Se(F,{type:"update"})},Ut=function(){var $=t.type,Ee=t.min,Oe=t.max,Ve=t.exponential,y=s.inputValue,S=s.datetimePanelValue,R=b.value,M=A.value,F=Re.value,K=oe.value;if(!K){if(R){if(y){var Y=$==="integer"?E.toInteger(Ns(y)):E.toNumber(Ns(y));if(At(Y)?yt(Y)||(Y=Oe):Y=Ee,Ve){var ae=E.toValueString(y).toLowerCase();ae===E.toNumber(Y).toExponential()&&(Y=ae)}Se(U(Y),{type:"check"})}}else if(M)if(y){var fe=g(y,F);if(E.isValidDate(fe))if($==="time")fe=E.toDateString(fe,F),y!==fe&&Se(fe,{type:"check"}),s.inputValue=fe;else{var Ae=!1,Le=we.value;if($==="datetime"){var Fe=N.value;(y!==E.toDateString(Fe,F)||y!==E.toDateString(fe,F))&&(Ae=!0,S.setHours(fe.getHours()),S.setMinutes(fe.getMinutes()),S.setSeconds(fe.getSeconds()))}else Ae=!0;s.inputValue=E.toDateString(fe,F,{firstDay:Le}),Ae&&Bt(fe)}else Wt()}else Se("",{type:"check"})}},Or=function($){var Ee=s.inputValue,Oe=se.value;Oe||Se(Ee,$),Ut(),s.visiblePanel||(s.isActivated=!1),v.dispatchEvent("blur",{value:Ee},$)},Xr=function($){var Ee=t.readonly,Oe=t.disabled,Ve=s.showPwd;!Oe&&!Ee&&(s.showPwd=!Ve),v.dispatchEvent("toggle-visible",{visible:s.showPwd},$)},nn=function($){v.dispatchEvent("search-click",{},$)},An=function($,Ee){var Oe=t.min,Ve=t.max,y=t.type,S=s.inputValue,R=k.value,M=y==="integer"?E.toInteger(Ns(S)):E.toNumber(Ns(S)),F=$?E.add(M,R):E.subtract(M,R),K;At(F)?yt(F)?K=F:K=Ve:K=Oe,$e(U(K),Ee)},an,on=function($){var Ee=t.readonly,Oe=t.disabled,Ve=xe.value;clearTimeout(an),!Oe&&!Ee&&!Ve&&An(!1,$),v.dispatchEvent("next-number",{},$)},Hr=function($){an=window.setTimeout(function(){on($),Hr($)},60)},Zr=function($){var Ee=t.readonly,Oe=t.disabled,Ve=De.value;clearTimeout(an),!Oe&&!Ee&&!Ve&&An(!0,$),v.dispatchEvent("prev-number",{},$)},Kn=function($){var Ee=_t($,gt.ARROW_UP),Oe=_t($,gt.ARROW_DOWN);(Ee||Oe)&&($.preventDefault(),Ee?Zr($):on($))},sn=function($){var Ee=t.exponential,Oe=t.controls,Ve=b.value;if(Ve){var y=$.ctrlKey,S=$.shiftKey,R=$.altKey,M=$.keyCode;!y&&!S&&!R&&(_t($,gt.SPACEBAR)||(!Ee||M!==69)&&M>=65&&M<=90||M>=186&&M<=188||M>=191)&&$.preventDefault(),Oe&&Kn($)}ge($)},Yn=function($){ge($)},dr=function(){clearTimeout(an)},Nr=function($){an=window.setTimeout(function(){Zr($),Nr($)},60)},Mn=function($){if(dr(),$.button===0){var Ee=Da($.currentTarget,"is--prev");Ee?Zr($):on($),an=window.setTimeout(function(){Ee?Nr($):Hr($)},500)}},qn=function($){var Ee=b.value;if(Ee&&t.controls&&s.isActivated){var Oe=$.deltaY;Oe>0?on($):Oe<0&&Zr($),$.preventDefault()}ge($)},Xn=function($,Ee){s.selectMonth=E.getWhatMonth($,Ee,"first")},En=function(){var $=E.getWhatDay(Date.now(),0,"first");s.currentDate=$,Xn($,0)},ui=function(){var $=s.datePanelType;$==="month"||$==="quarter"?$="year":$="month",s.datePanelType=$},Wi=function($){var Ee=t.type,Oe=s.datePanelType,Ve=s.selectMonth,y=Z.value;y||(Ee==="year"?s.selectMonth=E.getWhatYear(Ve,-ba,"first"):Ee==="month"||Ee==="quarter"?Oe==="year"?s.selectMonth=E.getWhatYear(Ve,-ba,"first"):s.selectMonth=E.getWhatYear(Ve,-1,"first"):Oe==="year"?s.selectMonth=E.getWhatYear(Ve,-ba,"first"):Oe==="month"?s.selectMonth=E.getWhatYear(Ve,-1,"first"):s.selectMonth=E.getWhatMonth(Ve,-1,"first"),v.dispatchEvent("date-prev",{type:Ee},$))},ln=function($){En(),t.multiple||(Bt(s.currentDate),Ke()),v.dispatchEvent("date-today",{type:t.type},$)},$r=function($){var Ee=t.type,Oe=s.datePanelType,Ve=s.selectMonth,y=le.value;y||(Ee==="year"?s.selectMonth=E.getWhatYear(Ve,ba,"first"):Ee==="month"||Ee==="quarter"?Oe==="year"?s.selectMonth=E.getWhatYear(Ve,ba,"first"):s.selectMonth=E.getWhatYear(Ve,1,"first"):Oe==="year"?s.selectMonth=E.getWhatYear(Ve,ba,"first"):Oe==="month"?s.selectMonth=E.getWhatYear(Ve,1,"first"):s.selectMonth=E.getWhatMonth(Ve,1,"first"),v.dispatchEvent("date-next",{type:Ee},$))},gr=function($){var Ee=t.disabledMethod,Oe=s.datePanelType;return Ee&&Ee({type:Oe,viewType:Oe,date:$.date,$input:p})},Zn=function($){var Ee=t.type,Oe=t.multiple,Ve=s.datePanelType;Ee==="month"?Ve==="year"?(s.datePanelType="month",ut($)):(Bt($),Oe||Ke()):Ee==="year"?(Bt($),Oe||Ke()):Ee==="quarter"?Ve==="year"?(s.datePanelType="quarter",ut($)):(Bt($),Oe||Ke()):Ve==="month"?(s.datePanelType=Ee==="week"?Ee:"day",ut($)):Ve==="year"?(s.datePanelType="month",ut($)):(Bt($),Oe||Ke())},fi=function($){gr($)||Zn($.date)},Ci=function($){if(!gr({date:$})){var Ee=j.value;Ee.some(function(Oe){return E.isDateSame(Oe.date,$,"yyyyMMdd")})||ut($),Ot($)}},Ii=function($){if(!gr({date:$})){var Ee=be.value;Ee.some(function(Oe){return E.isDateSame(Oe.date,$,"yyyy")})||ut($),Ot($)}},Tn=function($){if(!gr({date:$})){var Ee=Pe.value;Ee.some(function(Oe){return E.isDateSame(Oe.date,$,"yyyyq")})||ut($),Ot($)}},Sn=function($){if(!gr({date:$})){var Ee=w.value;Ee.some(function(Oe){return E.isDateSame(Oe.date,$,"yyyyMM")})||ut($),Ot($)}},hr=function($){if(!gr($)){var Ee=s.datePanelType;Ee==="month"?Sn($.date):Ee==="quarter"?Tn($.date):Ee==="year"?Ii($.date):Ci($.date)}},cr=function($){if($){var Ee=$.offsetHeight,Oe=$.parentNode;Oe.scrollTop=$.offsetTop-Ee*4}},Lr=function($){s.datetimePanelValue=new Date(s.datetimePanelValue.getTime()),cr($.currentTarget)},Jn=function($,Ee){s.datetimePanelValue.setHours(Ee.value),Lr($)},Gi=function(){var $=t.multiple,Ee=s.datetimePanelValue,Oe=N.value,Ve=m.value;if(Ve){var y=J.value;if($){var S=G.value;if(Ve){var R=DA([],V.value,!0),M=[];R.forEach(function(F){F&&(F.setHours(Ee.getHours()),F.setMinutes(Ee.getMinutes()),F.setSeconds(Ee.getSeconds()),M.push(F))}),Se(M.map(function(F){return E.toDateString(F,y)}).join(","),{type:"update"})}else Se(S.join(","),{type:"update"})}else Bt(Oe||s.currentDate)}Ke()},Qn=function($,Ee){s.datetimePanelValue.setMinutes(Ee.value),Lr($)},ha=function($,Ee){s.datetimePanelValue.setSeconds(Ee.value),Lr($)},_i=function($){var Ee=s.isActivated,Oe=s.datePanelValue,Ve=s.datePanelType;if(Ee){$.preventDefault();var y=_t($,gt.ARROW_LEFT),S=_t($,gt.ARROW_UP),R=_t($,gt.ARROW_RIGHT),M=_t($,gt.ARROW_DOWN);if(Ve==="year"){var F=E.getWhatYear(Oe||Date.now(),0,"first");y?F=E.getWhatYear(F,-1):S?F=E.getWhatYear(F,-4):R?F=E.getWhatYear(F,1):M&&(F=E.getWhatYear(F,4)),Ii(F)}else if(Ve==="quarter"){var K=E.getWhatQuarter(Oe||Date.now(),0,"first");y?K=E.getWhatQuarter(K,-1):S?K=E.getWhatQuarter(K,-2):R?K=E.getWhatQuarter(K,1):M&&(K=E.getWhatQuarter(K,2)),Tn(K)}else if(Ve==="month"){var Y=E.getWhatMonth(Oe||Date.now(),0,"first");y?Y=E.getWhatMonth(Y,-1):S?Y=E.getWhatMonth(Y,-4):R?Y=E.getWhatMonth(Y,1):M&&(Y=E.getWhatMonth(Y,4)),Sn(Y)}else{var ae=Oe||E.getWhatDay(Date.now(),0,"first"),fe=we.value;y?ae=E.getWhatDay(ae,-1):S?ae=E.getWhatWeek(ae,-1,fe):R?ae=E.getWhatDay(ae,1):M&&(ae=E.getWhatWeek(ae,1,fe)),Ci(ae)}}},Ls=function($){var Ee=s.isActivated;if(Ee){var Oe=_t($,gt.PAGE_UP);$.preventDefault(),Oe?Wi($):$r($)}},di=function(){var $=t.type,Ee=m.value,Oe=N.value;["year","quarter","month","week"].indexOf($)>-1?s.datePanelType=$:s.datePanelType="day",s.currentDate=E.getWhatDay(Date.now(),0,"first"),Oe?(Xn(Oe,0),Ot(Oe)):En(),Ee&&(s.datetimePanelValue=s.datePanelValue||E.getWhatDay(Date.now(),0,"first"),Ie(function(){var Ve=d.value;E.arrayEach(Ve.querySelectorAll("li.is--selected"),cr)}))},Vr=function(){s.panelIndex<Ba()&&(s.panelIndex=sa())},zi=function(){return Ie().then(function(){var $=t.transfer,Ee=t.placement,Oe=s.panelIndex,Ve=u.value,y=f.value;if(Ve&&y){var S=Ve.offsetHeight,R=Ve.offsetWidth,M=y.offsetHeight,F=y.offsetWidth,K=5,Y={zIndex:Oe},ae=Ia(Ve),fe=ae.boundingTop,Ae=ae.boundingLeft,Le=ae.visibleHeight,Fe=ae.visibleWidth,Ge="bottom";if($){var Ye=Ae,Be=fe+S;Ee==="top"?(Ge="top",Be=fe-M):Ee||(Be+M+K>Le&&(Ge="top",Be=fe-M),Be<K&&(Ge="bottom",Be=fe+S)),Ye+F+K>Fe&&(Ye-=Ye+F+K-Fe),Ye<K&&(Ye=K),Object.assign(Y,{left:"".concat(Ye,"px"),top:"".concat(Be,"px"),minWidth:"".concat(R,"px")})}else Ee==="top"?(Ge="top",Y.bottom="".concat(S,"px")):Ee||fe+S+M>Le&&fe-S-M>K&&(Ge="top",Y.bottom="".concat(S,"px"));return s.panelStyle=Y,s.panelPlacement=Ge,Ie()}})},Fn=function(){var $=t.disabled,Ee=s.visiblePanel,Oe=A.value;return!$&&!Ee?(s.inited||(s.inited=!0),clearTimeout(Qe),s.isActivated=!0,s.animatVisible=!0,Oe&&di(),setTimeout(function(){s.visiblePanel=!0},10),Vr(),zi()):Ie()},wn=function($){var Ee=t.readonly;Ee||($.preventDefault(),Fn())},Ds=function($){ge($)},ko=function($){var Ee=t.disabled,Oe=s.visiblePanel,Ve=s.isActivated,y=A.value,S=c.value,R=f.value;!Ee&&Ve&&(s.isActivated=Pt($,S).flag||Pt($,R).flag,s.isActivated||(y?Oe&&(Ke(),Ut()):Ut()))},pa=function($){var Ee=t.clearable,Oe=t.disabled,Ve=s.visiblePanel,y=A.value;if(!Oe){var S=_t($,gt.TAB),R=_t($,gt.DELETE),M=_t($,gt.ESCAPE),F=_t($,gt.ENTER),K=_t($,gt.ARROW_LEFT),Y=_t($,gt.ARROW_UP),ae=_t($,gt.ARROW_RIGHT),fe=_t($,gt.ARROW_DOWN),Ae=_t($,gt.PAGE_UP),Le=_t($,gt.PAGE_DOWN),Fe=K||Y||ae||fe,Ge=s.isActivated;S?(Ge&&Ut(),Ge=!1,s.isActivated=Ge):Fe?y&&Ge&&(Ve?_i($):(Y||fe)&&wn($)):F?y&&(Ve?s.datePanelValue?Zn(s.datePanelValue):Ke():Ge&&wn($)):(Ae||Le)&&y&&Ge&&Ls($),S||M?Ve&&Ke():R&&Ee&&Ge&&at($,null)}},Ri=function($){var Ee=t.disabled,Oe=s.visiblePanel;if(!Ee&&Oe){var Ve=f.value;Pt($,Ve).flag?zi():(Ke(),Ut())}},Jr=function(){var $=s.isActivated,Ee=s.visiblePanel;Ee?(Ke(),Ut()):$&&Ut()},Ua=function($,Ee){var Oe=t.festivalMethod;if(Oe){var Ve=s.datePanelType,y=Oe({type:Ve,viewType:Ve,date:$.date,$input:p}),S=y?E.isString(y)?{label:y}:y:{},R=S.extra?E.isString(S.extra)?{label:S.extra}:S.extra:null,M=[D("span",{class:["vxe-input--date-label",{"is-notice":S.notice}]},R&&R.label?[D("span",Ee),D("span",{class:["vxe-input--date-label--extra",R.important?"is-important":"",R.className],style:R.style},E.toValueString(R.label))]:Ee)],F=S.label;if(F){var K=E.toValueString(F).split(",");M.push(D("span",{class:["vxe-input--date-festival",S.important?"is-important":"",S.className],style:S.style},[K.length>1?D("span",{class:["vxe-input--date-festival--overlap","overlap--".concat(K.length)]},K.map(function(Y){return D("span",Y.substring(0,3))})):D("span",{class:"vxe-input--date-festival--label"},K[0].substring(0,3))]))}return M}return Ee},yh=function(){var $=t.multiple,Ee=s.datePanelType,Oe=s.datePanelValue,Ve=N.value,y=re.value,S=ie.value,R=V.value,M="yyyyMMdd";return[D("table",{class:"vxe-input--date-".concat(Ee,"-view"),cellspacing:0,cellpadding:0,border:0},[D("thead",[D("tr",y.map(function(F){return D("th",F.label)}))]),D("tbody",S.map(function(F){return D("tr",F.map(function(K){return D("td",{class:{"is--prev":K.isPrev,"is--current":K.isCurrent,"is--now":K.isNow,"is--next":K.isNext,"is--disabled":gr(K),"is--selected":$?R.some(function(Y){return E.isDateSame(Y,K.date,M)}):E.isDateSame(Ve,K.date,M),"is--hover":E.isDateSame(Oe,K.date,M)},onClick:function(){return fi(K)},onMouseenter:function(){return hr(K)}},Ua(K,K.label))}))}))])]},bh=function(){var $=t.multiple,Ee=s.datePanelType,Oe=s.datePanelValue,Ve=N.value,y=ve.value,S=ne.value,R=V.value,M="yyyyMMdd";return[D("table",{class:"vxe-input--date-".concat(Ee,"-view"),cellspacing:0,cellpadding:0,border:0},[D("thead",[D("tr",y.map(function(F){return D("th",F.label)}))]),D("tbody",S.map(function(F){var K=$?F.some(function(ae){return R.some(function(fe){return E.isDateSame(fe,ae.date,M)})}):F.some(function(ae){return E.isDateSame(Ve,ae.date,M)}),Y=F.some(function(ae){return E.isDateSame(Oe,ae.date,M)});return D("tr",F.map(function(ae){return D("td",{class:{"is--prev":ae.isPrev,"is--current":ae.isCurrent,"is--now":ae.isNow,"is--next":ae.isNext,"is--disabled":gr(ae),"is--selected":K,"is--hover":Y},onClick:function(){return fi(ae)},onMouseenter:function(){return hr(ae)}},Ua(ae,ae.label))}))}))])]},xh=function(){var $=t.multiple,Ee=s.datePanelType,Oe=s.datePanelValue,Ve=N.value,y=C.value,S=V.value,R="yyyyMM";return[D("table",{class:"vxe-input--date-".concat(Ee,"-view"),cellspacing:0,cellpadding:0,border:0},[D("tbody",y.map(function(M){return D("tr",M.map(function(F){return D("td",{class:{"is--prev":F.isPrev,"is--current":F.isCurrent,"is--now":F.isNow,"is--next":F.isNext,"is--disabled":gr(F),"is--selected":$?S.some(function(K){return E.isDateSame(K,F.date,R)}):E.isDateSame(Ve,F.date,R),"is--hover":E.isDateSame(Oe,F.date,R)},onClick:function(){return fi(F)},onMouseenter:function(){return hr(F)}},Ua(F,H.i18n("vxe.input.date.months.m".concat(F.month))))}))}))])]},Ah=function(){var $=t.multiple,Ee=s.datePanelType,Oe=s.datePanelValue,Ve=N.value,y=B.value,S=V.value,R="yyyyq";return[D("table",{class:"vxe-input--date-".concat(Ee,"-view"),cellspacing:0,cellpadding:0,border:0},[D("tbody",y.map(function(M){return D("tr",M.map(function(F){return D("td",{class:{"is--prev":F.isPrev,"is--current":F.isCurrent,"is--now":F.isNow,"is--next":F.isNext,"is--disabled":gr(F),"is--selected":$?S.some(function(K){return E.isDateSame(K,F.date,R)}):E.isDateSame(Ve,F.date,R),"is--hover":E.isDateSame(Oe,F.date,R)},onClick:function(){return fi(F)},onMouseenter:function(){return hr(F)}},Ua(F,H.i18n("vxe.input.date.quarters.q".concat(F.quarter))))}))}))])]},Eh=function(){var $=t.multiple,Ee=s.datePanelType,Oe=s.datePanelValue,Ve=N.value,y=Te.value,S=V.value,R="yyyy";return[D("table",{class:"vxe-input--date-".concat(Ee,"-view"),cellspacing:0,cellpadding:0,border:0},[D("tbody",y.map(function(M){return D("tr",M.map(function(F){return D("td",{class:{"is--prev":F.isPrev,"is--current":F.isCurrent,"is--now":F.isNow,"is--next":F.isNext,"is--disabled":gr(F),"is--selected":$?S.some(function(K){return E.isDateSame(K,F.date,R)}):E.isDateSame(Ve,F.date,R),"is--hover":E.isDateSame(Oe,F.date,R)},onClick:function(){return fi(F)},onMouseenter:function(){return hr(F)}},Ua(F,F.year))}))}))])]},Th=function(){var $=s.datePanelType;switch($){case"week":return bh();case"month":return xh();case"quarter":return Ah();case"year":return Eh()}return yh()},Uu=function(){var $=t.multiple,Ee=s.datePanelType,Oe=Z.value,Ve=le.value,y=Ce.value;return[D("div",{class:"vxe-input--date-picker-header"},[D("div",{class:"vxe-input--date-picker-type-wrapper"},[Ee==="year"?D("span",{class:"vxe-input--date-picker-label"},y):D("span",{class:"vxe-input--date-picker-btn",onClick:ui},y)]),D("div",{class:"vxe-input--date-picker-btn-wrapper"},[D("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-prev-btn",{"is--disabled":Oe}],onClick:Wi},[D("i",{class:"vxe-icon-caret-left"})]),D("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-current-btn",onClick:ln},[D("i",{class:"vxe-icon-dot"})]),D("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-next-btn",{"is--disabled":Ve}],onClick:$r},[D("i",{class:"vxe-icon-caret-right"})]),$&&q.value?D("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn"},[D("button",{class:"vxe-input--date-picker-confirm",type:"button",onClick:Gi},H.i18n("vxe.button.confirm"))]):null])]),D("div",{class:"vxe-input--date-picker-body"},Th())]},Hu=function(){var $=s.datetimePanelValue,Ee=ye.value,Oe=X.value,Ve=ee.value,y=de.value;return[D("div",{class:"vxe-input--time-picker-header"},[D("span",{class:"vxe-input--time-picker-title"},Ee),D("button",{class:"vxe-input--time-picker-confirm",type:"button",onClick:Gi},H.i18n("vxe.button.confirm"))]),D("div",{ref:d,class:"vxe-input--time-picker-body"},[D("ul",{class:"vxe-input--time-picker-hour-list"},Oe.map(function(S,R){return D("li",{key:R,class:{"is--selected":$&&$.getHours()===S.value},onClick:function(M){return Jn(M,S)}},S.label)})),D("ul",{class:"vxe-input--time-picker-minute-list"},Ve.map(function(S,R){return D("li",{key:R,class:{"is--selected":$&&$.getMinutes()===S.value},onClick:function(M){return Qn(M,S)}},S.label)})),D("ul",{class:"vxe-input--time-picker-second-list"},y.map(function(S,R){return D("li",{key:R,class:{"is--selected":$&&$.getSeconds()===S.value},onClick:function(M){return ha(M,S)}},S.label)}))])]},Sh=function(){var $,Ee=t.type,Oe=t.transfer,Ve=s.inited,y=s.animatVisible,S=s.visiblePanel,R=s.panelPlacement,M=s.panelStyle,F=l.value,K=A.value,Y=[];return K?(Ee==="datetime"?Y.push(D("div",{class:"vxe-input--panel-layout-wrapper"},[D("div",{class:"vxe-input--panel-left-wrapper"},Uu()),D("div",{class:"vxe-input--panel-right-wrapper"},Hu())])):Ee==="time"?Y.push(D("div",{class:"vxe-input--panel-wrapper"},Hu())):Y.push(D("div",{class:"vxe-input--panel-wrapper"},Uu())),D(Ll,{to:"body",disabled:Oe?!Ve:!0},[D("div",{ref:f,class:["vxe-table--ignore-clear vxe-input--panel","type--".concat(Ee),($={},$["size--".concat(F)]=F,$["is--transfer"]=Oe,$["animat--leave"]=y,$["animat--enter"]=S,$)],placement:R,style:M},Y)])):null},Os=function(){var $=De.value,Ee=xe.value;return D("span",{class:"vxe-input--number-suffix"},[D("span",{class:["vxe-input--number-prev is--prev",{"is--disabled":$}],onMousedown:Mn,onMouseup:dr,onMouseleave:dr},[D("i",{class:["vxe-input--number-prev-icon",H.icon.INPUT_PREV_NUM]})]),D("span",{class:["vxe-input--number-next is--next",{"is--disabled":Ee}],onMousedown:Mn,onMouseup:dr,onMouseleave:dr},[D("i",{class:["vxe-input--number-next-icon",H.icon.INPUT_NEXT_NUM]})])])},Bl=function(){return D("span",{class:"vxe-input--date-picker-suffix",onClick:wn},[D("i",{class:["vxe-input--date-picker-icon",H.icon.INPUT_DATE]})])},Vu=function(){return D("span",{class:"vxe-input--search-suffix",onClick:nn},[D("i",{class:["vxe-input--search-icon",H.icon.INPUT_SEARCH]})])},wh=function(){var $=s.showPwd;return D("span",{class:"vxe-input--password-suffix",onClick:Xr},[D("i",{class:["vxe-input--password-icon",$?H.icon.INPUT_SHOW_PWD:H.icon.INPUT_PWD]})])},Ul=function(){var $=t.prefixIcon,Ee=r.prefix,Oe=[];return Ee?Oe.push(D("span",{class:"vxe-input--prefix-icon"},Ee({}))):$&&Oe.push(D("i",{class:["vxe-input--prefix-icon",$]})),Oe.length?D("span",{class:"vxe-input--prefix",onClick:nt},Oe):null},Hl=function(){var $=t.disabled,Ee=t.suffixIcon,Oe=s.inputValue,Ve=r.suffix,y=L.value,S=[];return Ve?S.push(D("span",{class:"vxe-input--suffix-icon"},Ve({}))):Ee&&S.push(D("i",{class:["vxe-input--suffix-icon",Ee]})),y&&S.push(D("i",{class:["vxe-input--clear-icon",H.icon.INPUT_CLEAR]})),S.length?D("span",{class:["vxe-input--suffix",{"is--clear":y&&!$&&!(Oe===""||E.eqNull(Oe))}],onClick:Q},S):null},Vl=function(){var $=t.controls,Ee=b.value,Oe=A.value,Ve=O.value,y=I.value,S;return Ve?S=wh():Ee?$&&(S=Os()):Oe?S=Bl():y&&(S=Vu()),S?D("span",{class:"vxe-input--extra-suffix"},[S]):null};v={dispatchEvent:function($,Ee,Oe){n($,Object.assign({$input:p,$event:Oe},Ee))},focus:function(){var $=u.value;return s.isActivated=!0,$.focus(),Ie()},blur:function(){var $=u.value;return $.blur(),s.isActivated=!1,Ie()},select:function(){var $=u.value;return $.select(),s.isActivated=!1,Ie()},showPanel:Fn,hidePanel:Ke,updatePlacement:zi},Object.assign(p,v),st(function(){return t.modelValue},function($){s.inputValue=$,Yt()}),st(function(){return t.type},function(){Object.assign(s,{inputValue:t.modelValue,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),Ht()}),st(Re,function(){var $=A.value;$&&(Ot(s.datePanelValue),s.inputValue=t.multiple?pe.value:s.datePanelLabel)}),Ie(function(){bt.on(p,"mousewheel",Ri),bt.on(p,"mousedown",ko),bt.on(p,"keydown",pa),bt.on(p,"blur",Jr)}),Rr(function(){dr(),bt.off(p,"mousewheel"),bt.off(p,"mousedown"),bt.off(p,"keydown"),bt.off(p,"blur")}),Ht();var jl=function(){var $,Ee=t.className,Oe=t.controls,Ve=t.type,y=t.align,S=t.showWordCount,R=t.countMethod,M=t.name,F=t.disabled,K=t.readonly,Y=t.autocomplete,ae=s.inputValue,fe=s.visiblePanel,Ae=s.isActivated,Le=l.value,Fe=T.value,Ge=x.value,Ye=A.value,Be=oe.value,et=ke.value,Ze=te.value,Ne=he.value,Xe=[],ht=Ul(),it=Hl();ht&&Xe.push(ht),Xe.push(D("input",{ref:u,class:"vxe-input--inner",value:ae,name:M,type:Ze,placeholder:Ne,maxlength:et,readonly:Be,disabled:F,autocomplete:Y,onKeydown:sn,onKeyup:Yn,onWheel:qn,onClick:Ds,onInput:Ue,onChange:We,onFocus:Je,onBlur:Or})),it&&Xe.push(it),Xe.push(Vl()),Ye&&Xe.push(Sh());var ft=!1;return S&&["text","search"].includes(Ve)&&(ft=!0,Xe.push(D("span",{class:["vxe-input--count",{"is--error":Fe}]},R?"".concat(R({value:ae})):"".concat(Ge).concat(et?"/".concat(et):"")))),D("div",{ref:c,class:["vxe-input","type--".concat(Ve),Ee,($={},$["size--".concat(Le)]=Le,$["is--".concat(y)]=y,$["is--controls"]=Oe,$["is--prefix"]=!!ht,$["is--suffix"]=!!it,$["is--readonly"]=K,$["is--visivle"]=fe,$["is--count"]=ft,$["is--disabled"]=F,$["is--active"]=Ae,$)]},Xe)};return p.renderVN=jl,p},render:function(){return this.renderVN()}}),yi=xt({name:"VxeCheckbox",props:{modelValue:[String,Number,Boolean],label:{type:[String,Number],default:null},indeterminate:Boolean,title:[String,Number],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},content:[String,Number],disabled:Boolean,size:{type:String,default:function(){return H.checkbox.size||H.size}}},emits:["update:modelValue","change"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l={xID:o,props:t,context:e},s={},c=qr(t),u=ct("$xecheckboxgroup",null),f=_e(function(){return u?E.includes(u.props.modelValue,t.label):t.modelValue===t.checkedValue}),d=_e(function(){if(t.disabled)return!0;if(u){var v=u.props,g=u.getComputeMaps().computeIsMaximize,m=g.value,b=f.value;return v.disabled||m&&!b}return!1}),h=function(v){var g=t.checkedValue,m=t.uncheckedValue,b=d.value;if(!b){var x=v.target.checked,T=x?g:m,A={checked:x,value:T,label:t.label};u?u.handleChecked(A,v):(n("update:modelValue",T),s.dispatchEvent("change",A,v),i&&a&&i.triggerItemEvent(v,a.itemConfig.field,T))}};s={dispatchEvent:function(v,g,m){n(v,Object.assign({$checkbox:l,$event:m},g))}},Object.assign(l,s);var p=function(){var v,g=c.value,m=d.value,b=f.value,x=t.indeterminate;return D("label",{class:["vxe-checkbox",(v={},v["size--".concat(g)]=g,v["is--indeterminate"]=x,v["is--disabled"]=m,v["is--checked"]=b,v)],title:t.title},[D("input",{class:"vxe-checkbox--input",type:"checkbox",disabled:m,checked:b,onChange:h}),D("span",{class:["vxe-checkbox--icon",x?"vxe-icon-checkbox-indeterminate":b?"vxe-icon-checkbox-checked":"vxe-icon-checkbox-unchecked"]}),D("span",{class:"vxe-checkbox--label"},r.default?r.default({}):Ar(t.content))])};return l.renderVN=p,l},render:function(){return this.renderVN()}});function Qa(t){return t.visible!==!1}function $7(){return E.uniqueId("opt_")}const vs=xt({name:"VxeSelect",props:{modelValue:null,clearable:Boolean,placeholder:{type:String,default:function(){return E.eqNull(H.select.placeholder)?H.i18n("vxe.base.pleaseSelect"):H.select.placeholder}},loading:Boolean,disabled:Boolean,multiple:Boolean,multiCharOverflow:{type:[Number,String],default:function(){return H.select.multiCharOverflow}},prefixIcon:String,placement:String,options:Array,optionProps:Object,optionGroups:Array,optionGroupProps:Object,optionConfig:Object,className:[String,Function],popupClassName:[String,Function],max:{type:[String,Number],default:null},size:{type:String,default:function(){return H.select.size||H.size}},filterable:Boolean,filterMethod:Function,remote:Boolean,remoteMethod:Function,emptyText:String,optionId:{type:String,default:function(){return H.select.optionId}},optionKey:Boolean,transfer:{type:Boolean,default:function(){return H.select.transfer}}},emits:["update:modelValue","change","clear","blur","focus"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l=qr(t),s=Jt({inited:!1,staticOptions:[],fullGroupList:[],fullOptionList:[],visibleGroupList:[],visibleOptionList:[],remoteValueList:[],panelIndex:0,panelStyle:{},panelPlacement:null,currentOption:null,currentValue:null,visiblePanel:!1,animatVisible:!1,isActivated:!1,searchValue:"",searchLoading:!1}),c=je(),u=je(),f=je(),d=je(),h=je(),p={refElem:c},v={xID:o,props:t,context:e,reactData:s,getRefMaps:function(){return p}},g={},m=_e(function(){return t.optionProps||{}}),b=_e(function(){return t.optionGroupProps||{}}),x=_e(function(){var U=m.value;return U.label||"label"}),T=_e(function(){var U=m.value;return U.value||"value"}),A=_e(function(){var U=b.value;return U.label||"label"}),O=_e(function(){var U=b.value;return U.options||"options"}),I=_e(function(){var U=t.modelValue,ge=t.multiple,Se=t.max;return ge&&Se?(U?U.length:0)>=E.toNumber(Se):!1}),_=_e(function(){return Object.assign({},H.select.optionConfig,t.optionConfig)}),k=_e(function(){return s.fullGroupList.some(function(U){return U.options&&U.options.length})}),L=_e(function(){return E.toNumber(t.multiCharOverflow)}),P=function(U,ge){return U&&(E.isString(U)&&(U=r[U]||null),E.isFunction(U))?pr(U(ge)):[]},W=function(U){var ge=s.fullOptionList,Se=s.fullGroupList,$e=k.value,Ue=T.value;if($e)for(var We=0;We<Se.length;We++){var Je=Se[We];if(Je.options)for(var nt=0;nt<Je.options.length;nt++){var Qe=Je.options[nt];if(U===Qe[Ue])return Qe}}return ge.find(function(Ke){return U===Ke[Ue]})},q=function(U){var ge=s.remoteValueList,Se=x.value,$e=ge.find(function(We){return U===We.key}),Ue=$e?$e.result:null;return E.toValueString(Ue?Ue[Se]:U)},V=function(U){var ge=x.value,Se=W(U);return E.toValueString(Se?Se[ge]:U)},G=_e(function(){var U=t.modelValue,ge=t.multiple,Se=t.remote,$e=L.value;if(U&&ge){var Ue=E.isArray(U)?U:[U];return Se?Ue.map(function(We){return q(We)}).join(", "):Ue.map(function(We){var Je=V(We);return $e>0&&Je.length>$e?"".concat(Je.substring(0,$e),"..."):Je}).join(", ")}return Se?q(U):V(U)}),pe=function(){var U=_.value;return U.keyField||t.optionId||"_X_OPTION_KEY"},J=function(U){var ge=U[pe()];return ge?encodeURIComponent(ge):""},N=function(){var U=t.filterable,ge=t.filterMethod,Se=s.fullOptionList,$e=s.fullGroupList,Ue=s.searchValue,We=k.value,Je=A.value,nt=x.value;return We?U&&ge?s.visibleGroupList=$e.filter(function(Qe){return Qa(Qe)&&ge({group:Qe,option:null,searchValue:Ue})}):U?s.visibleGroupList=$e.filter(function(Qe){return Qa(Qe)&&(!Ue||"".concat(Qe[Je]).indexOf(Ue)>-1)}):s.visibleGroupList=$e.filter(Qa):U&&ge?s.visibleOptionList=Se.filter(function(Qe){return Qa(Qe)&&ge({group:null,option:Qe,searchValue:Ue})}):U?s.visibleOptionList=Se.filter(function(Qe){return Qa(Qe)&&(!Ue||"".concat(Qe[nt]).indexOf(Ue)>-1)}):s.visibleOptionList=Se.filter(Qa),Ie()},Z=function(){var U=s.fullOptionList,ge=s.fullGroupList,Se=O.value,$e=pe(),Ue=function(We){J(We)||(We[$e]=$7())};ge.length?ge.forEach(function(We){Ue(We),We[Se]&&We[Se].forEach(Ue)}):U.length&&U.forEach(Ue),N()},le=function(U){var ge=T.value;U&&(s.currentOption=U,s.currentValue=U[ge])},ye=function(U,ge){return Ie().then(function(){if(U){var Se=d.value,$e=h.value,Ue=$e.querySelector("[optid='".concat(J(U),"']"));if(Se&&Ue){var We=Se.offsetHeight,Je=5;ge?Ue.offsetTop+Ue.offsetHeight-Se.scrollTop>We&&(Se.scrollTop=Ue.offsetTop+Ue.offsetHeight-We):(Ue.offsetTop+Je<Se.scrollTop||Ue.offsetTop+Je>Se.scrollTop+Se.clientHeight)&&(Se.scrollTop=Ue.offsetTop-Je)}}})},me=function(){s.panelIndex<Ba()&&(s.panelIndex=sa())},Re=function(){return Ie().then(function(){var U=t.transfer,ge=t.placement,Se=s.panelIndex,$e=c.value,Ue=h.value;if(Ue&&$e){var We=$e.offsetHeight,Je=$e.offsetWidth,nt=Ue.offsetHeight,Qe=Ue.offsetWidth,Ke=5,at={zIndex:Se},Q=Ia($e),Ot=Q.boundingTop,Yt=Q.boundingLeft,Ht=Q.visibleHeight,yt=Q.visibleWidth,At="bottom";if(U){var Wt=Yt,ut=Ot+We;ge==="top"?(At="top",ut=Ot-nt):ge||(ut+nt+Ke>Ht&&(At="top",ut=Ot-nt),ut<Ke&&(At="bottom",ut=Ot+We)),Wt+Qe+Ke>yt&&(Wt-=Wt+Qe+Ke-yt),Wt<Ke&&(Wt=Ke),Object.assign(at,{left:"".concat(Wt,"px"),top:"".concat(ut,"px"),minWidth:"".concat(Je,"px")})}else ge==="top"?(At="top",at.bottom="".concat(We,"px")):ge||Ot+We+nt>Ht&&Ot-We-nt>Ke&&(At="top",at.bottom="".concat(We,"px"));return s.panelStyle=at,s.panelPlacement=At,Ie()}})},be,Ce=function(){var U=t.loading,ge=t.disabled,Se=t.filterable;!U&&!ge&&(clearTimeout(be),s.inited||(s.inited=!0),s.isActivated=!0,s.animatVisible=!0,Se&&N(),setTimeout(function(){var $e=t.modelValue,Ue=t.multiple,We=W(Ue&&$e?$e[0]:$e);s.visiblePanel=!0,We&&(le(We),ye(We)),ie()},10),me(),Re())},we=function(){s.searchValue="",s.searchLoading=!1,s.visiblePanel=!1,be=window.setTimeout(function(){s.animatVisible=!1},350)},ce=function(U,ge){ge!==t.modelValue&&(n("update:modelValue",ge),g.dispatchEvent("change",{value:ge},U),i&&a&&i.triggerItemEvent(U,a.itemConfig.field,ge))},re=function(U,ge){s.remoteValueList=[],ce(U,ge),g.dispatchEvent("clear",{value:ge},U)},ve=function(U,ge){re(ge,null),we()},Te=function(U,ge,Se){var $e=t.modelValue,Ue=t.multiple,We=s.remoteValueList;if(Ue){var Je=void 0;$e?$e.indexOf(ge)===-1?Je=$e.concat([ge]):Je=$e.filter(function(Qe){return Qe!==ge}):Je=[ge];var nt=We.find(function(Qe){return Qe.key===ge});nt?nt.result=Se:We.push({key:ge,result:Se}),ce(U,Je)}else s.remoteValueList=[{key:ge,result:Se}],ce(U,ge),we()},Pe=function(U){var ge=t.disabled,Se=s.visiblePanel;if(!ge&&Se){var $e=h.value;Pt(U,$e).flag?Re():we()}},B=function(U){var ge=t.disabled,Se=s.visiblePanel;if(!ge){var $e=c.value,Ue=h.value;s.isActivated=Pt(U,$e).flag||Pt(U,Ue).flag,Se&&!s.isActivated&&we()}},w=function(U,ge){var Se=s.visibleOptionList,$e=s.visibleGroupList,Ue=k.value,We=T.value,Je=O.value,nt,Qe,Ke,at;if(Ue)for(var Q=0;Q<$e.length;Q++){var Ot=$e[Q],Yt=Ot[Je],Ht=Ot.disabled;if(Yt)for(var yt=0;yt<Yt.length;yt++){var At=Yt[yt],Wt=Qa(At),ut=Ht||At.disabled;if(!nt&&!ut&&(nt=At),at&&Wt&&!ut&&(Ke=At,!ge))return{offsetOption:Ke};if(U===At[We]){if(at=At,ge)return{offsetOption:Qe}}else Wt&&!ut&&(Qe=At)}}else for(var yt=0;yt<Se.length;yt++){var At=Se[yt],ut=At.disabled;if(!nt&&!ut&&(nt=At),at&&!ut&&(Ke=At,!ge))return{offsetOption:Ke};if(U===At[We]){if(at=At,ge)return{offsetOption:Qe}}else ut||(Qe=At)}return{firstOption:nt}},C=function(U){var ge=t.clearable,Se=t.disabled,$e=s.visiblePanel,Ue=s.currentValue,We=s.currentOption;if(!Se){var Je=_t(U,gt.TAB),nt=_t(U,gt.ENTER),Qe=_t(U,gt.ESCAPE),Ke=_t(U,gt.ARROW_UP),at=_t(U,gt.ARROW_DOWN),Q=_t(U,gt.DELETE),Ot=_t(U,gt.SPACEBAR);if(Je&&(s.isActivated=!1),$e)if(Qe||Je)we();else if(nt)U.preventDefault(),U.stopPropagation(),Te(U,Ue,We);else if(Ke||at){U.preventDefault();var Yt=w(Ue,Ke),Ht=Yt.firstOption,yt=Yt.offsetOption;!yt&&!W(Ue)&&(yt=Ht),le(yt),ye(yt,at)}else Ot&&U.preventDefault();else(Ke||at||nt||Ot)&&s.isActivated&&(U.preventDefault(),Ce());s.isActivated&&Q&&ge&&re(U,null)}},j=function(){we()},ie=function(){t.filterable&&Ie(function(){var U=f.value;U&&U.focus()})},ne=function(U){t.disabled||(s.isActivated=!0),g.dispatchEvent("focus",{},U)},X=function(U){s.isActivated=!1,g.dispatchEvent("blur",{},U)},ee=function(U){s.searchValue=U},de=function(){s.isActivated=!0},oe=function(U){var ge=U.$event,Se=_t(ge,gt.ENTER);Se&&(ge.preventDefault(),ge.stopPropagation())},te=E.debounce(function(){var U=t.remote,ge=t.remoteMethod,Se=s.searchValue;U&&ge?(s.searchLoading=!0,Promise.resolve(ge({searchValue:Se})).then(function(){return Ie()}).catch(function(){return Ie()}).finally(function(){s.searchLoading=!1,N()})):N()},350,{trailing:!0}),he=function(U){var ge=U.$event;ge.preventDefault(),s.visiblePanel?we():Ce()},ke=function(U,ge,Se){if(ge.disabled||Se&&Se.disabled)return!0;var $e=I.value;return!!($e&&!U)},se=function(U,ge){var Se=t.optionKey,$e=t.modelValue,Ue=t.multiple,We=s.currentValue,Je=_.value,nt=x.value,Qe=T.value,Ke=k.value,at=Je.useKey;return U.map(function(Q,Ot){var Yt=Q.slots,Ht=Q.className,yt=Q[Qe],At=Ue?$e&&$e.indexOf(yt)>-1:$e===yt,Wt=!Ke||Qa(Q),ut=ke(At,Q,ge),Bt=J(Q),Ut=Yt?Yt.default:null;return Wt?D("div",{key:at||Se?Bt:Ot,class:["vxe-select-option",Ht?E.isFunction(Ht)?Ht({option:Q,$select:v}):Ht:"",{"is--disabled":ut,"is--selected":At,"is--hover":We===yt}],optid:Bt,onMousedown:function(Or){var Xr=Or.button===0;Xr&&Or.stopPropagation()},onClick:function(Or){ut||Te(Or,yt,Q)},onMouseenter:function(){ut||le(Q)}},Ut?P(Ut,{option:Q,$select:v}):Mr(Ar(Q[nt]))):null})},ue=function(){var U=t.optionKey,ge=s.visibleGroupList,Se=_.value,$e=A.value,Ue=O.value,We=Se.useKey;return ge.map(function(Je,nt){var Qe=Je.slots,Ke=Je.className,at=J(Je),Q=Je.disabled,Ot=Qe?Qe.default:null;return D("div",{key:We||U?at:nt,class:["vxe-optgroup",Ke?E.isFunction(Ke)?Ke({option:Je,$select:v}):Ke:"",{"is--disabled":Q}],optid:at},[D("div",{class:"vxe-optgroup--title"},Ot?P(Ot,{option:Je,$select:v}):Ar(Je[$e])),D("div",{class:"vxe-optgroup--wrapper"},se(Je[Ue]||[],Je))])})},xe=function(){var U=s.visibleGroupList,ge=s.visibleOptionList,Se=s.searchLoading,$e=k.value;if(Se)return[D("div",{class:"vxe-select--search-loading"},[D("i",{class:["vxe-select--search-icon",H.icon.SELECT_LOADED]}),D("span",{class:"vxe-select--search-text"},H.i18n("vxe.select.loadingText"))])];if($e){if(U.length)return ue()}else if(ge.length)return se(ge);return[D("div",{class:"vxe-select--empty-placeholder"},t.emptyText||H.i18n("vxe.select.emptyText"))]};g={dispatchEvent:function(U,ge,Se){n(U,Object.assign({$select:v,$event:Se},ge))},isPanelVisible:function(){return s.visiblePanel},togglePanel:function(){return s.visiblePanel?we():Ce(),Ie()},hidePanel:function(){return s.visiblePanel&&we(),Ie()},showPanel:function(){return s.visiblePanel||Ce(),Ie()},refreshOption:N,focus:function(){var U=u.value;return s.isActivated=!0,U.blur(),Ie()},blur:function(){var U=u.value;return U.blur(),s.isActivated=!1,Ie()}},Object.assign(v,g),st(function(){return s.staticOptions},function(U){U.some(function(ge){return ge.options&&ge.options.length})?(s.fullOptionList=[],s.fullGroupList=U):(s.fullGroupList=[],s.fullOptionList=U||[]),Z()}),st(function(){return t.options},function(U){s.fullGroupList=[],s.fullOptionList=U||[],Z()}),st(function(){return t.optionGroups},function(U){s.fullOptionList=[],s.fullGroupList=U||[],Z()}),Er(function(){Ie(function(){var U=t.options,ge=t.optionGroups;ge?s.fullGroupList=ge:U&&(s.fullOptionList=U),Z()}),bt.on(v,"mousewheel",Pe),bt.on(v,"mousedown",B),bt.on(v,"keydown",C),bt.on(v,"blur",j)}),Rr(function(){bt.off(v,"mousewheel"),bt.off(v,"mousedown"),bt.off(v,"keydown"),bt.off(v,"blur")});var De=function(){var U,ge,Se=t.className,$e=t.popupClassName,Ue=t.transfer,We=t.disabled,Je=t.loading,nt=t.filterable,Qe=s.inited,Ke=s.isActivated,at=s.visiblePanel,Q=l.value,Ot=G.value,Yt=r.prefix;return D("div",{ref:c,class:["vxe-select",Se?E.isFunction(Se)?Se({$select:v}):Se:"",(U={},U["size--".concat(Q)]=Q,U["is--visivle"]=at,U["is--disabled"]=We,U["is--filter"]=nt,U["is--loading"]=Je,U["is--active"]=Ke,U)]},[D("div",{class:"vxe-select-slots",ref:"hideOption"},r.default?r.default({}):[]),D(_a,{ref:u,clearable:t.clearable,placeholder:t.placeholder,readonly:!0,disabled:We,type:"text",prefixIcon:t.prefixIcon,suffixIcon:Je?H.icon.SELECT_LOADED:at?H.icon.SELECT_OPEN:H.icon.SELECT_CLOSE,modelValue:Ot,onClear:ve,onClick:he,onFocus:ne,onBlur:X,onSuffixClick:he},Yt?{prefix:function(){return Yt({})}}:{}),D(Ll,{to:"body",disabled:Ue?!Qe:!0},[D("div",{ref:h,class:["vxe-table--ignore-clear vxe-select--panel",$e?E.isFunction($e)?$e({$select:v}):$e:"",(ge={},ge["size--".concat(Q)]=Q,ge["is--transfer"]=Ue,ge["animat--leave"]=!Je&&s.animatVisible,ge["animat--enter"]=!Je&&at,ge)],placement:s.panelPlacement,style:s.panelStyle},Qe?[nt?D("div",{class:"vxe-select-filter--wrapper"},[D(_a,{ref:f,class:"vxe-select-filter--input",modelValue:s.searchValue,clearable:!0,placeholder:H.i18n("vxe.select.search"),prefixIcon:H.icon.INPUT_SEARCH,"onUpdate:modelValue":ee,onFocus:de,onKeydown:oe,onChange:te,onSearch:te})]):$t(),D("div",{ref:d,class:"vxe-select-option--wrapper"},xe())]:[])])])};return v.renderVN=De,sr("$xeselect",v),v},render:function(){return this.renderVN()}}),_c=xt({name:"VxeExportPanel",props:{defaultOptions:Object,storeData:Object},setup:function(t){var e=ct("$xetable",{}),r=e.getComputeMaps(),n=r.computeExportOpts,i=r.computePrintOpts,a=Jt({isAll:!1,isIndeterminate:!1,loading:!1}),o=je(),l=je(),s=je(),c=_e(function(){var _=t.storeData;return _.columns.every(function(k){return k.checked})}),u=_e(function(){var _=t.defaultOptions;return["html","xml","xlsx","pdf"].indexOf(_.type)>-1}),f=_e(function(){var _=t.storeData,k=t.defaultOptions;return!k.original&&k.mode==="current"&&(_.isPrint||["html","xlsx"].indexOf(k.type)>-1)}),d=_e(function(){var _=t.defaultOptions;return!_.original&&["xlsx"].indexOf(_.type)>-1}),h=function(_){var k=t.storeData,L=E.findTree(k.columns,function(W){return W===_});if(L&&L.parent){var P=L.parent;P.children&&P.children.length&&(P.checked=P.children.every(function(W){return W.checked}),P.halfChecked=!P.checked&&P.children.some(function(W){return W.checked||W.halfChecked}),h(P))}},p=function(){var _=t.storeData,k=_.columns;a.isAll=k.every(function(L){return L.disabled||L.checked}),a.isIndeterminate=!a.isAll&&k.some(function(L){return!L.disabled&&(L.checked||L.halfChecked)})},v=function(_){var k=!_.checked;E.eachTree([_],function(L){L.checked=k,L.halfChecked=!1}),h(_),p()},g=function(){var _=t.storeData,k=!a.isAll;E.eachTree(_.columns,function(L){L.disabled||(L.checked=k,L.halfChecked=!1)}),a.isAll=k,p()},m=function(){Ie(function(){var _=l.value,k=s.value,L=o.value,P=_||k||L;P&&P.focus()}),p()},b=function(){var _=t.storeData,k=t.defaultOptions,L=_.hasMerge,P=_.columns,W=c.value,q=f.value,V=E.searchTree(P,function(G){return G.checked},{children:"children",mapChildren:"childNodes",original:!0});return Object.assign({},k,{columns:V,isMerge:L&&q&&W?k.isMerge:!1})},x=function(){var _=t.storeData,k=i.value;_.visible=!1,e.print(Object.assign({},k,b()))},T=function(){var _=t.storeData,k=n.value;a.loading=!0,e.exportData(Object.assign({},k,b())).then(function(){a.loading=!1,_.visible=!1}).catch(function(){a.loading=!1})},A=function(){var _=t.storeData;_.visible=!1},O=function(){var _=t.storeData;_.isPrint?x():T()},I=function(){var _=t.defaultOptions,k=t.storeData,L=a.isAll,P=a.isIndeterminate,W=k.hasTree,q=k.hasMerge,V=k.isPrint,G=k.hasColgroup,pe=_.isHeader,J=[],N=c.value,Z=u.value,le=f.value,ye=d.value;return E.eachTree(k.columns,function(me){var Re=Mr(me.getTitle(),1),be=me.children&&me.children.length,Ce=me.checked,we=me.halfChecked;J.push(D("li",{class:["vxe-export--panel-column-option","level--".concat(me.level),{"is--group":be,"is--checked":Ce,"is--indeterminate":we,"is--disabled":me.disabled}],title:Re,onClick:function(){me.disabled||v(me)}},[D("span",{class:["vxe-checkbox--icon",we?H.icon.TABLE_CHECKBOX_INDETERMINATE:Ce?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]}),D("span",{class:"vxe-checkbox--label"},Re)]))}),D(ps,{modelValue:k.visible,title:H.i18n(V?"vxe.export.printTitle":"vxe.export.expTitle"),width:660,mask:!0,lockView:!0,showFooter:!1,escClosable:!0,maskClosable:!0,loading:a.loading,"onUpdate:modelValue":function(me){k.visible=me},onShow:m},{default:function(){return D("div",{class:"vxe-export--panel"},[D("table",{cellspacing:0,cellpadding:0,border:0},[D("tbody",[[V?$t():D("tr",[D("td",H.i18n("vxe.export.expName")),D("td",[D(_a,{ref:l,modelValue:_.filename,type:"text",clearable:!0,placeholder:H.i18n("vxe.export.expNamePlaceholder"),"onUpdate:modelValue":function(me){_.filename=me}})])]),V?$t():D("tr",[D("td",H.i18n("vxe.export.expType")),D("td",[D(vs,{modelValue:_.type,options:k.typeList.map(function(me){return{value:me.value,label:H.i18n(me.label)}}),"onUpdate:modelValue":function(me){_.type=me}})])]),V||Z?D("tr",[D("td",H.i18n("vxe.export.expSheetName")),D("td",[D(_a,{ref:s,modelValue:_.sheetName,type:"text",clearable:!0,placeholder:H.i18n("vxe.export.expSheetNamePlaceholder"),"onUpdate:modelValue":function(me){_.sheetName=me}})])]):$t(),D("tr",[D("td",H.i18n("vxe.export.expMode")),D("td",[D(vs,{modelValue:_.mode,options:k.modeList.map(function(me){return{value:me.value,label:H.i18n(me.label)}}),"onUpdate:modelValue":function(me){_.mode=me}})])]),D("tr",[D("td",[H.i18n("vxe.export.expColumn")]),D("td",[D("div",{class:"vxe-export--panel-column"},[D("ul",{class:"vxe-export--panel-column-header"},[D("li",{class:["vxe-export--panel-column-option",{"is--checked":L,"is--indeterminate":P}],title:H.i18n("vxe.table.allTitle"),onClick:g},[D("span",{class:["vxe-checkbox--icon",P?H.icon.TABLE_CHECKBOX_INDETERMINATE:L?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]}),D("span",{class:"vxe-checkbox--label"},H.i18n("vxe.export.expCurrentColumn"))])]),D("ul",{class:"vxe-export--panel-column-body"},J)])])]),D("tr",[D("td",H.i18n("vxe.export.expOpts")),D("td",[D("div",{class:"vxe-export--panel-option-row"},[D(yi,{modelValue:_.isHeader,title:H.i18n("vxe.export.expHeaderTitle"),content:H.i18n("vxe.export.expOptHeader"),"onUpdate:modelValue":function(me){_.isHeader=me}}),D(yi,{modelValue:_.isFooter,disabled:!k.hasFooter,title:H.i18n("vxe.export.expFooterTitle"),content:H.i18n("vxe.export.expOptFooter"),"onUpdate:modelValue":function(me){_.isFooter=me}}),D(yi,{modelValue:_.original,title:H.i18n("vxe.export.expOriginalTitle"),content:H.i18n("vxe.export.expOptOriginal"),"onUpdate:modelValue":function(me){_.original=me}})]),D("div",{class:"vxe-export--panel-option-row"},[D(yi,{modelValue:pe&&G&&le?_.isColgroup:!1,title:H.i18n("vxe.export.expColgroupTitle"),disabled:!pe||!G||!le,content:H.i18n("vxe.export.expOptColgroup"),"onUpdate:modelValue":function(me){_.isColgroup=me}}),D(yi,{modelValue:q&&le&&N?_.isMerge:!1,title:H.i18n("vxe.export.expMergeTitle"),disabled:!q||!le||!N,content:H.i18n("vxe.export.expOptMerge"),"onUpdate:modelValue":function(me){_.isMerge=me}}),V?$t():D(yi,{modelValue:ye?_.useStyle:!1,disabled:!ye,title:H.i18n("vxe.export.expUseStyleTitle"),content:H.i18n("vxe.export.expOptUseStyle"),"onUpdate:modelValue":function(me){_.useStyle=me}}),D(yi,{modelValue:W?_.isAllExpand:!1,disabled:!W,title:H.i18n("vxe.export.expAllExpandTitle"),content:H.i18n("vxe.export.expOptAllExpand"),"onUpdate:modelValue":function(me){_.isAllExpand=me}})])])])]])]),D("div",{class:"vxe-export--panel-btns"},[D($i,{content:H.i18n("vxe.export.expCancel"),onClick:A}),D($i,{ref:o,status:"primary",content:H.i18n(V?"vxe.export.expPrint":"vxe.export.expConfirm"),onClick:O})])])}})};return I}}),ul=xt({name:"VxeRadioGroup",props:{modelValue:[String,Number,Boolean],disabled:Boolean,strict:{type:Boolean,default:function(){return H.radio.strict}},size:{type:String,default:function(){return H.radio.size||H.size}}},emits:["update:modelValue","change"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l={xID:o,props:t,context:e,name:E.uniqueId("xegroup_")},s={};qr(t);var c={handleChecked:function(f,d){n("update:modelValue",f.label),s.dispatchEvent("change",f),i&&a&&i.triggerItemEvent(d,a.itemConfig.field,f.label)}};s={dispatchEvent:function(f,d,h){n(f,Object.assign({$radioGroup:l,$event:h},d))}};var u=function(){return D("div",{class:"vxe-radio-group"},r.default?r.default({}):[])};return Object.assign(l,c,{renderVN:u,dispatchEvent}),sr("$xeradiogroup",l),u}}),fl=xt({name:"VxeRadio",props:{modelValue:[String,Number,Boolean],label:{type:[String,Number,Boolean],default:null},title:[String,Number],content:[String,Number],disabled:Boolean,name:String,strict:{type:Boolean,default:function(){return H.radio.strict}},size:{type:String,default:function(){return H.radio.size||H.size}}},emits:["update:modelValue","change"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l={xID:o,props:t,context:e},s=qr(t),c=ct("$xeradiogroup",null),u={},f=_e(function(){return t.disabled||c&&c.props.disabled}),d=_e(function(){return c?c.name:t.name}),h=_e(function(){return c?c.props.strict:t.strict}),p=_e(function(){var x=t.modelValue,T=t.label;return c?c.props.modelValue===T:x===T}),v=function(x,T){c?c.handleChecked({label:x},T):(n("update:modelValue",x),u.dispatchEvent("change",{label:x},T),i&&a&&i.triggerItemEvent(T,a.itemConfig.field,x))},g=function(x){var T=f.value;T||v(t.label,x)},m=function(x){var T=f.value,A=h.value;!T&&!A&&t.label===(c?c.props.modelValue:t.modelValue)&&v(null,x)};u={dispatchEvent:function(x,T,A){n(x,Object.assign({$radio:l,$event:A},T))}},Object.assign(l,u);var b=function(){var x,T=s.value,A=f.value,O=d.value,I=p.value;return D("label",{class:["vxe-radio",(x={},x["size--".concat(T)]=T,x["is--checked"]=I,x["is--disabled"]=A,x)],title:t.title},[D("input",{class:"vxe-radio--input",type:"radio",name:O,checked:I,disabled:A,onChange:g,onClick:m}),D("span",{class:["vxe-radio--icon",I?"vxe-icon-radio-checked":"vxe-icon-radio-unchecked"]}),D("span",{class:"vxe-radio--label"},r.default?r.default({}):Ar(t.content))])};return l.renderVN=b,l},render:function(){return this.renderVN()}}),Rc=xt({name:"VxeImportPanel",props:{defaultOptions:Object,storeData:Object},setup:function(t){var e=ct("$xetable",{}),r=e.getComputeMaps().computeImportOpts,n=Jt({loading:!1}),i=je(),a=_e(function(){var p=t.storeData;return"".concat(p.filename,".").concat(p.type)}),o=_e(function(){var p=t.storeData;return p.file&&p.type}),l=_e(function(){var p=t.storeData,v=p.type,g=p.typeList;if(v){var m=E.find(g,function(b){return v===b.value});return m?H.i18n(m.label):"*.*"}return"*.".concat(g.map(function(b){return b.value}).join(", *."))}),s=function(){var p=t.storeData;Object.assign(p,{filename:"",sheetName:"",type:""})},c=function(){var p=t.storeData,v=t.defaultOptions;e.readFile(v).then(function(g){var m=g.file;Object.assign(p,Dg(m),{file:m})}).catch(function(g){return g})},u=function(){Ie(function(){var p=i.value;p&&p.focus()})},f=function(){var p=t.storeData;p.visible=!1},d=function(){var p=t.storeData,v=t.defaultOptions,g=r.value;n.loading=!0,e.importByFile(p.file,Object.assign({},g,v)).then(function(){n.loading=!1,p.visible=!1}).catch(function(){n.loading=!1})},h=function(){var p=t.defaultOptions,v=t.storeData,g=a.value,m=o.value,b=l.value;return D(ps,{modelValue:v.visible,title:H.i18n("vxe.import.impTitle"),width:440,mask:!0,lockView:!0,showFooter:!1,escClosable:!0,maskClosable:!0,loading:n.loading,"onUpdate:modelValue":function(x){v.visible=x},onShow:u},{default:function(){return D("div",{class:"vxe-export--panel"},[D("table",{cellspacing:0,cellpadding:0,border:0},[D("tbody",[D("tr",[D("td",H.i18n("vxe.import.impFile")),D("td",[m?D("div",{class:"vxe-import-selected--file",title:g},[D("span",g),D("i",{class:H.icon.INPUT_CLEAR,onClick:s})]):D("button",{ref:i,class:"vxe-import-select--file",onClick:c},H.i18n("vxe.import.impSelect"))])]),D("tr",[D("td",H.i18n("vxe.import.impType")),D("td",b)]),D("tr",[D("td",H.i18n("vxe.import.impOpts")),D("td",[D(ul,{modelValue:p.mode,"onUpdate:modelValue":function(x){p.mode=x}},{default:function(){return v.modeList.map(function(x){return D(fl,{label:x.value,content:H.i18n(x.label)})})}})])])])]),D("div",{class:"vxe-export--panel-btns"},[D($i,{content:H.i18n("vxe.import.impCancel"),onClick:f}),D($i,{status:"primary",disabled:!m,content:H.i18n("vxe.import.impConfirm"),onClick:d})])])}})};return h}});var $s,eo,On,B7='body{margin:0;color:#333333;font-size:14px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu}body *{-webkit-box-sizing:border-box;box-sizing:border-box}.vxe-table{border-collapse:collapse;text-align:left;border-spacing:0}.vxe-table:not(.is--print){table-layout:fixed}.vxe-table,.vxe-table th,.vxe-table td,.vxe-table td{border-color:#D0D0D0;border-style:solid;border-width:0}.vxe-table.is--print{width:100%}.border--default,.border--full,.border--outer{border-top-width:1px}.border--default,.border--full,.border--outer{border-left-width:1px}.border--outer,.border--default th,.border--default td,.border--full th,.border--full td,.border--outer th,.border--inner th,.border--inner td{border-bottom-width:1px}.border--default,.border--outer,.border--full th,.border--full td{border-right-width:1px}.border--default th,.border--full th,.border--outer th{background-color:#f8f8f9}.vxe-table td>div,.vxe-table th>div{padding:.5em .4em}.col--center{text-align:center}.col--right{text-align:right}.vxe-table:not(.is--print) .col--ellipsis>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vxe-table--tree-node{text-align:left}.vxe-table--tree-node-wrapper{position:relative}.vxe-table--tree-icon-wrapper{position:absolute;top:50%;width:1em;height:1em;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-table--tree-unfold-icon,.vxe-table--tree-fold-icon{position:absolute;width:0;height:0;border-style:solid;border-width:.5em;border-right-color:transparent;border-bottom-color:transparent}.vxe-table--tree-unfold-icon{left:.3em;top:0;border-left-color:#939599;border-top-color:transparent}.vxe-table--tree-fold-icon{left:0;top:.3em;border-left-color:transparent;border-top-color:#939599}.vxe-table--tree-cell{display:block;padding-left:1.5em}.vxe-table input[type="checkbox"]{margin:0}.vxe-table input[type="checkbox"],.vxe-table input[type="radio"],.vxe-table input[type="checkbox"]+span,.vxe-table input[type="radio"]+span{vertical-align:middle;padding-left:0.4em}';function OA(){var t=document.createElement("iframe");return t.className="vxe-table--print-frame",t}function Hg(t,e){return new Blob([t],{type:"text/".concat(e.type,";charset=utf-8;")})}function TI(t,e){var r=t.style;return["<!DOCTYPE html><html>","<head>",'<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">',"<title>".concat(t.sheetName,"</title>"),"<style>".concat(B7,"</style>"),r?"<style>".concat(r,"</style>"):"","</head>","<body>".concat(e,"</body>"),"</html>"].join("")}var ed=function(t){var e=Object.assign({},t);return $s||($s=document.createElement("form"),eo=document.createElement("input"),$s.className="vxe-table--file-form",eo.name="file",eo.type="file",$s.appendChild(eo),document.body.appendChild($s)),new Promise(function(r,n){var i=e.types||[],a=!i.length||i.some(function(o){return o==="*"});eo.multiple=!!e.multiple,eo.accept=a?"":".".concat(i.join(", .")),eo.onchange=function(o){var l=o.target.files,s=l[0],c="";if(!a)for(var u=0;u<l.length;u++){var f=Dg(l[u]).type;if(!E.includes(i,f)){c=f;break}}if(!c)r({status:!0,files:l,file:s});else{e.message!==!1&&ot.modal.message({content:H.i18n("vxe.error.notType",[c]),status:"error"});var d={status:!1,files:l,file:s};n(d)}},$s.reset(),eo.click()})};function SI(){if(On){if(On.parentNode){try{On.contentDocument.write("")}catch{}On.parentNode.removeChild(On)}On=null}}function kA(){On.parentNode||document.body.appendChild(On)}function U7(){requestAnimationFrame(SI)}function Wv(t,e,r){r===void 0&&(r="");var n=e.beforePrintMethod;n&&(r=n({content:r,options:e,$table:t})||""),r=TI(e,r);var i=Hg(r,e);ii.msie?(SI(),On=OA(),kA(),On.contentDocument.write(r),On.contentDocument.execCommand("print")):(On||(On=OA(),On.onload=function(a){a.target.src&&(a.target.contentWindow.onafterprint=U7,a.target.contentWindow.print())}),kA(),On.src=URL.createObjectURL(i))}var td=function(t){var e=t.filename,r=t.type,n=t.content,i="".concat(e,".").concat(r);if(window.Blob){var a=n instanceof Blob?n:Hg(E.toValueString(n),t);if(navigator.msSaveBlob)navigator.msSaveBlob(a,i);else{var o=URL.createObjectURL(a),l=document.createElement("a");l.target="_blank",l.download=i,l.href=o,document.body.appendChild(l),l.click(),requestAnimationFrame(function(){l.parentNode&&l.parentNode.removeChild(l),URL.revokeObjectURL(o)})}return Promise.resolve()}return Promise.reject(new Error(Cg("vxe.error.notExp")))},Bs,H7="\uFEFF",Yo=`\r
`;function MA(t){return t.property||["seq","checkbox","radio"].indexOf(t.type)>-1}var wI=function(t){var e=[];return t.forEach(function(r){r.childNodes&&r.childNodes.length?(e.push(r),e.push.apply(e,wI(r.childNodes))):e.push(r)}),e},V7=function(t){var e=1,r=function(o,l){if(l&&(o._level=l._level+1,e<o._level&&(e=o._level)),o.childNodes&&o.childNodes.length){var s=0;o.childNodes.forEach(function(c){r(c,o),s+=c._colSpan}),o._colSpan=s}else o._colSpan=1};t.forEach(function(o){o._level=1,r(o)});for(var n=[],i=0;i<e;i++)n.push([]);var a=wI(t);return a.forEach(function(o){o.childNodes&&o.childNodes.length?o._rowSpan=1:o._rowSpan=e-o._level+1,n[o._level-1].push(o)}),n};function j7(t){return t===!0?"full":t||"default"}function Us(t){return t==="TRUE"||t==="true"||t===!0}function ff(t,e){var r=t.footerFilterMethod;return r?e.filter(function(n,i){return r({items:n,$rowIndex:i})}):e}function W7(t,e){if(e){if(t.type==="seq")return"	".concat(e);switch(t.cellType){case"string":if(!isNaN(e))return"	".concat(e);break;case"number":break;default:if(e.length>=12&&!isNaN(e))return"	".concat(e);break}}return e}function Hs(t){return/[",\s\n]/.test(t)?'"'.concat(t.replace(/"/g,'""'),'"'):t}function ni(t,e){return t.getElementsByTagName(e)}function FA(t){return"#".concat(t,"@").concat(E.uniqueId())}function CI(t,e){return t.replace(/#\d+@\d+/g,function(r){return E.hasOwnProp(e,r)?e[r]:r})}function PA(t,e){var r=CI(t,e);return r.replace(/^"+$/g,function(n){return'"'.repeat(Math.ceil(n.length/2))})}function II(t,e,r){var n=e.split(Yo),i=[],a=[];if(n.length){var o={},l=Date.now();n.forEach(function(s){if(s){var c={};s=s.replace(/("")|(\n)/g,function(f,d){var h=FA(l);return o[h]=d?'"':`
`,h}).replace(/"(.*?)"/g,function(f,d){var h=FA(l);return o[h]=CI(d,o),h});var u=s.split(r);a.length?(u.forEach(function(f,d){d<a.length&&(c[a[d]]=PA(f.trim(),o))}),i.push(c)):a=u.map(function(f){return PA(f.trim(),o)})}})}return{fields:a,rows:i}}function G7(t,e){return II(t,e,",")}function z7(t,e){return II(t,e,"	")}function K7(t,e){var r=new DOMParser,n=r.parseFromString(e,"text/html"),i=ni(n,"body"),a=[],o=[];if(i.length){var l=ni(i[0],"table");if(l.length){var s=ni(l[0],"thead");if(s.length){E.arrayEach(ni(s[0],"tr"),function(u){E.arrayEach(ni(u,"th"),function(f){o.push(f.textContent)})});var c=ni(l[0],"tbody");c.length&&E.arrayEach(ni(c[0],"tr"),function(u){var f={};E.arrayEach(ni(u,"td"),function(d,h){o[h]&&(f[o[h]]=d.textContent||"")}),a.push(f)})}}}return{fields:o,rows:a}}function Y7(t,e){var r=new DOMParser,n=r.parseFromString(e,"application/xml"),i=ni(n,"Worksheet"),a=[],o=[];if(i.length){var l=ni(i[0],"Table");if(l.length){var s=ni(l[0],"Row");s.length&&(E.arrayEach(ni(s[0],"Cell"),function(c){o.push(c.textContent)}),E.arrayEach(s,function(c,u){if(u){var f={},d=ni(c,"Cell");E.arrayEach(d,function(h,p){o[p]&&(f[o[p]]=h.textContent)}),a.push(f)}}))}}return{fields:o,rows:a}}function NA(t){E.eachTree(t,function(e){delete e._level,delete e._colSpan,delete e._rowSpan,delete e._children,delete e.childNodes},{children:"children"})}function q7(t,e){var r=[];return t.forEach(function(n){var i=n.property;i&&r.push(i)}),e.some(function(n){return r.indexOf(n)>-1})}var X7=["exportData","importByFile","importData","saveFile","readFile","print","openImport","openExport","openPrint"],Z7={setupTable:function(t){var e=t.props,r=t.reactData,n=t.internalData,i=t.getComputeMaps(),a=i.computeTreeOpts,o=i.computePrintOpts,l=i.computeExportOpts,s=i.computeImportOpts,c=i.computeCustomOpts,u=i.computeSeqOpts,f=i.computeRadioOpts,d=i.computeCheckboxOpts,h=i.computeColumnOpts,p=ct("$xegrid",null),v=function(N){var Z=a.value,le=Z.children||Z.childrenField;return N[le]&&N[le].length},g=function(N,Z,le,ye){var me=u.value,Re=me.seqMethod||le.seqMethod;return Re?Re({row:N,rowIndex:t.getRowIndex(N),$rowIndex:Z,column:le,columnIndex:t.getColumnIndex(le),$columnIndex:ye}):t.getRowSeq(N)};function m(N,Z){var le=h.value,ye=Z.headerExportMethod||le.headerExportMethod;return ye?ye({column:Z,options:N,$table:t}):(N.original?Z.property:Z.getTitle())||""}var b=function(N){return E.isBoolean(N)?N?"TRUE":"FALSE":N},x=function(N,Z,le){var ye=N.isAllExpand,me=N.mode,Re=e.treeConfig,be=f.value,Ce=d.value,we=a.value,ce=h.value;if(Bs||(Bs=document.createElement("div")),Re){var re=we.children||we.childrenField,ve=[],Te=new Map;return E.eachTree(le,function(Pe,B,w,C,j,ie){var ne=Pe._row||Pe,X=j&&j._row?j._row:j;if(ye||!X||Te.has(X)&&t.isTreeExpandByRow(X)){var ee=v(ne),de={_row:ne,_level:ie.length-1,_hasChild:ee,_expand:ee&&t.isTreeExpandByRow(ne)};Z.forEach(function(oe,te){var he="",ke=oe.editRender||oe.cellRender,se=oe.exportMethod;if(!se&&ke&&ke.name){var ue=ot.renderer.get(ke.name);ue&&(se=ue.exportMethod)}if(se||(se=ce.exportMethod),se)he=se({$table:t,row:ne,column:oe,options:N});else switch(oe.type){case"seq":he=me==="all"?C.map(function(De,U){return U%2===0?Number(De)+1:"."}).join(""):g(ne,B,oe,te);break;case"checkbox":he=b(t.isCheckedByCheckboxRow(ne)),de._checkboxLabel=Ce.labelField?E.get(ne,Ce.labelField):"",de._checkboxDisabled=Ce.checkMethod&&!Ce.checkMethod({row:ne});break;case"radio":he=b(t.isCheckedByRadioRow(ne)),de._radioLabel=be.labelField?E.get(ne,be.labelField):"",de._radioDisabled=be.checkMethod&&!be.checkMethod({row:ne});break;default:if(N.original)he=la(ne,oe);else if(he=t.getCellLabel(ne,oe),oe.type==="html")Bs.innerHTML=he,he=Bs.innerText.trim();else{var xe=t.getCell(ne,oe);xe&&(he=xe.innerText.trim())}}de[oe.id]=E.toValueString(he)}),Te.set(ne,1),ve.push(Object.assign(de,ne))}},{children:re}),ve}return le.map(function(Pe,B){var w={_row:Pe};return Z.forEach(function(C,j){var ie="",ne=C.editRender||C.cellRender,X=C.exportMethod;if(!X&&ne&&ne.name){var ee=ot.renderer.get(ne.name);ee&&(X=ee.exportMethod)}if(X)ie=X({$table:t,row:Pe,column:C,options:N});else switch(C.type){case"seq":ie=me==="all"?B+1:g(Pe,B,C,j);break;case"checkbox":ie=b(t.isCheckedByCheckboxRow(Pe)),w._checkboxLabel=Ce.labelField?E.get(Pe,Ce.labelField):"",w._checkboxDisabled=Ce.checkMethod&&!Ce.checkMethod({row:Pe});break;case"radio":ie=b(t.isCheckedByRadioRow(Pe)),w._radioLabel=be.labelField?E.get(Pe,be.labelField):"",w._radioDisabled=be.checkMethod&&!be.checkMethod({row:Pe});break;default:if(N.original)ie=la(Pe,C);else if(ie=t.getCellLabel(Pe,C),C.type==="html")Bs.innerHTML=ie,ie=Bs.innerText.trim();else{var de=t.getCell(Pe,C);de&&(ie=de.innerText.trim())}}w[C.id]=E.toValueString(ie)}),w})},T=function(N){var Z=N.columns,le=N.dataFilterMethod,ye=N.data;return le&&(ye=ye.filter(function(me,Re){return le({row:me,$rowIndex:Re})})),x(N,Z,ye)},A=function(N,Z,le){var ye=h.value,me=le.editRender||le.cellRender,Re=le.footerExportMethod;if(!Re&&me&&me.name){var be=ot.renderer.get(me.name);be&&(Re=be.footerExportMethod)}Re||(Re=ye.footerExportMethod);var Ce=t.getVTColumnIndex(le),we=Re?Re({$table:t,items:Z,itemIndex:Ce,_columnIndex:Ce,column:le,options:N}):E.toValueString(Z[Ce]);return we},O=function(N,Z,le){var ye=H7;if(N.isHeader&&(ye+=Z.map(function(be){return Hs(m(N,be))}).join(",")+Yo),le.forEach(function(be){ye+=Z.map(function(Ce){return Hs(W7(Ce,be[Ce.id]))}).join(",")+Yo}),N.isFooter){var me=r.footerTableData,Re=ff(N,me);Re.forEach(function(be){ye+=Z.map(function(Ce){return Hs(A(N,be,Ce))}).join(",")+Yo})}return ye},I=function(N,Z,le){var ye="";if(N.isHeader&&(ye+=Z.map(function(be){return Hs(m(N,be))}).join("	")+Yo),le.forEach(function(be){ye+=Z.map(function(Ce){return Hs(be[Ce.id])}).join("	")+Yo}),N.isFooter){var me=r.footerTableData,Re=ff(N,me);Re.forEach(function(be){ye+=Z.map(function(Ce){return Hs(A(N,be,Ce))}).join(",")+Yo})}return ye},_=function(N,Z,le){var ye=N[Z],me=E.isUndefined(ye)||E.isNull(ye)?le:ye,Re=me==="ellipsis",be=me==="title",Ce=me===!0||me==="tooltip",we=be||Ce||Re,ce=r.scrollXLoad,re=r.scrollYLoad;return(ce||re)&&!we&&(we=!0),we},k=function(N,Z,le){var ye=e.id,me=e.border,Re=e.treeConfig,be=e.headerAlign,Ce=e.align,we=e.footerAlign,ce=e.showOverflow,re=e.showHeaderOverflow,ve=r.isAllSelected,Te=r.isIndeterminate,Pe=r.mergeList,B=a.value,w=N.print,C=N.isHeader,j=N.isFooter,ie=N.isColgroup,ne=N.isMerge,X=N.colgroups,ee=N.original,de="check-all",oe=["vxe-table","border--".concat(j7(me)),w?"is--print":"",C?"is--header":""].filter(function(ue){return ue}),te=['<table class="'.concat(oe.join(" "),'" border="0" cellspacing="0" cellpadding="0">'),"<colgroup>".concat(Z.map(function(ue){return'<col style="width:'.concat(ue.renderWidth,'px">')}).join(""),"</colgroup>")];if(C&&(te.push("<thead>"),ie&&!ee?X.forEach(function(ue){te.push("<tr>".concat(ue.map(function(xe){var De=xe.headerAlign||xe.align||be||Ce,U=_(xe,"showHeaderOverflow",re)?["col--ellipsis"]:[],ge=m(N,xe),Se=0,$e=0;E.eachTree([xe],function(We){(!We.childNodes||!xe.childNodes.length)&&$e++,Se+=We.renderWidth},{children:"childNodes"});var Ue=Se-$e;return De&&U.push("col--".concat(De)),xe.type==="checkbox"?'<th class="'.concat(U.join(" "),'" colspan="').concat(xe._colSpan,'" rowspan="').concat(xe._rowSpan,'"><div ').concat(w?"":'style="width: '.concat(Ue,'px"'),'><input type="checkbox" class="').concat(de,'" ').concat(ve?"checked":"","><span>").concat(ge,"</span></div></th>"):'<th class="'.concat(U.join(" "),'" colspan="').concat(xe._colSpan,'" rowspan="').concat(xe._rowSpan,'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(Ue,'px"'),"><span>").concat(Mr(ge,!0),"</span></div></th>")}).join(""),"</tr>"))}):te.push("<tr>".concat(Z.map(function(ue){var xe=ue.headerAlign||ue.align||be||Ce,De=_(ue,"showHeaderOverflow",re)?["col--ellipsis"]:[],U=m(N,ue);return xe&&De.push("col--".concat(xe)),ue.type==="checkbox"?'<th class="'.concat(De.join(" "),'"><div ').concat(w?"":'style="width: '.concat(ue.renderWidth,'px"'),'><input type="checkbox" class="').concat(de,'" ').concat(ve?"checked":"","><span>").concat(U,"</span></div></th>"):'<th class="'.concat(De.join(" "),'" title="').concat(U,'"><div ').concat(w?"":'style="width: '.concat(ue.renderWidth,'px"'),"><span>").concat(Mr(U,!0),"</span></div></th>")}).join(""),"</tr>")),te.push("</thead>")),le.length&&(te.push("<tbody>"),Re?le.forEach(function(ue){te.push("<tr>"+Z.map(function(xe){var De=xe.align||Ce,U=_(xe,"showOverflow",ce)?["col--ellipsis"]:[],ge=ue[xe.id];if(De&&U.push("col--".concat(De)),xe.treeNode){var Se="";return ue._hasChild&&(Se='<i class="'.concat(ue._expand?"vxe-table--tree-fold-icon":"vxe-table--tree-unfold-icon",'"></i>')),U.push("vxe-table--tree-node"),xe.type==="radio"?'<td class="'.concat(U.join(" "),'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><div class="vxe-table--tree-node-wrapper" style="padding-left: ').concat(ue._level*B.indent,'px"><div class="vxe-table--tree-icon-wrapper">').concat(Se,'</div><div class="vxe-table--tree-cell"><input type="radio" name="radio_').concat(ye,'" ').concat(ue._radioDisabled?"disabled ":"").concat(Us(ge)?"checked":"","><span>").concat(ue._radioLabel,"</span></div></div></div></td>"):xe.type==="checkbox"?'<td class="'.concat(U.join(" "),'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><div class="vxe-table--tree-node-wrapper" style="padding-left: ').concat(ue._level*B.indent,'px"><div class="vxe-table--tree-icon-wrapper">').concat(Se,'</div><div class="vxe-table--tree-cell"><input type="checkbox" ').concat(ue._checkboxDisabled?"disabled ":"").concat(Us(ge)?"checked":"","><span>").concat(ue._checkboxLabel,"</span></div></div></div></td>"):'<td class="'.concat(U.join(" "),'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><div class="vxe-table--tree-node-wrapper" style="padding-left: ').concat(ue._level*B.indent,'px"><div class="vxe-table--tree-icon-wrapper">').concat(Se,'</div><div class="vxe-table--tree-cell">').concat(ge,"</div></div></div></td>")}return xe.type==="radio"?'<td class="'.concat(U.join(" "),'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><input type="radio" name="radio_').concat(ye,'" ').concat(ue._radioDisabled?"disabled ":"").concat(Us(ge)?"checked":"","><span>").concat(ue._radioLabel,"</span></div></td>"):xe.type==="checkbox"?'<td class="'.concat(U.join(" "),'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><input type="checkbox" ').concat(ue._checkboxDisabled?"disabled ":"").concat(Us(ge)?"checked":"","><span>").concat(ue._checkboxLabel,"</span></div></td>"):'<td class="'.concat(U.join(" "),'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),">").concat(Mr(ge,!0),"</div></td>")}).join("")+"</tr>")}):le.forEach(function(ue){te.push("<tr>"+Z.map(function(xe){var De=xe.align||Ce,U=_(xe,"showOverflow",ce)?["col--ellipsis"]:[],ge=ue[xe.id],Se=1,$e=1;if(ne&&Pe.length){var Ue=t.getVTRowIndex(ue._row),We=t.getVTColumnIndex(xe),Je=QC(Pe,Ue,We);if(Je){var nt=Je.rowspan,Qe=Je.colspan;if(!nt||!Qe)return"";nt>1&&(Se=nt),Qe>1&&($e=Qe)}}return De&&U.push("col--".concat(De)),xe.type==="radio"?'<td class="'.concat(U.join(" "),'" rowspan="').concat(Se,'" colspan="').concat($e,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><input type="radio" name="radio_').concat(ye,'" ').concat(ue._radioDisabled?"disabled ":"").concat(Us(ge)?"checked":"","><span>").concat(ue._radioLabel,"</span></div></td>"):xe.type==="checkbox"?'<td class="'.concat(U.join(" "),'" rowspan="').concat(Se,'" colspan="').concat($e,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),'><input type="checkbox" ').concat(ue._checkboxDisabled?"disabled ":"").concat(Us(ge)?"checked":"","><span>").concat(ue._checkboxLabel,"</span></div></td>"):'<td class="'.concat(U.join(" "),'" rowspan="').concat(Se,'" colspan="').concat($e,'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),">").concat(Mr(ge,!0),"</div></td>")}).join("")+"</tr>")}),te.push("</tbody>")),j){var he=r.footerTableData,ke=ff(N,he);ke.length&&(te.push("<tfoot>"),ke.forEach(function(ue){te.push("<tr>".concat(Z.map(function(xe){var De=xe.footerAlign||xe.align||we||Ce,U=_(xe,"showOverflow",ce)?["col--ellipsis"]:[],ge=A(N,ue,xe);return De&&U.push("col--".concat(De)),'<td class="'.concat(U.join(" "),'" title="').concat(ge,'"><div ').concat(w?"":'style="width: '.concat(xe.renderWidth,'px"'),">").concat(Mr(ge,!0),"</div></td>")}).join(""),"</tr>"))}),te.push("</tfoot>"))}var se=!ve&&Te?'<script>(function(){var a=document.querySelector(".'.concat(de,'");if(a){a.indeterminate=true}})()<\/script>'):"";return te.push("</table>",se),w?te.join(""):TI(N,te.join(""))},L=function(N,Z,le){var ye=['<?xml version="1.0"?>','<?mso-application progid="Excel.Sheet"?>','<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">','<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">',"<Version>16.00</Version>","</DocumentProperties>",'<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">',"<WindowHeight>7920</WindowHeight>","<WindowWidth>21570</WindowWidth>","<WindowTopX>32767</WindowTopX>","<WindowTopY>32767</WindowTopY>","<ProtectStructure>False</ProtectStructure>","<ProtectWindows>False</ProtectWindows>","</ExcelWorkbook>",'<Worksheet ss:Name="'.concat(N.sheetName,'">'),"<Table>",Z.map(function(be){return'<Column ss:Width="'.concat(be.renderWidth,'"/>')}).join("")].join("");if(N.isHeader&&(ye+="<Row>".concat(Z.map(function(be){return'<Cell><Data ss:Type="String">'.concat(m(N,be),"</Data></Cell>")}).join(""),"</Row>")),le.forEach(function(be){ye+="<Row>"+Z.map(function(Ce){return'<Cell><Data ss:Type="String">'.concat(be[Ce.id],"</Data></Cell>")}).join("")+"</Row>"}),N.isFooter){var me=r.footerTableData,Re=ff(N,me);Re.forEach(function(be){ye+="<Row>".concat(Z.map(function(Ce){return'<Cell><Data ss:Type="String">'.concat(A(N,be,Ce),"</Data></Cell>")}).join(""),"</Row>")})}return"".concat(ye,"</Table></Worksheet></Workbook>")},P=function(N,Z,le){if(Z.length)switch(N.type){case"csv":return O(N,Z,le);case"txt":return I(N,Z,le);case"html":return k(N,Z,le);case"xml":return L(N,Z,le)}return""},W=function(N,Z){var le=N.filename,ye=N.type,me=N.download;if(!me){var Re=Hg(Z,N);return Promise.resolve({type:ye,content:Z,blob:Re})}td({filename:le,type:ye,content:Z}).then(function(){N.message!==!1&&ot.modal.message({content:H.i18n("vxe.table.expSuccess"),status:"success"})})},q=function(N){var Z=N.remote,le=N.columns,ye=N.colgroups,me=N.exportMethod,Re=N.afterExportMethod;return new Promise(function(be){if(Z){var Ce={options:N,$table:t,$grid:p};be(me?me(Ce):Ce)}else{var we=T(N);be(t.preventEvent(null,"event.export",{options:N,columns:le,colgroups:ye,datas:we},function(){return W(N,P(N,le,we))}))}}).then(function(be){return NA(le),N.print||Re&&Re({status:!0,options:N,$table:t,$grid:p}),Object.assign({status:!0},be)}).catch(function(){NA(le),N.print||Re&&Re({status:!1,options:N,$table:t,$grid:p});var be={status:!1};return Promise.reject(be)})},V=function(N,Z){var le=n.tableFullColumn,ye=n._importResolve,me=n._importReject,Re={fields:[],rows:[]};switch(Z.type){case"csv":Re=G7(le,N);break;case"txt":Re=z7(le,N);break;case"html":Re=K7(le,N);break;case"xml":Re=Y7(le,N);break}var be=Re.fields,Ce=Re.rows,we=q7(le,be);we?t.createData(Ce).then(function(ce){var re;return Z.mode==="insert"?re=t.insert(ce):re=t.reloadData(ce),Z.message!==!1&&ot.modal.message({content:H.i18n("vxe.table.impSuccess",[Ce.length]),status:"success"}),re.then(function(){ye&&ye({status:!0})})}):Z.message!==!1&&(ot.modal.message({content:H.i18n("vxe.error.impFields"),status:"error"}),me&&me({status:!1}))},G=function(N,Z){var le=Z.importMethod,ye=Z.afterImportMethod,me=Dg(N),Re=me.type,be=me.filename;if(!le&&!E.includes(ot.globalConfs.importTypes,Re)){Z.message!==!1&&ot.modal.message({content:H.i18n("vxe.error.notType",[Re]),status:"error"});var Ce={status:!1};return Promise.reject(Ce)}var we=new Promise(function(ce,re){var ve=function(w){ce(w),n._importResolve=null,n._importReject=null},Te=function(w){re(w),n._importResolve=null,n._importReject=null};if(n._importResolve=ve,n._importReject=Te,window.FileReader){var Pe=Object.assign({mode:"insert"},Z,{type:Re,filename:be});if(Pe.remote)le?Promise.resolve(le({file:N,options:Pe,$table:t})).then(function(){ve({status:!0})}).catch(function(){ve({status:!0})}):ve({status:!0});else{var B=n.tableFullColumn;t.preventEvent(null,"event.import",{file:N,options:Pe,columns:B},function(){var w=new FileReader;w.onerror=function(){jr("vxe.error.notType",[Re]),Te({status:!1})},w.onload=function(C){V(C.target.result,Pe)},w.readAsText(N,Pe.encoding||"UTF-8")})}}else ve({status:!0})});return we.then(function(){ye&&ye({status:!0,options:Z,$table:t})}).catch(function(ce){return ye&&ye({status:!1,options:Z,$table:t}),Promise.reject(ce)})},pe=function(N,Z){var le=e.treeConfig,ye=e.showHeader,me=e.showFooter,Re=r.initStore,be=r.mergeList,Ce=r.isGroup,we=r.footerTableData,ce=r.exportStore,re=r.exportParams,ve=n.collectColumn,Te=le,Pe=c.value,B=t.getCheckboxRecords(),w=!!we.length,C=!Te&&be.length,j=Object.assign({message:!0,isHeader:ye,isFooter:me},N),ie=j.types||ot.globalConfs.exportTypes,ne=j.modes,X=Pe.checkMethod,ee=ve.slice(0),de=j.columns,oe=ie.map(function(he){return{value:he,label:"vxe.export.types.".concat(he)}}),te=ne.map(function(he){return{value:he,label:"vxe.export.modes.".concat(he)}});return E.eachTree(ee,function(he,ke,se,ue,xe){var De=he.children&&he.children.length;(De||MA(he))&&(he.checked=de?de.some(function(U){if(Rf(U))return he===U;if(E.isString(U))return he.field===U;var ge=U.id||U.colId,Se=U.type,$e=U.property||U.field;return ge?he.id===ge:$e&&Se?he.property===$e&&he.type===Se:$e?he.property===$e:Se?he.type===Se:!1}):he.visible,he.halfChecked=!1,he.disabled=xe&&xe.disabled||(X?!X({column:he}):!1))}),Object.assign(ce,{columns:ee,typeList:oe,modeList:te,hasFooter:w,hasMerge:C,hasTree:Te,isPrint:Z,hasColgroup:Ce,visible:!0}),Object.assign(re,{mode:B.length?"selected":"current"},j),ne.indexOf(re.mode)===-1&&(re.mode=ne[0]),ie.indexOf(re.type)===-1&&(re.type=ie[0]),Re.export=!0,Ie()},J={exportData:function(N){var Z=e.treeConfig,le=r.isGroup,ye=r.tableGroupColumn,me=n.tableFullColumn,Re=n.afterFullData,be=l.value,Ce=a.value,we=Object.assign({isHeader:!0,isFooter:!0,isColgroup:!0,download:!0,type:"csv",mode:"current"},be,{print:!1},N),ce=we.type,re=we.mode,ve=we.columns,Te=we.original,Pe=we.beforeExportMethod,B=[],w=ve&&ve.length?ve:null,C=we.columnFilterMethod;!w&&!C&&(C=Te?function(U){var ge=U.column;return ge.property}:function(U){var ge=U.column;return MA(ge)}),w?(we._isCustomColumn=!0,B=E.searchTree(E.mapTree(w,function(U){var ge;if(U){if(Rf(U))ge=U;else if(E.isString(U))ge=t.getColumnByField(U);else{var Se=U.id||U.colId,$e=U.type,Ue=U.property||U.field;Se?ge=t.getColumnById(Se):Ue&&$e?ge=me.find(function(We){return We.property===Ue&&We.type===$e}):Ue?ge=t.getColumnByField(Ue):$e&&(ge=me.find(function(We){return We.type===$e}))}return ge||{}}},{children:"childNodes",mapChildren:"_children"}),function(U,ge){return Rf(U)&&(!C||C({column:U,$columnIndex:ge}))},{children:"_children",mapChildren:"childNodes",original:!0})):B=E.searchTree(le?ye:me,function(U,ge){return U.visible&&(!C||C({column:U,$columnIndex:ge}))},{children:"children",mapChildren:"childNodes",original:!0});var j=[];if(E.eachTree(B,function(U){var ge=U.children&&U.children.length;ge||j.push(U)},{children:"childNodes"}),we.columns=j,we.colgroups=V7(B),we.filename||(we.filename=H.i18n(we.original?"vxe.table.expOriginFilename":"vxe.table.expFilename",[E.toDateString(Date.now(),"yyyyMMddHHmmss")])),we.sheetName||(we.sheetName=document.title),!we.exportMethod&&!E.includes(ot.globalConfs.exportTypes,ce)){var ie={status:!1};return Promise.reject(ie)}if(we.print||Pe&&Pe({options:we,$table:t,$grid:p}),!we.data){if(we.data=Re,re==="selected"){var ne=t.getCheckboxRecords();["html","pdf"].indexOf(ce)>-1&&Z?we.data=E.searchTree(t.getTableData().fullData,function(U){return t.findRowIndexOf(ne,U)>-1},Object.assign({},Ce,{data:"_row"})):we.data=ne}else if(re==="all"&&p&&!we.remote){var X=p.reactData,ee=p.getComputeMaps().computeProxyOpts,de=ee.value,oe=de.beforeQueryAll,te=de.afterQueryAll,he=de.ajax,ke=he===void 0?{}:he,se=de.props,ue=se===void 0?{}:se,xe=ke.queryAll;if(xe){var De={$table:t,$grid:p,sort:X.sortData,filters:X.filterData,form:X.formData,target:xe,options:we};return Promise.resolve((oe||xe)(De)).catch(function(U){return U}).then(function(U){return we.data=(ue.list?E.get(U,ue.list):U)||[],te&&te(De),q(we)})}}}return q(we)},importByFile:function(N,Z){var le=Object.assign({},Z),ye=le.beforeImportMethod;return ye&&ye({options:le,$table:t}),G(N,le)},importData:function(N){var Z=s.value,le=Object.assign({types:ot.globalConfs.importTypes},Z,N),ye=le.beforeImportMethod,me=le.afterImportMethod;return ye&&ye({options:le,$table:t}),ed(le).catch(function(Re){return me&&me({status:!1,options:le,$table:t}),Promise.reject(Re)}).then(function(Re){var be=Re.file;return G(be,le)})},saveFile:function(N){return td(N)},readFile:function(N){return ed(N)},print:function(N){var Z=o.value,le=Object.assign({original:!1},Z,N,{type:"html",download:!1,remote:!1,print:!0});return le.sheetName||(le.sheetName=document.title),new Promise(function(ye){le.content?ye(Wv(t,le,le.content)):ye(J.exportData(le).then(function(me){var Re=me.content;return Wv(t,le,Re)}))})},openImport:function(N){var Z=e.treeConfig,le=e.importConfig,ye=r.initStore,me=r.importStore,Re=r.importParams,be=s.value,Ce=Object.assign({mode:"insert",message:!0,types:ot.globalConfs.importTypes},N,be),we=Ce.types,ce=!!Z;if(ce){Ce.message&&ot.modal.message({content:H.i18n("vxe.error.treeNotImp"),status:"error"});return}le||jr("vxe.error.reqProp",["import-config"]);var re=we.map(function(Te){return{value:Te,label:"vxe.export.types.".concat(Te)}}),ve=Ce.modes.map(function(Te){return{value:Te,label:"vxe.import.modes.".concat(Te)}});Object.assign(me,{file:null,type:"",filename:"",modeList:ve,typeList:re,visible:!0}),Object.assign(Re,Ce),ye.import=!0},openExport:function(N){var Z=l.value;pe(Object.assign({},Z,N))},openPrint:function(N){var Z=o.value;pe(Object.assign({},Z,N),!0)}};return J},setupGrid:function(t){return t.extendTableMethods(X7)}},_I=function(t){var e=Object.assign({},t,{type:"html"});Wv(null,e,e.content)},Vg={ExportPanel:_c,ImportPanel:Rc,install:function(t){ot.saveFile=td,ot.readFile=ed,ot.print=_I,ot.setup({export:{types:{csv:0,html:0,xml:0,txt:0}}}),ot.hooks.add("$tableExport",Z7),t.component(_c.name,_c),t.component(Rc.name,Rc)}},J7=Vg;Kt.component(_c.name,_c);Kt.component(Rc.name,Rc);function Q7(t,e){var r=0,n=0,i=!ii.firefox&&Da(t,"vxe-checkbox--label");if(i){var a=getComputedStyle(t);r-=E.toNumber(a.paddingTop),n-=E.toNumber(a.paddingLeft)}for(;t&&t!==e;)if(r+=t.offsetTop,n+=t.offsetLeft,t=t.offsetParent,i){var o=getComputedStyle(t);r-=E.toNumber(o.paddingTop),n-=E.toNumber(o.paddingLeft)}return{offsetTop:r,offsetLeft:n}}var eG={setupTable:function(t){var e=t.props,r=t.reactData,n=t.internalData,i=t.getRefMaps().refElem,a=t.getComputeMaps(),o=a.computeEditOpts,l=a.computeCheckboxOpts,s=a.computeMouseOpts,c=a.computeTreeOpts;function u(p,v,g){var m=0,b=[],x=g>0,T=g>0?g:Math.abs(g)+v.offsetHeight,A=r.scrollYLoad,O=n.afterFullData,I=n.scrollYStore;if(A){var _=t.getVTRowIndex(p.row);x?b=O.slice(_,_+Math.ceil(T/I.rowHeight)):b=O.slice(_-Math.floor(T/I.rowHeight)+1,_+1)}else for(var k=x?"next":"previous";v&&m<T;){var L=t.getRowNode(v);L&&(b.push(L.item),m+=v.offsetHeight,v=v["".concat(k,"ElementSibling")])}return b}var f=function(p,v){var g=v.column,m=v.cell;if(g.type==="checkbox"){var b=i.value,x=n.elemStore,T=p.clientX,A=p.clientY,O=x["".concat(g.fixed||"main","-body-wrapper")]||x["main-body-wrapper"],I=O?O.value:null;if(!I)return;var _=I.querySelector(".vxe-table--checkbox-range"),k=document.onmousemove,L=document.onmouseup,P=m.parentNode,W=t.getCheckboxRecords(),q=[],V=1,G=Q7(p.target,I),pe=G.offsetTop+p.offsetY,J=G.offsetLeft+p.offsetX,N=I.scrollTop,Z=P.offsetHeight,le=null,ye=!1,me=1,Re=function(ce,re){t.dispatchEvent("checkbox-range-".concat(ce),{records:t.getCheckboxRecords(),reserves:t.getCheckboxReserveRecords()},re)},be=function(ce){var re=ce.clientX,ve=ce.clientY,Te=re-T,Pe=ve-A+(I.scrollTop-N),B=Math.abs(Pe),w=Math.abs(Te),C=pe,j=J;Pe<V?(C+=Pe,C<V&&(C=V,B=pe)):B=Math.min(B,I.scrollHeight-pe-V),Te<V?(j+=Te,w>J&&(j=V,w=J)):w=Math.min(w,I.clientWidth-J-V),_.style.height="".concat(B,"px"),_.style.width="".concat(w,"px"),_.style.left="".concat(j,"px"),_.style.top="".concat(C,"px"),_.style.display="block";var ie=u(v,P,Pe<V?-B:B);B>10&&ie.length!==q.length&&(q=ie,ce.ctrlKey?ie.forEach(function(ne){t.handleSelectRow({row:ne},W.indexOf(ne)===-1)}):(t.setAllCheckboxRow(!1),t.handleCheckedCheckboxRow(ie,!0,!1)),Re("change",ce))},Ce=function(){clearTimeout(le),le=null},we=function(ce){Ce(),le=setTimeout(function(){if(le){var re=I.scrollLeft,ve=I.scrollTop,Te=I.clientHeight,Pe=I.scrollHeight,B=Math.ceil(me*50/Z);ye?ve+Te<Pe?(t.scrollTo(re,ve+B),we(ce),be(ce)):Ce():ve?(t.scrollTo(re,ve-B),we(ce),be(ce)):Ce()}},50)};is(b,"drag--range"),document.onmousemove=function(ce){ce.preventDefault(),ce.stopPropagation();var re=ce.clientY,ve=Ia(I).boundingTop;re<ve?(ye=!1,me=ve-re,le||we(ce)):re>ve+I.clientHeight?(ye=!0,me=re-ve-I.clientHeight,le||we(ce)):le&&Ce(),be(ce)},document.onmouseup=function(ce){Ce(),po(b,"drag--range"),_.removeAttribute("style"),document.onmousemove=k,document.onmouseup=L,Re("end",ce)},Re("start",p)}},d=function(p,v){var g=e.editConfig,m=e.checkboxConfig,b=e.mouseConfig,x=l.value,T=s.value,A=o.value;if(b&&T.area&&t.handleCellAreaEvent)return t.handleCellAreaEvent(p,v);m&&x.range&&f(p,v),b&&T.selected&&(!g||A.mode==="cell")&&t.handleSelected(v,p)},h={moveTabSelected:function(p,v,g){var m=e.editConfig,b=n.afterFullData,x=n.visibleColumn,T=o.value,A,O,I,_=Object.assign({},p),k=t.getVTRowIndex(_.row),L=t.getVTColumnIndex(_.column);g.preventDefault(),v?L<=0?k>0&&(O=k-1,A=b[O],I=x.length-1):I=L-1:L>=x.length-1?k<b.length-1&&(O=k+1,A=b[O],I=0):I=L+1;var P=x[I];P&&(A?(_.rowIndex=O,_.row=A):_.rowIndex=k,_.columnIndex=I,_.column=P,_.cell=t.getCell(_.row,_.column),m?(T.trigger==="click"||T.trigger==="dblclick")&&(T.mode==="row"?t.handleActived(_,g):t.scrollToRow(_.row,_.column).then(function(){return t.handleSelected(_,g)})):t.scrollToRow(_.row,_.column).then(function(){return t.handleSelected(_,g)}))},moveCurrentRow:function(p,v,g){var m=e.treeConfig,b=r.currentRow,x=n.afterFullData,T=c.value,A=T.children||T.childrenField,O;if(g.preventDefault(),b)if(m){var I=E.findTree(x,function(W){return W===b},{children:A}),_=I.index,k=I.items;p&&_>0?O=k[_-1]:v&&_<k.length-1&&(O=k[_+1])}else{var L=t.getVTRowIndex(b);p&&L>0?O=x[L-1]:v&&L<x.length-1&&(O=x[L+1])}else O=x[0];if(O){var P={$table:t,row:O,rowIndex:t.getRowIndex(O),$rowIndex:t.getVMRowIndex(O)};t.scrollToRow(O).then(function(){return t.triggerCurrentRowEvent(g,P)})}},moveSelected:function(p,v,g,m,b,x){var T=n.afterFullData,A=n.visibleColumn,O=Object.assign({},p),I=t.getVTRowIndex(O.row),_=t.getVTColumnIndex(O.column);x.preventDefault(),g&&I>0?(O.rowIndex=I-1,O.row=T[O.rowIndex]):b&&I<T.length-1?(O.rowIndex=I+1,O.row=T[O.rowIndex]):v&&_?(O.columnIndex=_-1,O.column=A[O.columnIndex]):m&&_<A.length-1&&(O.columnIndex=_+1,O.column=A[O.columnIndex]),t.scrollToRow(O.row,O.column).then(function(){O.cell=t.getCell(O.row,O.column),t.handleSelected(O,x)})},triggerHeaderCellMousedownEvent:function(p,v){var g=e.mouseConfig,m=s.value;if(g&&m.area&&t.handleHeaderCellAreaEvent){var b=p.currentTarget,x=Pt(p,b,"vxe-cell--sort").flag,T=Pt(p,b,"vxe-cell--filter").flag;t.handleHeaderCellAreaEvent(p,Object.assign({cell:b,triggerSort:x,triggerFilter:T},v))}t.focus(),t.closeMenu&&t.closeMenu()},triggerCellMousedownEvent:function(p,v){var g=p.currentTarget;v.cell=g,d(p,v),t.focus(),t.closeFilter(),t.closeMenu&&t.closeMenu()}};return h}},jg={install:function(){ot.hooks.add("$tableKeyboard",eG)}},tG=jg,rd=globalThis&&globalThis.__assign||function(){return rd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},rd.apply(this,arguments)},oc=function(){function t(e){Object.assign(this,{$options:e,required:e.required,min:e.min,max:e.max,type:e.type,pattern:e.pattern,validator:e.validator,trigger:e.trigger,maxWidth:e.maxWidth})}return Object.defineProperty(t.prototype,"content",{get:function(){return Ar(this.$options.content||this.$options.message)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.content},enumerable:!1,configurable:!0}),t}(),rG=["fullValidate","validate","clearValidate"],nG={setupTable:function(t){var e=t.props,r=t.reactData,n=t.internalData,i=t.getRefMaps().refValidTooltip,a=t.getComputeMaps(),o=a.computeValidOpts,l=a.computeTreeOpts,s=a.computeEditOpts,c={},u={},f,d=function(g){return new Promise(function(m){var b=o.value;b.autoPos===!1?(t.dispatchEvent("valid-error",g,null),m()):t.handleActived(g,{type:"valid-error",trigger:"call"}).then(function(){m(u.showValidTooltip(g))})})},h=function(g){var m=o.value;if(m.msgMode==="single"){var b=Object.keys(g),x=g;if(b.length){var T=b[0];x[T]=g[T]}return x}return g},p=function(g,m,b){var x={},T=e.editRules,A=e.treeConfig,O=n.afterFullData,I=l.value,_=I.children||I.childrenField,k=o.value,L;g===!0?L=O:g&&(E.isFunction(g)?m=g:L=E.isArray(g)?g:[g]),L||(t.getInsertRecords?L=t.getInsertRecords().concat(t.getUpdateRecords()):L=[]);var P=[];n._lastCallTime=Date.now(),f=!1,c.clearValidate();var W={};if(T){var q=t.getColumns(),V=function(G){if(b||!f){var pe=[];q.forEach(function(J){(b||!f)&&E.has(T,J.property)&&pe.push(u.validCellRules("all",G,J).catch(function(N){var Z=N.rule,le=N.rules,ye={rule:Z,rules:le,rowIndex:t.getRowIndex(G),row:G,columnIndex:t.getColumnIndex(J),column:J,field:J.property,$table:t};if(x[J.property]||(x[J.property]=[]),W["".concat(tt(t,G),":").concat(J.id)]={column:J,row:G,rule:Z,content:Z.content},x[J.property].push(ye),!b)return f=!0,Promise.reject(ye)}))}),P.push(Promise.all(pe))}};return A?E.eachTree(L,V,{children:_}):L.forEach(V),Promise.all(P).then(function(){var G=Object.keys(x);return r.validErrorMaps=h(W),Ie().then(function(){if(G.length)return Promise.reject(x[G[0]][0]);m&&m()})}).catch(function(G){return new Promise(function(pe,J){var N=function(){Ie(function(){m?(m(x),pe()):H.validToReject==="obsolete"?J(x):pe(x)})},Z=function(){G.cell=t.getCell(G.row,G.column),YC(G.cell),d(G).then(N)},le=G.row,ye=O.indexOf(le),me=ye>0?O[ye-1]:le;k.autoPos===!1?N():A?t.scrollToTreeRow(me).then(Z):t.scrollToRow(me).then(Z)})})}else r.validErrorMaps={};return Ie().then(function(){m&&m()})};c={fullValidate:function(g,m){return p(g,m,!0)},validate:function(g,m){return p(g,m)},clearValidate:function(g,m){var b=r.validErrorMaps,x=i.value,T=o.value,A=E.isArray(g)?g:g?[g]:[],O=E.isArray(m)?m:(m?[m]:[]).map(function(L){return Dn(t,L)}),I={};if(x&&x.reactData.visible&&x.close(),T.msgMode==="single")return r.validErrorMaps={},Ie();if(A.length&&O.length)I=Object.assign({},b),A.forEach(function(L){O.forEach(function(P){var W="".concat(tt(t,L),":").concat(P.id);I[W]&&delete I[W]})});else if(A.length){var _=A.map(function(L){return"".concat(tt(t,L))});E.each(b,function(L,P){_.indexOf(P.split(":")[0])>-1&&(I[P]=L)})}else if(O.length){var k=O.map(function(L){return"".concat(L.id)});E.each(b,function(L,P){k.indexOf(P.split(":")[1])>-1&&(I[P]=L)})}return r.validErrorMaps=I,Ie()}};var v=function(g,m){var b=g.type,x=g.min,T=g.max,A=g.pattern,O=b==="number",I=O?E.toNumber(m):E.getSize(m);return!!(O&&isNaN(m)||!E.eqNull(x)&&I<E.toNumber(x)||!E.eqNull(T)&&I>E.toNumber(T)||A&&!(E.isRegExp(A)?A:new RegExp(A)).test(m))};return u={validCellRules:function(g,m,b,x){var T=e.editRules,A=b.field,O=[],I=[];if(A&&T){var _=E.get(T,A);if(_){var k=E.isUndefined(x)?E.get(m,A):x;_.forEach(function(L){var P=L.type,W=L.trigger,q=L.required,V=L.validator;if(g==="all"||!W||g===W)if(V){var G={cellValue:k,rule:L,rules:_,row:m,rowIndex:t.getRowIndex(m),column:b,columnIndex:t.getColumnIndex(b),field:b.field,$table:t,$grid:t.xegrid},pe=void 0;if(E.isString(V)){var J=ot.validators.get(V);J&&J.cellValidatorMethod&&(pe=J.cellValidatorMethod(G))}else pe=V(G);pe&&(E.isError(pe)?(f=!0,O.push(new oc({type:"custom",trigger:W,content:pe.message,rule:new oc(L)}))):pe.catch&&I.push(pe.catch(function(ye){f=!0,O.push(new oc({type:"custom",trigger:W,content:ye&&ye.message?ye.message:L.content||L.message,rule:new oc(L)}))})))}else{var N=P==="array",Z=E.isArray(k),le=!0;N||Z?le=!Z||!k.length:E.isString(k)?le=Oi(k.trim()):le=Oi(k),(q?le||v(L,k):!le&&v(L,k))&&(f=!0,O.push(new oc(L)))}})}}return Promise.all(I).then(function(){if(O.length){var L={rules:O,rule:O[0]};return Promise.reject(L)}})},hasCellRules:function(g,m,b){var x=e.editRules,T=b.field;if(T&&x){var A=E.get(x,T);return A&&!!E.find(A,function(O){return g==="all"||!O.trigger||g===O.trigger})}return!1},triggerValidate:function(g){var m=e.editConfig,b=e.editRules,x=r.editStore,T=x.actived,A=s.value,O=o.value;if(b&&O.msgMode==="single"&&(r.validErrorMaps={}),m&&b&&T.row){var I=T.args,_=I.row,k=I.column,L=I.cell;if(u.hasCellRules(g,_,k))return u.validCellRules(g,_,k).then(function(){A.mode==="row"&&c.clearValidate(_,k)}).catch(function(P){var W=P.rule;if(!W.trigger||g===W.trigger){var q={rule:W,row:_,column:k,cell:L};return u.showValidTooltip(q),Promise.reject(q)}return Promise.resolve()})}return Promise.resolve()},showValidTooltip:function(g){var m,b,x=e.height,T=r.tableData,A=r.validStore,O=r.validErrorMaps,I=o.value,_=i.value;if(A.visible=!0,I.msgMode==="single"?r.validErrorMaps=(m={},m["".concat(tt(t,g.row),":").concat(g.column.id)]={column:g.column,row:g.row,rule:g.rule,content:g.rule.content},m):r.validErrorMaps=Object.assign({},O,(b={},b["".concat(tt(t,g.row),":").concat(g.column.id)]={column:g.column,row:g.row,rule:g.rule,content:g.rule.content},b)),t.dispatchEvent("valid-error",g,null),_){var k=g.cell;if(_&&(I.message==="tooltip"||I.message==="default"&&!x&&T.length<2))return _.open(k,g.rule.content)}return Ie()}},rd(rd({},c),u)},setupGrid:function(t){return t.extendTableMethods(rG)}},Wg={install:function(){ot.hooks.add("$tableValidator",nG)}},iG=Wg;const up=xt({name:"VxeIcon",props:{name:String,roll:Boolean},emits:["click"],setup:function(t,e){var r=e.emit,n=function(i){r("click",{$event:i})};return function(){return D("i",{class:["vxe-icon-".concat(t.name),t.roll?"roll":""],onClick:n})}}});var uu=Object.assign(up,{install:function(t){t.component(up.name,up)}}),aG=uu;Kt.component(uu.name,uu);var fn=globalThis&&globalThis.__assign||function(){return fn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},fn.apply(this,arguments)};function oG(t){var e=t.$table,r=t.column,n=r.titlePrefix||r.titleHelp;return n?[D("i",{class:["vxe-cell-help-icon",n.icon||H.icon.TABLE_HELP],onMouseenter:function(i){e.triggerHeaderHelpEvent(i,t)},onMouseleave:function(i){e.handleTargetLeaveEvent(i)}})]:[]}function to(t,e){var r=t.$table,n=t.column,i=r.props,a=r.reactData,o=r.getComputeMaps().computeTooltipOpts,l=i.showHeaderOverflow,s=n.type,c=n.showHeaderOverflow,u=o.value,f=u.showAll,d=E.isUndefined(c)||E.isNull(c)?l:c,h=d==="title",p=d===!0||d==="tooltip",v={};return(h||p||f)&&(v.onMouseenter=function(g){a._isResize||(h?Og(g.currentTarget,n):(p||f)&&r.triggerHeaderTooltipEvent(g,t))}),(p||f)&&(v.onMouseleave=function(g){a._isResize||(p||f)&&r.handleTargetLeaveEvent(g)}),[s==="html"&&E.isString(e)?D("span",fn({class:"vxe-cell--title",innerHTML:e},v)):D("span",fn({class:"vxe-cell--title"},v),pr(e))]}function sG(t){var e=t.$table,r=t.column,n=t._columnIndex,i=t.items,a=r.slots,o=r.editRender,l=r.cellRender,s=o||l,c=a?a.footer:null;if(c)return e.callSlot(c,t);if(s){var u=ot.renderer.get(s.name);if(u&&u.renderFooter)return pr(u.renderFooter(s,t))}return[Mr(i[n],1)]}function $A(t){var e=t.$table,r=t.row,n=t.column;return Mr(e.getCellLabel(r,n),1)}var dt={createColumn:function(t,e){var r=e.type,n=e.sortable,i=e.filters,a=e.editRender,o=e.treeNode,l=t.props,s=l.editConfig,c=t.getComputeMaps(),u=c.computeEditOpts,f=c.computeCheckboxOpts,d=f.value,h=u.value,p={renderHeader:dt.renderDefaultHeader,renderCell:o?dt.renderTreeCell:dt.renderDefaultCell,renderFooter:dt.renderDefaultFooter};switch(r){case"seq":p.renderHeader=dt.renderSeqHeader,p.renderCell=o?dt.renderTreeIndexCell:dt.renderSeqCell;break;case"radio":p.renderHeader=dt.renderRadioHeader,p.renderCell=o?dt.renderTreeRadioCell:dt.renderRadioCell;break;case"checkbox":p.renderHeader=dt.renderCheckboxHeader,p.renderCell=d.checkField?o?dt.renderTreeSelectionCellByProp:dt.renderCheckboxCellByProp:o?dt.renderTreeSelectionCell:dt.renderCheckboxCell;break;case"expand":p.renderCell=dt.renderExpandCell,p.renderData=dt.renderExpandData;break;case"html":p.renderCell=o?dt.renderTreeHTMLCell:dt.renderHTMLCell,i&&n?p.renderHeader=dt.renderSortAndFilterHeader:n?p.renderHeader=dt.renderSortHeader:i&&(p.renderHeader=dt.renderFilterHeader);break;default:s&&a?(p.renderHeader=dt.renderEditHeader,p.renderCell=h.mode==="cell"?o?dt.renderTreeCellEdit:dt.renderCellEdit:o?dt.renderTreeRowEdit:dt.renderRowEdit):i&&n?p.renderHeader=dt.renderSortAndFilterHeader:n?p.renderHeader=dt.renderSortHeader:i&&(p.renderHeader=dt.renderFilterHeader)}return c7(t,e,p)},renderHeaderTitle:function(t){var e=t.$table,r=t.column,n=r.slots,i=r.editRender,a=r.cellRender,o=i||a,l=n?n.header:null;if(l)return to(t,e.callSlot(l,t));if(o){var s=ot.renderer.get(o.name);if(s&&s.renderHeader)return to(t,pr(s.renderHeader(o,t)))}return to(t,Mr(r.getTitle(),1))},renderDefaultHeader:function(t){return oG(t).concat(dt.renderHeaderTitle(t))},renderDefaultCell:function(t){var e=t.$table,r=t.row,n=t.column,i=n.slots,a=n.editRender,o=n.cellRender,l=a||o,s=i?i.default:null;if(s)return e.callSlot(s,t);if(l){var c=a?"renderCell":"renderDefault",u=ot.renderer.get(l.name),f=u?u[c]:null;if(f)return pr(f(l,Object.assign({$type:a?"edit":"cell"},t)))}var d=e.getCellLabel(r,n),h=a?a.placeholder:"";return[D("span",{class:"vxe-cell--label"},a&&Oi(d)?[D("span",{class:"vxe-cell--placeholder"},Mr(Ar(h),1))]:Mr(d,1))]},renderTreeCell:function(t){return dt.renderTreeIcon(t,dt.renderDefaultCell(t))},renderDefaultFooter:function(t){return[D("span",{class:"vxe-cell--item"},sG(t))]},renderTreeIcon:function(t,e){var r=t.$table,n=t.isHidden,i=r.reactData,a=r.getComputeMaps().computeTreeOpts,o=i.treeExpandedMaps,l=i.treeExpandLazyLoadedMaps,s=a.value,c=t.row,u=t.column,f=t.level,d=u.slots,h=s.indent,p=s.lazy,v=s.trigger,g=s.iconLoaded,m=s.showIcon,b=s.iconOpen,x=s.iconClose,T=s.children||s.childrenField,A=s.hasChild||s.hasChildField,O=c[T],I=d?d.icon:null,_=!1,k=!1,L=!1,P={};if(I)return r.callSlot(I,t);if(!n){var W=tt(r,c);k=!!o[W],p&&(L=!!l[W],_=c[A])}return(!v||v==="default")&&(P.onClick=function(q){q.stopPropagation(),r.triggerTreeExpandEvent(q,t)}),[D("div",{class:["vxe-cell--tree-node",{"is--active":k}],style:{paddingLeft:"".concat(f*h,"px")}},[m&&(O&&O.length||_)?[D("div",fn({class:"vxe-tree--btn-wrapper"},P),[D("i",{class:["vxe-tree--node-btn",L?g||H.icon.TABLE_TREE_LOADED:k?b||H.icon.TABLE_TREE_OPEN:x||H.icon.TABLE_TREE_CLOSE]})])]:null,D("div",{class:"vxe-tree-cell"},e)])]},renderSeqHeader:function(t){var e=t.$table,r=t.column,n=r.slots,i=n?n.header:null;return to(t,i?e.callSlot(i,t):Mr(r.getTitle(),1))},renderSeqCell:function(t){var e=t.$table,r=t.column,n=e.props,i=n.treeConfig,a=e.getComputeMaps().computeSeqOpts,o=a.value,l=r.slots,s=l?l.default:null;if(s)return e.callSlot(s,t);var c=t.seq,u=o.seqMethod;return[Mr(u?u(t):i?c:(o.startIndex||0)+c,1)]},renderTreeIndexCell:function(t){return dt.renderTreeIcon(t,dt.renderSeqCell(t))},renderRadioHeader:function(t){var e=t.$table,r=t.column,n=r.slots,i=n?n.header:null,a=n?n.title:null;return to(t,i?e.callSlot(i,t):[D("span",{class:"vxe-radio--label"},a?e.callSlot(a,t):Mr(r.getTitle(),1))])},renderRadioCell:function(t){var e=t.$table,r=t.column,n=t.isHidden,i=e.reactData,a=e.getComputeMaps().computeRadioOpts,o=i.selectRadioRow,l=a.value,s=r.slots,c=l.labelField,u=l.checkMethod,f=l.visibleMethod,d=t.row,h=s?s.default:null,p=s?s.radio:null,v=e.eqRow(d,o),g=!f||f({row:d}),m=!!u,b;n||(b={onClick:function(A){!m&&g&&(A.stopPropagation(),e.triggerRadioRowEvent(A,t))}},u&&(m=!u({row:d})));var x=fn(fn({},t),{checked:v,disabled:m,visible:g});if(p)return e.callSlot(p,x);var T=[];return g&&T.push(D("span",{class:["vxe-radio--icon",v?H.icon.TABLE_RADIO_CHECKED:H.icon.TABLE_RADIO_UNCHECKED]})),(h||c)&&T.push(D("span",{class:"vxe-radio--label"},h?e.callSlot(h,x):E.get(d,c))),[D("span",fn({class:["vxe-cell--radio",{"is--checked":v,"is--disabled":m}]},b),T)]},renderTreeRadioCell:function(t){return dt.renderTreeIcon(t,dt.renderRadioCell(t))},renderCheckboxHeader:function(t){var e=t.$table,r=t.column,n=t.isHidden,i=e.reactData,a=e.getComputeMaps(),o=a.computeIsAllCheckboxDisabled,l=a.computeCheckboxOpts,s=i.isAllSelected,c=i.isIndeterminate,u=o.value,f=r.slots,d=f?f.header:null,h=f?f.title:null,p=l.value,v=r.getTitle(),g;n||(g={onClick:function(b){u||(b.stopPropagation(),e.triggerCheckAllEvent(b,!s))}});var m=fn(fn({},t),{checked:s,disabled:u,indeterminate:c});return d?to(m,e.callSlot(d,m)):(p.checkStrictly?!p.showHeader:p.showHeader===!1)?to(m,[D("span",{class:"vxe-checkbox--label"},h?e.callSlot(h,m):v)]):to(m,[D("span",fn({class:["vxe-cell--checkbox",{"is--checked":s,"is--disabled":u,"is--indeterminate":c}],title:H.i18n("vxe.table.allTitle")},g),[D("span",{class:["vxe-checkbox--icon",c?H.icon.TABLE_CHECKBOX_INDETERMINATE:s?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]})].concat(h||v?[D("span",{class:"vxe-checkbox--label"},h?e.callSlot(h,m):v)]:[]))])},renderCheckboxCell:function(t){var e=t.$table,r=t.row,n=t.column,i=t.isHidden,a=e.props,o=e.reactData,l=a.treeConfig,s=o.selectCheckboxMaps,c=o.treeIndeterminateMaps,u=e.getComputeMaps().computeCheckboxOpts,f=u.value,d=f.labelField,h=f.checkMethod,p=f.visibleMethod,v=n.slots,g=v?v.default:null,m=v?v.checkbox:null,b=!1,x=!1,T=!p||p({row:r}),A=!!h,O;if(!i){var I=tt(e,r);x=!!s[I],O={onClick:function(L){!A&&T&&(L.stopPropagation(),e.triggerCheckRowEvent(L,t,!x))}},h&&(A=!h({row:r})),l&&(b=!!c[I])}var _=fn(fn({},t),{checked:x,disabled:A,visible:T,indeterminate:b});if(m)return e.callSlot(m,_);var k=[];return T&&k.push(D("span",{class:["vxe-checkbox--icon",b?H.icon.TABLE_CHECKBOX_INDETERMINATE:x?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]})),(g||d)&&k.push(D("span",{class:"vxe-checkbox--label"},g?e.callSlot(g,_):E.get(r,d))),[D("span",fn({class:["vxe-cell--checkbox",{"is--checked":x,"is--disabled":A,"is--indeterminate":b}]},O),k)]},renderTreeSelectionCell:function(t){return dt.renderTreeIcon(t,dt.renderCheckboxCell(t))},renderCheckboxCellByProp:function(t){var e=t.$table,r=t.row,n=t.column,i=t.isHidden,a=e.props,o=e.reactData,l=a.treeConfig,s=o.treeIndeterminateMaps,c=e.getComputeMaps().computeCheckboxOpts,u=c.value,f=u.labelField,d=u.checkField,h=u.checkMethod,p=u.visibleMethod,v=u.indeterminateField||u.halfField,g=n.slots,m=g?g.default:null,b=g?g.checkbox:null,x=!1,T=!1,A=!p||p({row:r}),O=!!h,I;if(!i){var _=tt(e,r);T=E.get(r,d),I={onClick:function(P){!O&&A&&(P.stopPropagation(),e.triggerCheckRowEvent(P,t,!T))}},h&&(O=!h({row:r})),l&&(x=!!s[_])}var k=fn(fn({},t),{checked:T,disabled:O,visible:A,indeterminate:x});if(b)return e.callSlot(b,k);var L=[];return A&&(L.push(D("span",{class:["vxe-checkbox--icon",x?H.icon.TABLE_CHECKBOX_INDETERMINATE:T?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]})),(m||f)&&L.push(D("span",{class:"vxe-checkbox--label"},m?e.callSlot(m,k):E.get(r,f)))),[D("span",fn({class:["vxe-cell--checkbox",{"is--checked":T,"is--disabled":O,"is--indeterminate":v&&!T?r[v]:x}]},I),L)]},renderTreeSelectionCellByProp:function(t){return dt.renderTreeIcon(t,dt.renderCheckboxCellByProp(t))},renderExpandCell:function(t){var e=t.$table,r=t.isHidden,n=t.row,i=t.column,a=e.reactData,o=a.rowExpandedMaps,l=a.rowExpandLazyLoadedMaps,s=e.getComputeMaps().computeExpandOpts,c=s.value,u=c.lazy,f=c.labelField,d=c.iconLoaded,h=c.showIcon,p=c.iconOpen,v=c.iconClose,g=c.visibleMethod,m=i.slots,b=m?m.default:null,x=m?m.icon:null,T=!1,A=!1;if(x)return e.callSlot(x,t);if(!r){var O=tt(e,n);T=!!o[O],u&&(A=!!l[O])}return[h&&(!g||g(t))?D("span",{class:["vxe-table--expanded",{"is--active":T}],onClick:function(I){I.stopPropagation(),e.triggerRowExpandEvent(I,t)}},[D("i",{class:["vxe-table--expand-btn",A?d||H.icon.TABLE_EXPAND_LOADED:T?p||H.icon.TABLE_EXPAND_OPEN:v||H.icon.TABLE_EXPAND_CLOSE]})]):null,b||f?D("span",{class:"vxe-table--expand-label"},b?e.callSlot(b,t):E.get(n,f)):null]},renderExpandData:function(t){var e=t.$table,r=t.column,n=r.slots,i=r.contentRender,a=n?n.content:null;if(a)return e.callSlot(a,t);if(i){var o=ot.renderer.get(i.name);if(o&&o.renderExpand)return pr(o.renderExpand(i,t))}return[]},renderHTMLCell:function(t){var e=t.$table,r=t.column,n=r.slots,i=n?n.default:null;return i?e.callSlot(i,t):[D("span",{class:"vxe-cell--html",innerHTML:$A(t)})]},renderTreeHTMLCell:function(t){return dt.renderTreeIcon(t,dt.renderHTMLCell(t))},renderSortAndFilterHeader:function(t){return dt.renderDefaultHeader(t).concat(dt.renderSortIcon(t)).concat(dt.renderFilterIcon(t))},renderSortHeader:function(t){return dt.renderDefaultHeader(t).concat(dt.renderSortIcon(t))},renderSortIcon:function(t){var e=t.$table,r=t.column,n=e.getComputeMaps().computeSortOpts,i=n.value,a=i.showIcon,o=i.iconAsc,l=i.iconDesc,s=r.order;return a?[D("span",{class:"vxe-cell--sort"},[D("i",{class:["vxe-sort--asc-btn",o||H.icon.TABLE_SORT_ASC,{"sort--active":s==="asc"}],title:H.i18n("vxe.table.sortAsc"),onClick:function(c){c.stopPropagation(),e.triggerSortEvent(c,r,"asc")}}),D("i",{class:["vxe-sort--desc-btn",l||H.icon.TABLE_SORT_DESC,{"sort--active":s==="desc"}],title:H.i18n("vxe.table.sortDesc"),onClick:function(c){c.stopPropagation(),e.triggerSortEvent(c,r,"desc")}})])]:[]},renderFilterHeader:function(t){return dt.renderDefaultHeader(t).concat(dt.renderFilterIcon(t))},renderFilterIcon:function(t){var e=t.$table,r=t.column,n=t.hasFilter,i=e.reactData,a=i.filterStore,o=e.getComputeMaps().computeFilterOpts,l=o.value,s=l.showIcon,c=l.iconNone,u=l.iconMatch;return s?[D("span",{class:["vxe-cell--filter",{"is--active":a.visible&&a.column===r}]},[D("i",{class:["vxe-filter--btn",n?u||H.icon.TABLE_FILTER_MATCH:c||H.icon.TABLE_FILTER_NONE],title:H.i18n("vxe.table.filter"),onClick:function(f){e.triggerFilterEvent&&e.triggerFilterEvent(f,t.column,t)}})])]:[]},renderEditHeader:function(t){var e=t.$table,r=t.column,n=e.props,i=e.getComputeMaps().computeEditOpts,a=n.editConfig,o=n.editRules,l=i.value,s=r.sortable,c=r.filters,u=r.editRender,f=!1;if(o){var d=E.get(o,r.field);d&&(f=d.some(function(h){return h.required}))}return(wt(a)?[f&&l.showAsterisk?D("i",{class:"vxe-cell--required-icon"}):null,wt(u)&&l.showIcon?D("i",{class:["vxe-cell--edit-icon",l.icon||H.icon.TABLE_EDIT]}):null]:[]).concat(dt.renderDefaultHeader(t)).concat(s?dt.renderSortIcon(t):[]).concat(c?dt.renderFilterIcon(t):[])},renderRowEdit:function(t){var e=t.$table,r=t.column,n=e.reactData,i=n.editStore,a=i.actived,o=r.editRender;return dt.runRenderer(t,wt(o)&&a&&a.row===t.row)},renderTreeRowEdit:function(t){return dt.renderTreeIcon(t,dt.renderRowEdit(t))},renderCellEdit:function(t){var e=t.$table,r=t.column,n=e.reactData,i=n.editStore,a=i.actived,o=r.editRender;return dt.runRenderer(t,wt(o)&&a&&a.row===t.row&&a.column===t.column)},renderTreeCellEdit:function(t){return dt.renderTreeIcon(t,dt.renderCellEdit(t))},runRenderer:function(t,e){var r=t.$table,n=t.column,i=n.slots,a=n.editRender,o=n.formatter,l=i?i.default:null,s=i?i.edit:null,c=ot.renderer.get(a.name);return e?s?r.callSlot(s,t):c&&c.renderEdit?pr(c.renderEdit(a,Object.assign({$type:"edit"},t))):[]:l?r.callSlot(l,t):o?[D("span",{class:"vxe-cell--label"},$A(t))]:dt.renderDefaultCell(t)}},RI={colId:[String,Number],type:String,field:String,title:String,width:[Number,String],minWidth:[Number,String],maxWidth:[Number,String],resizable:{type:Boolean,default:null},fixed:String,align:String,headerAlign:String,footerAlign:String,showOverflow:{type:[Boolean,String],default:null},showHeaderOverflow:{type:[Boolean,String],default:null},showFooterOverflow:{type:[Boolean,String],default:null},className:[String,Function],headerClassName:[String,Function],footerClassName:[String,Function],formatter:[Function,Array,String],sortable:Boolean,sortBy:[String,Function],sortType:String,filters:{type:Array,default:null},filterMultiple:{type:Boolean,default:!0},filterMethod:Function,filterResetMethod:Function,filterRecoverMethod:Function,filterRender:Object,treeNode:Boolean,visible:{type:Boolean,default:null},headerExportMethod:Function,exportMethod:Function,footerExportMethod:Function,titleHelp:Object,titlePrefix:Object,cellType:String,cellRender:Object,editRender:Object,contentRender:Object,params:Object};const ss=xt({name:"VxeColumn",props:RI,setup:function(t,e){var r=e.slots,n=je(),i=ct("$xetable",{}),a=ct("xecolgroup",null),o=dt.createColumn(i,t);o.slots=r,sr("$xegrid",null),XC(i,t,o),Er(function(){ZC(i,n.value,o,a)}),Rr(function(){JC(i,o)});var l=function(){return D("div",{ref:n})};return l}});var Gg=Object.assign(ss,{install:function(t){t.component(ss.name,ss),t.component("VxeTableColumn",ss)}}),lG=Gg;Kt.component(ss.name,ss);Kt.component("VxeTableColumn",ss);const ls=xt({name:"VxeColgroup",props:RI,setup:function(t,e){var r=e.slots,n=je(),i=ct("$xetable",{}),a=ct("xecolgroup",null),o=dt.createColumn(i,t),l={};r.header&&(l.header=r.header);var s={column:o};o.slots=l,o.children=[],sr("xecolgroup",s),sr("$xegrid",null),XC(i,t,o),Er(function(){ZC(i,n.value,o,a)}),Rr(function(){JC(i,o)});var c=function(){return D("div",{ref:n},r.default?r.default():[])};return c}});var zg=Object.assign(ls,{install:function(t){t.component(ls.name,ls),t.component("VxeTableColgroup",ls)}}),cG=zg;Kt.component(ls.name,ls);Kt.component("VxeTableColgroup",ls);const Kg={id:String,data:Array,height:[Number,String],minHeight:{type:[Number,String],default:function(){return H.table.minHeight}},maxHeight:[Number,String],resizable:{type:Boolean,default:function(){return H.table.resizable}},stripe:{type:Boolean,default:function(){return H.table.stripe}},border:{type:[Boolean,String],default:function(){return H.table.border}},round:{type:Boolean,default:function(){return H.table.round}},size:{type:String,default:function(){return H.table.size||H.size}},fit:{type:Boolean,default:function(){return H.table.fit}},loading:Boolean,align:{type:String,default:function(){return H.table.align}},headerAlign:{type:String,default:function(){return H.table.headerAlign}},footerAlign:{type:String,default:function(){return H.table.footerAlign}},showHeader:{type:Boolean,default:function(){return H.table.showHeader}},highlightCurrentRow:{type:Boolean,default:function(){return H.table.highlightCurrentRow}},highlightHoverRow:{type:Boolean,default:function(){return H.table.highlightHoverRow}},highlightCurrentColumn:{type:Boolean,default:function(){return H.table.highlightCurrentColumn}},highlightHoverColumn:{type:Boolean,default:function(){return H.table.highlightHoverColumn}},highlightCell:Boolean,showFooter:Boolean,footerMethod:Function,rowClassName:[String,Function],cellClassName:[String,Function],headerRowClassName:[String,Function],headerCellClassName:[String,Function],footerRowClassName:[String,Function],footerCellClassName:[String,Function],cellStyle:[Object,Function],headerCellStyle:[Object,Function],footerCellStyle:[Object,Function],rowStyle:[Object,Function],headerRowStyle:[Object,Function],footerRowStyle:[Object,Function],mergeCells:Array,mergeFooterItems:Array,spanMethod:Function,footerSpanMethod:Function,showOverflow:{type:[Boolean,String],default:function(){return H.table.showOverflow}},showHeaderOverflow:{type:[Boolean,String],default:function(){return H.table.showHeaderOverflow}},showFooterOverflow:{type:[Boolean,String],default:function(){return H.table.showFooterOverflow}},columnKey:Boolean,rowKey:Boolean,rowId:{type:String,default:function(){return H.table.rowId}},zIndex:Number,emptyText:{type:String,default:function(){return H.table.emptyText}},keepSource:{type:Boolean,default:function(){return H.table.keepSource}},autoResize:{type:Boolean,default:function(){return H.table.autoResize}},syncResize:[Boolean,String,Number],resizeConfig:Object,columnConfig:Object,rowConfig:Object,resizableConfig:Object,seqConfig:Object,sortConfig:Object,filterConfig:Object,radioConfig:Object,checkboxConfig:Object,tooltipConfig:Object,exportConfig:Object,importConfig:Object,printConfig:Object,expandConfig:Object,treeConfig:Object,menuConfig:Object,mouseConfig:Object,areaConfig:Object,keyboardConfig:Object,clipConfig:Object,fnrConfig:Object,editConfig:Object,validConfig:Object,editRules:Object,loadingConfig:Object,emptyRender:Object,customConfig:Object,scrollX:Object,scrollY:Object,animat:{type:Boolean,default:function(){return H.table.animat}},delayHover:{type:Number,default:function(){return H.table.delayHover}},params:Object},Yg=["update:data","keydown-start","keydown","keydown-end","paste","copy","cut","current-change","radio-change","checkbox-change","checkbox-all","checkbox-range-start","checkbox-range-change","checkbox-range-end","checkbox-range-select","cell-click","cell-dblclick","cell-menu","cell-mouseenter","cell-mouseleave","cell-selected","header-cell-click","header-cell-dblclick","header-cell-menu","footer-cell-click","footer-cell-dblclick","footer-cell-menu","clear-merge","sort-change","clear-sort","filter-change","filter-visible","clear-filter","resizable-change","toggle-row-expand","toggle-tree-expand","menu-click","edit-closed","edit-actived","edit-disabled","valid-error","scroll","custom","change-fnr","open-fnr","fnr-change","fnr-find","fnr-find-all","fnr-replace","fnr-replace-all","cell-area-copy","cell-area-cut","cell-area-paste","cell-area-merge","clear-cell-area-merge","header-cell-area-selection","cell-area-selection-start","cell-area-selection-drag","cell-area-selection-end","cell-area-extension-start","cell-area-extension-drag","cell-area-extension-end","cell-area-selection-all-start","cell-area-selection-all-end","cell-area-arrows-start","cell-area-arrows-end","active-cell-change-start","active-cell-change-end"];var Cr=globalThis&&globalThis.__assign||function(){return Cr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Cr.apply(this,arguments)},nd=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},uG=Object.keys(Kg),BA=["clearAll","syncData","updateData","loadData","reloadData","reloadRow","loadColumn","reloadColumn","getRowNode","getColumnNode","getRowIndex","getVTRowIndex","getVMRowIndex","getColumnIndex","getVTColumnIndex","getVMColumnIndex","createData","createRow","revertData","clearData","isInsertByRow","isUpdateByRow","getColumns","getColumnById","getColumnByField","getTableColumn","getData","getCheckboxRecords","getParentRow","getRowSeq","getRowById","getRowid","getTableData","hideColumn","showColumn","resetColumn","refreshColumn","refreshScroll","recalculate","closeTooltip","isAllCheckboxChecked","isAllCheckboxIndeterminate","getCheckboxIndeterminateRecords","setCheckboxRow","isCheckedByCheckboxRow","isIndeterminateByCheckboxRow","toggleCheckboxRow","setAllCheckboxRow","getRadioReserveRecord","clearRadioReserve","getCheckboxReserveRecords","clearCheckboxReserve","toggleAllCheckboxRow","clearCheckboxRow","setCurrentRow","isCheckedByRadioRow","setRadioRow","clearCurrentRow","clearRadioRow","getCurrentRecord","getRadioRecord","getCurrentColumn","setCurrentColumn","clearCurrentColumn","sort","clearSort","isSort","getSortColumns","closeFilter","isFilter","isActiveFilterByColumn","isRowExpandLoaded","clearRowExpandLoaded","reloadRowExpand","reloadRowExpand","toggleRowExpand","setAllRowExpand","setRowExpand","isExpandByRow","clearRowExpand","clearRowExpandReserve","getRowExpandRecords","getTreeExpandRecords","isTreeExpandLoaded","clearTreeExpandLoaded","reloadTreeExpand","reloadTreeChilds","toggleTreeExpand","setAllTreeExpand","setTreeExpand","isTreeExpandByRow","clearTreeExpand","clearTreeExpandReserve","getScroll","scrollTo","scrollToRow","scrollToColumn","clearScroll","updateFooter","updateStatus","setMergeCells","removeInsertRow","removeMergeCells","getMergeCells","clearMergeCells","setMergeFooterItems","removeMergeFooterItems","getMergeFooterItems","clearMergeFooterItems","openTooltip","focus","blur","connect"],fG=nd(nd([],Yg,!0),["page-change","form-submit","form-submit-invalid","form-reset","form-collapse","form-toggle-collapse","proxy-query","proxy-delete","proxy-save","toolbar-button-click","toolbar-tool-click","zoom"],!1);const Lc=xt({name:"VxeGrid",props:Cr(Cr({},Kg),{columns:Array,pagerConfig:Object,proxyConfig:Object,toolbarConfig:Object,formConfig:Object,zoomConfig:Object,size:{type:String,default:function(){return H.grid.size||H.size}}}),emits:fG,setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=xn(),o=qr(t),l=Jt({tableLoading:!1,proxyInited:!1,isZMax:!1,tableData:[],pendingRecords:[],filterData:[],formData:{},sortData:[],tZindex:0,tablePage:{total:0,pageSize:H.pager.pageSize||10,currentPage:1}}),s=je(),c=je(),u=je(),f=je(),d=je(),h=je(),p=je(),v=je(),g=je(),m=je(),b=function(se){var ue={};return se.forEach(function(xe){ue[xe]=function(){for(var De=[],U=0;U<arguments.length;U++)De[U]=arguments[U];var ge=c.value;if(ge&&ge[xe])return ge[xe].apply(ge,De)}}),ue},x=b(BA);BA.forEach(function(se){x[se]=function(){for(var ue=[],xe=0;xe<arguments.length;xe++)ue[xe]=arguments[xe];var De=c.value;if(De&&De[se])return De&&De[se].apply(De,ue)}});var T=_e(function(){return Object.assign({},H.grid.proxyConfig,t.proxyConfig)}),A=_e(function(){var se=T.value;return se.message!==!1}),O=_e(function(){return Object.assign({},H.grid.pagerConfig,t.pagerConfig)}),I=_e(function(){return Object.assign({},H.grid.formConfig,t.formConfig)}),_=_e(function(){return Object.assign({},H.grid.toolbarConfig,t.toolbarConfig)}),k=_e(function(){return Object.assign({},H.grid.zoomConfig,t.zoomConfig)}),L=_e(function(){return l.isZMax?{zIndex:l.tZindex}:null}),P=_e(function(){var se={},ue=t;return uG.forEach(function(xe){se[xe]=ue[xe]}),se}),W={refElem:s,refTable:c,refForm:u,refToolbar:f,refPager:d},q={computeProxyOpts:T,computePagerOpts:O,computeFormOpts:I,computeToolbarOpts:_,computeZoomOpts:k},V={xID:i,props:t,context:e,instance:a,reactData:l,getRefMaps:function(){return W},getComputeMaps:function(){return q}},G={},pe=function(se){var ue=l.pendingRecords,xe=t.rowClassName,De=[];return ue.some(function(U){return U===se.row})&&De.push("row--pending"),De.push(xe?E.isFunction(xe)?xe(se):xe:""),De},J=function(se){var ue=t.editConfig,xe=l.pendingRecords,De=c.value,U=ue?ue.beforeEditMethod||ue.activeMethod:null;return De.findRowIndexOf(xe,se.row)===-1?!U||U(Cr(Cr({},se),{$grid:V})):!1},N=_e(function(){var se=t.seqConfig,ue=t.pagerConfig,xe=t.loading,De=t.editConfig,U=t.proxyConfig,ge=l.isZMax,Se=l.tableLoading,$e=l.tablePage,Ue=l.tableData,We=P.value,Je=T.value,nt=O.value,Qe=Object.assign({},We);return ge&&(We.maxHeight?Qe.maxHeight="auto":Qe.height="auto"),U&&wt(Je)&&(Qe.loading=xe||Se,Qe.data=Ue,Qe.rowClassName=pe,ue&&Je.seq&&wt(nt)&&(Qe.seqConfig=Object.assign({},se,{startIndex:($e.currentPage-1)*$e.pageSize}))),De&&(Qe.editConfig=Object.assign({},De,{beforeEditMethod:J})),Qe}),Z=function(){var se=_.value;t.toolbarConfig&&wt(se)&&Ie(function(){var ue=c.value,xe=f.value;ue&&xe&&ue.connect(xe)})},le=function(){var se=l.tablePage,ue=t.pagerConfig,xe=O.value,De=xe.currentPage,U=xe.pageSize;ue&&wt(xe)&&(De&&(se.currentPage=De),U&&(se.pageSize=U))},ye=function(se){var ue=l.pendingRecords,xe=A.value,De=c.value,U=De.getCheckboxRecords();if(U.length){var ge=[],Se=[];U.forEach(function($e){ue.some(function(Ue){return $e===Ue})?Se.push($e):ge.push($e)}),Se.length?l.pendingRecords=ue.filter(function($e){return De.findRowIndexOf(Se,$e)===-1}).concat(ge):ge.length&&(l.pendingRecords=ue.concat(ge)),x.clearCheckboxRow()}else xe&&ot.modal.message({id:se,content:H.i18n("vxe.grid.selectOneRecord"),status:"warning"})},me=function(se,ue){var xe=T.value,De=xe.props,U=De===void 0?{}:De,ge;return se&&U.message&&(ge=E.get(se,U.message)),ge||H.i18n(ue)},Re=function(se,ue,xe){var De=A.value,U=x.getCheckboxRecords();if(De){if(U.length)return ot.modal.confirm({id:"cfm_".concat(se),content:H.i18n(ue),escClosable:!0}).then(function(ge){if(ge==="confirm")return xe()});ot.modal.message({id:"msg_".concat(se),content:H.i18n("vxe.grid.selectOneRecord"),status:"warning"})}else U.length&&xe();return Promise.resolve()},be=function(se){var ue=t.proxyConfig,xe=l.tablePage,De=se.currentPage,U=se.pageSize,ge=T.value;xe.currentPage=De,xe.pageSize=U,G.dispatchEvent("page-change",se),ue&&wt(ge)&&G.commitProxy("query").then(function(Se){G.dispatchEvent("proxy-query",Se,se.$event)})},Ce=function(se){var ue=c.value,xe=t.proxyConfig,De=ue.getComputeMaps().computeSortOpts,U=T.value,ge=De.value;ge.remote&&(l.sortData=se.sortList,xe&&wt(U)&&(l.tablePage.currentPage=1,G.commitProxy("query").then(function(Se){G.dispatchEvent("proxy-query",Se,se.$event)}))),G.dispatchEvent("sort-change",se)},we=function(se){var ue=c.value,xe=t.proxyConfig,De=ue.getComputeMaps().computeFilterOpts,U=T.value,ge=De.value;ge.remote&&(l.filterData=se.filterList,xe&&wt(U)&&(l.tablePage.currentPage=1,G.commitProxy("query").then(function(Se){G.dispatchEvent("proxy-query",Se,se.$event)}))),G.dispatchEvent("filter-change",se)},ce=function(se){var ue=t.proxyConfig,xe=T.value;ue&&wt(xe)&&G.commitProxy("reload").then(function(De){G.dispatchEvent("proxy-query",Cr(Cr({},De),{isReload:!0}),se.$event)}),G.dispatchEvent("form-submit",se)},re=function(se){var ue=t.proxyConfig,xe=T.value;ue&&wt(xe)&&G.commitProxy("reload").then(function(De){G.dispatchEvent("proxy-query",Cr(Cr({},De),{isReload:!0}),se.$event)}),G.dispatchEvent("form-reset",se)},ve=function(se){G.dispatchEvent("form-submit-invalid",se)},Te=function(se){Ie(function(){return x.recalculate(!0)}),G.dispatchEvent("form-toggle-collapse",se),G.dispatchEvent("form-collapse",se)},Pe=function(se){var ue=l.isZMax;return(se?!ue:ue)&&(l.isZMax=!ue,l.tZindex<Ba()&&(l.tZindex=sa())),Ie().then(function(){return x.recalculate(!0)}).then(function(){return l.isZMax})},B=function(se,ue){var xe=se[ue];if(xe)if(E.isString(xe)){if(r[xe])return r[xe]}else return xe;return null},w=function(){var se=t.formConfig,ue=t.proxyConfig,xe=l.formData,De=T.value,U=I.value,ge=[];if(se&&wt(U)||r.form){var Se=[];if(r.form)Se=r.form({$grid:V});else if(U.items){var $e={};if(!U.inited){U.inited=!0;var Ue=De.beforeItem;De&&Ue&&U.items.forEach(function(We){Ue({$grid:V,item:We})})}U.items.forEach(function(We){E.each(We.slots,function(Je){E.isFunction(Je)||r[Je]&&($e[Je]=r[Je])})}),Se.push(D(nr("vxe-form"),Cr(Cr({ref:u},Object.assign({},U,{data:ue&&wt(De)&&De.form?xe:U.data})),{onSubmit:ce,onReset:re,onSubmitInvalid:ve,onCollapse:Te}),$e))}ge.push(D("div",{ref:h,class:"vxe-grid--form-wrapper"},Se))}return ge},C=function(){var se=t.toolbarConfig,ue=_.value,xe=[];if(se&&wt(ue)||r.toolbar){var De=[];if(r.toolbar)De=r.toolbar({$grid:V});else{var U=ue.slots,ge=void 0,Se=void 0,$e={};U&&(ge=B(U,"buttons"),Se=B(U,"tools"),ge&&($e.buttons=ge),Se&&($e.tools=Se)),De.push(D(nr("vxe-toolbar"),Cr({ref:f},ue),$e))}xe.push(D("div",{ref:p,class:"vxe-grid--toolbar-wrapper"},De))}return xe},j=function(){return r.top?[D("div",{ref:v,class:"vxe-grid--top-wrapper"},r.top({$grid:V}))]:[]},ie={};Yg.forEach(function(se){var ue=E.camelCase("on-".concat(se));ie[ue]=function(){for(var xe=[],De=0;De<arguments.length;De++)xe[De]=arguments[De];return n.apply(void 0,nd([se],xe,!1))}});var ne=function(){var se=t.proxyConfig,ue=N.value,xe=T.value,De=Object.assign({},ie),U=r.empty,ge=r.loading;se&&wt(xe)&&(xe.sort&&(De.onSortChange=Ce),xe.filter&&(De.onFilterChange=we));var Se={};return U&&(Se.empty=function(){return U({})}),ge&&(Se.loading=function(){return ge({})}),[D(nr("vxe-table"),Cr(Cr({ref:c},ue),De),Se)]},X=function(){return r.bottom?[D("div",{ref:g,class:"vxe-grid--bottom-wrapper"},r.bottom({$grid:V}))]:[]},ee=function(){var se=t.proxyConfig,ue=t.pagerConfig,xe=T.value,De=O.value,U=[];if(ue&&wt(De)||r.pager){var ge=[];if(r.pager)ge=r.pager({$grid:V});else{var Se=De.slots,$e={},Ue=void 0,We=void 0;Se&&(Ue=B(Se,"left"),We=B(Se,"right"),Ue&&($e.left=Ue),We&&($e.right=We)),ge.push(D(nr("vxe-pager"),Cr(Cr(Cr({ref:d},De),se&&wt(xe)?l.tablePage:{}),{onPageChange:be}),$e))}U.push(D("div",{ref:m,class:"vxe-grid--pager-wrapper"},ge))}return U},de=function(){var se=t.proxyConfig,ue=t.formConfig,xe=l.proxyInited,De=T.value,U=I.value;if(se&&wt(De)){if(ue&&wt(U)&&De.form&&U.items){var ge={};U.items.forEach(function(Se){var $e=Se.field,Ue=Se.itemRender;if($e){var We=null;if(Ue){var Je=Ue.defaultValue;E.isFunction(Je)?We=Je({item:Se}):E.isUndefined(Je)||(We=Je)}ge[$e]=We}}),l.formData=ge}xe||(l.proxyInited=!0,De.autoLoad!==!1&&Ie().then(function(){return G.commitProxy("_init")}).then(function(Se){G.dispatchEvent("proxy-query",Cr(Cr({},Se),{isInited:!0}),new Event("init"))}))}};G={dispatchEvent:function(se,ue,xe){n(se,Object.assign({$grid:V,$event:xe},ue))},commitProxy:function(se){for(var ue=[],xe=1;xe<arguments.length;xe++)ue[xe-1]=arguments[xe];var De=t.toolbarConfig,U=t.pagerConfig,ge=t.editRules,Se=l.tablePage,$e=l.formData,Ue=A.value,We=T.value,Je=O.value,nt=_.value,Qe=We.beforeQuery,Ke=We.afterQuery,at=We.beforeDelete,Q=We.afterDelete,Ot=We.beforeSave,Yt=We.afterSave,Ht=We.ajax,yt=Ht===void 0?{}:Ht,At=We.props,Wt=At===void 0?{}:At,ut=c.value,Bt=null,Ut=null;if(E.isString(se)){var Or=nt.buttons,Xr=De&&wt(nt)&&Or?E.findTree(Or,function(hr){return hr.code===se},{children:"dropdowns"}):null;Bt=Xr?Xr.item:null,Ut=se}else Bt=se,Ut=Bt.code;var nn=Bt?Bt.params:null;switch(Ut){case"insert":return ut.insert({});case"insert_actived":return ut.insert({}).then(function(hr){var cr=hr.row;return ut.setEditRow(cr)});case"mark_cancel":ye(Ut);break;case"remove":return Re(Ut,"vxe.grid.removeSelectRecord",function(){return ut.removeCheckboxRow()});case"import":ut.importData(nn);break;case"open_import":ut.openImport(nn);break;case"export":ut.exportData(nn);break;case"open_export":ut.openExport(nn);break;case"reset_custom":return ut.resetColumn(!0);case"_init":case"reload":case"query":{var An=yt.query;if(An){var an=Ut==="_init",on=Ut==="reload",Hr=[],Zr=[],Kn={};if(U&&((an||on)&&(Se.currentPage=1),wt(Je)&&(Kn=Cr({},Se))),an){var sn=ut.getComputeMaps().computeSortOpts,Yn=sn.value,dr=Yn.defaultSort;dr&&(E.isArray(dr)||(dr=[dr]),Hr=dr.map(function(hr){return{field:hr.field,property:hr.field,order:hr.order}})),Zr=ut.getCheckedFilters()}else on?(l.pendingRecords=[],ut.clearAll()):(Hr=ut.getSortColumns(),Zr=ut.getCheckedFilters());var Nr={code:Ut,button:Bt,isInited:an,isReload:on,$grid:V,page:Kn,sort:Hr.length?Hr[0]:{},sorts:Hr,filters:Zr,form:$e,options:An};l.sortData=Hr,l.filterData=Zr,l.tableLoading=!0;var Mn=[Nr].concat(ue);return Promise.resolve((Qe||An).apply(void 0,Mn)).then(function(hr){if(l.tableLoading=!1,hr)if(U&&wt(Je)){var cr=E.get(hr,Wt.total||"page.total")||0;Se.total=E.toNumber(cr),l.tableData=E.get(hr,Wt.result||"result")||[];var Lr=Math.max(Math.ceil(cr/Se.pageSize),1);Se.currentPage>Lr&&(Se.currentPage=Lr)}else l.tableData=(Wt.list?E.get(hr,Wt.list):hr)||[];else l.tableData=[];return Ke&&Ke.apply(void 0,Mn),{status:!0}}).catch(function(){return l.tableLoading=!1,{status:!1}})}break}case"delete":{var qn=yt.delete;if(qn){var Xn=x.getCheckboxRecords(),En=Xn.filter(function(cr){return!ut.isInsertByRow(cr)}),ui={removeRecords:En},Nr={$grid:V,code:Ut,button:Bt,body:ui,options:qn},Wi=[Nr].concat(ue);if(Xn.length)return Re(Ut,"vxe.grid.deleteSelectRecord",function(){return En.length?(l.tableLoading=!0,Promise.resolve((at||qn).apply(void 0,Wi)).then(function(cr){return l.tableLoading=!1,l.pendingRecords=l.pendingRecords.filter(function(Lr){return ut.findRowIndexOf(En,Lr)===-1}),Ue&&ot.modal.message({content:me(cr,"vxe.grid.delSuccess"),status:"success"}),Q?Q.apply(void 0,Wi):G.commitProxy("query"),{status:!0}}).catch(function(cr){return l.tableLoading=!1,Ue&&ot.modal.message({id:Ut,content:me(cr,"vxe.grid.operError"),status:"error"}),{status:!1}})):ut.remove(Xn)});Ue&&ot.modal.message({id:Ut,content:H.i18n("vxe.grid.selectOneRecord"),status:"warning"})}break}case"save":{var ln=yt.save;if(ln){var $r=Object.assign({pendingRecords:l.pendingRecords},ut.getRecordset()),gr=$r.insertRecords,Zn=$r.removeRecords,fi=$r.updateRecords,Ci=$r.pendingRecords,Nr={$grid:V,code:Ut,button:Bt,body:$r,options:ln},Ii=[Nr].concat(ue);gr.length&&($r.pendingRecords=Ci.filter(function(cr){return ut.findRowIndexOf(gr,cr)===-1})),Ci.length&&($r.insertRecords=gr.filter(function(cr){return ut.findRowIndexOf(Ci,cr)===-1}));var Tn=Promise.resolve();return ge&&(Tn=ut.validate($r.insertRecords.concat(fi))),Tn.then(function(cr){if(!cr){if($r.insertRecords.length||Zn.length||fi.length||$r.pendingRecords.length)return l.tableLoading=!0,Promise.resolve((Ot||ln).apply(void 0,Ii)).then(function(Lr){return l.tableLoading=!1,l.pendingRecords=[],Ue&&ot.modal.message({content:me(Lr,"vxe.grid.saveSuccess"),status:"success"}),Yt?Yt.apply(void 0,Ii):G.commitProxy("query"),{status:!0}}).catch(function(Lr){return l.tableLoading=!1,Ue&&ot.modal.message({id:Ut,content:me(Lr,"vxe.grid.operError"),status:"error"}),{status:!1}});Ue&&ot.modal.message({id:Ut,content:H.i18n("vxe.grid.dataUnchanged"),status:"info"})}})}break}default:{var Sn=ot.commands.get(Ut);Sn&&Sn.commandMethod&&Sn.commandMethod.apply(Sn,nd([{code:Ut,button:Bt,$grid:V,$table:ut}],ue,!1))}}return Ie()},zoom:function(){return l.isZMax?G.revert():G.maximize()},isMaximized:function(){return l.isZMax},maximize:function(){return Pe(!0)},revert:function(){return Pe()},getFormItems:function(se){var ue=I.value,xe=t.formConfig,De=ue.items,U=[];return E.eachTree(xe&&wt(ue)&&De?De:[],function(ge){U.push(ge)},{children:"children"}),E.isUndefined(se)?U:U[se]},getPendingRecords:function(){return l.pendingRecords},getProxyInfo:function(){if(t.proxyConfig){var se=l.sortData;return{data:l.tableData,filter:l.filterData,form:l.formData,sort:se.length?se[0]:{},sorts:se,pager:l.tablePage,pendingRecords:l.pendingRecords}}return null}};var oe={extendTableMethods:b,callSlot:function(se,ue){return se&&(E.isString(se)&&(se=r[se]||null),E.isFunction(se))?pr(se(ue)):[]},getExcludeHeight:function(){var se=t.height,ue=l.isZMax,xe=s.value,De=h.value,U=p.value,ge=v.value,Se=g.value,$e=m.value,Ue=ue||se!=="auto"?0:Bv(xe.parentNode);return Ue+Bv(xe)+rc(De)+rc(U)+rc(ge)+rc(Se)+rc($e)},getParentHeight:function(){var se=s.value;return se?(l.isZMax?go().visibleHeight:E.toNumber(getComputedStyle(se.parentNode).height))-oe.getExcludeHeight():0},triggerToolbarCommitEvent:function(se,ue){var xe=se.code;return G.commitProxy(se,ue).then(function(De){xe&&De&&De.status&&["query","reload","delete","save"].includes(xe)&&G.dispatchEvent(xe==="delete"||xe==="save"?"proxy-".concat(xe):"proxy-query",Cr(Cr({},De),{isReload:xe==="reload"}),ue)})},triggerToolbarBtnEvent:function(se,ue){oe.triggerToolbarCommitEvent(se,ue),G.dispatchEvent("toolbar-button-click",{code:se.code,button:se},ue)},triggerToolbarTolEvent:function(se,ue){oe.triggerToolbarCommitEvent(se,ue),G.dispatchEvent("toolbar-tool-click",{code:se.code,tool:se,$event:ue})},triggerZoomEvent:function(se){G.zoom(),G.dispatchEvent("zoom",{type:l.isZMax?"max":"revert"},se)}};Object.assign(V,x,G,oe);var te=je(0);st(function(){return t.columns?t.columns.length:-1},function(){te.value++}),st(function(){return t.columns},function(){te.value++}),st(te,function(){Ie(function(){return V.loadColumn(t.columns||[])})}),st(function(){return t.toolbarConfig},function(){Z()}),st(function(){return t.pagerConfig},function(){le()}),st(function(){return t.proxyConfig},function(){de()});var he=function(se){var ue=k.value,xe=_t(se,gt.ESCAPE);xe&&l.isZMax&&ue.escRestore!==!1&&oe.triggerZoomEvent(se)};ot.hooks.forEach(function(se){var ue=se.setupGrid;if(ue){var xe=ue(V);xe&&E.isObject(xe)&&Object.assign(V,xe)}}),le(),Er(function(){Ie(function(){var se=t.data,ue=t.columns,xe=t.proxyConfig,De=T.value,U=I.value;wt(xe)&&(se||De.form&&U.data)&&jr("vxe.error.errConflicts",["grid.data","grid.proxy-config"]),ue&&ue.length&&V.loadColumn(ue),Z()}),bt.on(V,"keydown",he)}),Rr(function(){bt.off(V,"keydown")}),Ie(function(){de()});var ke=function(){var se,ue=o.value,xe=L.value;return D("div",{ref:s,class:["vxe-grid",(se={},se["size--".concat(ue)]=ue,se["is--animat"]=!!t.animat,se["is--round"]=t.round,se["is--maximize"]=l.isZMax,se["is--loading"]=t.loading||l.tableLoading,se)],style:xe},w().concat(C(),j(),ne(),X(),ee()))};return V.renderVN=ke,sr("$xegrid",V),V},render:function(){return this.renderVN()}});var qg=Object.assign(Lc,{install:function(t){t.component(Lc.name,Lc)}}),dG=qg;Kt.component(Lc.name,Lc);var id=globalThis&&globalThis.__assign||function(){return id=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},id.apply(this,arguments)};const Dc=xt({name:"VxeToolbar",props:{loading:Boolean,refresh:[Boolean,Object],import:[Boolean,Object],export:[Boolean,Object],print:[Boolean,Object],zoom:[Boolean,Object],custom:[Boolean,Object],buttons:{type:Array,default:function(){return H.toolbar.buttons}},tools:{type:Array,default:function(){return H.toolbar.tools}},perfect:{type:Boolean,default:function(){return H.toolbar.perfect}},size:{type:String,default:function(){return H.toolbar.size||H.size}},className:[String,Function]},emits:["button-click","tool-click"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=Jt({isRefresh:!1,columns:[]}),l=je(),s=je(),c=Jt({isAll:!1,isIndeterminate:!1,activeBtn:!1,activeWrapper:!1,visible:!1}),u={refElem:l},f={xID:i,props:t,context:e,reactData:o,getRefMaps:function(){return u}},d={},h=ct("$xegrid",null),p,v=_e(function(){return Object.assign({},H.toolbar.refresh,t.refresh)}),g=_e(function(){return Object.assign({},H.toolbar.import,t.import)}),m=_e(function(){return Object.assign({},H.toolbar.export,t.export)}),b=_e(function(){return Object.assign({},H.toolbar.print,t.print)}),x=_e(function(){return Object.assign({},H.toolbar.zoom,t.zoom)}),T=_e(function(){return Object.assign({},H.toolbar.custom,t.custom)}),A=function(){if(p)return!0;jr("vxe.error.barUnableLink")},O=function(){var X=o.columns,ee=p.getComputeMaps().computeCustomOpts,de=ee.value,oe=de.checkMethod;c.isAll=X.every(function(te){return(oe?!oe({column:te}):!1)||te.visible}),c.isIndeterminate=!c.isAll&&X.some(function(te){return(!oe||oe({column:te}))&&(te.visible||te.halfVisible)})},I=function(){c.visible=!0,O()},_=function(){p.handleCustom()},k=function(){var X=t.custom,ee=T.value;c.visible&&(c.visible=!1,X&&!ee.immediate&&_())},L=function(X,ee){var de=h||p;de.dispatchEvent("custom",{type:X},ee)},P=function(X){k(),L("confirm",X)},W=function(X){A()&&(c.visible||(I(),L("open",X)))},q=function(X){c.visible&&(k(),L("close",X))},V=function(X){p.resetColumn(!0),k(),L("reset",X)},G=function(X){var ee=o.columns,de=E.findTree(ee,function(te){return te===X});if(de&&de.parent){var oe=de.parent;oe.children&&oe.children.length&&(oe.visible=oe.children.every(function(te){return te.visible}),oe.halfVisible=!oe.visible&&oe.children.some(function(te){return te.visible||te.halfVisible}),G(oe))}},pe=function(X){var ee=!X.visible,de=T.value;E.eachTree([X],function(oe){oe.visible=ee,oe.halfVisible=!1}),G(X),t.custom&&de.immediate&&_(),O()},J=function(X,ee){var de=p.getComputeMaps().computeIsMaxFixedColumn,oe=de.value;X.fixed===ee?p.clearColumnFixed(X):(!oe||X.fixed)&&p.setColumnFixed(X,ee)},N=function(){var X=o.columns,ee=p.getComputeMaps().computeCustomOpts,de=ee.value,oe=de.checkMethod,te=!c.isAll;E.eachTree(X,function(he){(!oe||oe({column:he}))&&(he.visible=te,he.halfVisible=!1)}),c.isAll=te,O()},Z=function(X){var ee=s.value;Pt(X,ee).flag||q(X)},le=function(X){q(X)},ye=function(X){c.visible?q(X):W(X)},me=function(X){c.activeBtn=!0,W(X)},Re=function(X){c.activeBtn=!1,setTimeout(function(){!c.activeBtn&&!c.activeWrapper&&q(X)},300)},be=function(X){c.activeWrapper=!0,W(X)},Ce=function(X){c.activeWrapper=!1,setTimeout(function(){!c.activeBtn&&!c.activeWrapper&&q(X)},300)},we=function(X){var ee=o.isRefresh,de=v.value;if(!ee){var oe=de.queryMethod||de.query;if(oe){o.isRefresh=!0;try{Promise.resolve(oe({})).catch(function(te){return te}).then(function(){o.isRefresh=!1})}catch{o.isRefresh=!1}}else h&&(o.isRefresh=!0,h.triggerToolbarCommitEvent({code:de.code||"reload"},X).catch(function(te){return te}).then(function(){o.isRefresh=!1}))}},ce=function(X){h&&h.triggerZoomEvent(X)},re=function(X,ee){var de=ee.code;if(de)if(h)h.triggerToolbarBtnEvent(ee,X);else{var oe=ot.commands.get(de),te={code:de,button:ee,$table:p,$grid:h,$event:X};oe&&oe.commandMethod&&oe.commandMethod(te),f.dispatchEvent("button-click",te,X)}},ve=function(X,ee){var de=ee.code;if(de)if(h)h.triggerToolbarTolEvent(ee,X);else{var oe=ot.commands.get(de),te={code:de,tool:ee,$table:p,$grid:h,$event:X};oe&&oe.commandMethod&&oe.commandMethod(te),f.dispatchEvent("tool-click",te,X)}},Te=function(){A()&&p.openImport()},Pe=function(){A()&&p.openExport()},B=function(){A()&&p.openPrint()},w=function(X,ee){var de=X.dropdowns,oe=[];return de?de.map(function(te,he){return te.visible===!1?$t():D(nr("vxe-button"),{key:he,disabled:te.disabled,loading:te.loading,type:te.type,icon:te.icon,circle:te.circle,round:te.round,status:te.status,content:te.name,onClick:function(ke){return ee?re(ke,te):ve(ke,te)}})}):oe},C=function(){var X=t.buttons,ee=r.buttons;if(ee)return pr(ee({$grid:h,$table:p}));var de=[];return X&&X.forEach(function(oe){var te=oe.dropdowns,he=oe.buttonRender;if(oe.visible!==!1){var ke=he?ot.renderer.get(he.name):null;if(he&&ke&&ke.renderToolbarButton){var se=ke.toolbarButtonClassName,ue={$grid:h,$table:p,button:oe};de.push(D("span",{class:["vxe-button--item",se?E.isFunction(se)?se(ue):se:""]},pr(ke.renderToolbarButton(he,ue))))}else de.push(D(nr("vxe-button"),{disabled:oe.disabled,loading:oe.loading,type:oe.type,icon:oe.icon,circle:oe.circle,round:oe.round,status:oe.status,content:oe.name,destroyOnClose:oe.destroyOnClose,placement:oe.placement,transfer:oe.transfer,onClick:function(xe){return re(xe,oe)}},te&&te.length?{dropdowns:function(){return w(oe,!0)}}:{}))}}),de},j=function(){var X=t.tools,ee=r.tools;if(ee)return pr(ee({$grid:h,$table:p}));var de=[];return X&&X.forEach(function(oe){var te=oe.dropdowns,he=oe.toolRender;if(oe.visible!==!1){var ke=he?ot.renderer.get(he.name):null;if(he&&ke&&ke.renderToolbarTool){var se=ke.toolbarToolClassName,ue={$grid:h,$table:p,tool:oe};de.push(D("span",{class:["vxe-tool--item",se?E.isFunction(se)?se(ue):se:""]},pr(ke.renderToolbarTool(he,ue))))}else de.push(D(nr("vxe-button"),{disabled:oe.disabled,loading:oe.loading,type:oe.type,icon:oe.icon,circle:oe.circle,round:oe.round,status:oe.status,content:oe.name,destroyOnClose:oe.destroyOnClose,placement:oe.placement,transfer:oe.transfer,onClick:function(xe){return ve(xe,oe)}},te&&te.length?{dropdowns:function(){return w(oe,!1)}}:{}))}}),de},ie=function(){var X=o.columns,ee=T.value,de=!0,oe=[],te={},he={},ke;if(p){var se=p.getComputeMaps(),ue=se.computeCustomOpts,xe=se.computeIsMaxFixedColumn,De=ue.value;ke=De.checkMethod,de=xe.value}ee.trigger==="manual"||(ee.trigger==="hover"?(te.onMouseenter=me,te.onMouseleave=Re,he.onMouseenter=be,he.onMouseleave=Ce):te.onClick=ye),E.eachTree(X,function(Se,$e,Ue,We,Je){var nt=Mr(Se.getTitle(),1),Qe=Se.getKey(),Ke=Se.children&&Se.children.length,at=ke?!ke({column:Se}):!1;if(Ke||Qe){var Q=Se.visible,Ot=Se.halfVisible;oe.push(D("li",{class:["vxe-custom--option","level--".concat(Se.level),{"is--group":Ke}]},[D("div",{title:nt,class:["vxe-custom--checkbox-option",{"is--checked":Q,"is--indeterminate":Ot,"is--disabled":at}],onClick:function(){at||pe(Se)}},[D("span",{class:["vxe-checkbox--icon",Ot?H.icon.TABLE_CHECKBOX_INDETERMINATE:Q?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]}),D("span",{class:"vxe-checkbox--label"},nt)]),!Je&&ee.allowFixed?D("div",{class:"vxe-custom--fixed-option"},[D("span",{class:["vxe-custom--fixed-left-option",Se.fixed==="left"?H.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED:H.icon.TOOLBAR_TOOLS_FIXED_LEFT,{"is--checked":Se.fixed==="left","is--disabled":de&&!Se.fixed}],title:H.i18n(Se.fixed==="left"?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedLeft"),onClick:function(){J(Se,"left")}}),D("span",{class:["vxe-custom--fixed-right-option",Se.fixed==="right"?H.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED:H.icon.TOOLBAR_TOOLS_FIXED_RIGHT,{"is--checked":Se.fixed==="right","is--disabled":de&&!Se.fixed}],title:H.i18n(Se.fixed==="right"?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedRight"),onClick:function(){J(Se,"right")}})]):null]))}});var U=c.isAll,ge=c.isIndeterminate;return D("div",{class:["vxe-custom--wrapper",{"is--active":c.visible}],ref:s},[D(nr("vxe-button"),id({circle:!0,icon:ee.icon||H.icon.TOOLBAR_TOOLS_CUSTOM,title:H.i18n("vxe.toolbar.custom")},te)),D("div",{class:"vxe-custom--option-wrapper"},[D("ul",{class:"vxe-custom--header"},[D("li",{class:"vxe-custom--option"},[D("div",{class:["vxe-custom--checkbox-option",{"is--checked":U,"is--indeterminate":ge}],title:H.i18n("vxe.table.allTitle"),onClick:N},[D("span",{class:["vxe-checkbox--icon",ge?H.icon.TABLE_CHECKBOX_INDETERMINATE:U?H.icon.TABLE_CHECKBOX_CHECKED:H.icon.TABLE_CHECKBOX_UNCHECKED]}),D("span",{class:"vxe-checkbox--label"},H.i18n("vxe.toolbar.customAll"))])])]),D("ul",id({class:"vxe-custom--body"},he),oe),ee.showFooter||ee.isFooter?D("div",{class:"vxe-custom--footer"},[D("button",{class:"btn--reset",onClick:V},ee.resetButtonText||H.i18n("vxe.toolbar.customRestore")),D("button",{class:"btn--confirm",onClick:P},ee.confirmButtonText||H.i18n("vxe.toolbar.customConfirm"))]):null])])};d={dispatchEvent:function(X,ee,de){n(X,Object.assign({$toolbar:f,$event:de},ee))},syncUpdate:function(X){var ee=X.collectColumn;p=X.$table,o.columns=ee}},Object.assign(f,d),Er(function(){bt.on(f,"mousedown",Z),bt.on(f,"blur",le)}),Rr(function(){bt.off(f,"mousedown"),bt.off(f,"blur")}),Ie(function(){var X=t.refresh,ee=v.value,de=ee.queryMethod||ee.query;X&&!h&&!de&&t7("vxe.error.notFunc",["queryMethod"]),T.value});var ne=function(){var X,ee=t.perfect,de=t.loading,oe=t.refresh,te=t.zoom,he=t.custom,ke=t.className,se=a.value,ue=v.value,xe=g.value,De=m.value,U=b.value,ge=x.value;return D("div",{ref:l,class:["vxe-toolbar",ke?E.isFunction(ke)?ke({$toolbar:f}):ke:"",(X={},X["size--".concat(se)]=se,X["is--perfect"]=ee,X["is--loading"]=de,X)]},[D("div",{class:"vxe-buttons--wrapper"},C()),D("div",{class:"vxe-tools--wrapper"},j()),D("div",{class:"vxe-tools--operate"},[t.import?D(nr("vxe-button"),{circle:!0,icon:xe.icon||H.icon.TOOLBAR_TOOLS_IMPORT,title:H.i18n("vxe.toolbar.import"),onClick:Te}):$t(),t.export?D(nr("vxe-button"),{circle:!0,icon:De.icon||H.icon.TOOLBAR_TOOLS_EXPORT,title:H.i18n("vxe.toolbar.export"),onClick:Pe}):$t(),t.print?D(nr("vxe-button"),{circle:!0,icon:U.icon||H.icon.TOOLBAR_TOOLS_PRINT,title:H.i18n("vxe.toolbar.print"),onClick:B}):$t(),oe?D(nr("vxe-button"),{circle:!0,icon:o.isRefresh?ue.iconLoading||H.icon.TOOLBAR_TOOLS_REFRESH_LOADING:ue.icon||H.icon.TOOLBAR_TOOLS_REFRESH,title:H.i18n("vxe.toolbar.refresh"),onClick:we}):$t(),te&&h?D(nr("vxe-button"),{circle:!0,icon:h.isMaximized()?ge.iconOut||H.icon.TOOLBAR_TOOLS_MINIMIZE:ge.iconIn||H.icon.TOOLBAR_TOOLS_FULLSCREEN,title:H.i18n("vxe.toolbar.zoom".concat(h.isMaximized()?"Out":"In")),onClick:ce}):$t(),he?ie():$t()])])};return f.renderVN=ne,f},render:function(){return this.renderVN()}});var Xg=Object.assign(Dc,{install:function(t){t.component(Dc.name,Dc)}}),hG=Xg;Kt.component(Dc.name,Dc);var Gv=globalThis&&globalThis.__assign||function(){return Gv=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Gv.apply(this,arguments)};const Oc=xt({name:"VxePager",props:{size:{type:String,default:function(){return H.pager.size||H.size}},layouts:{type:Array,default:function(){return H.pager.layouts||["PrevJump","PrevPage","Jump","PageCount","NextPage","NextJump","Sizes","Total"]}},currentPage:{type:Number,default:1},loading:Boolean,pageSize:{type:Number,default:function(){return H.pager.pageSize||10}},total:{type:Number,default:0},pagerCount:{type:Number,default:function(){return H.pager.pagerCount||7}},pageSizes:{type:Array,default:function(){return H.pager.pageSizes||[10,15,20,50,100]}},align:{type:String,default:function(){return H.pager.align}},border:{type:Boolean,default:function(){return H.pager.border}},background:{type:Boolean,default:function(){return H.pager.background}},perfect:{type:Boolean,default:function(){return H.pager.perfect}},autoHidden:{type:Boolean,default:function(){return H.pager.autoHidden}},transfer:{type:Boolean,default:function(){return H.pager.transfer}},className:[String,Function],iconPrevPage:String,iconJumpPrev:String,iconJumpNext:String,iconNextPage:String,iconJumpMore:String},emits:["update:pageSize","update:currentPage","page-change"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=ct("$xegrid",null),l=Jt({inpCurrPage:t.currentPage}),s=je(),c={refElem:s},u={xID:i,props:t,context:e,getRefMaps:function(){return c}},f={},d={},h=function(be,Ce){return Math.max(Math.ceil(be/Ce),1)},p=_e(function(){return h(t.total,t.pageSize)}),v=function(be,Ce){n("update:currentPage",Ce),be&&Ce!==t.currentPage&&f.dispatchEvent("page-change",{type:"current",pageSize:t.pageSize,currentPage:Ce},be)},g=function(be,Ce){n("update:currentPage",be),Ce&&be!==t.currentPage&&f.dispatchEvent("page-change",{type:"current",pageSize:t.pageSize,currentPage:be},Ce)},m=function(be){var Ce=be.target,we=E.toInteger(Ce.value),ce=p.value,re=we<=0?1:we>=ce?ce:we,ve=E.toValueString(re);Ce.value=ve,l.inpCurrPage=ve,g(re,be)},b=_e(function(){for(var be=t.pagerCount,Ce=p.value,we=Ce>be?be-2:be,ce=[],re=0;re<we;re++)ce.push(re);return ce}),x=_e(function(){return Math.floor((t.pagerCount-2)/2)}),T=_e(function(){return t.pageSizes.map(function(be){return E.isNumber(be)?{value:be,label:"".concat(H.i18n("vxe.pager.pagesize",[be]))}:Gv({value:"",label:""},be)})}),A=function(be){var Ce=t.currentPage,we=p.value;Ce>1&&g(Math.min(we,Math.max(Ce-1,1)),be)},O=function(be){var Ce=t.currentPage,we=p.value;Ce<we&&g(Math.min(we,Ce+1),be)},I=function(be){var Ce=b.value;g(Math.max(t.currentPage-Ce.length,1),be)},_=function(be){var Ce=p.value,we=b.value;g(Math.min(t.currentPage+we.length,Ce),be)},k=function(be){var Ce=be.value,we=E.toNumber(Ce),ce=h(t.total,we),re=t.currentPage;re>ce&&(re=ce,n("update:currentPage",ce)),n("update:pageSize",we),f.dispatchEvent("page-change",{type:"size",pageSize:we,currentPage:re})},L=function(be){var Ce=be.target;l.inpCurrPage=Ce.value},P=function(be){_t(be,gt.ENTER)?m(be):_t(be,gt.ARROW_UP)?(be.preventDefault(),O(be)):_t(be,gt.ARROW_DOWN)&&(be.preventDefault(),A(be))},W=function(){return D("button",{class:["vxe-pager--prev-btn",{"is--disabled":t.currentPage<=1}],type:"button",title:H.i18n("vxe.pager.prevPage"),onClick:A},[D("i",{class:["vxe-pager--btn-icon",t.iconPrevPage||H.icon.PAGER_PREV_PAGE]})])},q=function(be){return D(be||"button",{class:["vxe-pager--jump-prev",{"is--fixed":!be,"is--disabled":t.currentPage<=1}],type:"button",title:H.i18n("vxe.pager.prevJump"),onClick:I},[be?D("i",{class:["vxe-pager--jump-more-icon",t.iconJumpMore||H.icon.PAGER_JUMP_MORE]}):null,D("i",{class:["vxe-pager--jump-icon",t.iconJumpPrev||H.icon.PAGER_JUMP_PREV]})])},V=function(be){var Ce=p.value;return D(be||"button",{class:["vxe-pager--jump-next",{"is--fixed":!be,"is--disabled":t.currentPage>=Ce}],type:"button",title:H.i18n("vxe.pager.nextJump"),onClick:_},[be?D("i",{class:["vxe-pager--jump-more-icon",t.iconJumpMore||H.icon.PAGER_JUMP_MORE]}):null,D("i",{class:["vxe-pager--jump-icon",t.iconJumpNext||H.icon.PAGER_JUMP_NEXT]})])},G=function(){var be=p.value;return D("button",{class:["vxe-pager--next-btn",{"is--disabled":t.currentPage>=be}],type:"button",title:H.i18n("vxe.pager.nextPage"),onClick:O},[D("i",{class:["vxe-pager--btn-icon",t.iconNextPage||H.icon.PAGER_NEXT_PAGE]})])},pe=function(be){var Ce=t.currentPage,we=t.pagerCount,ce=[],re=p.value,ve=b.value,Te=x.value,Pe=re>we,B=Pe&&Ce>Te+1,w=Pe&&Ce<re-Te,C=1;return Pe&&(Ce>=re-Te?C=Math.max(re-ve.length+1,1):C=Math.max(Ce-Te,1)),be&&B&&ce.push(D("button",{class:"vxe-pager--num-btn",type:"button",onClick:function(j){return v(j,1)}},1),q("span")),ve.forEach(function(j,ie){var ne=C+ie;ne<=re&&ce.push(D("button",{key:ne,class:["vxe-pager--num-btn",{"is--active":Ce===ne}],type:"button",onClick:function(X){return v(X,ne)}},ne))}),be&&w&&ce.push(V("button"),D("button",{class:"vxe-pager--num-btn",type:"button",onClick:function(j){return v(j,re)}},re)),D("span",{class:"vxe-pager--btn-wrapper"},ce)},J=function(){return pe(!0)},N=function(){var be=T.value;return D(nr("vxe-select"),{class:"vxe-pager--sizes",modelValue:t.pageSize,placement:"top",transfer:t.transfer,options:be,onChange:k})},Z=function(be){return D("span",{class:"vxe-pager--jump"},[be?D("span",{class:"vxe-pager--goto-text"},H.i18n("vxe.pager.goto")):null,D("input",{class:"vxe-pager--goto",value:l.inpCurrPage,type:"text",autocomplete:"off",onInput:L,onKeydown:P,onBlur:m}),be?D("span",{class:"vxe-pager--classifier-text"},H.i18n("vxe.pager.pageClassifier")):null])},le=function(){return Z(!0)},ye=function(){var be=p.value;return D("span",{class:"vxe-pager--count"},[D("span",{class:"vxe-pager--separator"}),D("span",be)])},me=function(){return D("span",{class:"vxe-pager--total"},H.i18n("vxe.pager.total",[t.total]))};f={dispatchEvent:function(be,Ce,we){n(be,Object.assign({$pager:u,$event:we},Ce))},prevPage:function(){return A(),Ie()},nextPage:function(){return O(),Ie()},prevJump:function(){return I(),Ie()},nextJump:function(){return _(),Ie()}},d={handlePrevPage:A,handleNextPage:O,handlePrevJump:I,handleNextJump:_},Object.assign(u,f,d),st(function(){return t.currentPage},function(be){l.inpCurrPage=be});var Re=function(){var be,Ce=t.align,we=t.layouts,ce=t.className,re=[],ve=a.value,Te=p.value;return r.left&&re.push(D("span",{class:"vxe-pager--left-wrapper"},r.left({$grid:o}))),we.forEach(function(Pe){var B;switch(Pe){case"PrevPage":B=W;break;case"PrevJump":B=q;break;case"Number":B=pe;break;case"JumpNumber":B=J;break;case"NextJump":B=V;break;case"NextPage":B=G;break;case"Sizes":B=N;break;case"FullJump":B=le;break;case"Jump":B=Z;break;case"PageCount":B=ye;break;case"Total":B=me;break}B&&re.push(B())}),r.right&&re.push(D("span",{class:"vxe-pager--right-wrapper"},r.right({$grid:o}))),D("div",{ref:s,class:["vxe-pager",ce?E.isFunction(ce)?ce({$pager:u}):ce:"",(be={},be["size--".concat(ve)]=ve,be["align--".concat(Ce)]=Ce,be["is--border"]=t.border,be["is--background"]=t.background,be["is--perfect"]=t.perfect,be["is--hidden"]=t.autoHidden&&Te===1,be["is--loading"]=t.loading,be)]},[D("div",{class:"vxe-pager--wrapper"},re)])};return u.renderVN=Re,u},render:function(){return this.renderVN()}});var Zg=Object.assign(Oc,{install:function(t){t.component(Oc.name,Oc)}}),pG=Zg;Kt.component(Oc.name,Oc);var Jg=Object.assign(yi,{install:function(t){t.component(yi.name,yi)}}),vG=Jg;Kt.component(yi.name,yi);const kc=xt({name:"VxeCheckboxGroup",props:{modelValue:Array,disabled:Boolean,max:{type:[String,Number],default:null},size:{type:String,default:function(){return H.checkbox.size||H.size}}},emits:["update:modelValue","change"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l=_e(function(){var h=t.modelValue,p=t.max;return p?(h?h.length:0)>=E.toNumber(p):!1}),s={computeIsMaximize:l},c={xID:o,props:t,context:e,getComputeMaps:function(){return s}};qr(t);var u={dispatchEvent:function(h,p,v){n(h,Object.assign({$checkboxGroup:c,$event:v},p))}},f={handleChecked:function(h,p){var v=h.checked,g=h.label,m=t.modelValue||[],b=m.indexOf(g);v?b===-1&&m.push(g):m.splice(b,1),n("update:modelValue",m),c.dispatchEvent("change",Object.assign({checklist:m},h),p),i&&a&&i.triggerItemEvent(p,a.itemConfig.field,m)}};Object.assign(c,u,f);var d=function(){return D("div",{class:"vxe-checkbox-group"},r.default?r.default({}):[])};return c.renderVN=d,sr("$xecheckboxgroup",c),d}});var Qg=Object.assign(kc,{install:function(t){t.component(kc.name,kc)}}),mG=Qg;Kt.component(kc.name,kc);var e0=Object.assign(fl,{install:function(t){t.component(fl.name,fl)}}),gG=e0;Kt.component(fl.name,fl);var t0=Object.assign(ul,{install:function(t){t.component(ul.name,ul)}}),yG=t0;Kt.component(ul.name,ul);const Mc=xt({name:"VxeRadioButton",props:{modelValue:[String,Number,Boolean],label:{type:[String,Number,Boolean],default:null},title:[String,Number],content:[String,Number],disabled:Boolean,strict:{type:Boolean,default:function(){return H.radioButton.strict}},size:{type:String,default:function(){return H.radioButton.size||H.size}}},emits:["update:modelValue","change"],setup:function(t,e){var r=e.slots,n=e.emit,i=ct("$xeform",null),a=ct("$xeformiteminfo",null),o=E.uniqueId(),l=qr(t),s={xID:o,props:t,context:e},c={},u=ct("$xeradiogroup",null),f=_e(function(){return t.disabled||u&&u.props.disabled}),d=_e(function(){return u?u.name:null}),h=_e(function(){return u?u.props.strict:t.strict}),p=_e(function(){var x=t.modelValue,T=t.label;return u?u.props.modelValue===T:x===T});c={dispatchEvent:function(x,T,A){n(x,Object.assign({$radioButton:s,$event:A},T))}},Object.assign(s,c);var v=function(x,T){u?u.handleChecked({label:x},T):(n("update:modelValue",x),c.dispatchEvent("change",{label:x},T),i&&a&&i.triggerItemEvent(T,a.itemConfig.field,x))},g=function(x){var T=f.value;T||v(t.label,x)},m=function(x){var T=f.value,A=h.value;!T&&!A&&t.label===(u?u.props.modelValue:t.modelValue)&&v(null,x)},b=function(){var x,T=l.value,A=f.value,O=d.value,I=p.value;return D("label",{class:["vxe-radio","vxe-radio-button",(x={},x["size--".concat(T)]=T,x["is--disabled"]=A,x)],title:t.title},[D("input",{class:"vxe-radio--input",type:"radio",name:O,checked:I,disabled:A,onChange:g,onClick:m}),D("span",{class:"vxe-radio--label"},r.default?r.default({}):Ar(t.content))])};return Object.assign(s,{renderVN:b,dispatchEvent}),b}});var r0=Object.assign(Mc,{install:function(t){t.component(Mc.name,Mc)}}),bG=r0;Kt.component(Mc.name,Mc);var n0=Object.assign(_a,{install:function(t){t.component(_a.name,_a)}}),xG=n0;Kt.component(_a.name,_a);var xa;const Fc=xt({name:"VxeTextarea",props:{modelValue:[String,Number],className:String,immediate:{type:Boolean,default:!0},name:String,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:function(){return E.eqNull(H.textarea.placeholder)?H.i18n("vxe.base.pleaseInput"):H.textarea.placeholder}},maxlength:[String,Number],rows:{type:[String,Number],default:2},cols:{type:[String,Number],default:null},showWordCount:Boolean,countMethod:Function,autosize:[Boolean,Object],form:String,resize:{type:String,default:function(){return H.textarea.resize}},size:{type:String,default:function(){return H.textarea.size||H.size}}},emits:["update:modelValue","input","keydown","keyup","click","change","focus","blur"],setup:function(t,e){var r=e.emit,n=ct("$xeform",null),i=ct("$xeformiteminfo",null),a=E.uniqueId(),o=qr(t),l=Jt({inputValue:t.modelValue}),s=je(),c=je(),u={refElem:s,refTextarea:c},f={xID:a,props:t,context:e,reactData:l,getRefMaps:function(){return u}},d={},h=_e(function(){return E.getSize(l.inputValue)}),p=_e(function(){var _=h.value;return t.maxlength&&_>E.toNumber(t.maxlength)}),v=_e(function(){return Object.assign({minRows:1,maxRows:10},H.textarea.autosize,t.autosize)}),g=function(){var _=t.size,k=t.autosize,L=l.inputValue;if(k){xa||(xa=document.createElement("div")),xa.parentNode||document.body.appendChild(xa);var P=c.value,W=getComputedStyle(P);xa.className=["vxe-textarea--autosize",_?"size--".concat(_):""].join(" "),xa.style.width="".concat(P.clientWidth,"px"),xa.style.padding=W.padding,xa.innerHTML=(""+(L||" ")).replace(/\n$/,`
 `)}},m=function(){t.autosize&&Ie(function(){var _=v.value,k=_.minRows,L=_.maxRows,P=c.value,W=xa.clientHeight,q=getComputedStyle(P),V=E.toNumber(q.lineHeight),G=E.toNumber(q.paddingTop),pe=E.toNumber(q.paddingBottom),J=E.toNumber(q.borderTopWidth),N=E.toNumber(q.borderBottomWidth),Z=G+pe+J+N,le=(W-Z)/V,ye=le&&/[0-9]/.test(""+le)?le:Math.floor(le)+1,me=ye;ye<k?me=k:ye>L&&(me=L),P.style.height="".concat(me*V+Z,"px")})},b=function(_){var k=l.inputValue;f.dispatchEvent(_.type,{value:k},_)},x=function(_,k){l.inputValue=_,r("update:modelValue",_),E.toValueString(t.modelValue)!==_&&(d.dispatchEvent("change",{value:_},k),n&&i&&n.triggerItemEvent(k,i.itemConfig.field,_))},T=function(_){var k=t.immediate,L=_.target,P=L.value;l.inputValue=P,k&&x(P,_),f.dispatchEvent("input",{value:P},_),m()},A=function(_){var k=t.immediate;k?b(_):x(l.inputValue,_)},O=function(_){var k=t.immediate,L=l.inputValue;k||x(L,_),f.dispatchEvent("blur",{value:L},_)};d={dispatchEvent:function(_,k,L){r(_,Object.assign({$textarea:f,$event:L},k))},focus:function(){var _=c.value;return _.focus(),Ie()},blur:function(){var _=c.value;return _.blur(),Ie()}},Object.assign(f,d),st(function(){return t.modelValue},function(_){l.inputValue=_,g()}),Ie(function(){var _=t.autosize;_&&(g(),m())});var I=function(){var _,k=t.className,L=t.resize,P=t.placeholder,W=t.disabled,q=t.maxlength,V=t.autosize,G=t.showWordCount,pe=t.countMethod,J=t.rows,N=t.cols,Z=l.inputValue,le=o.value,ye=p.value,me=h.value;return D("div",{ref:s,class:["vxe-textarea",k,(_={},_["size--".concat(le)]=le,_["is--autosize"]=V,_["is--count"]=G,_["is--disabled"]=W,_["def--rows"]=!E.eqNull(J),_["def--cols"]=!E.eqNull(N),_)]},[D("textarea",{ref:c,class:"vxe-textarea--inner",value:Z,name:t.name,placeholder:P?Ar(P):null,maxlength:q,readonly:t.readonly,disabled:W,rows:J,cols:N,style:L?{resize:L}:null,onInput:T,onChange:A,onKeydown:b,onKeyup:b,onClick:b,onFocus:b,onBlur:O}),G?D("span",{class:["vxe-textarea--count",{"is--error":ye}]},pe?"".concat(pe({value:Z})):"".concat(me).concat(q?"/".concat(q):"")):null])};return f.renderVN=I,f},render:function(){return this.renderVN()}});var i0=Object.assign(Fc,{install:function(t){t.component(Fc.name,Fc)}}),AG=i0;Kt.component(Fc.name,Fc);var a0=Object.assign($i,{install:function(t){t.component($i.name,$i)}}),EG=a0;Kt.component($i.name,$i);var Pc=globalThis&&globalThis.__assign||function(){return Pc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Pc.apply(this,arguments)};function LI(t){return I7(),new Promise(function(e){if(t&&t.id&&os.some(function(i){return i.props.id===t.id}))e("exist");else{var r=t.onHide,n=Object.assign(t,{key:E.uniqueId(),modelValue:!0,onHide:function(i){var a=Lf.modals;r&&r(i),Lf.modals=a.filter(function(o){return o.key!==n.key}),e(i.type)}});Lf.modals.push(n)}})}function DI(t){return E.find(os,function(e){return e.props.id===t})}function TG(t){var e=t?[DI(t)]:os,r=[];return e.forEach(function(n){n&&r.push(n.close())}),Promise.all(r)}function o0(t,e,r,n){var i;return E.isObject(e)?i=e:i={content:E.toValueString(e),title:r},LI(Pc(Pc(Pc({},t),n),i))}function SG(t,e,r){return o0({type:"alert",showFooter:!0},t,e,r)}function wG(t,e,r){return o0({type:"confirm",status:"question",showFooter:!0},t,e,r)}function CG(t,e){return o0({type:"message",mask:!1,lockView:!1,showHeader:!1},t,"",e)}var OI={get:DI,close:TG,open:LI,alert:SG,confirm:wG,message:CG},IG=OI,s0=Object.assign(ps,{install:function(t){t.component(ps.name,ps),ot.modal=OI}}),_G=s0;Kt.component(ps.name,ps);var zv=globalThis&&globalThis.__assign||function(){return zv=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zv.apply(this,arguments)},RG=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))};const Nc=xt({name:"VxeTooltip",props:{modelValue:Boolean,size:{type:String,default:function(){return H.tooltip.size||H.size}},trigger:{type:String,default:function(){return H.tooltip.trigger}},theme:{type:String,default:function(){return H.tooltip.theme}},content:{type:[String,Number],default:null},useHTML:Boolean,zIndex:[String,Number],popupClassName:[String,Function],isArrow:{type:Boolean,default:!0},enterable:Boolean,enterDelay:{type:Number,default:function(){return H.tooltip.enterDelay}},leaveDelay:{type:Number,default:function(){return H.tooltip.leaveDelay}}},emits:["update:modelValue"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=Jt({target:null,isUpdate:!1,visible:!1,tipContent:"",tipActive:!1,tipTarget:null,tipZindex:0,tipStore:{style:{},placement:"",arrowStyle:{}}}),l=je(),s={refElem:l},c={xID:i,props:t,context:e,reactData:o,getRefMaps:function(){return s}},u={},f=function(){var I=o.tipTarget,_=o.tipStore;if(I){var k=go(),L=k.scrollTop,P=k.scrollLeft,W=k.visibleWidth,q=Ia(I),V=q.top,G=q.left,pe=l.value,J=6,N=pe.offsetHeight,Z=pe.offsetWidth,le=G,ye=V-N-J;le=Math.max(J,G+Math.floor((I.offsetWidth-Z)/2)),le+Z+J>P+W&&(le=P+W-Z-J),V-N<L+J&&(_.placement="bottom",ye=V+I.offsetHeight+J),_.style.top="".concat(ye,"px"),_.style.left="".concat(le,"px"),_.arrowStyle.left="".concat(G-le+I.offsetWidth/2,"px")}},d=function(I){I!==o.visible&&(o.visible=I,o.isUpdate=!0,n("update:modelValue",I))},h=function(){o.tipZindex<Ba()&&(o.tipZindex=sa())},p=function(){o.visible?u.close():u.open()},v=function(){u.open()},g=function(){var I=t.trigger,_=t.enterable,k=t.leaveDelay;o.tipActive=!1,_&&I==="hover"?setTimeout(function(){o.tipActive||u.close()},k):u.close()},m=function(){o.tipActive=!0},b=function(){var I=t.trigger,_=t.enterable,k=t.leaveDelay;o.tipActive=!1,_&&I==="hover"&&setTimeout(function(){o.tipActive||u.close()},k)},x=function(){var I=o.tipStore,_=l.value;if(_){var k=_.parentNode;k||document.body.appendChild(_)}return d(!0),h(),I.placement="top",I.style={width:"auto",left:0,top:0,zIndex:t.zIndex||o.tipZindex},I.arrowStyle={left:"50%"},u.updatePlacement()},T=E.debounce(function(){o.tipActive&&x()},t.enterDelay,{leading:!1,trailing:!0});u={dispatchEvent:function(I,_,k){n(I,Object.assign({$tooltip:c,$event:k},_))},open:function(I,_){return u.toVisible(I||o.target,_)},close:function(){return o.tipTarget=null,o.tipActive=!1,Object.assign(o.tipStore,{style:{},placement:"",arrowStyle:null}),d(!1),Ie()},toVisible:function(I,_){if(I){var k=t.trigger,L=t.enterDelay;if(o.tipActive=!0,o.tipTarget=I,_&&(o.tipContent=_),L&&k==="hover")T();else return x()}return Ie()},updatePlacement:function(){return Ie().then(function(){var I=o.tipTarget,_=l.value;if(I&&_)return f(),Ie().then(f)})},isActived:function(){return o.tipActive},setActived:function(I){o.tipActive=!!I}},Object.assign(c,u),st(function(){return t.content},function(){o.tipContent=t.content}),st(function(){return t.modelValue},function(){o.isUpdate||(t.modelValue?u.open():u.close()),o.isUpdate=!1}),Er(function(){Ie(function(){var I=t.trigger,_=t.content,k=t.modelValue,L=l.value,P=L.parentNode;if(P){o.tipContent=_,o.tipZindex=sa(),E.arrayEach(L.children,function(q,V){V>1&&(P.insertBefore(q,L),o.target||(o.target=q))}),P.removeChild(L);var W=o.target;W&&(I==="hover"?(W.onmouseenter=v,W.onmouseleave=g):I==="click"&&(W.onclick=p)),k&&u.open()}})}),Rl(function(){var I=t.trigger,_=o.target,k=l.value;if(k){var L=k.parentNode;L&&L.removeChild(k)}_&&(I==="hover"?(_.onmouseenter=null,_.onmouseleave=null):I==="click"&&(_.onclick=null))});var A=function(){var I=t.useHTML,_=o.tipContent,k=r.content;return k?D("div",{key:1,class:"vxe-table--tooltip-content"},pr(k({}))):I?D("div",{key:2,class:"vxe-table--tooltip-content",innerHTML:_}):D("div",{key:3,class:"vxe-table--tooltip-content"},Mr(_))},O=function(){var I,_=t.popupClassName,k=t.theme,L=t.isArrow,P=t.enterable,W=o.tipActive,q=o.visible,V=o.tipStore,G=r.default,pe=a.value,J;return P&&(J={onMouseenter:m,onMouseleave:b}),D("div",zv({ref:l,class:["vxe-table--tooltip-wrapper","theme--".concat(k),_?E.isFunction(_)?_({$tooltip:c}):_:"",(I={},I["size--".concat(pe)]=pe,I["placement--".concat(V.placement)]=V.placement,I["is--enterable"]=P,I["is--visible"]=q,I["is--arrow"]=L,I["is--actived"]=W,I)],style:V.style},J),RG([A(),D("div",{class:"vxe-table--tooltip-arrow",style:V.arrowStyle})],G?pr(G({})):[],!0))};return c.renderVN=O,c},render:function(){return this.renderVN()}});var l0=Object.assign(Nc,{install:function(t){ot.tooltip=!0,t.component(Nc.name,Nc)}}),LG=l0;Kt.component(Nc.name,Nc);var kI=function(){function t(e,r){Object.assign(this,{id:E.uniqueId("item_"),title:r.title,field:r.field,span:r.span,align:r.align,titleAlign:r.titleAlign,titleWidth:r.titleWidth,titleColon:r.titleColon,titleAsterisk:r.titleAsterisk,titlePrefix:r.titlePrefix,titleSuffix:r.titleSuffix,titleOverflow:r.titleOverflow,showTitle:r.showTitle,resetValue:r.resetValue,visibleMethod:r.visibleMethod,visible:r.visible,folding:r.folding,collapseNode:r.collapseNode,className:r.className,contentClassName:r.contentClassName,contentStyle:r.contentStyle,titleClassName:r.titleClassName,titleStyle:r.titleStyle,itemRender:r.itemRender,showError:!1,errRule:null,slots:r.slots,children:[]})}return t.prototype.update=function(e,r){this[e]=r},t}();function DG(t){return t instanceof kI}function c0(t,e){return DG(e)?e:new kI(t,e)}function UA(t,e){return e?E.isString(e)?t.getItemByField(e):e:null}function OG(t,e){var r=t.reactData,n=r.collapseAll,i=e.folding,a=e.visible;return a===!1||i&&n}function u0(t,e){var r=e.visibleMethod,n=e.itemRender,i=e.visible,a=e.field;if(i===!1)return i;var o=wt(n)?ot.renderer.get(n.name):null;if(!r&&o&&o.itemVisibleMethod&&(r=o.itemVisibleMethod),!r)return!0;var l=t.props.data;return r({data:l,field:a,property:a,item:e,$form:t,$grid:t.xegrid})}function MI(t,e){Object.keys(t).forEach(function(r){st(function(){return t[r]},function(n){e.update(r,n)})})}function FI(t,e,r,n){var i=t.reactData,a=i.staticItems,o=e.parentNode,l=n?n.formItem:null,s=l?l.children:a;o&&(s.splice(E.arrayIndexOf(o.children,e),0,r),i.staticItems=a.slice(0))}function PI(t,e){var r=t.reactData,n=r.staticItems,i=E.findIndexOf(n,function(a){return a.id===e.id});i>-1&&n.splice(i,1),r.staticItems=n.slice(0)}var so=globalThis&&globalThis.__assign||function(){return so=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},so.apply(this,arguments)};function HA(t){return D("span",{class:"vxe-form--item-title-prefix"},[D("i",{class:t.icon||H.icon.FORM_PREFIX})])}function VA(t){return D("span",{class:"vxe-form--item-title-suffix"},[D("i",{class:t.icon||H.icon.FORM_SUFFIX})])}function NI(t,e){var r=t.props.data,n=t.getComputeMaps().computeTooltipOpts,i=e.slots,a=e.field,o=e.itemRender,l=e.titlePrefix,s=e.titleSuffix,c=n.value,u=wt(o)?ot.renderer.get(o.name):null,f={data:r,field:a,property:a,item:e,$form:t,$grid:t.xegrid},d=i?i.title:null,h=[],p=[];l&&p.push(l.content||l.message?D(nr("vxe-tooltip"),so(so(so({},c),l),{content:Ar(l.content||l.message)}),{default:function(){return HA(l)}}):HA(l)),p.push(D("span",{class:"vxe-form--item-title-label"},u&&u.renderItemTitle?pr(u.renderItemTitle(o,f)):d?t.callSlot(d,f):Ar(e.title))),h.push(D("div",{class:"vxe-form--item-title-content"},p));var v=[];return s&&v.push(s.content||s.message?D(nr("vxe-tooltip"),so(so(so({},c),s),{content:Ar(s.content||s.message)}),{default:function(){return VA(s)}}):VA(s)),h.push(D("div",{class:"vxe-form--item-title-postfix"},v)),h}var Kv=globalThis&&globalThis.__assign||function(){return Kv=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Kv.apply(this,arguments)},$I=xt({name:"VxeFormConfigItem",props:{itemConfig:Object},setup:function(t){var e=ct("$xeform",{}),r={itemConfig:t.itemConfig};sr("$xeformiteminfo",r),sr("$xeformgather",null);var n=function(){var a=e.reactData,o=e.props,l=o.data,s=o.rules,c=o.span,u=o.align,f=o.titleAlign,d=o.titleWidth,h=o.titleColon,p=o.titleAsterisk,v=o.titleOverflow,g=o.vertical,m=e.getComputeMaps().computeValidOpts,b=t.itemConfig,x=a.collapseAll,T=m.value,A=b.slots,O=b.title,I=b.visible,_=b.folding,k=b.field,L=b.collapseNode,P=b.itemRender,W=b.showError,q=b.errRule,V=b.className,G=b.titleOverflow,pe=b.vertical,J=b.children,N=b.showTitle,Z=b.contentClassName,le=b.contentStyle,ye=b.titleClassName,me=b.titleStyle,Re=wt(P)?ot.renderer.get(P.name):null,be=Re?Re.itemClassName:"",Ce=Re?Re.itemStyle:null,we=Re?Re.itemContentClassName:"",ce=Re?Re.itemContentStyle:null,re=Re?Re.itemTitleClassName:"",ve=Re?Re.itemTitleStyle:null,Te=A?A.default:null,Pe=A?A.title:null,B=b.span||c,w=b.align||u,C=E.eqNull(b.titleAlign)?f:b.titleAlign,j=E.eqNull(b.titleWidth)?d:b.titleWidth,ie=E.eqNull(b.titleColon)?h:b.titleColon,ne=E.eqNull(b.titleAsterisk)?p:b.titleAsterisk,X=E.isUndefined(G)||E.isNull(G)?v:G,ee=E.isUndefined(pe)||E.isNull(pe)?g:pe,de=X==="ellipsis",oe=X==="title",te=X===!0||X==="tooltip",he=oe||te||de,ke={data:l,field:k,property:k,item:b,$form:e,$grid:e.xegrid};if(I===!1)return $t();var se=!1;if(s){var ue=s[k];ue&&(se=ue.some(function(Se){return Se.required}))}var xe=J&&J.length>0;if(xe){var De=J.map(function(Se,$e){return D($I,{key:$e,itemConfig:Se})});return De.length?D("div",{class:["vxe-form--gather vxe-row",b.id,B?"vxe-col--".concat(B," is--span"):"",V?E.isFunction(V)?V(ke):V:""]},De):$t()}var U=[];Te?U=e.callSlot(Te,ke):Re&&Re.renderItemContent?U=pr(Re.renderItemContent(P,ke)):k&&(U=[E.toValueString(E.get(l,k))]),L&&U.push(D("div",{class:"vxe-form--item-trigger-node",onClick:e.toggleCollapseEvent},[D("span",{class:"vxe-form--item-trigger-text"},x?H.i18n("vxe.form.unfolding"):H.i18n("vxe.form.folding")),D("i",{class:["vxe-form--item-trigger-icon",x?H.icon.FORM_FOLDING:H.icon.FORM_UNFOLDING]})])),q&&T.showMessage&&U.push(D("div",{class:"vxe-form--item-valid",style:q.maxWidth?{width:"".concat(q.maxWidth,"px")}:null},q.content));var ge=te?{onMouseenter:function(Se){e.triggerTitleTipEvent(Se,ke)},onMouseleave:e.handleTitleTipLeaveEvent}:{};return D("div",{class:["vxe-form--item",b.id,B?"vxe-col--".concat(B," is--span"):"",V?E.isFunction(V)?V(ke):V:"",be?E.isFunction(be)?be(ke):be:"",{"is--title":O,"is--colon":ie,"is--vertical":ee,"is--asterisk":ne,"is--required":se,"is--hidden":_&&x,"is--active":u0(e,b),"is--error":W}],style:E.isFunction(Ce)?Ce(ke):Ce},[D("div",{class:"vxe-form--item-inner"},[N!==!1&&(O||Pe)?D("div",Kv({class:["vxe-form--item-title",C?"align--".concat(C):"",he?"is--ellipsis":"",re?E.isFunction(re)?re(ke):re:"",ye?E.isFunction(ye)?ye(ke):ye:""],style:Object.assign({},E.isFunction(ve)?ve(ke):ve,E.isFunction(me)?me(ke):me,j?{width:isNaN(j)?j:"".concat(j,"px")}:null),title:oe?Ar(O):null},ge),NI(e,b)):null,D("div",{class:["vxe-form--item-content",w?"align--".concat(w):"",we?E.isFunction(we)?we(ke):we:"",Z?E.isFunction(Z)?Z(ke):Z:""],style:Object.assign({},E.isFunction(ce)?ce(ke):ce,E.isFunction(le)?le(ke):le)},U)])])},i={renderVN:n};return i},render:function(){return this.renderVN()}}),Yv=globalThis&&globalThis.__assign||function(){return Yv=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yv.apply(this,arguments)},sc=function(){function t(e){Object.assign(this,{$options:e,required:e.required,min:e.min,max:e.min,type:e.type,pattern:e.pattern,validator:e.validator,trigger:e.trigger,maxWidth:e.maxWidth})}return Object.defineProperty(t.prototype,"content",{get:function(){return Ar(this.$options.content||this.$options.message)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.content},enumerable:!1,configurable:!0}),t}(),jA=function(t,e){var r=t.type,n=t.min,i=t.max,a=t.pattern,o=r==="number",l=o?E.toNumber(e):E.getSize(e);return!!(o&&isNaN(e)||!E.eqNull(n)&&l<E.toNumber(n)||!E.eqNull(i)&&l>E.toNumber(i)||a&&!(E.isRegExp(a)?a:new RegExp(a)).test(e))};function kG(t,e){return E.isArray(t)&&(e=[]),e}const $c=xt({name:"VxeForm",props:{collapseStatus:{type:Boolean,default:!0},loading:Boolean,data:Object,size:{type:String,default:function(){return H.form.size||H.size}},span:{type:[String,Number],default:function(){return H.form.span}},align:{type:String,default:function(){return H.form.align}},titleAlign:{type:String,default:function(){return H.form.titleAlign}},titleWidth:{type:[String,Number],default:function(){return H.form.titleWidth}},titleColon:{type:Boolean,default:function(){return H.form.titleColon}},titleAsterisk:{type:Boolean,default:function(){return H.form.titleAsterisk}},titleOverflow:{type:[Boolean,String],default:null},vertical:{type:Boolean,default:null},className:[String,Function],readonly:Boolean,items:Array,rules:Object,preventSubmit:{type:Boolean,default:function(){return H.form.preventSubmit}},validConfig:Object,tooltipConfig:Object,customLayout:{type:Boolean,default:function(){return H.form.customLayout}}},emits:["update:collapseStatus","collapse","toggle-collapse","submit","submit-invalid","reset"],setup:function(t,e){var r=ot.tooltip,n=e.slots,i=e.emit,a=E.uniqueId(),o=qr(t),l=Jt({collapseAll:t.collapseStatus,staticItems:[],formItems:[]}),s=Jt({tooltipTimeout:null,tooltipStore:{item:null,visible:!1}}),c=ct("$xegrid",null),u=je(),f=je(),d={},h=_e(function(){return Object.assign({},H.form.validConfig,t.validConfig)}),p=_e(function(){return Object.assign({},H.tooltip,H.form.tooltipConfig,t.tooltipConfig)}),v={refElem:u},g={computeSize:o,computeValidOpts:h,computeTooltipOpts:p},m={xID:a,props:t,context:e,reactData:l,xegrid:c,getRefMaps:function(){return v},getComputeMaps:function(){return g}},b=function(re,ve){return re&&(E.isString(re)&&(re=n[re]||null),E.isFunction(re))?pr(re(ve)):[]},x=function(re){return re.length&&(l.staticItems=E.mapTree(re,function(ve){return c0(m,ve)},{children:"children"})),Ie()},T=function(){var re=[];return E.eachTree(l.formItems,function(ve){re.push(ve)},{children:"children"}),re},A=function(re){var ve=E.findTree(l.formItems,function(Te){return Te.field===re},{children:"children"});return ve?ve.item:null},O=function(){return l.collapseAll},I=function(){var re=!O();return l.collapseAll=re,i("update:collapseStatus",re),Ie()},_=function(re){I();var ve=O();d.dispatchEvent("toggle-collapse",{status:ve,collapse:ve,data:t.data},re),d.dispatchEvent("collapse",{status:ve,collapse:ve,data:t.data},re)},k=function(re){if(re){var ve=re;E.isArray(re)||(ve=[re]),ve.forEach(function(Te){if(Te){var Pe=UA(m,Te);Pe&&(Pe.showError=!1)}})}else T().forEach(function(Te){Te.showError=!1});return Ie()},L=function(){var re=t.data,ve=T();return re&&ve.forEach(function(Te){var Pe=Te.field,B=Te.resetValue,w=Te.itemRender;if(wt(w)){var C=ot.renderer.get(w.name);C&&C.itemResetMethod?C.itemResetMethod({data:re,field:Pe,property:Pe,item:Te,$form:m,$grid:m.xegrid}):Pe&&E.set(re,Pe,B===null?kG(E.get(re,Pe),void 0):E.clone(B,!0))}}),k()},P=function(re){re.preventDefault(),L(),d.dispatchEvent("reset",{data:t.data},re)},W=function(re){for(var ve=u.value,Te=0;Te<re.length;Te++){var Pe=re[Te],B=A(Pe);if(B&&wt(B.itemRender)){var w=B.itemRender,C=ot.renderer.get(w.name),j=null;if(Te||YC(ve.querySelector(".".concat(B.id))),w.autofocus&&(j=ve.querySelector(".".concat(B.id," ").concat(w.autofocus))),!j&&C&&C.autofocus&&(j=ve.querySelector(".".concat(B.id," ").concat(C.autofocus))),j){j.focus();break}}}},q=function(re,ve,Te){var Pe=t.data,B=t.rules,w={};return E.isArray(ve)||(ve=[ve]),Promise.all(ve.map(function(C){var j=[],ie=[];if(C&&B){var ne=E.get(B,C);if(ne){var X=E.isUndefined(Te)?E.get(Pe,C):Te;ne.forEach(function(ee){var de=ee.type,oe=ee.trigger,te=ee.required,he=ee.validator;if(re==="all"||!oe||re===oe)if(he){var ke={itemValue:X,rule:ee,rules:ne,data:Pe,field:C,property:C,$form:m},se=void 0;if(E.isString(he)){var ue=ot.validators.get(he);ue&&ue.itemValidatorMethod&&(se=ue.itemValidatorMethod(ke))}else se=he(ke);se&&(E.isError(se)?j.push(new sc({type:"custom",trigger:oe,content:se.message,rule:new sc(ee)})):se.catch&&ie.push(se.catch(function(ge){j.push(new sc({type:"custom",trigger:oe,content:ge?ge.message:ee.content||ee.message,rule:new sc(ee)}))})))}else{var xe=de==="array",De=E.isArray(X),U=!0;xe||De?U=!De||!X.length:E.isString(X)?U=Oi(X.trim()):U=Oi(X),(te?U||jA(ee,X):!U&&jA(ee,X))&&j.push(new sc(ee))}})}}return Promise.all(ie).then(function(){j.length&&(w[C]=j.map(function(ee){return{$form:m,rule:ee,data:Pe,field:C,property:C}}))})})).then(function(){if(!E.isEmpty(w))return Promise.reject(w)})},V,G=function(re,ve,Te){var Pe=t.data,B=t.rules,w=h.value,C={},j=[],ie=[];return clearTimeout(V),Pe&&B?(re.forEach(function(ne){var X=ne.field;X&&!OG(m,ne)&&u0(m,ne)&&ie.push(q(ve||"all",X).then(function(){ne.errRule=null}).catch(function(ee){var de=ee[X];return C[X]||(C[X]=[]),C[X].push(de),j.push(X),ne.errRule=de[0].rule,Promise.reject(de)}))}),Promise.all(ie).then(function(){Te&&Te()}).catch(function(){return new Promise(function(ne){V=window.setTimeout(function(){re.forEach(function(X){X.errRule&&(X.showError=!0)})},20),w.autoPos!==!1&&Ie(function(){W(j)}),Te?(Te(C),ne()):ne(C)})})):(Te&&Te(),Promise.resolve())},pe=function(re){return k(),G(T(),"",re)},J=function(re,ve){var Te=[];return E.isArray(re)?Te=re:Te=[re],G(Te.map(function(Pe){return UA(m,Pe)}),"",ve)},N=function(re){re.preventDefault(),t.preventSubmit||(k(),G(T()).then(function(ve){ve?d.dispatchEvent("submit-invalid",{data:t.data,errMap:ve},re):d.dispatchEvent("submit",{data:t.data},re)}))},Z=function(){var re=s.tooltipStore,ve=f.value;return re.visible&&(Object.assign(re,{item:null,visible:!1}),ve&&ve.close()),Ie()},le=function(re,ve){var Te=ve.item,Pe=s.tooltipStore,B=f.value,w=re.currentTarget.children[0],C=(w.textContent||"").trim(),j=w.scrollWidth>w.clientWidth;clearTimeout(s.tooltipTimeout),Pe.item!==Te&&Z(),C&&j&&(Object.assign(Pe,{item:Te,visible:!0}),B&&B.open(w,C))},ye=function(){var re=p.value,ve=f.value;ve&&ve.setActived(!1),re.enterable?s.tooltipTimeout=setTimeout(function(){ve=f.value,ve&&!ve.isActived()&&Z()},re.leaveDelay):Z()},me=function(re,ve,Te){return ve?q(re?["blur"].includes(re.type)?"blur":"change":"all",ve,Te).then(function(){k(ve)}).catch(function(Pe){var B=Pe[ve],w=A(ve);B&&w&&(w.showError=!0,w.errRule=B[0].rule)}):Ie()},Re=function(re,ve){var Te=re.field;return me(new Event("change"),Te,ve)};d={dispatchEvent:function(re,ve,Te){i(re,Object.assign({$form:m,$grid:c,$event:Te},ve))},reset:L,validate:pe,validateField:J,clearValidate:k,updateStatus:Re,toggleCollapse:I,getItems:T,getItemByField:A,closeTooltip:Z};var be={callSlot:b,triggerItemEvent:me,toggleCollapseEvent:_,triggerTitleTipEvent:le,handleTitleTipLeaveEvent:ye};Object.assign(m,d,be);var Ce=je(0);st(function(){return l.staticItems.length},function(){Ce.value++}),st(function(){return l.staticItems},function(){Ce.value++}),st(Ce,function(){l.formItems=l.staticItems});var we=je(0);st(function(){return t.items?t.items.length:-1},function(){we.value++}),st(function(){return t.items},function(){we.value++}),st(we,function(){x(t.items||[])}),st(function(){return t.collapseStatus},function(re){l.collapseAll=!!re}),Er(function(){Ie(function(){x(t.items||[])})});var ce=function(){var re,ve=t.loading,Te=t.className,Pe=t.data,B=t.customLayout,w=l.formItems,C=o.value,j=p.value,ie=n.default;return D("form",{ref:u,class:["vxe-form",Te?E.isFunction(Te)?Te({items:w,data:Pe,$form:m}):Te:"",(re={},re["size--".concat(C)]=C,re["is--loading"]=ve,re)],onSubmit:N,onReset:P},[D("div",{class:"vxe-form--wrapper vxe-row"},B?ie?ie({}):[]:w.map(function(ne,X){return D($I,{key:X,itemConfig:ne})})),D("div",{class:"vxe-form-slots",ref:"hideItem"},B?[]:ie?ie({}):[]),D(Jd,{class:"vxe-form--loading",modelValue:ve}),r?D(nr("vxe-tooltip"),Yv({ref:f},j)):$t()])};return m.renderVN=ce,sr("$xeform",m),sr("$xeformgather",null),sr("$xeformitem",null),sr("$xeformiteminfo",null),m},render:function(){return this.renderVN()}});var f0=Object.assign($c,{install:function(t){t.component($c.name,$c)}}),MG=f0;Kt.component($c.name,$c);var qv=globalThis&&globalThis.__assign||function(){return qv=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},qv.apply(this,arguments)},BI={title:String,field:String,span:[String,Number],align:String,titleAlign:{type:String,default:null},titleWidth:{type:[String,Number],default:null},titleColon:{type:Boolean,default:null},titleAsterisk:{type:Boolean,default:null},showTitle:{type:Boolean,default:!0},vertical:{type:Boolean,default:null},className:[String,Function],contentClassName:[String,Function],contentStyle:[Object,Function],titleClassName:[String,Function],titleStyle:[Object,Function],titleOverflow:{type:[Boolean,String],default:null},titlePrefix:Object,titleSuffix:Object,resetValue:{default:null},visibleMethod:Function,visible:{type:Boolean,default:null},folding:Boolean,collapseNode:Boolean,itemRender:Object};const Bc=xt({name:"VxeFormItem",props:BI,setup:function(t,e){var r=e.slots,n=je(),i=ct("$xeform",{}),a=ct("$xeformgather",null),o=Jt(c0(i,t)),l={formItem:o},s={itemConfig:o};o.slots=r,sr("$xeformiteminfo",s),sr("$xeformitem",l),sr("$xeformgather",null),MI(t,o),Er(function(){FI(i,n.value,o,a)}),Rr(function(){PI(i,o)});var c=function(d,h){var p=d.props,v=d.reactData,g=p.data,m=p.rules,b=p.titleAlign,x=p.titleWidth,T=p.titleColon,A=p.titleAsterisk,O=p.titleOverflow,I=p.vertical,_=v.collapseAll,k=d.getComputeMaps().computeValidOpts,L=k.value,P=h.slots,W=h.title,q=h.visible,V=h.folding,G=h.field,pe=h.collapseNode,J=h.itemRender,N=h.showError,Z=h.errRule,le=h.className,ye=h.titleOverflow,me=h.vertical,Re=h.showTitle,be=h.contentClassName,Ce=h.contentStyle,we=h.titleClassName,ce=h.titleStyle,re=wt(J)?ot.renderer.get(J.name):null,ve=re?re.itemClassName:"",Te=re?re.itemStyle:null,Pe=re?re.itemContentClassName:"",B=re?re.itemContentStyle:null,w=re?re.itemTitleClassName:"",C=re?re.itemTitleStyle:null,j=P?P.default:null,ie=P?P.title:null,ne=h.span||p.span,X=h.align||p.align,ee=E.eqNull(h.titleAlign)?b:h.titleAlign,de=E.eqNull(h.titleWidth)?x:h.titleWidth,oe=E.eqNull(h.titleColon)?T:h.titleColon,te=E.eqNull(h.titleAsterisk)?A:h.titleAsterisk,he=E.isUndefined(ye)||E.isNull(ye)?O:ye,ke=E.isUndefined(me)||E.isNull(me)?I:me,se=he==="ellipsis",ue=he==="title",xe=he===!0||he==="tooltip",De=ue||xe||se,U={data:g,field:G,property:G,item:h,$form:d,$grid:d.xegrid},ge=!1;if(q===!1)return $t();if(m){var Se=m[G];Se&&(ge=Se.some(function(We){return We.required}))}var $e=[];j?$e=d.callSlot(j,U):re&&re.renderItemContent?$e=pr(re.renderItemContent(J,U)):G&&($e=["".concat(E.get(g,G))]),pe&&$e.push(D("div",{class:"vxe-form--item-trigger-node",onClick:d.toggleCollapseEvent},[D("span",{class:"vxe-form--item-trigger-text"},_?H.i18n("vxe.form.unfolding"):H.i18n("vxe.form.folding")),D("i",{class:["vxe-form--item-trigger-icon",_?H.icon.FORM_FOLDING:H.icon.FORM_UNFOLDING]})])),Z&&L.showMessage&&$e.push(D("div",{class:"vxe-form--item-valid",style:Z.maxWidth?{width:"".concat(Z.maxWidth,"px")}:null},Z.message));var Ue=xe?{onMouseenter:function(We){d.triggerTitleTipEvent(We,U)},onMouseleave:d.handleTitleTipLeaveEvent}:{};return D("div",{ref:n,class:["vxe-form--item",h.id,ne?"vxe-col--".concat(ne," is--span"):"",le?E.isFunction(le)?le(U):le:"",ve?E.isFunction(ve)?ve(U):ve:"",{"is--title":W,"is--colon":oe,"is--vertical":ke,"is--asterisk":te,"is--required":ge,"is--hidden":V&&_,"is--active":u0(d,h),"is--error":N}],style:E.isFunction(Te)?Te(U):Te},[D("div",{class:"vxe-form--item-inner"},[Re!==!1&&(W||ie)?D("div",qv({class:["vxe-form--item-title",ee?"align--".concat(ee):"",De?"is--ellipsis":"",w?E.isFunction(w)?w(U):w:"",we?E.isFunction(we)?we(U):we:""],style:Object.assign({},E.isFunction(C)?C(U):C,E.isFunction(ce)?ce(U):ce,de?{width:isNaN(de)?de:"".concat(de,"px")}:null),title:ue?Ar(W):null},Ue),NI(d,h)):null,D("div",{class:["vxe-form--item-content",X?"align--".concat(X):"",Pe?E.isFunction(Pe)?Pe(U):Pe:"",be?E.isFunction(be)?be(U):be:""],style:Object.assign({},E.isFunction(B)?B(U):B,E.isFunction(Ce)?Ce(U):Ce)},$e)])])},u=function(){var d=i?i.props:null;return d&&d.customLayout?c(i,o):D("div",{ref:n})},f={renderVN:u};return f},render:function(){return this.renderVN()}});var d0=Object.assign(Bc,{install:function(t){t.component(Bc.name,Bc)}}),FG=d0;Kt.component(Bc.name,Bc);const Uc=xt({name:"VxeFormGather",props:BI,setup:function(t,e){var r=e.slots,n=je(),i=ct("$xeform",{}),a=ct("$xeformgather",null),o=r.default,l=Jt(c0(i,t)),s={formItem:l},c={itemConfig:l};l.children=[],sr("$xeformiteminfo",c),sr("$xeformgather",s),sr("$xeformitem",null),MI(t,l),Er(function(){FI(i,n.value,l,a)}),Rr(function(){PI(i,l)});var u=function(){return D("div",{ref:n},o?o():[])},f={renderVN:u};return f},render:function(){return this.renderVN()}});var h0=Object.assign(Uc,{install:function(t){t.component(Uc.name,Uc)}}),PG=h0;Kt.component(Uc.name,Uc);var p0=Object.assign(vs,{install:function(t){t.component(vs.name,vs)}}),NG=p0;Kt.component(vs.name,vs);var UI=function(){function t(e,r){Object.assign(this,{id:E.uniqueId("option_"),value:r.value,label:r.label,visible:r.visible,className:r.className,disabled:r.disabled})}return t.prototype.update=function(e,r){this[e]=r},t}();function $G(t){return t instanceof UI}function HI(t,e){return $G(e)?e:new UI(t,e)}function VI(t,e){Object.keys(t).forEach(function(r){st(function(){return t[r]},function(n){e.update(r,n)})})}function jI(t,e,r,n){var i=t.reactData,a=i.staticOptions,o=e.parentNode,l=n?n.option:null,s=l?l.options:a;o&&s&&(s.splice(E.arrayIndexOf(o.children,e),0,r),i.staticOptions=a.slice(0))}function WI(t,e){var r=t.reactData,n=r.staticOptions,i=E.findTree(n,function(a){return a.id===e.id},{children:"options"});i&&i.items.splice(i.index,1),r.staticOptions=n.slice(0)}const Hc=xt({name:"VxeOptgroup",props:{label:{type:[String,Number,Boolean],default:""},visible:{type:Boolean,default:null},className:[String,Function],disabled:Boolean},setup:function(t,e){var r=e.slots,n=je(),i=ct("$xeselect",{}),a=HI(i,t),o={option:a};return a.options=[],sr("xeoptgroup",o),VI(t,a),Er(function(){jI(i,n.value,a)}),Rr(function(){WI(i,a)}),function(){return D("div",{ref:n},r.default?r.default():[])}}});var v0=Object.assign(Hc,{install:function(t){t.component(Hc.name,Hc)}}),BG=v0;Kt.component(Hc.name,Hc);const Vc=xt({name:"VxeOption",props:{value:null,label:{type:[String,Number,Boolean],default:""},visible:{type:Boolean,default:null},className:[String,Function],disabled:Boolean},setup:function(t,e){var r=e.slots,n=je(),i=ct("$xeselect",{}),a=ct("xeoptgroup",null),o=HI(i,t);return o.slots=r,VI(t,o),Er(function(){jI(i,n.value,o,a)}),Rr(function(){WI(i,o)}),function(){return D("div",{ref:n})}}});var m0=Object.assign(Vc,{install:function(t){t.component(Vc.name,Vc)}}),UG=m0;Kt.component(Vc.name,Vc);const jc=xt({name:"VxeSwitch",props:{modelValue:[String,Number,Boolean],disabled:Boolean,size:{type:String,default:function(){return H.switch.size||H.size}},openLabel:String,closeLabel:String,openValue:{type:[String,Number,Boolean],default:!0},closeValue:{type:[String,Number,Boolean],default:!1},openIcon:String,closeIcon:String},emits:["update:modelValue","change","focus","blur"],setup:function(t,e){var r=e.emit,n=ct("$xeform",null),i=ct("$xeformiteminfo",null),a=E.uniqueId(),o=qr(t),l=Jt({isActivated:!1,hasAnimat:!1,offsetLeft:0}),s={xID:a,props:t,context:e,reactData:l},c=je(),u={},f=_e(function(){return Ar(t.openLabel)}),d=_e(function(){return Ar(t.closeLabel)}),h=_e(function(){return t.modelValue===t.openValue}),p,v=function(x){if(!t.disabled){var T=h.value;clearTimeout(p);var A=T?t.closeValue:t.openValue;l.hasAnimat=!0,r("update:modelValue",A),u.dispatchEvent("change",{value:A},x),n&&i&&n.triggerItemEvent(x,i.itemConfig.field,A),p=setTimeout(function(){l.hasAnimat=!1},400)}},g=function(x){l.isActivated=!0,u.dispatchEvent("focus",{value:t.modelValue},x)},m=function(x){l.isActivated=!1,u.dispatchEvent("blur",{value:t.modelValue},x)};u={dispatchEvent:function(x,T,A){r(x,Object.assign({$switch:s,$event:A},T))},focus:function(){var x=c.value;return l.isActivated=!0,x.focus(),Ie()},blur:function(){var x=c.value;return x.blur(),l.isActivated=!1,Ie()}},Object.assign(s,u);var b=function(){var x,T=t.disabled,A=t.openIcon,O=t.closeIcon,I=h.value,_=o.value,k=f.value,L=d.value;return D("div",{class:["vxe-switch",I?"is--on":"is--off",(x={},x["size--".concat(_)]=_,x["is--disabled"]=T,x["is--animat"]=l.hasAnimat,x)]},[D("button",{ref:c,class:"vxe-switch--button",type:"button",disabled:T,onClick:v,onFocus:g,onBlur:m},[D("span",{class:"vxe-switch--label vxe-switch--label-on"},[A?D("i",{class:["vxe-switch--label-icon",A]}):$t(),k]),D("span",{class:"vxe-switch--label vxe-switch--label-off"},[O?D("i",{class:["vxe-switch--label-icon",O]}):$t(),L]),D("span",{class:"vxe-switch--icon"})])])};return s.renderVN=b,s},render:function(){return this.renderVN()}});var g0=Object.assign(jc,{install:function(t){t.component(jc.name,jc)}}),HG=g0;Kt.component(jc.name,jc);var WA,ts=[],VG=500;function jG(){ts.length&&(ts.forEach(function(t){t.tarList.forEach(function(e){var r=e.target,n=e.width,i=e.heighe,a=r.clientWidth,o=r.clientHeight,l=a&&n!==a,s=o&&i!==o;(l||s)&&(e.width=a,e.heighe=o,setTimeout(t.callback))})}),GI())}function GI(){clearTimeout(WA),WA=setTimeout(jG,H.resizeInterval||VG)}var WG=function(){function t(e){this.tarList=[],this.callback=e}return t.prototype.observe=function(e){var r=this;if(e){var n=this.tarList;n.some(function(i){return i.target===e})||n.push({target:e,width:e.clientWidth,heighe:e.clientHeight}),ts.length||GI(),ts.some(function(i){return i===r})||ts.push(this)}},t.prototype.unobserve=function(e){E.remove(ts,function(r){return r.tarList.some(function(n){return n.target===e})})},t.prototype.disconnect=function(){var e=this;E.remove(ts,function(r){return r===e})},t}();function zI(t){return window.ResizeObserver?new window.ResizeObserver(t):new WG(t)}const Wc=xt({name:"VxeList",props:{data:Array,height:[Number,String],maxHeight:[Number,String],loading:Boolean,className:[String,Function],size:{type:String,default:function(){return H.list.size||H.size}},autoResize:{type:Boolean,default:function(){return H.list.autoResize}},syncResize:[Boolean,String,Number],scrollY:Object},emits:["scroll"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=Jt({scrollYLoad:!1,bodyHeight:0,rowHeight:0,topSpaceHeight:0,items:[]}),l=je(),s=je(),c=je(),u={fullData:[],lastScrollLeft:0,lastScrollTop:0,scrollYStore:{startIndex:0,endIndex:0,visibleSize:0,offsetSize:0,rowHeight:0}},f={refElem:l},d={xID:i,props:t,context:e,reactData:o,internalData:u,getRefMaps:function(){return f}},h={},p=_e(function(){return Object.assign({},H.list.scrollY,t.scrollY)}),v=_e(function(){var q=t.height,V=t.maxHeight,G={};return q?G.height="".concat(isNaN(q)?q:"".concat(q,"px")):V&&(G.height="auto",G.maxHeight="".concat(isNaN(V)?V:"".concat(V,"px"))),G}),g=function(){var q=o.scrollYLoad,V=u.scrollYStore,G=u.fullData;o.bodyHeight=q?G.length*V.rowHeight:0,o.topSpaceHeight=q?Math.max(V.startIndex*V.rowHeight,0):0},m=function(){var q=o.scrollYLoad,V=u.fullData,G=u.scrollYStore;return o.items=q?V.slice(G.startIndex,G.endIndex):V.slice(0),Ie()},b=function(){m(),g()},x=function(){return Ie().then(function(){var q=o.scrollYLoad,V=u.scrollYStore,G=c.value,pe=p.value,J=0,N;if(G&&(pe.sItem&&(N=G.querySelector(pe.sItem)),N||(N=G.children[0])),N&&(J=N.offsetHeight),J=Math.max(20,J),V.rowHeight=J,q){var Z=s.value,le=Math.max(8,Math.ceil(Z.clientHeight/J)),ye=pe.oSize?E.toNumber(pe.oSize):ii.edge?10:0;V.offsetSize=ye,V.visibleSize=le,V.endIndex=Math.max(V.startIndex,le+ye,V.endIndex),b()}else g();o.rowHeight=J})},T=function(){var q=s.value;return q&&(q.scrollTop=0),Ie()},A=function(q,V){var G=s.value;return E.isNumber(q)&&(G.scrollLeft=q),E.isNumber(V)&&(G.scrollTop=V),o.scrollYLoad?new Promise(function(pe){setTimeout(function(){Ie(function(){pe()})},50)}):Ie()},O=function(){var q=u.lastScrollLeft,V=u.lastScrollTop;return T().then(function(){if(q||V)return u.lastScrollLeft=0,u.lastScrollTop=0,A(q,V)})},I=function(){var q=l.value;return q.clientWidth&&q.clientHeight?x():Promise.resolve()},_=function(q){var V=u.scrollYStore,G=V.startIndex,pe=V.endIndex,J=V.visibleSize,N=V.offsetSize,Z=V.rowHeight,le=q.target,ye=le.scrollTop,me=Math.floor(ye/Z),Re=Math.max(0,me-1-N),be=me+J+N;(me<=G||me>=pe-J-1)&&(G!==Re||pe!==be)&&(V.startIndex=Re,V.endIndex=be,b())},k=function(q){var V=q.target,G=V.scrollTop,pe=V.scrollLeft,J=pe!==u.lastScrollLeft,N=G!==u.lastScrollTop;u.lastScrollTop=G,u.lastScrollLeft=pe,o.scrollYLoad&&_(q),h.dispatchEvent("scroll",{scrollLeft:pe,scrollTop:G,isX:J,isY:N},q)};h={dispatchEvent:function(q,V,G){n(q,Object.assign({$list:d,$event:G},V))},loadData:function(q){var V=u.scrollYStore,G=p.value,pe=q||[];return Object.assign(V,{startIndex:0,endIndex:1,visibleSize:0}),u.fullData=pe,o.scrollYLoad=!!G.enabled&&G.gt>-1&&(G.gt===0||G.gt<=pe.length),m(),x().then(function(){O()})},reloadData:function(q){return T(),h.loadData(q)},recalculate:I,scrollTo:A,refreshScroll:O,clearScroll:T},Object.assign(d,h);var L=je(0);st(function(){return t.data?t.data.length:-1},function(){L.value++}),st(function(){return t.data},function(){L.value++}),st(L,function(){h.loadData(t.data||[])}),st(function(){return t.syncResize},function(q){q&&(I(),Ie(function(){return setTimeout(function(){return I()})}))}),Od(function(){I().then(function(){return O()})});var P;Ie(function(){if(bt.on(d,"resize",function(){I()}),t.autoResize){var q=l.value;P=zI(function(){return I()}),P.observe(q)}h.loadData(t.data||[])}),Rr(function(){P&&P.disconnect(),bt.off(d,"resize")});var W=function(){var q,V=t.className,G=t.loading,pe=o.bodyHeight,J=o.topSpaceHeight,N=o.items,Z=a.value,le=v.value;return D("div",{ref:l,class:["vxe-list",V?E.isFunction(V)?V({$list:d}):V:"",(q={},q["size--".concat(Z)]=Z,q["is--loading"]=G,q)]},[D("div",{ref:s,class:"vxe-list--virtual-wrapper",style:le,onScroll:k},[D("div",{class:"vxe-list--y-space",style:{height:pe?"".concat(pe,"px"):""}}),D("div",{ref:c,class:"vxe-list--body",style:{marginTop:J?"".concat(J,"px"):""}},r.default?r.default({items:N,$list:d}):[])]),D(Jd,{class:"vxe-list--loading",modelValue:G})])};return d.renderVN=W,d},render:function(){return this.renderVN()}});var y0=Object.assign(Wc,{install:function(t){t.component(Wc.name,Wc)}}),GG=y0;Kt.component(Wc.name,Wc);const Gc=xt({name:"VxePulldown",props:{modelValue:Boolean,disabled:Boolean,placement:String,size:{type:String,default:function(){return H.size}},className:[String,Function],popupClassName:[String,Function],destroyOnClose:Boolean,transfer:Boolean},emits:["update:modelValue","hide-panel"],setup:function(t,e){var r=e.slots,n=e.emit,i=E.uniqueId(),a=qr(t),o=Jt({inited:!1,panelIndex:0,panelStyle:null,panelPlacement:null,visiblePanel:!1,animatVisible:!1,isActivated:!1}),l=je(),s=je(),c=je(),u={refElem:l},f={xID:i,props:t,context:e,reactData:o,getRefMaps:function(){return u}},d={},h=function(){o.panelIndex<Ba()&&(o.panelIndex=sa())},p=function(){return o.visiblePanel},v=function(){return Ie().then(function(){var _=t.transfer,k=t.placement,L=o.panelIndex,P=o.visiblePanel;if(P){var W=s.value,q=c.value;if(q&&W){var V=W.offsetHeight,G=W.offsetWidth,pe=q.offsetHeight,J=q.offsetWidth,N=5,Z={zIndex:L},le=Ia(W),ye=le.boundingTop,me=le.boundingLeft,Re=le.visibleHeight,be=le.visibleWidth,Ce="bottom";if(_){var we=me,ce=ye+V;k==="top"?(Ce="top",ce=ye-pe):k||(ce+pe+N>Re&&(Ce="top",ce=ye-pe),ce<N&&(Ce="bottom",ce=ye+V)),we+J+N>be&&(we-=we+J+N-be),we<N&&(we=N),Object.assign(Z,{left:"".concat(we,"px"),top:"".concat(ce,"px"),minWidth:"".concat(G,"px")})}else k==="top"?(Ce="top",Z.bottom="".concat(V,"px")):k||ye+V+pe>Re&&ye-V-pe>N&&(Ce="top",Z.bottom="".concat(V,"px"));o.panelStyle=Z,o.panelPlacement=Ce}}return Ie()})},g,m=function(){return o.inited||(o.inited=!0),new Promise(function(_){t.disabled?Ie(function(){_()}):(clearTimeout(g),o.isActivated=!0,o.animatVisible=!0,setTimeout(function(){o.visiblePanel=!0,n("update:modelValue",!0),v(),setTimeout(function(){_(v())},40)},10),h())})},b=function(){return o.visiblePanel=!1,n("update:modelValue",!1),new Promise(function(_){o.animatVisible?g=window.setTimeout(function(){o.animatVisible=!1,Ie(function(){_()})},350):Ie(function(){_()})})},x=function(){return o.visiblePanel?b():m()},T=function(_){var k=t.disabled,L=o.visiblePanel,P=c.value;k||L&&(Pt(_,P).flag?v():(b(),d.dispatchEvent("hide-panel",{},_)))},A=function(_){var k=t.disabled,L=o.visiblePanel,P=l.value,W=c.value;k||(o.isActivated=Pt(_,P).flag||Pt(_,W).flag,L&&!o.isActivated&&(b(),d.dispatchEvent("hide-panel",{},_)))},O=function(_){o.visiblePanel&&(o.isActivated=!1,b(),d.dispatchEvent("hide-panel",{},_))};d={dispatchEvent:function(_,k,L){n(_,Object.assign({$pulldown:f,$event:L},k))},isPanelVisible:p,togglePanel:x,showPanel:m,hidePanel:b},Object.assign(f,d),st(function(){return t.modelValue},function(_){_?m():b()}),Ie(function(){bt.on(f,"mousewheel",T),bt.on(f,"mousedown",A),bt.on(f,"blur",O)}),Rr(function(){bt.off(f,"mousewheel"),bt.off(f,"mousedown"),bt.off(f,"blur")});var I=function(){var _,k,L=t.className,P=t.popupClassName,W=t.destroyOnClose,q=t.transfer,V=t.disabled,G=o.inited,pe=o.isActivated,J=o.animatVisible,N=o.visiblePanel,Z=o.panelStyle,le=o.panelPlacement,ye=a.value;return D("div",{ref:l,class:["vxe-pulldown",L?E.isFunction(L)?L({$pulldown:f}):L:"",(_={},_["size--".concat(ye)]=ye,_["is--visivle"]=N,_["is--disabled"]=V,_["is--active"]=pe,_)]},[D("div",{ref:s,class:"vxe-pulldown--content"},r.default?r.default({$pulldown:f}):[]),D(Ll,{to:"body",disabled:q?!G:!0},[D("div",{ref:c,class:["vxe-table--ignore-clear vxe-pulldown--panel",P?E.isFunction(P)?P({$pulldown:f}):P:"",(k={},k["size--".concat(ye)]=ye,k["is--transfer"]=q,k["animat--leave"]=J,k["animat--enter"]=N,k)],placement:le,style:Z},r.dropdown?[D("div",{class:"vxe-pulldown--wrapper"},!G||W&&!N&&!J?[]:r.dropdown({$pulldown:f}))]:[])])])};return f.renderVN=I,f},render:function(){return this.renderVN()}});var b0=Object.assign(Gc,{install:function(t){t.component(Gc.name,Gc)}}),zG=b0;Kt.component(Gc.name,Gc);var lo=globalThis&&globalThis.__assign||function(){return lo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},lo.apply(this,arguments)},GA=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},Vs="body",KG={mini:3,small:2,medium:1};const zA=xt({name:"VxeTableBody",props:{tableData:Array,tableColumn:Array,fixedColumn:Array,fixedType:{type:String,default:null}},setup:function(t){var e=ct("$xetable",{}),r=ct("xesize",null),n=e.xID,i=e.props,a=e.context,o=e.reactData,l=e.internalData,s=e.getRefMaps(),c=s.refTableHeader,u=s.refTableBody,f=s.refTableFooter,d=s.refTableLeftBody,h=s.refTableRightBody,p=s.refValidTooltip,v=e.getComputeMaps(),g=v.computeEditOpts,m=v.computeMouseOpts,b=v.computeSYOpts,x=v.computeEmptyOpts,T=v.computeKeyboardOpts,A=v.computeTooltipOpts,O=v.computeRadioOpts,I=v.computeExpandOpts,_=v.computeTreeOpts,k=v.computeCheckboxOpts,L=v.computeValidOpts,P=v.computeRowOpts,W=v.computeColumnOpts,q=je(),V=je(),G=je(),pe=je(),J=je(),N=je(),Z=je(),le=function(){if(r){var X=r.value;if(X)return KG[X]||0}return 0},ye=function(){var X=i.delayHover,ee=o.lastScrollTime,de=o._isResize;return!!(de||ee&&Date.now()<ee+X)},me=function(X,ee){var de=1;if(!X)return de;var oe=_.value,te=oe.children||oe.childrenField,he=X[te];if(he&&e.isTreeExpandByRow(X))for(var ke=0;ke<he.length;ke++)de+=me(he[ke]);return de},Re=function(X,ee,de){var oe=1;return de&&(oe=me(ee[de-1])),o.rowHeight*oe-(de?1:12-le())},be=function(X){var ee=X.row,de=X.column,oe=i.treeConfig,te=_.value,he=de.slots,ke=de.treeNode,se=l.fullAllDataRowIdData,ue=tt(e,ee),xe=se[ue],De=0,U=0,ge=[];return xe&&(De=xe.level,U=xe._index,ge=xe.items),he&&he.line?e.callSlot(he.line,X):oe&&ke&&(te.showLine||te.line)?[D("div",{class:"vxe-tree--line-wrapper"},[D("div",{class:"vxe-tree--line",style:{height:"".concat(Re(X,ge,U),"px"),left:"".concat(De*te.indent+(De?2-le():0)+16,"px")}})])]:[]},Ce=function(X,ee,de,oe,te,he,ke,se,ue,xe,De,U){var ge,Se=i.columnKey,$e=i.height,Ue=i.showOverflow,We=i.cellClassName,Je=i.cellStyle,nt=i.align,Qe=i.spanMethod,Ke=i.mouseConfig,at=i.editConfig,Q=i.editRules,Ot=i.tooltipConfig,Yt=o.tableData,Ht=o.overflowX,yt=o.scrollYLoad,At=o.currentColumn,Wt=o.mergeList,ut=o.editStore,Bt=o.isAllOverflow,Ut=o.validErrorMaps,Or=l.afterFullData,Xr=L.value,nn=k.value,An=g.value,an=A.value,on=P.value,Hr=b.value,Zr=W.value,Kn=ue.type,sn=ue.cellRender,Yn=ue.editRender,dr=ue.align,Nr=ue.showOverflow,Mn=ue.className,qn=ue.treeNode,Xn=ut.actived,En=Hr.rHeight,ui=on.height,Wi=Yn||sn,ln=Wi?ot.renderer.get(Wi.name):null,$r=ln?ln.cellClassName:"",gr=ln?ln.cellStyle:"",Zn=an.showAll,fi=e.getColumnIndex(ue),Ci=e.getVTColumnIndex(ue),Ii=wt(Yn),Tn=de?ue.fixed!==de:ue.fixed&&Ht,Sn=E.isUndefined(Nr)||E.isNull(Nr)?Ue:Nr,hr=Sn==="ellipsis",cr=Sn==="title",Lr=Sn===!0||Sn==="tooltip",Jn=cr||Lr||hr,Gi,Qn={},ha=dr||nt,_i=Ut["".concat(ee,":").concat(ue.id)],Ls=Q&&Xr.showMessage&&(Xr.message==="default"?$e||Yt.length>1:Xr.message==="inline"),di={colid:ue.id},Vr={$table:e,$grid:e.xegrid,seq:X,rowid:ee,row:te,rowIndex:he,$rowIndex:ke,_rowIndex:se,column:ue,columnIndex:fi,$columnIndex:xe,_columnIndex:Ci,fixed:de,type:Vs,isHidden:Tn,level:oe,visibleData:Or,data:Yt,items:U};if(yt&&!Jn&&(hr=Jn=!0),(cr||Lr||Zn||Ot)&&(Qn.onMouseenter=function(Jr){ye()||(cr?Og(Jr.currentTarget,ue):(Lr||Zn)&&e.triggerBodyTooltipEvent(Jr,Vr),e.dispatchEvent("cell-mouseenter",Object.assign({cell:Jr.currentTarget},Vr),Jr))}),(Lr||Zn||Ot)&&(Qn.onMouseleave=function(Jr){ye()||((Lr||Zn)&&e.handleTargetLeaveEvent(Jr),e.dispatchEvent("cell-mouseleave",Object.assign({cell:Jr.currentTarget},Vr),Jr))}),(nn.range||Ke)&&(Qn.onMousedown=function(Jr){e.triggerCellMousedownEvent(Jr,Vr)}),Qn.onClick=function(Jr){e.triggerCellClickEvent(Jr,Vr)},Qn.onDblclick=function(Jr){e.triggerCellDblclickEvent(Jr,Vr)},Wt.length){var zi=QC(Wt,se,Ci);if(zi){var Fn=zi.rowspan,wn=zi.colspan;if(!Fn||!wn)return null;Fn>1&&(di.rowspan=Fn),wn>1&&(di.colspan=wn)}}else if(Qe){var Ds=Qe(Vr)||{},ko=Ds.rowspan,Fn=ko===void 0?1:ko,pa=Ds.colspan,wn=pa===void 0?1:pa;if(!Fn||!wn)return null;Fn>1&&(di.rowspan=Fn),wn>1&&(di.colspan=wn)}Tn&&Wt&&(di.colspan>1||di.rowspan>1)&&(Tn=!1),!Tn&&at&&(Yn||sn)&&(An.showStatus||An.showUpdateStatus)&&(Gi=e.isUpdateByRow(te,ue.field));var Ri=[];return Tn&&Ue&&Bt?Ri.push(D("div",{class:["vxe-cell",{"c--title":cr,"c--tooltip":Lr,"c--ellipsis":hr}],style:{maxHeight:Jn&&(En||ui)?"".concat(En||ui,"px"):""}})):(Ri.push.apply(Ri,GA(GA([],be(Vr),!1),[D("div",{class:["vxe-cell",{"c--title":cr,"c--tooltip":Lr,"c--ellipsis":hr}],style:{maxHeight:Jn&&(En||ui)?"".concat(En||ui,"px"):""},title:cr?e.getCellLabel(te,ue):null},ue.renderCell(Vr))],!1)),Ls&&_i&&Ri.push(D("div",{class:"vxe-cell--valid",style:_i.rule&&_i.rule.maxWidth?{width:"".concat(_i.rule.maxWidth,"px")}:null},[D("span",{class:"vxe-cell--valid-msg"},_i.content)]))),D("td",lo(lo(lo({class:["vxe-body--column",ue.id,(ge={},ge["col--".concat(ha)]=ha,ge["col--".concat(Kn)]=Kn,ge["col--last"]=xe===De.length-1,ge["col--tree-node"]=qn,ge["col--edit"]=Ii,ge["col--ellipsis"]=Jn,ge["fixed--hidden"]=Tn,ge["col--dirty"]=Gi,ge["col--actived"]=at&&Ii&&Xn.row===te&&(Xn.column===ue||An.mode==="row"),ge["col--valid-error"]=!!_i,ge["col--current"]=At===ue,ge),ns($r,Vr),ns(Mn,Vr),ns(We,Vr)],key:Se||Zr.useKey?ue.id:xe},di),{style:Object.assign({height:Jn&&(En||ui)?"".concat(En||ui,"px"):""},E.isFunction(gr)?gr(Vr):gr,E.isFunction(Je)?Je(Vr):Je)}),Qn),Ri)},we=function(X,ee,de){var oe=i.stripe,te=i.rowKey,he=i.highlightHoverRow,ke=i.rowClassName,se=i.rowStyle,ue=i.showOverflow,xe=i.editConfig,De=i.treeConfig,U=o.hasFixedColumn,ge=o.treeExpandedMaps,Se=o.scrollYLoad,$e=o.rowExpandedMaps,Ue=o.expandColumn,We=o.selectRadioRow,Je=l.fullAllDataRowIdData,nt=k.value,Qe=O.value,Ke=_.value,at=g.value,Q=P.value,Ot=Ke.transform,Yt=Ke.children||Ke.childrenField,Ht=[];return ee.forEach(function(yt,At){var Wt={},ut=At;ut=e.getRowIndex(yt),(Q.isHover||he)&&(Wt.onMouseenter=function(qn){ye()||e.triggerHoverEvent(qn,{row:yt,rowIndex:ut})},Wt.onMouseleave=function(){ye()||e.clearHoverRow()});var Bt=tt(e,yt),Ut=Je[Bt],Or=0,Xr=-1,nn=0;Ut&&(Or=Ut.level,Xr=Ut.seq,nn=Ut._index);var An={$table:e,seq:Xr,rowid:Bt,fixed:X,type:Vs,level:Or,row:yt,rowIndex:ut,$rowIndex:At,_rowIndex:nn},an=Ue&&!!$e[Bt],on=!1,Hr=[],Zr=!1;if(xe&&(Zr=e.isInsertByRow(yt)),De&&!Se&&!Ot&&(Hr=yt[Yt],on=Hr&&Hr.length&&!!ge[Bt]),Ht.push(D("tr",lo({class:["vxe-body--row",De?"row--level-".concat(Or):"",{"row--stripe":oe&&(e.getVTRowIndex(yt)+1)%2===0,"is--new":Zr,"is--expand-row":an,"is--expand-tree":on,"row--new":Zr&&(at.showStatus||at.showInsertStatus),"row--radio":Qe.highlight&&e.eqRow(We,yt),"row--checked":nt.highlight&&e.isCheckedByCheckboxRow(yt)},ns(ke,An)],rowid:Bt,style:se?E.isFunction(se)?se(An):se:null,key:te||Q.useKey||De?Bt:At},Wt),de.map(function(qn,Xn){return Ce(Xr,Bt,X,Or,yt,ut,At,nn,qn,Xn,de,ee)}))),an){var Kn=I.value,sn=Kn.height,Yn={};sn&&(Yn.height="".concat(sn,"px")),De&&(Yn.paddingLeft="".concat(Or*Ke.indent+30,"px"));var dr=Ue.showOverflow,Nr=E.isUndefined(dr)||E.isNull(dr)?ue:dr,Mn={$table:e,seq:Xr,column:Ue,fixed:X,type:Vs,level:Or,row:yt,rowIndex:ut,$rowIndex:At,_rowIndex:nn};Ht.push(D("tr",lo({class:"vxe-body--expanded-row",key:"expand_".concat(Bt),style:se?E.isFunction(se)?se(Mn):se:null},Wt),[D("td",{class:{"vxe-body--expanded-column":1,"fixed--hidden":X&&!U,"col--ellipsis":Nr},colspan:de.length},[D("div",{class:{"vxe-body--expanded-cell":1,"is--ellipsis":sn},style:Yn},[Ue.renderData(Mn)])])]))}on&&Ht.push.apply(Ht,we(X,Hr,de))}),Ht},ce,re=function(X,ee,de,oe){(de||oe)&&(de&&(gA(de),de.scrollTop=ee),oe&&(gA(oe),oe.scrollTop=ee),clearTimeout(ce),ce=setTimeout(function(){Yf(de),Yf(oe),o.lastScrollTime=Date.now()},300))},ve=function(X){var ee=t.fixedType,de=i.highlightHoverRow,oe=o.scrollXLoad,te=o.scrollYLoad,he=l.elemStore,ke=l.lastScrollTop,se=l.lastScrollLeft,ue=P.value,xe=c.value,De=u.value,U=f.value,ge=d.value,Se=h.value,$e=p.value,Ue=q.value,We=xe?xe.$el:null,Je=U?U.$el:null,nt=De.$el,Qe=ge?ge.$el:null,Ke=Se?Se.$el:null,at=he["main-body-ySpace"],Q=at?at.value:null,Ot=he["main-body-xSpace"],Yt=Ot?Ot.value:null,Ht=te&&Q?Q.clientHeight:nt.clientHeight,yt=oe&&Yt?Yt.clientWidth:nt.clientWidth,At=Ue.scrollTop,Wt=nt.scrollLeft,ut=Wt!==se,Bt=At!==ke;l.lastScrollTop=At,l.lastScrollLeft=Wt,o.lastScrollTime=Date.now(),(ue.isHover||de)&&e.clearHoverRow(),Qe&&ee==="left"?(At=Qe.scrollTop,re(ee,At,nt,Ke)):Ke&&ee==="right"?(At=Ke.scrollTop,re(ee,At,nt,Qe)):(ut&&(We&&(We.scrollLeft=nt.scrollLeft),Je&&(Je.scrollLeft=nt.scrollLeft)),(Qe||Ke)&&(e.checkScrolling(),Bt&&re(ee,At,Qe,Ke))),oe&&ut&&e.triggerScrollXEvent(X),te&&Bt&&e.triggerScrollYEvent(X),ut&&$e&&$e.reactData.visible&&$e.updatePlacement(),e.dispatchEvent("scroll",{type:Vs,fixed:ee,scrollTop:At,scrollLeft:Wt,scrollHeight:nt.scrollHeight,scrollWidth:nt.scrollWidth,bodyHeight:Ht,bodyWidth:yt,isX:ut,isY:Bt},X)},Te,Pe=0,B=0,w=0,C=!1,j=function(X,ee,de,oe,te){var he=l.elemStore,ke=o.scrollXLoad,se=o.scrollYLoad,ue=u.value,xe=d.value,De=h.value,U=xe?xe.$el:null,ge=De?De.$el:null,Se=ue.$el,$e=he["main-body-ySpace"],Ue=$e?$e.value:null,We=he["main-body-xSpace"],Je=We?We.value:null,nt=se&&Ue?Ue.clientHeight:Se.clientHeight,Qe=ke&&Je?Je.clientWidth:Se.clientWidth,Ke=C===ee?Math.max(0,Pe-w):0;C=ee,Pe=Math.abs(ee?de-Ke:de+Ke),B=0,w=0,clearTimeout(Te);var at=function(){if(w<Pe){var Q=t.fixedType;B=Math.max(5,Math.floor(B*1.5)),w=w+B,w>Pe&&(B=B-(w-Pe));var Ot=Se.scrollTop,Yt=Se.clientHeight,Ht=Se.scrollHeight,yt=Ot+B*(ee?-1:1);Se.scrollTop=yt,U&&(U.scrollTop=yt),ge&&(ge.scrollTop=yt),(ee?yt<Ht-Yt:yt>=0)&&(Te=setTimeout(at,10)),e.dispatchEvent("scroll",{type:Vs,fixed:Q,scrollTop:Se.scrollTop,scrollLeft:Se.scrollLeft,scrollHeight:Se.scrollHeight,scrollWidth:Se.scrollWidth,bodyHeight:nt,bodyWidth:Qe,isX:oe,isY:te},X)}};at()},ie=function(X){var ee=X.deltaY,de=X.deltaX,oe=i.highlightHoverRow,te=o.scrollYLoad,he=l.lastScrollTop,ke=l.lastScrollLeft,se=P.value,ue=u.value,xe=q.value,De=ue.$el,U=ee,ge=de,Se=U<0;if(!(Se?xe.scrollTop<=0:xe.scrollTop>=xe.scrollHeight-xe.clientHeight)){var $e=xe.scrollTop+U,Ue=De.scrollLeft+ge,We=Ue!==ke,Je=$e!==he;Je&&(X.preventDefault(),l.lastScrollTop=$e,l.lastScrollLeft=Ue,o.lastScrollTime=Date.now(),(se.isHover||oe)&&e.clearHoverRow(),j(X,Se,U,We,Je),te&&e.triggerScrollYEvent(X))}};Er(function(){Ie(function(){var X=t.fixedType,ee=l.elemStore,de="".concat(X||"main","-body-"),oe=q.value;ee["".concat(de,"wrapper")]=q,ee["".concat(de,"table")]=V,ee["".concat(de,"colgroup")]=G,ee["".concat(de,"list")]=pe,ee["".concat(de,"xSpace")]=J,ee["".concat(de,"ySpace")]=N,ee["".concat(de,"emptyBlock")]=Z,oe.onscroll=ve,oe._onscroll=ve})}),Rl(function(){var X=q.value;clearTimeout(Te),X&&(X._onscroll=null,X.onscroll=null)}),Rr(function(){var X=t.fixedType,ee=l.elemStore,de="".concat(X||"main","-body-");ee["".concat(de,"wrapper")]=null,ee["".concat(de,"table")]=null,ee["".concat(de,"colgroup")]=null,ee["".concat(de,"list")]=null,ee["".concat(de,"xSpace")]=null,ee["".concat(de,"ySpace")]=null,ee["".concat(de,"emptyBlock")]=null});var ne=function(){var X=t.fixedColumn,ee=t.fixedType,de=t.tableColumn,oe=i.keyboardConfig,te=i.showOverflow,he=i.spanMethod,ke=i.mouseConfig,se=o.tableData,ue=o.mergeList,xe=o.scrollYLoad,De=o.isAllOverflow,U=l.visibleColumn,ge=a.slots,Se=b.value,$e=x.value,Ue=T.value,We=m.value;ee&&(!o.expandColumn&&(xe||te&&De)&&!ue.length&&!he&&!(oe&&Ue.isMerge)?de=X:de=U);var Je;if(ge.empty)Je=e.callSlot(ge.empty,{$table:e,$grid:e.xegrid});else{var nt=$e.name?ot.renderer.get($e.name):null,Qe=nt?nt.renderEmpty:null;Qe?Je=pr(Qe($e,{$table:e})):Je=i.emptyText||H.i18n("vxe.table.emptyText")}return D("div",lo({ref:q,class:["vxe-table--body-wrapper",ee?"fixed-".concat(ee,"--wrapper"):"body--wrapper"],xid:n},Se.mode==="wheel"?{onWheel:ie}:{}),[ee?$t():D("div",{ref:J,class:"vxe-body--x-space"}),D("div",{ref:N,class:"vxe-body--y-space"}),D("table",{ref:V,class:"vxe-table--body",xid:n,cellspacing:0,cellpadding:0,border:0},[D("colgroup",{ref:G},de.map(function(Ke,at){return D("col",{name:Ke.id,key:at})})),D("tbody",{ref:pe},we(ee,se,de))]),D("div",{class:"vxe-table--checkbox-range"}),ke&&We.area?D("div",{class:"vxe-table--cell-area"},[D("span",{class:"vxe-table--cell-main-area"},We.extension?[D("span",{class:"vxe-table--cell-main-area-btn",onMousedown:function(Ke){e.triggerCellExtendMousedownEvent(Ke,{$table:e,fixed:ee,type:Vs})}})]:[]),D("span",{class:"vxe-table--cell-copy-area"}),D("span",{class:"vxe-table--cell-extend-area"}),D("span",{class:"vxe-table--cell-multi-area"}),D("span",{class:"vxe-table--cell-active-area"})]):null,ee?null:D("div",{class:"vxe-table--empty-block",ref:Z},[D("div",{class:"vxe-table--empty-content"},Je)])])};return ne}});var KI=function(t,e){var r=[];return t.forEach(function(n){n.parentId=e?e.id:null,n.visible&&(n.children&&n.children.length&&n.children.some(function(i){return i.visible})?(r.push(n),r.push.apply(r,KI(n.children,n))):r.push(n))}),r},YG=function(t){var e=1,r=function(o,l){if(l&&(o.level=l.level+1,e<o.level&&(e=o.level)),o.children&&o.children.length&&o.children.some(function(c){return c.visible})){var s=0;o.children.forEach(function(c){c.visible&&(r(c,o),s+=c.colSpan)}),o.colSpan=s}else o.colSpan=1};t.forEach(function(o){o.level=1,r(o)});for(var n=[],i=0;i<e;i++)n.push([]);var a=KI(t);return a.forEach(function(o){o.children&&o.children.length&&o.children.some(function(l){return l.visible})?o.rowSpan=1:o.rowSpan=e-o.level+1,n[o.level-1].push(o)}),n},el=globalThis&&globalThis.__assign||function(){return el=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},el.apply(this,arguments)},fp="header";const zc=xt({name:"VxeTableHeader",props:{tableData:Array,tableColumn:Array,tableGroupColumn:Array,fixedColumn:Array,fixedType:{type:String,default:null}},setup:function(t){var e=ct("$xetable",{}),r=e.xID,n=e.props,i=e.reactData,a=e.internalData,o=e.getRefMaps(),l=o.refElem,s=o.refTableBody,c=o.refLeftContainer,u=o.refRightContainer,f=o.refCellResizeBar,d=e.getComputeMaps().computeColumnOpts,h=je([]),p=je(),v=je(),g=je(),m=je(),b=je(),x=je(),T=function(){var I=i.isGroup;h.value=I?YG(t.tableGroupColumn):[]},A=function(I,_){var k=_.column,L=t.fixedType,P=s.value,W=c.value,q=u.value,V=f.value,G=I.clientX,pe=p.value,J=I.target,N=_.cell=J.parentNode,Z=0,le=P.$el,ye=a7(J,pe),me=J.clientWidth,Re=Math.floor(me/2),be=l7(_)-Re,Ce=ye.left-N.clientWidth+me+be,we=ye.left+Re,ce=document.onmousemove,re=document.onmouseup,ve=L==="left",Te=L==="right",Pe=l.value,B=0;if(ve||Te){for(var w=ve?"nextElementSibling":"previousElementSibling",C=N[w];C&&!Da(C,"fixed--hidden");)Da(C,"col--group")||(B+=C.offsetWidth),C=C[w];Te&&q&&(we=q.offsetLeft+B)}var j=function(ie){ie.stopPropagation(),ie.preventDefault();var ne=ie.clientX-G,X=we+ne,ee=L?0:le.scrollLeft;ve?X=Math.min(X,(q?q.offsetLeft:le.clientWidth)-B-be):Te?(Ce=(W?W.clientWidth:0)+B+be,X=Math.min(X,we+N.clientWidth-be)):Ce=Math.max(le.scrollLeft,Ce),Z=Math.max(X,Ce),V.style.left="".concat(Z-ee,"px")};i._isResize=!0,is(Pe,"drag--resize"),V.style.display="block",document.onmousemove=j,document.onmouseup=function(ie){document.onmousemove=ce,document.onmouseup=re;var ne=k.renderWidth+(Te?we-Z:Z-we);k.resizeWidth=ne,V.style.display="none",i._isResize=!1,a._lastResizeTime=Date.now(),e.analyColumnWidth(),e.recalculate(!0).then(function(){e.saveCustomResizable(),e.updateCellAreas(),e.dispatchEvent("resizable-change",el(el({},_),{resizeWidth:ne}),ie)}),po(Pe,"drag--resize")},j(I),e.closeMenu&&e.closeMenu()};st(function(){return t.tableColumn},T),Er(function(){Ie(function(){var I=t.fixedType,_=e.internalData,k=_.elemStore,L="".concat(I||"main","-header-");k["".concat(L,"wrapper")]=p,k["".concat(L,"table")]=v,k["".concat(L,"colgroup")]=g,k["".concat(L,"list")]=m,k["".concat(L,"xSpace")]=b,k["".concat(L,"repair")]=x,T()})}),Rr(function(){var I=t.fixedType,_=e.internalData,k=_.elemStore,L="".concat(I||"main","-header-");k["".concat(L,"wrapper")]=null,k["".concat(L,"table")]=null,k["".concat(L,"colgroup")]=null,k["".concat(L,"list")]=null,k["".concat(L,"xSpace")]=null,k["".concat(L,"repair")]=null});var O=function(){var I=t.fixedType,_=t.fixedColumn,k=t.tableColumn,L=n.resizable,P=n.border,W=n.columnKey,q=n.headerRowClassName,V=n.headerCellClassName,G=n.headerRowStyle,pe=n.headerCellStyle,J=n.showHeaderOverflow,N=n.headerAlign,Z=n.align,le=n.mouseConfig,ye=i.isGroup,me=i.currentColumn,Re=i.scrollXLoad,be=i.overflowX,Ce=i.scrollbarWidth,we=a.visibleColumn,ce=d.value,re=h.value,ve=k;return ye?ve=we:(I&&(Re||J)&&(ve=_),re=[ve]),D("div",{ref:p,class:["vxe-table--header-wrapper",I?"fixed-".concat(I,"--wrapper"):"body--wrapper"],xid:r},[I?$t():D("div",{ref:b,class:"vxe-body--x-space"}),D("table",{ref:v,class:"vxe-table--header",xid:r,cellspacing:0,cellpadding:0,border:0},[D("colgroup",{ref:g},ve.map(function(Te,Pe){return D("col",{name:Te.id,key:Pe})}).concat(Ce?[D("col",{name:"col_gutter"})]:[])),D("thead",{ref:m},re.map(function(Te,Pe){return D("tr",{class:["vxe-header--row",q?E.isFunction(q)?q({$table:e,$rowIndex:Pe,fixed:I,type:fp}):q:""],style:G?E.isFunction(G)?G({$table:e,$rowIndex:Pe,fixed:I,type:fp}):G:null},Te.map(function(B,w){var C,j=B.type,ie=B.showHeaderOverflow,ne=B.headerAlign,X=B.align,ee=B.headerClassName,de=B.children&&B.children.length,oe=I?B.fixed!==I&&!de:!!B.fixed&&be,te=E.isUndefined(ie)||E.isNull(ie)?J:ie,he=ne||X||N||Z,ke=te==="ellipsis",se=te==="title",ue=te===!0||te==="tooltip",xe=se||ue||ke,De=B.filters&&B.filters.some(function(Ue){return Ue.checked}),U=e.getColumnIndex(B),ge=e.getVTColumnIndex(B),Se={$table:e,$grid:e.xegrid,$rowIndex:Pe,column:B,columnIndex:U,$columnIndex:w,_columnIndex:ge,fixed:I,type:fp,isHidden:oe,hasFilter:De},$e={onClick:function(Ue){return e.triggerHeaderCellClickEvent(Ue,Se)},onDblclick:function(Ue){return e.triggerHeaderCellDblclickEvent(Ue,Se)}};return Re&&!xe&&(ke=xe=!0),le&&($e.onMousedown=function(Ue){return e.triggerHeaderCellMousedownEvent(Ue,Se)}),D("th",el(el({class:["vxe-header--column",B.id,(C={},C["col--".concat(he)]=he,C["col--".concat(j)]=j,C["col--last"]=w===Te.length-1,C["col--fixed"]=B.fixed,C["col--group"]=de,C["col--ellipsis"]=xe,C["fixed--hidden"]=oe,C["is--sortable"]=B.sortable,C["col--filter"]=!!B.filters,C["is--filter-active"]=De,C["col--current"]=me===B,C),ee?E.isFunction(ee)?ee(Se):ee:"",V?E.isFunction(V)?V(Se):V:""],colid:B.id,colspan:B.colSpan>1?B.colSpan:null,rowspan:B.rowSpan>1?B.rowSpan:null,style:pe?E.isFunction(pe)?pe(Se):pe:null},$e),{key:W||ce.useKey||de?B.id:w}),[D("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ue,"c--ellipsis":ke}]},B.renderHeader(Se)),!oe&&!de&&(E.isBoolean(B.resizable)?B.resizable:ce.resizable||L)?D("div",{class:["vxe-resizable",{"is--line":!P||P==="none"}],onMousedown:function(Ue){return A(Ue,Se)}}):null])}).concat(Ce?[D("th",{class:"vxe-header--gutter col--gutter"})]:[]))}))]),D("div",{ref:x,class:"vxe-table--header-border-line"})])};return O}});var Xv=Object.assign(zc,{install:function(t){t.component(zc.name,zc)}});Kt.component(zc.name,zc);var tl=globalThis&&globalThis.__assign||function(){return tl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},tl.apply(this,arguments)},df="footer";function qG(t,e,r){for(var n=0;n<t.length;n++){var i=t[n],a=i.row,o=i.col,l=i.rowspan,s=i.colspan;if(o>-1&&a>-1&&l&&s){if(a===e&&o===r)return{rowspan:l,colspan:s};if(e>=a&&e<a+l&&r>=o&&r<o+s)return{rowspan:0,colspan:0}}}}const Kc=xt({name:"VxeTableFooter",props:{footerTableData:{type:Array,default:function(){return[]}},tableColumn:{type:Array,default:function(){return[]}},fixedColumn:{type:Array,default:function(){return[]}},fixedType:{type:String,default:null}},setup:function(t){var e=ct("$xetable",{}),r=e.xID,n=e.props,i=e.reactData,a=e.internalData,o=e.getRefMaps(),l=o.refTableHeader,s=o.refTableBody,c=o.refValidTooltip,u=e.getComputeMaps(),f=u.computeTooltipOpts,d=u.computeColumnOpts,h=je(),p=je(),v=je(),g=je(),m=je(),b=function(T){var A=t.fixedType,O=i.scrollXLoad,I=a.lastScrollLeft,_=c.value,k=l.value,L=s.value,P=k?k.$el:null,W=h.value,q=L.$el,V=W.scrollLeft,G=V!==I;a.lastScrollLeft=V,i.lastScrollTime=Date.now(),P&&(P.scrollLeft=V),q&&(q.scrollLeft=V),O&&G&&e.triggerScrollXEvent(T),G&&_&&_.reactData.visible&&_.updatePlacement(),e.dispatchEvent("scroll",{type:df,fixed:A,scrollTop:q.scrollTop,scrollLeft:V,isX:G,isY:!1},T)};Er(function(){Ie(function(){var T=t.fixedType,A=a.elemStore,O="".concat(T||"main","-footer-");A["".concat(O,"wrapper")]=h,A["".concat(O,"table")]=p,A["".concat(O,"colgroup")]=v,A["".concat(O,"list")]=g,A["".concat(O,"xSpace")]=m})}),Rr(function(){var T=t.fixedType,A=a.elemStore,O="".concat(T||"main","-footer-");A["".concat(O,"wrapper")]=null,A["".concat(O,"table")]=null,A["".concat(O,"colgroup")]=null,A["".concat(O,"list")]=null,A["".concat(O,"xSpace")]=null});var x=function(){var T=t.fixedType,A=t.fixedColumn,O=t.tableColumn,I=t.footerTableData,_=n.footerRowClassName,k=n.footerCellClassName,L=n.footerRowStyle,P=n.footerCellStyle,W=n.footerAlign,q=n.footerSpanMethod,V=n.align,G=n.columnKey,pe=n.showFooterOverflow,J=a.visibleColumn,N=i.scrollXLoad,Z=i.overflowX,le=i.scrollbarWidth,ye=i.currentColumn,me=i.mergeFooterList,Re=f.value,be=d.value;return T&&(!i.expandColumn&&(N||pe)&&(!me.length||!q)?O=A:O=J),D("div",{ref:h,class:["vxe-table--footer-wrapper",T?"fixed-".concat(T,"--wrapper"):"body--wrapper"],xid:r,onScroll:b},[T?$t():D("div",{ref:m,class:"vxe-body--x-space"}),D("table",{ref:p,class:"vxe-table--footer",xid:r,cellspacing:0,cellpadding:0,border:0},[D("colgroup",{ref:v},O.map(function(Ce,we){return D("col",{name:Ce.id,key:we})}).concat(le?[D("col",{name:"col_gutter"})]:[])),D("tfoot",{ref:g},I.map(function(Ce,we){var ce=we;return D("tr",{class:["vxe-footer--row",_?E.isFunction(_)?_({$table:e,_rowIndex:we,$rowIndex:ce,fixed:T,type:df}):_:""],style:L?E.isFunction(L)?L({$table:e,_rowIndex:we,$rowIndex:ce,fixed:T,type:df}):L:null},O.map(function(re,ve){var Te,Pe=re.type,B=re.showFooterOverflow,w=re.footerAlign,C=re.align,j=re.footerClassName,ie=Re.showAll,ne=re.children&&re.children.length,X=T?re.fixed!==T&&!ne:re.fixed&&Z,ee=E.isUndefined(B)||E.isNull(B)?pe:B,de=w||C||W||V,oe=ee==="ellipsis",te=ee==="title",he=ee===!0||ee==="tooltip",ke=te||he||oe,se={colid:re.id},ue={},xe=e.getColumnIndex(re),De=e.getVTColumnIndex(re),U=De,ge={$table:e,$grid:e.xegrid,_rowIndex:we,$rowIndex:ce,column:re,columnIndex:xe,$columnIndex:ve,_columnIndex:De,itemIndex:U,items:Ce,fixed:T,type:df,data:I};if(N&&!ke&&(oe=ke=!0),(te||he||ie)&&(ue.onMouseenter=function(Qe){te?Og(Qe.currentTarget,re):(he||ie)&&e.triggerFooterTooltipEvent(Qe,ge)}),(he||ie)&&(ue.onMouseleave=function(Qe){(he||ie)&&e.handleTargetLeaveEvent(Qe)}),ue.onClick=function(Qe){e.dispatchEvent("footer-cell-click",Object.assign({cell:Qe.currentTarget},ge),Qe)},ue.onDblclick=function(Qe){e.dispatchEvent("footer-cell-dblclick",Object.assign({cell:Qe.currentTarget},ge),Qe)},me.length){var Se=qG(me,we,De);if(Se){var $e=Se.rowspan,Ue=Se.colspan;if(!$e||!Ue)return null;$e>1&&(se.rowspan=$e),Ue>1&&(se.colspan=Ue)}}else if(q){var We=q(ge)||{},Je=We.rowspan,$e=Je===void 0?1:Je,nt=We.colspan,Ue=nt===void 0?1:nt;if(!$e||!Ue)return null;$e>1&&(se.rowspan=$e),Ue>1&&(se.colspan=Ue)}return D("td",tl(tl(tl(tl({class:["vxe-footer--column",re.id,(Te={},Te["col--".concat(de)]=de,Te["col--".concat(Pe)]=Pe,Te["col--last"]=ve===O.length-1,Te["fixed--hidden"]=X,Te["col--ellipsis"]=ke,Te["col--current"]=ye===re,Te),ns(j,ge),ns(k,ge)]},se),{style:P?E.isFunction(P)?P(ge):P:null}),ue),{key:G||be.useKey?re.id:ve}),[D("div",{class:["vxe-cell",{"c--title":te,"c--tooltip":he,"c--ellipsis":oe}]},re.renderFooter(ge))])}).concat(le?[D("td",{class:"vxe-footer--gutter col--gutter"})]:[]))}))])])};return x}});var KA=Object.assign(Kc,{install:function(t){t.component(Kc.name,Kc)}});Kt.component(Kc.name,Kc);var Dr=globalThis&&globalThis.__assign||function(){return Dr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Dr.apply(this,arguments)},XG=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},ZG=ii["-webkit"]&&!ii.edge,dp="VXE_TABLE_CUSTOM_COLUMN_WIDTH",hp="VXE_TABLE_CUSTOM_COLUMN_VISIBLE",pp="VXE_TABLE_CUSTOM_COLUMN_FIXED",JG="VXE_TABLE_CUSTOM_COLUMN_ORDER";const Yc=xt({name:"VxeTable",props:Kg,emits:Yg,setup:function(t,e){var r=e.slots,n=e.emit,i=ot.tooltip,a=E.uniqueId(),o=qr(t),l=xn(),s=Jt({staticColumns:[],tableGroupColumn:[],tableColumn:[],tableData:[],scrollXLoad:!1,scrollYLoad:!1,overflowY:!0,overflowX:!1,scrollbarWidth:0,scrollbarHeight:0,lastScrollTime:0,rowHeight:0,parentHeight:0,isGroup:!1,isAllOverflow:!1,isAllSelected:!1,isIndeterminate:!1,selectCheckboxMaps:{},currentRow:null,currentColumn:null,selectRadioRow:null,footerTableData:[],expandColumn:null,treeNodeColumn:null,hasFixedColumn:!1,rowExpandedMaps:{},rowExpandLazyLoadedMaps:{},treeExpandedMaps:{},treeExpandLazyLoadedMaps:{},treeIndeterminateMaps:{},mergeList:[],mergeFooterList:[],upDataFlag:0,reColumnFlag:0,initStore:{filter:!1,import:!1,export:!1},filterStore:{isAllSelected:!1,isIndeterminate:!1,style:null,options:[],column:null,multiple:!1,visible:!1,maxHeight:null},columnStore:{leftList:[],centerList:[],rightList:[],resizeList:[],pxList:[],pxMinList:[],scaleList:[],scaleMinList:[],autoList:[]},ctxMenuStore:{selected:null,visible:!1,showChild:!1,selectChild:null,list:[],style:null},editStore:{indexs:{columns:[]},titles:{columns:[]},selected:{row:null,column:null},copyed:{cut:!1,rows:[],columns:[]},actived:{row:null,column:null},insertMaps:{},removeMaps:{}},tooltipStore:{row:null,column:null,content:null,visible:!1,currOpts:null},validStore:{visible:!1},validErrorMaps:{},importStore:{inited:!1,file:null,type:"",modeList:[],typeList:[],filename:"",visible:!1},importParams:{mode:"",types:null,message:!0},exportStore:{inited:!1,name:"",modeList:[],typeList:[],columns:[],isPrint:!1,hasFooter:!1,hasMerge:!1,hasTree:!1,hasColgroup:!1,visible:!1},exportParams:{filename:"",sheetName:"",mode:"",type:"",isColgroup:!1,isMerge:!1,isAllExpand:!1,useStyle:!1,original:!1,message:!0,isHeader:!1,isFooter:!1},scrollVMLoading:!1,_isResize:!1}),c={tZindex:0,elemStore:{},scrollXStore:{offsetSize:0,visibleSize:0,startIndex:0,endIndex:0},scrollYStore:{rowHeight:0,offsetSize:0,visibleSize:0,startIndex:0,endIndex:0},tableWidth:0,tableHeight:0,headerHeight:0,footerHeight:0,customHeight:0,customMinHeight:0,customMaxHeight:0,hoverRow:null,lastScrollLeft:0,lastScrollTop:0,radioReserveRow:null,checkboxReserveRowMap:{},rowExpandedReserveRowMap:{},treeExpandedReserveRowMap:{},treeIndeterminateRowMaps:{},tableFullData:[],afterFullData:[],afterTreeFullData:[],afterFullRowMaps:{},tableFullTreeData:[],tableSynchData:[],tableSourceData:[],collectColumn:[],tableFullColumn:[],visibleColumn:[],fullAllDataRowIdData:{},sourceDataRowIdData:{},fullDataRowIdData:{},fullColumnIdData:{},fullColumnFieldData:{},inited:!1,tooltipTimeout:null,initStatus:!1,isActivated:!1},u={},f={},d=je(),h=je(),p=je(),v=je(),g=je(),m=je(),b=je(),x=je(),T=je(),A=je(),O=je(),I=je(),_=je(),k=je(),L=je(),P=je(),W=je(),q=je(),V=je(),G=ct("$xegrid",null),pe,J=_e(function(){return Object.assign({},H.table.validConfig,t.validConfig)}),N=_e(function(){return Object.assign({},H.table.scrollX,t.scrollX)}),Z=_e(function(){return Object.assign({},H.table.scrollY,t.scrollY)}),le=_e(function(){return{default:48,medium:44,small:40,mini:36}}),ye=_e(function(){return Object.assign({},H.table.columnConfig,t.columnConfig)}),me=_e(function(){return Object.assign({},H.table.rowConfig,t.rowConfig)}),Re=_e(function(){return Object.assign({},H.table.resizeConfig,t.resizeConfig)}),be=_e(function(){return Object.assign({},H.table.resizableConfig,t.resizableConfig)}),Ce=_e(function(){return Object.assign({startIndex:0},H.table.seqConfig,t.seqConfig)}),we=_e(function(){return Object.assign({},H.table.radioConfig,t.radioConfig)}),ce=_e(function(){return Object.assign({},H.table.checkboxConfig,t.checkboxConfig)}),re=je();re=_e(function(){return Object.assign({},H.tooltip,H.table.tooltipConfig,t.tooltipConfig)});var ve=_e(function(){var y=s.tooltipStore,S=re.value;return Dr(Dr({},S),y.currOpts)}),Te=_e(function(){var y=re.value;return Object.assign({isArrow:!1},y)}),Pe=_e(function(){return Object.assign({},H.table.editConfig,t.editConfig)}),B=_e(function(){return Object.assign({orders:["asc","desc",null]},H.table.sortConfig,t.sortConfig)}),w=_e(function(){return Object.assign({},H.table.filterConfig,t.filterConfig)}),C=_e(function(){return Object.assign({},H.table.mouseConfig,t.mouseConfig)}),j=_e(function(){return Object.assign({},H.table.areaConfig,t.areaConfig)}),ie=_e(function(){return Object.assign({},H.table.keyboardConfig,t.keyboardConfig)}),ne=_e(function(){return Object.assign({},H.table.clipConfig,t.clipConfig)}),X=_e(function(){return Object.assign({},H.table.fnrConfig,t.fnrConfig)}),ee=_e(function(){return Object.assign({},H.table.menuConfig,t.menuConfig)}),de=_e(function(){var y=ee.value,S=y.header;return S&&S.options?S.options:[]}),oe=_e(function(){var y=ee.value,S=y.body;return S&&S.options?S.options:[]}),te=_e(function(){var y=ee.value,S=y.footer;return S&&S.options?S.options:[]}),he=_e(function(){var y=ee.value,S=de.value,R=oe.value,M=te.value;return!!(t.menuConfig&&wt(y)&&(S.length||R.length||M.length))}),ke=_e(function(){var y=s.ctxMenuStore,S=[];return y.list.forEach(function(R){R.forEach(function(M){S.push(M)})}),S}),se=_e(function(){return Object.assign({},H.table.exportConfig,t.exportConfig)}),ue=_e(function(){return Object.assign({},H.table.importConfig,t.importConfig)}),xe=_e(function(){return Object.assign({},H.table.printConfig,t.printConfig)}),De=_e(function(){return Object.assign({},H.table.expandConfig,t.expandConfig)}),U=_e(function(){return Object.assign({},H.table.treeConfig,t.treeConfig)}),ge=_e(function(){return Object.assign({},H.table.emptyRender,t.emptyRender)}),Se=_e(function(){return Object.assign({},H.table.loadingConfig,t.loadingConfig)}),$e=_e(function(){return t.border?Math.max(2,Math.ceil(s.scrollbarWidth/s.tableColumn.length)):1}),Ue=_e(function(){return Object.assign({},H.table.customConfig,t.customConfig)}),We=_e(function(){var y=c.tableFullColumn,S=0;return y.forEach(function(R){R.fixed&&S++}),S}),Je=_e(function(){var y=We.value,S=ye.value,R=S.maxFixedSize;return R?y>=R:!1}),nt=_e(function(){var y=t.border;return y===!0?"full":y||"default"}),Qe=_e(function(){t.treeConfig;var y=s.tableData,S=c.tableFullData,R=ce.value,M=R.strict,F=R.checkMethod;return M?y.length||S.length?F?S.every(function(K){return!F({row:K})}):!1:!0:!1}),Ke={refElem:d,refTooltip:h,refValidTooltip:v,refTableFilter:g,refTableMenu:m,refTableHeader:b,refTableBody:x,refTableFooter:T,refTableLeftHeader:A,refTableLeftBody:O,refTableLeftFooter:I,refTableRightHeader:_,refTableRightBody:k,refTableRightFooter:L,refLeftContainer:P,refRightContainer:W,refCellResizeBar:q},at={computeSize:o,computeValidOpts:J,computeSXOpts:N,computeSYOpts:Z,computeColumnOpts:ye,computeRowOpts:me,computeResizeleOpts:Re,computeResizableOpts:be,computeSeqOpts:Ce,computeRadioOpts:we,computeCheckboxOpts:ce,computeTooltipOpts:re,computeEditOpts:Pe,computeSortOpts:B,computeFilterOpts:w,computeMouseOpts:C,computeAreaOpts:j,computeKeyboardOpts:ie,computeClipOpts:ne,computeFNROpts:X,computeHeaderMenu:de,computeBodyMenu:oe,computeFooterMenu:te,computeIsMenu:he,computeMenuOpts:ee,computeExportOpts:se,computeImportOpts:ue,computePrintOpts:xe,computeExpandOpts:De,computeTreeOpts:U,computeEmptyOpts:ge,computeLoadingOpts:Se,computeCustomOpts:Ue,computeFixedColumnSize:We,computeIsMaxFixedColumn:Je,computeIsAllCheckboxDisabled:Qe},Q={xID:a,props:t,context:e,instance:l,reactData:s,internalData:c,getRefMaps:function(){return Ke},getComputeMaps:function(){return at},xegrid:G},Ot=function(y,S,R){var M=E.get(y,R),F=E.get(S,R);return Oi(M)&&Oi(F)?!0:E.isString(M)||E.isNumber(M)?""+M==""+F:E.isEqual(M,F)},Yt=function(y){var S=B.value,R=S.orders,M=y.order||null,F=R.indexOf(M)+1;return R[F<R.length?F:0]},Ht=function(y){var S=H.version,R=E.toStringJSON(localStorage.getItem(y)||"");return R&&R._v===S?R:{_v:S}},yt=function(y){var S=c.fullAllDataRowIdData,R={};return E.each(y,function(M,F){S[F]&&(R[F]=M)}),R},At=function(y){var S=c.fullDataRowIdData,R=[];return E.each(y,function(M,F){S[F]&&Q.findRowIndexOf(R,S[F].row)===-1&&R.push(S[F].row)}),R},Wt=function(){var y=c.visibleColumn,S=x.value,R=S?S.$el:null;if(R){for(var M=R.scrollLeft,F=R.clientWidth,K=M+F,Y=-1,ae=0,fe=0,Ae=0,Le=y.length;Ae<Le&&(ae+=y[Ae].renderWidth,Y===-1&&M<ae&&(Y=Ae),!(Y>=0&&(fe++,ae>K)));Ae++);return{toVisibleIndex:Math.max(0,Y),visibleSize:Math.max(8,fe)}}return{toVisibleIndex:0,visibleSize:8}},ut=function(){var y=b.value,S=x.value,R=S?S.$el:null,M=o.value,F=le.value;if(R){var K=y?y.$el:null,Y=0,ae=void 0;ae=R.querySelector("tr"),!ae&&K&&(ae=K.querySelector("tr")),ae&&(Y=ae.clientHeight),Y||(Y=F[M||"default"]);var fe=Math.max(8,Math.ceil(R.clientHeight/Y)+2);return{rowHeight:Y,visibleSize:fe}}return{rowHeight:0,visibleSize:8}},Bt=function(y,S,R){for(var M=0,F=y.length;M<F;M++){var K=y[M],Y=S.startIndex,ae=S.endIndex,fe=K[R],Ae=K[R+"span"],Le=fe+Ae;fe<Y&&Y<Le&&(S.startIndex=fe),fe<ae&&ae<Le&&(S.endIndex=Le),(S.startIndex!==Y||S.endIndex!==ae)&&(M=-1)}},Ut=function(y,S,R){if(y){var M=t.treeConfig,F=c.visibleColumn;E.isArray(y)||(y=[y]),M&&y.length&&jr("vxe.error.noTree",["merge-cells | merge-footer-items"]),y.forEach(function(K){var Y=K.row,ae=K.col,fe=K.rowspan,Ae=K.colspan;if(R&&E.isNumber(Y)&&(Y=R[Y]),E.isNumber(ae)&&(ae=F[ae]),(R?Y:E.isNumber(Y))&&ae&&(fe||Ae)&&(fe=E.toNumber(fe)||1,Ae=E.toNumber(Ae)||1,fe>1||Ae>1)){var Le=E.findIndexOf(S,function(Be){return(Be._row===Y||tt(Q,Be._row)===tt(Q,Y))&&(Be._col.id===ae||Be._col.id===ae.id)}),Fe=S[Le];if(Fe)Fe.rowspan=fe,Fe.colspan=Ae,Fe._rowspan=fe,Fe._colspan=Ae;else{var Ge=R?Q.findRowIndexOf(R,Y):Y,Ye=u.getVTColumnIndex(ae);S.push({row:Ge,col:Ye,rowspan:fe,colspan:Ae,_row:Y,_col:ae,_rowspan:fe,_colspan:Ae})}}})}},Or=function(y,S,R){var M=[];if(y){var F=t.treeConfig,K=c.visibleColumn;E.isArray(y)||(y=[y]),F&&y.length&&jr("vxe.error.noTree",["merge-cells | merge-footer-items"]),y.forEach(function(Y){var ae=Y.row,fe=Y.col;R&&E.isNumber(ae)&&(ae=R[ae]),E.isNumber(fe)&&(fe=K[fe]);var Ae=E.findIndexOf(S,function(Fe){return(Fe._row===ae||tt(Q,Fe._row)===tt(Q,ae))&&(Fe._col.id===fe||Fe._col.id===fe.id)});if(Ae>-1){var Le=S.splice(Ae,1);M.push(Le[0])}})}return M},Xr=function(){var y=c.tableFullColumn;y.forEach(function(S){S.order=null})},nn=function(y){var S=s.parentHeight,R=t[y],M=0;if(R)if(R==="auto")M=S;else{var F=Q.getExcludeHeight();mc(R)?M=Math.floor((E.toInteger(R)||1)/100*S):M=E.toNumber(R),M=Math.max(40,M-F)}return M},An=function(){var y=t.id,S=t.customConfig,R=c.collectColumn,M=Ue.value,F=M.storage,K=F===!0||F&&F.resizable,Y=F===!0||F&&F.visible,ae=F===!0||F&&F.fixed,fe=F===!0||F&&F.order;if(S&&(K||Y||ae||fe)){var Ae={};if(!y){jr("vxe.error.reqProp",["id"]);return}if(K){var Le=Ht(dp)[y];Le&&E.each(Le,function(Xe,ht){Ae[ht]={resizeWidth:Xe}})}if(ae){var Fe=Ht(pp)[y];if(Fe){var Ge=Fe.split(",");Ge.forEach(function(Xe){var ht=Xe.split("|"),it=ht[0],ft=ht[1];Ae[it]?Ae[it].fixed=ft:Ae[it]={fixed:ft}})}}if(fe&&Ht(JG)[y],Y){var Ye=Ht(hp)[y];if(Ye){var Be=Ye.split("|"),et=Be[0]?Be[0].split(","):[],Ze=Be[1]?Be[1].split(","):[];et.forEach(function(Xe){Ae[Xe]?Ae[Xe].visible=!1:Ae[Xe]={visible:!1}}),Ze.forEach(function(Xe){Ae[Xe]?Ae[Xe].visible=!0:Ae[Xe]={visible:!0}})}}var Ne={};E.eachTree(R,function(Xe){var ht=Xe.getKey();ht&&(Ne[ht]=Xe)}),E.each(Ae,function(Xe,ht){var it=Xe.visible,ft=Xe.resizeWidth,St=Xe.fixed,Vt=Xe.order,er=Ne[ht];er&&(E.isNumber(ft)&&(er.resizeWidth=ft),E.isBoolean(it)&&(er.visible=it),St&&(er.fixed=St),Vt&&(er.customOrder=Vt))})}},an=function(){var y=c.tableFullColumn,S=c.collectColumn,R=c.fullColumnIdData={},M=c.fullColumnFieldData={};C.value,ye.value,me.value;var F=S.some(Qs),K=!!t.showOverflow,Y,ae,fe=function(Ae,Le,Fe,Ge,Ye){var Be=Ae.id,et=Ae.field;Ae.fixed;var Ze=Ae.type,Ne=Ae.treeNode,Xe={column:Ae,colid:Be,index:Le,items:Fe,parent:Ye};et&&(M[et]=Xe),Ne?ae||(ae=Ae):Ze==="expand"&&(Y||(Y=Ae)),K&&Ae.showOverflow===!1&&(K=!1),R[Be]&&jr("vxe.error.colRepet",["colId",Be]),R[Be]=Xe};F?E.eachTree(S,function(Ae,Le,Fe,Ge,Ye,Be){Ae.level=Be.length,fe(Ae,Le,Fe,Ge,Ye)}):y.forEach(fe),s.isGroup=F,s.treeNodeColumn=ae,s.expandColumn=Y,s.isAllOverflow=K},on=function(){c.customHeight=nn("height"),c.customMinHeight=nn("minHeight"),c.customMaxHeight=nn("maxHeight")},Hr=function(){var y=b.value,S=x.value,R=T.value,M=S?S.$el:null,F=y?y.$el:null,K=R?R.$el:null;if(M){var Y=0,ae=40,fe=M.clientWidth-1,Ae=fe,Le=Ae/100,Fe=t.fit,Ge=s.columnStore,Ye=Ge.resizeList,Be=Ge.pxMinList,et=Ge.pxList,Ze=Ge.scaleList,Ne=Ge.scaleMinList,Xe=Ge.autoList;if(Be.forEach(function(Lt){var Nt=E.toInteger(Lt.minWidth);Y+=Nt,Lt.renderWidth=Nt}),Ne.forEach(function(Lt){var Nt=Math.floor(E.toInteger(Lt.minWidth)*Le);Y+=Nt,Lt.renderWidth=Nt}),Ze.forEach(function(Lt){var Nt=Math.floor(E.toInteger(Lt.width)*Le);Y+=Nt,Lt.renderWidth=Nt}),et.forEach(function(Lt){var Nt=E.toInteger(Lt.width);Y+=Nt,Lt.renderWidth=Nt}),Ye.forEach(function(Lt){var Nt=E.toInteger(Lt.resizeWidth);Y+=Nt,Lt.renderWidth=Nt}),Ae-=Y,Le=Ae>0?Math.floor(Ae/(Ne.length+Be.length+Xe.length)):0,Fe?Ae>0&&Ne.concat(Be).forEach(function(Lt){Y+=Le,Lt.renderWidth+=Le}):Le=ae,Xe.forEach(function(Lt){var Nt=Math.max(Le,ae);Lt.renderWidth=Nt,Y+=Nt}),Fe){var ht=Ze.concat(Ne).concat(Be).concat(Xe),it=ht.length-1;if(it>0){var ft=fe-Y;if(ft>0){for(;ft>0&&it>=0;)ft--,ht[it--].renderWidth++;Y=fe}}}var St=M.offsetHeight,Vt=M.scrollHeight>M.clientHeight,er=0;Vt&&(er=Math.max(M.offsetWidth-M.clientWidth,0)),s.scrollbarWidth=er,s.overflowY=Vt,c.tableWidth=Y,c.tableHeight=St;var ir=0;F&&(ir=F.clientHeight,Ie(function(){F&&M&&F.scrollLeft!==M.scrollLeft&&(F.scrollLeft=M.scrollLeft)})),c.headerHeight=ir;var mt=!1,Ft=0,ar=0;K?(Ft=K.offsetHeight,mt=Y>K.clientWidth,mt&&(ar=Math.max(Ft-K.clientHeight,0))):(mt=Y>fe,mt&&(ar=Math.max(St-M.clientHeight,0))),c.footerHeight=Ft,s.overflowX=mt,s.scrollbarHeight=ar,on(),s.parentHeight=Math.max(c.headerHeight+Ft+20,f.getParentHeight()),mt&&f.checkScrolling()}},Zr=function(y){var S=y.sortBy,R=y.sortType;return function(M){var F;return S?F=E.isFunction(S)?S({row:M,column:y}):E.get(M,S):F=f.getCellLabel(M,y),!R||R==="auto"?isNaN(F)?F:E.toNumber(F):R==="number"?E.toNumber(F):R==="string"?E.toValueString(F):F}},Kn=function(){var y=t.treeConfig,S=c.afterFullData,R=c.fullDataRowIdData,M=c.fullAllDataRowIdData,F=c.afterTreeFullData,K=U.value,Y=K.children||K.childrenField,ae={};y?E.eachTree(F,function(fe,Ae,Le,Fe){var Ge=tt(Q,fe),Ye=M[Ge],Be=Fe.map(function(Ze,Ne){return Ne%2===0?Number(Ze)+1:"."}).join("");if(Ye)Ye.seq=Be,Ye._index=Ae;else{var et={row:fe,rowid:Ge,seq:Be,index:-1,$index:-1,_index:Ae,items:[],parent:null,level:0};M[Ge]=et,R[Ge]=et}ae[Ge]=fe},{children:K.transform?K.mapChildrenField:Y}):S.forEach(function(fe,Ae){var Le=tt(Q,fe),Fe=M[Le],Ge=Ae+1;if(Fe)Fe.seq=Ge,Fe._index=Ae;else{var Ye={row:fe,rowid:Le,seq:Ge,index:-1,$index:-1,_index:Ae,items:[],parent:null,level:0};M[Le]=Ye,R[Le]=Ye}ae[Le]=fe}),c.afterFullRowMaps=ae},sn=function(){var y=t.treeConfig,S=s.treeExpandedMaps,R=U.value;if(y&&R.transform){var M=[],F={};return E.eachTree(c.afterTreeFullData,function(K,Y,ae,fe,Ae){var Le=tt(Q,K),Fe=tt(Q,Ae);(!Ae||F[Fe]&&S[Fe])&&(F[Le]=1,M.push(K))},{children:R.mapChildrenField}),c.afterFullData=M,Fn(M),M}return c.afterFullData},Yn=function(){var y=t.treeConfig,S=c.tableFullColumn,R=c.tableFullData,M=c.tableFullTreeData,F=w.value,K=B.value,Y=U.value,ae=Y.transform,fe=F.remote,Ae=F.filterMethod,Le=K.remote,Fe=K.sortMethod,Ge=K.multiple,Ye=K.chronological,Be=[],et=[];if(!fe||!Le){var Ze=[],Ne=[];if(S.forEach(function(it){var ft=it.field,St=it.sortable,Vt=it.order,er=it.filters;if(!fe&&er&&er.length){var ir=[],mt=[];er.forEach(function(Ft){Ft.checked&&(mt.push(Ft),ir.push(Ft.value))}),mt.length&&Ze.push({column:it,valueList:ir,itemList:mt})}!Le&&St&&Vt&&Ne.push({column:it,field:ft,property:ft,order:Vt,sortTime:it.sortTime})}),Ge&&Ye&&Ne.length>1&&(Ne=E.orderBy(Ne,"sortTime")),!fe&&Ze.length){var Xe=function(it){return Ze.every(function(ft){var St=ft.column,Vt=ft.valueList,er=ft.itemList,ir=St.filterMethod,mt=St.filterRender,Ft=mt?ot.renderer.get(mt.name):null,ar=Ft?Ft.filterMethod:null,Lt=Ft?Ft.defaultFilterMethod:null,Nt=la(it,St);return ir?er.some(function(Cn){return ir({value:Cn.value,option:Cn,cellValue:Nt,row:it,column:St,$table:Q})}):ar?er.some(function(Cn){return ar({value:Cn.value,option:Cn,cellValue:Nt,row:it,column:St,$table:Q})}):Ae?Ae({options:er,values:Vt,cellValue:Nt,row:it,column:St}):Lt?er.some(function(Cn){return Lt({value:Cn.value,option:Cn,cellValue:Nt,row:it,column:St,$table:Q})}):Vt.indexOf(E.get(it,St.field))>-1})};y&&ae?(et=E.searchTree(M,Xe,Dr(Dr({},Y),{original:!0})),Be=et):(Be=y?M.filter(Xe):R.filter(Xe),et=Be)}else y&&ae?(et=E.searchTree(M,function(){return!0},Dr(Dr({},Y),{original:!0})),Be=et):(Be=y?M.slice(0):R.slice(0),et=Be);if(!Le&&Ne.length)if(y&&ae){if(Fe){var ht=Fe({data:et,sortList:Ne,$table:Q});et=E.isArray(ht)?ht:et}else et=E.orderBy(et,Ne.map(function(it){var ft=it.column,St=it.order;return[Zr(ft),St]}));Be=et}else{if(Fe){var ht=Fe({data:Be,sortList:Ne,$table:Q});Be=E.isArray(ht)?ht:Be}else Be=E.orderBy(Be,Ne.map(function(it){var ft=it.column,St=it.order;return[Zr(ft),St]}));et=Be}}else y&&ae?(et=E.searchTree(M,function(){return!0},Dr(Dr({},Y),{original:!0})),Be=et):(Be=y?M.slice(0):R.slice(0),et=Be);c.afterFullData=Be,c.afterTreeFullData=et,Kn()},dr=function(){var y=t.border,S=t.showFooter,R=t.showOverflow,M=t.showHeaderOverflow,F=t.showFooterOverflow,K=t.mouseConfig,Y=t.spanMethod,ae=t.footerSpanMethod,fe=t.keyboardConfig,Ae=s.isGroup,Le=s.currentRow,Fe=s.tableColumn,Ge=s.scrollXLoad,Ye=s.scrollYLoad,Be=s.scrollbarWidth,et=s.scrollbarHeight,Ze=s.columnStore,Ne=s.editStore,Xe=s.mergeList,ht=s.mergeFooterList,it=s.isAllOverflow,ft=c.visibleColumn,St=c.fullColumnIdData,Vt=c.tableHeight,er=c.tableWidth,ir=c.headerHeight,mt=c.footerHeight,Ft=c.elemStore,ar=c.customHeight,Lt=c.customMinHeight,Nt=c.customMaxHeight,Cn=["main","left","right"],Mo=V.value,Wl=$e.value,Fo=C.value,va=ie.value,Po=Ft["main-body-wrapper"],No=Po?Po.value:null;return Mo&&(Mo.style.top="".concat(ir,"px"),Mo.style.height=No?"".concat(No.offsetHeight-et,"px"):""),ar>0&&S&&(ar+=et),Cn.forEach(function(ei,$o){var vn=$o>0?ei:"",Ch=["header","body","footer"],Ha=vn==="left",ma=[],Ki;vn&&(ma=Ha?Ze.leftList:Ze.rightList,Ki=Ha?P.value:W.value),Ch.forEach(function(In){var Gl=Ft["".concat(ei,"-").concat(In,"-wrapper")],cn=Gl?Gl.value:null,zl=Ft["".concat(ei,"-").concat(In,"-table")],Yi=zl?zl.value:null;if(In==="header"){var _n=er,ti=Fe;Ae?ti=ft:vn&&(Ge||M)&&(ti=ma),_n=ti.reduce(function(Va,ja){return Va+ja.renderWidth},0),Yi&&(Yi.style.width=_n?"".concat(_n+Be,"px"):"");var vy=Ft["".concat(ei,"-").concat(In,"-repair")],my=vy?vy.value:null;my&&(my.style.width="".concat(er,"px"));var gy=Ft["".concat(ei,"-").concat(In,"-list")],yy=gy?gy.value:null;Ae&&yy&&E.arrayEach(yy.querySelectorAll(".col--group"),function(Va){var ja=u.getColumnNode(Va);if(ja){var un=ja.item,hi=un.showHeaderOverflow,Wa=E.isBoolean(hi)?hi:M,Kl=Wa==="ellipsis",ga=Wa==="title",Rh=Wa===!0||Wa==="tooltip",Wu=ga||Rh||Kl,Gu=0,ks=0;Wu&&E.eachTree(un.children,function(Yl){(!Yl.children||!un.children.length)&&ks++,Gu+=Yl.renderWidth},{children:"children"}),Va.style.width=Wu?"".concat(Gu-ks-(y?2:0),"px"):""}})}else if(In==="body"){var by=Ft["".concat(ei,"-").concat(In,"-emptyBlock")],xy=by?by.value:null;if(tp(cn)){var Ih=vn?Lt-ir-mt-(S?0:et):Lt-ir-mt,ju=0;if(Nt&&(ju=Math.max(Ih,vn?Nt-ir-(S?0:et):Nt-ir-mt),cn.style.maxHeight="".concat(ju,"px")),ar>0){var _h=vn?(ar>0?ar-ir-mt:Vt)-(S?0:et):ar-ir-mt;ju&&(_h=Math.min(ju,_h)),cn.style.height="".concat(Math.max(Ih,_h),"px")}else cn.style.height="";cn.style.minHeight="".concat(Ih,"px")}Ki&&(tp(cn)&&(cn.style.top="".concat(ir,"px")),Ki.style.height="".concat((ar>0?ar-ir-mt:Vt)+ir+mt-et*(S?2:1),"px"),Ki.style.width="".concat(ma.reduce(function(un,hi){return un+hi.renderWidth},Ha?0:Be),"px"));var _n=er,ti=Fe;vn&&(!s.expandColumn&&(Ye||R&&it)&&!Xe.length&&!Y&&!(fe&&va.isMerge)?ti=ma:ti=ft),_n=ti.reduce(function(un,hi){return un+hi.renderWidth},0),Yi&&(Yi.style.width=_n?"".concat(_n,"px"):"",Yi.style.paddingRight=Be&&vn&&(ii["-moz"]||ii.safari)?"".concat(Be,"px"):""),xy&&(xy.style.width=_n?"".concat(_n,"px"):"")}else if(In==="footer"){var _n=er,ti=Fe;vn&&(!s.expandColumn&&(Ge||F)&&(!ht.length||!ae)?ti=ma:ti=ft),_n=ti.reduce(function(un,hi){return un+hi.renderWidth},0),tp(cn)&&(Ki&&(cn.style.top="".concat(ar>0?ar-mt:Vt+ir,"px")),cn.style.marginTop="".concat(-Math.max(1,et),"px")),Yi&&(Yi.style.width=_n?"".concat(_n+Be,"px"):"")}var Ay=Ft["".concat(ei,"-").concat(In,"-colgroup")],Ey=Ay?Ay.value:null;Ey&&E.arrayEach(Ey.children,function(Va){var ja=Va.getAttribute("name");if(ja==="col_gutter"&&(Va.style.width="".concat(Be,"px")),St[ja]){var un=St[ja].column,hi=un.showHeaderOverflow,Wa=un.showFooterOverflow,Kl=un.showOverflow,ga=void 0;Va.style.width="".concat(un.renderWidth,"px"),In==="header"?ga=E.isUndefined(hi)||E.isNull(hi)?M:hi:In==="footer"?ga=E.isUndefined(Wa)||E.isNull(Wa)?F:Wa:ga=E.isUndefined(Kl)||E.isNull(Kl)?R:Kl;var Rh=ga==="ellipsis",Wu=ga==="title",Gu=ga===!0||ga==="tooltip",ks=Wu||Gu||Rh,Yl=Ft["".concat(ei,"-").concat(In,"-list")],Ty=Yl?Yl.value:null;Ye&&!ks&&(ks=!0),Ty&&E.arrayEach(Ty.querySelectorAll(".".concat(un.id)),function(Sy){var Lh=parseInt(Sy.getAttribute("colspan")||1),wy=Sy.querySelector(".vxe-cell"),Cy=un.renderWidth;if(wy){if(Lh>1)for(var lD=u.getColumnIndex(un),Dh=1;Dh<Lh;Dh++){var Iy=u.getColumns(lD+Dh);Iy&&(Cy+=Iy.renderWidth)}wy.style.width=ks?"".concat(Cy-Wl*Lh,"px"):""}})}})})}),Le&&u.setCurrentRow(Le),K&&Fo.selected&&Ne.selected.row&&Ne.selected.column&&Q.addCellSelectedClass(),Ie()},Nr=function(y){return Q.triggerValidate?Q.triggerValidate(y):Ie()},Mn=function(y,S){Nr("blur").catch(function(R){return R}).then(function(){Q.handleActived(S,y).then(function(){return Nr("change")}).catch(function(R){return R})})},qn=function(){var y=t.sortConfig;if(y){var S=B.value,R=S.defaultSort;R&&(E.isArray(R)||(R=[R]),R.length&&((y.multiple?R:R.slice(0,1)).forEach(function(M,F){var K=M.field,Y=M.order;if(K&&Y){var ae=u.getColumnByField(K);ae&&ae.sortable&&(ae.order=Y,ae.sortTime=Date.now()+F)}}),S.remote||f.handleTableData(!0).then(dr)))}},Xn=function(){var y=t.checkboxConfig;if(y){var S=c.fullDataRowIdData,R=ce.value,M=R.checkAll,F=R.checkRowKeys;if(M)Zn(!0,!0);else if(F){var K=[];F.forEach(function(Y){S[Y]&&K.push(S[Y].row)}),gr(K,!0,!0)}}},En=function(){var y,S=t.radioConfig;if(S){var R=c.fullDataRowIdData,M=we.value,F=M.checkRowKey,K=M.reserve;if(F&&(R[F]&&$r(R[F].row,!0),K)){var Y=Ko(Q);c.radioReserveRow=(y={},y[Y]=F,y)}}},ui=function(){var y=t.expandConfig;if(y){var S=c.fullDataRowIdData,R=De.value,M=R.expandAll,F=R.expandRowKeys;if(M)u.setAllRowExpand(!0);else if(F){var K=[];F.forEach(function(Y){S[Y]&&K.push(S[Y].row)}),u.setRowExpand(K,!0)}}},Wi=function(y){var S=we.value;S.reserve&&(c.radioReserveRow=y)},ln=function(y,S){var R=c.checkboxReserveRowMap,M=ce.value;if(M.reserve){var F=tt(Q,y);S?R[F]=y:R[F]&&delete R[F]}},$r=function(y,S){var R=we.value,M=R.checkMethod;return y&&(S||!M||M({row:y}))&&(s.selectRadioRow=y,Wi(y)),Ie()},gr=function(y,S,R){return y&&!E.isArray(y)&&(y=[y]),y.forEach(function(M){return f.handleSelectRow({row:M},!!S,R)}),Ie()},Zn=function(y,S){var R=t.treeConfig,M=s.selectCheckboxMaps,F=c.afterFullData,K=c.afterFullRowMaps,Y=c.checkboxReserveRowMap,ae=U.value,fe=ae.children||ae.childrenField,Ae=ce.value,Le=Ae.checkField,Fe=Ae.reserve,Ge=Ae.checkStrictly,Ye=Ae.checkMethod,Be=Ae.indeterminateField||Ae.halfField,et={};if(R||E.each(M,function(Ne,Xe){K[Xe]||(et[Xe]=Ne)}),Ge)s.isAllSelected=y;else{if(Le){var Ze=function(Ne){(S||!Ye||Ye({row:Ne}))&&(y&&(et[tt(Q,Ne)]=Ne),E.set(Ne,Le,y)),R&&Be&&E.set(Ne,Be,!1)};R?E.eachTree(F,Ze,{children:fe}):F.forEach(Ze)}else R?y?E.eachTree(F,function(Ne){(S||!Ye||Ye({row:Ne}))&&(et[tt(Q,Ne)]=Ne)},{children:fe}):!S&&Ye&&E.eachTree(F,function(Ne){var Xe=tt(Q,Ne);!Ye({row:Ne})&&M[Xe]&&(et[Xe]=Ne)},{children:fe}):y?!S&&Ye?F.forEach(function(Ne){var Xe=tt(Q,Ne);(M[Xe]||Ye({row:Ne}))&&(et[Xe]=Ne)}):F.forEach(function(Ne){et[tt(Q,Ne)]=Ne}):!S&&Ye&&F.forEach(function(Ne){var Xe=tt(Q,Ne);!Ye({row:Ne})&&M[Xe]&&(et[Xe]=Ne)});Fe&&(y?E.each(et,function(Ne,Xe){Y[Xe]=Ne}):F.forEach(function(Ne){return ln(Ne,!1)})),s.selectCheckboxMaps=Le?{}:et}return s.treeIndeterminateMaps={},c.treeIndeterminateRowMaps={},f.checkSelectionStatus(),Ie()},fi=function(){var y=t.treeConfig,S=s.expandColumn,R=s.currentRow,M=s.selectCheckboxMaps,F=s.selectRadioRow,K=s.rowExpandedMaps,Y=s.treeExpandedMaps,ae=c.fullDataRowIdData,fe=c.fullAllDataRowIdData,Ae=c.radioReserveRow,Le=De.value,Fe=U.value,Ge=we.value,Ye=ce.value;if(F&&!fe[tt(Q,F)]&&(s.selectRadioRow=null),Ge.reserve&&Ae){var Be=tt(Q,Ae);ae[Be]&&$r(ae[Be].row,!0)}s.selectCheckboxMaps=yt(M),Ye.reserve&&gr(At(c.checkboxReserveRowMap),!0,!0),R&&!fe[tt(Q,R)]&&(s.currentRow=null),s.rowExpandedMaps=S?yt(K):{},S&&Le.reserve&&u.setRowExpand(At(c.rowExpandedReserveRowMap),!0),s.treeExpandedMaps=y?yt(Y):{},y&&Fe.reserve&&u.setTreeExpand(At(c.treeExpandedReserveRowMap),!0)},Ci=function(){var y=t.treeConfig;if(y){var S=c.tableFullData,R=U.value,M=R.expandAll,F=R.expandRowKeys,K=R.children||R.childrenField;if(M)u.setAllTreeExpand(!0);else if(F){var Y=[],ae=Ko(Q);F.forEach(function(fe){var Ae=E.findTree(S,function(Le){return fe===E.get(Le,ae)},{children:K});Ae&&Y.push(Ae.item)}),u.setTreeExpand(Y,!0)}}},Ii=function(y){var S=U.value,R=ce.value,M=S.transform,F=S.loadMethod,K=R.checkStrictly;return new Promise(function(Y){if(F){var ae=s.treeExpandLazyLoadedMaps,fe=c.fullAllDataRowIdData,Ae=tt(Q,y),Le=fe[Ae];ae[Ae]=y,F({$table:Q,row:y}).then(function(Fe){if(Le.treeLoaded=!0,ae[Ae]&&delete ae[Ae],E.isArray(Fe)||(Fe=[]),Fe)return u.loadTreeChildren(y,Fe).then(function(Ge){var Ye=s.treeExpandedMaps;return Ge.length&&!Ye[Ae]&&(Ye[Ae]=y),!K&&u.isCheckedByCheckboxRow(y)&&gr(Ge,!0),Ie().then(function(){if(M)return f.handleTableData()})})}).catch(function(){var Fe=s.treeExpandLazyLoadedMaps;Le.treeLoaded=!1,Fe[Ae]&&delete Fe[Ae]}).finally(function(){Ie().then(function(){return u.recalculate()}).then(function(){return Y()})})}else Y()})},Tn=function(y,S){var R=c.treeExpandedReserveRowMap,M=U.value;if(M.reserve){var F=tt(Q,y);S?R[F]=y:R[F]&&delete R[F]}},Sn=function(y){return new Promise(function(S){var R=De.value,M=R.loadMethod;if(M){var F=c.fullAllDataRowIdData,K=s.rowExpandLazyLoadedMaps,Y=tt(Q,y),ae=F[Y];K[Y]=y,M({$table:Q,row:y,rowIndex:u.getRowIndex(y),$rowIndex:u.getVMRowIndex(y)}).then(function(){var fe=s.rowExpandedMaps;ae.expandLoaded=!0,fe[Y]=y}).catch(function(){ae.expandLoaded=!1}).finally(function(){var fe=s.rowExpandLazyLoadedMaps;fe[Y]&&delete fe[Y],Ie().then(function(){return u.recalculate()}).then(function(){return S()})})}else S()})},hr=function(y,S){var R=c.rowExpandedReserveRowMap,M=De.value;if(M.reserve){var F=tt(Q,y);S?R[F]=y:R[F]&&delete R[F]}},cr=function(){var y=t.mergeCells;y&&u.setMergeCells(y)},Lr=function(){var y=t.mergeFooterItems;y&&u.setMergeFooterItems(y)},Jn=function(){return Ie().then(function(){var y=s.scrollXLoad,S=s.scrollYLoad,R=c.scrollXStore,M=c.scrollYStore,F=Z.value,K=N.value;if(y){var Y=Wt().visibleSize,ae=K.oSize?E.toNumber(K.oSize):ii.edge?5:0;R.offsetSize=ae,R.visibleSize=Y,R.endIndex=Math.max(R.startIndex+R.visibleSize+ae,R.endIndex),f.updateScrollXData()}else f.updateScrollXSpace();var fe=ut(),Ae=fe.rowHeight,Le=fe.visibleSize;if(M.rowHeight=Ae,S){var Fe=F.oSize?E.toNumber(F.oSize):ii.edge?10:0;M.offsetSize=Fe,M.visibleSize=Le,M.endIndex=Math.max(M.startIndex+Le+Fe,M.endIndex),f.updateScrollYData()}else f.updateScrollYSpace();s.rowHeight=Ae,Ie(dr)})},Gi=function(y){var S=t.keepSource,R=t.treeConfig,M=s.editStore,F=s.scrollYLoad,K=c.scrollYStore,Y=c.scrollXStore,ae=c.lastScrollLeft,fe=c.lastScrollTop,Ae=U.value,Le=Ae.transform,Fe=Ae.children||Ae.childrenField,Ge=[],Ye=y?y.slice(0):[];R&&(Le?(Ge=E.toArrayTree(Ye,{key:Ae.rowField,parentKey:Ae.parentField,children:Fe,mapChildren:Ae.mapChildrenField}),Ye=Ge.slice(0)):Ge=Ye.slice(0)),K.startIndex=0,K.endIndex=1,Y.startIndex=0,Y.endIndex=1,s.scrollVMLoading=!1,M.insertMaps={},M.removeMaps={};var Be=Fn(Ye);return s.scrollYLoad=Be,c.tableFullData=Ye,c.tableFullTreeData=Ge,f.cacheRowMap(!0),c.tableSynchData=y,S&&f.cacheSourceMap(Ye),Q.clearCellAreas&&t.mouseConfig&&(Q.clearCellAreas(),Q.clearCopyCellArea()),u.clearMergeCells(),u.clearMergeFooterItems(),f.handleTableData(!0),u.updateFooter(),Ie().then(function(){on(),dr()}).then(function(){Jn()}).then(function(){return Be&&(K.endIndex=K.visibleSize),fi(),f.checkSelectionStatus(),new Promise(function(et){Ie().then(function(){return u.recalculate()}).then(function(){var Ze=ae,Ne=fe,Xe=N.value,ht=Z.value;Xe.scrollToLeftOnChange&&(Ze=0),ht.scrollToTopOnChange&&(Ne=0),F===Be?rp(Q,Ze,Ne).then(et):setTimeout(function(){return rp(Q,Ze,Ne).then(et)})})})})},Qn=function(){Xn(),En(),ui(),Ci(),cr(),Lr(),Ie(function(){return setTimeout(function(){return u.recalculate()})})},ha=function(){qn()},_i=function(){var y=s.scrollXLoad,S=c.visibleColumn,R=c.scrollXStore,M=c.fullColumnIdData,F=y?S.slice(R.startIndex,R.endIndex):S.slice(0);F.forEach(function(K,Y){var ae=K.id,fe=M[ae];fe&&(fe.$index=Y)}),s.tableColumn=F},Ls=function(){var y=s.mergeList,S=s.mergeFooterList,R=c.scrollXStore,M=R.startIndex,F=R.endIndex,K=R.offsetSize,Y=Wt(),ae=Y.toVisibleIndex,fe=Y.visibleSize,Ae={startIndex:Math.max(0,ae-1-K),endIndex:ae+fe+K};Bt(y.concat(S),Ae,"col");var Le=Ae.startIndex,Fe=Ae.endIndex;(ae<=M||ae>=F-fe-1)&&(M!==Le||F!==Fe)&&(R.startIndex=Le,R.endIndex=Fe,f.updateScrollXData()),u.closeTooltip()},di=function(y){var S=[];return y.forEach(function(R){S.push.apply(S,R.children&&R.children.length?di(R.children):[R])}),S},Vr=function(){var y=[],S=[],R=[],M=s.isGroup,F=s.columnStore,K=N.value,Y=c.collectColumn,ae=c.tableFullColumn,fe=c.scrollXStore,Ae=c.fullColumnIdData;if(M){var Le=[],Fe=[],Ge=[];E.eachTree(Y,function(Ze,Ne,Xe,ht,it){var ft=Qs(Ze);it&&it.fixed&&(Ze.fixed=it.fixed),it&&Ze.fixed!==it.fixed&&jr("vxe.error.groupFixed"),ft?Ze.visible=!!E.findTree(Ze.children,function(St){return Qs(St)?!1:St.visible}):Ze.visible&&(Ze.fixed==="left"?y.push(Ze):Ze.fixed==="right"?R.push(Ze):S.push(Ze))}),Y.forEach(function(Ze){Ze.visible&&(Ze.fixed==="left"?Le.push(Ze):Ze.fixed==="right"?Ge.push(Ze):Fe.push(Ze))}),s.tableGroupColumn=Le.concat(Fe).concat(Ge)}else ae.forEach(function(Ze){Ze.visible&&(Ze.fixed==="left"?y.push(Ze):Ze.fixed==="right"?R.push(Ze):S.push(Ze))});var Ye=y.concat(S).concat(R),Be=!!K.enabled&&K.gt>-1&&(K.gt===0||K.gt<ae.length);if(s.hasFixedColumn=y.length>0||R.length>0,Object.assign(F,{leftList:y,centerList:S,rightList:R}),Be){var et=Wt().visibleSize;fe.startIndex=0,fe.endIndex=et,fe.visibleSize=et}return(Ye.length!==c.visibleColumn.length||!c.visibleColumn.every(function(Ze,Ne){return Ze===Ye[Ne]}))&&(u.clearMergeCells(),u.clearMergeFooterItems()),s.scrollXLoad=Be,Ye.forEach(function(Ze,Ne){var Xe=Ze.id,ht=Ae[Xe];ht&&(ht._index=Ne)}),c.visibleColumn=Ye,_i(),u.updateFooter().then(function(){return u.recalculate()}).then(function(){return u.updateCellAreas(),u.recalculate()})},zi=function(y){c.collectColumn=y;var S=di(y);return c.tableFullColumn=S,an(),An(),Vr().then(function(){s.scrollXLoad&&Ls()}),u.clearMergeCells(),u.clearMergeFooterItems(),f.handleTableData(!0),Ie().then(function(){return pe&&pe.syncUpdate({collectColumn:y,$table:Q}),u.recalculate()})},Fn=function(y){var S=t.treeConfig,R=Z.value,M=U.value,F=M.transform,K=y||c.tableFullData,Y=(F||!S)&&!!R.enabled&&R.gt>-1&&(R.gt===0||R.gt<K.length);return s.scrollYLoad=Y,Y},wn=function(y,S){var R=s.treeExpandedMaps,M=s.treeExpandLazyLoadedMaps,F=s.treeNodeColumn,K=Dr({},R),Y=c.fullAllDataRowIdData,ae=c.tableFullData,fe=U.value,Ae=fe.reserve,Le=fe.lazy,Fe=fe.accordion,Ge=fe.toggleMethod,Ye=fe.children||fe.childrenField,Be=fe.hasChild||fe.hasChildField,et=[],Ze=u.getColumnIndex(F),Ne=u.getVMColumnIndex(F),Xe=Ge?y.filter(function(it){return Ge({$table:Q,expanded:S,column:F,columnIndex:Ze,$columnIndex:Ne,row:it})}):y;if(Fe){Xe=Xe.length?[Xe[Xe.length-1]]:[];var ht=E.findTree(ae,function(it){return it===Xe[0]},{children:Ye});ht&&ht.items.forEach(function(it){var ft=tt(Q,it);K[ft]&&delete K[ft]})}return S?Xe.forEach(function(it){var ft=tt(Q,it);if(!K[ft]){var St=Y[ft],Vt=Le&&it[Be]&&!St.treeLoaded&&!M[ft];Vt?et.push(Ii(it)):it[Ye]&&it[Ye].length&&(K[ft]=it)}}):Xe.forEach(function(it){var ft=tt(Q,it);K[ft]&&delete K[ft]}),Ae&&Xe.forEach(function(it){return Tn(it,S)}),s.treeExpandedMaps=K,Promise.all(et).then(function(){return u.recalculate()})},Ds=function(y,S){return wn(y,S).then(function(){return sn(),f.handleTableData()}).then(function(){return u.recalculate()})},ko=function(y){var S=s.mergeList,R=c.scrollYStore,M=R.startIndex,F=R.endIndex,K=R.visibleSize,Y=R.offsetSize,ae=R.rowHeight,fe=y.currentTarget||y.target,Ae=fe.scrollTop,Le=Math.floor(Ae/ae),Fe={startIndex:Math.max(0,Le-1-Y),endIndex:Le+K+Y};Bt(S,Fe,"row");var Ge=Fe.startIndex,Ye=Fe.endIndex;(Le<=M||Le>=F-K-1)&&(M!==Ge||F!==Ye)&&(R.startIndex=Ge,R.endIndex=Ye,f.updateScrollYData())},pa=function(y){return function(S){var R=c.fullAllDataRowIdData;if(S){var M=tt(Q,S),F=R[M];if(F)return F[y]}return-1}},Ri=function(y){return function(S){var R=c.fullColumnIdData;if(S){var M=R[S.id];if(M)return M[y]}return-1}},Jr=E.debounce(function(y){ko(y)},20,{leading:!1,trailing:!0}),Ua;u={dispatchEvent:function(y,S,R){n(y,Object.assign({$table:Q,$grid:G,$event:R},S))},clearAll:function(){return f7(Q)},syncData:function(){return Ie().then(function(){return s.tableData=[],n("update:data",c.tableFullData),Ie()})},updateData:function(){var y=s.scrollXLoad,S=s.scrollYLoad;return f.handleTableData(!0).then(function(){if(u.updateFooter(),y||S)return y&&f.updateScrollXSpace(),S&&f.updateScrollYSpace(),u.refreshScroll()}).then(function(){return u.updateCellAreas(),u.recalculate(!0)}).then(function(){setTimeout(function(){return Q.recalculate()},50)})},loadData:function(y){var S=c.inited,R=c.initStatus;return Gi(y).then(function(){return c.inited=!0,c.initStatus=!0,R||Qn(),S||ha(),u.recalculate()})},reloadData:function(y){var S=c.inited;return u.clearAll().then(function(){return c.inited=!0,c.initStatus=!0,Gi(y)}).then(function(){return Qn(),S||ha(),u.recalculate()})},reloadRow:function(y,S,R){var M=t.keepSource,F=s.tableData,K=c.tableSourceData;if(M){var Y=u.getRowIndex(y),ae=K[Y];if(ae&&y)if(R){var fe=E.get(S||y,R);E.set(y,R,fe),E.set(ae,R,fe)}else{var Ae=E.clone(Dr({},S),!0);E.destructuring(ae,Object.assign(y,Ae))}s.tableData=F.slice(0)}return Ie()},loadTreeChildren:function(y,S){var R=t.keepSource,M=c.tableSourceData,F=c.fullDataRowIdData,K=c.fullAllDataRowIdData,Y=c.sourceDataRowIdData,ae=U.value,fe=ae.transform,Ae=ae.mapChildrenField,Le=ae.children||ae.childrenField,Fe=K[tt(Q,y)],Ge=Fe?Fe.level:0;return u.createData(S).then(function(Ye){if(R){var Be=tt(Q,y),et=E.findTree(M,function(Ze){return Be===tt(Q,Ze)},{children:Le});et&&(et.item[Le]=E.clone(Ye,!0)),Ye.forEach(function(Ze){var Ne=tt(Q,Ze);Y[Ne]=E.clone(Ze,!0)})}return E.eachTree(Ye,function(Ze,Ne,Xe,ht,it,ft){var St=tt(Q,Ze),Vt={row:Ze,rowid:St,seq:-1,index:Ne,_index:-1,$index:-1,items:Xe,parent:it,level:Ge+ft.length};F[St]=Vt,K[St]=Vt},{children:Le}),y[Le]=Ye,fe&&(y[Ae]=Ye),Kn(),Ye})},loadColumn:function(y){var S=E.mapTree(y,function(R){return Jt(dt.createColumn(Q,R))});return zi(S)},reloadColumn:function(y){return u.clearAll().then(function(){return u.loadColumn(y)})},getRowNode:function(y){if(y){var S=c.fullAllDataRowIdData,R=y.getAttribute("rowid");if(R){var M=S[R];if(M)return{rowid:M.rowid,item:M.row,index:M.index,items:M.items,parent:M.parent}}}return null},getColumnNode:function(y){if(y){var S=c.fullColumnIdData,R=y.getAttribute("colid");if(R){var M=S[R];if(M)return{colid:M.colid,item:M.column,index:M.index,items:M.items,parent:M.parent}}}return null},getRowSeq:pa("seq"),getRowIndex:pa("index"),getVTRowIndex:pa("_index"),getVMRowIndex:pa("$index"),getColumnIndex:Ri("index"),getVTColumnIndex:Ri("_index"),getVMColumnIndex:Ri("$index"),createData:function(y){return Ie().then(function(){return Jt(f.defineField(y))})},createRow:function(y){var S=E.isArray(y);return S||(y=[y||{}]),u.createData(y).then(function(R){return S?R:R[0]})},revertData:function(y,S){var R=t.keepSource,M=c.tableSourceData,F=c.sourceDataRowIdData;if(!R)return Ie();var K=y;return y?E.isArray(y)||(K=[y]):K=E.toArray(Q.getUpdateRecords()),K.length&&K.forEach(function(Y){if(!u.isInsertByRow(Y)){var ae=tt(Q,Y),fe=F[ae];fe&&Y&&(S?E.set(Y,S,E.clone(E.get(fe,S),!0)):E.destructuring(Y,E.clone(fe,!0)))}}),y?Ie():u.reloadData(M)},clearData:function(y,S){var R=c.tableFullData,M=c.visibleColumn;return arguments.length?y&&!E.isArray(y)&&(y=[y]):y=R,S?y.forEach(function(F){return E.set(F,S,null)}):y.forEach(function(F){M.forEach(function(K){K.field&&Ca(F,K,null)})}),Ie()},isInsertByRow:function(y){var S=s.editStore,R=tt(Q,y);return S.insertMaps[R]},removeInsertRow:function(){var y=s.editStore;return y.insertMaps={},Q.remove(Q.getInsertRecords())},isUpdateByRow:function(y,S){var R=t.keepSource,M=c.tableFullColumn,F=c.fullDataRowIdData,K=c.sourceDataRowIdData;if(R){var Y=tt(Q,y);if(!F[Y])return!1;var ae=K[Y];if(ae){if(arguments.length>1)return!Ot(ae,y,S);for(var fe=0,Ae=M.length;fe<Ae;fe++){var Le=M[fe].field;if(Le&&!Ot(ae,y,Le))return!0}}}return!1},getColumns:function(y){var S=c.visibleColumn;return E.isUndefined(y)?S.slice(0):S[y]},getColumnById:function(y){var S=c.fullColumnIdData;return S[y]?S[y].column:null},getColumnByField:function(y){var S=c.fullColumnFieldData;return S[y]?S[y].column:null},getTableColumn:function(){return{collectColumn:c.collectColumn.slice(0),fullColumn:c.tableFullColumn.slice(0),visibleColumn:c.visibleColumn.slice(0),tableColumn:s.tableColumn.slice(0)}},getData:function(y){var S=t.data||c.tableSynchData;return E.isUndefined(y)?S.slice(0):S[y]},getCheckboxRecords:function(y){var S=t.treeConfig,R=c.tableFullData,M=c.afterFullData,F=c.afterTreeFullData,K=c.tableFullTreeData,Y=c.fullDataRowIdData,ae=c.afterFullRowMaps,fe=U.value,Ae=ce.value,Le=fe.transform,Fe=fe.mapChildrenField,Ge=Ae.checkField,Ye=fe.children||fe.childrenField,Be=[],et=y?Le?K:R:Le?F:M;if(Ge)S?Be=E.filterTree(et,function(Ne){return E.get(Ne,Ge)},{children:Le?Fe:Ye}):Be=et.filter(function(Ne){return E.get(Ne,Ge)});else{var Ze=s.selectCheckboxMaps;E.each(Ze,function(Ne,Xe){(y?Y[Xe]:ae[Xe])&&Be.push(Ne)})}return Be},getParentRow:function(y){var S=t.treeConfig,R=c.fullDataRowIdData;if(y&&S){var M=void 0;if(E.isString(y)?M=y:M=tt(Q,y),M)return R[M]?R[M].parent:null}return null},getRowById:function(y){var S=c.fullDataRowIdData,R=E.eqNull(y)?"":encodeURIComponent(y);return S[R]?S[R].row:null},getRowid:function(y){return tt(Q,y)},getTableData:function(){var y=s.tableData,S=s.footerTableData,R=c.tableFullData,M=c.afterFullData;return{fullData:R.slice(0),visibleData:M.slice(0),tableData:y.slice(0),footerData:S.slice(0)}},setColumnFixed:function(y,S){var R=Dn(Q,y),M=yA(Q,R),F=Je.value;return M&&M.fixed!==S?!M.fixed&&F?(ot.modal&&ot.modal.message({status:"error",content:H.i18n("vxe.table.maxFixedCol")}),Ie()):(E.eachTree([M],function(K){K.fixed=S}),f.saveCustomFixed(),u.refreshColumn()):Ie()},clearColumnFixed:function(y){var S=Dn(Q,y),R=yA(Q,S);return R&&R.fixed?(E.eachTree([R],function(M){M.fixed=null}),f.saveCustomFixed(),u.refreshColumn()):Ie()},hideColumn:function(y){var S=Dn(Q,y);return S&&S.visible?(S.visible=!1,f.handleCustom()):Ie()},showColumn:function(y){var S=Dn(Q,y);return S&&!S.visible?(S.visible=!0,f.handleCustom()):Ie()},setColumnWidth:function(y,S){var R=Dn(Q,y);if(R){var M=E.toInteger(S),F=M;if(mc(S)){var K=x.value,Y=K?K.$el:null,ae=Y?Y.clientWidth-1:0;F=Math.floor(M*ae)}R.renderWidth=F}return Ie()},getColumnWidth:function(y){var S=Dn(Q,y);return S?S.renderWidth:0},resetColumn:function(y){var S=c.collectColumn,R=Ue.value,M=R.checkMethod,F=Object.assign({visible:!0,resizable:y===!0,fixed:y===!0},y);return E.eachTree(S,function(K){F.resizable&&(K.resizeWidth=0),F.fixed&&(K.fixed=K.defaultFixed),(!M||M({column:K}))&&(K.visible=K.defaultVisible)}),F.resizable&&f.saveCustomResizable(!0),F.fixed&&f.saveCustomFixed(),f.handleCustom()},refreshColumn:function(){return Vr().then(function(){return u.refreshScroll()}).then(function(){return u.recalculate()})},refreshScroll:function(){var y=c.lastScrollLeft,S=c.lastScrollTop,R=x.value,M=T.value,F=O.value,K=k.value,Y=R?R.$el:null,ae=F?F.$el:null,fe=K?K.$el:null,Ae=M?M.$el:null;return new Promise(function(Le){if(y||S)return rp(Q,y,S).then().then(function(){setTimeout(Le,30)});sf(Y,S),sf(ae,S),sf(fe,S),pA(Ae,y),setTimeout(Le,30)})},recalculate:function(y){return Hr(),y===!0?Jn().then(function(){return Hr(),Jn()}):Jn()},openTooltip:function(y,S){var R=p.value;return R?R.open(y,S):Ie()},closeTooltip:function(){var y=s.tooltipStore,S=h.value,R=p.value;return y.visible&&(Object.assign(y,{row:null,column:null,content:null,visible:!1}),S&&S.close()),R&&R.close(),Ie()},isAllCheckboxChecked:function(){return s.isAllSelected},isAllCheckboxIndeterminate:function(){return!s.isAllSelected&&s.isIndeterminate},getCheckboxIndeterminateRecords:function(y){var S=t.treeConfig,R=c.fullDataRowIdData,M=s.treeIndeterminateMaps;if(S){var F=[],K=[];return E.each(M,function(Y,ae){Y&&(F.push(Y),R[ae]&&K.push(Y))}),y?F:K}return[]},setCheckboxRow:function(y,S){return gr(y,S,!0)},isCheckedByCheckboxRow:function(y){var S=s.selectCheckboxMaps,R=ce.value,M=R.checkField;return M?E.get(y,M):!!S[tt(Q,y)]},isIndeterminateByCheckboxRow:function(y){var S=s.treeIndeterminateMaps;return!!S[tt(Q,y)]&&!u.isCheckedByCheckboxRow(y)},toggleCheckboxRow:function(y){var S=s.selectCheckboxMaps,R=ce.value,M=R.checkField,F=M?!E.get(y,M):!S[tt(Q,y)];return f.handleSelectRow({row:y},F,!0),Ie()},setAllCheckboxRow:function(y){return Zn(y,!0)},getRadioReserveRecord:function(y){var S=t.treeConfig,R=c.fullDataRowIdData,M=c.radioReserveRow,F=c.afterFullData,K=we.value,Y=U.value,ae=Y.children||Y.childrenField;if(K.reserve&&M){var fe=tt(Q,M);if(y){if(!R[fe])return M}else{var Ae=Ko(Q);if(S){var Le=E.findTree(F,function(Fe){return fe===E.get(Fe,Ae)},{children:ae});if(Le)return M}else if(!F.some(function(Fe){return fe===E.get(Fe,Ae)}))return M}}return null},clearRadioReserve:function(){return c.radioReserveRow=null,Ie()},getCheckboxReserveRecords:function(y){var S=t.treeConfig,R=c.afterFullData,M=c.fullDataRowIdData,F=c.checkboxReserveRowMap,K=ce.value,Y=U.value,ae=Y.children||Y.childrenField,fe=[];if(K.reserve){var Ae={};S?E.eachTree(R,function(Le){Ae[tt(Q,Le)]=1},{children:ae}):R.forEach(function(Le){Ae[tt(Q,Le)]=1}),E.each(F,function(Le,Fe){Le&&(y?M[Fe]||fe.push(Le):Ae[Fe]||fe.push(Le))})}return fe},clearCheckboxReserve:function(){return c.checkboxReserveRowMap={},Ie()},toggleAllCheckboxRow:function(){return f.triggerCheckAllEvent(null,!s.isAllSelected),Ie()},clearCheckboxRow:function(){var y=t.treeConfig,S=c.tableFullData,R=U.value,M=R.children||R.childrenField,F=ce.value,K=F.checkField,Y=F.reserve,ae=F.indeterminateField||F.halfField;if(K){var fe=function(Ae){y&&ae&&E.set(Ae,ae,!1),E.set(Ae,K,!1)};y?E.eachTree(S,fe,{children:M}):S.forEach(fe)}return Y&&S.forEach(function(Ae){return ln(Ae,!1)}),s.isAllSelected=!1,s.isIndeterminate=!1,s.selectCheckboxMaps={},s.treeIndeterminateMaps={},Ie()},setCurrentRow:function(y){var S=me.value,R=d.value;return u.clearCurrentRow(),s.currentRow=y,(S.isCurrent||t.highlightCurrentRow)&&R&&E.arrayEach(R.querySelectorAll('[rowid="'.concat(tt(Q,y),'"]')),function(M){return is(M,"row--current")}),Ie()},isCheckedByRadioRow:function(y){return Q.eqRow(s.selectRadioRow,y)},setRadioRow:function(y){return $r(y,!0)},clearCurrentRow:function(){var y=d.value;return s.currentRow=null,c.hoverRow=null,y&&E.arrayEach(y.querySelectorAll(".row--current"),function(S){return po(S,"row--current")}),Ie()},clearRadioRow:function(){return s.selectRadioRow=null,Ie()},getCurrentRecord:function(){var y=me.value;return y.isCurrent||t.highlightCurrentRow?s.currentRow:null},getRadioRecord:function(y){var S=c.fullDataRowIdData,R=c.afterFullRowMaps,M=s.selectRadioRow;if(M){var F=tt(Q,M);if(y){if(!S[F])return M}else if(R[F])return M}return null},getCurrentColumn:function(){var y=ye.value;return y.isCurrent||t.highlightCurrentColumn?s.currentColumn:null},setCurrentColumn:function(y){var S=Dn(Q,y);return S&&(u.clearCurrentColumn(),s.currentColumn=S),Ie()},clearCurrentColumn:function(){return s.currentColumn=null,Ie()},sort:function(y,S){var R=B.value,M=R.multiple,F=R.remote,K=R.orders;return y&&E.isString(y)&&(y=[{field:y,order:S}]),E.isArray(y)||(y=[y]),y.length?(M||Xr(),(M?y:[y[0]]).forEach(function(Y,ae){var fe=Y.field,Ae=Y.order,Le=fe;E.isString(fe)&&(Le=u.getColumnByField(fe)),Le&&Le.sortable&&(K.indexOf(Ae)===-1&&(Ae=Yt(Le)),Le.order!==Ae&&(Le.order=Ae),Le.sortTime=Date.now()+ae)}),F||f.handleTableData(!0),Ie().then(function(){return u.updateCellAreas(),dr()})):Ie()},clearSort:function(y){var S=B.value;if(y){var R=Dn(Q,y);R&&(R.order=null)}else Xr();return S.remote||f.handleTableData(!0),Ie().then(dr)},isSort:function(y){if(y){var S=Dn(Q,y);return S?S.sortable&&!!S.order:!1}return u.getSortColumns().length>0},getSortColumns:function(){var y=B.value,S=y.multiple,R=y.chronological,M=[],F=c.tableFullColumn;return F.forEach(function(K){var Y=K.field,ae=K.order;K.sortable&&ae&&M.push({column:K,field:Y,property:Y,order:ae,sortTime:K.sortTime})}),S&&R&&M.length>1?E.orderBy(M,"sortTime"):M},closeFilter:function(){var y=s.filterStore,S=y.column,R=y.visible;return Object.assign(y,{isAllSelected:!1,isIndeterminate:!1,options:[],visible:!1}),R&&Q.dispatchEvent("filter-visible",{column:S,property:S.field,field:S.field,filterList:Q.getCheckedFilters(),visible:!1},null),Ie()},isActiveFilterByColumn:function(y){var S=Dn(Q,y);return S?S.filters&&S.filters.some(function(R){return R.checked}):Q.getCheckedFilters().length>0},isFilter:function(y){return u.isActiveFilterByColumn(y)},isRowExpandLoaded:function(y){var S=c.fullAllDataRowIdData,R=S[tt(Q,y)];return R&&!!R.expandLoaded},clearRowExpandLoaded:function(y){var S=s.rowExpandLazyLoadedMaps,R=c.fullAllDataRowIdData,M=De.value,F=M.lazy,K=tt(Q,y),Y=R[K];return F&&Y&&(Y.expandLoaded=!1,delete S[K]),Ie()},reloadRowExpand:function(y){var S=s.rowExpandLazyLoadedMaps,R=De.value,M=R.lazy,F=tt(Q,y);return M&&!S[F]&&u.clearRowExpandLoaded(y).then(function(){return Sn(y)}),Ie()},reloadExpandContent:function(y){return u.reloadRowExpand(y)},toggleRowExpand:function(y){return u.setRowExpand(y,!u.isExpandByRow(y))},setAllRowExpand:function(y){var S=U.value,R=c.tableFullData,M=c.tableFullTreeData,F=S.children||S.childrenField,K=[];return t.treeConfig?E.eachTree(M,function(Y){K.push(Y)},{children:F}):K=R,u.setRowExpand(K,y)},setRowExpand:function(y,S){var R=s.rowExpandedMaps,M=s.rowExpandLazyLoadedMaps,F=s.expandColumn,K=c.fullAllDataRowIdData,Y=Dr({},R),ae=De.value,fe=ae.reserve,Ae=ae.lazy,Le=ae.accordion,Fe=ae.toggleMethod,Ge=[],Ye=u.getColumnIndex(F),Be=u.getVMColumnIndex(F);if(y){E.isArray(y)||(y=[y]),Le&&(Y={},y=y.slice(y.length-1,y.length));var et=Fe?y.filter(function(Ze){return Fe({$table:Q,expanded:S,column:F,columnIndex:Ye,$columnIndex:Be,row:Ze,rowIndex:u.getRowIndex(Ze),$rowIndex:u.getVMRowIndex(Ze)})}):y;S?et.forEach(function(Ze){var Ne=tt(Q,Ze);if(!Y[Ne]){var Xe=K[Ne],ht=Ae&&!Xe.expandLoaded&&!M[Ne];ht?Ge.push(Sn(Ze)):Y[Ne]=Ze}}):et.forEach(function(Ze){var Ne=tt(Q,Ze);Y[Ne]&&delete Y[Ne]}),fe&&et.forEach(function(Ze){return hr(Ze,S)})}return s.rowExpandedMaps=Y,Promise.all(Ge).then(function(){return u.recalculate()})},isExpandByRow:function(y){var S=s.rowExpandedMaps,R=tt(Q,y);return!!S[R]},clearRowExpand:function(){var y=c.tableFullData,S=De.value,R=S.reserve,M=u.getRowExpandRecords();return s.rowExpandedMaps={},R&&y.forEach(function(F){return hr(F,!1)}),Ie().then(function(){M.length&&u.recalculate()})},clearRowExpandReserve:function(){return c.rowExpandedReserveRowMap={},Ie()},getRowExpandRecords:function(){var y=[];return E.each(s.rowExpandedMaps,function(S){S&&y.push(S)}),y},getTreeExpandRecords:function(){var y=[];return E.each(s.treeExpandedMaps,function(S){S&&y.push(S)}),y},isTreeExpandLoaded:function(y){var S=c.fullAllDataRowIdData,R=S[tt(Q,y)];return R&&!!R.treeLoaded},clearTreeExpandLoaded:function(y){var S=s.treeExpandedMaps,R=c.fullAllDataRowIdData,M=U.value,F=M.transform,K=M.lazy,Y=tt(Q,y),ae=R[Y];return K&&ae&&(ae.treeLoaded=!1,S[Y]&&delete S[Y]),F?(sn(),f.handleTableData()):Ie()},reloadTreeExpand:function(y){var S=s.treeExpandLazyLoadedMaps,R=U.value,M=R.hasChild||R.hasChildField,F=R.transform,K=R.lazy,Y=tt(Q,y);return K&&y[M]&&!S[Y]&&u.clearTreeExpandLoaded(y).then(function(){return Ii(y)}).then(function(){if(F)return sn(),f.handleTableData()}).then(function(){return u.recalculate()}),Ie()},reloadTreeChilds:function(y){return u.reloadTreeExpand(y)},toggleTreeExpand:function(y){return u.setTreeExpand(y,!u.isTreeExpandByRow(y))},setAllTreeExpand:function(y){var S=c.tableFullData,R=U.value,M=R.transform,F=R.lazy,K=R.children||R.childrenField,Y=[];return E.eachTree(S,function(ae){var fe=ae[K];(F||fe&&fe.length)&&Y.push(ae)},{children:K}),u.setTreeExpand(Y,y).then(function(){if(M)return sn(),u.recalculate()})},setTreeExpand:function(y,S){var R=U.value,M=R.transform;return y&&(E.isArray(y)||(y=[y]),y.length)?M?Ds(y,S):wn(y,S):Ie()},isTreeExpandByRow:function(y){var S=s.treeExpandedMaps;return!!S[tt(Q,y)]},clearTreeExpand:function(){var y=c.tableFullTreeData,S=U.value,R=S.children||S.childrenField,M=S.transform,F=S.reserve,K=u.getTreeExpandRecords();return s.treeExpandedMaps={},F&&E.eachTree(y,function(Y){return Tn(Y,!1)},{children:R}),f.handleTableData().then(function(){if(M)return sn(),f.handleTableData()}).then(function(){if(K.length)return u.recalculate()})},clearTreeExpandReserve:function(){return c.treeExpandedReserveRowMap={},Ie()},getScroll:function(){var y=s.scrollXLoad,S=s.scrollYLoad,R=x.value,M=R.$el;return{virtualX:y,virtualY:S,scrollTop:M.scrollTop,scrollLeft:M.scrollLeft}},scrollTo:function(y,S){var R=x.value,M=T.value,F=k.value,K=R?R.$el:null,Y=F?F.$el:null,ae=M?M.$el:null;return E.isNumber(y)&&pA(ae||K,y),E.isNumber(S)&&sf(Y||K,S),s.scrollXLoad||s.scrollYLoad?new Promise(function(fe){setTimeout(function(){Ie(function(){fe()})},50)}):Ie()},scrollToRow:function(y,S){var R=[];return y&&(t.treeConfig?R.push(f.scrollToTreeRow(y)):R.push(bA(Q,y))),S&&R.push(u.scrollToColumn(S)),Promise.all(R)},scrollToColumn:function(y){var S=c.fullColumnIdData,R=Dn(Q,y);return R&&S[R.id]?d7(Q,R):Ie()},clearScroll:function(){var y=c.scrollXStore,S=c.scrollYStore,R=x.value,M=T.value,F=k.value,K=R?R.$el:null,Y=F?F.$el:null,ae=M?M.$el:null;return Y&&(Yf(Y),Y.scrollTop=0),ae&&(ae.scrollLeft=0),K&&(Yf(K),K.scrollTop=0,K.scrollLeft=0),y.startIndex=0,S.startIndex=0,Ie()},updateFooter:function(){var y=t.showFooter,S=t.footerMethod,R=c.visibleColumn,M=c.afterFullData;return y&&S&&(s.footerTableData=R.length?S({columns:R,data:M,$table:Q,$grid:G}):[]),Ie()},updateStatus:function(y,S){var R=!E.isUndefined(S);return Ie().then(function(){var M=t.editRules,F=s.validStore,K=x.value;if(y&&K&&M){var Y=y.row,ae=y.column,fe="change";if(Q.hasCellRules&&Q.hasCellRules(fe,Y,ae)){var Ae=f.getCell(Y,ae);if(Ae)return Q.validCellRules(fe,Y,ae,S).then(function(){R&&F.visible&&Ca(Y,ae,S),Q.clearValidate(Y,ae)}).catch(function(Le){var Fe=Le.rule;R&&Ca(Y,ae,S),Q.showValidTooltip({rule:Fe,row:Y,column:ae,cell:Ae})})}}})},setMergeCells:function(y){return t.spanMethod&&jr("vxe.error.errConflicts",["merge-cells","span-method"]),Ut(y,s.mergeList,c.afterFullData),Ie().then(function(){return u.updateCellAreas()})},removeMergeCells:function(y){t.spanMethod&&jr("vxe.error.errConflicts",["merge-cells","span-method"]);var S=Or(y,s.mergeList,c.afterFullData);return Ie().then(function(){return u.updateCellAreas(),S})},getMergeCells:function(){return s.mergeList.slice(0)},clearMergeCells:function(){return s.mergeList=[],Ie()},setMergeFooterItems:function(y){return t.footerSpanMethod&&jr("vxe.error.errConflicts",["merge-footer-items","footer-span-method"]),Ut(y,s.mergeFooterList),Ie().then(function(){return u.updateCellAreas()})},removeMergeFooterItems:function(y){t.footerSpanMethod&&jr("vxe.error.errConflicts",["merge-footer-items","footer-span-method"]);var S=Or(y,s.mergeFooterList);return Ie().then(function(){return u.updateCellAreas(),S})},getMergeFooterItems:function(){return s.mergeFooterList.slice(0)},clearMergeFooterItems:function(){return s.mergeFooterList=[],Ie()},updateCellAreas:function(){var y=t.mouseConfig,S=C.value;return y&&S.area&&Q.handleUpdateCellAreas?Q.handleUpdateCellAreas():Ie()},focus:function(){return c.isActivated=!0,Ie()},blur:function(){return c.isActivated=!1,Ie()},connect:function(y){return y?(pe=y,pe.syncUpdate({collectColumn:c.collectColumn,$table:Q})):jr("vxe.error.barUnableLink"),Ie()}};var yh=function(y){var S=s.editStore,R=s.ctxMenuStore,M=s.filterStore,F=t.mouseConfig,K=t.editRules,Y=d.value,ae=Pe.value,fe=J.value,Ae=S.actived,Le=v.value,Fe=g.value,Ge=m.value;if(Fe&&(Pt(y,Y,"vxe-cell--filter").flag||Pt(y,Fe.$el).flag||Pt(y,document.body,"vxe-table--ignore-clear").flag||f.preventEvent(y,"event.clearFilter",M.args,u.closeFilter)),Ae.row){if(ae.autoClear!==!1){var Ye=Ae.args.cell;(!Ye||!Pt(y,Ye).flag)&&(Le&&Pt(y,Le.$el).flag||(!c._lastCallTime||c._lastCallTime+50<Date.now())&&(Pt(y,document.body,"vxe-table--ignore-clear").flag||f.preventEvent(y,"event.clearActived",Ae.args,function(){var et;if(ae.mode==="row"){var Ze=Pt(y,Y,"vxe-body--row"),Ne=Ze.flag?u.getRowNode(Ze.targetElem):null;et=Ne?!Q.eqRow(Ne.item,Ae.args.row):!1}else et=!Pt(y,Y,"col--edit").flag;if(et||(et=Pt(y,Y,"vxe-header--row").flag),et||(et=Pt(y,Y,"vxe-footer--row").flag),!et&&t.height&&!s.overflowY){var Xe=y.target;Da(Xe,"vxe-table--body-wrapper")&&(et=y.offsetY<Xe.clientHeight)}(et||!Pt(y,Y).flag)&&setTimeout(function(){return Q.clearEdit(y)})})))}}else F&&!Pt(y,Y).flag&&!(G&&Pt(y,G.getRefMaps().refElem.value).flag)&&!(Ge&&Pt(y,Ge.getRefMaps().refElem.value).flag)&&!(pe&&Pt(y,pe.getRefMaps().refElem.value).flag)&&(Q.clearSelected(),Q.clearCellAreas&&(Pt(y,document.body,"vxe-table--ignore-areas-clear").flag||f.preventEvent(y,"event.clearAreas",{},function(){Q.clearCellAreas(),Q.clearCopyCellArea()})));Q.closeMenu&&R.visible&&Ge&&!Pt(y,Ge.getRefMaps().refElem.value).flag&&Q.closeMenu();var Be=Pt(y,G?G.getRefMaps().refElem.value:Y).flag;!Be&&K&&fe.autoClear&&(s.validErrorMaps={}),c.isActivated=Be},bh=function(){u.closeFilter(),Q.closeMenu&&Q.closeMenu()},xh=function(){u.closeTooltip(),Q.closeMenu&&Q.closeMenu()},Ah=function(y){var S=t.mouseConfig,R=t.keyboardConfig,M=s.filterStore,F=s.ctxMenuStore,K=s.editStore,Y=C.value,ae=ie.value,fe=K.actived,Ae=_t(y,gt.ESCAPE);Ae&&f.preventEvent(y,"event.keydown",null,function(){if(u.dispatchEvent("keydown-start",{},y),R&&S&&Y.area&&Q.handleKeyboardEvent)Q.handleKeyboardEvent(y);else if((fe.row||M.visible||F.visible)&&(y.stopPropagation(),Q.closeMenu&&Q.closeMenu(),u.closeFilter(),R&&ae.isEsc&&fe.row)){var Le=fe.args;Q.clearEdit(y),Y.selected&&Ie(function(){return Q.handleSelected(Le,y)})}u.dispatchEvent("keydown",{},y),u.dispatchEvent("keydown-end",{},y)})},Eh=function(y){c.isActivated&&f.preventEvent(y,"event.keydown",null,function(){var S=t.mouseConfig,R=t.keyboardConfig,M=t.treeConfig,F=t.editConfig,K=t.highlightCurrentRow,Y=s.ctxMenuStore,ae=s.editStore,fe=s.currentRow,Ae=he.value,Le=oe.value,Fe=ie.value,Ge=C.value,Ye=Pe.value,Be=U.value,et=ke.value,Ze=me.value,Ne=ae.selected,Xe=ae.actived,ht=Be.children||Be.childrenField,it=y.keyCode,ft=_t(y,gt.ESCAPE),St=_t(y,gt.BACKSPACE),Vt=_t(y,gt.TAB),er=_t(y,gt.ENTER),ir=_t(y,gt.SPACEBAR),mt=_t(y,gt.ARROW_LEFT),Ft=_t(y,gt.ARROW_UP),ar=_t(y,gt.ARROW_RIGHT),Lt=_t(y,gt.ARROW_DOWN),Nt=_t(y,gt.DELETE),Cn=_t(y,gt.F2),Mo=_t(y,gt.CONTEXT_MENU),Wl=y.metaKey,Fo=y.ctrlKey,va=y.shiftKey,Po=y.altKey,No=mt||Ft||ar||Lt,ei=Ae&&Y.visible&&(er||ir||No),$o=wt(F)&&Xe.column&&Xe.row,vn;if(ei)y.preventDefault(),Y.showChild&&Qs(Y.selected)?Q.moveCtxMenu(y,Y,"selectChild",mt,!1,Y.selected.children):Q.moveCtxMenu(y,Y,"selected",ar,!0,et);else if(R&&S&&Ge.area&&Q.handleKeyboardEvent)Q.handleKeyboardEvent(y);else if(ft){if(Q.closeMenu&&Q.closeMenu(),u.closeFilter(),R&&Fe.isEsc&&Xe.row){var Ch=Xe.args;Q.clearEdit(y),Ge.selected&&Ie(function(){return Q.handleSelected(Ch,y)})}}else if(ir&&R&&Fe.isChecked&&Ne.row&&Ne.column&&(Ne.column.type==="checkbox"||Ne.column.type==="radio"))y.preventDefault(),Ne.column.type==="checkbox"?f.handleToggleCheckRowEvent(y,Ne.args):f.triggerRadioRowEvent(y,Ne.args);else if(Cn&&wt(F))$o||Ne.row&&Ne.column&&(y.preventDefault(),Q.handleActived(Ne.args,y));else if(Mo)c._keyCtx=Ne.row&&Ne.column&&Le.length,clearTimeout(Ua),Ua=setTimeout(function(){c._keyCtx=!1},1e3);else if(er&&!Po&&R&&Fe.isEnter&&(Ne.row||Xe.row||M&&(Ze.isCurrent||K)&&fe)){if(Fo)Xe.row&&(vn=Xe.args,Q.clearEdit(y),Ge.selected&&Ie(function(){return Q.handleSelected(vn,y)}));else if(Ne.row||Xe.row){var Ha=Ne.row?Ne.args:Xe.args;va?Fe.enterToTab?Q.moveTabSelected(Ha,va,y):Q.moveSelected(Ha,mt,!0,ar,!1,y):Fe.enterToTab?Q.moveTabSelected(Ha,va,y):Q.moveSelected(Ha,mt,!1,ar,!0,y)}else if(M&&(Ze.isCurrent||K)&&fe){var ma=fe[ht];if(ma&&ma.length){y.preventDefault();var Ki=ma[0];vn={$table:Q,row:Ki,rowIndex:u.getRowIndex(Ki),$rowIndex:u.getVMRowIndex(Ki)},u.setTreeExpand(fe,!0).then(function(){return u.scrollToRow(Ki)}).then(function(){return f.triggerCurrentRowEvent(y,vn)})}}}else if(No&&R&&Fe.isArrow)$o||(Ne.row&&Ne.column?Q.moveSelected(Ne.args,mt,Ft,ar,Lt,y):(Ft||Lt)&&(Ze.isCurrent||K)&&Q.moveCurrentRow(Ft,Lt,y));else if(Vt&&R&&Fe.isTab)Ne.row||Ne.column?Q.moveTabSelected(Ne.args,va,y):(Xe.row||Xe.column)&&Q.moveTabSelected(Xe.args,va,y);else if(R&&wt(F)&&(Nt||(M&&(Ze.isCurrent||K)&&fe?St&&Fe.isArrow:St))){if(!$o){var In=Fe.delMethod,Gl=Fe.backMethod;if(Fe.isDel&&(Ne.row||Ne.column))In?In({row:Ne.row,rowIndex:u.getRowIndex(Ne.row),column:Ne.column,columnIndex:u.getColumnIndex(Ne.column),$table:Q}):Ca(Ne.row,Ne.column,null),St?Gl?Gl({row:Ne.row,rowIndex:u.getRowIndex(Ne.row),column:Ne.column,columnIndex:u.getColumnIndex(Ne.column),$table:Q}):Q.handleActived(Ne.args,y):Nt&&u.updateFooter();else if(St&&Fe.isArrow&&M&&(Ze.isCurrent||K)&&fe){var cn=E.findTree(c.afterFullData,function(_n){return _n===fe},{children:ht}).parent;cn&&(y.preventDefault(),vn={$table:Q,row:cn,rowIndex:u.getRowIndex(cn),$rowIndex:u.getVMRowIndex(cn)},u.setTreeExpand(cn,!1).then(function(){return u.scrollToRow(cn)}).then(function(){return f.triggerCurrentRowEvent(y,vn)}))}}}else if(R&&wt(F)&&Fe.isEdit&&!Fo&&!Wl&&(ir||it>=48&&it<=57||it>=65&&it<=90||it>=96&&it<=111||it>=186&&it<=192||it>=219&&it<=222)){var zl=Fe.editMethod;if(Ne.column&&Ne.row&&wt(Ne.column.editRender)){var Yi=Ye.beforeEditMethod||Ye.activeMethod;(!Yi||Yi(Dr(Dr({},Ne.args),{$table:Q})))&&(zl?zl({row:Ne.row,rowIndex:u.getRowIndex(Ne.row),column:Ne.column,columnIndex:u.getColumnIndex(Ne.column),$table:Q,$grid:G}):(Ca(Ne.row,Ne.column,null),Q.handleActived(Ne.args,y)))}}u.dispatchEvent("keydown",{},y)})},Th=function(y){var S=t.keyboardConfig,R=t.mouseConfig,M=s.editStore,F=s.filterStore,K=c.isActivated,Y=C.value,ae=ie.value,fe=M.actived;K&&!F.visible&&(fe.row||fe.column||S&&ae.isClip&&R&&Y.area&&Q.handlePasteCellAreaEvent&&Q.handlePasteCellAreaEvent(y),u.dispatchEvent("paste",{},y))},Uu=function(y){var S=t.keyboardConfig,R=t.mouseConfig,M=s.editStore,F=s.filterStore,K=c.isActivated,Y=C.value,ae=ie.value,fe=M.actived;K&&!F.visible&&(fe.row||fe.column||S&&ae.isClip&&R&&Y.area&&Q.handleCopyCellAreaEvent&&Q.handleCopyCellAreaEvent(y),u.dispatchEvent("copy",{},y))},Hu=function(y){var S=t.keyboardConfig,R=t.mouseConfig,M=s.editStore,F=s.filterStore,K=c.isActivated,Y=C.value,ae=ie.value,fe=M.actived;K&&!F.visible&&(fe.row||fe.column||S&&ae.isClip&&R&&Y.area&&Q.handleCutCellAreaEvent&&Q.handleCutCellAreaEvent(y),u.dispatchEvent("cut",{},y))},Sh=function(){Q.closeMenu&&Q.closeMenu(),u.updateCellAreas(),u.recalculate(!0)},Os=function(y){var S=h.value;clearTimeout(c.tooltipTimeout),y?u.closeTooltip():S&&S.setActived(!0)},Bl=function(y,S,R,M,F){F.cell=S;var K=s.tooltipStore,Y=re.value,ae=F.column,fe=F.row,Ae=Y.showAll,Le=Y.contentMethod,Fe=Le?Le(F):null,Ge=Le&&!E.eqNull(Fe),Ye=Ge?Fe:E.toString(ae.type==="html"?R.innerText:R.textContent).trim(),Be=R.scrollWidth>R.clientWidth;return Ye&&(Ae||Ge||Be)&&(Object.assign(K,{row:fe,column:ae,visible:!0,currOpts:null}),Ie(function(){var et=h.value;et&&et.open(Be?R:M||R,Mr(Ye))})),Ie()};f={getSetupOptions:function(){return H},updateAfterDataIndex:Kn,callSlot:function(y,S){if(y){if(G)return G.callSlot(y,S);if(E.isFunction(y))return pr(y(S))}return[]},getParentElem:function(){var y=d.value;if(G){var S=G.getRefMaps().refElem.value;return S?S.parentNode:null}return y?y.parentNode:null},getParentHeight:function(){var y=t.height,S=d.value;if(S){var R=S.parentNode,M=y==="auto"?Bv(R):0;return Math.floor(G?G.getParentHeight():E.toNumber(getComputedStyle(R).height)-M)}return 0},getExcludeHeight:function(){return G?G.getExcludeHeight():0},defineField:function(y){var S=t.treeConfig,R=De.value,M=U.value,F=we.value,K=ce.value,Y=M.children||M.childrenField,ae=Ko(Q);return E.isArray(y)||(y=[y]),y.map(function(fe){c.tableFullColumn.forEach(function(Le){var Fe=Le.field,Ge=Le.editRender;if(Fe&&!E.has(fe,Fe)&&!fe[Fe]){var Ye=null;if(Ge){var Be=Ge.defaultValue;E.isFunction(Be)?Ye=Be({column:Le}):E.isUndefined(Be)||(Ye=Be)}E.set(fe,Fe,Ye)}});var Ae=[F.labelField,K.checkField,K.labelField,R.labelField];return Ae.forEach(function(Le){Le&&Oi(E.get(fe,Le))&&E.set(fe,Le,null)}),S&&M.lazy&&E.isUndefined(fe[Y])&&(fe[Y]=null),Oi(E.get(fe,ae))&&E.set(fe,ae,np()),fe})},handleTableData:function(y){var S=s.scrollYLoad,R=c.scrollYStore,M=c.fullDataRowIdData,F=c.afterFullData;y&&(Yn(),F=sn());var K=S?F.slice(R.startIndex,R.endIndex):F.slice(0);return K.forEach(function(Y,ae){var fe=tt(Q,Y),Ae=M[fe];Ae&&(Ae.$index=ae)}),s.tableData=K,Ie()},cacheRowMap:function(y){var S=t.treeConfig,R=U.value,M=c.fullDataRowIdData,F=c.fullAllDataRowIdData,K=c.tableFullData,Y=c.tableFullTreeData,ae=R.children||R.childrenField,fe=R.hasChild||R.hasChildField,Ae=Ko(Q),Le=S&&R.lazy,Fe=function(Ge,Ye,Be,et,Ze,Ne){var Xe=tt(Q,Ge),ht=S&&et?s7(et):Ye+1,it=Ne?Ne.length-1:0;Oi(Xe)&&(Xe=np(),E.set(Ge,Ae,Xe)),Le&&Ge[fe]&&E.isUndefined(Ge[ae])&&(Ge[ae]=null);var ft={row:Ge,rowid:Xe,seq:ht,index:S&&Ze?-1:Ye,_index:-1,$index:-1,items:Be,parent:Ze,level:it};y&&(M[Xe]=ft),F[Xe]=ft};y&&(M=c.fullDataRowIdData={}),F=c.fullAllDataRowIdData={},S?E.eachTree(Y,Fe,{children:ae}):K.forEach(Fe)},cacheSourceMap:function(y){var S=t.treeConfig,R=U.value,M=c.sourceDataRowIdData,F=E.clone(y,!0),K=Ko(Q);M=c.sourceDataRowIdData={};var Y=function(fe){var Ae=tt(Q,fe);Oi(Ae)&&(Ae=np(),E.set(fe,K,Ae)),M[Ae]=fe};if(S){var ae=R.children||R.childrenField;E.eachTree(F,Y,{children:R.transform?R.mapChildrenField:ae})}else F.forEach(Y);c.tableSourceData=F},analyColumnWidth:function(){var y=c.tableFullColumn,S=ye.value,R=S.width,M=S.minWidth,F=[],K=[],Y=[],ae=[],fe=[],Ae=[];y.forEach(function(Le){R&&!Le.width&&(Le.width=R),M&&!Le.minWidth&&(Le.minWidth=M),Le.visible&&(Le.resizeWidth?F.push(Le):$v(Le.width)?K.push(Le):mc(Le.width)?ae.push(Le):$v(Le.minWidth)?Y.push(Le):mc(Le.minWidth)?fe.push(Le):Ae.push(Le))}),Object.assign(s.columnStore,{resizeList:F,pxList:K,pxMinList:Y,scaleList:ae,scaleMinList:fe,autoList:Ae})},saveCustomResizable:function(y){var S=t.id,R=t.customConfig,M=Ue.value,F=c.collectColumn,K=M.storage,Y=K===!0||K&&K.resizable;if(R&&Y){var ae=Ht(dp),fe;if(!S){jr("vxe.error.reqProp",["id"]);return}y||(fe=E.isPlainObject(ae[S])?ae[S]:{},E.eachTree(F,function(Ae){if(Ae.resizeWidth){var Le=Ae.getKey();Le&&(fe[Le]=Ae.renderWidth)}})),ae[S]=E.isEmpty(fe)?void 0:fe,localStorage.setItem(dp,E.toJSONString(ae))}},saveCustomFixed:function(){var y=t.id,S=t.customConfig,R=c.collectColumn,M=Ue.value,F=M.storage,K=F===!0||F&&F.fixed;if(S&&K){var Y=Ht(pp),ae=[];if(!y){jr("vxe.error.reqProp",["id"]);return}E.eachTree(R,function(fe){if(fe.fixed&&fe.fixed!==fe.defaultFixed){var Ae=fe.getKey();Ae&&ae.push("".concat(Ae,"|").concat(fe.fixed))}}),Y[y]=ae.join(",")||void 0,localStorage.setItem(pp,E.toJSONString(Y))}},saveCustomVisible:function(){var y=t.id,S=t.customConfig,R=c.collectColumn,M=Ue.value,F=M.checkMethod,K=M.storage,Y=K===!0||K&&K.visible;if(S&&Y){var ae=Ht(hp),fe=[],Ae=[];if(!y){jr("vxe.error.reqProp",["id"]);return}E.eachTree(R,function(Le){if(!F||F({column:Le})){if(!Le.visible&&Le.defaultVisible){var Fe=Le.getKey();Fe&&fe.push(Fe)}else if(Le.visible&&!Le.defaultVisible){var Fe=Le.getKey();Fe&&Ae.push(Fe)}}}),ae[y]=[fe.join(",")].concat(Ae.length?[Ae.join(",")]:[]).join("|")||void 0,localStorage.setItem(hp,E.toJSONString(ae))}},handleCustom:function(){return f.saveCustomVisible(),f.analyColumnWidth(),u.refreshColumn()},handleUpdateDataQueue:function(){s.upDataFlag++},handleRefreshColumnQueue:function(){s.reColumnFlag++},preventEvent:function(y,S,R,M,F){var K=ot.interceptor.get(S),Y;return K.some(function(ae){return ae(Object.assign({$grid:G,$table:Q,$event:y},R))===!1})||M&&(Y=M()),F&&F(),Y},checkSelectionStatus:function(){var y=t.treeConfig,S=s.selectCheckboxMaps,R=s.treeIndeterminateMaps,M=c.afterFullData,F=ce.value,K=F.checkField,Y=F.checkStrictly,ae=F.checkMethod,fe=F.indeterminateField||F.halfField;if(!Y){var Ae=[],Le=[],Fe=!1,Ge=!1,Ye=!1;K?(Fe=M.every(ae?function(Be){return ae({row:Be})?E.get(Be,K)?(Le.push(Be),!0):!1:(Ae.push(Be),!0)}:function(Be){return E.get(Be,K)}),Ge=Fe&&M.length!==Ae.length,y?fe?Ye=!Ge&&M.some(function(Be){return E.get(Be,K)||E.get(Be,fe)||!!R[tt(Q,Be)]}):Ye=!Ge&&M.some(function(Be){return E.get(Be,K)||!!R[tt(Q,Be)]}):fe?Ye=!Ge&&M.some(function(Be){return E.get(Be,K)||E.get(Be,fe)}):Ye=!Ge&&M.some(function(Be){return E.get(Be,K)})):(Fe=M.every(ae?function(Be){return ae({row:Be})?S[tt(Q,Be)]?(Le.push(Be),!0):!1:(Ae.push(Be),!0)}:function(Be){return S[tt(Q,Be)]}),Ge=Fe&&M.length!==Ae.length,y?Ye=!Ge&&M.some(function(Be){var et=tt(Q,Be);return R[et]||S[et]}):Ye=!Ge&&M.some(function(Be){return S[tt(Q,Be)]})),s.isAllSelected=Ge,s.isIndeterminate=Ye}},handleSelectRow:function(y,S,R){var M=y.row,F=t.treeConfig,K=s.selectCheckboxMaps,Y=s.treeIndeterminateMaps,ae=Dr({},K),fe=c.afterFullData,Ae=U.value,Le=Ae.children||Ae.childrenField,Fe=ce.value,Ge=Fe.checkField,Ye=Fe.checkStrictly,Be=Fe.checkMethod,et=Fe.indeterminateField||Fe.halfField,Ze=tt(Q,M);if(Ge)if(F&&!Ye){S===-1?(Y[Ze]||(et&&E.set(M,et,!0),Y[Ze]=M),E.set(M,Ge,!1)):E.eachTree([M],function(mt){(Q.eqRow(mt,M)||R||!Be||Be({row:mt}))&&(E.set(mt,Ge,S),et&&E.set(M,et,!1),delete Y[tt(Q,mt)],ln(M,S))},{children:Le});var Ne=E.findTree(fe,function(mt){return Q.eqRow(mt,M)},{children:Le});if(Ne&&Ne.parent){var Xe=void 0,ht=[],it={};!R&&Be?Ne.items.forEach(function(mt){if(Be({row:mt})){var Ft=tt(Q,mt);it[Ft]=mt,ht.push(mt)}}):Ne.items.forEach(function(mt){var Ft=tt(Q,mt);it[Ft]=mt,ht.push(mt)});var ft=E.find(Ne.items,function(mt){return!!Y[tt(Q,mt)]});if(ft)Xe=-1;else{var St=[];Ne.items.forEach(function(mt){E.get(mt,Ge)&&St.push(mt)}),Xe=St.filter(function(mt){return it[tt(Q,mt)]}).length===ht.length?!0:St.length||S===-1?-1:!1}return s.selectCheckboxMaps=ae,f.handleSelectRow({row:Ne.parent},Xe,R)}}else(R||!Be||Be({row:M}))&&(E.set(M,Ge,S),ln(M,S));else if(F&&!Ye){S===-1?(Y[Ze]||(et&&E.set(M,et,!0),Y[Ze]=M),ae[Ze]&&delete ae[Ze]):E.eachTree([M],function(Ft){var ar=tt(Q,Ft);(Q.eqRow(Ft,M)||R||!Be||Be({row:Ft}))&&(S?ae[ar]=Ft:ae[ar]&&delete ae[ar],et&&E.set(M,et,!1),delete Y[tt(Q,Ft)],ln(M,S))},{children:Le});var Ne=E.findTree(fe,function(Ft){return Q.eqRow(Ft,M)},{children:Le});if(Ne&&Ne.parent){var Xe=void 0,Vt=[],er={};!R&&Be?Ne.items.forEach(function(Lt){if(Be({row:Lt})){var Nt=tt(Q,Lt);er[Nt]=Lt,Vt.push(Lt)}}):Ne.items.forEach(function(Lt){var Nt=tt(Q,Lt);er[Nt]=Lt,Vt.push(Lt)});var ft=E.find(Ne.items,function(Lt){return!!Y[tt(Q,Lt)]});if(ft)Xe=-1;else{var ir=[];Ne.items.forEach(function(Lt){var Nt=tt(Q,Lt);ae[Nt]&&ir.push(Lt)}),Xe=ir.filter(function(Lt){return er[tt(Q,Lt)]}).length===Vt.length?!0:ir.length||S===-1?-1:!1}return s.selectCheckboxMaps=ae,f.handleSelectRow({row:Ne.parent},Xe,R)}}else(R||!Be||Be({row:M}))&&(S?ae[Ze]||(ae[Ze]=M):ae[Ze]&&delete ae[Ze],ln(M,S));s.selectCheckboxMaps=ae,f.checkSelectionStatus()},triggerHeaderHelpEvent:function(y,S){var R=S.column,M=R.titlePrefix||R.titleHelp;if(M.content||M.message){var F=s.tooltipStore,K=Ar(M.content||M.message);Os(!0),F.visible=!0,F.currOpts=Dr(Dr({},M),{content:null}),Ie(function(){var Y=h.value;Y&&Y.open(y.currentTarget,K)})}},triggerHeaderTooltipEvent:function(y,S){var R=s.tooltipStore,M=S.column,F=y.currentTarget;Os(!0),(R.column!==M||!R.visible)&&Bl(y,F,F,null,S)},triggerBodyTooltipEvent:function(y,S){var R=t.editConfig,M=s.editStore,F=s.tooltipStore,K=Pe.value,Y=M.actived,ae=S.row,fe=S.column,Ae=y.currentTarget;if(Os(F.column!==fe||F.row!==ae),!(fe.editRender&&wt(R)&&(K.mode==="row"&&Y.row===ae||Y.row===ae&&Y.column===fe))&&(F.column!==fe||F.row!==ae||!F.visible)){var Le=void 0,Fe=void 0;fe.treeNode?(Le=Ae.querySelector(".vxe-tree-cell"),fe.type==="html"&&(Fe=Ae.querySelector(".vxe-cell--html"))):Fe=Ae.querySelector(fe.type==="html"?".vxe-cell--html":".vxe-cell--label"),Bl(y,Ae,Le||Ae.children[0],Fe,S)}},triggerFooterTooltipEvent:function(y,S){var R=S.column,M=s.tooltipStore,F=y.currentTarget;Os(M.column!==R||!!M.row),(M.column!==R||!M.visible)&&Bl(y,F,F.querySelector(".vxe-cell--item")||F.children[0],null,S)},handleTargetLeaveEvent:function(){var y=re.value,S=h.value;S&&S.setActived(!1),y.enterable?c.tooltipTimeout=setTimeout(function(){S=h.value,S&&!S.isActived()&&u.closeTooltip()},y.leaveDelay):u.closeTooltip()},triggerHeaderCellClickEvent:function(y,S){var R=c._lastResizeTime,M=B.value,F=ye.value,K=S.column,Y=y.currentTarget,ae=R&&R>Date.now()-300,fe=Pt(y,Y,"vxe-cell--sort").flag,Ae=Pt(y,Y,"vxe-cell--filter").flag;M.trigger==="cell"&&!(ae||fe||Ae)&&f.triggerSortEvent(y,K,Yt(K)),u.dispatchEvent("header-cell-click",Object.assign({triggerResizable:ae,triggerSort:fe,triggerFilter:Ae,cell:Y},S),y),(F.isCurrent||t.highlightCurrentColumn)&&u.setCurrentColumn(K)},triggerHeaderCellDblclickEvent:function(y,S){u.dispatchEvent("header-cell-dblclick",Object.assign({cell:y.currentTarget},S),y)},triggerCellClickEvent:function(y,S){var R=t.highlightCurrentRow,M=t.editConfig,F=s.editStore,K=De.value,Y=Pe.value,ae=U.value,fe=we.value,Ae=ce.value,Le=me.value,Fe=F.actived,Ge=S.row,Ye=S.column,Be=Ye.type,et=Ye.treeNode,Ze=Be==="radio",Ne=Be==="checkbox",Xe=Be==="expand",ht=y.currentTarget,it=Ze&&Pt(y,ht,"vxe-cell--radio").flag,ft=Ne&&Pt(y,ht,"vxe-cell--checkbox").flag,St=et&&Pt(y,ht,"vxe-tree--btn-wrapper").flag,Vt=Xe&&Pt(y,ht,"vxe-table--expanded").flag;S=Object.assign({cell:ht,triggerRadio:it,triggerCheckbox:ft,triggerTreeNode:St,triggerExpandNode:Vt},S),!ft&&!it&&(!Vt&&(K.trigger==="row"||Xe&&K.trigger==="cell")&&f.triggerRowExpandEvent(y,S),(ae.trigger==="row"||et&&ae.trigger==="cell")&&f.triggerTreeExpandEvent(y,S)),St||(Vt||((Le.isCurrent||R)&&!ft&&!it&&f.triggerCurrentRowEvent(y,S),!it&&(fe.trigger==="row"||Ze&&fe.trigger==="cell")&&f.triggerRadioRowEvent(y,S),!ft&&(Ae.trigger==="row"||Ne&&Ae.trigger==="cell")&&f.handleToggleCheckRowEvent(y,S)),wt(M)&&(Y.trigger==="manual"?Fe.args&&Fe.row===Ge&&Ye!==Fe.column&&Mn(y,S):(!Fe.args||Ge!==Fe.row||Ye!==Fe.column)&&(Y.trigger==="click"||Y.trigger==="dblclick"&&Y.mode==="row"&&Fe.row===Ge)&&Mn(y,S))),u.dispatchEvent("cell-click",S,y)},triggerCellDblclickEvent:function(y,S){var R=t.editConfig,M=s.editStore,F=Pe.value,K=M.actived,Y=y.currentTarget;S=Object.assign({cell:Y},S),wt(R)&&F.trigger==="dblclick"&&(!K.args||y.currentTarget!==K.args.cell)&&(F.mode==="row"?Nr("blur").catch(function(ae){return ae}).then(function(){Q.handleActived(S,y).then(function(){return Nr("change")}).catch(function(ae){return ae})}):F.mode==="cell"&&Q.handleActived(S,y).then(function(){return Nr("change")}).catch(function(ae){return ae})),u.dispatchEvent("cell-dblclick",S,y)},handleToggleCheckRowEvent:function(y,S){var R=s.selectCheckboxMaps,M=ce.value,F=M.checkField,K=S.row,Y=!1;F?Y=!E.get(K,F):Y=!R[tt(Q,K)],y?f.triggerCheckRowEvent(y,S,Y):f.handleSelectRow(S,Y)},triggerCheckRowEvent:function(y,S,R){var M=ce.value,F=S.row,K=c.afterFullData,Y=M.checkMethod;if(M.isShiftKey&&y.shiftKey&&!t.treeConfig){var ae=u.getCheckboxRecords();if(ae.length){var fe=ae[0],Ae=u.getVTRowIndex(F),Le=u.getVTRowIndex(fe);if(Ae!==Le){u.setAllCheckboxRow(!1);var Fe=Ae<Le?K.slice(Ae,Le+1):K.slice(Le,Ae+1);gr(Fe,!0,!1),u.dispatchEvent("checkbox-range-select",Object.assign({rangeRecords:Fe},S),y);return}}}(!Y||Y({row:F}))&&(f.handleSelectRow(S,R),u.dispatchEvent("checkbox-change",Object.assign({records:u.getCheckboxRecords(),reserves:u.getCheckboxReserveRecords(),indeterminates:u.getCheckboxIndeterminateRecords(),checked:R},S),y))},triggerCheckAllEvent:function(y,S){Zn(S),y&&u.dispatchEvent("checkbox-all",{records:u.getCheckboxRecords(),reserves:u.getCheckboxReserveRecords(),indeterminates:u.getCheckboxIndeterminateRecords(),checked:S},y)},triggerRadioRowEvent:function(y,S){var R=s.selectRadioRow,M=S.row,F=we.value,K=M,Y=R!==K;Y?$r(K):F.strict||(Y=R===K,Y&&(K=null,u.clearRadioRow())),Y&&u.dispatchEvent("radio-change",Dr({oldValue:R,newValue:K},S),y)},triggerCurrentRowEvent:function(y,S){var R=s.currentRow,M=S.row,F=R!==M;u.setCurrentRow(M),F&&u.dispatchEvent("current-change",Dr({oldValue:R,newValue:M},S),y)},triggerRowExpandEvent:function(y,S){var R=s.rowExpandLazyLoadedMaps,M=s.expandColumn,F=De.value,K=S.row,Y=F.lazy,ae=tt(Q,K);if(!Y||!R[ae]){var fe=!u.isExpandByRow(K),Ae=u.getColumnIndex(M),Le=u.getVMColumnIndex(M);u.setRowExpand(K,fe),u.dispatchEvent("toggle-row-expand",{expanded:fe,column:M,columnIndex:Ae,$columnIndex:Le,row:K,rowIndex:u.getRowIndex(K),$rowIndex:u.getVMRowIndex(K)},y)}},triggerTreeExpandEvent:function(y,S){var R=s.treeExpandLazyLoadedMaps,M=U.value,F=S.row,K=S.column,Y=M.lazy,ae=tt(Q,F);if(!Y||!R[ae]){var fe=!u.isTreeExpandByRow(F),Ae=u.getColumnIndex(K),Le=u.getVMColumnIndex(K);u.setTreeExpand(F,fe),u.dispatchEvent("toggle-tree-expand",{expanded:fe,column:K,columnIndex:Ae,$columnIndex:Le,row:F},y)}},triggerSortEvent:function(y,S,R){var M=t.mouseConfig,F=B.value,K=C.value,Y=S.field,ae=S.sortable;if(ae){!R||S.order===R?u.clearSort(F.multiple?S:null):u.sort({field:Y,order:R});var fe={$table:Q,$event:y,column:S,field:Y,property:Y,order:S.order,sortList:u.getSortColumns(),sortTime:S.sortTime};if(M&&K.area&&Q.handleSortEvent)return Q.handleSortEvent(y,fe);u.dispatchEvent("sort-change",fe,y)}},triggerScrollXEvent:function(){Ls()},triggerScrollYEvent:function(y){var S=c.scrollYStore,R=S.adaptive,M=S.offsetSize,F=S.visibleSize;ZG&&R&&M*2+F<=40?ko(y):Jr(y)},scrollToTreeRow:function(y){var S=t.treeConfig,R=c.tableFullData,M=[];if(S){var F=U.value,K=F.children||F.childrenField,Y=E.findTree(R,function(fe){return Q.eqRow(fe,y)},{children:K});if(Y){var ae=Y.nodes;ae.forEach(function(fe,Ae){Ae<ae.length-1&&!u.isTreeExpandByRow(fe)&&M.push(u.setTreeExpand(fe,!0))})}}return Promise.all(M).then(function(){return bA(Q,y)})},updateScrollYStatus:Fn,updateScrollXSpace:function(){var y=s.isGroup,S=s.scrollXLoad,R=s.scrollbarWidth,M=c.visibleColumn,F=c.scrollXStore,K=c.elemStore,Y=c.tableWidth,ae=b.value,fe=x.value,Ae=T.value,Le=fe?fe.$el:null;if(Le){var Fe=ae?ae.$el:null,Ge=Ae?Ae.$el:null,Ye=Fe?Fe.querySelector(".vxe-table--header"):null,Be=Le.querySelector(".vxe-table--body"),et=Ge?Ge.querySelector(".vxe-table--footer"):null,Ze=M.slice(0,F.startIndex).reduce(function(ht,it){return ht+it.renderWidth},0),Ne="";S&&(Ne="".concat(Ze,"px")),Ye&&(Ye.style.marginLeft=y?"":Ne),Be.style.marginLeft=Ne,et&&(et.style.marginLeft=Ne);var Xe=["main"];Xe.forEach(function(ht){var it=["header","body","footer"];it.forEach(function(ft){var St=K["".concat(ht,"-").concat(ft,"-xSpace")],Vt=St?St.value:null;Vt&&(Vt.style.width=S?"".concat(Y+(ft==="header"?R:0),"px"):"")})}),Ie(dr)}},updateScrollYSpace:function(){var y=s.scrollYLoad,S=c.scrollYStore,R=c.elemStore,M=c.afterFullData,F=S.startIndex,K=S.rowHeight,Y=M.length*K,ae=Math.max(0,F*K),fe=["main","left","right"],Ae="",Le="";y&&(Ae="".concat(ae,"px"),Le="".concat(Y,"px")),fe.forEach(function(Fe){var Ge=["header","body","footer"],Ye=R["".concat(Fe,"-body-table")],Be=Ye?Ye.value:null;Be&&(Be.style.marginTop=Ae),Ge.forEach(function(et){var Ze=R["".concat(Fe,"-").concat(et,"-ySpace")],Ne=Ze?Ze.value:null;Ne&&(Ne.style.height=Le)})}),Ie(dr)},updateScrollXData:function(){Ie(function(){_i(),f.updateScrollXSpace()})},updateScrollYData:function(){Ie(function(){f.handleTableData(),f.updateScrollYSpace()})},checkScrolling:function(){var y=P.value,S=W.value,R=x.value,M=R?R.$el:null;M&&(y&&(M.scrollLeft>0?is(y,"scrolling--middle"):po(y,"scrolling--middle")),S&&(M.clientWidth<M.scrollWidth-Math.ceil(M.scrollLeft)?is(S,"scrolling--middle"):po(S,"scrolling--middle")))},updateZindex:function(){t.zIndex?c.tZindex=t.zIndex:c.tZindex<Ba()&&(c.tZindex=sa())},handleCheckedCheckboxRow:gr,triggerHoverEvent:function(y,S){var R=S.row;f.setHoverRow(R)},setHoverRow:function(y){var S=tt(Q,y),R=d.value;f.clearHoverRow(),R&&E.arrayEach(R.querySelectorAll('[rowid="'.concat(S,'"]')),function(M){return is(M,"row--hover")}),c.hoverRow=y},clearHoverRow:function(){var y=d.value;y&&E.arrayEach(y.querySelectorAll(".vxe-body--row.row--hover"),function(S){return po(S,"row--hover")}),c.hoverRow=null},getCell:function(y,S){var R=tt(Q,y),M=x.value,F=O.value,K=k.value,Y;return S.fixed&&(S.fixed==="left"?F&&(Y=F.$el):K&&(Y=K.$el)),Y||(Y=M.$el),Y?Y.querySelector('.vxe-body--row[rowid="'.concat(R,'"] .').concat(S.id)):null},getCellLabel:function(y,S){var R=S.formatter,M=la(y,S),F=M;if(R){var K=void 0,Y=c.fullAllDataRowIdData,ae=tt(Q,y),fe=S.id,Ae=Y[ae];if(Ae&&(K=Ae.formatData,K||(K=Y[ae].formatData={}),Ae&&K[fe]&&K[fe].value===M))return K[fe].label;var Le={cellValue:M,row:y,rowIndex:u.getRowIndex(y),column:S,columnIndex:u.getColumnIndex(S)};if(E.isString(R)){var Fe=ot.formats.get(R);F=Fe&&Fe.cellFormatMethod?Fe.cellFormatMethod(Le):""}else if(E.isArray(R)){var Fe=ot.formats.get(R[0]);F=Fe&&Fe.cellFormatMethod?Fe.cellFormatMethod.apply(Fe,XG([Le],R.slice(1),!1)):""}else F=R(Le);K&&(K[fe]={value:M,label:F})}return F},findRowIndexOf:function(y,S){return S?E.findIndexOf(y,function(R){return Q.eqRow(R,S)}):-1},eqRow:function(y,S){return y&&S?y===S?!0:tt(Q,y)===tt(Q,S):!1}},Object.assign(Q,u,f);var Vu=function(y){var S=t.showHeader,R=t.showFooter,M=s.tableData,F=s.tableColumn,K=s.tableGroupColumn,Y=s.columnStore,ae=s.footerTableData,fe=y==="left",Ae=fe?Y.leftList:Y.rightList;return D("div",{ref:fe?P:W,class:"vxe-table--fixed-".concat(y,"-wrapper")},[S?D(Xv,{ref:fe?A:_,fixedType:y,tableData:M,tableColumn:F,tableGroupColumn:K,fixedColumn:Ae}):$t(),D(zA,{ref:fe?O:k,fixedType:y,tableData:M,tableColumn:F,fixedColumn:Ae}),R?D(KA,{ref:fe?I:L,footerTableData:ae,tableColumn:F,fixedColumn:Ae,fixedType:y}):$t()])},wh=function(){var y=ge.value,S={$table:Q};if(r.empty)return r.empty(S);var R=y.name?ot.renderer.get(y.name):null,M=R?R.renderEmpty:null;return M?pr(M(y,S)):Ar(t.emptyText)||H.i18n("vxe.table.emptyText")};function Ul(){var y=d.value;y&&y.clientWidth&&y.clientHeight&&u.recalculate()}var Hl=je(0);st(function(){return t.data?t.data.length:-1},function(){Hl.value++}),st(function(){return t.data},function(){Hl.value++}),st(Hl,function(){var y=c.inited,S=c.initStatus;Gi(t.data||[]).then(function(){s.scrollXLoad,s.scrollYLoad,s.expandColumn,c.inited=!0,c.initStatus=!0,S||Qn(),y||ha(),u.recalculate()})});var Vl=je(0);st(function(){return s.staticColumns.length},function(){Vl.value++}),st(function(){return s.staticColumns},function(){Vl.value++}),st(Vl,function(){zi(s.staticColumns)});var jl=je(0);st(function(){return s.tableColumn.length},function(){jl.value++}),st(function(){return s.tableColumn},function(){jl.value++}),st(jl,function(){f.analyColumnWidth()}),st(function(){return s.upDataFlag},function(){Ie(function(){u.updateData()})}),st(function(){return s.reColumnFlag},function(){Ie(function(){u.refreshColumn()})}),st(function(){return t.showHeader},function(){Ie(function(){u.recalculate(!0).then(function(){return u.refreshScroll()})})}),st(function(){return t.showFooter},function(){Ie(function(){u.recalculate(!0).then(function(){return u.refreshScroll()})})}),st(function(){return t.height},function(){Ie(function(){return u.recalculate(!0)})}),st(function(){return t.maxHeight},function(){Ie(function(){return u.recalculate(!0)})}),st(function(){return t.syncResize},function(y){y&&(Ul(),Ie(function(){Ul(),setTimeout(function(){return Ul()})}))});var $=je(0);st(function(){return t.mergeCells?t.mergeCells.length:-1},function(){$.value++}),st(function(){return t.mergeCells},function(){$.value++}),st($,function(){u.clearMergeCells(),Ie(function(){t.mergeCells&&u.setMergeCells(t.mergeCells)})});var Ee=je(0);st(function(){return t.mergeFooterItems?t.mergeFooterItems.length:-1},function(){Ee.value++}),st(function(){return t.mergeFooterItems},function(){Ee.value++}),st(Ee,function(){u.clearMergeFooterItems(),Ie(function(){t.mergeFooterItems&&u.setMergeFooterItems(t.mergeFooterItems)})}),ot.hooks.forEach(function(y){var S=y.setupTable;if(S){var R=S(Q);R&&E.isObject(R)&&Object.assign(Q,R)}}),f.preventEvent(null,"created",{$table:Q});var Oe;Od(function(){u.recalculate().then(function(){return u.refreshScroll()}),f.preventEvent(null,"activated",{$table:Q})}),Xm(function(){c.isActivated=!1,f.preventEvent(null,"deactivated",{$table:Q})}),Er(function(){Ie(function(){var y=t.data;t.treeConfig,t.showOverflow;var S=c.scrollXStore,R=c.scrollYStore,M=Z.value;if(Pe.value,U.value,we.value,ce.value,De.value,me.value,Object.assign(R,{startIndex:0,endIndex:0,visibleSize:0,adaptive:M.adaptive!==!1}),Object.assign(S,{startIndex:0,endIndex:0,visibleSize:0}),Gi(y||[]).then(function(){y&&y.length&&(c.inited=!0,c.initStatus=!0,Qn(),ha()),dr()}),t.autoResize){var F=Re.value,K=d.value,Y=f.getParentElem();Oe=zI(F.refreshDelay?E.throttle(function(){u.recalculate(!0)},F.refreshDelay,{leading:!0,trailing:!0}):function(){t.autoResize&&u.recalculate(!0)}),K&&Oe.observe(K),Y&&Oe.observe(Y)}}),bt.on(Q,"paste",Th),bt.on(Q,"copy",Uu),bt.on(Q,"cut",Hu),bt.on(Q,"mousedown",yh),bt.on(Q,"blur",bh),bt.on(Q,"mousewheel",xh),bt.on(Q,"keydown",Eh),bt.on(Q,"resize",Sh),Q.handleGlobalContextmenuEvent&&bt.on(Q,"contextmenu",Q.handleGlobalContextmenuEvent),f.preventEvent(null,"mounted",{$table:Q})}),Rl(function(){Oe&&Oe.disconnect(),u.closeFilter(),Q.closeMenu&&Q.closeMenu(),f.preventEvent(null,"beforeUnmount",{$table:Q})}),Rr(function(){bt.off(Q,"paste"),bt.off(Q,"copy"),bt.off(Q,"cut"),bt.off(Q,"mousedown"),bt.off(Q,"blur"),bt.off(Q,"mousewheel"),bt.off(Q,"keydown"),bt.off(Q,"resize"),bt.off(Q,"contextmenu"),f.preventEvent(null,"unmounted",{$table:Q})});var Ve=function(){var y,S=t.loading,R=t.stripe,M=t.showHeader,F=t.height,K=t.treeConfig,Y=t.mouseConfig,ae=t.showFooter,fe=t.highlightCell,Ae=t.highlightHoverRow,Le=t.highlightHoverColumn,Fe=t.editConfig,Ge=t.editRules,Ye=s.isGroup,Be=s.overflowX,et=s.overflowY,Ze=s.scrollXLoad,Ne=s.scrollYLoad,Xe=s.scrollbarHeight,ht=s.tableData,it=s.tableColumn,ft=s.tableGroupColumn,St=s.footerTableData,Vt=s.initStore,er=s.columnStore,ir=s.filterStore,mt=er.leftList,Ft=er.rightList,ar=r.loading,Lt=ve.value,Nt=J.value,Cn=U.value,Mo=me.value,Wl=ye.value,Fo=o.value,va=nt.value,Po=C.value,No=Te.value,ei=Se.value,$o=he.value;return D("div",{ref:d,class:["vxe-table","vxe-table--render-default","tid_".concat(a),"border--".concat(va),(y={},y["size--".concat(Fo)]=Fo,y["vaild-msg--".concat(Nt.msgMode)]=!!Ge,y["vxe-editable"]=!!Fe,y["old-cell-valid"]=Ge&&H.cellVaildMode==="obsolete",y["cell--highlight"]=fe,y["cell--selected"]=Y&&Po.selected,y["cell--area"]=Y&&Po.area,y["row--highlight"]=Mo.isHover||Ae,y["column--highlight"]=Wl.isHover||Le,y["is--header"]=M,y["is--footer"]=ae,y["is--group"]=Ye,y["is--tree-line"]=K&&(Cn.showLine||Cn.line),y["is--fixed-left"]=mt.length,y["is--fixed-right"]=Ft.length,y["is--animat"]=!!t.animat,y["is--round"]=t.round,y["is--stripe"]=!K&&R,y["is--loading"]=S,y["is--empty"]=!S&&!ht.length,y["is--scroll-y"]=et,y["is--scroll-x"]=Be,y["is--virtual-x"]=Ze,y["is--virtual-y"]=Ne,y)],onKeydown:Ah},[D("div",{class:"vxe-table-slots"},r.default?r.default({}):[]),D("div",{class:"vxe-table--render-wrapper"},[D("div",{class:"vxe-table--main-wrapper"},[M?D(Xv,{ref:b,tableData:ht,tableColumn:it,tableGroupColumn:ft}):$t(),D(zA,{ref:x,tableData:ht,tableColumn:it}),ae?D(KA,{ref:T,footerTableData:St,tableColumn:it}):$t()]),D("div",{class:"vxe-table--fixed-wrapper"},[mt&&mt.length&&Be?Vu("left"):$t(),Ft&&Ft.length&&Be?Vu("right"):$t()])]),D("div",{ref:V,class:"vxe-table--empty-placeholder"},[D("div",{class:"vxe-table--empty-content"},wh())]),D("div",{class:"vxe-table--border-line"}),D("div",{ref:q,class:"vxe-table--resizable-bar",style:Be?{"padding-bottom":"".concat(Xe,"px")}:null}),D(Jd,{class:"vxe-table--loading",modelValue:S,icon:ei.icon,text:ei.text},ar?{default:function(){return ar({$table:Q,$grid:G})}}:{}),Vt.filter?D(nr("vxe-table-filter"),{ref:g,filterStore:ir}):$t(),Vt.import&&t.importConfig?D(nr("vxe-import-panel"),{defaultOptions:s.importParams,storeData:s.importStore}):$t(),Vt.export&&(t.exportConfig||t.printConfig)?D(nr("vxe-export-panel"),{defaultOptions:s.exportParams,storeData:s.exportStore}):$t(),$o?D(nr("vxe-table-context-menu"),{ref:m}):$t(),i?D(nr("vxe-tooltip"),{ref:p,isArrow:!1,enterable:!1}):$t(),i&&t.editRules&&Nt.showMessage&&(Nt.message==="default"?!F:Nt.message==="tooltip")?D(nr("vxe-tooltip"),Dr({ref:v,class:[{"old-cell-valid":Ge&&H.cellVaildMode==="obsolete"},"vxe-table--valid-error"]},Nt.message==="tooltip"||ht.length===1?No:{})):$t(),i?D(nr("vxe-tooltip"),Dr({ref:h},Lt)):$t()])};return Q.renderVN=Ve,sr("xecolgroup",null),sr("$xetable",Q),Q},render:function(){return this.renderVN()}});var x0=Object.assign(Yc,{install:function(t){t.component(Yc.name,Yc)}}),QG=x0;Kt.component(Yc.name,Yc);const ez={vxe:{base:{pleaseInput:"请输入",pleaseSelect:"请选择"},loading:{text:"加载中..."},error:{groupFixed:"如果使用分组表头,固定列必须按组设置",groupMouseRange:'分组表头与 "{0}" 不能同时使用,这可能会出现错误',groupTag:'分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',scrollErrProp:'启用虚拟滚动后不支持该参数 "{0}"',errConflicts:'参数 "{0}" 与 "{1}" 有冲突',unableInsert:"无法插入到指定位置,请检查参数是否正确",useErr:'安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',barUnableLink:"工具栏无法关联表格",expandContent:'展开行的插槽应该是 "content",请检查是否正确',reqModule:'缺少 "{0}" 模块',reqProp:'缺少必要的 "{0}" 参数,这可能会导致出现错误',emptyProp:'参数 "{0}" 不允许为空',errProp:'不支持的参数 "{0}",可能为 "{1}"',colRepet:'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',notFunc:'方法 "{0}" 不存在',errFunc:'参数 "{0}" 不是一个方法',notValidators:'全局校验 "{0}" 不存在',notFormats:'全局格式化 "{0}" 不存在',notCommands:'全局指令 "{0}" 不存在',notSlot:'插槽 "{0}" 不存在',noTree:'树结构不支持 "{0}"',notProp:'不支持的参数 "{0}"',checkProp:'当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',coverProp:'"{0}" 的参数 "{1}" 被覆盖,这可能会出现错误',delFunc:'方法 "{0}" 已废弃,请使用 "{1}"',delProp:'参数 "{0}" 已废弃,请使用 "{1}"',delEvent:'事件 "{0}" 已废弃,请使用 "{1}"',removeProp:'参数 "{0}" 已废弃,不建议使用,这可能会导致出现错误',errFormat:'全局的格式化内容应该使用 "VXETable.formats" 定义,挂载 "formatter={0}" 的方式已不建议使用',notType:'不支持的文件类型 "{0}"',notExp:"该浏览器不支持导入/导出功能",impFields:"导入失败,请检查字段名和数据格式是否正确",treeNotImp:"树表格不支持导入"},renderer:{search:"搜索",cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},combination:{menus:{clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"锁定列",fixedGroup:"锁定组",cancelFixed:"取消锁定",fixedLeft:"锁定左侧",fixedRight:"锁定右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"当前列:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},empty:"(空白)",notData:"无匹配项"}},pro:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",extendErr:"如果延伸的区域包含被合并的单元格,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作"},fnr:{title:"查找和替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},table:{emptyText:"暂无数据",allTitle:"全选/取消",seqTitle:"#",confirmFilter:"筛选",resetFilter:"重置",allFilter:"全部",sortAsc:"升序:最低到最高",sortDesc:"降序:最高到最低",filter:"对所选的列启用筛选",impSuccess:"成功导入 {0} 条记录",expLoading:"正在导出中",expSuccess:"导出成功",expFilename:"导出_{0}",expOriginFilename:"导出_源_{0}",customTitle:"列设置",customAll:"全部",customConfirm:"确认",customRestore:"重置",maxFixedCol:"最大固定列的数量不能超过 {0} 个"},grid:{selectOneRecord:"请至少选择一条记录!",deleteSelectRecord:"您确定要删除所选记录吗?",removeSelectRecord:"您确定要移除所选记录吗?",dataUnchanged:"数据未改动!",delSuccess:"成功删除所选记录!",saveSuccess:"保存成功!",operError:"发生错误,操作失败!"},select:{search:"搜索",loadingText:"加载中",emptyText:"暂无数据"},pager:{goto:"前往",pagesize:"{0}条/页",total:"共 {0} 条记录",pageClassifier:"页",prevPage:"上一页",nextPage:"下一页",prevJump:"向上跳页",nextJump:"向下跳页"},alert:{title:"消息提示"},button:{confirm:"确认",cancel:"取消"},import:{modes:{covering:"覆盖",insert:"新增"},impTitle:"导入数据",impFile:"文件名",impSelect:"选择文件",impType:"文件类型",impOpts:"参数设置",impConfirm:"导入",impCancel:"取消"},export:{types:{csv:"CSV (逗号分隔)(*.csv)",html:"网页(*.html)",xml:"XML 数据(*.xml)",txt:"文本文件(制表符分隔)(*.txt)",xls:"Excel 97-2003 工作簿(*.xls)",xlsx:"Excel 工作簿(*.xlsx)",pdf:"PDF (*.pdf)"},modes:{current:"当前数据(当前页的数据)",selected:"选中数据(当前页选中的数据)",all:"全量数据(包括所有分页的数据)"},printTitle:"打印数据",expTitle:"导出数据",expName:"文件名",expNamePlaceholder:"请输入文件名",expSheetName:"标题",expSheetNamePlaceholder:"请输入标题",expType:"保存类型",expMode:"选择数据",expCurrentColumn:"全部字段",expColumn:"选择字段",expOpts:"参数设置",expOptHeader:"表头",expHeaderTitle:"是否需要表头",expOptFooter:"表尾",expFooterTitle:"是否需要表尾",expOptColgroup:"分组表头",expColgroupTitle:"如果存在,则支持带有分组结构的表头",expOptMerge:"合并",expMergeTitle:"如果存在,则支持带有合并结构的单元格",expOptAllExpand:"展开层级",expAllExpandTitle:"如果存在,则支持将带有层级结构的数据全部展开",expOptUseStyle:"样式",expUseStyleTitle:"如果存在,则支持带样式的单元格",expOptOriginal:"源数据",expOriginalTitle:"如果为源数据,则支持导入到表格中",expPrint:"打印",expConfirm:"导出",expCancel:"取消"},modal:{zoomIn:"最大化",zoomOut:"还原",close:"关闭"},form:{folding:"收起",unfolding:"展开"},toolbar:{import:"导入",export:"导出",print:"打印",refresh:"刷新",zoomIn:"全屏",zoomOut:"还原",custom:"列设置",customAll:"全部",customConfirm:"确认",customRestore:"重置",fixedLeft:"固定在左侧",fixedRight:"固定在右侧",cancelfixed:"取消固定"},input:{date:{m1:"01 月",m2:"02 月",m3:"03 月",m4:"04 月",m5:"05 月",m6:"06 月",m7:"07 月",m8:"08 月",m9:"09 月",m10:"10 月",m11:"11 月",m12:"12 月",quarterLabel:"{0} 年",monthLabel:"{0} 年",dayLabel:"{0} 年 {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"yyyy 年第 WW 周",month:"yyyy-MM",quarter:"yyyy 年第 q 季度",year:"yyyy"},weeks:{w:"周",w0:"周日",w1:"周一",w2:"周二",w3:"周三",w4:"周四",w5:"周五",w6:"周六"},months:{m0:"一月",m1:"二月",m2:"三月",m3:"四月",m4:"五月",m5:"六月",m6:"七月",m7:"八月",m8:"九月",m9:"十月",m10:"十一月",m11:"十二月"},quarters:{q1:"第一季度",q2:"第二季度",q3:"第三季度",q4:"第四季度"}}}}};var tz=[$g,Bg,Ug,Vg,jg,Wg,uu,Gg,zg,qg,Xg,Zg,Jg,Qg,e0,t0,r0,n0,i0,a0,s0,l0,f0,d0,h0,p0,v0,m0,g0,y0,b0,x0];Zd({i18n:function(t,e){return E.toFormatString(E.get(ez,t),e)}});function rz(t,e){E.isPlainObject(e)&&Zd(e),tz.forEach(function(r){return r.install(t)})}const nz=Object.freeze(Object.defineProperty({__proto__:null,Button:EG,Checkbox:vG,CheckboxGroup:mG,Colgroup:cG,Column:lG,Edit:M7,Export:J7,Filter:_7,Form:MG,FormGather:PG,FormItem:FG,Grid:dG,Header:Xv,Icon:aG,Input:xG,Keyboard:tG,List:GG,Menu:D7,Modal:_G,Optgroup:BG,Option:UG,Pager:pG,Pulldown:zG,Radio:gG,RadioButton:bG,RadioGroup:yG,Select:NG,Switch:HG,Table:QG,Textarea:AG,Toolbar:hG,Tooltip:LG,VXETable:ot,Validator:iG,VxeButton:a0,VxeCheckbox:Jg,VxeCheckboxGroup:Qg,VxeColgroup:zg,VxeColumn:Gg,VxeForm:f0,VxeFormGather:h0,VxeFormItem:d0,VxeGrid:qg,VxeIcon:uu,VxeInput:n0,VxeList:y0,VxeModal:s0,VxeModuleEdit:Ug,VxeModuleExport:Vg,VxeModuleFilter:$g,VxeModuleKeyboard:jg,VxeModuleMenu:Bg,VxeModuleValidator:Wg,VxeOptgroup:v0,VxeOption:m0,VxePager:Zg,VxePulldown:b0,VxeRadio:e0,VxeRadioButton:r0,VxeRadioGroup:t0,VxeSelect:p0,VxeSwitch:g0,VxeTable:x0,VxeTextarea:i0,VxeToolbar:Xg,VxeTooltip:l0,_t:xI,commands:hI,config:Ng,formats:NC,globalConfs:T7,hooks:gI,install:rz,interceptor:wc,menus:pI,modal:IG,print:_I,readFile:ed,renderer:as,saveFile:td,setup:Zd,t:bI,use:yI,v:AI,validators:mI},Symbol.toStringTag,{value:"Module"})),iz="modulepreload",az=function(t){return"/"+t},YA={},lc=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=az(a),a in YA)return;YA[a]=!0;const o=a.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":iz,o||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),o)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e())};/*!
  * vue-router v4.2.1
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */const Xs=typeof window<"u";function oz(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const or=Object.assign;function vp(t,e){const r={};for(const n in e){const i=e[n];r[n]=Ui(i)?i.map(t):t(i)}return r}const qc=()=>{},Ui=Array.isArray,sz=/\/$/,lz=t=>t.replace(sz,"");function mp(t,e,r="/"){let n,i={},a="",o="";const l=e.indexOf("#");let s=e.indexOf("?");return l<s&&l>=0&&(s=-1),s>-1&&(n=e.slice(0,s),a=e.slice(s+1,l>-1?l:e.length),i=t(a)),l>-1&&(n=n||e.slice(0,l),o=e.slice(l,e.length)),n=dz(n??e,r),{fullPath:n+(a&&"?")+a+o,path:n,query:i,hash:o}}function cz(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function qA(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function uz(t,e,r){const n=e.matched.length-1,i=r.matched.length-1;return n>-1&&n===i&&xl(e.matched[n],r.matched[i])&&YI(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function xl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function YI(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!fz(t[r],e[r]))return!1;return!0}function fz(t,e){return Ui(t)?XA(t,e):Ui(e)?XA(e,t):t===e}function XA(t,e){return Ui(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t.length===1&&t[0]===e}function dz(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),n=t.split("/"),i=n[n.length-1];(i===".."||i===".")&&n.push("");let a=r.length-1,o,l;for(o=0;o<n.length;o++)if(l=n[o],l!==".")if(l==="..")a>1&&a--;else break;return r.slice(0,a).join("/")+"/"+n.slice(o-(o===n.length?1:0)).join("/")}var fu;(function(t){t.pop="pop",t.push="push"})(fu||(fu={}));var Xc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Xc||(Xc={}));function hz(t){if(!t)if(Xs){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),lz(t)}const pz=/^[^#]+#/;function vz(t,e){return t.replace(pz,"#")+e}function mz(t,e){const r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-r.left-(e.left||0),top:n.top-r.top-(e.top||0)}}const Qd=()=>({left:window.pageXOffset,top:window.pageYOffset});function gz(t){let e;if("el"in t){const r=t.el,n=typeof r=="string"&&r.startsWith("#"),i=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!i)return;e=mz(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function ZA(t,e){return(history.state?history.state.position-e:-1)+t}const Zv=new Map;function yz(t,e){Zv.set(t,e)}function bz(t){const e=Zv.get(t);return Zv.delete(t),e}let xz=()=>location.protocol+"//"+location.host;function qI(t,e){const{pathname:r,search:n,hash:i}=e,a=t.indexOf("#");if(a>-1){let l=i.includes(t.slice(a))?t.slice(a).length:1,s=i.slice(l);return s[0]!=="/"&&(s="/"+s),qA(s,"")}return qA(r,t)+n+i}function Az(t,e,r,n){let i=[],a=[],o=null;const l=({state:d})=>{const h=qI(t,location),p=r.value,v=e.value;let g=0;if(d){if(r.value=h,e.value=d,o&&o===p){o=null;return}g=v?d.position-v.position:0}else n(h);i.forEach(m=>{m(r.value,p,{delta:g,type:fu.pop,direction:g?g>0?Xc.forward:Xc.back:Xc.unknown})})};function s(){o=r.value}function c(d){i.push(d);const h=()=>{const p=i.indexOf(d);p>-1&&i.splice(p,1)};return a.push(h),h}function u(){const{history:d}=window;d.state&&d.replaceState(or({},d.state,{scroll:Qd()}),"")}function f(){for(const d of a)d();a=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:s,listen:c,destroy:f}}function JA(t,e,r,n=!1,i=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:i?Qd():null}}function Ez(t){const{history:e,location:r}=window,n={value:qI(t,r)},i={value:e.state};i.value||a(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function a(s,c,u){const f=t.indexOf("#"),d=f>-1?(r.host&&document.querySelector("base")?t:t.slice(f))+s:xz()+t+s;try{e[u?"replaceState":"pushState"](c,"",d),i.value=c}catch(h){console.error(h),r[u?"replace":"assign"](d)}}function o(s,c){const u=or({},e.state,JA(i.value.back,s,i.value.forward,!0),c,{position:i.value.position});a(s,u,!0),n.value=s}function l(s,c){const u=or({},i.value,e.state,{forward:s,scroll:Qd()});a(u.current,u,!0);const f=or({},JA(n.value,s,null),{position:u.position+1},c);a(s,f,!1),n.value=s}return{location:n,state:i,push:l,replace:o}}function Tz(t){t=hz(t);const e=Ez(t),r=Az(t,e.state,e.location,e.replace);function n(a,o=!0){o||r.pauseListeners(),history.go(a)}const i=or({location:"",base:t,go:n,createHref:vz.bind(null,t)},e,r);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function Sz(t){return typeof t=="string"||t&&typeof t=="object"}function XI(t){return typeof t=="string"||typeof t=="symbol"}const ro={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ZI=Symbol("");var QA;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(QA||(QA={}));function Al(t,e){return or(new Error,{type:t,[ZI]:!0},e)}function Aa(t,e){return t instanceof Error&&ZI in t&&(e==null||!!(t.type&e))}const eE="[^/]+?",wz={sensitive:!1,strict:!1,start:!0,end:!0},Cz=/[.+*?^${}()[\]/\\]/g;function Iz(t,e){const r=or({},wz,e),n=[];let i=r.start?"^":"";const a=[];for(const c of t){const u=c.length?[]:[90];r.strict&&!c.length&&(i+="/");for(let f=0;f<c.length;f++){const d=c[f];let h=40+(r.sensitive?.25:0);if(d.type===0)f||(i+="/"),i+=d.value.replace(Cz,"\\$&"),h+=40;else if(d.type===1){const{value:p,repeatable:v,optional:g,regexp:m}=d;a.push({name:p,repeatable:v,optional:g});const b=m||eE;if(b!==eE){h+=10;try{new RegExp(`(${b})`)}catch(T){throw new Error(`Invalid custom RegExp for param "${p}" (${b}): `+T.message)}}let x=v?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;f||(x=g&&c.length<2?`(?:/${x})`:"/"+x),g&&(x+="?"),i+=x,h+=20,g&&(h+=-8),v&&(h+=-20),b===".*"&&(h+=-50)}u.push(h)}n.push(u)}if(r.strict&&r.end){const c=n.length-1;n[c][n[c].length-1]+=.7000000000000001}r.strict||(i+="/?"),r.end?i+="$":r.strict&&(i+="(?:/|$)");const o=new RegExp(i,r.sensitive?"":"i");function l(c){const u=c.match(o),f={};if(!u)return null;for(let d=1;d<u.length;d++){const h=u[d]||"",p=a[d-1];f[p.name]=h&&p.repeatable?h.split("/"):h}return f}function s(c){let u="",f=!1;for(const d of t){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const h of d)if(h.type===0)u+=h.value;else if(h.type===1){const{value:p,repeatable:v,optional:g}=h,m=p in c?c[p]:"";if(Ui(m)&&!v)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const b=Ui(m)?m.join("/"):m;if(!b)if(g)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${p}"`);u+=b}}return u||"/"}return{re:o,score:n,keys:a,parse:l,stringify:s}}function _z(t,e){let r=0;for(;r<t.length&&r<e.length;){const n=e[r]-t[r];if(n)return n;r++}return t.length<e.length?t.length===1&&t[0]===40+40?-1:1:t.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function Rz(t,e){let r=0;const n=t.score,i=e.score;for(;r<n.length&&r<i.length;){const a=_z(n[r],i[r]);if(a)return a;r++}if(Math.abs(i.length-n.length)===1){if(tE(n))return 1;if(tE(i))return-1}return i.length-n.length}function tE(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const Lz={type:0,value:""},Dz=/[a-zA-Z0-9_]/;function Oz(t){if(!t)return[[]];if(t==="/")return[[Lz]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${r})/"${c}": ${h}`)}let r=0,n=r;const i=[];let a;function o(){a&&i.push(a),a=[]}let l=0,s,c="",u="";function f(){c&&(r===0?a.push({type:0,value:c}):r===1||r===2||r===3?(a.length>1&&(s==="*"||s==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=s}for(;l<t.length;){if(s=t[l++],s==="\\"&&r!==2){n=r,r=4;continue}switch(r){case 0:s==="/"?(c&&f(),o()):s===":"?(f(),r=1):d();break;case 4:d(),r=n;break;case 1:s==="("?r=2:Dz.test(s)?d():(f(),r=0,s!=="*"&&s!=="?"&&s!=="+"&&l--);break;case 2:s===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+s:r=3:u+=s;break;case 3:f(),r=0,s!=="*"&&s!=="?"&&s!=="+"&&l--,u="";break;default:e("Unknown state");break}}return r===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),i}function kz(t,e,r){const n=Iz(Oz(t.path),r),i=or(n,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function Mz(t,e){const r=[],n=new Map;e=iE({strict:!1,end:!0,sensitive:!1},e);function i(u){return n.get(u)}function a(u,f,d){const h=!d,p=Fz(u);p.aliasOf=d&&d.record;const v=iE(e,u),g=[p];if("alias"in u){const x=typeof u.alias=="string"?[u.alias]:u.alias;for(const T of x)g.push(or({},p,{components:d?d.record.components:p.components,path:T,aliasOf:d?d.record:p}))}let m,b;for(const x of g){const{path:T}=x;if(f&&T[0]!=="/"){const A=f.record.path,O=A[A.length-1]==="/"?"":"/";x.path=f.record.path+(T&&O+T)}if(m=kz(x,f,v),d?d.alias.push(m):(b=b||m,b!==m&&b.alias.push(m),h&&u.name&&!nE(m)&&o(u.name)),p.children){const A=p.children;for(let O=0;O<A.length;O++)a(A[O],m,d&&d.children[O])}d=d||m,(m.record.components&&Object.keys(m.record.components).length||m.record.name||m.record.redirect)&&s(m)}return b?()=>{o(b)}:qc}function o(u){if(XI(u)){const f=n.get(u);f&&(n.delete(u),r.splice(r.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=r.indexOf(u);f>-1&&(r.splice(f,1),u.record.name&&n.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function l(){return r}function s(u){let f=0;for(;f<r.length&&Rz(u,r[f])>=0&&(u.record.path!==r[f].record.path||!JI(u,r[f]));)f++;r.splice(f,0,u),u.record.name&&!nE(u)&&n.set(u.record.name,u)}function c(u,f){let d,h={},p,v;if("name"in u&&u.name){if(d=n.get(u.name),!d)throw Al(1,{location:u});v=d.record.name,h=or(rE(f.params,d.keys.filter(b=>!b.optional).map(b=>b.name)),u.params&&rE(u.params,d.keys.map(b=>b.name))),p=d.stringify(h)}else if("path"in u)p=u.path,d=r.find(b=>b.re.test(p)),d&&(h=d.parse(p),v=d.record.name);else{if(d=f.name?n.get(f.name):r.find(b=>b.re.test(f.path)),!d)throw Al(1,{location:u,currentLocation:f});v=d.record.name,h=or({},f.params,u.params),p=d.stringify(h)}const g=[];let m=d;for(;m;)g.unshift(m.record),m=m.parent;return{name:v,path:p,params:h,matched:g,meta:Nz(g)}}return t.forEach(u=>a(u)),{addRoute:a,resolve:c,removeRoute:o,getRoutes:l,getRecordMatcher:i}}function rE(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function Fz(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:Pz(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function Pz(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="boolean"?r:r[n];return e}function nE(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Nz(t){return t.reduce((e,r)=>or(e,r.meta),{})}function iE(t,e){const r={};for(const n in t)r[n]=n in e?e[n]:t[n];return r}function JI(t,e){return e.children.some(r=>r===t||JI(t,r))}const QI=/#/g,$z=/&/g,Bz=/\//g,Uz=/=/g,Hz=/\?/g,e_=/\+/g,Vz=/%5B/g,jz=/%5D/g,t_=/%5E/g,Wz=/%60/g,r_=/%7B/g,Gz=/%7C/g,n_=/%7D/g,zz=/%20/g;function A0(t){return encodeURI(""+t).replace(Gz,"|").replace(Vz,"[").replace(jz,"]")}function Kz(t){return A0(t).replace(r_,"{").replace(n_,"}").replace(t_,"^")}function Jv(t){return A0(t).replace(e_,"%2B").replace(zz,"+").replace(QI,"%23").replace($z,"%26").replace(Wz,"`").replace(r_,"{").replace(n_,"}").replace(t_,"^")}function Yz(t){return Jv(t).replace(Uz,"%3D")}function qz(t){return A0(t).replace(QI,"%23").replace(Hz,"%3F")}function Xz(t){return t==null?"":qz(t).replace(Bz,"%2F")}function ad(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function Zz(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;i<n.length;++i){const a=n[i].replace(e_," "),o=a.indexOf("="),l=ad(o<0?a:a.slice(0,o)),s=o<0?null:ad(a.slice(o+1));if(l in e){let c=e[l];Ui(c)||(c=e[l]=[c]),c.push(s)}else e[l]=s}return e}function aE(t){let e="";for(let r in t){const n=t[r];if(r=Yz(r),n==null){n!==void 0&&(e+=(e.length?"&":"")+r);continue}(Ui(n)?n.map(a=>a&&Jv(a)):[n&&Jv(n)]).forEach(a=>{a!==void 0&&(e+=(e.length?"&":"")+r,a!=null&&(e+="="+a))})}return e}function Jz(t){const e={};for(const r in t){const n=t[r];n!==void 0&&(e[r]=Ui(n)?n.map(i=>i==null?null:""+i):n==null?n:""+n)}return e}const Qz=Symbol(""),oE=Symbol(""),eh=Symbol(""),E0=Symbol(""),Qv=Symbol("");function cc(){let t=[];function e(n){return t.push(n),()=>{const i=t.indexOf(n);i>-1&&t.splice(i,1)}}function r(){t=[]}return{add:e,list:()=>t,reset:r}}function co(t,e,r,n,i){const a=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise((o,l)=>{const s=f=>{f===!1?l(Al(4,{from:r,to:e})):f instanceof Error?l(f):Sz(f)?l(Al(2,{from:e,to:f})):(a&&n.enterCallbacks[i]===a&&typeof f=="function"&&a.push(f),o())},c=t.call(n&&n.instances[i],e,r,s);let u=Promise.resolve(c);t.length<3&&(u=u.then(s)),u.catch(f=>l(f))})}function gp(t,e,r,n){const i=[];for(const a of t)for(const o in a.components){let l=a.components[o];if(!(e!=="beforeRouteEnter"&&!a.instances[o]))if(eK(l)){const c=(l.__vccOpts||l)[e];c&&i.push(co(c,r,n,a,o))}else{let s=l();i.push(()=>s.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${a.path}"`));const u=oz(c)?c.default:c;a.components[o]=u;const d=(u.__vccOpts||u)[e];return d&&co(d,r,n,a,o)()}))}}return i}function eK(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function sE(t){const e=ct(eh),r=ct(E0),n=_e(()=>e.resolve(Et(t.to))),i=_e(()=>{const{matched:s}=n.value,{length:c}=s,u=s[c-1],f=r.matched;if(!u||!f.length)return-1;const d=f.findIndex(xl.bind(null,u));if(d>-1)return d;const h=lE(s[c-2]);return c>1&&lE(u)===h&&f[f.length-1].path!==h?f.findIndex(xl.bind(null,s[c-2])):d}),a=_e(()=>i.value>-1&&iK(r.params,n.value.params)),o=_e(()=>i.value>-1&&i.value===r.matched.length-1&&YI(r.params,n.value.params));function l(s={}){return nK(s)?e[Et(t.replace)?"replace":"push"](Et(t.to)).catch(qc):Promise.resolve()}return{route:n,href:_e(()=>n.value.href),isActive:a,isExactActive:o,navigate:l}}const tK=xt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:sE,setup(t,{slots:e}){const r=Jt(sE(t)),{options:n}=ct(eh),i=_e(()=>({[cE(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[cE(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const a=e.default&&e.default(r);return t.custom?a:D("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:i.value},a)}}}),rK=tK;function nK(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function iK(t,e){for(const r in e){const n=e[r],i=t[r];if(typeof n=="string"){if(n!==i)return!1}else if(!Ui(i)||i.length!==n.length||n.some((a,o)=>a!==i[o]))return!1}return!0}function lE(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const cE=(t,e,r)=>t??e??r,aK=xt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=ct(Qv),i=_e(()=>t.route||n.value),a=ct(oE,0),o=_e(()=>{let c=Et(a);const{matched:u}=i.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),l=_e(()=>i.value.matched[o.value]);sr(oE,_e(()=>o.value+1)),sr(Qz,l),sr(Qv,i);const s=je();return st(()=>[s.value,l.value,t.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!xl(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,f=l.value,d=f&&f.components[u];if(!d)return uE(r.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,g=D(d,or({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:s}));return uE(r.default,{Component:g,route:c})||g}}});function uE(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const oK=aK;function sK(t){const e=Mz(t.routes,t),r=t.parseQuery||Zz,n=t.stringifyQuery||aE,i=t.history,a=cc(),o=cc(),l=cc(),s=z1(ro);let c=ro;Xs&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vp.bind(null,ce=>""+ce),f=vp.bind(null,Xz),d=vp.bind(null,ad);function h(ce,re){let ve,Te;return XI(ce)?(ve=e.getRecordMatcher(ce),Te=re):Te=ce,e.addRoute(Te,ve)}function p(ce){const re=e.getRecordMatcher(ce);re&&e.removeRoute(re)}function v(){return e.getRoutes().map(ce=>ce.record)}function g(ce){return!!e.getRecordMatcher(ce)}function m(ce,re){if(re=or({},re||s.value),typeof ce=="string"){const C=mp(r,ce,re.path),j=e.resolve({path:C.path},re),ie=i.createHref(C.fullPath);return or(C,j,{params:d(j.params),hash:ad(C.hash),redirectedFrom:void 0,href:ie})}let ve;if("path"in ce)ve=or({},ce,{path:mp(r,ce.path,re.path).path});else{const C=or({},ce.params);for(const j in C)C[j]==null&&delete C[j];ve=or({},ce,{params:f(C)}),re.params=f(re.params)}const Te=e.resolve(ve,re),Pe=ce.hash||"";Te.params=u(d(Te.params));const B=cz(n,or({},ce,{hash:Kz(Pe),path:Te.path})),w=i.createHref(B);return or({fullPath:B,hash:Pe,query:n===aE?Jz(ce.query):ce.query||{}},Te,{redirectedFrom:void 0,href:w})}function b(ce){return typeof ce=="string"?mp(r,ce,s.value.path):or({},ce)}function x(ce,re){if(c!==ce)return Al(8,{from:re,to:ce})}function T(ce){return I(ce)}function A(ce){return T(or(b(ce),{replace:!0}))}function O(ce){const re=ce.matched[ce.matched.length-1];if(re&&re.redirect){const{redirect:ve}=re;let Te=typeof ve=="function"?ve(ce):ve;return typeof Te=="string"&&(Te=Te.includes("?")||Te.includes("#")?Te=b(Te):{path:Te},Te.params={}),or({query:ce.query,hash:ce.hash,params:"path"in Te?{}:ce.params},Te)}}function I(ce,re){const ve=c=m(ce),Te=s.value,Pe=ce.state,B=ce.force,w=ce.replace===!0,C=O(ve);if(C)return I(or(b(C),{state:typeof C=="object"?or({},Pe,C.state):Pe,force:B,replace:w}),re||ve);const j=ve;j.redirectedFrom=re;let ie;return!B&&uz(n,Te,ve)&&(ie=Al(16,{to:j,from:Te}),ye(Te,Te,!0,!1)),(ie?Promise.resolve(ie):L(j,Te)).catch(ne=>Aa(ne)?Aa(ne,2)?ne:le(ne):N(ne,j,Te)).then(ne=>{if(ne){if(Aa(ne,2))return I(or({replace:w},b(ne.to),{state:typeof ne.to=="object"?or({},Pe,ne.to.state):Pe,force:B}),re||j)}else ne=W(j,Te,!0,w,Pe);return P(j,Te,ne),ne})}function _(ce,re){const ve=x(ce,re);return ve?Promise.reject(ve):Promise.resolve()}function k(ce){const re=be.values().next().value;return re&&typeof re.runWithContext=="function"?re.runWithContext(ce):ce()}function L(ce,re){let ve;const[Te,Pe,B]=lK(ce,re);ve=gp(Te.reverse(),"beforeRouteLeave",ce,re);for(const C of Te)C.leaveGuards.forEach(j=>{ve.push(co(j,ce,re))});const w=_.bind(null,ce,re);return ve.push(w),we(ve).then(()=>{ve=[];for(const C of a.list())ve.push(co(C,ce,re));return ve.push(w),we(ve)}).then(()=>{ve=gp(Pe,"beforeRouteUpdate",ce,re);for(const C of Pe)C.updateGuards.forEach(j=>{ve.push(co(j,ce,re))});return ve.push(w),we(ve)}).then(()=>{ve=[];for(const C of ce.matched)if(C.beforeEnter&&!re.matched.includes(C))if(Ui(C.beforeEnter))for(const j of C.beforeEnter)ve.push(co(j,ce,re));else ve.push(co(C.beforeEnter,ce,re));return ve.push(w),we(ve)}).then(()=>(ce.matched.forEach(C=>C.enterCallbacks={}),ve=gp(B,"beforeRouteEnter",ce,re),ve.push(w),we(ve))).then(()=>{ve=[];for(const C of o.list())ve.push(co(C,ce,re));return ve.push(w),we(ve)}).catch(C=>Aa(C,8)?C:Promise.reject(C))}function P(ce,re,ve){for(const Te of l.list())k(()=>Te(ce,re,ve))}function W(ce,re,ve,Te,Pe){const B=x(ce,re);if(B)return B;const w=re===ro,C=Xs?history.state:{};ve&&(Te||w?i.replace(ce.fullPath,or({scroll:w&&C&&C.scroll},Pe)):i.push(ce.fullPath,Pe)),s.value=ce,ye(ce,re,ve,w),le()}let q;function V(){q||(q=i.listen((ce,re,ve)=>{if(!Ce.listening)return;const Te=m(ce),Pe=O(Te);if(Pe){I(or(Pe,{replace:!0}),Te).catch(qc);return}c=Te;const B=s.value;Xs&&yz(ZA(B.fullPath,ve.delta),Qd()),L(Te,B).catch(w=>Aa(w,12)?w:Aa(w,2)?(I(w.to,Te).then(C=>{Aa(C,20)&&!ve.delta&&ve.type===fu.pop&&i.go(-1,!1)}).catch(qc),Promise.reject()):(ve.delta&&i.go(-ve.delta,!1),N(w,Te,B))).then(w=>{w=w||W(Te,B,!1),w&&(ve.delta&&!Aa(w,8)?i.go(-ve.delta,!1):ve.type===fu.pop&&Aa(w,20)&&i.go(-1,!1)),P(Te,B,w)}).catch(qc)}))}let G=cc(),pe=cc(),J;function N(ce,re,ve){le(ce);const Te=pe.list();return Te.length?Te.forEach(Pe=>Pe(ce,re,ve)):console.error(ce),Promise.reject(ce)}function Z(){return J&&s.value!==ro?Promise.resolve():new Promise((ce,re)=>{G.add([ce,re])})}function le(ce){return J||(J=!ce,V(),G.list().forEach(([re,ve])=>ce?ve(ce):re()),G.reset()),ce}function ye(ce,re,ve,Te){const{scrollBehavior:Pe}=t;if(!Xs||!Pe)return Promise.resolve();const B=!ve&&bz(ZA(ce.fullPath,0))||(Te||!ve)&&history.state&&history.state.scroll||null;return Ie().then(()=>Pe(ce,re,B)).then(w=>w&&gz(w)).catch(w=>N(w,ce,re))}const me=ce=>i.go(ce);let Re;const be=new Set,Ce={currentRoute:s,listening:!0,addRoute:h,removeRoute:p,hasRoute:g,getRoutes:v,resolve:m,options:t,push:T,replace:A,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:a.add,beforeResolve:o.add,afterEach:l.add,onError:pe.add,isReady:Z,install(ce){const re=this;ce.component("RouterLink",rK),ce.component("RouterView",oK),ce.config.globalProperties.$router=re,Object.defineProperty(ce.config.globalProperties,"$route",{enumerable:!0,get:()=>Et(s)}),Xs&&!Re&&s.value===ro&&(Re=!0,T(i.location).catch(Pe=>{}));const ve={};for(const Pe in ro)ve[Pe]=_e(()=>s.value[Pe]);ce.provide(eh,re),ce.provide(E0,Jt(ve)),ce.provide(Qv,s);const Te=ce.unmount;be.add(ce),ce.unmount=function(){be.delete(ce),be.size<1&&(c=ro,q&&q(),q=null,s.value=ro,Re=!1,J=!1),Te()}}};function we(ce){return ce.reduce((re,ve)=>re.then(()=>k(ve)),Promise.resolve())}return Ce}function lK(t,e){const r=[],n=[],i=[],a=Math.max(e.matched.length,t.matched.length);for(let o=0;o<a;o++){const l=e.matched[o];l&&(t.matched.find(c=>xl(c,l))?n.push(l):r.push(l));const s=t.matched[o];s&&(e.matched.find(c=>xl(c,s))||i.push(s))}return[r,n,i]}function gce(){return ct(eh)}function yce(){return ct(E0)}var fE;const Pl=typeof window<"u",cK=t=>typeof t=="string",od=()=>{},uK=Pl&&((fE=window==null?void 0:window.navigator)==null?void 0:fE.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function th(t){return typeof t=="function"?t():Et(t)}function fK(t,e){function r(...n){return new Promise((i,a)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(i).catch(a)})}return r}function dK(t,e=!0,r=!0,n=!1){let i=0,a,o=!0,l=od,s;const c=()=>{a&&(clearTimeout(a),a=void 0,l(),l=od)};return f=>{const d=th(t),h=Date.now()-i,p=()=>s=f();return c(),d<=0?(i=Date.now(),p()):(h>d&&(r||!o)?(i=Date.now(),p()):e&&(s=new Promise((v,g)=>{l=n?g:v,a=setTimeout(()=>{i=Date.now(),o=!0,v(p()),c()},Math.max(0,d-h))})),!r&&!a&&(a=setTimeout(()=>o=!0,d)),o=!1,s)}}function hK(t){return t}function T0(t){return O1()?(wD(t),!0):!1}function bce(t,e=200,r=!1,n=!0,i=!1){return fK(dK(e,r,n,i),t)}function pK(t,e=!0){xn()?Er(t):e?t():Ie(t)}function vK(t,e,r={}){const{immediate:n=!0}=r,i=je(!1);let a=null;function o(){a&&(clearTimeout(a),a=null)}function l(){i.value=!1,o()}function s(...c){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,t(...c)},th(e))}return n&&(i.value=!0,Pl&&s()),T0(l),{isPending:Hm(i),start:s,stop:l}}function rl(t){var e;const r=th(t);return(e=r==null?void 0:r.$el)!=null?e:r}const S0=Pl?window:void 0;function Df(...t){let e,r,n,i;if(cK(t[0])||Array.isArray(t[0])?([r,n,i]=t,e=S0):[e,r,n,i]=t,!e)return od;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],o=()=>{a.forEach(u=>u()),a.length=0},l=(u,f,d,h)=>(u.addEventListener(f,d,h),()=>u.removeEventListener(f,d,h)),s=st(()=>[rl(e),th(i)],([u,f])=>{o(),u&&a.push(...r.flatMap(d=>n.map(h=>l(u,d,h,f))))},{immediate:!0,flush:"post"}),c=()=>{s(),o()};return T0(c),c}let dE=!1;function xce(t,e,r={}){const{window:n=S0,ignore:i=[],capture:a=!0,detectIframe:o=!1}=r;if(!n)return;uK&&!dE&&(dE=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",od)));let l=!0;const s=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=rl(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[Df(n,"click",d=>{const h=rl(t);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!s(d)),!l){l=!0;return}e(d)}},{passive:!0,capture:a}),Df(n,"pointerdown",d=>{const h=rl(t);h&&(l=!d.composedPath().includes(h)&&!s(d))},{passive:!0}),o&&Df(n,"blur",d=>{var h;const p=rl(t);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&e(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function mK(t,e=!1){const r=je(),n=()=>r.value=!!t();return n(),pK(n,e),r}const hE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pE="__vueuse_ssr_handlers__";hE[pE]=hE[pE]||{};var vE=Object.getOwnPropertySymbols,gK=Object.prototype.hasOwnProperty,yK=Object.prototype.propertyIsEnumerable,bK=(t,e)=>{var r={};for(var n in t)gK.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&vE)for(var n of vE(t))e.indexOf(n)<0&&yK.call(t,n)&&(r[n]=t[n]);return r};function xK(t,e,r={}){const n=r,{window:i=S0}=n,a=bK(n,["window"]);let o;const l=mK(()=>i&&"ResizeObserver"in i),s=()=>{o&&(o.disconnect(),o=void 0)},c=st(()=>rl(t),f=>{s(),l.value&&i&&f&&(o=new ResizeObserver(e),o.observe(f,a))},{immediate:!0,flush:"post"}),u=()=>{s(),c()};return T0(u),{isSupported:l,stop:u}}var mE;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(mE||(mE={}));var AK=Object.defineProperty,gE=Object.getOwnPropertySymbols,EK=Object.prototype.hasOwnProperty,TK=Object.prototype.propertyIsEnumerable,yE=(t,e,r)=>e in t?AK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,SK=(t,e)=>{for(var r in e||(e={}))EK.call(e,r)&&yE(t,r,e[r]);if(gE)for(var r of gE(e))TK.call(e,r)&&yE(t,r,e[r]);return t};const wK={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};SK({linear:hK},wK);var CK=typeof global=="object"&&global&&global.Object===Object&&global;const IK=CK;var _K=typeof self=="object"&&self&&self.Object===Object&&self,RK=IK||_K||Function("return this")();const w0=RK;var LK=w0.Symbol;const El=LK;var i_=Object.prototype,DK=i_.hasOwnProperty,OK=i_.toString,uc=El?El.toStringTag:void 0;function kK(t){var e=DK.call(t,uc),r=t[uc];try{t[uc]=void 0;var n=!0}catch{}var i=OK.call(t);return n&&(e?t[uc]=r:delete t[uc]),i}var MK=Object.prototype,FK=MK.toString;function PK(t){return FK.call(t)}var NK="[object Null]",$K="[object Undefined]",bE=El?El.toStringTag:void 0;function a_(t){return t==null?t===void 0?$K:NK:bE&&bE in Object(t)?kK(t):PK(t)}function BK(t){return t!=null&&typeof t=="object"}var UK="[object Symbol]";function C0(t){return typeof t=="symbol"||BK(t)&&a_(t)==UK}function HK(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var VK=Array.isArray;const I0=VK;var jK=1/0,xE=El?El.prototype:void 0,AE=xE?xE.toString:void 0;function o_(t){if(typeof t=="string")return t;if(I0(t))return HK(t,o_)+"";if(C0(t))return AE?AE.call(t):"";var e=t+"";return e=="0"&&1/t==-jK?"-0":e}function s_(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var WK="[object AsyncFunction]",GK="[object Function]",zK="[object GeneratorFunction]",KK="[object Proxy]";function YK(t){if(!s_(t))return!1;var e=a_(t);return e==GK||e==zK||e==WK||e==KK}var qK=w0["__core-js_shared__"];const yp=qK;var EE=function(){var t=/[^.]+$/.exec(yp&&yp.keys&&yp.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function XK(t){return!!EE&&EE in t}var ZK=Function.prototype,JK=ZK.toString;function QK(t){if(t!=null){try{return JK.call(t)}catch{}try{return t+""}catch{}}return""}var eY=/[\\^$.*+?()[\]{}|]/g,tY=/^\[object .+?Constructor\]$/,rY=Function.prototype,nY=Object.prototype,iY=rY.toString,aY=nY.hasOwnProperty,oY=RegExp("^"+iY.call(aY).replace(eY,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sY(t){if(!s_(t)||XK(t))return!1;var e=YK(t)?oY:tY;return e.test(QK(t))}function lY(t,e){return t==null?void 0:t[e]}function l_(t,e){var r=lY(t,e);return sY(r)?r:void 0}function cY(t,e){return t===e||t!==t&&e!==e}var uY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fY=/^\w*$/;function dY(t,e){if(I0(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||C0(t)?!0:fY.test(t)||!uY.test(t)||e!=null&&t in Object(e)}var hY=l_(Object,"create");const du=hY;function pY(){this.__data__=du?du(null):{},this.size=0}function vY(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var mY="__lodash_hash_undefined__",gY=Object.prototype,yY=gY.hasOwnProperty;function bY(t){var e=this.__data__;if(du){var r=e[t];return r===mY?void 0:r}return yY.call(e,t)?e[t]:void 0}var xY=Object.prototype,AY=xY.hasOwnProperty;function EY(t){var e=this.__data__;return du?e[t]!==void 0:AY.call(e,t)}var TY="__lodash_hash_undefined__";function SY(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=du&&e===void 0?TY:e,this}function bs(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}bs.prototype.clear=pY;bs.prototype.delete=vY;bs.prototype.get=bY;bs.prototype.has=EY;bs.prototype.set=SY;function wY(){this.__data__=[],this.size=0}function rh(t,e){for(var r=t.length;r--;)if(cY(t[r][0],e))return r;return-1}var CY=Array.prototype,IY=CY.splice;function _Y(t){var e=this.__data__,r=rh(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():IY.call(e,r,1),--this.size,!0}function RY(t){var e=this.__data__,r=rh(e,t);return r<0?void 0:e[r][1]}function LY(t){return rh(this.__data__,t)>-1}function DY(t,e){var r=this.__data__,n=rh(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Nl(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Nl.prototype.clear=wY;Nl.prototype.delete=_Y;Nl.prototype.get=RY;Nl.prototype.has=LY;Nl.prototype.set=DY;var OY=l_(w0,"Map");const kY=OY;function MY(){this.size=0,this.__data__={hash:new bs,map:new(kY||Nl),string:new bs}}function FY(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function nh(t,e){var r=t.__data__;return FY(e)?r[typeof e=="string"?"string":"hash"]:r.map}function PY(t){var e=nh(this,t).delete(t);return this.size-=e?1:0,e}function NY(t){return nh(this,t).get(t)}function $Y(t){return nh(this,t).has(t)}function BY(t,e){var r=nh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Is(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Is.prototype.clear=MY;Is.prototype.delete=PY;Is.prototype.get=NY;Is.prototype.has=$Y;Is.prototype.set=BY;var UY="Expected a function";function _0(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(UY);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(_0.Cache||Is),r}_0.Cache=Is;var HY=500;function VY(t){var e=_0(t,function(n){return r.size===HY&&r.clear(),n}),r=e.cache;return e}var jY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WY=/\\(\\)?/g,GY=VY(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(jY,function(r,n,i,a){e.push(i?a.replace(WY,"$1"):n||r)}),e});const zY=GY;function KY(t){return t==null?"":o_(t)}function YY(t,e){return I0(t)?t:dY(t,e)?[t]:zY(KY(t))}var qY=1/0;function XY(t){if(typeof t=="string"||C0(t))return t;var e=t+"";return e=="0"&&1/t==-qY?"-0":e}function ZY(t,e){e=YY(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[XY(e[r++])];return r&&r==n?t:void 0}function JY(t,e,r){var n=t==null?void 0:ZY(t,e);return n===void 0?r:n}function QY(t){for(var e=-1,r=t==null?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n}const eq=t=>t===void 0,Ace=t=>typeof t=="boolean",hu=t=>typeof t=="number",tq=t=>typeof Element>"u"?!1:t instanceof Element,rq=t=>vr(t)?!Number.isNaN(Number(t)):!1,TE=t=>Object.keys(t),c_=(t="")=>t.split(" ").filter(e=>!!e.trim()),Ece=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},Tce=(t,e)=>{!t||!e.trim()||t.classList.add(...c_(e))},Sce=(t,e)=>{!t||!e.trim()||t.classList.remove(...c_(e))},wce=(t,e)=>{var r;if(!Pl||!t||!e)return"";let n=Bi(e);n==="float"&&(n="cssFloat");try{const i=t.style[n];if(i)return i;const a=(r=document.defaultView)==null?void 0:r.getComputedStyle(t,"");return a?a[n]:""}catch{return t.style[n]}};function nq(t,e="px"){if(!t)return"";if(hu(t)||rq(t))return`${t}${e}`;if(vr(t))return t}/*! Element Plus Icons Vue v2.1.0 */var Pr=(t,e)=>{let r=t.__vccOpts||t;for(let[n,i]of e)r[n]=i;return r},iq={name:"ArrowDown"},aq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},oq=lr("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"},null,-1),sq=[oq];function lq(t,e,r,n,i,a){return Xt(),wr("svg",aq,sq)}var Cce=Pr(iq,[["render",lq],["__file","arrow-down.vue"]]),cq={name:"ArrowLeft"},uq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},fq=lr("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"},null,-1),dq=[fq];function hq(t,e,r,n,i,a){return Xt(),wr("svg",uq,dq)}var Ice=Pr(cq,[["render",hq],["__file","arrow-left.vue"]]),pq={name:"ArrowRight"},vq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},mq=lr("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null,-1),gq=[mq];function yq(t,e,r,n,i,a){return Xt(),wr("svg",vq,gq)}var _ce=Pr(pq,[["render",yq],["__file","arrow-right.vue"]]),bq={name:"CircleCheck"},xq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Aq=lr("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"},null,-1),Eq=lr("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"},null,-1),Tq=[Aq,Eq];function Sq(t,e,r,n,i,a){return Xt(),wr("svg",xq,Tq)}var wq=Pr(bq,[["render",Sq],["__file","circle-check.vue"]]),Cq={name:"CircleCloseFilled"},Iq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},_q=lr("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"},null,-1),Rq=[_q];function Lq(t,e,r,n,i,a){return Xt(),wr("svg",Iq,Rq)}var u_=Pr(Cq,[["render",Lq],["__file","circle-close-filled.vue"]]),Dq={name:"CircleClose"},Oq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},kq=lr("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"},null,-1),Mq=lr("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"},null,-1),Fq=[kq,Mq];function Pq(t,e,r,n,i,a){return Xt(),wr("svg",Oq,Fq)}var Nq=Pr(Dq,[["render",Pq],["__file","circle-close.vue"]]),$q={name:"Close"},Bq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Uq=lr("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"},null,-1),Hq=[Uq];function Vq(t,e,r,n,i,a){return Xt(),wr("svg",Bq,Hq)}var f_=Pr($q,[["render",Vq],["__file","close.vue"]]),jq={name:"FullScreen"},Wq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Gq=lr("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64v.064zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64l-192 .192zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64v-.064z"},null,-1),zq=[Gq];function Kq(t,e,r,n,i,a){return Xt(),wr("svg",Wq,zq)}var Rce=Pr(jq,[["render",Kq],["__file","full-screen.vue"]]),Yq={name:"Hide"},qq={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Xq=lr("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2L371.2 588.8ZM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"},null,-1),Zq=lr("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"},null,-1),Jq=[Xq,Zq];function Qq(t,e,r,n,i,a){return Xt(),wr("svg",qq,Jq)}var Lce=Pr(Yq,[["render",Qq],["__file","hide.vue"]]),eX={name:"InfoFilled"},tX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},rX=lr("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"},null,-1),nX=[rX];function iX(t,e,r,n,i,a){return Xt(),wr("svg",tX,nX)}var d_=Pr(eX,[["render",iX],["__file","info-filled.vue"]]),aX={name:"Loading"},oX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},sX=lr("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"},null,-1),lX=[sX];function cX(t,e,r,n,i,a){return Xt(),wr("svg",oX,lX)}var uX=Pr(aX,[["render",cX],["__file","loading.vue"]]),fX={name:"MoreFilled"},dX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},hX=lr("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224z"},null,-1),pX=[hX];function vX(t,e,r,n,i,a){return Xt(),wr("svg",dX,pX)}var Dce=Pr(fX,[["render",vX],["__file","more-filled.vue"]]),mX={name:"PictureFilled"},gX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},yX=lr("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H96zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112zM256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384z"},null,-1),bX=[yX];function xX(t,e,r,n,i,a){return Xt(),wr("svg",gX,bX)}var Oce=Pr(mX,[["render",xX],["__file","picture-filled.vue"]]),AX={name:"RefreshLeft"},EX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},TX=lr("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"},null,-1),SX=[TX];function wX(t,e,r,n,i,a){return Xt(),wr("svg",EX,SX)}var kce=Pr(AX,[["render",wX],["__file","refresh-left.vue"]]),CX={name:"RefreshRight"},IX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},_X=lr("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"},null,-1),RX=[_X];function LX(t,e,r,n,i,a){return Xt(),wr("svg",IX,RX)}var Mce=Pr(CX,[["render",LX],["__file","refresh-right.vue"]]),DX={name:"ScaleToOriginal"},OX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},kX=lr("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zM512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412zM512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512z"},null,-1),MX=[kX];function FX(t,e,r,n,i,a){return Xt(),wr("svg",OX,MX)}var Fce=Pr(DX,[["render",FX],["__file","scale-to-original.vue"]]),PX={name:"SuccessFilled"},NX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},$X=lr("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"},null,-1),BX=[$X];function UX(t,e,r,n,i,a){return Xt(),wr("svg",NX,BX)}var h_=Pr(PX,[["render",UX],["__file","success-filled.vue"]]),HX={name:"View"},VX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},jX=lr("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448zm0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"},null,-1),WX=[jX];function GX(t,e,r,n,i,a){return Xt(),wr("svg",VX,WX)}var Pce=Pr(HX,[["render",GX],["__file","view.vue"]]),zX={name:"WarningFilled"},KX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},YX=lr("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1),qX=[YX];function XX(t,e,r,n,i,a){return Xt(),wr("svg",KX,qX)}var p_=Pr(zX,[["render",XX],["__file","warning-filled.vue"]]),ZX={name:"ZoomIn"},JX={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},QX=lr("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z"},null,-1),eZ=[QX];function tZ(t,e,r,n,i,a){return Xt(),wr("svg",JX,eZ)}var Nce=Pr(ZX,[["render",tZ],["__file","zoom-in.vue"]]),rZ={name:"ZoomOut"},nZ={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},iZ=lr("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zM352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64z"},null,-1),aZ=[iZ];function oZ(t,e,r,n,i,a){return Xt(),wr("svg",nZ,aZ)}var $ce=Pr(rZ,[["render",oZ],["__file","zoom-out.vue"]]);const v_="__epPropKey",sd=t=>t,sZ=t=>fr(t)&&!!t[v_],m_=(t,e)=>{if(!fr(t)||sZ(t))return t;const{values:r,required:n,default:i,type:a,validator:o}=t,s={type:a,required:!!n,validator:r||o?c=>{let u=!1,f=[];if(r&&(f=Array.from(r),Gt(t,"default")&&f.push(i),u||(u=f.includes(c))),o&&(u||(u=o(c))),!u&&f.length>0){const d=[...new Set(f)].map(h=>JSON.stringify(h)).join(", ");sO(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[v_]:!0};return Gt(t,"default")&&(s.default=i),s},R0=t=>QY(Object.entries(t).map(([e,r])=>[e,m_(r,e)])),lZ=sd([String,Object,Function]),Bce={Close:f_},cZ={Close:f_,SuccessFilled:h_,InfoFilled:d_,WarningFilled:p_,CircleCloseFilled:u_},SE={success:h_,warning:p_,error:u_,info:d_},Uce={validating:uX,success:wq,error:Nq},g_=(t,e)=>{if(t.install=r=>{for(const n of[t,...Object.values(e??{})])r.component(n.name,n)},e)for(const[r,n]of Object.entries(e))t[r]=n;return t},uZ=(t,e)=>(t.install=r=>{t._context=r._context,r.config.globalProperties[e]=t},t),Hce=(t,e)=>(t.install=r=>{r.directive(e,t)},t),Vce=t=>(t.install=xi,t),fZ={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},dZ=["","default","small","large"],hZ=t=>t;var pZ={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};const vZ=t=>(e,r)=>mZ(e,r,Et(t)),mZ=(t,e,r)=>JY(r,t,t).replace(/\{(\w+)\}/g,(n,i)=>{var a;return`${(a=e==null?void 0:e[i])!=null?a:`{${i}}`}`}),gZ=t=>{const e=_e(()=>Et(t).name),r=Fr(t)?t:je(t);return{lang:e,locale:r,t:vZ(t)}},y_=Symbol("localeContextKey"),yZ=t=>{const e=t||ct(y_,je());return gZ(_e(()=>e.value||pZ))},em="el",bZ="is-",Wo=(t,e,r,n,i)=>{let a=`${t}-${e}`;return r&&(a+=`-${r}`),n&&(a+=`__${n}`),i&&(a+=`--${i}`),a},b_=Symbol("namespaceContextKey"),xZ=t=>{const e=t||ct(b_,je(em));return _e(()=>Et(e)||em)},L0=(t,e)=>{const r=xZ(e);return{namespace:r,b:(v="")=>Wo(r.value,t,v,"",""),e:v=>v?Wo(r.value,t,"",v,""):"",m:v=>v?Wo(r.value,t,"","",v):"",be:(v,g)=>v&&g?Wo(r.value,t,v,g,""):"",em:(v,g)=>v&&g?Wo(r.value,t,"",v,g):"",bm:(v,g)=>v&&g?Wo(r.value,t,v,"",g):"",bem:(v,g,m)=>v&&g&&m?Wo(r.value,t,v,g,m):"",is:(v,...g)=>{const m=g.length>=1?g[0]:!0;return v&&m?`${bZ}${v}`:""},cssVar:v=>{const g={};for(const m in v)v[m]&&(g[`--${r.value}-${m}`]=v[m]);return g},cssVarName:v=>`--${r.value}-${v}`,cssVarBlock:v=>{const g={};for(const m in v)v[m]&&(g[`--${r.value}-${t}-${m}`]=v[m]);return g},cssVarBlockName:v=>`--${r.value}-${t}-${v}`}},wE=je(0),x_=2e3,A_=Symbol("zIndexContextKey"),AZ=t=>{const e=t||ct(A_,void 0),r=_e(()=>{const a=Et(e);return hu(a)?a:x_}),n=_e(()=>r.value+wE.value);return{initialZIndex:r,currentZIndex:n,nextZIndex:()=>(wE.value++,n.value)}},jce=m_({type:String,values:dZ,required:!1}),E_=Symbol("size"),Wce=()=>{const t=ct(E_,{});return _e(()=>Et(t.size)||"")},T_=Symbol(),ld=je();function S_(t,e=void 0){const r=xn()?ct(T_,ld):ld;return t?_e(()=>{var n,i;return(i=(n=r.value)==null?void 0:n[t])!=null?i:e}):r}function EZ(t,e){const r=S_(),n=L0(t,_e(()=>{var l;return((l=r.value)==null?void 0:l.namespace)||em})),i=yZ(_e(()=>{var l;return(l=r.value)==null?void 0:l.locale})),a=AZ(_e(()=>{var l;return((l=r.value)==null?void 0:l.zIndex)||x_})),o=_e(()=>{var l;return Et(e)||((l=r.value)==null?void 0:l.size)||""});return TZ(_e(()=>Et(r)||{})),{ns:n,locale:i,zIndex:a,size:o}}const TZ=(t,e,r=!1)=>{var n;const i=!!xn(),a=i?S_():void 0,o=(n=e==null?void 0:e.provide)!=null?n:i?sr:void 0;if(!o)return;const l=_e(()=>{const s=Et(t);return a!=null&&a.value?SZ(a.value,s):s});return o(T_,l),o(y_,_e(()=>l.value.locale)),o(b_,_e(()=>l.value.namespace)),o(A_,_e(()=>l.value.zIndex)),o(E_,{size:_e(()=>l.value.size||"")}),(r||!ld.value)&&(ld.value=l.value),l},SZ=(t,e)=>{var r;const n=[...new Set([...TE(t),...TE(e)])],i={};for(const a of n)i[a]=(r=e[a])!=null?r:t[a];return i},CE={};var D0=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r};const wZ=R0({size:{type:sd([Number,String])},color:{type:String}}),CZ=xt({name:"ElIcon",inheritAttrs:!1}),IZ=xt({...CZ,props:wZ,setup(t){const e=t,r=L0("icon"),n=_e(()=>{const{size:i,color:a}=e;return!i&&!a?{}:{fontSize:eq(i)?void 0:nq(i),"--color":a}});return(i,a)=>(Xt(),wr("i",vl({class:Et(r).b(),style:Et(n)},i.$attrs),[Qm(i.$slots,"default")],16))}});var _Z=D0(IZ,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const IE=g_(_Z),RZ=R0({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"}}),LZ=["textContent"],DZ=xt({name:"ElBadge"}),OZ=xt({...DZ,props:RZ,setup(t,{expose:e}){const r=t,n=L0("badge"),i=_e(()=>r.isDot?"":hu(r.value)&&hu(r.max)?r.max<r.value?`${r.max}+`:`${r.value}`:`${r.value}`);return e({content:i}),(a,o)=>(Xt(),wr("div",{class:bi(Et(n).b())},[Qm(a.$slots,"default"),Rt(Pd,{name:`${Et(n).namespace.value}-zoom-in-center`,persisted:""},{default:yc(()=>[qm(lr("sup",{class:bi([Et(n).e("content"),Et(n).em("content",a.type),Et(n).is("fixed",!!a.$slots.default),Et(n).is("dot",a.isDot)]),textContent:R1(Et(i))},null,10,LZ),[[wS,!a.hidden&&(Et(i)||a.isDot)]])]),_:1},8,["name"])],2))}});var kZ=D0(OZ,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const MZ=g_(kZ);var w_={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(kv,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",l="minute",s="hour",c="day",u="week",f="month",d="quarter",h="year",p="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var V=["th","st","nd","rd"],G=q%100;return"["+q+(V[(G-20)%10]||V[G]||V[0])+"]"}},x=function(q,V,G){var pe=String(q);return!pe||pe.length>=V?q:""+Array(V+1-pe.length).join(G)+q},T={s:x,z:function(q){var V=-q.utcOffset(),G=Math.abs(V),pe=Math.floor(G/60),J=G%60;return(V<=0?"+":"-")+x(pe,2,"0")+":"+x(J,2,"0")},m:function q(V,G){if(V.date()<G.date())return-q(G,V);var pe=12*(G.year()-V.year())+(G.month()-V.month()),J=V.clone().add(pe,f),N=G-J<0,Z=V.clone().add(pe+(N?-1:1),f);return+(-(pe+(G-J)/(N?J-Z:Z-J))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:f,y:h,w:u,d:c,D:p,h:s,m:l,s:o,ms:a,Q:d}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},A="en",O={};O[A]=b;var I=function(q){return q instanceof P},_=function q(V,G,pe){var J;if(!V)return A;if(typeof V=="string"){var N=V.toLowerCase();O[N]&&(J=N),G&&(O[N]=G,J=N);var Z=V.split("-");if(!J&&Z.length>1)return q(Z[0])}else{var le=V.name;O[le]=V,J=le}return!pe&&J&&(A=J),J||!pe&&A},k=function(q,V){if(I(q))return q.clone();var G=typeof V=="object"?V:{};return G.date=q,G.args=arguments,new P(G)},L=T;L.l=_,L.i=I,L.w=function(q,V){return k(q,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var P=function(){function q(G){this.$L=_(G.locale,null,!0),this.parse(G)}var V=q.prototype;return V.parse=function(G){this.$d=function(pe){var J=pe.date,N=pe.utc;if(J===null)return new Date(NaN);if(L.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var Z=J.match(g);if(Z){var le=Z[2]-1||0,ye=(Z[7]||"0").substring(0,3);return N?new Date(Date.UTC(Z[1],le,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ye)):new Date(Z[1],le,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ye)}}return new Date(J)}(G),this.$x=G.x||{},this.init()},V.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},V.$utils=function(){return L},V.isValid=function(){return this.$d.toString()!==v},V.isSame=function(G,pe){var J=k(G);return this.startOf(pe)<=J&&J<=this.endOf(pe)},V.isAfter=function(G,pe){return k(G)<this.startOf(pe)},V.isBefore=function(G,pe){return this.endOf(pe)<k(G)},V.$g=function(G,pe,J){return L.u(G)?this[pe]:this.set(J,G)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(G,pe){var J=this,N=!!L.u(pe)||pe,Z=L.p(G),le=function(re,ve){var Te=L.w(J.$u?Date.UTC(J.$y,ve,re):new Date(J.$y,ve,re),J);return N?Te:Te.endOf(c)},ye=function(re,ve){return L.w(J.toDate()[re].apply(J.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ve)),J)},me=this.$W,Re=this.$M,be=this.$D,Ce="set"+(this.$u?"UTC":"");switch(Z){case h:return N?le(1,0):le(31,11);case f:return N?le(1,Re):le(0,Re+1);case u:var we=this.$locale().weekStart||0,ce=(me<we?me+7:me)-we;return le(N?be-ce:be+(6-ce),Re);case c:case p:return ye(Ce+"Hours",0);case s:return ye(Ce+"Minutes",1);case l:return ye(Ce+"Seconds",2);case o:return ye(Ce+"Milliseconds",3);default:return this.clone()}},V.endOf=function(G){return this.startOf(G,!1)},V.$set=function(G,pe){var J,N=L.p(G),Z="set"+(this.$u?"UTC":""),le=(J={},J[c]=Z+"Date",J[p]=Z+"Date",J[f]=Z+"Month",J[h]=Z+"FullYear",J[s]=Z+"Hours",J[l]=Z+"Minutes",J[o]=Z+"Seconds",J[a]=Z+"Milliseconds",J)[N],ye=N===c?this.$D+(pe-this.$W):pe;if(N===f||N===h){var me=this.clone().set(p,1);me.$d[le](ye),me.init(),this.$d=me.set(p,Math.min(this.$D,me.daysInMonth())).$d}else le&&this.$d[le](ye);return this.init(),this},V.set=function(G,pe){return this.clone().$set(G,pe)},V.get=function(G){return this[L.p(G)]()},V.add=function(G,pe){var J,N=this;G=Number(G);var Z=L.p(pe),le=function(Re){var be=k(N);return L.w(be.date(be.date()+Math.round(Re*G)),N)};if(Z===f)return this.set(f,this.$M+G);if(Z===h)return this.set(h,this.$y+G);if(Z===c)return le(1);if(Z===u)return le(7);var ye=(J={},J[l]=n,J[s]=i,J[o]=r,J)[Z]||1,me=this.$d.getTime()+G*ye;return L.w(me,this)},V.subtract=function(G,pe){return this.add(-1*G,pe)},V.format=function(G){var pe=this,J=this.$locale();if(!this.isValid())return J.invalidDate||v;var N=G||"YYYY-MM-DDTHH:mm:ssZ",Z=L.z(this),le=this.$H,ye=this.$m,me=this.$M,Re=J.weekdays,be=J.months,Ce=function(ve,Te,Pe,B){return ve&&(ve[Te]||ve(pe,N))||Pe[Te].slice(0,B)},we=function(ve){return L.s(le%12||12,ve,"0")},ce=J.meridiem||function(ve,Te,Pe){var B=ve<12?"AM":"PM";return Pe?B.toLowerCase():B},re={YY:String(this.$y).slice(-2),YYYY:this.$y,M:me+1,MM:L.s(me+1,2,"0"),MMM:Ce(J.monthsShort,me,be,3),MMMM:Ce(be,me),D:this.$D,DD:L.s(this.$D,2,"0"),d:String(this.$W),dd:Ce(J.weekdaysMin,this.$W,Re,2),ddd:Ce(J.weekdaysShort,this.$W,Re,3),dddd:Re[this.$W],H:String(le),HH:L.s(le,2,"0"),h:we(1),hh:we(2),a:ce(le,ye,!0),A:ce(le,ye,!1),m:String(ye),mm:L.s(ye,2,"0"),s:String(this.$s),ss:L.s(this.$s,2,"0"),SSS:L.s(this.$ms,3,"0"),Z};return N.replace(m,function(ve,Te){return Te||re[ve]||Z.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(G,pe,J){var N,Z=L.p(pe),le=k(G),ye=(le.utcOffset()-this.utcOffset())*n,me=this-le,Re=L.m(this,le);return Re=(N={},N[h]=Re/12,N[f]=Re,N[d]=Re/3,N[u]=(me-ye)/6048e5,N[c]=(me-ye)/864e5,N[s]=me/i,N[l]=me/n,N[o]=me/r,N)[Z]||me,J?Re:L.a(Re)},V.daysInMonth=function(){return this.endOf(f).$D},V.$locale=function(){return O[this.$L]},V.locale=function(G,pe){if(!G)return this.$L;var J=this.clone(),N=_(G,pe,!0);return N&&(J.$L=N),J},V.clone=function(){return L.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},q}(),W=P.prototype;return k.prototype=W,[["$ms",a],["$s",o],["$m",l],["$H",s],["$W",c],["$M",f],["$y",h],["$D",p]].forEach(function(q){W[q[1]]=function(V){return this.$g(V,q[0],q[1])}}),k.extend=function(q,V){return q.$i||(q(V,P,k),q.$i=!0),k},k.locale=_,k.isDayjs=I,k.unix=function(q){return k(1e3*q)},k.en=O[A],k.Ls=O,k.p={},k})})(w_);var FZ=w_.exports;const Gce=dg(FZ),C_=["success","info","warning","error"],$n=hZ({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Pl?document.body:void 0}),PZ=R0({customClass:{type:String,default:$n.customClass},center:{type:Boolean,default:$n.center},dangerouslyUseHTMLString:{type:Boolean,default:$n.dangerouslyUseHTMLString},duration:{type:Number,default:$n.duration},icon:{type:lZ,default:$n.icon},id:{type:String,default:$n.id},message:{type:sd([String,Object,Function]),default:$n.message},onClose:{type:sd(Function),required:!1},showClose:{type:Boolean,default:$n.showClose},type:{type:String,values:C_,default:$n.type},offset:{type:Number,default:$n.offset},zIndex:{type:Number,default:$n.zIndex},grouping:{type:Boolean,default:$n.grouping},repeatNum:{type:Number,default:$n.repeatNum}}),NZ={destroy:()=>!0},Ni=j1([]),$Z=t=>{const e=Ni.findIndex(i=>i.id===t),r=Ni[e];let n;return e>0&&(n=Ni[e-1]),{current:r,prev:n}},BZ=t=>{const{prev:e}=$Z(t);return e?e.vm.exposed.bottom.value:0},UZ=(t,e)=>Ni.findIndex(n=>n.id===t)>0?20:e,HZ=["id"],VZ=["innerHTML"],jZ=xt({name:"ElMessage"}),WZ=xt({...jZ,props:PZ,emits:NZ,setup(t,{expose:e}){const r=t,{Close:n}=cZ,{ns:i,zIndex:a}=EZ("message"),{currentZIndex:o,nextZIndex:l}=a,s=je(),c=je(!1),u=je(0);let f;const d=_e(()=>r.type?r.type==="error"?"danger":r.type:"info"),h=_e(()=>{const I=r.type;return{[i.bm("icon",I)]:I&&SE[I]}}),p=_e(()=>r.icon||SE[r.type]||""),v=_e(()=>BZ(r.id)),g=_e(()=>UZ(r.id,r.offset)+v.value),m=_e(()=>u.value+g.value),b=_e(()=>({top:`${g.value}px`,zIndex:o.value}));function x(){r.duration!==0&&({stop:f}=vK(()=>{A()},r.duration))}function T(){f==null||f()}function A(){c.value=!1}function O({code:I}){I===fZ.esc&&A()}return Er(()=>{x(),l(),c.value=!0}),st(()=>r.repeatNum,()=>{T(),x()}),Df(document,"keydown",O),xK(s,()=>{u.value=s.value.getBoundingClientRect().height}),e({visible:c,bottom:m,close:A}),(I,_)=>(Xt(),ho(Pd,{name:Et(i).b("fade"),onBeforeLeave:I.onClose,onAfterLeave:_[0]||(_[0]=k=>I.$emit("destroy")),persisted:""},{default:yc(()=>[qm(lr("div",{id:I.id,ref_key:"messageRef",ref:s,class:bi([Et(i).b(),{[Et(i).m(I.type)]:I.type&&!I.icon},Et(i).is("center",I.center),Et(i).is("closable",I.showClose),I.customClass]),style:Au(Et(b)),role:"alert",onMouseenter:T,onMouseleave:x},[I.repeatNum>1?(Xt(),ho(Et(MZ),{key:0,value:I.repeatNum,type:Et(d),class:bi(Et(i).e("badge"))},null,8,["value","type","class"])):$t("v-if",!0),Et(p)?(Xt(),ho(Et(IE),{key:1,class:bi([Et(i).e("icon"),Et(h)])},{default:yc(()=>[(Xt(),ho(DO(Et(p))))]),_:1},8,["class"])):$t("v-if",!0),Qm(I.$slots,"default",{},()=>[I.dangerouslyUseHTMLString?(Xt(),wr(Hn,{key:1},[$t(" Caution here, message could've been compromised, never use user's input as message "),lr("p",{class:bi(Et(i).e("content")),innerHTML:I.message},null,10,VZ)],2112)):(Xt(),wr("p",{key:0,class:bi(Et(i).e("content"))},R1(I.message),3))]),I.showClose?(Xt(),ho(Et(IE),{key:2,class:bi(Et(i).e("closeBtn")),onClick:Pk(A,["stop"])},{default:yc(()=>[Rt(Et(n))]),_:1},8,["class","onClick"])):$t("v-if",!0)],46,HZ),[[wS,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});var GZ=D0(WZ,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let zZ=1;const I_=t=>{const e=!t||vr(t)||ys(t)||kt(t)?{message:t}:t,r={...$n,...e};if(!r.appendTo)r.appendTo=document.body;else if(vr(r.appendTo)){let n=document.querySelector(r.appendTo);tq(n)||(n=document.body),r.appendTo=n}return r},KZ=t=>{const e=Ni.indexOf(t);if(e===-1)return;Ni.splice(e,1);const{handler:r}=t;r.close()},YZ=({appendTo:t,...e},r)=>{const n=`message_${zZ++}`,i=e.onClose,a=document.createElement("div"),o={...e,id:n,onClose:()=>{i==null||i(),KZ(u)},onDestroy:()=>{fb(null,a)}},l=Rt(GZ,o,kt(o.message)||ys(o.message)?{default:kt(o.message)?o.message:()=>o.message}:null);l.appContext=r||Tl._context,fb(l,a),t.appendChild(a.firstElementChild);const s=l.component,u={id:n,vnode:l,vm:s,handler:{close:()=>{s.exposed.visible.value=!1}},props:l.component.props};return u},Tl=(t={},e)=>{if(!Pl)return{close:()=>{}};if(hu(CE.max)&&Ni.length>=CE.max)return{close:()=>{}};const r=I_(t);if(r.grouping&&Ni.length){const i=Ni.find(({vnode:a})=>{var o;return((o=a.props)==null?void 0:o.message)===r.message});if(i)return i.props.repeatNum+=1,i.props.type=r.type,i.handler}const n=YZ(r,e);return Ni.push(n),n.handler};C_.forEach(t=>{Tl[t]=(e={},r)=>{const n=I_(e);return Tl({...n,type:t},r)}});function qZ(t){for(const e of Ni)(!t||t===e.props.type)&&e.handler.close()}Tl.closeAll=qZ;Tl._context=null;const XZ=uZ(Tl,"$message");const ZZ=["icon-download","icon-file-type-directory","icon-file-type-folder-expired","icon-file-type-folder","icon-file-type-image-expired","icon-file-type-image","icon-file-type-video-expired","icon-file-type-video","icon-floder","icon-h5_play","icon-video"],hf={image:["gif","jpg","jpeg","png","bmp","webp","ico"],video:["mp4","webm","m3u8","rmvb","avi","swf","3gp","mkv","flv","mov","wmv"],audio:["mp3","wav","wma","ogg","aac","flac","m4a"],text:["scss","sass","kt","gitignore","bat","properties","yml","css","js","md","xml","txt","py","go","html","less","php","rb","rust","script","java","sh","sql"],executable:["exe","dll","com","vbs"],archive:["7z","zip","rar","tar","gz"],pdf:["pdf"],office:["doc","docx","csv","xls","xlsx","ppt","pptx"],three3d:["dae","fbx","gltf","glb","obj","ply","stl"],document:["txt","pages","epub","numbers","keynote"]},JZ=["image","video","audio","text","office","pdf","three3d"],__=[];ZZ.forEach(t=>{__.push(t.replace(/^icon-file-type-/,""))});let zce={constant:{previewFileType:JZ},isIos:()=>/iPad|iPhone|iPod|Macintosh|Mac/.test(navigator.userAgent),isMobile:()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),fileSizeFormat:t=>{if(t===0)return" ";if(t===-1)return"未知";let e=1024,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(t)/Math.log(e));return(t/Math.pow(e,n)).toFixed(2)+" "+r[n]},getFileIconName(t){let e;if(t.type==="DIRECTORY")return"folder";{let r=t.extension,n=this.getFileTypeBySuffix(t.extension);__.indexOf(r)!==-1?e=r:n?e=n:e="file"}return e},getFileSuffix(t=""){let e=t.lastIndexOf(".");return e===-1?"other":t.substring(e+1).toLowerCase()},getFileTypeByName(t){let e;for(let r in hf){let n=this.getFileSuffix(t);if(hf[r].indexOf(n)!==-1){e=r;break}}return e},getFileTypeBySuffix(t){let e;for(let r in hf){let n=t?t.toLowerCase():"";if(hf[r].indexOf(n)!==-1){e=r;break}}return e},async copyToClipboard(t=""){if(navigator.clipboard)return navigator.clipboard.writeText(t).then(e=>{}).catch(e=>{});onExecCommand(t)},onExecCommand(t){let e=document.createElement("input");e.setAttribute("readonly","readonly"),e.setAttribute("value",t),e.style.position="absolute",e.style.opacity=0,e.style.left="-999999px",e.style.top="-999999px",document.body.appendChild(e),e.focus(),e.select(),e.setSelectionRange(0,9999),document.execCommand("copy")&&(document.execCommand("copy"),Toast.success("复制成功")),document.body.removeChild(e)}};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *//**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const R_=function(t){const e=[];let r=0;for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);i<128?e[r++]=i:i<2048?(e[r++]=i>>6|192,e[r++]=i&63|128):(i&64512)===55296&&n+1<t.length&&(t.charCodeAt(n+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++n)&1023),e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=i&63|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=i&63|128)}return e},QZ=function(t){const e=[];let r=0,n=0;for(;r<t.length;){const i=t[r++];if(i<128)e[n++]=String.fromCharCode(i);else if(i>191&&i<224){const a=t[r++];e[n++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){const a=t[r++],o=t[r++],l=t[r++],s=((i&7)<<18|(a&63)<<12|(o&63)<<6|l&63)-65536;e[n++]=String.fromCharCode(55296+(s>>10)),e[n++]=String.fromCharCode(56320+(s&1023))}else{const a=t[r++],o=t[r++];e[n++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return e.join("")},L_={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<t.length;i+=3){const a=t[i],o=i+1<t.length,l=o?t[i+1]:0,s=i+2<t.length,c=s?t[i+2]:0,u=a>>2,f=(a&3)<<4|l>>4;let d=(l&15)<<2|c>>6,h=c&63;s||(h=64,o||(d=64)),n.push(r[u],r[f],r[d],r[h])}return n.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(R_(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):QZ(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const r=e?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<t.length;){const a=r[t.charAt(i++)],l=i<t.length?r[t.charAt(i)]:0;++i;const c=i<t.length?r[t.charAt(i)]:64;++i;const f=i<t.length?r[t.charAt(i)]:64;if(++i,a==null||l==null||c==null||f==null)throw new eJ;const d=a<<2|l>>4;if(n.push(d),c!==64){const h=l<<4&240|c>>2;if(n.push(h),f!==64){const p=c<<6&192|f;n.push(p)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class eJ extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const tJ=function(t){const e=R_(t);return L_.encodeByteArray(e,!0)},D_=function(t){return tJ(t).replace(/\./g,"")},rJ=function(t){try{return L_.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function nJ(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const iJ=()=>nJ().__FIREBASE_DEFAULTS__,aJ=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t={}.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},oJ=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&rJ(t[1]);return e&&JSON.parse(e)},sJ=()=>{try{return iJ()||aJ()||oJ()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},O_=()=>{var t;return(t=sJ())===null||t===void 0?void 0:t.config};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class lJ{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}wrapCallback(e){return(r,n)=>{r?this.reject(r):this.resolve(n),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(r):e(r,n))}}}function cJ(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function O0(){try{return typeof indexedDB=="object"}catch{return!1}}function k0(){return new Promise((t,e)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),t(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var a;e(((a=i.error)===null||a===void 0?void 0:a.message)||"")}}catch(r){e(r)}})}function k_(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const uJ="FirebaseError";class _s extends Error{constructor(e,r,n){super(r),this.code=e,this.customData=n,this.name=uJ,Object.setPrototypeOf(this,_s.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Pu.prototype.create)}}class Pu{constructor(e,r,n){this.service=e,this.serviceName=r,this.errors=n}create(e,...r){const n=r[0]||{},i=`${this.service}/${e}`,a=this.errors[e],o=a?fJ(a,n):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new _s(i,l,n)}}function fJ(t,e){return t.replace(dJ,(r,n)=>{const i=e[n];return i!=null?String(i):`<${n}?>`})}const dJ=/\{\$([^}]+)}/g;function cd(t,e){if(t===e)return!0;const r=Object.keys(t),n=Object.keys(e);for(const i of r){if(!n.includes(i))return!1;const a=t[i],o=e[i];if(_E(a)&&_E(o)){if(!cd(a,o))return!1}else if(a!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function _E(t){return t!==null&&typeof t=="object"}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const hJ=1e3,pJ=2,vJ=4*60*60*1e3,mJ=.5;function RE(t,e=hJ,r=pJ){const n=e*Math.pow(r,t),i=Math.round(mJ*n*(Math.random()-.5)*2);return Math.min(vJ,n+i)}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function M0(t){return t&&t._delegate?t._delegate:t}class Oa{constructor(e,r,n){this.name=e,this.instanceFactory=r,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const qo="[DEFAULT]";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class gJ{constructor(e,r){this.name=e,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const r=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(r)){const n=new lJ;if(this.instancesDeferred.set(r,n),this.isInitialized(r)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:r});i&&n.resolve(i)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(e){var r;const n=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(r=e==null?void 0:e.optional)!==null&&r!==void 0?r:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(a){if(i)return null;throw a}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(bJ(e))try{this.getOrInitializeService({instanceIdentifier:qo})}catch{}for(const[r,n]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(r);try{const a=this.getOrInitializeService({instanceIdentifier:i});n.resolve(a)}catch{}}}}clearInstance(e=qo){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...e.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=qo){return this.instances.has(e)}getOptions(e=qo){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:r={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:r});for(const[a,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(a);n===l&&o.resolve(i)}return i}onInit(e,r){var n;const i=this.normalizeInstanceIdentifier(r),a=(n=this.onInitCallbacks.get(i))!==null&&n!==void 0?n:new Set;a.add(e),this.onInitCallbacks.set(i,a);const o=this.instances.get(i);return o&&e(o,i),()=>{a.delete(e)}}invokeOnInitCallbacks(e,r){const n=this.onInitCallbacks.get(r);if(n)for(const i of n)try{i(e,r)}catch{}}getOrInitializeService({instanceIdentifier:e,options:r={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:yJ(e),options:r}),this.instances.set(e,n),this.instancesOptions.set(e,r),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=qo){return this.component?this.component.multipleInstances?e:qo:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function yJ(t){return t===qo?void 0:t}function bJ(t){return t.instantiationMode==="EAGER"}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class xJ{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const r=this.getProvider(e.name);if(r.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);r.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const r=new gJ(e,this);return this.providers.set(e,r),r}getProviders(){return Array.from(this.providers.values())}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var yr;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(yr||(yr={}));const AJ={debug:yr.DEBUG,verbose:yr.VERBOSE,info:yr.INFO,warn:yr.WARN,error:yr.ERROR,silent:yr.SILENT},EJ=yr.INFO,TJ={[yr.DEBUG]:"log",[yr.VERBOSE]:"log",[yr.INFO]:"info",[yr.WARN]:"warn",[yr.ERROR]:"error"},SJ=(t,e,...r)=>{if(e<t.logLevel)return;const n=new Date().toISOString(),i=TJ[e];if(i)console[i](`[${n}]  ${t.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class F0{constructor(e){this.name=e,this._logLevel=EJ,this._logHandler=SJ,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in yr))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?AJ[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,yr.DEBUG,...e),this._logHandler(this,yr.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,yr.VERBOSE,...e),this._logHandler(this,yr.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,yr.INFO,...e),this._logHandler(this,yr.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,yr.WARN,...e),this._logHandler(this,yr.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,yr.ERROR,...e),this._logHandler(this,yr.ERROR,...e)}}const wJ=(t,e)=>e.some(r=>t instanceof r);let LE,DE;function CJ(){return LE||(LE=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function IJ(){return DE||(DE=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const M_=new WeakMap,tm=new WeakMap,F_=new WeakMap,bp=new WeakMap,P0=new WeakMap;function _J(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{r(yo(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&M_.set(r,t)}).catch(()=>{}),P0.set(e,t),e}function RJ(t){if(tm.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});tm.set(t,e)}let rm={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return tm.get(t);if(e==="objectStoreNames")return t.objectStoreNames||F_.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return yo(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function LJ(t){rm=t(rm)}function DJ(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(xp(this),e,...r);return F_.set(n,e.sort?e.sort():[e]),yo(n)}:IJ().includes(t)?function(...e){return t.apply(xp(this),e),yo(M_.get(this))}:function(...e){return yo(t.apply(xp(this),e))}}function OJ(t){return typeof t=="function"?DJ(t):(t instanceof IDBTransaction&&RJ(t),wJ(t,CJ())?new Proxy(t,rm):t)}function yo(t){if(t instanceof IDBRequest)return _J(t);if(bp.has(t))return bp.get(t);const e=OJ(t);return e!==t&&(bp.set(t,e),P0.set(e,t)),e}const xp=t=>P0.get(t);function kJ(t,e,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(t,e),l=yo(o);return n&&o.addEventListener("upgradeneeded",s=>{n(yo(o.result),s.oldVersion,s.newVersion,yo(o.transaction),s)}),r&&o.addEventListener("blocked",s=>r(s.oldVersion,s.newVersion,s)),l.then(s=>{a&&s.addEventListener("close",()=>a()),i&&s.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),l}const MJ=["get","getKey","getAll","getAllKeys","count"],FJ=["put","add","delete","clear"],Ap=new Map;function OE(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Ap.get(e))return Ap.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=FJ.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||MJ.includes(r)))return;const a=async function(o,...l){const s=this.transaction(o,i?"readwrite":"readonly");let c=s.store;return n&&(c=c.index(l.shift())),(await Promise.all([c[r](...l),i&&s.done]))[0]};return Ap.set(e,a),a}LJ(t=>({...t,get:(e,r,n)=>OE(e,r)||t.get(e,r,n),has:(e,r)=>!!OE(e,r)||t.has(e,r)}));/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class PJ{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(NJ(r)){const n=r.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(r=>r).join(" ")}}function NJ(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const nm="@firebase/app",kE="0.9.12";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const xs=new F0("@firebase/app"),$J="@firebase/app-compat",BJ="@firebase/analytics-compat",UJ="@firebase/analytics",HJ="@firebase/app-check-compat",VJ="@firebase/app-check",jJ="@firebase/auth",WJ="@firebase/auth-compat",GJ="@firebase/database",zJ="@firebase/database-compat",KJ="@firebase/functions",YJ="@firebase/functions-compat",qJ="@firebase/installations",XJ="@firebase/installations-compat",ZJ="@firebase/messaging",JJ="@firebase/messaging-compat",QJ="@firebase/performance",eQ="@firebase/performance-compat",tQ="@firebase/remote-config",rQ="@firebase/remote-config-compat",nQ="@firebase/storage",iQ="@firebase/storage-compat",aQ="@firebase/firestore",oQ="@firebase/firestore-compat",sQ="firebase";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const im="[DEFAULT]",lQ={[nm]:"fire-core",[$J]:"fire-core-compat",[UJ]:"fire-analytics",[BJ]:"fire-analytics-compat",[VJ]:"fire-app-check",[HJ]:"fire-app-check-compat",[jJ]:"fire-auth",[WJ]:"fire-auth-compat",[GJ]:"fire-rtdb",[zJ]:"fire-rtdb-compat",[KJ]:"fire-fn",[YJ]:"fire-fn-compat",[qJ]:"fire-iid",[XJ]:"fire-iid-compat",[ZJ]:"fire-fcm",[JJ]:"fire-fcm-compat",[QJ]:"fire-perf",[eQ]:"fire-perf-compat",[tQ]:"fire-rc",[rQ]:"fire-rc-compat",[nQ]:"fire-gcs",[iQ]:"fire-gcs-compat",[aQ]:"fire-fst",[oQ]:"fire-fst-compat","fire-js":"fire-js",[sQ]:"fire-js-all"};/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const ud=new Map,am=new Map;function cQ(t,e){try{t.container.addComponent(e)}catch(r){xs.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,r)}}function Co(t){const e=t.name;if(am.has(e))return xs.debug(`There were multiple attempts to register component ${e}.`),!1;am.set(e,t);for(const r of ud.values())cQ(r,t);return!0}function Nu(t,e){const r=t.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),t.container.getProvider(e)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const uQ={["no-app"]:"No Firebase App '{$appName}' has been created - call initializeApp() first",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},bo=new Pu("app","Firebase",uQ);/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class fQ{constructor(e,r,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},r),this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Oa("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw bo.create("app-deleted",{appName:this._name})}}function P_(t,e={}){let r=t;typeof e!="object"&&(e={name:e});const n=Object.assign({name:im,automaticDataCollectionEnabled:!1},e),i=n.name;if(typeof i!="string"||!i)throw bo.create("bad-app-name",{appName:String(i)});if(r||(r=O_()),!r)throw bo.create("no-options");const a=ud.get(i);if(a){if(cd(r,a.options)&&cd(n,a.config))return a;throw bo.create("duplicate-app",{appName:i})}const o=new xJ(i);for(const s of am.values())o.addComponent(s);const l=new fQ(r,n,o);return ud.set(i,l),l}function N_(t=im){const e=ud.get(t);if(!e&&t===im&&O_())return P_();if(!e)throw bo.create("no-app",{appName:t});return e}function aa(t,e,r){var n;let i=(n=lQ[t])!==null&&n!==void 0?n:t;r&&(i+=`-${r}`);const a=i.match(/\s|\//),o=e.match(/\s|\//);if(a||o){const l=[`Unable to register library "${i}" with version "${e}":`];a&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),a&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),xs.warn(l.join(" "));return}Co(new Oa(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const dQ="firebase-heartbeat-database",hQ=1,pu="firebase-heartbeat-store";let Ep=null;function $_(){return Ep||(Ep=kJ(dQ,hQ,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(pu)}}}).catch(t=>{throw bo.create("idb-open",{originalErrorMessage:t.message})})),Ep}async function pQ(t){try{return await(await $_()).transaction(pu).objectStore(pu).get(B_(t))}catch(e){if(e instanceof _s)xs.warn(e.message);else{const r=bo.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});xs.warn(r.message)}}}async function ME(t,e){try{const n=(await $_()).transaction(pu,"readwrite");await n.objectStore(pu).put(e,B_(t)),await n.done}catch(r){if(r instanceof _s)xs.warn(r.message);else{const n=bo.create("idb-set",{originalErrorMessage:r==null?void 0:r.message});xs.warn(n.message)}}}function B_(t){return`${t.name}!${t.options.appId}`}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const vQ=1024,mQ=30*24*60*60*1e3;class gQ{constructor(e){this.container=e,this._heartbeatsCache=null;const r=this.container.getProvider("app").getImmediate();this._storage=new bQ(r),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}async triggerHeartbeat(){const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=FE();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(i=>i.date===n)))return this._heartbeatsCache.heartbeats.push({date:n,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const a=new Date(i.date).valueOf();return Date.now()-a<=mQ}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=FE(),{heartbeatsToSend:r,unsentEntries:n}=yQ(this._heartbeatsCache.heartbeats),i=D_(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function FE(){return new Date().toISOString().substring(0,10)}function yQ(t,e=vQ){const r=[];let n=t.slice();for(const i of t){const a=r.find(o=>o.agent===i.agent);if(a){if(a.dates.push(i.date),PE(r)>e){a.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),PE(r)>e){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}class bQ{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return O0()?k0().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await pQ(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var r;if(await this._canUseIndexedDBPromise){const i=await this.read();return ME(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var r;if(await this._canUseIndexedDBPromise){const i=await this.read();return ME(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function PE(t){return D_(JSON.stringify({version:2,heartbeats:t})).length}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function xQ(t){Co(new Oa("platform-logger",e=>new PJ(e),"PRIVATE")),Co(new Oa("heartbeat",e=>new gQ(e),"PRIVATE")),aa(nm,kE,t),aa(nm,kE,"esm2017"),aa("fire-js","")}xQ("");var AQ="firebase",EQ="9.22.2";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */aa(AQ,EQ,"app");const TQ=(t,e)=>e.some(r=>t instanceof r);let NE,$E;function SQ(){return NE||(NE=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function wQ(){return $E||($E=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const U_=new WeakMap,om=new WeakMap,H_=new WeakMap,Tp=new WeakMap,N0=new WeakMap;function CQ(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",o)},a=()=>{r(xo(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&U_.set(r,t)}).catch(()=>{}),N0.set(e,t),e}function IQ(t){if(om.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",o),t.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",o),t.addEventListener("abort",o)});om.set(t,e)}let sm={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return om.get(t);if(e==="objectStoreNames")return t.objectStoreNames||H_.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return xo(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function _Q(t){sm=t(sm)}function RQ(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Sp(this),e,...r);return H_.set(n,e.sort?e.sort():[e]),xo(n)}:wQ().includes(t)?function(...e){return t.apply(Sp(this),e),xo(U_.get(this))}:function(...e){return xo(t.apply(Sp(this),e))}}function LQ(t){return typeof t=="function"?RQ(t):(t instanceof IDBTransaction&&IQ(t),TQ(t,SQ())?new Proxy(t,sm):t)}function xo(t){if(t instanceof IDBRequest)return CQ(t);if(Tp.has(t))return Tp.get(t);const e=LQ(t);return e!==t&&(Tp.set(t,e),N0.set(e,t)),e}const Sp=t=>N0.get(t);function DQ(t,e,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(t,e),l=xo(o);return n&&o.addEventListener("upgradeneeded",s=>{n(xo(o.result),s.oldVersion,s.newVersion,xo(o.transaction))}),r&&o.addEventListener("blocked",()=>r()),l.then(s=>{a&&s.addEventListener("close",()=>a()),i&&s.addEventListener("versionchange",()=>i())}).catch(()=>{}),l}const OQ=["get","getKey","getAll","getAllKeys","count"],kQ=["put","add","delete","clear"],wp=new Map;function BE(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(wp.get(e))return wp.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=kQ.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||OQ.includes(r)))return;const a=async function(o,...l){const s=this.transaction(o,i?"readwrite":"readonly");let c=s.store;return n&&(c=c.index(l.shift())),(await Promise.all([c[r](...l),i&&s.done]))[0]};return wp.set(e,a),a}_Q(t=>({...t,get:(e,r,n)=>BE(e,r)||t.get(e,r,n),has:(e,r)=>!!BE(e,r)||t.has(e,r)}));const V_="@firebase/installations",$0="0.6.4";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const j_=1e4,W_=`w:${$0}`,G_="FIS_v2",MQ="https://firebaseinstallations.googleapis.com/v1",FQ=60*60*1e3,PQ="installations",NQ="Installations";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const $Q={["missing-app-config-values"]:'Missing App configuration value: "{$valueName}"',["not-registered"]:"Firebase Installation is not registered.",["installation-not-found"]:"Firebase Installation not found.",["request-failed"]:'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',["app-offline"]:"Could not process request. Application offline.",["delete-pending-registration"]:"Can't delete installation while there is a pending registration request."},As=new Pu(PQ,NQ,$Q);function z_(t){return t instanceof _s&&t.code.includes("request-failed")}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function K_({projectId:t}){return`${MQ}/projects/${t}/installations`}function Y_(t){return{token:t.token,requestStatus:2,expiresIn:UQ(t.expiresIn),creationTime:Date.now()}}async function q_(t,e){const n=(await e.json()).error;return As.create("request-failed",{requestName:t,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function X_({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function BQ(t,{refreshToken:e}){const r=X_(t);return r.append("Authorization",HQ(e)),r}async function Z_(t){const e=await t();return e.status>=500&&e.status<600?t():e}function UQ(t){return Number(t.replace("s","000"))}function HQ(t){return`${G_} ${t}`}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function VQ({appConfig:t,heartbeatServiceProvider:e},{fid:r}){const n=K_(t),i=X_(t),a=e.getImmediate({optional:!0});if(a){const c=await a.getHeartbeatsHeader();c&&i.append("x-firebase-client",c)}const o={fid:r,authVersion:G_,appId:t.appId,sdkVersion:W_},l={method:"POST",headers:i,body:JSON.stringify(o)},s=await Z_(()=>fetch(n,l));if(s.ok){const c=await s.json();return{fid:c.fid||r,registrationStatus:2,refreshToken:c.refreshToken,authToken:Y_(c.authToken)}}else throw await q_("Create Installation",s)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function J_(t){return new Promise(e=>{setTimeout(e,t)})}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function jQ(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const WQ=/^[cdef][\w-]{21}$/,lm="";function GQ(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const r=zQ(t);return WQ.test(r)?r:lm}catch{return lm}}function zQ(t){return jQ(t).substr(0,22)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ih(t){return`${t.appName}!${t.appId}`}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Q_=new Map;function eR(t,e){const r=ih(t);tR(r,e),KQ(r,e)}function tR(t,e){const r=Q_.get(t);if(r)for(const n of r)n(e)}function KQ(t,e){const r=YQ();r&&r.postMessage({key:t,fid:e}),qQ()}let cs=null;function YQ(){return!cs&&"BroadcastChannel"in self&&(cs=new BroadcastChannel("[Firebase] FID Change"),cs.onmessage=t=>{tR(t.data.key,t.data.fid)}),cs}function qQ(){Q_.size===0&&cs&&(cs.close(),cs=null)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const XQ="firebase-installations-database",ZQ=1,Es="firebase-installations-store";let Cp=null;function B0(){return Cp||(Cp=DQ(XQ,ZQ,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(Es)}}})),Cp}async function fd(t,e){const r=ih(t),i=(await B0()).transaction(Es,"readwrite"),a=i.objectStore(Es),o=await a.get(r);return await a.put(e,r),await i.done,(!o||o.fid!==e.fid)&&eR(t,e.fid),e}async function rR(t){const e=ih(t),n=(await B0()).transaction(Es,"readwrite");await n.objectStore(Es).delete(e),await n.done}async function ah(t,e){const r=ih(t),i=(await B0()).transaction(Es,"readwrite"),a=i.objectStore(Es),o=await a.get(r),l=e(o);return l===void 0?await a.delete(r):await a.put(l,r),await i.done,l&&(!o||o.fid!==l.fid)&&eR(t,l.fid),l}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function U0(t){let e;const r=await ah(t.appConfig,n=>{const i=JQ(n),a=QQ(t,i);return e=a.registrationPromise,a.installationEntry});return r.fid===lm?{installationEntry:await e}:{installationEntry:r,registrationPromise:e}}function JQ(t){const e=t||{fid:GQ(),registrationStatus:0};return nR(e)}function QQ(t,e){if(e.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(As.create("app-offline"));return{installationEntry:e,registrationPromise:i}}const r={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},n=eee(t,r);return{installationEntry:r,registrationPromise:n}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:tee(t)}:{installationEntry:e}}async function eee(t,e){try{const r=await VQ(t,e);return fd(t.appConfig,r)}catch(r){throw z_(r)&&r.customData.serverCode===409?await rR(t.appConfig):await fd(t.appConfig,{fid:e.fid,registrationStatus:0}),r}}async function tee(t){let e=await UE(t.appConfig);for(;e.registrationStatus===1;)await J_(100),e=await UE(t.appConfig);if(e.registrationStatus===0){const{installationEntry:r,registrationPromise:n}=await U0(t);return n||r}return e}function UE(t){return ah(t,e=>{if(!e)throw As.create("installation-not-found");return nR(e)})}function nR(t){return ree(t)?{fid:t.fid,registrationStatus:0}:t}function ree(t){return t.registrationStatus===1&&t.registrationTime+j_<Date.now()}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function nee({appConfig:t,heartbeatServiceProvider:e},r){const n=iee(t,r),i=BQ(t,r),a=e.getImmediate({optional:!0});if(a){const c=await a.getHeartbeatsHeader();c&&i.append("x-firebase-client",c)}const o={installation:{sdkVersion:W_,appId:t.appId}},l={method:"POST",headers:i,body:JSON.stringify(o)},s=await Z_(()=>fetch(n,l));if(s.ok){const c=await s.json();return Y_(c)}else throw await q_("Generate Auth Token",s)}function iee(t,{fid:e}){return`${K_(t)}/${e}/authTokens:generate`}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function H0(t,e=!1){let r;const n=await ah(t.appConfig,a=>{if(!iR(a))throw As.create("not-registered");const o=a.authToken;if(!e&&see(o))return a;if(o.requestStatus===1)return r=aee(t,e),a;{if(!navigator.onLine)throw As.create("app-offline");const l=cee(a);return r=oee(t,l),l}});return r?await r:n.authToken}async function aee(t,e){let r=await HE(t.appConfig);for(;r.authToken.requestStatus===1;)await J_(100),r=await HE(t.appConfig);const n=r.authToken;return n.requestStatus===0?H0(t,e):n}function HE(t){return ah(t,e=>{if(!iR(e))throw As.create("not-registered");const r=e.authToken;return uee(r)?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function oee(t,e){try{const r=await nee(t,e),n=Object.assign(Object.assign({},e),{authToken:r});return await fd(t.appConfig,n),r}catch(r){if(z_(r)&&(r.customData.serverCode===401||r.customData.serverCode===404))await rR(t.appConfig);else{const n=Object.assign(Object.assign({},e),{authToken:{requestStatus:0}});await fd(t.appConfig,n)}throw r}}function iR(t){return t!==void 0&&t.registrationStatus===2}function see(t){return t.requestStatus===2&&!lee(t)}function lee(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+FQ}function cee(t){const e={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:e})}function uee(t){return t.requestStatus===1&&t.requestTime+j_<Date.now()}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function fee(t){const e=t,{installationEntry:r,registrationPromise:n}=await U0(e);return n?n.catch(console.error):H0(e).catch(console.error),r.fid}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function dee(t,e=!1){const r=t;return await hee(r),(await H0(r,e)).token}async function hee(t){const{registrationPromise:e}=await U0(t);e&&await e}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function pee(t){if(!t||!t.options)throw Ip("App Configuration");if(!t.name)throw Ip("App Name");const e=["projectId","apiKey","appId"];for(const r of e)if(!t.options[r])throw Ip(r);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function Ip(t){return As.create("missing-app-config-values",{valueName:t})}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const aR="installations",vee="installations-internal",mee=t=>{const e=t.getProvider("app").getImmediate(),r=pee(e),n=Nu(e,"heartbeat");return{app:e,appConfig:r,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},gee=t=>{const e=t.getProvider("app").getImmediate(),r=Nu(e,aR).getImmediate();return{getId:()=>fee(r),getToken:i=>dee(r,i)}};function yee(){Co(new Oa(aR,mee,"PUBLIC")),Co(new Oa(vee,gee,"PRIVATE"))}yee();aa(V_,$0);aa(V_,$0,"esm2017");/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const dd="analytics",bee="firebase_id",xee="origin",Aee=60*1e3,Eee="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",V0="https://www.googletagmanager.com/gtag/js";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const jn=new F0("@firebase/analytics");/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Tee={["already-exists"]:"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.",["already-initialized"]:"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.",["already-initialized-settings"]:"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",["interop-component-reg-failed"]:"Firebase Analytics Interop Component failed to instantiate: {$reason}",["invalid-analytics-context"]:"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",["indexeddb-unavailable"]:"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",["fetch-throttle"]:"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",["config-fetch-failed"]:"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",["no-api-key"]:'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',["no-app-id"]:'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',["no-client-id"]:'The "client_id" field is empty.',["invalid-gtag-resource"]:"Trusted Types detected an invalid gtag resource: {$gtagURL}."},si=new Pu("analytics","Analytics",Tee);/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function See(t){if(!t.startsWith(V0)){const e=si.create("invalid-gtag-resource",{gtagURL:t});return jn.warn(e.message),""}return t}function oR(t){return Promise.all(t.map(e=>e.catch(r=>r)))}function wee(t,e){let r;return window.trustedTypes&&(r=window.trustedTypes.createPolicy(t,e)),r}function Cee(t,e){const r=wee("firebase-js-sdk-policy",{createScriptURL:See}),n=document.createElement("script"),i=`${V0}?l=${t}&id=${e}`;n.src=r?r==null?void 0:r.createScriptURL(i):i,n.async=!0,document.head.appendChild(n)}function Iee(t){let e=[];return Array.isArray(window[t])?e=window[t]:window[t]=e,e}async function _ee(t,e,r,n,i,a){const o=n[i];try{if(o)await e[o];else{const s=(await oR(r)).find(c=>c.measurementId===i);s&&await e[s.appId]}}catch(l){jn.error(l)}t("config",i,a)}async function Ree(t,e,r,n,i){try{let a=[];if(i&&i.send_to){let o=i.send_to;Array.isArray(o)||(o=[o]);const l=await oR(r);for(const s of o){const c=l.find(f=>f.measurementId===s),u=c&&e[c.appId];if(u)a.push(u);else{a=[];break}}}a.length===0&&(a=Object.values(e)),await Promise.all(a),t("event",n,i||{})}catch(a){jn.error(a)}}function Lee(t,e,r,n){async function i(a,...o){try{if(a==="event"){const[l,s]=o;await Ree(t,e,r,l,s)}else if(a==="config"){const[l,s]=o;await _ee(t,e,r,n,l,s)}else if(a==="consent"){const[l]=o;t("consent","update",l)}else if(a==="get"){const[l,s,c]=o;t("get",l,s,c)}else if(a==="set"){const[l]=o;t("set",l)}else t(a,...o)}catch(l){jn.error(l)}}return i}function Dee(t,e,r,n,i){let a=function(...o){window[n].push(arguments)};return window[i]&&typeof window[i]=="function"&&(a=window[i]),window[i]=Lee(a,t,e,r),{gtagCore:a,wrappedGtag:window[i]}}function Oee(t){const e=window.document.getElementsByTagName("script");for(const r of Object.values(e))if(r.src&&r.src.includes(V0)&&r.src.includes(t))return r;return null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const kee=30,Mee=1e3;class Fee{constructor(e={},r=Mee){this.throttleMetadata=e,this.intervalMillis=r}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,r){this.throttleMetadata[e]=r}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const sR=new Fee;function Pee(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function Nee(t){var e;const{appId:r,apiKey:n}=t,i={method:"GET",headers:Pee(n)},a=Eee.replace("{app-id}",r),o=await fetch(a,i);if(o.status!==200&&o.status!==304){let l="";try{const s=await o.json();!((e=s.error)===null||e===void 0)&&e.message&&(l=s.error.message)}catch{}throw si.create("config-fetch-failed",{httpStatus:o.status,responseMessage:l})}return o.json()}async function $ee(t,e=sR,r){const{appId:n,apiKey:i,measurementId:a}=t.options;if(!n)throw si.create("no-app-id");if(!i){if(a)return{measurementId:a,appId:n};throw si.create("no-api-key")}const o=e.getThrottleMetadata(n)||{backoffCount:0,throttleEndTimeMillis:Date.now()},l=new Hee;return setTimeout(async()=>{l.abort()},r!==void 0?r:Aee),lR({appId:n,apiKey:i,measurementId:a},o,l,e)}async function lR(t,{throttleEndTimeMillis:e,backoffCount:r},n,i=sR){var a;const{appId:o,measurementId:l}=t;try{await Bee(n,e)}catch(s){if(l)return jn.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${l} provided in the "measurementId" field in the local Firebase config. [${s==null?void 0:s.message}]`),{appId:o,measurementId:l};throw s}try{const s=await Nee(t);return i.deleteThrottleMetadata(o),s}catch(s){const c=s;if(!Uee(c)){if(i.deleteThrottleMetadata(o),l)return jn.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${l} provided in the "measurementId" field in the local Firebase config. [${c==null?void 0:c.message}]`),{appId:o,measurementId:l};throw s}const u=Number((a=c==null?void 0:c.customData)===null||a===void 0?void 0:a.httpStatus)===503?RE(r,i.intervalMillis,kee):RE(r,i.intervalMillis),f={throttleEndTimeMillis:Date.now()+u,backoffCount:r+1};return i.setThrottleMetadata(o,f),jn.debug(`Calling attemptFetch again in ${u} millis`),lR(t,f,n,i)}}function Bee(t,e){return new Promise((r,n)=>{const i=Math.max(e-Date.now(),0),a=setTimeout(r,i);t.addEventListener(()=>{clearTimeout(a),n(si.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function Uee(t){if(!(t instanceof _s)||!t.customData)return!1;const e=Number(t.customData.httpStatus);return e===429||e===500||e===503||e===504}class Hee{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Vee(t,e,r,n,i){if(i&&i.global){t("event",r,n);return}else{const a=await e,o=Object.assign(Object.assign({},n),{send_to:a});t("event",r,o)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function jee(){if(O0())try{await k0()}catch(t){return jn.warn(si.create("indexeddb-unavailable",{errorInfo:t==null?void 0:t.toString()}).message),!1}else return jn.warn(si.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function Wee(t,e,r,n,i,a,o){var l;const s=$ee(t);s.then(h=>{r[h.measurementId]=h.appId,t.options.measurementId&&h.measurementId!==t.options.measurementId&&jn.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${h.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(h=>jn.error(h)),e.push(s);const c=jee().then(h=>{if(h)return n.getId()}),[u,f]=await Promise.all([s,c]);Oee(a)||Cee(a,u.measurementId),i("js",new Date);const d=(l=o==null?void 0:o.config)!==null&&l!==void 0?l:{};return d[xee]="firebase",d.update=!0,f!=null&&(d[bee]=f),i("config",u.measurementId,d),u.measurementId}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Gee{constructor(e){this.app=e}_delete(){return delete Zc[this.app.options.appId],Promise.resolve()}}let Zc={},VE=[];const jE={};let _p="dataLayer",zee="gtag",WE,cR,GE=!1;function Kee(){const t=[];if(cJ()&&t.push("This is a browser extension environment."),k_()||t.push("Cookies are not available."),t.length>0){const e=t.map((n,i)=>`(${i+1}) ${n}`).join(" "),r=si.create("invalid-analytics-context",{errorInfo:e});jn.warn(r.message)}}function Yee(t,e,r){Kee();const n=t.options.appId;if(!n)throw si.create("no-app-id");if(!t.options.apiKey)if(t.options.measurementId)jn.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw si.create("no-api-key");if(Zc[n]!=null)throw si.create("already-exists",{id:n});if(!GE){Iee(_p);const{wrappedGtag:a,gtagCore:o}=Dee(Zc,VE,jE,_p,zee);cR=a,WE=o,GE=!0}return Zc[n]=Wee(t,VE,jE,e,WE,_p,r),new Gee(t)}function uR(t=N_()){t=M0(t);const e=Nu(t,dd);return e.isInitialized()?e.getImmediate():qee(t)}function qee(t,e={}){const r=Nu(t,dd);if(r.isInitialized()){const i=r.getImmediate();if(cd(e,r.getOptions()))return i;throw si.create("already-initialized")}return r.initialize({options:e})}function fR(t,e,r,n){t=M0(t),Vee(cR,Zc[t.app.options.appId],e,r,n).catch(i=>jn.error(i))}const zE="@firebase/analytics",KE="0.10.0";function Xee(){Co(new Oa(dd,(e,{options:r})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("installations-internal").getImmediate();return Yee(n,i,r)},"PUBLIC")),Co(new Oa("analytics-internal",t,"PRIVATE")),aa(zE,KE),aa(zE,KE,"esm2017");function t(e){try{const r=e.getProvider(dd).getImmediate();return{logEvent:(n,i,a)=>fR(r,n,i,a)}}catch(r){throw si.create("interop-component-reg-failed",{reason:r})}}}Xee();const YE="@firebase/performance",cm="0.6.4";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const dR=cm,Zee="FB-PERF-TRACE-START",Jee="FB-PERF-TRACE-STOP",um="FB-PERF-TRACE-MEASURE",hR="_wt_",pR="_fp",vR="_fcp",mR="_fid",gR="@firebase/performance/config",yR="@firebase/performance/configexpire",Qee="performance",bR="Performance";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const ete={["trace started"]:"Trace {$traceName} was started before.",["trace stopped"]:"Trace {$traceName} is not running.",["nonpositive trace startTime"]:"Trace {$traceName} startTime should be positive.",["nonpositive trace duration"]:"Trace {$traceName} duration should be positive.",["no window"]:"Window is not available.",["no app id"]:"App id is not available.",["no project id"]:"Project id is not available.",["no api key"]:"Api key is not available.",["invalid cc log"]:"Attempted to queue invalid cc event",["FB not default"]:"Performance can only start when Firebase app instance is the default one.",["RC response not ok"]:"RC response is not ok",["invalid attribute name"]:"Attribute name {$attributeName} is invalid.",["invalid attribute value"]:"Attribute value {$attributeValue} is invalid.",["invalid custom metric name"]:"Custom metric name {$customMetricName} is invalid",["invalid String merger input"]:"Input for String merger is invalid, contact support team to resolve.",["already initialized"]:"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."},yn=new Pu(Qee,bR,ete);/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const ca=new F0(bR);ca.logLevel=yr.INFO;/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let Rp,xR;class rn{constructor(e){if(this.window=e,!e)throw yn.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay)}getUrl(){return this.windowLocation.href.split("?")[0]}mark(e){!this.performance||!this.performance.mark||this.performance.mark(e)}measure(e,r,n){!this.performance||!this.performance.measure||this.performance.measure(e,r,n)}getEntriesByType(e){return!this.performance||!this.performance.getEntriesByType?[]:this.performance.getEntriesByType(e)}getEntriesByName(e){return!this.performance||!this.performance.getEntriesByName?[]:this.performance.getEntriesByName(e)}getTimeOrigin(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)}requiredApisAvailable(){return!fetch||!Promise||!k_()?(ca.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1):O0()?!0:(ca.info("IndexedDB is not supported by current browswer"),!1)}setupObserver(e,r){if(!this.PerformanceObserver)return;new this.PerformanceObserver(i=>{for(const a of i.getEntries())r(a)}).observe({entryTypes:[e]})}static getInstance(){return Rp===void 0&&(Rp=new rn(xR)),Rp}}function tte(t){xR=t}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let AR;function rte(t){const e=t.getId();return e.then(r=>{AR=r}),e}function j0(){return AR}function nte(t){const e=t.getToken();return e.then(r=>{}),e}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function qE(t,e){const r=t.length-e.length;if(r<0||r>1)throw yn.create("invalid String merger input");const n=[];for(let i=0;i<t.length;i++)n.push(t.charAt(i)),e.length>i&&n.push(e.charAt(i));return n.join("")}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let Lp;class ai{constructor(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=qE("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=qE("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}getFlTransportFullUrl(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)}static getInstance(){return Lp===void 0&&(Lp=new ai),Lp}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var dl;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"})(dl||(dl={}));const ite=["firebase_","google_","ga_"],ate=new RegExp("^[a-zA-Z]\\w*$"),ote=40,ste=100;function lte(){const t=rn.getInstance().navigator;return t!=null&&t.serviceWorker?t.serviceWorker.controller?2:3:1}function ER(){switch(rn.getInstance().document.visibilityState){case"visible":return dl.VISIBLE;case"hidden":return dl.HIDDEN;default:return dl.UNKNOWN}}function cte(){const e=rn.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}function ute(t){return t.length===0||t.length>ote?!1:!ite.some(r=>t.startsWith(r))&&!!t.match(ate)}function fte(t){return t.length!==0&&t.length<=ste}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function TR(t){var e;const r=(e=t.options)===null||e===void 0?void 0:e.appId;if(!r)throw yn.create("no app id");return r}function dte(t){var e;const r=(e=t.options)===null||e===void 0?void 0:e.projectId;if(!r)throw yn.create("no project id");return r}function hte(t){var e;const r=(e=t.options)===null||e===void 0?void 0:e.apiKey;if(!r)throw yn.create("no api key");return r}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const pte="0.0.1",Li={loggingEnabled:!0},vte="FIREBASE_INSTALLATIONS_AUTH";function mte(t,e){const r=gte();return r?(XE(r),Promise.resolve()):xte(t,e).then(XE).then(n=>yte(n),()=>{})}function gte(){const t=rn.getInstance().localStorage;if(!t)return;const e=t.getItem(yR);if(!e||!Ate(e))return;const r=t.getItem(gR);if(r)try{return JSON.parse(r)}catch{return}}function yte(t){const e=rn.getInstance().localStorage;!t||!e||(e.setItem(gR,JSON.stringify(t)),e.setItem(yR,String(Date.now()+ai.getInstance().configTimeToLive*60*60*1e3)))}const bte="Could not fetch config, will use default configs";function xte(t,e){return nte(t.installations).then(r=>{const n=dte(t.app),i=hte(t.app),a=`https://firebaseremoteconfig.googleapis.com/v1/projects/${n}/namespaces/fireperf:fetch?key=${i}`,o=new Request(a,{method:"POST",headers:{Authorization:`${vte} ${r}`},body:JSON.stringify({app_instance_id:e,app_instance_id_token:r,app_id:TR(t.app),app_version:dR,sdk_version:pte})});return fetch(o).then(l=>{if(l.ok)return l.json();throw yn.create("RC response not ok")})}).catch(()=>{ca.info(bte)})}function XE(t){if(!t)return t;const e=ai.getInstance(),r=t.entries||{};return r.fpr_enabled!==void 0?e.loggingEnabled=String(r.fpr_enabled)==="true":e.loggingEnabled=Li.loggingEnabled,r.fpr_log_source?e.logSource=Number(r.fpr_log_source):Li.logSource&&(e.logSource=Li.logSource),r.fpr_log_endpoint_url?e.logEndPointUrl=r.fpr_log_endpoint_url:Li.logEndPointUrl&&(e.logEndPointUrl=Li.logEndPointUrl),r.fpr_log_transport_key?e.transportKey=r.fpr_log_transport_key:Li.transportKey&&(e.transportKey=Li.transportKey),r.fpr_vc_network_request_sampling_rate!==void 0?e.networkRequestsSamplingRate=Number(r.fpr_vc_network_request_sampling_rate):Li.networkRequestsSamplingRate!==void 0&&(e.networkRequestsSamplingRate=Li.networkRequestsSamplingRate),r.fpr_vc_trace_sampling_rate!==void 0?e.tracesSamplingRate=Number(r.fpr_vc_trace_sampling_rate):Li.tracesSamplingRate!==void 0&&(e.tracesSamplingRate=Li.tracesSamplingRate),e.logTraceAfterSampling=ZE(e.tracesSamplingRate),e.logNetworkAfterSampling=ZE(e.networkRequestsSamplingRate),t}function Ate(t){return Number(t)>Date.now()}function ZE(t){return Math.random()<=t}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let W0=1,Dp;function SR(t){return W0=2,Dp=Dp||Tte(t),Dp}function Ete(){return W0===3}function Tte(t){return Ste().then(()=>rte(t.installations)).then(e=>mte(t,e)).then(()=>JE(),()=>JE())}function Ste(){const t=rn.getInstance().document;return new Promise(e=>{if(t&&t.readyState!=="complete"){const r=()=>{t.readyState==="complete"&&(t.removeEventListener("readystatechange",r),e())};t.addEventListener("readystatechange",r)}else e()})}function JE(){W0=3}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const G0=10*1e3,wte=5.5*1e3,wR=3,Cte=1e3;let hd=wR,Ao=[],QE=!1;function Ite(){QE||(oh(wte),QE=!0)}function oh(t){setTimeout(()=>{if(hd!==0){if(!Ao.length)return oh(G0);_te()}},t)}function _te(){const t=Ao.splice(0,Cte),e=t.map(n=>({source_extension_json_proto3:n.message,event_time_ms:String(n.eventTime)})),r={request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:ai.getInstance().logSource,log_event:e};Rte(r,t).catch(()=>{Ao=[...t,...Ao],hd--,ca.info(`Tries left: ${hd}.`),oh(G0)})}function Rte(t,e){return Lte(t).then(r=>(r.ok||ca.info("Call to Firebase backend failed."),r.json())).then(r=>{const n=Number(r.nextRequestWaitMillis);let i=G0;isNaN(n)||(i=Math.max(n,i));const a=r.logResponseDetails;Array.isArray(a)&&a.length>0&&a[0].responseAction==="RETRY_REQUEST_LATER"&&(Ao=[...e,...Ao],ca.info("Retry transport request later.")),hd=wR,oh(i)})}function Lte(t){const e=ai.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}function Dte(t){if(!t.eventTime||!t.message)throw yn.create("invalid cc log");Ao=[...Ao,t]}function Ote(t){return(...e)=>{const r=t(...e);Dte({message:r,eventTime:Date.now()})}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let Op;function CR(t,e){Op||(Op=Ote(Mte)),Op(t,e)}function pf(t){const e=ai.getInstance();!e.instrumentationEnabled&&t.isAuto||!e.dataCollectionEnabled&&!t.isAuto||rn.getInstance().requiredApisAvailable()&&(t.isAuto&&ER()!==dl.VISIBLE||(Ete()?kp(t):SR(t.performanceController).then(()=>kp(t),()=>kp(t))))}function kp(t){if(!j0())return;const e=ai.getInstance();!e.loggingEnabled||!e.logTraceAfterSampling||setTimeout(()=>CR(t,1),0)}function kte(t){const e=ai.getInstance();if(!e.instrumentationEnabled)return;const r=t.url,n=e.logEndPointUrl.split("?")[0],i=e.flTransportEndpointUrl.split("?")[0];r===n||r===i||!e.loggingEnabled||!e.logNetworkAfterSampling||setTimeout(()=>CR(t,0),0)}function Mte(t,e){return e===0?Fte(t):Pte(t)}function Fte(t){const e={url:t.url,http_method:t.httpMethod||0,http_response_code:200,response_payload_bytes:t.responsePayloadBytes,client_start_time_us:t.startTimeUs,time_to_response_initiated_us:t.timeToResponseInitiatedUs,time_to_response_completed_us:t.timeToResponseCompletedUs},r={application_info:IR(t.performanceController.app),network_request_metric:e};return JSON.stringify(r)}function Pte(t){const e={name:t.name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs};Object.keys(t.counters).length!==0&&(e.counters=t.counters);const r=t.getAttributes();Object.keys(r).length!==0&&(e.custom_attributes=r);const n={application_info:IR(t.performanceController.app),trace_metric:e};return JSON.stringify(n)}function IR(t){return{google_app_id:TR(t),app_instance_id:j0(),web_app_info:{sdk_version:dR,page_url:rn.getInstance().getUrl(),service_worker_status:lte(),visibility_state:ER(),effective_connection_type:cte()},application_process_state:0}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Nte=100,$te="_",Bte=[pR,vR,mR];function Ute(t,e){return t.length===0||t.length>Nte?!1:e&&e.startsWith(hR)&&Bte.indexOf(t)>-1||!t.startsWith($te)}function Hte(t){const e=Math.floor(t);return e<t&&ca.info(`Metric value should be an Integer, setting the value as : ${e}.`),e}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ms{constructor(e,r,n=!1,i){this.performanceController=e,this.name=r,this.isAuto=n,this.state=1,this.customAttributes={},this.counters={},this.api=rn.getInstance(),this.randomId=Math.floor(Math.random()*1e6),this.isAuto||(this.traceStartMark=`${Zee}-${this.randomId}-${this.name}`,this.traceStopMark=`${Jee}-${this.randomId}-${this.name}`,this.traceMeasure=i||`${um}-${this.randomId}-${this.name}`,i&&this.calculateTraceMetrics())}start(){if(this.state!==1)throw yn.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(this.state!==2)throw yn.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),pf(this)}record(e,r,n){if(e<=0)throw yn.create("nonpositive trace startTime",{traceName:this.name});if(r<=0)throw yn.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(r*1e3),this.startTimeUs=Math.floor(e*1e3),n&&n.attributes&&(this.customAttributes=Object.assign({},n.attributes)),n&&n.metrics)for(const i of Object.keys(n.metrics))isNaN(Number(n.metrics[i]))||(this.counters[i]=Math.floor(Number(n.metrics[i])));pf(this)}incrementMetric(e,r=1){this.counters[e]===void 0?this.putMetric(e,r):this.putMetric(e,this.counters[e]+r)}putMetric(e,r){if(Ute(e,this.name))this.counters[e]=Hte(r??0);else throw yn.create("invalid custom metric name",{customMetricName:e})}getMetric(e){return this.counters[e]||0}putAttribute(e,r){const n=ute(e),i=fte(r);if(n&&i){this.customAttributes[e]=r;return}if(!n)throw yn.create("invalid attribute name",{attributeName:e});if(!i)throw yn.create("invalid attribute value",{attributeValue:r})}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){this.customAttributes[e]!==void 0&&delete this.customAttributes[e]}getAttributes(){return Object.assign({},this.customAttributes)}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){const e=this.api.getEntriesByName(this.traceMeasure),r=e&&e[0];r&&(this.durationUs=Math.floor(r.duration*1e3),this.startTimeUs=Math.floor((r.startTime+this.api.getTimeOrigin())*1e3))}static createOobTrace(e,r,n,i){const a=rn.getInstance().getUrl();if(!a)return;const o=new ms(e,hR+a,!0),l=Math.floor(rn.getInstance().getTimeOrigin()*1e3);o.setStartTime(l),r&&r[0]&&(o.setDuration(Math.floor(r[0].duration*1e3)),o.putMetric("domInteractive",Math.floor(r[0].domInteractive*1e3)),o.putMetric("domContentLoadedEventEnd",Math.floor(r[0].domContentLoadedEventEnd*1e3)),o.putMetric("loadEventEnd",Math.floor(r[0].loadEventEnd*1e3)));const s="first-paint",c="first-contentful-paint";if(n){const u=n.find(d=>d.name===s);u&&u.startTime&&o.putMetric(pR,Math.floor(u.startTime*1e3));const f=n.find(d=>d.name===c);f&&f.startTime&&o.putMetric(vR,Math.floor(f.startTime*1e3)),i&&o.putMetric(mR,Math.floor(i*1e3))}pf(o)}static createUserTimingTrace(e,r){const n=new ms(e,r,!1,r);pf(n)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function eT(t,e){const r=e;if(!r||r.responseStart===void 0)return;const n=rn.getInstance().getTimeOrigin(),i=Math.floor((r.startTime+n)*1e3),a=r.responseStart?Math.floor((r.responseStart-r.startTime)*1e3):void 0,o=Math.floor((r.responseEnd-r.startTime)*1e3),l=r.name&&r.name.split("?")[0],s={performanceController:t,url:l,responsePayloadBytes:r.transferSize,startTimeUs:i,timeToResponseInitiatedUs:a,timeToResponseCompletedUs:o};kte(s)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Vte=5e3;function tT(t){j0()&&(setTimeout(()=>Wte(t),0),setTimeout(()=>jte(t),0),setTimeout(()=>Gte(t),0))}function jte(t){const e=rn.getInstance(),r=e.getEntriesByType("resource");for(const n of r)eT(t,n);e.setupObserver("resource",n=>eT(t,n))}function Wte(t){const e=rn.getInstance(),r=e.getEntriesByType("navigation"),n=e.getEntriesByType("paint");if(e.onFirstInputDelay){let i=setTimeout(()=>{ms.createOobTrace(t,r,n),i=void 0},Vte);e.onFirstInputDelay(a=>{i&&(clearTimeout(i),ms.createOobTrace(t,r,n,a))})}else ms.createOobTrace(t,r,n)}function Gte(t){const e=rn.getInstance(),r=e.getEntriesByType("measure");for(const n of r)rT(t,n);e.setupObserver("measure",n=>rT(t,n))}function rT(t,e){const r=e.name;r.substring(0,um.length)!==um&&ms.createUserTimingTrace(t,r)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class zte{constructor(e,r){this.app=e,this.installations=r,this.initialized=!1}_init(e){this.initialized||((e==null?void 0:e.dataCollectionEnabled)!==void 0&&(this.dataCollectionEnabled=e.dataCollectionEnabled),(e==null?void 0:e.instrumentationEnabled)!==void 0&&(this.instrumentationEnabled=e.instrumentationEnabled),rn.getInstance().requiredApisAvailable()?k0().then(r=>{r&&(Ite(),SR(this).then(()=>tT(this),()=>tT(this)),this.initialized=!0)}).catch(r=>{ca.info(`Environment doesn't support IndexedDB: ${r}`)}):ca.info('Firebase Performance cannot start if the browser does not support "Fetch" and "Promise", or cookies are disabled.'))}set instrumentationEnabled(e){ai.getInstance().instrumentationEnabled=e}get instrumentationEnabled(){return ai.getInstance().instrumentationEnabled}set dataCollectionEnabled(e){ai.getInstance().dataCollectionEnabled=e}get dataCollectionEnabled(){return ai.getInstance().dataCollectionEnabled}}const Kte="[DEFAULT]";function Yte(t=N_()){return t=M0(t),Nu(t,"performance").getImmediate()}const qte=(t,{options:e})=>{const r=t.getProvider("app").getImmediate(),n=t.getProvider("installations-internal").getImmediate();if(r.name!==Kte)throw yn.create("FB not default");if(typeof window>"u")throw yn.create("no window");tte(window);const i=new zte(r,n);return i._init(e),i};function Xte(){Co(new Oa("performance",qte,"PUBLIC")),aa(YE,cm),aa(YE,cm,"esm2017")}Xte();const Zte={apiKey:"AIzaSyD0IJtrorI1xL6ARvlcaDOG5HD8rVIc4A8",authDomain:"quick-earn-web-prod.firebaseapp.com",projectId:"quick-earn-web-prod",storageBucket:"quick-earn-web-prod.appspot.com",messagingSenderId:"331685862607",appId:"1:331685862607:web:56a2488372760cb3ceebba",measurementId:"G-1RPGBCH5CQ"},_R=P_(Zte);uR(_R);Yte(_R);function Kce(t="",e={}){const r=uR();fR(r,t,e)}function nT(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pd={exports:{}};/*!
 * artplayer.js v5.1.0
 * Github: https://github.com/zhw2590582/ArtPlayer
 * (c) 2017-2023 Harvey Zack
 * Released under the MIT License.
 */pd.exports;(function(t,e){(function(r,n,i,a,o){var l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof kv<"u"?kv:{},s=typeof l[a]=="function"&&l[a],c=s.cache||{},u=typeof nT=="function"&&nT.bind(t);function f(p,v){if(!c[p]){if(!r[p]){var g=typeof l[a]=="function"&&l[a];if(!v&&g)return g(p,!0);if(s)return s(p,!0);if(u&&typeof p=="string")return u(p);var m=new Error("Cannot find module '"+p+"'");throw m.code="MODULE_NOT_FOUND",m}x.resolve=function(T){var A=r[p][1][T];return A??T},x.cache={};var b=c[p]=new f.Module(p);r[p][0].call(b.exports,x,b,b.exports,this)}return c[p].exports;function x(T){var A=x.resolve(T);return A===!1?{}:f(A)}}f.isParcelRequire=!0,f.Module=function(p){this.id=p,this.bundle=f,this.exports={}},f.modules=r,f.cache=c,f.parent=s,f.register=function(p,v){r[p]=[function(g,m){m.exports=v},{}]},Object.defineProperty(f,"root",{get:function(){return l[a]}}),l[a]=f;for(var d=0;d<n.length;d++)f(n[d]);if(i){var h=f(i);t.exports=h}})({abjMI:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("bundle-text:./style/index.less"),l=a.interopDefault(o),s=r("option-validator"),c=a.interopDefault(s),u=r("./utils/emitter"),f=a.interopDefault(u),d=r("./utils"),h=r("./scheme"),p=a.interopDefault(h),v=r("./config"),g=a.interopDefault(v),m=r("./template"),b=a.interopDefault(m),x=r("./i18n"),T=a.interopDefault(x),A=r("./player"),O=a.interopDefault(A),I=r("./control"),_=a.interopDefault(I),k=r("./contextmenu"),L=a.interopDefault(k),P=r("./info"),W=a.interopDefault(P),q=r("./subtitle"),V=a.interopDefault(q),G=r("./events"),pe=a.interopDefault(G),J=r("./hotkey"),N=a.interopDefault(J),Z=r("./layer"),le=a.interopDefault(Z),ye=r("./loading"),me=a.interopDefault(ye),Re=r("./notice"),be=a.interopDefault(Re),Ce=r("./mask"),we=a.interopDefault(Ce),ce=r("./icons"),re=a.interopDefault(ce),ve=r("./setting"),Te=a.interopDefault(ve),Pe=r("./storage"),B=a.interopDefault(Pe),w=r("./plugins"),C=a.interopDefault(w);let j=0;const ie=[];class ne extends f.default{constructor(ee,de){super(),this.id=++j;const oe=d.mergeDeep(ne.option,ee);if(oe.container=ee.container,this.option=(0,c.default)(oe,p.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.template=new b.default(this),this.events=new pe.default(this),this.storage=new B.default(this),this.icons=new re.default(this),this.i18n=new T.default(this),this.notice=new be.default(this),this.player=new O.default(this),this.layers=new le.default(this),this.controls=new _.default(this),this.contextmenu=new L.default(this),this.subtitle=new V.default(this),this.info=new W.default(this),this.loading=new me.default(this),this.hotkey=new N.default(this),this.mask=new we.default(this),this.setting=new Te.default(this),this.plugins=new C.default(this),typeof de=="function"&&this.on("ready",()=>de.call(this,this)),ne.DEBUG){const te=he=>console.log(`[ART.${this.id}] -> ${he}`);te("Version@"+ne.version),te("Env@"+ne.env),te("Build@"+ne.build);for(let he=0;he<g.default.events.length;he++)this.on("video:"+g.default.events[he],ke=>te("Event@"+ke.type))}ie.push(this)}static get instances(){return ie}static get version(){return"5.1.0"}static get env(){return"production"}static get build(){return"2023-12-23 12:00:08"}static get config(){return g.default}static get utils(){return d}static get scheme(){return p.default}static get Emitter(){return f.default}static get validator(){return c.default}static get kindOf(){return c.default.kindOf}static get html(){return b.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:ee=>ee},moreVideoAttr:{controls:!1,preload:d.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(ee=!0){this.events.destroy(),this.template.destroy(ee),ie.splice(ie.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}i.default=ne,ne.DEBUG=!1,ne.CONTEXTMENU=!0,ne.NOTICE_TIME=2e3,ne.SETTING_WIDTH=250,ne.SETTING_ITEM_WIDTH=200,ne.SETTING_ITEM_HEIGHT=35,ne.RESIZE_TIME=200,ne.SCROLL_TIME=200,ne.SCROLL_GAP=50,ne.AUTO_PLAYBACK_MAX=10,ne.AUTO_PLAYBACK_MIN=5,ne.AUTO_PLAYBACK_TIMEOUT=3e3,ne.RECONNECT_TIME_MAX=5,ne.RECONNECT_SLEEP_TIME=1e3,ne.CONTROL_HIDE_TIME=3e3,ne.DBCLICK_TIME=300,ne.DBCLICK_FULLSCREEN=!0,ne.MOBILE_DBCLICK_PLAY=!0,ne.MOBILE_CLICK_PLAY=!1,ne.AUTO_ORIENTATION_TIME=200,ne.INFO_LOOP_TIME=1e3,ne.FAST_FORWARD_VALUE=3,ne.FAST_FORWARD_TIME=1e3,ne.TOUCH_MOVE_RATIO=.5,ne.VOLUME_STEP=.1,ne.SEEK_STEP=5,ne.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],ne.ASPECT_RATIO=["default","4:3","16:9"],ne.FLIP=["normal","horizontal","vertical"],ne.FULLSCREEN_WEB_IN_BODY=!1,ne.LOG_VERSION=!0,ne.USE_RAF=!1,d.isBrowser&&(window.Artplayer=ne,d.setStyleText("artplayer-style",l.default),setTimeout(()=>{ne.LOG_VERSION&&console.log(`%c ArtPlayer %c ${ne.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"bundle-text:./style/index.less":"kfOe8","option-validator":"bAWi2","./utils/emitter":"2bGVu","./utils":"h3rH9","./scheme":"AdvwB","./config":"9Xmqu","./template":"2gKYH","./i18n":"1AdeF","./player":"556MW","./control":"14IBq","./contextmenu":"7iUum","./info":"hD2Lg","./subtitle":"lum0D","./events":"1Epl5","./hotkey":"eTow4","./layer":"4fDoD","./loading":"fE0Sp","./notice":"9PuGy","./mask":"2etr0","./icons":"6dYSr","./setting":"bRHiA","./storage":"f2Thp","./plugins":"96ThS","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kfOe8:[function(r,n,i){n.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#fff3;--art-hover-color:#fff3;--art-loaded-color:#fff3;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#00000080;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{width:100%;height:100%;zoom:1;text-align:left;direction:ltr;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;width:100%;height:100%;cursor:pointer;position:absolute;inset:0}.art-poster{z-index:11;width:100%;height:100%;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;width:100%;height:100%;opacity:0;pointer-events:none;padding:0 var(--art-padding);transition:all var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:flex-end;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;padding-bottom:var(--art-bottom-gap);position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;width:100%;height:100%;width:0%;background-color:var(--art-hover-color);display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;width:100%;height:100%;width:0%;background-color:var(--art-loaded-color);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;width:100%;height:100%;width:0%;background-color:var(--art-theme);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;width:100%;height:100%;pointer-events:auto;transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0;width:var(--art-highlight-width)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 10px);border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{height:100%;flex:1;justify-content:center;align-items:center;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{height:100%;width:100%;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{width:100%;cursor:pointer;flex:1;justify-content:center;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{width:2px;border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;width:100%;height:100%;background-color:var(--art-theme);position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);transform-origin:100% 100%;max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transform:scale(var(--art-settings-scale));transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{min-width:32px;height:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{height:3px;width:80px;appearance:none;background-color:#fff3;outline:none}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{width:250px;text-overflow:ellipsis;white-space:nowrap;user-select:all;overflow:hidden}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;width:320px;height:180px;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;width:100%;height:100%;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;background-image:none;padding:0}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height)/4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{width:100%;flex-shrink:0;justify-content:center;align-items:center;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000001;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(r,n,i){n.exports=function(){function a(d){return(a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}var o=Object.prototype.toString,l=function(d){if(d===void 0)return"undefined";if(d===null)return"null";var h=a(d);if(h==="boolean")return"boolean";if(h==="string")return"string";if(h==="number")return"number";if(h==="symbol")return"symbol";if(h==="function")return function(p){return s(p)==="GeneratorFunction"}(d)?"generatorfunction":"function";if(function(p){return Array.isArray?Array.isArray(p):p instanceof Array}(d))return"array";if(function(p){return!(!p.constructor||typeof p.constructor.isBuffer!="function")&&p.constructor.isBuffer(p)}(d))return"buffer";if(function(p){try{if(typeof p.length=="number"&&typeof p.callee=="function")return!0}catch(v){if(v.message.indexOf("callee")!==-1)return!0}return!1}(d))return"arguments";if(function(p){return p instanceof Date||typeof p.toDateString=="function"&&typeof p.getDate=="function"&&typeof p.setDate=="function"}(d))return"date";if(function(p){return p instanceof Error||typeof p.message=="string"&&p.constructor&&typeof p.constructor.stackTraceLimit=="number"}(d))return"error";if(function(p){return p instanceof RegExp||typeof p.flags=="string"&&typeof p.ignoreCase=="boolean"&&typeof p.multiline=="boolean"&&typeof p.global=="boolean"}(d))return"regexp";switch(s(d)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(p){return typeof p.throw=="function"&&typeof p.return=="function"&&typeof p.next=="function"}(d))return"generator";switch(h=o.call(d)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return h.slice(8,-1).toLowerCase().replace(/\s/g,"")};function s(d){return d.constructor?d.constructor.name:null}function c(d,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:["option"];return u(d,h,p),f(d,h,p),function(v,g,m){var b=l(g),x=l(v);if(b==="object"){if(x!=="object")throw new Error("[Type Error]: '".concat(m.join("."),"' require 'object' type, but got '").concat(x,"'"));Object.keys(g).forEach(function(T){var A=v[T],O=g[T],I=m.slice();I.push(T),u(A,O,I),f(A,O,I),c(A,O,I)})}if(b==="array"){if(x!=="array")throw new Error("[Type Error]: '".concat(m.join("."),"' require 'array' type, but got '").concat(x,"'"));v.forEach(function(T,A){var O=v[A],I=g[A]||g[0],_=m.slice();_.push(A),u(O,I,_),f(O,I,_),c(O,I,_)})}}(d,h,p),d}function u(d,h,p){if(l(h)==="string"){var v=l(d);if(h[0]==="?"&&(h=h.slice(1)+"|undefined"),!(-1<h.indexOf("|")?h.split("|").map(function(g){return g.toLowerCase().trim()}).filter(Boolean).some(function(g){return v===g}):h.toLowerCase().trim()===v))throw new Error("[Type Error]: '".concat(p.join("."),"' require '").concat(h,"' type, but got '").concat(v,"'"))}}function f(d,h,p){if(l(h)==="function"){var v=h(d,l(d),p);if(v!==!0){var g=l(v);throw g==="string"?new Error(v):g==="error"?v:new Error("[Validator Error]: The scheme for '".concat(p.join("."),"' validator require return true, but got '").concat(v,"'"))}}}return c.kindOf=l,c}()},{}],"2bGVu":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(a,o,l){const s=this.e||(this.e={});return(s[a]||(s[a]=[])).push({fn:o,ctx:l}),this}once(a,o,l){const s=this;function c(...u){s.off(a,c),o.apply(l,u)}return c._=o,this.on(a,c,l)}emit(a,...o){const l=((this.e||(this.e={}))[a]||[]).slice();for(let s=0;s<l.length;s+=1)l[s].fn.apply(l[s].ctx,o);return this}off(a,o){const l=this.e||(this.e={}),s=l[a],c=[];if(s&&o)for(let u=0,f=s.length;u<f;u+=1)s[u].fn!==o&&s[u].fn._!==o&&c.push(s[u]);return c.length?l[a]=c:delete l[a],this}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],guZOB:[function(r,n,i){i.interopDefault=function(a){return a&&a.__esModule?a:{default:a}},i.defineInteropFlag=function(a){Object.defineProperty(a,"__esModule",{value:!0})},i.exportAll=function(a,o){return Object.keys(a).forEach(function(l){l==="default"||l==="__esModule"||o.hasOwnProperty(l)||Object.defineProperty(o,l,{enumerable:!0,get:function(){return a[l]}})}),o},i.export=function(a,o,l){Object.defineProperty(a,o,{enumerable:!0,get:l})}},{}],h3rH9:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./dom");a.exportAll(o,i);var l=r("./error");a.exportAll(l,i);var s=r("./subtitle");a.exportAll(s,i);var c=r("./file");a.exportAll(c,i);var u=r("./property");a.exportAll(u,i);var f=r("./time");a.exportAll(f,i);var d=r("./format");a.exportAll(d,i);var h=r("./compatibility");a.exportAll(h,i)},{"./dom":"XgAQE","./error":"2nFlF","./subtitle":"yqFoT","./file":"1VRQn","./property":"3weX2","./time":"7kBIx","./format":"13atT","./compatibility":"luXC1","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],XgAQE:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"query",()=>l),a.export(i,"queryAll",()=>s),a.export(i,"addClass",()=>c),a.export(i,"removeClass",()=>u),a.export(i,"hasClass",()=>f),a.export(i,"append",()=>d),a.export(i,"remove",()=>h),a.export(i,"setStyle",()=>p),a.export(i,"setStyles",()=>v),a.export(i,"getStyle",()=>g),a.export(i,"sublings",()=>m),a.export(i,"inverseClass",()=>b),a.export(i,"tooltip",()=>x),a.export(i,"isInViewport",()=>T),a.export(i,"includeFromEvent",()=>A),a.export(i,"replaceElement",()=>O),a.export(i,"createElement",()=>I),a.export(i,"getIcon",()=>_),a.export(i,"setStyleText",()=>k);var o=r("./compatibility");function l(L,P=document){return P.querySelector(L)}function s(L,P=document){return Array.from(P.querySelectorAll(L))}function c(L,P){return L.classList.add(P)}function u(L,P){return L.classList.remove(P)}function f(L,P){return L.classList.contains(P)}function d(L,P){return P instanceof Element?L.appendChild(P):L.insertAdjacentHTML("beforeend",String(P)),L.lastElementChild||L.lastChild}function h(L){return L.parentNode.removeChild(L)}function p(L,P,W){return L.style[P]=W,L}function v(L,P){for(const W in P)p(L,W,P[W]);return L}function g(L,P,W=!0){const q=window.getComputedStyle(L,null).getPropertyValue(P);return W?parseFloat(q):q}function m(L){return Array.from(L.parentElement.children).filter(P=>P!==L)}function b(L,P){m(L).forEach(W=>u(W,P)),c(L,P)}function x(L,P,W="top"){o.isMobile||(L.setAttribute("aria-label",P),c(L,"hint--rounded"),c(L,`hint--${W}`))}function T(L,P=0){const W=L.getBoundingClientRect(),q=window.innerHeight||document.documentElement.clientHeight,V=window.innerWidth||document.documentElement.clientWidth,G=W.top-P<=q&&W.top+W.height+P>=0,pe=W.left-P<=V+P&&W.left+W.width+P>=0;return G&&pe}function A(L,P){return L.composedPath&&L.composedPath().indexOf(P)>-1}function O(L,P){return P.parentNode.replaceChild(L,P),L}function I(L){return document.createElement(L)}function _(L="",P=""){const W=I("i");return c(W,"art-icon"),c(W,`art-icon-${L}`),d(W,P),W}function k(L,P){const W=document.getElementById(L);if(W)W.textContent=P;else{const q=I("style");q.id=L,q.textContent=P,document.head.appendChild(q)}}},{"./compatibility":"luXC1","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],luXC1:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"userAgent",()=>o),a.export(i,"isSafari",()=>l),a.export(i,"isWechat",()=>s),a.export(i,"isIE",()=>c),a.export(i,"isAndroid",()=>u),a.export(i,"isIOS",()=>f),a.export(i,"isIOS13",()=>d),a.export(i,"isMobile",()=>h),a.export(i,"isBrowser",()=>p);const o=typeof navigator<"u"?navigator.userAgent:"",l=/^((?!chrome|android).)*safari/i.test(o),s=/MicroMessenger/i.test(o),c=/MSIE|Trident/i.test(o),u=/android/i.test(o),f=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,d=f||o.includes("Macintosh")&&navigator.maxTouchPoints>=1,h=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)||d,p=typeof window<"u"},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2nFlF":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"ArtPlayerError",()=>o),a.export(i,"errorHandle",()=>l);class o extends Error{constructor(c,u){super(c),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,u||this.constructor),this.name="ArtPlayerError"}}function l(s,c){if(!s)throw new o(c);return s}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],yqFoT:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");function o(c){return`WEBVTT \r
\r
`.concat((u=c,u.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(f,d,h)=>{let p=h.slice(0,3);return h.length===1&&(p=h+"00"),h.length===2&&(p=h+"0"),`${d},${p}`})).replace(/\{\\([ibu])\}/g,"</$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"</$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat(`\r
\r
`));var u}function l(c){return URL.createObjectURL(new Blob([c],{type:"text/vtt"}))}function s(c){const u=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function f(d=""){return d.split(/[:.]/).map((h,p,v)=>{if(p===v.length-1){if(h.length===1)return`.${h}00`;if(h.length===2)return`.${h}0`}else if(h.length===1)return(p===0?"0":":0")+h;return p===0?h:p===v.length-1?`.${h}`:`:${h}`}).join("")}return`WEBVTT

${c.split(/\r?\n/).map(d=>{const h=d.match(u);return h?{start:f(h[1].trim()),end:f(h[2].trim()),text:h[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,`
`).trim().split(/\r?\n/).map(p=>p.trim()).join(`
`)}:null}).filter(d=>d).map((d,h)=>d?`${h+1}
${d.start} --> ${d.end}
${d.text}`:"").filter(d=>d.trim()).join(`

`)}`}a.defineInteropFlag(i),a.export(i,"srtToVtt",()=>o),a.export(i,"vttToBlob",()=>l),a.export(i,"assToVtt",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1VRQn":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");function o(s){return s.includes("?")?o(s.split("?")[0]):s.includes("#")?o(s.split("#")[0]):s.trim().toLowerCase().split(".").pop()}function l(s,c){const u=document.createElement("a");u.style.display="none",u.href=s,u.download=c,document.body.appendChild(u),u.click(),document.body.removeChild(u)}a.defineInteropFlag(i),a.export(i,"getExt",()=>o),a.export(i,"download",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3weX2":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"def",()=>o),a.export(i,"has",()=>s),a.export(i,"get",()=>c),a.export(i,"mergeDeep",()=>u);const o=Object.defineProperty,{hasOwnProperty:l}=Object.prototype;function s(f,d){return l.call(f,d)}function c(f,d){return Object.getOwnPropertyDescriptor(f,d)}function u(...f){const d=h=>h&&typeof h=="object"&&!Array.isArray(h);return f.reduce((h,p)=>(Object.keys(p).forEach(v=>{const g=h[v],m=p[v];Array.isArray(g)&&Array.isArray(m)?h[v]=g.concat(...m):d(g)&&d(m)?h[v]=u(g,m):h[v]=m}),h),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7kBIx":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");function o(c=0){return new Promise(u=>setTimeout(u,c))}function l(c,u){let f;return function(...d){clearTimeout(f),f=setTimeout(()=>(f=null,c.apply(this,d)),u)}}function s(c,u){let f=!1;return function(...d){f||(c.apply(this,d),f=!0,setTimeout(function(){f=!1},u))}}a.defineInteropFlag(i),a.export(i,"sleep",()=>o),a.export(i,"debounce",()=>l),a.export(i,"throttle",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"13atT":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");function o(d,h,p){return Math.max(Math.min(d,Math.max(h,p)),Math.min(h,p))}function l(d){return d.charAt(0).toUpperCase()+d.slice(1)}function s(d){return["string","number"].includes(typeof d)}function c(d){if(!d)return"00:00";const h=Math.floor(d/3600),p=Math.floor((d-3600*h)/60),v=Math.floor(d-3600*h-60*p);return(h>0?[h,p,v]:[p,v]).map(g=>g<10?`0${g}`:String(g)).join(":")}function u(d){return d.replace(/[&<>'"]/g,h=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"})[h]||h)}function f(d){const h={"&amp;":"&","&lt;":"<","&gt;":">","&#39;":"'","&quot;":'"'},p=new RegExp(`(${Object.keys(h).join("|")})`,"g");return d.replace(p,v=>h[v]||v)}a.defineInteropFlag(i),a.export(i,"clamp",()=>o),a.export(i,"capitalize",()=>l),a.export(i,"isStringOrNumber",()=>s),a.export(i,"secondToTime",()=>c),a.export(i,"escape",()=>u),a.export(i,"unescape",()=>f)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],AdvwB:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"ComponentOption",()=>p);var o=r("../utils");const l="array",s="boolean",c="string",u="number",f="object",d="function";function h(v,g,m){return(0,o.errorHandle)(g===c||g===u||v instanceof Element,`${m.join(".")} require '${c}' or 'Element' type`)}const p={html:h,disable:`?${s}`,name:`?${c}`,index:`?${u}`,style:`?${f}`,click:`?${d}`,mounted:`?${d}`,tooltip:`?${c}|${u}`,width:`?${u}`,selector:`?${l}`,onSelect:`?${d}`,switch:`?${s}`,onSwitch:`?${d}`,range:`?${l}`,onRange:`?${d}`,onChange:`?${d}`};i.default={id:c,container:h,url:c,poster:c,type:c,theme:c,lang:c,volume:u,isLive:s,muted:s,autoplay:s,autoSize:s,autoMini:s,loop:s,flip:s,playbackRate:s,aspectRatio:s,screenshot:s,setting:s,hotkey:s,pip:s,mutex:s,backdrop:s,fullscreen:s,fullscreenWeb:s,subtitleOffset:s,miniProgressBar:s,useSSR:s,playsInline:s,lock:s,fastForward:s,autoPlayback:s,autoOrientation:s,airplay:s,plugins:[d],layers:[p],contextmenu:[p],settings:[p],controls:[{...p,position:(v,g,m)=>{const b=["top","left","right"];return(0,o.errorHandle)(b.includes(v),`${m.join(".")} only accept ${b.toString()} as parameters`)}}],quality:[{default:`?${s}`,html:c,url:c}],highlight:[{time:u,text:c}],thumbnails:{url:c,number:u,column:u,width:u,height:u},subtitle:{url:c,name:c,type:c,style:f,escape:s,encoding:c,onVttLoad:d},moreVideoAttr:f,i18n:f,icons:f,cssVar:f,customType:f}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9Xmqu":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2gKYH":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("./utils");class o{constructor(s){this.art=s;const{option:c,constructor:u}=s;c.container instanceof Element?this.$container=c.container:(this.$container=(0,a.query)(c.container),(0,a.errorHandle)(this.$container,`No container element found by ${c.container}`));const f=this.$container.tagName.toLowerCase();(0,a.errorHandle)(f==="div",`Unsupported container element type, only support 'div' but got '${f}'`),(0,a.errorHandle)(u.instances.every(d=>d.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=s.id,this.init()}static get html(){return'<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show"><video class="art-video"><track default kind="metadata" src=""></track></video><div class="art-poster"></div><div class="art-subtitle"></div><div class="art-danmuku"></div><div class="art-layers"></div><div class="art-mask"><div class="art-state"></div></div><div class="art-bottom"><div class="art-progress"></div><div class="art-controls"><div class="art-controls-left"></div><div class="art-controls-center"></div><div class="art-controls-right"></div></div></div><div class="art-loading"></div><div class="art-notice"><div class="art-notice-inner"></div></div><div class="art-settings"></div><div class="art-info"><div class="art-info-panel"><div class="art-info-item"><div class="art-info-title">Player version:</div><div class="art-info-content">5.1.0</div></div><div class="art-info-item"><div class="art-info-title">Video url:</div><div class="art-info-content" data-video="src"></div></div><div class="art-info-item"><div class="art-info-title">Video volume:</div><div class="art-info-content" data-video="volume"></div></div><div class="art-info-item"><div class="art-info-title">Video time:</div><div class="art-info-content" data-video="currentTime"></div></div><div class="art-info-item"><div class="art-info-title">Video duration:</div><div class="art-info-content" data-video="duration"></div></div><div class="art-info-item"><div class="art-info-title">Video resolution:</div><div class="art-info-content"><span data-video="videoWidth"></span> x <span data-video="videoHeight"></span></div></div></div><div class="art-info-close">[x]</div></div><div class="art-contextmenus"></div></div>'}query(s){return(0,a.query)(s,this.$container)}init(){const{option:s}=this.art;s.useSSR||(this.$container.innerHTML=o.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),s.backdrop&&(0,a.addClass)(this.$player,"art-backdrop"),a.isMobile&&(0,a.addClass)(this.$player,"art-mobile")}destroy(s){s?this.$container.innerHTML="":(0,a.addClass)(this.$player,"art-destroy")}}i.default=o},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1AdeF":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../utils"),l=r("./zh-cn"),s=a.interopDefault(l);i.default=class{constructor(c){this.art=c,this.languages={"zh-cn":s.default},this.language={},this.update(c.option.i18n)}init(){const c=this.art.option.lang.toLowerCase();this.language=this.languages[c]||{}}get(c){return this.language[c]||c}update(c){this.languages=(0,o.mergeDeep)(this.languages,c),this.init()}}},{"../utils":"h3rH9","./zh-cn":"3ZSKq","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3ZSKq":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);const a={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","Show Setting":"显示设置","Hide Setting":"隐藏设置",Screenshot:"截图","Play Speed":"播放速度","Aspect Ratio":"画面比例",Default:"默认",Normal:"正常",Open:"打开","Switch Video":"切换","Switch Subtitle":"切换字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"网页全屏","Exit Web Fullscreen":"退出网页全屏","Mini Player":"迷你播放器","PIP Mode":"开启画中画","Exit PIP Mode":"退出画中画","PIP Not Supported":"不支持画中画","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};i.default=a,typeof window<"u"&&(window["artplayer-i18n-zh-cn"]=a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"556MW":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./urlMix"),l=a.interopDefault(o),s=r("./attrMix"),c=a.interopDefault(s),u=r("./playMix"),f=a.interopDefault(u),d=r("./pauseMix"),h=a.interopDefault(d),p=r("./toggleMix"),v=a.interopDefault(p),g=r("./seekMix"),m=a.interopDefault(g),b=r("./volumeMix"),x=a.interopDefault(b),T=r("./currentTimeMix"),A=a.interopDefault(T),O=r("./durationMix"),I=a.interopDefault(O),_=r("./switchMix"),k=a.interopDefault(_),L=r("./playbackRateMix"),P=a.interopDefault(L),W=r("./aspectRatioMix"),q=a.interopDefault(W),V=r("./screenshotMix"),G=a.interopDefault(V),pe=r("./fullscreenMix"),J=a.interopDefault(pe),N=r("./fullscreenWebMix"),Z=a.interopDefault(N),le=r("./pipMix"),ye=a.interopDefault(le),me=r("./loadedMix"),Re=a.interopDefault(me),be=r("./playedMix"),Ce=a.interopDefault(be),we=r("./playingMix"),ce=a.interopDefault(we),re=r("./autoSizeMix"),ve=a.interopDefault(re),Te=r("./rectMix"),Pe=a.interopDefault(Te),B=r("./flipMix"),w=a.interopDefault(B),C=r("./miniMix"),j=a.interopDefault(C),ie=r("./posterMix"),ne=a.interopDefault(ie),X=r("./autoHeightMix"),ee=a.interopDefault(X),de=r("./cssVarMix"),oe=a.interopDefault(de),te=r("./themeMix"),he=a.interopDefault(te),ke=r("./typeMix"),se=a.interopDefault(ke),ue=r("./stateMix"),xe=a.interopDefault(ue),De=r("./subtitleOffsetMix"),U=a.interopDefault(De),ge=r("./airplayMix"),Se=a.interopDefault(ge),$e=r("./qualityMix"),Ue=a.interopDefault($e),We=r("./optionInit"),Je=a.interopDefault(We),nt=r("./eventInit"),Qe=a.interopDefault(nt);i.default=class{constructor(Ke){(0,l.default)(Ke),(0,c.default)(Ke),(0,f.default)(Ke),(0,h.default)(Ke),(0,v.default)(Ke),(0,m.default)(Ke),(0,x.default)(Ke),(0,A.default)(Ke),(0,I.default)(Ke),(0,k.default)(Ke),(0,P.default)(Ke),(0,q.default)(Ke),(0,G.default)(Ke),(0,J.default)(Ke),(0,Z.default)(Ke),(0,ye.default)(Ke),(0,Re.default)(Ke),(0,Ce.default)(Ke),(0,ce.default)(Ke),(0,ve.default)(Ke),(0,Pe.default)(Ke),(0,w.default)(Ke),(0,j.default)(Ke),(0,ne.default)(Ke),(0,ee.default)(Ke),(0,oe.default)(Ke),(0,he.default)(Ke),(0,se.default)(Ke),(0,xe.default)(Ke),(0,U.default)(Ke),(0,Se.default)(Ke),(0,Ue.default)(Ke),(0,Qe.default)(Ke),(0,Je.default)(Ke)}}},{"./urlMix":"2mRAc","./attrMix":"2EA19","./playMix":"fD2Tc","./pauseMix":"c3LGJ","./toggleMix":"fVsAa","./seekMix":"dmROF","./volumeMix":"9jtfB","./currentTimeMix":"7NCDR","./durationMix":"YS7JL","./switchMix":"dzUqN","./playbackRateMix":"5I2mT","./aspectRatioMix":"7m6R8","./screenshotMix":"2dgtR","./fullscreenMix":"fKDW8","./fullscreenWebMix":"lNvYI","./pipMix":"8j7oC","./loadedMix":"dwVOT","./playedMix":"dDeLx","./playingMix":"ceoBp","./autoSizeMix":"lcWXX","./rectMix":"f7y88","./flipMix":"l4qt5","./miniMix":"9ZPBQ","./posterMix":"5K8hA","./autoHeightMix":"3T5ls","./cssVarMix":"6KfHs","./themeMix":"7lcSc","./typeMix":"8JgTw","./stateMix":"cebt1","./subtitleOffsetMix":"hJvIy","./airplayMix":"4Tp0U","./qualityMix":"3wZgN","./optionInit":"iPdgW","./eventInit":"3mj0J","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2mRAc":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{option:l,template:{$video:s}}=o;(0,a.def)(o,"url",{get:()=>s.src,async set(c){if(c){const u=o.url,f=l.type||(0,a.getExt)(c),d=l.customType[f];f&&d?(await(0,a.sleep)(),o.loading.show=!0,d.call(o,s,c,o)):(URL.revokeObjectURL(u),s.src=c),u!==o.url&&(o.option.url=c,o.isReady&&u&&o.once("video:canplay",()=>{o.emit("restart",c)}))}else await(0,a.sleep)(),o.loading.show=!0}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2EA19":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$video:l}}=o;(0,a.def)(o,"attr",{value(s,c){if(c===void 0)return l[s];l[s]=c}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fD2Tc:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,notice:s,option:c,constructor:{instances:u},template:{$video:f}}=o;(0,a.def)(o,"play",{value:async function(){const d=await f.play();if(s.show=l.get("Play"),o.emit("play"),c.mutex)for(let h=0;h<u.length;h++){const p=u[h];p!==o&&p.pause()}return d}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],c3LGJ:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$video:l},i18n:s,notice:c}=o;(0,a.def)(o,"pause",{value(){const u=l.pause();return c.show=s.get("Pause"),o.emit("pause"),u}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fVsAa:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"toggle",{value:()=>o.playing?o.pause():o.play()})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dmROF:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{notice:l}=o;(0,a.def)(o,"seek",{set(s){o.currentTime=s,o.emit("seek",o.currentTime),o.duration&&(l.show=`${(0,a.secondToTime)(o.currentTime)} / ${(0,a.secondToTime)(o.duration)}`)}}),(0,a.def)(o,"forward",{set(s){o.seek=o.currentTime+s}}),(0,a.def)(o,"backward",{set(s){o.seek=o.currentTime-s}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9jtfB":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$video:l},i18n:s,notice:c,storage:u}=o;(0,a.def)(o,"volume",{get:()=>l.volume||0,set:f=>{l.volume=(0,a.clamp)(f,0,1),c.show=`${s.get("Volume")}: ${parseInt(100*l.volume,10)}`,l.volume!==0&&u.set("volume",l.volume)}}),(0,a.def)(o,"muted",{get:()=>l.muted,set:f=>{l.muted=f,o.emit("muted",f)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7NCDR":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{$video:l}=o.template;(0,a.def)(o,"currentTime",{get:()=>l.currentTime||0,set:s=>{s=parseFloat(s),Number.isNaN(s)||(l.currentTime=(0,a.clamp)(s,0,o.duration))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],YS7JL:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"duration",{get:()=>{const{duration:l}=o.template.$video;return l===1/0?0:l||0}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dzUqN:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){function l(s,c){return new Promise((u,f)=>{if(s===o.url)return;const{playing:d,aspectRatio:h,playbackRate:p}=o;o.pause(),o.url=s,o.notice.show="",o.once("video:error",f),o.once("video:canplay",async()=>{o.playbackRate=p,o.aspectRatio=h,o.currentTime=c,d&&await o.play(),o.notice.show="",u()})})}(0,a.def)(o,"switchQuality",{value:s=>l(s,o.currentTime)}),(0,a.def)(o,"switchUrl",{value:s=>l(s,0)}),(0,a.def)(o,"switch",{set:o.switchUrl})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5I2mT":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$video:l},i18n:s,notice:c}=o;(0,a.def)(o,"playbackRate",{get:()=>l.playbackRate,set(u){if(u){if(u===l.playbackRate)return;l.playbackRate=u,c.show=`${s.get("Rate")}: ${u===1?s.get("Normal"):`${u}x`}`}else o.playbackRate=1}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7m6R8":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,notice:s,template:{$video:c,$player:u}}=o;(0,a.def)(o,"aspectRatio",{get:()=>u.dataset.aspectRatio||"default",set(f){if(f||(f="default"),f==="default")(0,a.setStyle)(c,"width",null),(0,a.setStyle)(c,"height",null),(0,a.setStyle)(c,"margin",null),delete u.dataset.aspectRatio;else{const d=f.split(":").map(Number),{clientWidth:h,clientHeight:p}=u,v=h/p,g=d[0]/d[1];v>g?((0,a.setStyle)(c,"width",g*p+"px"),(0,a.setStyle)(c,"height","100%"),(0,a.setStyle)(c,"margin","0 auto")):((0,a.setStyle)(c,"width","100%"),(0,a.setStyle)(c,"height",h/g+"px"),(0,a.setStyle)(c,"margin","auto 0")),u.dataset.aspectRatio=f}s.show=`${l.get("Aspect Ratio")}: ${f==="default"?l.get("Default"):f}`,o.emit("aspectRatio",f)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2dgtR":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{notice:l,template:{$video:s}}=o,c=(0,a.createElement)("canvas");(0,a.def)(o,"getDataURL",{value:()=>new Promise((u,f)=>{try{c.width=s.videoWidth,c.height=s.videoHeight,c.getContext("2d").drawImage(s,0,0),u(c.toDataURL("image/png"))}catch(d){l.show=d,f(d)}})}),(0,a.def)(o,"getBlobUrl",{value:()=>new Promise((u,f)=>{try{c.width=s.videoWidth,c.height=s.videoHeight,c.getContext("2d").drawImage(s,0,0),c.toBlob(d=>{u(URL.createObjectURL(d))})}catch(d){l.show=d,f(d)}})}),(0,a.def)(o,"screenshot",{value:async()=>{const u=await o.getDataURL();return(0,a.download)(u,`artplayer_${(0,a.secondToTime)(s.currentTime)}.png`),o.emit("screenshot",u),u}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fKDW8:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../libs/screenfull"),l=a.interopDefault(o),s=r("../utils");i.default=function(c){const{i18n:u,notice:f,template:{$video:d,$player:h}}=c;c.once("video:loadedmetadata",()=>{l.default.isEnabled?(p=>{l.default.on("change",()=>{p.emit("fullscreen",l.default.isFullscreen)}),(0,s.def)(p,"fullscreen",{get:()=>l.default.isFullscreen,async set(v){v?(p.state="fullscreen",await l.default.request(h),(0,s.addClass)(h,"art-fullscreen")):(await l.default.exit(),(0,s.removeClass)(h,"art-fullscreen")),p.emit("resize")}})})(c):document.fullscreenEnabled||d.webkitSupportsFullscreen?(p=>{(0,s.def)(p,"fullscreen",{get:()=>d.webkitDisplayingFullscreen,set(v){v?(p.state="fullscreen",d.webkitEnterFullscreen(),p.emit("fullscreen",!0)):(d.webkitExitFullscreen(),p.emit("fullscreen",!1)),p.emit("resize")}})})(c):(0,s.def)(c,"fullscreen",{get:()=>!1,set(){f.show=u.get("Fullscreen Not Supported")}}),(0,s.def)(c,"fullscreen",(0,s.get)(c,"fullscreen"))})}},{"../libs/screenfull":"lUahW","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lUahW:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);const a=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=(()=>{if(typeof document>"u")return!1;const c=a[0],u={};for(const f of a)if(f[1]in document){for(const[d,h]of f.entries())u[c[d]]=h;return u}return!1})(),l={change:o.fullscreenchange,error:o.fullscreenerror};let s={request:(c=document.documentElement,u)=>new Promise((f,d)=>{const h=()=>{s.off("change",h),f()};s.on("change",h);const p=c[o.requestFullscreen](u);p instanceof Promise&&p.then(h).catch(d)}),exit:()=>new Promise((c,u)=>{if(!s.isFullscreen)return void c();const f=()=>{s.off("change",f),c()};s.on("change",f);const d=document[o.exitFullscreen]();d instanceof Promise&&d.then(f).catch(u)}),toggle:(c,u)=>s.isFullscreen?s.exit():s.request(c,u),onchange(c){s.on("change",c)},onerror(c){s.on("error",c)},on(c,u){const f=l[c];f&&document.addEventListener(f,u,!1)},off(c,u){const f=l[c];f&&document.removeEventListener(f,u,!1)},raw:o};Object.defineProperties(s,{isFullscreen:{get:()=>!!document[o.fullscreenElement]},element:{enumerable:!0,get:()=>document[o.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[o.fullscreenEnabled]}}),o||(s={isEnabled:!1}),i.default=s},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lNvYI:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{constructor:l,template:{$container:s,$player:c}}=o;let u="";(0,a.def)(o,"fullscreenWeb",{get:()=>(0,a.hasClass)(c,"art-fullscreen-web"),set(f){f?(u=c.style.cssText,l.FULLSCREEN_WEB_IN_BODY&&(0,a.append)(document.body,c),o.state="fullscreenWeb",(0,a.setStyle)(c,"width","100%"),(0,a.setStyle)(c,"height","100%"),(0,a.addClass)(c,"art-fullscreen-web"),o.emit("fullscreenWeb",!0)):(l.FULLSCREEN_WEB_IN_BODY&&(0,a.append)(s,c),u&&(c.style.cssText=u,u=""),(0,a.removeClass)(c,"art-fullscreen-web"),o.emit("fullscreenWeb",!1)),o.emit("resize")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8j7oC":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,notice:s,template:{$video:c}}=o;document.pictureInPictureEnabled?function(u){const{template:{$video:f},proxy:d,notice:h}=u;f.disablePictureInPicture=!1,(0,a.def)(u,"pip",{get:()=>document.pictureInPictureElement,set(p){p?(u.state="pip",f.requestPictureInPicture().catch(v=>{throw h.show=v,v})):document.exitPictureInPicture().catch(v=>{throw h.show=v,v})}}),d(f,"enterpictureinpicture",()=>{u.emit("pip",!0)}),d(f,"leavepictureinpicture",()=>{u.emit("pip",!1)})}(o):c.webkitSupportsPresentationMode?function(u){const{$video:f}=u.template;f.webkitSetPresentationMode("inline"),(0,a.def)(u,"pip",{get:()=>f.webkitPresentationMode==="picture-in-picture",set(d){d?(u.state="pip",f.webkitSetPresentationMode("picture-in-picture"),u.emit("pip",!0)):(f.webkitSetPresentationMode("inline"),u.emit("pip",!1))}})}(o):(0,a.def)(o,"pip",{get:()=>!1,set(){s.show=l.get("PIP Not Supported")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dwVOT:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{$video:l}=o.template;(0,a.def)(o,"loaded",{get:()=>o.loadedTime/l.duration}),(0,a.def)(o,"loadedTime",{get:()=>l.buffered.length?l.buffered.end(l.buffered.length-1):0})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dDeLx:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"played",{get:()=>o.currentTime/o.duration})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],ceoBp:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{$video:l}=o.template;(0,a.def)(o,"playing",{get:()=>l.currentTime>0&&!l.paused&&!l.ended&&l.readyState>2})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lcWXX:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{$container:l,$player:s,$video:c}=o.template;(0,a.def)(o,"autoSize",{value(){const{videoWidth:u,videoHeight:f}=c,{width:d,height:h}=l.getBoundingClientRect(),p=u/f;if(d/h>p){const v=h*p/d*100;(0,a.setStyle)(s,"width",`${v}%`),(0,a.setStyle)(s,"height","100%")}else{const v=d/p/h*100;(0,a.setStyle)(s,"width","100%"),(0,a.setStyle)(s,"height",`${v}%`)}o.emit("autoSize",{width:o.width,height:o.height})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f7y88:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"rect",{get:()=>o.template.$player.getBoundingClientRect()});const l=["bottom","height","left","right","top","width"];for(let s=0;s<l.length;s++){const c=l[s];(0,a.def)(o,c,{get:()=>o.rect[c]})}(0,a.def)(o,"x",{get:()=>o.left+window.pageXOffset}),(0,a.def)(o,"y",{get:()=>o.top+window.pageYOffset})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],l4qt5:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$player:l},i18n:s,notice:c}=o;(0,a.def)(o,"flip",{get:()=>l.dataset.flip||"normal",set(u){u||(u="normal"),u==="normal"?delete l.dataset.flip:l.dataset.flip=u,c.show=`${s.get("Video Flip")}: ${s.get((0,a.capitalize)(u))}`,o.emit("flip",u)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9ZPBQ":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{icons:l,proxy:s,storage:c,template:{$player:u,$video:f}}=o;let d=!1,h=0,p=0;function v(){const{$mini:b}=o.template;b&&((0,a.removeClass)(u,"art-mini"),(0,a.setStyle)(b,"display","none"),u.prepend(f),o.emit("mini",!1))}function g(b,x){o.playing?((0,a.setStyle)(b,"display","none"),(0,a.setStyle)(x,"display","flex")):((0,a.setStyle)(b,"display","flex"),(0,a.setStyle)(x,"display","none"))}function m(){const{$mini:b}=o.template,x=b.getBoundingClientRect(),T=window.innerHeight-x.height-50,A=window.innerWidth-x.width-50;c.set("top",T),c.set("left",A),(0,a.setStyle)(b,"top",`${T}px`),(0,a.setStyle)(b,"left",`${A}px`)}(0,a.def)(o,"mini",{get:()=>(0,a.hasClass)(u,"art-mini"),set(b){if(b){o.state="mini",(0,a.addClass)(u,"art-mini");const x=function(){const{$mini:O}=o.template;if(O)return(0,a.append)(O,f),(0,a.setStyle)(O,"display","flex");{const I=(0,a.createElement)("div");(0,a.addClass)(I,"art-mini-popup"),(0,a.append)(document.body,I),o.template.$mini=I,(0,a.append)(I,f);const _=(0,a.append)(I,'<div class="art-mini-close"></div>');(0,a.append)(_,l.close),s(_,"click",v);const k=(0,a.append)(I,'<div class="art-mini-state"></div>'),L=(0,a.append)(k,l.play),P=(0,a.append)(k,l.pause);return s(L,"click",()=>o.play()),s(P,"click",()=>o.pause()),g(L,P),o.on("video:playing",()=>g(L,P)),o.on("video:pause",()=>g(L,P)),o.on("video:timeupdate",()=>g(L,P)),s(I,"mousedown",W=>{d=W.button===0,h=W.pageX,p=W.pageY}),o.on("document:mousemove",W=>{if(d){(0,a.addClass)(I,"art-mini-droging");const q=W.pageX-h,V=W.pageY-p;(0,a.setStyle)(I,"transform",`translate(${q}px, ${V}px)`)}}),o.on("document:mouseup",()=>{if(d){d=!1,(0,a.removeClass)(I,"art-mini-droging");const W=I.getBoundingClientRect();c.set("left",W.left),c.set("top",W.top),(0,a.setStyle)(I,"left",`${W.left}px`),(0,a.setStyle)(I,"top",`${W.top}px`),(0,a.setStyle)(I,"transform",null)}}),I}}(),T=c.get("top"),A=c.get("left");T&&A?((0,a.setStyle)(x,"top",`${T}px`),(0,a.setStyle)(x,"left",`${A}px`),(0,a.isInViewport)(x)||m()):m(),o.emit("mini",!0)}else v()}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5K8hA":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$poster:l}}=o;(0,a.def)(o,"poster",{get:()=>{try{return l.style.backgroundImage.match(/"(.*)"/)[1]}catch{return""}},set(s){(0,a.setStyle)(l,"backgroundImage",`url(${s})`)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3T5ls":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{template:{$container:l,$video:s}}=o;(0,a.def)(o,"autoHeight",{value(){const{clientWidth:c}=l,{videoHeight:u,videoWidth:f}=s,d=u*(c/f);(0,a.setStyle)(l,"height",d+"px"),o.emit("autoHeight",d)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6KfHs":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{$player:l}=o.template;(0,a.def)(o,"cssVar",{value:(s,c)=>c?l.style.setProperty(s,c):getComputedStyle(l).getPropertyValue(s)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7lcSc":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"theme",{get:()=>o.cssVar("--art-theme"),set(l){o.cssVar("--art-theme",l)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8JgTw":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"type",{get:()=>o.option.type,set(l){o.option.type=l}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],cebt1:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const l=["mini","pip","fullscreen","fullscreenWeb"];(0,a.def)(o,"state",{get:()=>l.find(s=>o[s])||"standard",set(s){for(let c=0;c<l.length;c++){const u=l[c];u!==s&&o[u]&&(o[u]=!1)}}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hJvIy:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{clamp:l}=o.constructor.utils,{notice:s,template:c,i18n:u}=o;let f=0,d=[];o.on("subtitle:switch",()=>{d=[]}),(0,a.def)(o,"subtitleOffset",{get:()=>f,set(h){if(c.$track&&c.$track.track){const p=Array.from(c.$track.track.cues);f=l(h,-5,5);for(let v=0;v<p.length;v++){const g=p[v];d[v]||(d[v]={startTime:g.startTime,endTime:g.endTime}),g.startTime=l(d[v].startTime+f,0,o.duration),g.endTime=l(d[v].endTime+f,0,o.duration)}o.subtitle.update(),s.show=`${u.get("Subtitle Offset")}: ${h}s`,o.emit("subtitleOffset",h)}else o.emit("subtitleOffset",0)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"4Tp0U":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,notice:s,proxy:c,template:{$video:u}}=o;let f=!0;window.WebKitPlaybackTargetAvailabilityEvent&&u.webkitShowPlaybackTargetPicker?c(u,"webkitplaybacktargetavailabilitychanged",d=>{switch(d.availability){case"available":f=!0;break;case"not-available":f=!1}}):f=!1,(0,a.def)(o,"airplay",{value(){f?(u.webkitShowPlaybackTargetPicker(),o.emit("airplay")):s.show=l.get("AirPlay Not Available")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3wZgN":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){(0,a.def)(o,"quality",{set(l){const{controls:s,notice:c,i18n:u}=o,f=l.find(d=>d.default)||l[0];s.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:f?f.html:"",selector:l,async onSelect(d){await o.switchQuality(d.url),c.show=`${u.get("Switch Video")}: ${d.html}`}})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iPdgW:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{option:l,storage:s,template:{$video:c,$poster:u}}=o;for(const d in l.moreVideoAttr)o.attr(d,l.moreVideoAttr[d]);l.muted&&(o.muted=l.muted),l.volume&&(c.volume=(0,a.clamp)(l.volume,0,1));const f=s.get("volume");typeof f=="number"&&(c.volume=(0,a.clamp)(f,0,1)),l.poster&&(0,a.setStyle)(u,"backgroundImage",`url(${l.poster})`),l.autoplay&&(c.autoplay=l.autoplay),l.playsInline&&(c.playsInline=!0,c["webkit-playsinline"]=!0),l.theme&&(l.cssVar["--art-theme"]=l.theme);for(const d in l.cssVar)o.cssVar(d,l.cssVar[d]);o.url=l.url}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3mj0J":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../config"),l=a.interopDefault(o),s=r("../utils");i.default=function(c){const{i18n:u,notice:f,option:d,constructor:h,proxy:p,template:{$player:v,$video:g,$poster:m}}=c;let b=0;for(let x=0;x<l.default.events.length;x++)p(g,l.default.events[x],T=>{c.emit(`video:${T.type}`,T)});c.on("video:canplay",()=>{b=0,c.loading.show=!1}),c.once("video:canplay",()=>{c.loading.show=!1,c.controls.show=!0,c.mask.show=!0,c.isReady=!0,c.emit("ready")}),c.on("video:ended",()=>{d.loop?(c.seek=0,c.play(),c.controls.show=!1,c.mask.show=!1):(c.controls.show=!0,c.mask.show=!0)}),c.on("video:error",async x=>{b<h.RECONNECT_TIME_MAX?(await(0,s.sleep)(h.RECONNECT_SLEEP_TIME),b+=1,c.url=d.url,f.show=`${u.get("Reconnect")}: ${b}`,c.emit("error",x,b)):(c.mask.show=!0,c.loading.show=!1,c.controls.show=!0,(0,s.addClass)(v,"art-error"),await(0,s.sleep)(h.RECONNECT_SLEEP_TIME),f.show=u.get("Video Load Failed"))}),c.on("video:loadedmetadata",()=>{c.emit("resize"),s.isMobile&&(c.loading.show=!1,c.controls.show=!0,c.mask.show=!0)}),c.on("video:loadstart",()=>{c.loading.show=!0,c.mask.show=!1,c.controls.show=!0}),c.on("video:pause",()=>{c.controls.show=!0,c.mask.show=!0}),c.on("video:play",()=>{c.mask.show=!1,(0,s.setStyle)(m,"display","none")}),c.on("video:playing",()=>{c.mask.show=!1}),c.on("video:progress",()=>{c.playing&&(c.loading.show=!1)}),c.on("video:seeked",()=>{c.loading.show=!1,c.mask.show=!0}),c.on("video:seeking",()=>{c.loading.show=!0,c.mask.show=!1}),c.on("video:timeupdate",()=>{c.mask.show=!1}),c.on("video:waiting",()=>{c.loading.show=!0,c.mask.show=!1})}},{"../config":"9Xmqu","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"14IBq":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../utils"),l=r("../utils/component"),s=a.interopDefault(l),c=r("./fullscreen"),u=a.interopDefault(c),f=r("./fullscreenWeb"),d=a.interopDefault(f),h=r("./pip"),p=a.interopDefault(h),v=r("./playAndPause"),g=a.interopDefault(v),m=r("./progress"),b=a.interopDefault(m),x=r("./time"),T=a.interopDefault(x),A=r("./volume"),O=a.interopDefault(A),I=r("./setting"),_=a.interopDefault(I),k=r("./thumbnails"),L=a.interopDefault(k),P=r("./screenshot"),W=a.interopDefault(P),q=r("./airplay"),V=a.interopDefault(q);class G extends s.default{constructor(J){super(J),this.name="control",this.timer=Date.now();const{constructor:N}=J,{$player:Z}=this.art.template;J.on("mousemove",()=>{o.isMobile||(this.show=!0)}),J.on("click",()=>{o.isMobile?this.toggle():this.show=!0}),J.on("video:timeupdate",()=>{!J.isInput&&J.playing&&this.show&&Date.now()-this.timer>=N.CONTROL_HIDE_TIME&&(this.show=!1)}),J.on("control",le=>{le?((0,o.removeClass)(Z,"art-hide-cursor"),(0,o.addClass)(Z,"art-hover"),this.timer=Date.now()):((0,o.addClass)(Z,"art-hide-cursor"),(0,o.removeClass)(Z,"art-hover"))}),this.init()}init(){const{option:J}=this.art;J.isLive||this.add((0,b.default)({name:"progress",position:"top",index:10})),!J.thumbnails.url||J.isLive||o.isMobile||this.add((0,L.default)({name:"thumbnails",position:"top",index:20})),this.add((0,g.default)({name:"playAndPause",position:"left",index:10})),this.add((0,O.default)({name:"volume",position:"left",index:20})),J.isLive||this.add((0,T.default)({name:"time",position:"left",index:30})),J.quality.length&&(0,o.sleep)().then(()=>{this.art.quality=J.quality}),J.screenshot&&!o.isMobile&&this.add((0,W.default)({name:"screenshot",position:"right",index:20})),J.setting&&this.add((0,_.default)({name:"setting",position:"right",index:30})),J.pip&&this.add((0,p.default)({name:"pip",position:"right",index:40})),J.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,V.default)({name:"airplay",position:"right",index:50})),J.fullscreenWeb&&this.add((0,d.default)({name:"fullscreenWeb",position:"right",index:60})),J.fullscreen&&this.add((0,u.default)({name:"fullscreen",position:"right",index:70}));for(let N=0;N<J.controls.length;N++)this.add(J.controls[N])}add(J){const N=typeof J=="function"?J(this.art):J,{$progress:Z,$controlsLeft:le,$controlsRight:ye}=this.art.template;switch(N.position){case"top":this.$parent=Z;break;case"left":this.$parent=le;break;case"right":this.$parent=ye;break;default:(0,o.errorHandle)(!1,"Control option.position must one of 'top', 'left', 'right'")}super.add(N)}}i.default=G},{"../utils":"h3rH9","../utils/component":"guki8","./fullscreen":"cxHNK","./fullscreenWeb":"66eEC","./pip":"kCFkA","./playAndPause":"iRhgD","./progress":"aBBSH","./time":"7H0CE","./volume":"lMwFm","./setting":"8BrCu","./thumbnails":"2HiWx","./screenshot":"c1GeG","./airplay":"6GRju","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],guki8:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./dom"),l=r("./format"),s=r("./error"),c=r("option-validator"),u=a.interopDefault(c),f=r("../scheme");i.default=class{constructor(d){this.id=0,this.art=d,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return(0,o.hasClass)(this.art.template.$player,`art-${this.name}-show`)}set show(d){const{$player:h}=this.art.template,p=`art-${this.name}-show`;d?(0,o.addClass)(h,p):(0,o.removeClass)(h,p),this.art.emit(this.name,d)}toggle(){this.show=!this.show}add(d){const h=typeof d=="function"?d(this.art):d;if(h.html=h.html||"",(0,u.default)(h,f.ComponentOption),!this.$parent||!this.name||h.disable)return;const p=h.name||`${this.name}${this.id}`,v=this.cache.get(p);(0,s.errorHandle)(!v,`Can't add an existing [${p}] to the [${this.name}]`),this.id+=1;const g=(0,o.createElement)("div");(0,o.addClass)(g,`art-${this.name}`),(0,o.addClass)(g,`art-${this.name}-${p}`);const m=Array.from(this.$parent.children);g.dataset.index=h.index||this.id;const b=m.find(T=>Number(T.dataset.index)>=Number(g.dataset.index));b?b.insertAdjacentElement("beforebegin",g):(0,o.append)(this.$parent,g),h.html&&(0,o.append)(g,h.html),h.style&&(0,o.setStyles)(g,h.style),h.tooltip&&(0,o.tooltip)(g,h.tooltip);const x=[];if(h.click){const T=this.art.events.proxy(g,"click",A=>{A.preventDefault(),h.click.call(this.art,this,A)});x.push(T)}return h.selector&&["left","right"].includes(h.position)&&this.addSelector(h,g,x),this[p]=g,this.cache.set(p,{$ref:g,events:x,option:h}),h.mounted&&h.mounted.call(this.art,g),g}addSelector(d,h,p){const{hover:v,proxy:g}=this.art.events;(0,o.addClass)(h,"art-control-selector");const m=(0,o.createElement)("div");(0,o.addClass)(m,"art-selector-value"),(0,o.append)(m,d.html),h.innerText="",(0,o.append)(h,m);const b=d.selector.map((O,I)=>`<div class="art-selector-item ${O.default?"art-current":""}" data-index="${I}">${O.html}</div>`).join(""),x=(0,o.createElement)("div");(0,o.addClass)(x,"art-selector-list"),(0,o.append)(x,b),(0,o.append)(h,x);const T=()=>{const O=(0,o.getStyle)(h,"width")/2-(0,o.getStyle)(x,"width")/2;x.style.left=`${O}px`};v(h,T);const A=g(x,"click",async O=>{const I=(O.composedPath()||[]).find(L=>(0,o.hasClass)(L,"art-selector-item"));if(!I)return;(0,o.inverseClass)(I,"art-current");const _=Number(I.dataset.index),k=d.selector[_]||{};if(m.innerText=I.innerText,d.onSelect){const L=await d.onSelect.call(this.art,k,I,O);(0,l.isStringOrNumber)(L)&&(m.innerHTML=L)}T()});p.push(A)}remove(d){const h=this.cache.get(d);(0,s.errorHandle)(h,`Can't find [${d}] from the [${this.name}]`),h.option.beforeUnmount&&h.option.beforeUnmount.call(this.art,h.$ref);for(let p=0;p<h.events.length;p++)this.art.events.remove(h.events[p]);this.cache.delete(d),delete this[d],(0,o.remove)(h.$ref)}update(d){const h=this.cache.get(d.name);return h&&(d=Object.assign(h.option,d),this.remove(d.name)),this.add(d)}}},{"./dom":"XgAQE","./format":"13atT","./error":"2nFlF","option-validator":"bAWi2","../scheme":"AdvwB","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],cxHNK:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,tooltip:l.i18n.get("Fullscreen"),mounted:s=>{const{proxy:c,icons:u,i18n:f}=l,d=(0,a.append)(s,u.fullscreenOn),h=(0,a.append)(s,u.fullscreenOff);(0,a.setStyle)(h,"display","none"),c(s,"click",()=>{l.fullscreen=!l.fullscreen}),l.on("fullscreen",p=>{p?((0,a.tooltip)(s,f.get("Exit Fullscreen")),(0,a.setStyle)(d,"display","none"),(0,a.setStyle)(h,"display","inline-flex")):((0,a.tooltip)(s,f.get("Fullscreen")),(0,a.setStyle)(d,"display","inline-flex"),(0,a.setStyle)(h,"display","none"))})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"66eEC":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,tooltip:l.i18n.get("Web Fullscreen"),mounted:s=>{const{proxy:c,icons:u,i18n:f}=l,d=(0,a.append)(s,u.fullscreenWebOn),h=(0,a.append)(s,u.fullscreenWebOff);(0,a.setStyle)(h,"display","none"),c(s,"click",()=>{l.fullscreenWeb=!l.fullscreenWeb}),l.on("fullscreenWeb",p=>{p?((0,a.tooltip)(s,f.get("Exit Web Fullscreen")),(0,a.setStyle)(d,"display","none"),(0,a.setStyle)(h,"display","inline-flex")):((0,a.tooltip)(s,f.get("Web Fullscreen")),(0,a.setStyle)(d,"display","inline-flex"),(0,a.setStyle)(h,"display","none"))})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kCFkA:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,tooltip:l.i18n.get("PIP Mode"),mounted:s=>{const{proxy:c,icons:u,i18n:f}=l;(0,a.append)(s,u.pip),c(s,"click",()=>{l.pip=!l.pip}),l.on("pip",d=>{(0,a.tooltip)(s,f.get(d?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iRhgD:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,mounted:s=>{const{proxy:c,icons:u,i18n:f}=l,d=(0,a.append)(s,u.play),h=(0,a.append)(s,u.pause);function p(){(0,a.setStyle)(d,"display","flex"),(0,a.setStyle)(h,"display","none")}function v(){(0,a.setStyle)(d,"display","none"),(0,a.setStyle)(h,"display","flex")}(0,a.tooltip)(d,f.get("Play")),(0,a.tooltip)(h,f.get("Pause")),c(d,"click",()=>{l.play()}),c(h,"click",()=>{l.pause()}),l.playing?v():p(),l.on("video:playing",()=>{v()}),l.on("video:pause",()=>{p()})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],aBBSH:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"getPosFromEvent",()=>l),a.export(i,"setCurrentTime",()=>s);var o=r("../utils");function l(c,u){const{$progress:f}=c.template,{left:d}=f.getBoundingClientRect(),h=o.isMobile?u.touches[0].clientX:u.clientX,p=(0,o.clamp)(h-d,0,f.clientWidth),v=p/f.clientWidth*c.duration;return{second:v,time:(0,o.secondToTime)(v),width:p,percentage:(0,o.clamp)(p/f.clientWidth,0,1)}}function s(c,u){if(c.isRotate){const f=u.touches[0].clientY/c.height,d=f*c.duration;c.emit("setBar","played",f),c.seek=d}else{const{second:f,percentage:d}=l(c,u);c.emit("setBar","played",d),c.seek=f}}i.default=function(c){return u=>{const{icons:f,option:d,proxy:h}=u;return{...c,html:'<div class="art-control-progress-inner"><div class="art-progress-hover"></div><div class="art-progress-loaded"></div><div class="art-progress-played"></div><div class="art-progress-highlight"></div><div class="art-progress-indicator"></div><div class="art-progress-tip"></div></div>',mounted:p=>{let v=!1;const g=(0,o.query)(".art-progress-hover",p),m=(0,o.query)(".art-progress-loaded",p),b=(0,o.query)(".art-progress-played",p),x=(0,o.query)(".art-progress-highlight",p),T=(0,o.query)(".art-progress-indicator",p),A=(0,o.query)(".art-progress-tip",p);function O(I,_){I==="loaded"&&(0,o.setStyle)(m,"width",100*_+"%"),I==="played"&&((0,o.setStyle)(b,"width",100*_+"%"),(0,o.setStyle)(T,"left",100*_+"%"))}f.indicator?(0,o.append)(T,f.indicator):(0,o.setStyle)(T,"backgroundColor","var(--art-theme)"),u.on("video:loadedmetadata",()=>{for(let I=0;I<d.highlight.length;I++){const _=d.highlight[I],k=(0,o.clamp)(_.time,0,u.duration)/u.duration*100,L=`<span data-text="${_.text}" data-time="${_.time}" style="left: ${k}%"></span>`;(0,o.append)(x,L)}}),O("loaded",u.loaded),u.on("setBar",(I,_)=>{O(I,_)}),u.on("video:progress",()=>{O("loaded",u.loaded)}),u.constructor.USE_RAF?u.on("raf",()=>{O("played",u.played)}):u.on("video:timeupdate",()=>{O("played",u.played)}),u.on("video:ended",()=>{O("played",1)}),o.isMobile||(h(p,"click",I=>{I.target!==T&&s(u,I)}),h(p,"mousemove",I=>{(function(_){const{width:k}=l(u,_);(0,o.setStyle)(g,"width",`${k}px`),(0,o.setStyle)(g,"display","flex")})(I),(0,o.setStyle)(A,"display","flex"),(0,o.includeFromEvent)(I,x)?function(_){const{width:k}=l(u,_),{text:L}=_.target.dataset;A.innerHTML=L;const P=A.clientWidth;k<=P/2?(0,o.setStyle)(A,"left",0):k>p.clientWidth-P/2?(0,o.setStyle)(A,"left",p.clientWidth-P+"px"):(0,o.setStyle)(A,"left",k-P/2+"px")}(I):function(_){const{width:k,time:L}=l(u,_);A.innerHTML=L;const P=A.clientWidth;k<=P/2?(0,o.setStyle)(A,"left",0):k>p.clientWidth-P/2?(0,o.setStyle)(A,"left",p.clientWidth-P+"px"):(0,o.setStyle)(A,"left",k-P/2+"px")}(I)}),h(p,"mouseleave",()=>{(0,o.setStyle)(A,"display","none"),(0,o.setStyle)(g,"display","none")}),h(p,"mousedown",I=>{v=I.button===0}),u.on("document:mousemove",I=>{if(v){const{second:_,percentage:k}=l(u,I);O("played",k),u.seek=_}}),u.on("document:mouseup",()=>{v&&(v=!1)}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7H0CE":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,style:a.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:s=>{function c(){const f=`${(0,a.secondToTime)(l.currentTime)} / ${(0,a.secondToTime)(l.duration)}`;f!==s.innerText&&(s.innerText=f)}c();const u=["video:loadedmetadata","video:timeupdate","video:progress"];for(let f=0;f<u.length;f++)l.on(u[f],c)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lMwFm:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,mounted:s=>{const{proxy:c,icons:u}=l,f=(0,a.append)(s,u.volume),d=(0,a.append)(s,u.volumeClose),h=(0,a.append)(s,'<div class="art-volume-panel"></div>'),p=(0,a.append)(h,'<div class="art-volume-inner"></div>'),v=(0,a.append)(p,'<div class="art-volume-val"></div>'),g=(0,a.append)(p,'<div class="art-volume-slider"></div>'),m=(0,a.append)(g,'<div class="art-volume-handle"></div>'),b=(0,a.append)(m,'<div class="art-volume-loaded"></div>'),x=(0,a.append)(g,'<div class="art-volume-indicator"></div>');function T(O){const{top:I,height:_}=g.getBoundingClientRect();return 1-(O.clientY-I)/_}function A(){if(l.muted||l.volume===0)(0,a.setStyle)(f,"display","none"),(0,a.setStyle)(d,"display","flex"),(0,a.setStyle)(x,"top","100%"),(0,a.setStyle)(b,"top","100%"),v.innerText=0;else{const O=100*l.volume;(0,a.setStyle)(f,"display","flex"),(0,a.setStyle)(d,"display","none"),(0,a.setStyle)(x,"top",100-O+"%"),(0,a.setStyle)(b,"top",100-O+"%"),v.innerText=Math.floor(O)}}if(A(),l.on("video:volumechange",A),c(f,"click",()=>{l.muted=!0}),c(d,"click",()=>{l.muted=!1}),a.isMobile)(0,a.setStyle)(h,"display","none");else{let O=!1;c(g,"mousedown",I=>{O=I.button===0,l.volume=T(I)}),l.on("document:mousemove",I=>{O&&(l.muted=!1,l.volume=T(I))}),l.on("document:mouseup",()=>{O&&(O=!1)})}}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8BrCu":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,tooltip:l.i18n.get("Show Setting"),mounted:s=>{const{proxy:c,icons:u,i18n:f}=l;(0,a.append)(s,u.setting),c(s,"click",()=>{l.setting.toggle(),l.setting.updateStyle()}),l.on("setting",d=>{(0,a.tooltip)(s,f.get(d?"Hide Setting":"Show Setting"))})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2HiWx":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils"),o=r("./progress");i.default=function(l){return s=>({...l,mounted:c=>{const{option:u,template:{$progress:f,$video:d},events:{proxy:h,loadImg:p}}=s;let v=null,g=!1,m=!1;h(f,"mousemove",async b=>{g||(g=!0,v=await p(u.thumbnails.url),m=!0),m&&((0,a.setStyle)(c,"display","flex"),function(x){const{width:T}=(0,o.getPosFromEvent)(s,x),{url:A,number:O,column:I,width:_,height:k}=u.thumbnails,L=_||v.naturalWidth/I,P=k||L/(d.videoWidth/d.videoHeight),W=f.clientWidth/O,q=Math.floor(T/W),V=Math.ceil(q/I)-1,G=q%I||I-1;(0,a.setStyle)(c,"backgroundImage",`url(${A})`),(0,a.setStyle)(c,"height",`${P}px`),(0,a.setStyle)(c,"width",`${L}px`),(0,a.setStyle)(c,"backgroundPosition",`-${G*L}px -${V*P}px`),T<=L/2?(0,a.setStyle)(c,"left",0):T>f.clientWidth-L/2?(0,a.setStyle)(c,"left",f.clientWidth-L+"px"):(0,a.setStyle)(c,"left",T-L/2+"px")}(b))}),h(f,"mouseleave",()=>{(0,a.setStyle)(c,"display","none")}),s.on("hover",b=>{b||(0,a.setStyle)(c,"display","none")})}})}},{"../utils":"h3rH9","./progress":"aBBSH","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],c1GeG:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,tooltip:l.i18n.get("Screenshot"),mounted:s=>{const{proxy:c,icons:u}=l;(0,a.append)(s,u.screenshot),c(s,"click",()=>{l.screenshot()})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6GRju":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>({...o,tooltip:l.i18n.get("AirPlay"),mounted:s=>{const{proxy:c,icons:u}=l;(0,a.append)(s,u.airplay),c(s,"click",()=>l.airplay())}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7iUum":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../utils"),l=r("../utils/component"),s=a.interopDefault(l),c=r("./playbackRate"),u=a.interopDefault(c),f=r("./aspectRatio"),d=a.interopDefault(f),h=r("./flip"),p=a.interopDefault(h),v=r("./info"),g=a.interopDefault(v),m=r("./version"),b=a.interopDefault(m),x=r("./close"),T=a.interopDefault(x);class A extends s.default{constructor(I){super(I),this.name="contextmenu",this.$parent=I.template.$contextmenu,o.isMobile||this.init()}init(){const{option:I,proxy:_,template:{$player:k,$contextmenu:L}}=this.art;I.playbackRate&&this.add((0,u.default)({name:"playbackRate",index:10})),I.aspectRatio&&this.add((0,d.default)({name:"aspectRatio",index:20})),I.flip&&this.add((0,p.default)({name:"flip",index:30})),this.add((0,g.default)({name:"info",index:40})),this.add((0,b.default)({name:"version",index:50})),this.add((0,T.default)({name:"close",index:60}));for(let P=0;P<I.contextmenu.length;P++)this.add(I.contextmenu[P]);_(k,"contextmenu",P=>{if(P.preventDefault(),!this.art.constructor.CONTEXTMENU)return;this.show=!0;const W=P.clientX,q=P.clientY,{height:V,width:G,left:pe,top:J}=k.getBoundingClientRect(),{height:N,width:Z}=L.getBoundingClientRect();let le=W-pe,ye=q-J;W+Z>pe+G&&(le=G-Z),q+N>J+V&&(ye=V-N),(0,o.setStyles)(L,{top:`${ye}px`,left:`${le}px`})}),_(k,"click",P=>{(0,o.includeFromEvent)(P,L)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}i.default=A},{"../utils":"h3rH9","../utils/component":"guki8","./playbackRate":"f1W36","./aspectRatio":"afxZC","./flip":"9jCuX","./info":"k8wIZ","./version":"bb0TU","./close":"9zTkI","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f1W36:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>{const{i18n:s,constructor:{PLAYBACK_RATE:c}}=l,u=c.map(f=>`<span data-value="${f}">${f===1?s.get("Normal"):f.toFixed(1)}</span>`).join("");return{...o,html:`${s.get("Play Speed")}: ${u}`,click:(f,d)=>{const{value:h}=d.target.dataset;h&&(l.playbackRate=Number(h),f.show=!1)},mounted:f=>{const d=(0,a.query)('[data-value="1"]',f);d&&(0,a.inverseClass)(d,"art-current"),l.on("video:ratechange",()=>{const h=(0,a.queryAll)("span",f).find(p=>Number(p.dataset.value)===l.playbackRate);h&&(0,a.inverseClass)(h,"art-current")})}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],afxZC:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>{const{i18n:s,constructor:{ASPECT_RATIO:c}}=l,u=c.map(f=>`<span data-value="${f}">${f==="default"?s.get("Default"):f}</span>`).join("");return{...o,html:`${s.get("Aspect Ratio")}: ${u}`,click:(f,d)=>{const{value:h}=d.target.dataset;h&&(l.aspectRatio=h,f.show=!1)},mounted:f=>{const d=(0,a.query)('[data-value="default"]',f);d&&(0,a.inverseClass)(d,"art-current"),l.on("aspectRatio",h=>{const p=(0,a.queryAll)("span",f).find(v=>v.dataset.value===h);p&&(0,a.inverseClass)(p,"art-current")})}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9jCuX":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return l=>{const{i18n:s,constructor:{FLIP:c}}=l,u=c.map(f=>`<span data-value="${f}">${s.get((0,a.capitalize)(f))}</span>`).join("");return{...o,html:`${s.get("Video Flip")}: ${u}`,click:(f,d)=>{const{value:h}=d.target.dataset;h&&(l.flip=h.toLowerCase(),f.show=!1)},mounted:f=>{const d=(0,a.query)('[data-value="normal"]',f);d&&(0,a.inverseClass)(d,"art-current"),l.on("flip",h=>{const p=(0,a.queryAll)("span",f).find(v=>v.dataset.value===h);p&&(0,a.inverseClass)(p,"art-current")})}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],k8wIZ:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a){return o=>({...a,html:o.i18n.get("Video Info"),click:l=>{o.info.show=!0,l.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],bb0TU:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a){return{...a,html:'<a href="https://artplayer.org" target="_blank">ArtPlayer 5.1.0</a>'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9zTkI":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a){return o=>({...a,html:o.i18n.get("Close"),click:l=>{l.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hD2Lg:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./utils"),l=r("./utils/component"),s=a.interopDefault(l);class c extends s.default{constructor(f){super(f),this.name="info",o.isMobile||this.init()}init(){const{proxy:f,constructor:d,template:{$infoPanel:h,$infoClose:p,$video:v}}=this.art;f(p,"click",()=>{this.show=!1});let g=null;const m=(0,o.queryAll)("[data-video]",h)||[];this.art.on("destroy",()=>clearTimeout(g)),function b(){for(let x=0;x<m.length;x++){const T=m[x],A=v[T.dataset.video],O=typeof A=="number"?A.toFixed(2):A;T.innerText!==O&&(T.innerText=O)}g=setTimeout(b,d.INFO_LOOP_TIME)}()}}i.default=c},{"./utils":"h3rH9","./utils/component":"guki8","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lum0D:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./utils"),l=r("./utils/component"),s=a.interopDefault(l),c=r("option-validator"),u=a.interopDefault(c),f=r("./scheme"),d=a.interopDefault(f);class h extends s.default{constructor(v){super(v),this.name="subtitle",this.eventDestroy=()=>null,this.init(v.option.subtitle);let g=!1;v.on("video:timeupdate",()=>{if(!this.url)return;const m=this.art.template.$video.webkitDisplayingFullscreen;typeof m=="boolean"&&m!==g&&(g=m,this.createTrack(m?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(v){this.switch(v)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(v,g){const{$subtitle:m}=this.art.template;return typeof v=="object"?(0,o.setStyles)(m,v):(0,o.setStyle)(m,v,g)}update(){const{$subtitle:v}=this.art.template;v.innerHTML="",this.activeCue&&(this.art.option.subtitle.escape?v.innerHTML=this.activeCue.text.split(/\r?\n/).map(g=>`<div class="art-subtitle-line">${(0,o.escape)(g)}</div>`).join(""):v.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(v,g={}){const{i18n:m,notice:b,option:x}=this.art,T={...x.subtitle,...g,url:v},A=await this.init(T);return g.name&&(b.show=`${m.get("Switch Subtitle")}: ${g.name}`),A}createTrack(v,g){const{template:m,proxy:b,option:x}=this.art,{$video:T,$track:A}=m,O=(0,o.createElement)("track");O.default=!0,O.kind=v,O.src=g,O.label=x.subtitle.name||"Artplayer",O.track.mode="hidden",this.eventDestroy(),(0,o.remove)(A),(0,o.append)(T,O),m.$track=O,this.eventDestroy=b(this.textTrack,"cuechange",()=>this.update())}async init(v){const{notice:g,template:{$subtitle:m}}=this.art;if((0,u.default)(v,d.default.subtitle),v.url)return this.style(v.style),fetch(v.url).then(b=>b.arrayBuffer()).then(b=>{const x=new TextDecoder(v.encoding).decode(b);switch(this.art.emit("subtitleLoad",v.url),v.type||(0,o.getExt)(v.url)){case"srt":{const T=(0,o.srtToVtt)(x),A=v.onVttLoad(T);return(0,o.vttToBlob)(A)}case"ass":{const T=(0,o.assToVtt)(x),A=v.onVttLoad(T);return(0,o.vttToBlob)(A)}case"vtt":{const T=v.onVttLoad(x);return(0,o.vttToBlob)(T)}default:return v.url}}).then(b=>(m.innerHTML="",this.url===b||(URL.revokeObjectURL(this.url),this.createTrack("metadata",b),this.art.emit("subtitleSwitch",b)),b)).catch(b=>{throw m.innerHTML="",g.show=b,b})}}i.default=h},{"./utils":"h3rH9","./utils/component":"guki8","option-validator":"bAWi2","./scheme":"AdvwB","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1Epl5":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../utils/error"),l=r("./clickInit"),s=a.interopDefault(l),c=r("./hoverInit"),u=a.interopDefault(c),f=r("./moveInit"),d=a.interopDefault(f),h=r("./resizeInit"),p=a.interopDefault(h),v=r("./gestureInit"),g=a.interopDefault(v),m=r("./viewInit"),b=a.interopDefault(m),x=r("./documentInit"),T=a.interopDefault(x),A=r("./updateInit"),O=a.interopDefault(A);i.default=class{constructor(I){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,s.default)(I,this),(0,u.default)(I,this),(0,d.default)(I,this),(0,p.default)(I,this),(0,g.default)(I,this),(0,b.default)(I,this),(0,T.default)(I,this),(0,O.default)(I,this)}proxy(I,_,k,L={}){if(Array.isArray(_))return _.map(W=>this.proxy(I,W,k,L));I.addEventListener(_,k,L);const P=()=>I.removeEventListener(_,k,L);return this.destroyEvents.push(P),P}hover(I,_,k){_&&this.proxy(I,"mouseenter",_),k&&this.proxy(I,"mouseleave",k)}loadImg(I){return new Promise((_,k)=>{let L;if(I instanceof HTMLImageElement)L=I;else{if(typeof I!="string")return k(new o.ArtPlayerError("Unable to get Image"));L=new Image,L.src=I}if(L.complete)return _(L);this.proxy(L,"load",()=>_(L)),this.proxy(L,"error",()=>k(new o.ArtPlayerError(`Failed to load Image: ${L.src}`)))})}remove(I){const _=this.destroyEvents.indexOf(I);_>-1&&(I(),this.destroyEvents.splice(_,1))}destroy(){for(let I=0;I<this.destroyEvents.length;I++)this.destroyEvents[I]()}}},{"../utils/error":"2nFlF","./clickInit":"gzL6e","./hoverInit":"kpTJf","./moveInit":"ef6qz","./resizeInit":"9TXOX","./gestureInit":"dePMU","./viewInit":"hDyWF","./documentInit":"7RjDP","./updateInit":"8SmBT","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],gzL6e:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o,l){const{constructor:s,template:{$player:c,$video:u}}=o;l.proxy(document,["click","contextmenu"],d=>{(0,a.includeFromEvent)(d,c)?(o.isInput=d.target.tagName==="INPUT",o.isFocus=!0,o.emit("focus",d)):(o.isInput=!1,o.isFocus=!1,o.emit("blur",d))});let f=0;l.proxy(u,"click",d=>{const h=Date.now(),{MOBILE_CLICK_PLAY:p,DBCLICK_TIME:v,MOBILE_DBCLICK_PLAY:g,DBCLICK_FULLSCREEN:m}=s;h-f<=v?(o.emit("dblclick",d),a.isMobile?!o.isLock&&g&&o.toggle():m&&(o.fullscreen=!o.fullscreen)):(o.emit("click",d),a.isMobile?!o.isLock&&p&&o.toggle():o.toggle()),f=h})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kpTJf:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o,l){const{$player:s}=o.template;l.hover(s,c=>{(0,a.addClass)(s,"art-hover"),o.emit("hover",!0,c)},c=>{(0,a.removeClass)(s,"art-hover"),o.emit("hover",!1,c)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],ef6qz:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a,o){const{$player:l}=a.template;o.proxy(l,"mousemove",s=>{a.emit("mousemove",s)})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9TXOX":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o,l){const{option:s,constructor:c}=o;o.on("resize",()=>{const{aspectRatio:f,notice:d}=o;o.state==="standard"&&s.autoSize&&o.autoSize(),o.aspectRatio=f,d.show=""});const u=(0,a.debounce)(()=>o.emit("resize"),c.RESIZE_TIME);l.proxy(window,["orientationchange","resize"],()=>u()),screen&&screen.orientation&&screen.orientation.onchange&&l.proxy(screen.orientation,"change",()=>u())}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dePMU:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils"),o=r("../control/progress");function l(s,c,u,f){var d=c-f,h=u-s,p=0;if(Math.abs(h)<2&&Math.abs(d)<2)return p;var v=function(g,m){return 180*Math.atan2(m,g)/Math.PI}(h,d);return v>=-45&&v<45?p=4:v>=45&&v<135?p=1:v>=-135&&v<-45?p=2:(v>=135&&v<=180||v>=-180&&v<-135)&&(p=3),p}i.default=function(s,c){if(a.isMobile&&!s.option.isLive){const{$video:u,$progress:f}=s.template;let d=null,h=!1,p=0,v=0,g=0;const m=T=>{if(T.touches.length===1&&!s.isLock){d===f&&(0,o.setCurrentTime)(s,T),h=!0;const{pageX:A,pageY:O}=T.touches[0];p=A,v=O,g=s.currentTime}},b=T=>{if(T.touches.length===1&&h&&s.duration){const{pageX:A,pageY:O}=T.touches[0],I=l(p,v,A,O),_=[3,4].includes(I),k=[1,2].includes(I);if(_&&!s.isRotate||k&&s.isRotate){const L=(0,a.clamp)((A-p)/s.width,-1,1),P=(0,a.clamp)((O-v)/s.height,-1,1),W=s.isRotate?P:L,q=d===u?s.constructor.TOUCH_MOVE_RATIO:1,V=(0,a.clamp)(g+s.duration*W*q,0,s.duration);s.seek=V,s.emit("setBar","played",(0,a.clamp)(V/s.duration,0,1)),s.notice.show=`${(0,a.secondToTime)(V)} / ${(0,a.secondToTime)(s.duration)}`}}},x=()=>{h&&(p=0,v=0,g=0,h=!1,d=null)};c.proxy(f,"touchstart",T=>{d=f,m(T)}),c.proxy(u,"touchstart",T=>{d=u,m(T)}),c.proxy(u,"touchmove",b),c.proxy(f,"touchmove",b),c.proxy(document,"touchend",x)}}},{"../utils":"h3rH9","../control/progress":"aBBSH","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hDyWF:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o,l){const{option:s,constructor:c,template:{$container:u}}=o,f=(0,a.throttle)(()=>{o.emit("view",(0,a.isInViewport)(u,c.SCROLL_GAP))},c.SCROLL_TIME);l.proxy(window,"scroll",()=>f()),o.on("view",d=>{s.autoMini&&(o.mini=!d)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7RjDP":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a,o){o.proxy(document,"mousemove",l=>{a.emit("document:mousemove",l)}),o.proxy(document,"mouseup",l=>{a.emit("document:mouseup",l)})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8SmBT":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a){if(a.constructor.USE_RAF){let o=null;(function l(){a.playing&&a.emit("raf"),a.isDestroy||(o=requestAnimationFrame(l))})(),a.on("destroy",()=>{cancelAnimationFrame(o)})}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],eTow4:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("./utils");i.default=class{constructor(o){this.art=o,this.keys={},o.option.hotkey&&!a.isMobile&&this.init()}init(){const{proxy:o,constructor:l}=this.art;this.add(27,()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add(32,()=>{this.art.toggle()}),this.add(37,()=>{this.art.backward=l.SEEK_STEP}),this.add(38,()=>{this.art.volume+=l.VOLUME_STEP}),this.add(39,()=>{this.art.forward=l.SEEK_STEP}),this.add(40,()=>{this.art.volume-=l.VOLUME_STEP}),o(window,"keydown",s=>{if(this.art.isFocus){const c=document.activeElement.tagName.toUpperCase(),u=document.activeElement.getAttribute("contenteditable");if(!(c==="INPUT"||c==="TEXTAREA"||u===""||u==="true"||s.altKey||s.ctrlKey||s.metaKey||s.shiftKey)){const f=this.keys[s.keyCode];if(f){s.preventDefault();for(let d=0;d<f.length;d++)f[d].call(this.art,s);this.art.emit("hotkey",s)}}}})}add(o,l){return this.keys[o]?this.keys[o].push(l):this.keys[o]=[l],this}remove(o,l){if(this.keys[o]){const s=this.keys[o].indexOf(l);s!==-1&&this.keys[o].splice(s,1)}return this}}},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"4fDoD":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./utils/component"),l=a.interopDefault(o);class s extends l.default{constructor(u){super(u);const{option:f,template:{$layer:d}}=u;this.name="layer",this.$parent=d;for(let h=0;h<f.layers.length;h++)this.add(f.layers[h])}}i.default=s},{"./utils/component":"guki8","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fE0Sp:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./utils"),l=r("./utils/component"),s=a.interopDefault(l);class c extends s.default{constructor(f){super(f),this.name="loading",(0,o.append)(f.template.$loading,f.icons.loading)}}i.default=c},{"./utils":"h3rH9","./utils/component":"guki8","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9PuGy":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("./utils");i.default=class{constructor(o){this.art=o,this.timer=null}set show(o){const{constructor:l,template:{$player:s,$noticeInner:c}}=this.art;o?(c.innerText=o instanceof Error?o.message.trim():o,(0,a.addClass)(s,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{c.innerText="",(0,a.removeClass)(s,"art-notice-show")},l.NOTICE_TIME)):(0,a.removeClass)(s,"art-notice-show")}}},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2etr0":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./utils"),l=r("./utils/component"),s=a.interopDefault(l);class c extends s.default{constructor(f){super(f),this.name="mask";const{template:d,icons:h,events:p}=f,v=(0,o.append)(d.$state,h.state),g=(0,o.append)(d.$state,h.error);(0,o.setStyle)(g,"display","none"),f.on("destroy",()=>{(0,o.setStyle)(v,"display","none"),(0,o.setStyle)(g,"display",null)}),p.proxy(d.$state,"click",()=>f.play())}}i.default=c},{"./utils":"h3rH9","./utils/component":"guki8","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6dYSr":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../utils"),l=r("bundle-text:./loading.svg"),s=a.interopDefault(l),c=r("bundle-text:./state.svg"),u=a.interopDefault(c),f=r("bundle-text:./check.svg"),d=a.interopDefault(f),h=r("bundle-text:./play.svg"),p=a.interopDefault(h),v=r("bundle-text:./pause.svg"),g=a.interopDefault(v),m=r("bundle-text:./volume.svg"),b=a.interopDefault(m),x=r("bundle-text:./volume-close.svg"),T=a.interopDefault(x),A=r("bundle-text:./screenshot.svg"),O=a.interopDefault(A),I=r("bundle-text:./setting.svg"),_=a.interopDefault(I),k=r("bundle-text:./arrow-left.svg"),L=a.interopDefault(k),P=r("bundle-text:./arrow-right.svg"),W=a.interopDefault(P),q=r("bundle-text:./playback-rate.svg"),V=a.interopDefault(q),G=r("bundle-text:./aspect-ratio.svg"),pe=a.interopDefault(G),J=r("bundle-text:./config.svg"),N=a.interopDefault(J),Z=r("bundle-text:./pip.svg"),le=a.interopDefault(Z),ye=r("bundle-text:./lock.svg"),me=a.interopDefault(ye),Re=r("bundle-text:./unlock.svg"),be=a.interopDefault(Re),Ce=r("bundle-text:./fullscreen-off.svg"),we=a.interopDefault(Ce),ce=r("bundle-text:./fullscreen-on.svg"),re=a.interopDefault(ce),ve=r("bundle-text:./fullscreen-web-off.svg"),Te=a.interopDefault(ve),Pe=r("bundle-text:./fullscreen-web-on.svg"),B=a.interopDefault(Pe),w=r("bundle-text:./switch-on.svg"),C=a.interopDefault(w),j=r("bundle-text:./switch-off.svg"),ie=a.interopDefault(j),ne=r("bundle-text:./flip.svg"),X=a.interopDefault(ne),ee=r("bundle-text:./error.svg"),de=a.interopDefault(ee),oe=r("bundle-text:./close.svg"),te=a.interopDefault(oe),he=r("bundle-text:./airplay.svg"),ke=a.interopDefault(he);i.default=class{constructor(se){const ue={loading:s.default,state:u.default,play:p.default,pause:g.default,check:d.default,volume:b.default,volumeClose:T.default,screenshot:O.default,setting:_.default,pip:le.default,arrowLeft:L.default,arrowRight:W.default,playbackRate:V.default,aspectRatio:pe.default,config:N.default,lock:me.default,flip:X.default,unlock:be.default,fullscreenOff:we.default,fullscreenOn:re.default,fullscreenWebOff:Te.default,fullscreenWebOn:B.default,switchOn:C.default,switchOff:ie.default,error:de.default,close:te.default,airplay:ke.default,...se.option.icons};for(const xe in ue)(0,o.def)(this,xe,{get:()=>(0,o.getIcon)(xe,ue[xe])})}}},{"../utils":"h3rH9","bundle-text:./loading.svg":"fY5Gt","bundle-text:./state.svg":"iNfLt","bundle-text:./check.svg":"jtE9u","bundle-text:./play.svg":"elgfY","bundle-text:./pause.svg":"eKokJ","bundle-text:./volume.svg":"hNB4y","bundle-text:./volume-close.svg":"i9vta","bundle-text:./screenshot.svg":"kB3Mf","bundle-text:./setting.svg":"3MONs","bundle-text:./arrow-left.svg":"iMCpk","bundle-text:./arrow-right.svg":"3oe4L","bundle-text:./playback-rate.svg":"liE22","bundle-text:./aspect-ratio.svg":"8HqYc","bundle-text:./config.svg":"hYAAH","bundle-text:./pip.svg":"jmNrH","bundle-text:./lock.svg":"cIqko","bundle-text:./unlock.svg":"65zy4","bundle-text:./fullscreen-off.svg":"jaJRT","bundle-text:./fullscreen-on.svg":"cRY1X","bundle-text:./fullscreen-web-off.svg":"3aVGL","bundle-text:./fullscreen-web-on.svg":"4DiVn","bundle-text:./switch-on.svg":"kwdKE","bundle-text:./switch-off.svg":"bWfXZ","bundle-text:./flip.svg":"h3zZ9","bundle-text:./error.svg":"7Oyth","bundle-text:./close.svg":"U5Jcy","bundle-text:./airplay.svg":"jK5Fx","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fY5Gt:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default"><path fill="none" class="bk" d="M0 0h100v100H0z"/><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-1s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(30 105.98 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(60 75.98 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(90 65 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.75s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(120 58.66 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(150 54.02 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(180 50 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(-150 45.98 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(-120 41.34 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(-90 35 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.25s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(-60 24.02 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#fff" transform="rotate(-30 -5.98 65)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"/></rect></svg>'},{}],iNfLt:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24"><path fill="#fff" d="M9.5 9.325v5.35q0 .575.525.875t1.025-.05l4.15-2.65q.475-.3.475-.85t-.475-.85L11.05 8.5q-.5-.35-1.025-.05t-.525.875ZM12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Z"/></svg>'},{}],jtE9u:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="width:100%;height:100%"><path d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" fill="#fff"/></svg>'},{}],elgfY:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><path d="M17.982 9.275 8.06 3.27A2.013 2.013 0 0 0 5 4.994v12.011a2.017 2.017 0 0 0 3.06 1.725l9.922-6.005a2.017 2.017 0 0 0 0-3.45z"/></svg>'},{}],eKokJ:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><path d="M7 3a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2zm8 0a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2z"/></svg>'},{}],hNB4y:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><path d="M10.188 4.65 6 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39V5.04a.498.498 0 0 0-.812-.39zm4.258-.872a1 1 0 0 0-.862 1.804 6.002 6.002 0 0 1-.007 10.838 1 1 0 0 0 .86 1.806A8.001 8.001 0 0 0 19 11a8.001 8.001 0 0 0-4.554-7.222z"/><path d="M15 11a3.998 3.998 0 0 0-2-3.465v6.93A3.998 3.998 0 0 0 15 11z"/></svg>'},{}],i9vta:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><path d="M15 11a3.998 3.998 0 0 0-2-3.465v2.636l1.865 1.865A4.02 4.02 0 0 0 15 11z"/><path d="M13.583 5.583A5.998 5.998 0 0 1 17 11a6 6 0 0 1-.585 2.587l1.477 1.477a8.001 8.001 0 0 0-3.446-11.286 1 1 0 0 0-.863 1.805zm5.195 13.195-2.121-2.121-1.414-1.414-1.415-1.415L13 13l-2-2-3.889-3.889-3.889-3.889a.999.999 0 1 0-1.414 1.414L5.172 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39v-3.131l2.587 2.587-.01.005a1 1 0 0 0 .86 1.806c.215-.102.424-.214.627-.333l2.3 2.3a1.001 1.001 0 0 0 1.414-1.416zM11 5.04a.5.5 0 0 0-.813-.39L8.682 5.854 11 8.172V5.04z"/></svg>'},{}],kB3Mf:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 50 50"><path d="M19.402 6a5 5 0 0 0-4.902 4.012L14.098 12H9a5 5 0 0 0-5 5v21a5 5 0 0 0 5 5h32a5 5 0 0 0 5-5V17a5 5 0 0 0-5-5h-5.098l-.402-1.988A5 5 0 0 0 30.598 6ZM25 17c5.52 0 10 4.48 10 10s-4.48 10-10 10-10-4.48-10-10 4.48-10 10-10Zm0 2c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8Z"/></svg>'},{}],"3MONs":[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><circle cx="11" cy="11" r="2"/><path d="M19.164 8.861 17.6 8.6a6.978 6.978 0 0 0-1.186-2.099l.574-1.533a1 1 0 0 0-.436-1.217l-1.997-1.153a1.001 1.001 0 0 0-1.272.23l-1.008 1.225a7.04 7.04 0 0 0-2.55.001L8.716 2.829a1 1 0 0 0-1.272-.23L5.447 3.751a1 1 0 0 0-.436 1.217l.574 1.533A6.997 6.997 0 0 0 4.4 8.6l-1.564.261A.999.999 0 0 0 2 9.847v2.306c0 .489.353.906.836.986l1.613.269a7 7 0 0 0 1.228 2.075l-.558 1.487a1 1 0 0 0 .436 1.217l1.997 1.153c.423.244.961.147 1.272-.23l1.04-1.263a7.089 7.089 0 0 0 2.272 0l1.04 1.263a1 1 0 0 0 1.272.23l1.997-1.153a1 1 0 0 0 .436-1.217l-.557-1.487c.521-.61.94-1.31 1.228-2.075l1.613-.269a.999.999 0 0 0 .835-.986V9.847a.999.999 0 0 0-.836-.986zM11 15a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/></svg>'},{}],iMCpk:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32"><path d="m19.41 20.09-4.58-4.59 4.58-4.59L18 9.5l-6 6 6 6z" fill="#fff"/></svg>'},{}],"3oe4L":[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32"><path d="m12.59 20.34 4.58-4.59-4.58-4.59L14 9.75l6 6-6 6z" fill="#fff"/></svg>'},{}],liE22:[function(r,n,i){n.exports='<svg height="24" width="24"><path d="M10 8v8l6-4-6-4zM6.3 5l-.6-.8C7.2 3 9 2.2 11 2l.1 1c-1.8.2-3.4.9-4.8 2zM5 6.3l-.8-.6C3 7.2 2.2 9 2 11l1 .1c.2-1.8.9-3.4 2-4.8zm0 11.4c-1.1-1.4-1.8-3.1-2-4.8L2 13c.2 2 1 3.8 2.2 5.4l.8-.7zm6.1 3.3c-1.8-.2-3.4-.9-4.8-2l-.6.8C7.2 21 9 21.8 11 22l.1-1zM22 12c0-5.2-3.9-9.4-9-10l-.1 1c4.6.5 8.1 4.3 8.1 9s-3.5 8.5-8.1 9l.1 1c5.2-.5 9-4.8 9-10z" fill="#fff" style="--darkreader-inline-fill:#a8a6a4"/></svg>'},{}],"8HqYc":[function(r,n,i){n.exports=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 88 88" style="width:100%;height:100%;transform:translate(0,0)"><defs><clipPath id="__lottie_element_216"><path d="M0 0h88v88H0z"/></clipPath></defs><g style="display:block" clip-path="url('#__lottie_element_216')"><path fill="#FFF" d="m12.438-12.702-2.82 2.82c-.79.79-.79 2.05 0 2.83l7.07 7.07-7.07 7.07c-.79.79-.79 2.05 0 2.83l2.82 2.83c.79.78 2.05.78 2.83 0l11.32-11.31c.78-.78.78-2.05 0-2.83l-11.32-11.31c-.78-.79-2.04-.79-2.83 0zm-24.88 0c-.74-.74-1.92-.78-2.7-.12l-.13.12-11.31 11.31a2 2 0 0 0-.12 2.7l.12.13 11.31 11.31a2 2 0 0 0 2.7.12l.13-.12 2.83-2.83c.74-.74.78-1.91.11-2.7l-.11-.13-7.07-7.07 7.07-7.07c.74-.74.78-1.91.11-2.7l-.11-.13-2.83-2.82zM28-28c4.42 0 8 3.58 8 8v40c0 4.42-3.58 8-8 8h-56c-4.42 0-8-3.58-8-8v-40c0-4.42 3.58-8 8-8h56z" style="--darkreader-inline-fill:#a8a6a4" transform="translate(44 44)"/></g></svg>`},{}],hYAAH:[function(r,n,i){n.exports='<svg height="24" width="24"><path d="M15 17h6v1h-6v-1zm-4 0H3v1h8v2h1v-5h-1v2zm3-9h1V3h-1v2H3v1h11v2zm4-3v1h3V5h-3zM6 14h1V9H6v2H3v1h3v2zm4-2h11v-1H10v1z" fill="#fff" style="--darkreader-inline-fill:#a8a6a4"/></svg>'},{}],jmNrH:[function(r,n,i){n.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" height="32" width="32"><path d="M25 17h-8v6h8v-6Zm4 8V10.98C29 9.88 28.1 9 27 9H9c-1.1 0-2 .88-2 1.98V25c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2Zm-2 .02H9V10.97h18v14.05Z"/></svg>'},{}],cIqko:[function(r,n,i){n.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M298.667 426.667v-85.334a213.333 213.333 0 1 1 426.666 0v85.334H768A85.333 85.333 0 0 1 853.333 512v256A85.333 85.333 0 0 1 768 853.333H256A85.333 85.333 0 0 1 170.667 768V512A85.333 85.333 0 0 1 256 426.667h42.667zM512 213.333a128 128 0 0 0-128 128v85.334h256v-85.334a128 128 0 0 0-128-128z" fill="#fff"/></svg>'},{}],"65zy4":[function(r,n,i){n.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="m666.752 194.517-49.365 74.112A128 128 0 0 0 384 341.333l.043 85.334h384A85.333 85.333 0 0 1 853.376 512v256a85.333 85.333 0 0 1-85.333 85.333H256A85.333 85.333 0 0 1 170.667 768V512A85.333 85.333 0 0 1 256 426.667h42.667v-85.334a213.333 213.333 0 0 1 368.085-146.816z" fill="#fff"/></svg>'},{}],jaJRT:[function(r,n,i){n.exports='<svg class="icon" width="22" height="22" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M768 298.667h170.667V384h-256V128H768v170.667zM341.333 384h-256v-85.333H256V128h85.333v256zM768 725.333V896h-85.333V640h256v85.333H768zM341.333 640v256H256V725.333H85.333V640h256z"/></svg>'},{}],cRY1X:[function(r,n,i){n.exports='<svg class="icon" width="22" height="22" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M625.778 256H768v142.222h113.778v-256h-256V256zM256 398.222V256h142.222V142.222h-256v256H256zm512 227.556V768H625.778v113.778h256v-256H768zM398.222 768H256V625.778H142.222v256h256V768z"/></svg>'},{}],"3aVGL":[function(r,n,i){n.exports='<svg class="icon" width="18" height="18" viewBox="0 0 1152 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M1075.2 0H76.8A76.8 76.8 0 0 0 0 76.8v870.4a76.8 76.8 0 0 0 76.8 76.8h998.4a76.8 76.8 0 0 0 76.8-76.8V76.8A76.8 76.8 0 0 0 1075.2 0zM1024 128v768H128V128h896zM896 512a64 64 0 0 1 7.488 127.552L896 640H768v128a64 64 0 0 1-56.512 63.552L704 832a64 64 0 0 1-63.552-56.512L640 768V582.592c0-34.496 25.024-66.112 61.632-70.208l8-.384H896zm-640 0a64 64 0 0 1-7.488-127.552L256 384h128V256a64 64 0 0 1 56.512-63.552L448 192a64 64 0 0 1 63.552 56.512L512 256v185.408c0 34.432-25.024 66.112-61.632 70.144l-8 .448H256z"/></svg>'},{}],"4DiVn":[function(r,n,i){n.exports='<svg class="icon" width="18" height="18" viewBox="0 0 1152 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M1075.2 0H76.8A76.8 76.8 0 0 0 0 76.8v870.4a76.8 76.8 0 0 0 76.8 76.8h998.4a76.8 76.8 0 0 0 76.8-76.8V76.8A76.8 76.8 0 0 0 1075.2 0zM1024 128v768H128V128h896zm-576 64a64 64 0 0 1 7.488 127.552L448 320H320v128a64 64 0 0 1-56.512 63.552L256 512a64 64 0 0 1-63.552-56.512L192 448V262.592c0-34.432 25.024-66.112 61.632-70.144l8-.448H448zm256 640a64 64 0 0 1-7.488-127.552L704 704h128V576a64 64 0 0 1 56.512-63.552L896 512a64 64 0 0 1 63.552 56.512L960 576v185.408c0 34.496-25.024 66.112-61.632 70.208l-8 .384H704z"/></svg>'},{}],kwdKE:[function(r,n,i){n.exports='<svg class="icon" width="26" height="26" viewBox="0 0 1664 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#648FFC" d="M1152 0H512a512 512 0 0 0 0 1024h640a512 512 0 0 0 0-1024zm0 960a448 448 0 1 1 448-448 448 448 0 0 1-448 448z"/></svg>'},{}],bWfXZ:[function(r,n,i){n.exports='<svg class="icon" width="26" height="26" viewBox="0 0 1740 1024" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M511.898 1024h670.515c282.419-.41 511.18-229.478 511.18-511.898 0-282.419-228.761-511.488-511.18-511.897H511.898C229.478.615.717 229.683.717 512.102c0 282.42 228.761 511.488 511.18 511.898zm-.564-975.36A464.589 464.589 0 1 1 48.026 513.024 463.872 463.872 0 0 1 511.334 48.435v.205z"/></svg>'},{}],h3zZ9:[function(r,n,i){n.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M554.667 810.667V896h-85.334v-85.333h85.334zm-384-632.662a42.667 42.667 0 0 1 34.986 18.219l203.904 291.328a42.667 42.667 0 0 1 0 48.896L205.611 827.776A42.667 42.667 0 0 1 128 803.328V220.672a42.667 42.667 0 0 1 42.667-42.667zm682.666 0a42.667 42.667 0 0 1 42.368 37.718l.299 4.949v582.656a42.667 42.667 0 0 1-74.24 28.63l-3.413-4.182-203.904-291.328a42.667 42.667 0 0 1-3.03-43.861l3.03-5.035 203.946-291.328a42.667 42.667 0 0 1 34.944-18.219zM554.667 640v85.333h-85.334V640h85.334zm-358.4-320.896V716.8L335.957 512 196.31 319.104zm358.4 150.23v85.333h-85.334v-85.334h85.334zm0-170.667V384h-85.334v-85.333h85.334zm0-170.667v85.333h-85.334V128h85.334z" fill="#fff"/></svg>'},{}],"7Oyth":[function(r,n,i){n.exports='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="50" height="50"><path d="M593.818 168.55 949.82 763.76c26.153 43.746 10.732 99.738-34.447 125.052-14.397 8.069-30.72 12.308-47.37 12.308H155.976c-52.224 0-94.536-40.96-94.536-91.505 0-16.097 4.383-31.928 12.718-45.875l356.004-595.19c26.173-43.724 84.009-58.654 129.208-33.341a93.082 93.082 0 0 1 34.448 33.341zM512 819.2a61.44 61.44 0 1 0 0-122.88 61.44 61.44 0 0 0 0 122.88zm0-512a72.315 72.315 0 0 0-71.762 81.306l25.723 205.721a46.408 46.408 0 0 0 92.078 0l25.723-205.742A72.315 72.315 0 0 0 512 307.2z"/></svg>'},{}],U5Jcy:[function(r,n,i){n.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="m571.733 512 268.8-268.8c17.067-17.067 17.067-42.667 0-59.733-17.066-17.067-42.666-17.067-59.733 0L512 452.267l-268.8-268.8c-17.067-17.067-42.667-17.067-59.733 0-17.067 17.066-17.067 42.666 0 59.733l268.8 268.8-268.8 268.8c-17.067 17.067-17.067 42.667 0 59.733 8.533 8.534 19.2 12.8 29.866 12.8s21.334-4.266 29.867-12.8l268.8-268.8 268.8 268.8c8.533 8.534 19.2 12.8 29.867 12.8s21.333-4.266 29.866-12.8c17.067-17.066 17.067-42.666 0-59.733L571.733 512z"/></svg>'},{}],jK5Fx:[function(r,n,i){n.exports='<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff"><path d="M16 1H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3v-2H3V3h12v8h-2v2h3a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1Z"/><path d="M4 17h10l-5-6z"/></g></svg>'},{}],bRHiA:[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("./flip"),l=a.interopDefault(o),s=r("./aspectRatio"),c=a.interopDefault(s),u=r("./playbackRate"),f=a.interopDefault(u),d=r("./subtitleOffset"),h=a.interopDefault(d),p=r("../utils/component"),v=a.interopDefault(p),g=r("../utils/error"),m=r("../utils");class b extends v.default{constructor(T){super(T);const{option:A,controls:O,template:{$setting:I}}=T;this.name="setting",this.$parent=I,this.option=[],this.events=[],this.cache=new Map,A.setting&&(this.init(),T.on("blur",()=>{this.show&&(this.show=!1,this.render(this.option))}),T.on("focus",_=>{const k=(0,m.includeFromEvent)(_,O.setting),L=(0,m.includeFromEvent)(_,this.$parent);!this.show||k||L||(this.show=!1,this.render(this.option))}))}static makeRecursion(T,A,O){for(let I=0;I<T.length;I++){const _=T[I];_.$parentItem=A,_.$parentList=O,b.makeRecursion(_.selector||[],_,T)}return T}get defaultSettings(){const T=[],{option:A}=this.art;return A.playbackRate&&T.push((0,f.default)(this.art)),A.aspectRatio&&T.push((0,c.default)(this.art)),A.flip&&T.push((0,l.default)(this.art)),A.subtitleOffset&&T.push((0,h.default)(this.art)),T}init(){const{option:T}=this.art,A=[...this.defaultSettings,...T.settings];this.option=b.makeRecursion(A),this.destroy(),this.render(this.option)}destroy(){for(let T=0;T<this.events.length;T++)this.art.events.remove(this.events[T]);this.$parent.innerHTML="",this.events=[],this.cache=new Map}find(T="",A=this.option){for(let O=0;O<A.length;O++){const I=A[O];if(I.name===T)return I;{const _=this.find(T,I.selector||[]);if(_)return _}}}remove(T){const A=this.find(T);(0,g.errorHandle)(A,`Can't find [${T}] from the [setting]`);const O=A.$parentItem?A.$parentItem.selector:this.option;return O.splice(O.indexOf(A),1),this.option=b.makeRecursion(this.option),this.destroy(),this.render(this.option),this.option}update(T){const A=this.find(T.name);return A?(Object.assign(A,T),this.option=b.makeRecursion(this.option),this.destroy(),this.render(this.option)):this.add(T),this.option}add(T){return this.option.push(T),this.option=b.makeRecursion(this.option),this.destroy(),this.render(this.option),this.option}creatHeader(T){const{icons:A,proxy:O,constructor:I}=this.art,_=(0,m.createElement)("div");(0,m.setStyle)(_,"height",`${I.SETTING_ITEM_HEIGHT}px`),(0,m.addClass)(_,"art-setting-item"),(0,m.addClass)(_,"art-setting-item-back");const k=(0,m.append)(_,'<div class="art-setting-item-left"></div>'),L=(0,m.createElement)("div");(0,m.addClass)(L,"art-setting-item-left-icon"),(0,m.append)(L,A.arrowLeft),(0,m.append)(k,L),(0,m.append)(k,T.$parentItem.html);const P=O(_,"click",()=>this.render(T.$parentList));return this.events.push(P),_}creatItem(T,A){const{icons:O,proxy:I,constructor:_}=this.art,k=(0,m.createElement)("div");(0,m.addClass)(k,"art-setting-item"),(0,m.setStyle)(k,"height",`${_.SETTING_ITEM_HEIGHT}px`),(0,m.isStringOrNumber)(A.name)&&(k.dataset.name=A.name),(0,m.isStringOrNumber)(A.value)&&(k.dataset.value=A.value);const L=(0,m.append)(k,'<div class="art-setting-item-left"></div>'),P=(0,m.append)(k,'<div class="art-setting-item-right"></div>'),W=(0,m.createElement)("div");switch((0,m.addClass)(W,"art-setting-item-left-icon"),T){case"switch":case"range":(0,m.append)(W,(0,m.isStringOrNumber)(A.icon)||A.icon instanceof Element?A.icon:O.config);break;case"selector":A.selector&&A.selector.length?(0,m.append)(W,(0,m.isStringOrNumber)(A.icon)||A.icon instanceof Element?A.icon:O.config):(0,m.append)(W,O.check)}(0,m.append)(L,W),A.$icon=W,(0,m.def)(A,"icon",{configurable:!0,get:()=>W.innerHTML,set(G){(0,m.isStringOrNumber)(G)&&(W.innerHTML=G)}});const q=(0,m.createElement)("div");(0,m.addClass)(q,"art-setting-item-left-text"),(0,m.append)(q,A.html||""),(0,m.append)(L,q),A.$html=q,(0,m.def)(A,"html",{configurable:!0,get:()=>q.innerHTML,set(G){(0,m.isStringOrNumber)(G)&&(q.innerHTML=G)}});const V=(0,m.createElement)("div");switch((0,m.addClass)(V,"art-setting-item-right-tooltip"),(0,m.append)(V,A.tooltip||""),(0,m.append)(P,V),A.$tooltip=V,(0,m.def)(A,"tooltip",{configurable:!0,get:()=>V.innerHTML,set(G){(0,m.isStringOrNumber)(G)&&(V.innerHTML=G)}}),T){case"switch":{const G=(0,m.createElement)("div");(0,m.addClass)(G,"art-setting-item-right-icon");const pe=(0,m.append)(G,O.switchOn),J=(0,m.append)(G,O.switchOff);(0,m.setStyle)(A.switch?J:pe,"display","none"),(0,m.append)(P,G),A.$switch=A.switch,(0,m.def)(A,"switch",{configurable:!0,get:()=>A.$switch,set(N){A.$switch=N,N?((0,m.setStyle)(J,"display","none"),(0,m.setStyle)(pe,"display",null)):((0,m.setStyle)(J,"display",null),(0,m.setStyle)(pe,"display","none"))}});break}case"range":{const G=(0,m.createElement)("div");(0,m.addClass)(G,"art-setting-item-right-icon");const pe=(0,m.append)(G,'<input type="range">');pe.value=A.range[0]||0,pe.min=A.range[1]||0,pe.max=A.range[2]||10,pe.step=A.range[3]||1,(0,m.addClass)(pe,"art-setting-range"),(0,m.append)(P,G),A.$range=pe,(0,m.def)(A,"range",{configurable:!0,get:()=>pe.valueAsNumber,set(J){pe.value=Number(J)}})}break;case"selector":if(A.selector&&A.selector.length){const G=(0,m.createElement)("div");(0,m.addClass)(G,"art-setting-item-right-icon"),(0,m.append)(G,O.arrowRight),(0,m.append)(P,G)}}switch(T){case"switch":if(A.onSwitch){const G=I(k,"click",async pe=>{A.switch=await A.onSwitch.call(this.art,A,k,pe)});this.events.push(G)}break;case"range":if(A.$range){if(A.onRange){const G=I(A.$range,"change",async pe=>{A.tooltip=await A.onRange.call(this.art,A,k,pe)});this.events.push(G)}if(A.onChange){const G=I(A.$range,"input",async pe=>{A.tooltip=await A.onChange.call(this.art,A,k,pe)});this.events.push(G)}}break;case"selector":{const G=I(k,"click",async pe=>{if(A.selector&&A.selector.length)this.render(A.selector,A.width);else{(0,m.inverseClass)(k,"art-current");for(let J=0;J<A.$parentItem.selector.length;J++){const N=A.$parentItem.selector[J];N.default=N===A}if(A.$parentList&&this.render(A.$parentList),A.$parentItem&&A.$parentItem.onSelect){const J=await A.$parentItem.onSelect.call(this.art,A,k,pe);A.$parentItem.$tooltip&&(0,m.isStringOrNumber)(J)&&(A.$parentItem.$tooltip.innerHTML=J)}}});this.events.push(G),A.default&&(0,m.addClass)(k,"art-current")}}return k}updateStyle(T){const{controls:A,constructor:O,template:{$player:I,$setting:_}}=this.art;if(A.setting&&!m.isMobile){const k=T||O.SETTING_WIDTH,{left:L,width:P}=A.setting.getBoundingClientRect(),{left:W,width:q}=I.getBoundingClientRect(),V=L-W+P/2-k/2;V+k>q?((0,m.setStyle)(_,"left",null),(0,m.setStyle)(_,"right",null)):((0,m.setStyle)(_,"left",`${V}px`),(0,m.setStyle)(_,"right","auto"))}}render(T,A){const{constructor:O}=this.art;if(this.cache.has(T)){const I=this.cache.get(T);(0,m.inverseClass)(I,"art-current"),(0,m.setStyle)(this.$parent,"width",`${I.dataset.width}px`),(0,m.setStyle)(this.$parent,"height",`${I.dataset.height}px`),this.updateStyle(Number(I.dataset.width))}else{const I=(0,m.createElement)("div");(0,m.addClass)(I,"art-setting-panel"),I.dataset.width=A||O.SETTING_WIDTH,I.dataset.height=T.length*O.SETTING_ITEM_HEIGHT,T[0]&&T[0].$parentItem&&((0,m.append)(I,this.creatHeader(T[0])),I.dataset.height=Number(I.dataset.height)+O.SETTING_ITEM_HEIGHT);for(let _=0;_<T.length;_++){const k=T[_];(0,m.has)(k,"switch")?(0,m.append)(I,this.creatItem("switch",k)):(0,m.has)(k,"range")?(0,m.append)(I,this.creatItem("range",k)):(0,m.append)(I,this.creatItem("selector",k))}(0,m.append)(this.$parent,I),this.cache.set(T,I),(0,m.inverseClass)(I,"art-current"),(0,m.setStyle)(this.$parent,"width",`${I.dataset.width}px`),(0,m.setStyle)(this.$parent,"height",`${I.dataset.height}px`),this.updateStyle(Number(I.dataset.width)),T[0]&&T[0].$parentItem&&T[0].$parentItem.mounted&&T[0].$parentItem.mounted.call(this.art,I,T[0].$parentItem)}}}i.default=b},{"./flip":"bNOaj","./aspectRatio":"5lAsp","./playbackRate":"e6hsR","./subtitleOffset":"fFNEr","../utils/component":"guki8","../utils/error":"2nFlF","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],bNOaj:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,icons:s,constructor:{SETTING_ITEM_WIDTH:c,FLIP:u}}=o;function f(d,h,p){h&&(h.innerText=l.get((0,a.capitalize)(p)));const v=(0,a.queryAll)(".art-setting-item",d).find(g=>g.dataset.value===p);v&&(0,a.inverseClass)(v,"art-current")}return{width:c,name:"flip",html:l.get("Video Flip"),tooltip:l.get((0,a.capitalize)(o.flip)),icon:s.flip,selector:u.map(d=>({value:d,name:`aspect-ratio-${d}`,default:d===o.flip,html:l.get((0,a.capitalize)(d))})),onSelect:d=>(o.flip=d.value,d.html),mounted:(d,h)=>{f(d,h.$tooltip,o.flip),o.on("flip",()=>{f(d,h.$tooltip,o.flip)})}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5lAsp":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,icons:s,constructor:{SETTING_ITEM_WIDTH:c,ASPECT_RATIO:u}}=o;function f(h){return h==="default"?l.get("Default"):h}function d(h,p,v){p&&(p.innerText=f(v));const g=(0,a.queryAll)(".art-setting-item",h).find(m=>m.dataset.value===v);g&&(0,a.inverseClass)(g,"art-current")}return{width:c,name:"aspect-ratio",html:l.get("Aspect Ratio"),icon:s.aspectRatio,tooltip:f(o.aspectRatio),selector:u.map(h=>({value:h,name:`aspect-ratio-${h}`,default:h===o.aspectRatio,html:f(h)})),onSelect:h=>(o.aspectRatio=h.value,h.html),mounted:(h,p)=>{d(h,p.$tooltip,o.aspectRatio),o.on("aspectRatio",()=>{d(h,p.$tooltip,o.aspectRatio)})}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],e6hsR:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,icons:s,constructor:{SETTING_ITEM_WIDTH:c,PLAYBACK_RATE:u}}=o;function f(h){return h===1?l.get("Normal"):h.toFixed(1)}function d(h,p,v){p&&(p.innerText=f(v));const g=(0,a.queryAll)(".art-setting-item",h).find(m=>Number(m.dataset.value)===v);g&&(0,a.inverseClass)(g,"art-current")}return{width:c,name:"playback-rate",html:l.get("Play Speed"),tooltip:f(o.playbackRate),icon:s.playbackRate,selector:u.map(h=>({value:h,name:`aspect-ratio-${h}`,default:h===o.playbackRate,html:f(h)})),onSelect:h=>(o.playbackRate=h.value,h.html),mounted:(h,p)=>{d(h,p.$tooltip,o.playbackRate),o.on("video:ratechange",()=>{d(h,p.$tooltip,o.playbackRate)})}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fFNEr:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=function(a){const{i18n:o,icons:l,constructor:s}=a;return{width:s.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:o.get("Subtitle Offset"),icon:l.subtitle,tooltip:"0s",range:[0,-5,5,.1],onChange:c=>(a.subtitleOffset=c.range,c.range+"s")}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f2Thp:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(a){try{const o=JSON.parse(window.localStorage.getItem(this.name))||{};return a?o[a]:o}catch{return a?this.settings[a]:this.settings}}set(a,o){try{const l=Object.assign({},this.get(),{[a]:o});window.localStorage.setItem(this.name,JSON.stringify(l))}catch{this.settings[a]=o}}del(a){try{const o=this.get();delete o[a],window.localStorage.setItem(this.name,JSON.stringify(o))}catch{delete this.settings[a]}}clear(){try{window.localStorage.removeItem(this.name)}catch{this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"96ThS":[function(r,n,i){var a=r("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var o=r("../utils"),l=r("./miniProgressBar"),s=a.interopDefault(l),c=r("./autoOrientation"),u=a.interopDefault(c),f=r("./autoPlayback"),d=a.interopDefault(f),h=r("./fastForward"),p=a.interopDefault(h),v=r("./lock"),g=a.interopDefault(v);i.default=class{constructor(m){this.art=m,this.id=0;const{option:b}=m;b.miniProgressBar&&!b.isLive&&this.add(s.default),b.lock&&o.isMobile&&this.add(g.default),b.autoPlayback&&!b.isLive&&this.add(d.default),b.autoOrientation&&o.isMobile&&this.add(u.default),b.fastForward&&o.isMobile&&!b.isLive&&this.add(p.default);for(let x=0;x<b.plugins.length;x++)this.add(b.plugins[x])}async add(m){this.id+=1;const b=await m.call(this.art,this.art),x=b&&b.name||m.name||`plugin${this.id}`;return(0,o.errorHandle)(!(0,o.has)(this,x),`Cannot add a plugin that already has the same name: ${x}`),(0,o.def)(this,x,{value:b}),this}}},{"../utils":"h3rH9","./miniProgressBar":"iBx4M","./autoOrientation":"2O9qO","./autoPlayback":"iiOc1","./fastForward":"d9NUE","./lock":"5dnKh","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iBx4M:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){return o.on("control",l=>{l?(0,a.removeClass)(o.template.$player,"art-mini-progress-bar"):(0,a.addClass)(o.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2O9qO":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{constructor:l,template:{$player:s,$video:c}}=o;return o.on("fullscreenWeb",u=>{if(u){const{videoWidth:f,videoHeight:d}=c,{clientWidth:h,clientHeight:p}=document.documentElement;(f>d&&h<p||f<d&&h>p)&&setTimeout(()=>{(0,a.setStyle)(s,"width",`${p}px`),(0,a.setStyle)(s,"height",`${h}px`),(0,a.setStyle)(s,"transform-origin","0 0"),(0,a.setStyle)(s,"transform",`rotate(90deg) translate(0, -${h}px)`),(0,a.addClass)(s,"art-auto-orientation"),o.isRotate=!0,o.emit("resize")},l.AUTO_ORIENTATION_TIME)}else(0,a.hasClass)(s,"art-auto-orientation")&&((0,a.removeClass)(s,"art-auto-orientation"),o.isRotate=!1,o.emit("resize"))}),o.on("fullscreen",async u=>{const f=screen.orientation.type;if(u){const{videoWidth:d,videoHeight:h}=c,{clientWidth:p,clientHeight:v}=document.documentElement;if(d>h&&p<v||d<h&&p>v){const g=f.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(g),(0,a.addClass)(s,"art-auto-orientation-fullscreen")}}else(0,a.hasClass)(s,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(f),(0,a.removeClass)(s,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,a.hasClass)(s,"art-auto-orientation")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iiOc1:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{i18n:l,icons:s,storage:c,constructor:u,proxy:f,template:{$poster:d}}=o,h=o.layers.add({name:"auto-playback",html:'<div class="art-auto-playback-close"></div><div class="art-auto-playback-last"></div><div class="art-auto-playback-jump"></div>'}),p=(0,a.query)(".art-auto-playback-last",h),v=(0,a.query)(".art-auto-playback-jump",h),g=(0,a.query)(".art-auto-playback-close",h);return o.on("video:timeupdate",()=>{if(o.playing){const m=c.get("times")||{},b=Object.keys(m);b.length>u.AUTO_PLAYBACK_MAX&&delete m[b[0]],m[o.option.id||o.option.url]=o.currentTime,c.set("times",m)}}),o.on("ready",()=>{const m=(c.get("times")||{})[o.option.id||o.option.url];m&&m>=u.AUTO_PLAYBACK_MIN&&((0,a.append)(g,s.close),(0,a.setStyle)(h,"display","flex"),p.innerText=`${l.get("Last Seen")} ${(0,a.secondToTime)(m)}`,v.innerText=l.get("Jump Play"),f(g,"click",()=>{(0,a.setStyle)(h,"display","none")}),f(v,"click",()=>{o.seek=m,o.play(),(0,a.setStyle)(d,"display","none"),(0,a.setStyle)(h,"display","none")}),o.once("video:timeupdate",()=>{setTimeout(()=>{(0,a.setStyle)(h,"display","none")},u.AUTO_PLAYBACK_TIMEOUT)}))}),{name:"auto-playback",get times(){return c.get("times")||{}},clear:()=>c.del("times"),delete(m){const b=c.get("times")||{};return delete b[m],c.set("times",b),b}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],d9NUE:[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{constructor:l,proxy:s,template:{$player:c,$video:u}}=o;let f=null,d=!1,h=1;const p=()=>{clearTimeout(f),d&&(d=!1,o.playbackRate=h,(0,a.removeClass)(c,"art-fast-forward"))};return s(u,"touchstart",v=>{v.touches.length===1&&o.playing&&!o.isLock&&(f=setTimeout(()=>{d=!0,h=o.playbackRate,o.playbackRate=l.FAST_FORWARD_VALUE,(0,a.addClass)(c,"art-fast-forward")},l.FAST_FORWARD_TIME))}),s(document,"touchmove",p),s(document,"touchend",p),{name:"fastForward",get state(){return(0,a.hasClass)(c,"art-fast-forward")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5dnKh":[function(r,n,i){r("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);var a=r("../utils");i.default=function(o){const{layers:l,icons:s,template:{$player:c}}=o;return l.add({name:"lock",mounted(u){const f=(0,a.append)(u,s.lock),d=(0,a.append)(u,s.unlock);(0,a.setStyle)(f,"display","none"),o.on("lock",h=>{h?((0,a.setStyle)(f,"display","inline-flex"),(0,a.setStyle)(d,"display","none")):((0,a.setStyle)(f,"display","none"),(0,a.setStyle)(d,"display","inline-flex"))})},click(){(0,a.hasClass)(c,"art-lock")?((0,a.removeClass)(c,"art-lock"),this.isLock=!1,o.emit("lock",!1)):((0,a.addClass)(c,"art-lock"),this.isLock=!0,o.emit("lock",!0))}}),{name:"lock",get state(){return(0,a.hasClass)(c,"art-lock")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}]},["abjMI"],"abjMI","parcelRequireb749")})(pd,pd.exports);var Jte=pd.exports;const Yce=dg(Jte);function Qte(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var RR={exports:{}};(function(t,e){(function(r){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(s,c,u){if(u=u||{},s=s.trim(),c=c.trim(),!c){if(!u.alwaysNormalize)return s;var f=l.parseURL(s);if(!f)throw new Error("Error trying to parse base URL.");return f.path=l.normalizePath(f.path),l.buildURLFromParts(f)}var d=l.parseURL(c);if(!d)throw new Error("Error trying to parse relative URL.");if(d.scheme)return u.alwaysNormalize?(d.path=l.normalizePath(d.path),l.buildURLFromParts(d)):c;var h=l.parseURL(s);if(!h)throw new Error("Error trying to parse base URL.");if(!h.netLoc&&h.path&&h.path[0]!=="/"){var p=i.exec(h.path);h.netLoc=p[1],h.path=p[2]}h.netLoc&&!h.path&&(h.path="/");var v={scheme:h.scheme,netLoc:d.netLoc,path:null,params:d.params,query:d.query,fragment:d.fragment};if(!d.netLoc&&(v.netLoc=h.netLoc,d.path[0]!=="/"))if(!d.path)v.path=h.path,d.params||(v.params=h.params,d.query||(v.query=h.query));else{var g=h.path,m=g.substring(0,g.lastIndexOf("/")+1)+d.path;v.path=l.normalizePath(m)}return v.path===null&&(v.path=u.alwaysNormalize?l.normalizePath(d.path):d.path),l.buildURLFromParts(v)},parseURL:function(s){var c=n.exec(s);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(s){for(s=s.split("").reverse().join("").replace(a,"");s.length!==(s=s.replace(o,"")).length;);return s.split("").reverse().join("")},buildURLFromParts:function(s){return s.scheme+s.netLoc+s.path+s.params+s.query+s.fragment}};t.exports=l})()})(RR);var z0=RR.exports;function iT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iT(Object(r),!0).forEach(function(n){ere(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ere(t,e,r){return e=rre(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zr(){return zr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zr.apply(this,arguments)}function tre(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rre(t){var e=tre(t,"string");return typeof e=="symbol"?e:String(e)}const vt=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)},nre=Number.isSafeInteger||function(t){return typeof t=="number"&&Math.abs(t)<=ire},ire=Number.MAX_SAFE_INTEGER||9007199254740991;let z=function(t){return t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",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.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.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_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.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}({}),Tt=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}({}),ze=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.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.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown",t}({});const Xo=function(){},fm={trace:Xo,debug:Xo,log:Xo,warn:Xo,info:Xo,error:Xo};let Jc=fm;function are(t){const e=self.console[t];return e?e.bind(self.console,`[${t}] >`):Xo}function ore(t,...e){e.forEach(function(r){Jc[r]=t[r]?t[r].bind(t):are(r)})}function sre(t,e){if(self.console&&t===!0||typeof t=="object"){ore(t,"debug","log","info","warn","error");try{Jc.log(`Debug logs enabled for "${e}" in hls.js version 1.4.14`)}catch{Jc=fm}}else Jc=fm}const Me=Jc,lre=/^(\d+)x(\d+)$/,aT=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Ir{constructor(e){typeof e=="string"&&(e=Ir.parseAttrList(e));for(const r in e)e.hasOwnProperty(r)&&(r.substring(0,2)==="X-"&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(r)),this[r]=e[r])}decimalInteger(e){const r=parseInt(this[e],10);return r>Number.MAX_SAFE_INTEGER?1/0:r}hexadecimalInteger(e){if(this[e]){let r=(this[e]||"0x").slice(2);r=(r.length&1?"0":"")+r;const n=new Uint8Array(r.length/2);for(let i=0;i<r.length/2;i++)n[i]=parseInt(r.slice(i*2,i*2+2),16);return n}else return null}hexadecimalIntegerAsNumber(e){const r=parseInt(this[e],16);return r>Number.MAX_SAFE_INTEGER?1/0:r}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,r){const n=this[e];return n?parseFloat(n):r}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const r=lre.exec(this[e]);if(r!==null)return{width:parseInt(r[1],10),height:parseInt(r[2],10)}}static parseAttrList(e){let r;const n={},i='"';for(aT.lastIndex=0;(r=aT.exec(e))!==null;){let a=r[2];a.indexOf(i)===0&&a.lastIndexOf(i)===a.length-1&&(a=a.slice(1,-1));const o=r[1].trim();n[o]=a}return n}}function cre(t){return t!=="ID"&&t!=="CLASS"&&t!=="START-DATE"&&t!=="DURATION"&&t!=="END-DATE"&&t!=="END-ON-NEXT"}function ure(t){return t==="SCTE35-OUT"||t==="SCTE35-IN"}class LR{constructor(e,r){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,r){const n=r.attr;for(const i in n)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==n[i]){Me.warn(`DATERANGE tag attribute: "${i}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=i;break}e=zr(new Ir({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const n=new Date(this.attr["END-DATE"]);vt(n.getTime())&&(this._endDate=n)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(vt(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 isValid(){return!!this.id&&!this._badValueForSameId&&vt(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class sh{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 ur={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class DR{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[ur.AUDIO]:null,[ur.VIDEO]:null,[ur.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,r){const n=e.split("@",2),i=[];n.length===1?i[0]=r?r.byteRangeEndOffset:0:i[0]=parseInt(n[1]),i[1]=parseInt(n[0])+i[0],this._byteRange=i}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=z0.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Mp extends DR{constructor(e,r){super(r),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=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.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new sh,this.urlId=0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const r=this.levelkeys.identity;if(r)this._decryptdata=r.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!vt(this.programDateTime))return null;const e=vt(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){const r=Object.keys(this.levelkeys),n=r.length;if(n>1||n===1&&this.levelkeys[r[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const r=this.levelkeys[e];r&&!this._decryptdata&&(this._decryptdata=r.getDecryptData(this.sn))}}abortRequests(){var e,r;(e=this.loader)==null||e.abort(),(r=this.keyLoader)==null||r.abort()}setElementaryStreamInfo(e,r,n,i,a,o=!1){const{elementaryStreams:l}=this,s=l[e];if(!s){l[e]={startPTS:r,endPTS:n,startDTS:i,endDTS:a,partial:o};return}s.startPTS=Math.min(s.startPTS,r),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,i),s.endDTS=Math.max(s.endDTS,a)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[ur.AUDIO]=null,e[ur.VIDEO]=null,e[ur.AUDIOVIDEO]=null}}class fre extends DR{constructor(e,r,n,i,a){super(n),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.stats=new sh,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=r,this.index=i;const o=e.enumeratedString("BYTERANGE");o&&this.setByteRange(o,a),a&&(this.fragOffset=a.fragOffset+a.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)}}const dre=10;class hre{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.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 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.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const r=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!r||!this.live,this.advanced=this.endSN>e.endSN||r>0||r===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?vt(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||dre}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(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end: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 lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function K0(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}function pre(t){const e=OR(t).subarray(0,16),r=new Uint8Array(16);return r.set(e,16-e.length),r}function vre(t){const e=function(n,i,a){const o=n[i];n[i]=n[a],n[a]=o};e(t,0,3),e(t,1,2),e(t,4,5),e(t,6,7)}function mre(t){const e=t.split(":");let r=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),i=n[n.length-1].split(",");if(i.length===2){const a=i[0]==="base64",o=i[1];a?(n.splice(-1,1),r=K0(o)):r=pre(o)}}return r}function OR(t){return Uint8Array.from(unescape(encodeURIComponent(t)),e=>e.charCodeAt(0))}var _r={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Vn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function oT(t){switch(t){case Vn.FAIRPLAY:return _r.FAIRPLAY;case Vn.PLAYREADY:return _r.PLAYREADY;case Vn.WIDEVINE:return _r.WIDEVINE;case Vn.CLEARKEY:return _r.CLEARKEY}}var kR={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function gre(t){if(t===kR.WIDEVINE)return _r.WIDEVINE}function sT(t){switch(t){case _r.FAIRPLAY:return Vn.FAIRPLAY;case _r.PLAYREADY:return Vn.PLAYREADY;case _r.WIDEVINE:return Vn.WIDEVINE;case _r.CLEARKEY:return Vn.CLEARKEY}}function Fp(t){const{drmSystems:e,widevineLicenseUrl:r}=t,n=e?[_r.FAIRPLAY,_r.WIDEVINE,_r.PLAYREADY,_r.CLEARKEY].filter(i=>!!e[i]):[];return!n[_r.WIDEVINE]&&r&&n.push(_r.WIDEVINE),n}const MR=function(){return typeof self<"u"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function yre(t,e,r,n){let i;switch(t){case _r.FAIRPLAY:i=["cenc","sinf"];break;case _r.WIDEVINE:case _r.PLAYREADY:i=["cenc"];break;case _r.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${t}`)}return bre(i,e,r,n)}function bre(t,e,r,n){return[{initDataTypes:t,persistentState:n.persistentState||"not-allowed",distinctiveIdentifier:n.distinctiveIdentifier||"not-allowed",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(a=>({contentType:`audio/mp4; codecs="${a}"`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:r.map(a=>({contentType:`video/mp4; codecs="${a}"`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function gs(t,e,r){return Uint8Array.prototype.slice?t.slice(e,r):new Uint8Array(Array.prototype.slice.call(t,e,r))}const Y0=(t,e)=>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,FR=(t,e)=>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,vd=(t,e)=>{const r=e;let n=0;for(;Y0(t,e);){n+=10;const i=lh(t,e+6);n+=i,FR(t,e+10)&&(n+=10),e+=n}if(n>0)return t.subarray(r,r+n)},lh=(t,e)=>{let r=0;return r=(t[e]&127)<<21,r|=(t[e+1]&127)<<14,r|=(t[e+2]&127)<<7,r|=t[e+3]&127,r},xre=(t,e)=>Y0(t,e)&&lh(t,e+6)+10<=t.length-e,Are=t=>{const e=NR(t);for(let r=0;r<e.length;r++){const n=e[r];if(PR(n))return Ire(n)}},PR=t=>t&&t.key==="PRIV"&&t.info==="com.apple.streaming.transportStreamTimestamp",Ere=t=>{const e=String.fromCharCode(t[0],t[1],t[2],t[3]),r=lh(t,4),n=10;return{type:e,size:r,data:t.subarray(n,n+r)}},NR=t=>{let e=0;const r=[];for(;Y0(t,e);){const n=lh(t,e+6);e+=10;const i=e+n;for(;e+8<i;){const a=Ere(t.subarray(e)),o=Tre(a);o&&r.push(o),e+=a.size+10}FR(t,e)&&(e+=10)}return r},Tre=t=>t.type==="PRIV"?Sre(t):t.type[0]==="W"?Cre(t):wre(t),Sre=t=>{if(t.size<2)return;const e=oa(t.data,!0),r=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:r.buffer}},wre=t=>{if(t.size<2)return;if(t.type==="TXXX"){let r=1;const n=oa(t.data.subarray(r),!0);r+=n.length+1;const i=oa(t.data.subarray(r));return{key:t.type,info:n,data:i}}const e=oa(t.data.subarray(1));return{key:t.type,data:e}},Cre=t=>{if(t.type==="WXXX"){if(t.size<2)return;let r=1;const n=oa(t.data.subarray(r),!0);r+=n.length+1;const i=oa(t.data.subarray(r));return{key:t.type,info:n,data:i}}const e=oa(t.data);return{key:t.type,data:e}},Ire=t=>{if(t.data.byteLength===8){const e=new Uint8Array(t.data),r=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,r&&(n+=4772185884e-2),Math.round(n)}},oa=(t,e=!1)=>{const r=_re();if(r){const c=r.decode(t);if(e){const u=c.indexOf("\0");return u!==-1?c.substring(0,u):c}return c.replace(/\0/g,"")}const n=t.length;let i,a,o,l="",s=0;for(;s<n;){if(i=t[s++],i===0&&e)return l;if(i===0||i===3)continue;switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(i);break;case 12:case 13:a=t[s++],l+=String.fromCharCode((i&31)<<6|a&63);break;case 14:a=t[s++],o=t[s++],l+=String.fromCharCode((i&15)<<12|(a&63)<<6|(o&63)<<0);break}}return l};let Pp;function _re(){if(!navigator.userAgent.includes("PlayStation 4"))return!Pp&&typeof self.TextDecoder<"u"&&(Pp=new self.TextDecoder("utf-8")),Pp}const Qi={hexDump:function(t){let e="";for(let r=0;r<t.length;r++){let n=t[r].toString(16);n.length<2&&(n="0"+n),e+=n}return e}},md=Math.pow(2,32)-1,Rre=[].push,$R={video:1,audio:2,id3:3,text:4};function dn(t){return String.fromCharCode.apply(null,t)}function BR(t,e){const r=t[e]<<8|t[e+1];return r<0?65536+r:r}function Dt(t,e){const r=UR(t,e);return r<0?4294967296+r:r}function UR(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function Np(t,e,r){t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r&255}function Zt(t,e){const r=[];if(!e.length)return r;const n=t.byteLength;for(let i=0;i<n;){const a=Dt(t,i),o=dn(t.subarray(i+4,i+8)),l=a>1?i+a:n;if(o===e[0])if(e.length===1)r.push(t.subarray(i+8,l));else{const s=Zt(t.subarray(i+8,l),e.slice(1));s.length&&Rre.apply(r,s)}i=l}return r}function Lre(t){const e=[],r=t[0];let n=8;const i=Dt(t,n);n+=4;const a=0,o=0;r===0?n+=8:n+=16,n+=2;let l=t.length+o;const s=BR(t,n);n+=2;for(let c=0;c<s;c++){let u=n;const f=Dt(t,u);u+=4;const d=f&2147483647;if((f&2147483648)>>>31===1)return Me.warn("SIDX has hierarchical references (not supported)"),null;const p=Dt(t,u);u+=4,e.push({referenceSize:d,subsegmentDuration:p,info:{duration:p/i,start:l,end:l+d-1}}),l+=d,u+=4,n=u}return{earliestPresentationTime:a,timescale:i,version:r,referencesCount:s,references:e}}function HR(t){const e=[],r=Zt(t,["moov","trak"]);for(let i=0;i<r.length;i++){const a=r[i],o=Zt(a,["tkhd"])[0];if(o){let l=o[0],s=l===0?12:20;const c=Dt(o,s),u=Zt(a,["mdia","mdhd"])[0];if(u){l=u[0],s=l===0?12:20;const f=Dt(u,s),d=Zt(a,["mdia","hdlr"])[0];if(d){const h=dn(d.subarray(8,12)),p={soun:ur.AUDIO,vide:ur.VIDEO}[h];if(p){const v=Zt(a,["mdia","minf","stbl","stsd"])[0];let g;v&&(g=dn(v.subarray(12,16))),e[c]={timescale:f,type:p},e[p]={timescale:f,id:c,codec:g}}}}}}return Zt(t,["moov","mvex","trex"]).forEach(i=>{const a=Dt(i,4),o=e[a];o&&(o.default={duration:Dt(i,12),flags:Dt(i,20)})}),e}function Dre(t,e){if(!t||!e)return t;const r=e.keyId;return r&&e.isCommonEncryption&&Zt(t,["moov","trak"]).forEach(i=>{const o=Zt(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=Zt(o,["enca"]);const s=l.length>0;s||(l=Zt(o,["encv"])),l.forEach(c=>{const u=s?c.subarray(28):c.subarray(78);Zt(u,["sinf"]).forEach(d=>{const h=VR(d);if(h){const p=h.subarray(8,24);p.some(v=>v!==0)||(Me.log(`[eme] Patching keyId in 'enc${s?"a":"v"}>sinf>>tenc' box: ${Qi.hexDump(p)} -> ${Qi.hexDump(r)}`),h.set(r,8))}})})}),t}function VR(t){const e=Zt(t,["schm"])[0];if(e){const r=dn(e.subarray(4,8));if(r==="cbcs"||r==="cenc")return Zt(t,["schi","tenc"])[0]}return Me.error("[eme] missing 'schm' box"),null}function Ore(t,e){return Zt(e,["moof","traf"]).reduce((r,n)=>{const i=Zt(n,["tfdt"])[0],a=i[0],o=Zt(n,["tfhd"]).reduce((l,s)=>{const c=Dt(s,4),u=t[c];if(u){let f=Dt(i,4);if(a===1){if(f===md)return Me.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;f*=md+1,f+=Dt(i,8)}const d=u.timescale||9e4,h=f/d;if(vt(h)&&(l===null||h<l))return h}return l},null);return o!==null&&vt(o)&&(r===null||o<r)?o:r},null)}function kre(t,e){let r=0,n=0,i=0;const a=Zt(t,["moof","traf"]);for(let o=0;o<a.length;o++){const l=a[o],s=Zt(l,["tfhd"])[0],c=Dt(s,4),u=e[c];if(!u)continue;const f=u.default,d=Dt(s,0)|(f==null?void 0:f.flags);let h=f==null?void 0:f.duration;d&8&&(d&2?h=Dt(s,12):h=Dt(s,8));const p=u.timescale||9e4,v=Zt(l,["trun"]);for(let g=0;g<v.length;g++){if(r=Mre(v[g]),!r&&h){const m=Dt(v[g],4);r=h*m}u.type===ur.VIDEO?n+=r/p:u.type===ur.AUDIO&&(i+=r/p)}}if(n===0&&i===0){let o=0;const l=Zt(t,["sidx"]);for(let s=0;s<l.length;s++){const c=Lre(l[s]);c!=null&&c.references&&(o+=c.references.reduce((u,f)=>u+f.info.duration||0,0))}return o}return n||i}function Mre(t){const e=Dt(t,0);let r=8;e&1&&(r+=4),e&4&&(r+=4);let n=0;const i=Dt(t,4);for(let a=0;a<i;a++){if(e&256){const o=Dt(t,r);n+=o,r+=4}e&512&&(r+=4),e&1024&&(r+=4),e&2048&&(r+=4)}return n}function Fre(t,e,r){Zt(e,["moof","traf"]).forEach(n=>{Zt(n,["tfhd"]).forEach(i=>{const a=Dt(i,4),o=t[a];if(!o)return;const l=o.timescale||9e4;Zt(n,["tfdt"]).forEach(s=>{const c=s[0];let u=Dt(s,4);if(c===0)u-=r*l,u=Math.max(u,0),Np(s,4,u);else{u*=Math.pow(2,32),u+=Dt(s,8),u-=r*l,u=Math.max(u,0);const f=Math.floor(u/(md+1)),d=Math.floor(u%(md+1));Np(s,4,f),Np(s,8,d)}})})})}function Pre(t){const e={valid:null,remainder:null},r=Zt(t,["moof"]);if(r){if(r.length<2)return e.remainder=t,e}else return e;const n=r[r.length-1];return e.valid=gs(t,0,n.byteOffset-8),e.remainder=gs(t,n.byteOffset-8),e}function Ts(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function lT(t,e){const r=[],n=e.samples,i=e.timescale,a=e.id;let o=!1;return Zt(n,["moof"]).map(s=>{const c=s.byteOffset-8;Zt(s,["traf"]).map(f=>{const d=Zt(f,["tfdt"]).map(h=>{const p=h[0];let v=Dt(h,4);return p===1&&(v*=Math.pow(2,32),v+=Dt(h,8)),v/i})[0];return d!==void 0&&(t=d),Zt(f,["tfhd"]).map(h=>{const p=Dt(h,4),v=Dt(h,0)&16777215,g=(v&1)!==0,m=(v&2)!==0,b=(v&8)!==0;let x=0;const T=(v&16)!==0;let A=0;const O=(v&32)!==0;let I=8;p===a&&(g&&(I+=8),m&&(I+=4),b&&(x=Dt(h,I),I+=4),T&&(A=Dt(h,I),I+=4),O&&(I+=4),e.type==="video"&&(o=Nre(e.codec)),Zt(f,["trun"]).map(_=>{const k=_[0],L=Dt(_,0)&16777215,P=(L&1)!==0;let W=0;const q=(L&4)!==0,V=(L&256)!==0;let G=0;const pe=(L&512)!==0;let J=0;const N=(L&1024)!==0,Z=(L&2048)!==0;let le=0;const ye=Dt(_,4);let me=8;P&&(W=Dt(_,me),me+=4),q&&(me+=4);let Re=W+c;for(let be=0;be<ye;be++){if(V?(G=Dt(_,me),me+=4):G=x,pe?(J=Dt(_,me),me+=4):J=A,N&&(me+=4),Z&&(k===0?le=Dt(_,me):le=UR(_,me),me+=4),e.type===ur.VIDEO){let Ce=0;for(;Ce<J;){const we=Dt(n,Re);if(Re+=4,$re(o,n[Re])){const ce=n.subarray(Re,Re+we);jR(ce,o?2:1,t+le/i,r)}Re+=we,Ce+=we+4}}t+=G/i}}))})})}),r}function Nre(t){if(!t)return!1;const e=t.indexOf("."),r=e<0?t:t.substring(0,e);return r==="hvc1"||r==="hev1"||r==="dvh1"||r==="dvhe"}function $re(t,e){if(t){const r=e>>1&63;return r===39||r===40}else return(e&31)===6}function jR(t,e,r,n){const i=WR(t);let a=0;a+=e;let o=0,l=0,s=!1,c=0;for(;a<i.length;){o=0;do{if(a>=i.length)break;c=i[a++],o+=c}while(c===255);l=0;do{if(a>=i.length)break;c=i[a++],l+=c}while(c===255);const u=i.length-a;if(!s&&o===4&&a<i.length){if(s=!0,i[a++]===181){const d=BR(i,a);if(a+=2,d===49){const h=Dt(i,a);if(a+=4,h===1195456820){const p=i[a++];if(p===3){const v=i[a++],g=31&v,m=64&v,b=m?2+g*3:0,x=new Uint8Array(b);if(m){x[0]=v;for(let T=1;T<b;T++)x[T]=i[a++]}n.push({type:p,payloadType:o,pts:r,bytes:x})}}}}}else if(o===5&&l<u){if(s=!0,l>16){const f=[];for(let p=0;p<16;p++){const v=i[a++].toString(16);f.push(v.length==1?"0"+v:v),(p===3||p===5||p===7||p===9)&&f.push("-")}const d=l-16,h=new Uint8Array(d);for(let p=0;p<d;p++)h[p]=i[a++];n.push({payloadType:o,pts:r,uuid:f.join(""),userData:oa(h),userDataBytes:h})}}else if(l<u)a+=l;else if(l>u)break}}function WR(t){const e=t.byteLength,r=[];let n=1;for(;n<e-2;)t[n]===0&&t[n+1]===0&&t[n+2]===3?(r.push(n+2),n+=2):n++;if(r.length===0)return t;const i=e-r.length,a=new Uint8Array(i);let o=0;for(n=0;n<i;o++,n++)o===r[0]&&(o++,r.shift()),a[n]=t[o];return a}function Bre(t){const e=t[0];let r="",n="",i=0,a=0,o=0,l=0,s=0,c=0;if(e===0){for(;dn(t.subarray(c,c+1))!=="\0";)r+=dn(t.subarray(c,c+1)),c+=1;for(r+=dn(t.subarray(c,c+1)),c+=1;dn(t.subarray(c,c+1))!=="\0";)n+=dn(t.subarray(c,c+1)),c+=1;n+=dn(t.subarray(c,c+1)),c+=1,i=Dt(t,12),a=Dt(t,16),l=Dt(t,20),s=Dt(t,24),c=28}else if(e===1){c+=4,i=Dt(t,c),c+=4;const f=Dt(t,c);c+=4;const d=Dt(t,c);for(c+=4,o=2**32*f+d,nre(o)||(o=Number.MAX_SAFE_INTEGER,Me.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Dt(t,c),c+=4,s=Dt(t,c),c+=4;dn(t.subarray(c,c+1))!=="\0";)r+=dn(t.subarray(c,c+1)),c+=1;for(r+=dn(t.subarray(c,c+1)),c+=1;dn(t.subarray(c,c+1))!=="\0";)n+=dn(t.subarray(c,c+1)),c+=1;n+=dn(t.subarray(c,c+1)),c+=1}const u=t.subarray(c,t.byteLength);return{schemeIdUri:r,value:n,timeScale:i,presentationTime:o,presentationTimeDelta:a,eventDuration:l,id:s,payload:u}}function Ure(t,...e){const r=e.length;let n=8,i=r;for(;i--;)n+=e[i].byteLength;const a=new Uint8Array(n);for(a[0]=n>>24&255,a[1]=n>>16&255,a[2]=n>>8&255,a[3]=n&255,a.set(t,4),i=0,n=8;i<r;i++)a.set(e[i],n),n+=e[i].byteLength;return a}function Hre(t,e,r){if(t.byteLength!==16)throw new RangeError("Invalid system id");let n,i;if(e){n=1,i=new Uint8Array(e.length*16);for(let l=0;l<e.length;l++){const s=e[l];if(s.byteLength!==16)throw new RangeError("Invalid key");i.set(s,l*16)}}else n=0,i=new Uint8Array;let a;n>0?(a=new Uint8Array(4),e.length>0&&new DataView(a.buffer).setUint32(0,e.length,!1)):a=new Uint8Array;const o=new Uint8Array(4);return r&&r.byteLength>0&&new DataView(o.buffer).setUint32(0,r.byteLength,!1),Ure([112,115,115,104],new Uint8Array([n,0,0,0]),t,a,i,o,r||new Uint8Array)}function Vre(t){if(!(t instanceof ArrayBuffer)||t.byteLength<32)return null;const e={version:0,systemId:"",kids:null,data:null},r=new DataView(t),n=r.getUint32(0);if(t.byteLength!==n&&n>44||r.getUint32(4)!==1886614376||(e.version=r.getUint32(8)>>>24,e.version>1))return null;e.systemId=Qi.hexDump(new Uint8Array(t,12,16));const a=r.getUint32(28);if(e.version===0){if(n-32<a)return null;e.data=new Uint8Array(t,32,a)}else if(e.version===1){e.kids=[];for(let o=0;o<a;o++)e.kids.push(new Uint8Array(t,32+o*16,16))}return e}let vf={};class vu{static clearKeyUriToKeyIdMap(){vf={}}constructor(e,r,n,i=[1],a=null){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=r,this.keyFormat=n,this.keyFormatVersions=i,this.iv=a,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Vn.FAIRPLAY:case Vn.WIDEVINE:case Vn.PLAYREADY:case Vn.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&Me.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=jre(e);return new vu(this.method,this.uri,"identity",this.keyFormatVersions,n)}const r=mre(this.uri);if(r)switch(this.keyFormat){case Vn.WIDEVINE:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case Vn.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Hre(n,null,r);const i=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),a=String.fromCharCode.apply(null,Array.from(i)),o=a.substring(a.indexOf("<"),a.length),c=new DOMParser().parseFromString(o,"text/xml").getElementsByTagName("KID")[0];if(c){const u=c.childNodes[0]?c.childNodes[0].nodeValue:c.getAttribute("VALUE");if(u){const f=K0(u).subarray(0,16);vre(f),this.keyId=f}}break}default:{let n=r.subarray(0,16);if(n.length!==16){const i=new Uint8Array(16);i.set(n,16-n.length),n=i}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=vf[this.uri];if(!n){const i=Object.keys(vf).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,i),vf[this.uri]=n}this.keyId=n}return this}}function jre(t){const e=new Uint8Array(16);for(let r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e}const GR=/\{\$([a-zA-Z0-9-_]+)\}/g;function cT(t){return GR.test(t)}function Bn(t,e,r){if(t.variableList!==null||t.hasVariableRefs)for(let n=r.length;n--;){const i=r[n],a=e[i];a&&(e[i]=dm(t,a))}}function dm(t,e){if(t.variableList!==null||t.hasVariableRefs){const r=t.variableList;return e.replace(GR,n=>{const i=n.substring(2,n.length-1),a=r==null?void 0:r[i];return a===void 0?(t.playlistParsingError||(t.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),n):a})}return e}function uT(t,e,r){let n=t.variableList;n||(t.variableList=n={});let i,a;if("QUERYPARAM"in e){i=e.QUERYPARAM;try{const o=new self.URL(r).searchParams;if(o.has(i))a=o.get(i);else throw new Error(`"${i}" does not match any query parameter in URI: "${r}"`)}catch(o){t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${o.message}`))}}else i=e.NAME,a=e.VALUE;i in n?t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):n[i]=a||""}function Wre(t,e,r){const n=e.IMPORT;if(r&&n in r){let i=t.variableList;i||(t.variableList=i={}),i[n]=r[n]}else t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}function ch(){if(!(typeof self>"u"))return self.MediaSource||self.WebKitMediaSource}const Gre={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},fT=ch();function zre(t,e){const r=Gre[e];return!!r&&r[t.slice(0,4)]===!0}function $p(t,e){var r;return(r=fT==null?void 0:fT.isTypeSupported(`${e||"video"}/mp4;codecs="${t}"`))!=null?r:!1}const dT=/#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,hT=/#EXT-X-MEDIA:(.*)/g,Kre=/^#EXT(?:INF|-X-TARGETDURATION):/m,pT=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Yre=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(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)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Fi{static findGroup(e,r){for(let n=0;n<e.length;n++){const i=e[n];if(i.id===r)return i}}static convertAVC1ToAVCOTI(e){const r=e.split(".");if(r.length>2){let n=r.shift()+".";return n+=parseInt(r.shift()).toString(16),n+=("000"+parseInt(r.shift()).toString(16)).slice(-4),n}return e}static resolve(e,r){return z0.buildAbsoluteURL(r,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Kre.test(e)}static parseMasterPlaylist(e,r){const n=cT(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},a=[];dT.lastIndex=0;let o;for(;(o=dT.exec(e))!=null;)if(o[1]){var l;const c=new Ir(o[1]);Bn(i,c,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const u=dm(i,o[2]),f={attrs:c,bitrate:c.decimalInteger("AVERAGE-BANDWIDTH")||c.decimalInteger("BANDWIDTH"),name:c.NAME,url:Fi.resolve(u,r)},d=c.decimalResolution("RESOLUTION");d&&(f.width=d.width,f.height=d.height),qre((c.CODECS||"").split(/[ ,]+/).filter(h=>h),f),f.videoCodec&&f.videoCodec.indexOf("avc1")!==-1&&(f.videoCodec=Fi.convertAVC1ToAVCOTI(f.videoCodec)),(l=f.unknownCodecs)!=null&&l.length||a.push(f),i.levels.push(f)}else if(o[3]){const c=o[3],u=o[4];switch(c){case"SESSION-DATA":{const f=new Ir(u);Bn(i,f,["DATA-ID","LANGUAGE","VALUE","URI"]);const d=f["DATA-ID"];d&&(i.sessionData===null&&(i.sessionData={}),i.sessionData[d]=f);break}case"SESSION-KEY":{const f=vT(u,r,i);f.encrypted&&f.isSupported()?(i.sessionKeys===null&&(i.sessionKeys=[]),i.sessionKeys.push(f)):Me.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${u}"`);break}case"DEFINE":{{const f=new Ir(u);Bn(i,f,["NAME","VALUE","QUERYPARAM"]),uT(i,f,r)}break}case"CONTENT-STEERING":{const f=new Ir(u);Bn(i,f,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:Fi.resolve(f["SERVER-URI"],r),pathwayId:f["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=mT(u);break}}}const s=a.length>0&&a.length<i.levels.length;return i.levels=s?a:i.levels,i.levels.length===0&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,r,n){let i;const a={},o=n.levels,l={AUDIO:o.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:o.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let s=0;for(hT.lastIndex=0;(i=hT.exec(e))!==null;){const c=new Ir(i[1]),u=c.TYPE;if(u){const f=l[u],d=a[u]||[];a[u]=d,Bn(n,c,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const h={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"]||"",instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:u,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?Fi.resolve(c.URI,r):""};if(f!=null&&f.length){const p=Fi.findGroup(f,h.groupId)||f[0];gT(h,p,"audioCodec"),gT(h,p,"textCodec")}d.push(h)}}return a}static parseLevelPlaylist(e,r,n,i,a,o){const l=new hre(r),s=l.fragments;let c=null,u=0,f=0,d=0,h=0,p=null,v=new Mp(i,r),g,m,b,x=-1,T=!1;for(pT.lastIndex=0,l.m3u8=e,l.hasVariableRefs=cT(e);(g=pT.exec(e))!==null;){T&&(T=!1,v=new Mp(i,r),v.start=d,v.sn=u,v.cc=h,v.level=n,c&&(v.initSegment=c,v.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null));const _=g[1];if(_){v.duration=parseFloat(_);const k=(" "+g[2]).slice(1);v.title=k||null,v.tagList.push(k?["INF",_,k]:["INF",_])}else if(g[3]){if(vt(v.duration)){v.start=d,b&&xT(v,b,l),v.sn=u,v.level=n,v.cc=h,v.urlId=a,s.push(v);const k=(" "+g[3]).slice(1);v.relurl=dm(l,k),yT(v,p),p=v,d+=v.duration,u++,f=0,T=!0}}else if(g[4]){const k=(" "+g[4]).slice(1);p?v.setByteRange(k,p):v.setByteRange(k)}else if(g[5])v.rawProgramDateTime=(" "+g[5]).slice(1),v.tagList.push(["PROGRAM-DATE-TIME",v.rawProgramDateTime]),x===-1&&(x=s.length);else{if(g=g[0].match(Yre),!g){Me.warn("No matches on slow regex match for level playlist!");continue}for(m=1;m<g.length&&!(typeof g[m]<"u");m++);const k=(" "+g[m]).slice(1),L=(" "+g[m+1]).slice(1),P=g[m+2]?(" "+g[m+2]).slice(1):"";switch(k){case"PLAYLIST-TYPE":l.type=L.toUpperCase();break;case"MEDIA-SEQUENCE":u=l.startSN=parseInt(L);break;case"SKIP":{const W=new Ir(L);Bn(l,W,["RECENTLY-REMOVED-DATERANGES"]);const q=W.decimalInteger("SKIPPED-SEGMENTS");if(vt(q)){l.skippedSegments=q;for(let G=q;G--;)s.unshift(null);u+=q}const V=W.enumeratedString("RECENTLY-REMOVED-DATERANGES");V&&(l.recentlyRemovedDateranges=V.split("	"));break}case"TARGETDURATION":l.targetduration=Math.max(parseInt(L),1);break;case"VERSION":l.version=parseInt(L);break;case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"#":(L||P)&&v.tagList.push(P?[L,P]:[L]);break;case"DISCONTINUITY":h++,v.tagList.push(["DIS"]);break;case"GAP":v.gap=!0,v.tagList.push([k]);break;case"BITRATE":v.tagList.push([k,L]);break;case"DATERANGE":{const W=new Ir(L);Bn(l,W,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Bn(l,W,W.clientAttrs);const q=new LR(W,l.dateRanges[W.ID]);q.isValid||l.skippedSegments?l.dateRanges[q.id]=q:Me.warn(`Ignoring invalid DATERANGE tag: "${L}"`),v.tagList.push(["EXT-X-DATERANGE",L]);break}case"DEFINE":{{const W=new Ir(L);Bn(l,W,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in W?Wre(l,W,o):uT(l,W,r)}break}case"DISCONTINUITY-SEQUENCE":h=parseInt(L);break;case"KEY":{const W=vT(L,r,l);if(W.isSupported()){if(W.method==="NONE"){b=void 0;break}b||(b={}),b[W.keyFormat]&&(b=zr({},b)),b[W.keyFormat]=W}else Me.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${L}"`);break}case"START":l.startTimeOffset=mT(L);break;case"MAP":{const W=new Ir(L);if(Bn(l,W,["BYTERANGE","URI"]),v.duration){const q=new Mp(i,r);bT(q,W,n,b),c=q,v.initSegment=c,c.rawProgramDateTime&&!v.rawProgramDateTime&&(v.rawProgramDateTime=c.rawProgramDateTime)}else bT(v,W,n,b),c=v,T=!0;break}case"SERVER-CONTROL":{const W=new Ir(L);l.canBlockReload=W.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=W.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&W.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=W.optionalFloat("PART-HOLD-BACK",0),l.holdBack=W.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const W=new Ir(L);l.partTarget=W.decimalFloatingPoint("PART-TARGET");break}case"PART":{let W=l.partList;W||(W=l.partList=[]);const q=f>0?W[W.length-1]:void 0,V=f++,G=new Ir(L);Bn(l,G,["BYTERANGE","URI"]);const pe=new fre(G,v,r,V,q);W.push(pe),v.duration+=pe.duration;break}case"PRELOAD-HINT":{const W=new Ir(L);Bn(l,W,["URI"]),l.preloadHint=W;break}case"RENDITION-REPORT":{const W=new Ir(L);Bn(l,W,["URI"]),l.renditionReports=l.renditionReports||[],l.renditionReports.push(W);break}default:Me.warn(`line parsed but not handled: ${g}`);break}}}p&&!p.relurl?(s.pop(),d-=p.duration,l.partList&&(l.fragmentHint=p)):l.partList&&(yT(v,p),v.cc=h,l.fragmentHint=v,b&&xT(v,b,l));const A=s.length,O=s[0],I=s[A-1];if(d+=l.skippedSegments*l.targetduration,d>0&&A&&I){l.averagetargetduration=d/A;const _=I.sn;l.endSN=_!=="initSegment"?_:0,l.live||(I.endList=!0),O&&(l.startCC=O.cc)}else l.endSN=0,l.startCC=0;return l.fragmentHint&&(d+=l.fragmentHint.duration),l.totalduration=d,l.endCC=h,x>0&&Xre(s,x),l}}function vT(t,e,r){var n,i;const a=new Ir(t);Bn(r,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=(n=a.METHOD)!=null?n:"",l=a.URI,s=a.hexadecimalInteger("IV"),c=a.KEYFORMATVERSIONS,u=(i=a.KEYFORMAT)!=null?i:"identity";l&&a.IV&&!s&&Me.error(`Invalid IV: ${a.IV}`);const f=l?Fi.resolve(l,e):"",d=(c||"1").split("/").map(Number).filter(Number.isFinite);return new vu(o,f,u,d,s)}function mT(t){const r=new Ir(t).decimalFloatingPoint("TIME-OFFSET");return vt(r)?r:null}function qre(t,e){["video","audio","text"].forEach(r=>{const n=t.filter(i=>zre(i,r));if(n.length){const i=n.filter(a=>a.lastIndexOf("avc1",0)===0||a.lastIndexOf("mp4a",0)===0);e[`${r}Codec`]=i.length>0?i[0]:n[0],t=t.filter(a=>n.indexOf(a)===-1)}}),e.unknownCodecs=t}function gT(t,e,r){const n=e[r];n&&(t[r]=n)}function Xre(t,e){let r=t[e];for(let n=e;n--;){const i=t[n];if(!i)return;i.programDateTime=r.programDateTime-i.duration*1e3,r=i}}function yT(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):e!=null&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),vt(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}function bT(t,e,r,n){t.relurl=e.URI,e.BYTERANGE&&t.setByteRange(e.BYTERANGE),t.level=r,t.sn="initSegment",n&&(t.levelkeys=n),t.initSegment=null}function xT(t,e,r){t.levelkeys=e;const{encryptedFragments:n}=r;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(i=>e[i].isCommonEncryption)&&n.push(t)}var tr={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Ct={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function AT(t){const{type:e}=t;switch(e){case tr.AUDIO_TRACK:return Ct.AUDIO;case tr.SUBTITLE_TRACK:return Ct.SUBTITLE;default:return Ct.MAIN}}function Bp(t,e){let r=t.url;return(r===void 0||r.indexOf("data:")===0)&&(r=e.url),r}class Zre{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.LEVEL_LOADING,this.onLevelLoading,this),e.on(z.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(z.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.LEVEL_LOADING,this.onLevelLoading,this),e.off(z.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(z.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const r=this.hls.config,n=r.pLoader,i=r.loader,a=n||i,o=new a(r);return this.loaders[e.type]=o,o}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const r=this.loaders[e];r&&r.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,r){const{url:n}=r;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:tr.MANIFEST,url:n,deliveryDirectives:null})}onLevelLoading(e,r){const{id:n,level:i,url:a,deliveryDirectives:o}=r;this.load({id:n,level:i,responseType:"text",type:tr.LEVEL,url:a,deliveryDirectives:o})}onAudioTrackLoading(e,r){const{id:n,groupId:i,url:a,deliveryDirectives:o}=r;this.load({id:n,groupId:i,level:null,responseType:"text",type:tr.AUDIO_TRACK,url:a,deliveryDirectives:o})}onSubtitleTrackLoading(e,r){const{id:n,groupId:i,url:a,deliveryDirectives:o}=r;this.load({id:n,groupId:i,level:null,responseType:"text",type:tr.SUBTITLE_TRACK,url:a,deliveryDirectives:o})}load(e){var r;const n=this.hls.config;let i=this.getInternalLoader(e);if(i){const c=i.context;if(c&&c.url===e.url){Me.trace("[playlist-loader]: playlist request ongoing");return}Me.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),i.abort()}let a;if(e.type===tr.MANIFEST?a=n.manifestLoadPolicy.default:a=zr({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),(r=e.deliveryDirectives)!=null&&r.part){let c;if(e.type===tr.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===tr.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===tr.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const u=c.partTarget,f=c.targetduration;if(u&&f){const d=Math.max(u*3,f*.8)*1e3;a=zr({},a,{maxTimeToFirstByteMs:Math.min(d,a.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(d,a.maxTimeToFirstByteMs)})}}}const o=a.errorRetry||a.timeoutRetry||{},l={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},s={onSuccess:(c,u,f,d)=>{const h=this.getInternalLoader(f);this.resetInternalLoader(f.type);const p=c.data;if(p.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,f,new Error("no EXTM3U delimiter"),d||null,u);return}u.parsing.start=performance.now(),Fi.isMediaPlaylist(p)?this.handleTrackOrLevelPlaylist(c,u,f,d||null,h):this.handleMasterPlaylist(c,u,f,d)},onError:(c,u,f,d)=>{this.handleNetworkError(u,f,!1,c,d)},onTimeout:(c,u,f)=>{this.handleNetworkError(u,f,!0,void 0,c)}};i.load(e,l,s)}handleMasterPlaylist(e,r,n,i){const a=this.hls,o=e.data,l=Bp(e,n),s=Fi.parseMasterPlaylist(o,l);if(s.playlistParsingError){this.handleManifestParsingError(e,n,s.playlistParsingError,i,r);return}const{contentSteering:c,levels:u,sessionData:f,sessionKeys:d,startTimeOffset:h,variableList:p}=s;this.variableList=p;const{AUDIO:v=[],SUBTITLES:g,"CLOSED-CAPTIONS":m}=Fi.parseMasterPlaylistMedia(o,l,s);v.length&&!v.some(x=>!x.url)&&u[0].audioCodec&&!u[0].attrs.AUDIO&&(Me.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 Ir({}),bitrate:0,url:""})),a.trigger(z.MANIFEST_LOADED,{levels:u,audioTracks:v,subtitles:g,captions:m,contentSteering:c,url:l,stats:r,networkDetails:i,sessionData:f,sessionKeys:d,startTimeOffset:h,variableList:p})}handleTrackOrLevelPlaylist(e,r,n,i,a){const o=this.hls,{id:l,level:s,type:c}=n,u=Bp(e,n),f=vt(l)?l:0,d=vt(s)?s:f,h=AT(n),p=Fi.parseLevelPlaylist(e.data,u,d,h,f,this.variableList);if(c===tr.MANIFEST){const v={attrs:new Ir({}),bitrate:0,details:p,name:"",url:u};o.trigger(z.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:u,stats:r,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}r.parsing.end=performance.now(),n.levelDetails=p,this.handlePlaylistLoaded(p,e,r,n,i,a)}handleManifestParsingError(e,r,n,i,a){this.hls.trigger(z.ERROR,{type:Tt.NETWORK_ERROR,details:ze.MANIFEST_PARSING_ERROR,fatal:r.type===tr.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:r,networkDetails:i,stats:a})}handleNetworkError(e,r,n=!1,i,a){let o=`A network ${n?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===tr.LEVEL?o+=`: ${e.level} id: ${e.id}`:(e.type===tr.AUDIO_TRACK||e.type===tr.SUBTITLE_TRACK)&&(o+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(o);Me.warn(`[playlist-loader]: ${o}`);let s=ze.UNKNOWN,c=!1;const u=this.getInternalLoader(e);switch(e.type){case tr.MANIFEST:s=n?ze.MANIFEST_LOAD_TIMEOUT:ze.MANIFEST_LOAD_ERROR,c=!0;break;case tr.LEVEL:s=n?ze.LEVEL_LOAD_TIMEOUT:ze.LEVEL_LOAD_ERROR,c=!1;break;case tr.AUDIO_TRACK:s=n?ze.AUDIO_TRACK_LOAD_TIMEOUT:ze.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case tr.SUBTITLE_TRACK:s=n?ze.SUBTITLE_TRACK_LOAD_TIMEOUT:ze.SUBTITLE_LOAD_ERROR,c=!1;break}u&&this.resetInternalLoader(e.type);const f={type:Tt.NETWORK_ERROR,details:s,fatal:c,url:e.url,loader:u,context:e,error:l,networkDetails:r,stats:a};if(i){const d=(r==null?void 0:r.url)||e.url;f.response=kn({url:d,data:void 0},i)}this.hls.trigger(z.ERROR,f)}handlePlaylistLoaded(e,r,n,i,a,o){const l=this.hls,{type:s,level:c,id:u,groupId:f,deliveryDirectives:d}=i,h=Bp(r,i),p=AT(i),v=typeof i.level=="number"&&p===Ct.MAIN?c:void 0;if(!e.fragments.length){const m=new Error("No Segments found in Playlist");l.trigger(z.ERROR,{type:Tt.NETWORK_ERROR,details:ze.LEVEL_EMPTY_ERROR,fatal:!1,url:h,error:m,reason:m.message,response:r,context:i,level:v,parent:p,networkDetails:a,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const g=e.playlistParsingError;if(g){l.trigger(z.ERROR,{type:Tt.NETWORK_ERROR,details:ze.LEVEL_PARSING_ERROR,fatal:!1,url:h,error:g,reason:g.message,response:r,context:i,level:v,parent:p,networkDetails:a,stats:n});return}switch(e.live&&o&&(o.getCacheAge&&(e.ageHeader=o.getCacheAge()||0),(!o.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),s){case tr.MANIFEST:case tr.LEVEL:l.trigger(z.LEVEL_LOADED,{details:e,level:v||0,id:u||0,stats:n,networkDetails:a,deliveryDirectives:d});break;case tr.AUDIO_TRACK:l.trigger(z.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:f||"",stats:n,networkDetails:a,deliveryDirectives:d});break;case tr.SUBTITLE_TRACK:l.trigger(z.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:f||"",stats:n,networkDetails:a,deliveryDirectives:d});break}}}function zR(t,e){let r;try{r=new Event("addtrack")}catch{r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function KR(t,e){const r=t.mode;if(r==="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(n){Me.debug(`[texttrack-utils]: ${n}`);try{const i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,t.addCue(i)}catch(i){Me.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`)}}r==="disabled"&&(t.mode=r)}function nl(t){const e=t.mode;if(e==="disabled"&&(t.mode="hidden"),t.cues)for(let r=t.cues.length;r--;)t.removeCue(t.cues[r]);e==="disabled"&&(t.mode=e)}function hm(t,e,r,n){const i=t.mode;if(i==="disabled"&&(t.mode="hidden"),t.cues&&t.cues.length>0){const a=Qre(t.cues,e,r);for(let o=0;o<a.length;o++)(!n||n(a[o]))&&t.removeCue(a[o])}i==="disabled"&&(t.mode=i)}function Jre(t,e){if(e<t[0].startTime)return 0;const r=t.length-1;if(e>t[r].endTime)return-1;let n=0,i=r;for(;n<=i;){const a=Math.floor((i+n)/2);if(e<t[a].startTime)i=a-1;else if(e>t[a].startTime&&n<r)n=a+1;else return a}return t[n].startTime-e<e-t[i].startTime?n:i}function Qre(t,e,r){const n=[],i=Jre(t,e);if(i>-1)for(let a=i,o=t.length;a<o;a++){const l=t[a];if(l.startTime>=e&&l.endTime<=r)n.push(l);else if(l.startTime>r)return n}return n}var ki={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const ene=.25;function pm(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function ET(t,e,r,n,i){let a=new t(e,r,"");try{a.value=n,i&&(a.type=i)}catch{a=new t(e,r,JSON.stringify(i?kn({type:i},n):n))}return a}const mf=(()=>{const t=pm();try{t&&new t(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Up(t,e){return t.getTime()/1e3-e}function tne(t){return Uint8Array.from(t.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class rne{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(z.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(z.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(z.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(z.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,r){this.media=r.media}onMediaDetaching(){this.id3Track&&(nl(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const r=this.getID3Track(e.textTracks);return r.mode="hidden",r}getID3Track(e){if(this.media){for(let r=0;r<e.length;r++){const n=e[r];if(n.kind==="metadata"&&n.label==="id3")return zR(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,r){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:i}}}=this;if(!n&&!i)return;const{samples:a}=r;this.id3Track||(this.id3Track=this.createTrack(this.media));const o=pm();if(o)for(let l=0;l<a.length;l++){const s=a[l].type;if(s===ki.emsg&&!n||!i)continue;const c=NR(a[l].data);if(c){const u=a[l].pts;let f=u+a[l].duration;f>mf&&(f=mf),f-u<=0&&(f=u+ene);for(let h=0;h<c.length;h++){const p=c[h];if(!PR(p)){this.updateId3CueEnds(u,s);const v=ET(o,u,f,p,s);v&&this.id3Track.addCue(v)}}}}}updateId3CueEnds(e,r){var n;const i=(n=this.id3Track)==null?void 0:n.cues;if(i)for(let a=i.length;a--;){const o=i[a];o.type===r&&o.startTime<e&&o.endTime===mf&&(o.endTime=e)}}onBufferFlushing(e,{startOffset:r,endOffset:n,type:i}){const{id3Track:a,hls:o}=this;if(!o)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:s}}=o;if(a&&(l||s)){let c;i==="audio"?c=u=>u.type===ki.audioId3&&s:i==="video"?c=u=>u.type===ki.emsg&&l:c=u=>u.type===ki.audioId3&&s||u.type===ki.emsg&&l,hm(a,r,n,c)}}onLevelUpdated(e,{details:r}){if(!this.media||!r.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:n,id3Track:i}=this,{dateRanges:a}=r,o=Object.keys(a);if(i){const u=Object.keys(n).filter(f=>!o.includes(f));for(let f=u.length;f--;){const d=u[f];Object.keys(n[d].cues).forEach(h=>{i.removeCue(n[d].cues[h])}),delete n[d]}}const l=r.fragments[r.fragments.length-1];if(o.length===0||!vt(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=l.programDateTime/1e3-l.start,c=pm();for(let u=0;u<o.length;u++){const f=o[u],d=a[f],h=n[f],p=(h==null?void 0:h.cues)||{};let v=(h==null?void 0:h.durationKnown)||!1;const g=Up(d.startDate,s);let m=mf;const b=d.endDate;if(b)m=Up(b,s),v=!0;else if(d.endOnNext&&!v){const T=o.reduce((A,O)=>{const I=a[O];return I.class===d.class&&I.id!==O&&I.startDate>d.startDate&&A.push(I),A},[]).sort((A,O)=>A.startDate.getTime()-O.startDate.getTime())[0];T&&(m=Up(T.startDate,s),v=!0)}const x=Object.keys(d.attr);for(let T=0;T<x.length;T++){const A=x[T];if(!cre(A))continue;const O=p[A];if(O)v&&!h.durationKnown&&(O.endTime=m);else if(c){let I=d.attr[A];ure(A)&&(I=tne(I));const _=ET(c,g,m,{key:A,data:I},ki.dateRange);_&&(_.id=f,this.id3Track.addCue(_),p[A]=_)}}n[f]={cues:p,dateRange:d,durationKnown:v}}}}class nne{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:r}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:r?e.liveMaxLatencyDurationCount*r.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:r,partHoldBack:n,targetduration:i}=e,{liveSyncDuration:a,liveSyncDurationCount:o,lowLatencyMode:l}=this.config,s=this.hls.userConfig;let c=l&&n||r;(s.liveSyncDuration||s.liveSyncDurationCount||c===0)&&(c=a!==void 0?a:o*i);const u=i,f=1;return c+Math.min(this.stallCount*f,u)}get liveSyncPosition(){const e=this.estimateLiveEdge(),r=this.targetLatency,n=this.levelDetails;if(e===null||r===null||n===null)return null;const i=n.edge,a=e-r-this.edgeStalled,o=i-n.totalduration,l=i-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(o,a),l)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const r=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-r,0)}get forwardBufferLength(){const{media:e,levelDetails:r}=this;if(!e||!r)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):r.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(z.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(z.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(z.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(z.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(z.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(z.ERROR,this.onError,this)}onMediaAttached(e,r){this.media=r.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:r}){this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,r){var n;r.details===ze.BUFFER_STALLED_ERROR&&(this.stallCount++,(n=this.levelDetails)!=null&&n.live&&Me.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:r}=this;if(!e||!r)return;this.currentTime=e.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:a}=this.config;if(!i||a===1)return;const o=this.targetLatency;if(o===null)return;const l=n-o,s=Math.min(this.maxLatency,o+r.targetduration),c=l<s;if(r.live&&c&&l>.05&&this.forwardBufferLength>1){const u=Math.min(2,Math.max(1,a)),f=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20;e.playbackRate=Math.min(u,Math.max(1,f))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const vm=["NONE","TYPE-0","TYPE-1",null];var Qc={No:"",Yes:"YES",v2:"v2"};function ine(t,e){const{canSkipUntil:r,canSkipDateRanges:n,endSN:i}=t,a=e!==void 0?e-i:0;return r&&a<r?n?Qc.v2:Qc.Yes:Qc.No}class TT{constructor(e,r,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=r,this.skip=n}addDirectives(e){const r=new self.URL(e);return this.msn!==void 0&&r.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&r.searchParams.set("_HLS_part",this.part.toString()),this.skip&&r.searchParams.set("_HLS_skip",this.skip),r.href}}class mu{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=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.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>r).join(",").replace(/\.[^.,]+/g,"")}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get attrs(){return this._attrs[this._urlId]}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get uri(){return this.url[this._urlId]||""}get urlId(){return this._urlId}set urlId(e){const r=e%this.url.length;this._urlId!==r&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=r)}get audioGroupId(){var e;return(e=this.audioGroupIds)==null?void 0:e[this.urlId]}get textGroupId(){var e;return(e=this.textGroupIds)==null?void 0:e[this.urlId]}addFallback(e){this.url.push(e.url),this._attrs.push(e.attrs)}}function Hp(t,e){const r=e.startPTS;if(vt(r)){let n=0,i;e.sn>t.sn?(n=r-t.start,i=t):(n=t.start-r,i=e),i.duration!==n&&(i.duration=n)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function YR(t,e,r,n,i,a){n-r<=0&&(Me.warn("Fragment should have a positive duration",e),n=r+e.duration,a=i+e.duration);let l=r,s=n;const c=e.startPTS,u=e.endPTS;if(vt(c)){const g=Math.abs(c-r);vt(e.deltaPTS)?e.deltaPTS=Math.max(g,e.deltaPTS):e.deltaPTS=g,l=Math.max(r,c),r=Math.min(r,c),i=Math.min(i,e.startDTS),s=Math.min(n,u),n=Math.max(n,u),a=Math.max(a,e.endDTS)}const f=r-e.start;e.start!==0&&(e.start=r),e.duration=n-e.start,e.startPTS=r,e.maxStartPTS=l,e.startDTS=i,e.endPTS=n,e.minEndPTS=s,e.endDTS=a;const d=e.sn;if(!t||d<t.startSN||d>t.endSN)return 0;let h;const p=d-t.startSN,v=t.fragments;for(v[p]=e,h=p;h>0;h--)Hp(v[h],v[h-1]);for(h=p;h<v.length-1;h++)Hp(v[h],v[h+1]);return t.fragmentHint&&Hp(v[v.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,f}function ane(t,e){let r=null;const n=t.fragments;for(let s=n.length-1;s>=0;s--){const c=n[s].initSegment;if(c){r=c;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;let i=0,a;if(lne(t,e,(s,c)=>{s.relurl&&(i=s.cc-c.cc),vt(s.startPTS)&&vt(s.endPTS)&&(c.start=c.startPTS=s.startPTS,c.startDTS=s.startDTS,c.maxStartPTS=s.maxStartPTS,c.endPTS=s.endPTS,c.endDTS=s.endDTS,c.minEndPTS=s.minEndPTS,c.duration=s.endPTS-s.startPTS,c.duration&&(a=c),e.PTSKnown=e.alignedSliding=!0),c.elementaryStreams=s.elementaryStreams,c.loader=s.loader,c.stats=s.stats,c.urlId=s.urlId,s.initSegment&&(c.initSegment=s.initSegment,r=s.initSegment)}),r&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach(c=>{var u;(!c.initSegment||c.initSegment.relurl===((u=r)==null?void 0:u.relurl))&&(c.initSegment=r)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(s=>!s),e.deltaUpdateFailed){Me.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let s=e.skippedSegments;s--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=one(t.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const o=e.fragments;if(i){Me.warn("discontinuity sliding from playlist, take drift into account");for(let s=0;s<o.length;s++)o[s].cc+=i}e.skippedSegments&&(e.startCC=e.fragments[0].cc),sne(t.partList,e.partList,(s,c)=>{c.elementaryStreams=s.elementaryStreams,c.stats=s.stats}),a?YR(e,a,a.startPTS,a.endPTS,a.startDTS,a.endDTS):qR(t,e),o.length&&(e.totalduration=e.edge-o[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const s=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=s),e.driftEndTime=l,e.driftEnd=s}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function one(t,e,r){const n=zr({},t);return r&&r.forEach(i=>{delete n[i]}),Object.keys(e).forEach(i=>{const a=new LR(e[i].attr,n[i]);a.isValid?n[i]=a:Me.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[i].attr)}"`)}),n}function sne(t,e,r){if(t&&e){let n=0;for(let i=0,a=t.length;i<=a;i++){const o=t[i],l=e[i+n];o&&l&&o.index===l.index&&o.fragment.sn===l.fragment.sn?r(o,l):n--}}}function lne(t,e,r){const n=e.skippedSegments,i=Math.max(t.startSN,e.startSN)-e.startSN,a=(t.fragmentHint?1:0)+(n?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,o=e.startSN-t.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;for(let c=i;c<=a;c++){const u=s[o+c];let f=l[c];n&&!f&&c<n&&(f=e.fragments[c]=u),u&&f&&r(u,f)}}function qR(t,e){const r=e.startSN+e.skippedSegments-t.startSN,n=t.fragments;r<0||r>=n.length||mm(e,n[r].start)}function mm(t,e){if(e){const r=t.fragments;for(let n=t.skippedSegments;n<r.length;n++)r[n].start+=e;t.fragmentHint&&(t.fragmentHint.start+=e)}}function cne(t,e=1/0){let r=1e3*t.targetduration;if(t.updated){const n=t.fragments,i=4;if(n.length&&r*i>e){const a=n[n.length-1].duration*1e3;a<r&&(r=a)}}else r/=2;return Math.round(r)}function une(t,e,r){if(!(t!=null&&t.details))return null;const n=t.details;let i=n.fragments[e-n.startSN];return i||(i=n.fragmentHint,i&&i.sn===e)?i:e<n.startSN&&r&&r.sn===e?r:null}function ST(t,e,r){var n;return t!=null&&t.details?XR((n=t.details)==null?void 0:n.partList,e,r):null}function XR(t,e,r){if(t)for(let n=t.length;n--;){const i=t[n];if(i.index===r&&i.fragment.sn===e)return i}return null}function gd(t){switch(t.details){case ze.FRAG_LOAD_TIMEOUT:case ze.KEY_LOAD_TIMEOUT:case ze.LEVEL_LOAD_TIMEOUT:case ze.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function wT(t,e){const r=gd(e);return t.default[`${r?"timeout":"error"}Retry`]}function q0(t,e){const r=t.backoff==="linear"?1:Math.pow(2,e);return Math.min(r*t.retryDelayMs,t.maxRetryDelayMs)}function CT(t){return kn(kn({},t),{errorRetry:null,timeoutRetry:null})}function yd(t,e,r,n){return!!t&&e<t.maxNumRetry&&(fne(n)||!!r)}function fne(t){return t===0&&navigator.onLine===!1||!!t&&(t<400||t>499)}const ZR={search:function(t,e){let r=0,n=t.length-1,i=null,a=null;for(;r<=n;){i=(r+n)/2|0,a=t[i];const o=e(a);if(o>0)r=i+1;else if(o<0)n=i-1;else return a}return null}};function dne(t,e,r){if(e===null||!Array.isArray(t)||!t.length||!vt(e))return null;const n=t[0].programDateTime;if(e<(n||0))return null;const i=t[t.length-1].endProgramDateTime;if(e>=(i||0))return null;r=r||0;for(let a=0;a<t.length;++a){const o=t[a];if(hne(e,r,o))return o}return null}function gu(t,e,r=0,n=0){let i=null;if(t?i=e[t.sn-e[0].sn+1]||null:r===0&&e[0].start===0&&(i=e[0]),i&&gm(r,n,i)===0)return i;const a=ZR.search(e,gm.bind(null,r,n));return a&&(a!==t||!i)?a:i}function gm(t=0,e=0,r){if(r.start<=t&&r.start+r.duration>t)return 0;const n=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-n<=t?1:r.start-n>t&&r.start?-1:0}function hne(t,e,r){const n=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3;return(r.endProgramDateTime||0)-n>t}function pne(t,e){return ZR.search(t,r=>r.cc<e?1:r.cc>e?-1:0)}const vne=3e5;var gn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},mi={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class mne{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=Me.log.bind(Me,"[info]:"),this.warn=Me.warn.bind(Me,"[warning]:"),this.error=Me.error.bind(Me,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(z.ERROR,this.onError,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(z.ERROR,this.onError,this),e.off(z.ERROR,this.onErrorOut,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){this.playlistError=0}stopLoad(){}getVariantLevelIndex(e){return(e==null?void 0:e.type)===Ct.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,r){var n,i;if(r.fatal)return;const a=this.hls,o=r.context;switch(r.details){case ze.FRAG_LOAD_ERROR:case ze.FRAG_LOAD_TIMEOUT:case ze.KEY_LOAD_ERROR:case ze.KEY_LOAD_TIMEOUT:r.errorAction=this.getFragRetryOrSwitchAction(r);return;case ze.FRAG_PARSING_ERROR:if((n=r.frag)!=null&&n.gap){r.errorAction={action:gn.DoNothing,flags:mi.None};return}case ze.FRAG_GAP:case ze.FRAG_DECRYPT_ERROR:{r.errorAction=this.getFragRetryOrSwitchAction(r),r.errorAction.action=gn.SendAlternateToPenaltyBox;return}case ze.LEVEL_EMPTY_ERROR:case ze.LEVEL_PARSING_ERROR:{var l,s;const c=r.parent===Ct.MAIN?r.level:a.loadLevel;r.details===ze.LEVEL_EMPTY_ERROR&&((l=r.context)!=null&&(s=l.levelDetails)!=null&&s.live)?r.errorAction=this.getPlaylistRetryOrSwitchAction(r,c):(r.levelRetry=!1,r.errorAction=this.getLevelSwitchAction(r,c))}return;case ze.LEVEL_LOAD_ERROR:case ze.LEVEL_LOAD_TIMEOUT:typeof(o==null?void 0:o.level)=="number"&&(r.errorAction=this.getPlaylistRetryOrSwitchAction(r,o.level));return;case ze.AUDIO_TRACK_LOAD_ERROR:case ze.AUDIO_TRACK_LOAD_TIMEOUT:case ze.SUBTITLE_LOAD_ERROR:case ze.SUBTITLE_TRACK_LOAD_TIMEOUT:if(o){const c=a.levels[a.loadLevel];if(c&&(o.type===tr.AUDIO_TRACK&&o.groupId===c.audioGroupId||o.type===tr.SUBTITLE_TRACK&&o.groupId===c.textGroupId)){r.errorAction=this.getPlaylistRetryOrSwitchAction(r,a.loadLevel),r.errorAction.action=gn.SendAlternateToPenaltyBox,r.errorAction.flags=mi.MoveAllAlternatesMatchingHost;return}}return;case ze.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=a.levels[a.loadLevel],u=c==null?void 0:c.attrs["HDCP-LEVEL"];u&&(r.errorAction={action:gn.SendAlternateToPenaltyBox,flags:mi.MoveAllAlternatesMatchingHDCP,hdcpLevel:u})}return;case ze.BUFFER_ADD_CODEC_ERROR:case ze.REMUX_ALLOC_ERROR:r.errorAction=this.getLevelSwitchAction(r,(i=r.level)!=null?i:a.loadLevel);return;case ze.INTERNAL_EXCEPTION:case ze.BUFFER_APPENDING_ERROR:case ze.BUFFER_APPEND_ERROR:case ze.BUFFER_FULL_ERROR:case ze.LEVEL_SWITCH_ERROR:case ze.BUFFER_STALLED_ERROR:case ze.BUFFER_SEEK_OVER_HOLE:case ze.BUFFER_NUDGE_ON_STALL:r.errorAction={action:gn.DoNothing,flags:mi.None};return}if(r.type===Tt.KEY_SYSTEM_ERROR){const c=this.getVariantLevelIndex(r.frag);r.levelRetry=!1,r.errorAction=this.getLevelSwitchAction(r,c);return}}getPlaylistRetryOrSwitchAction(e,r){var n;const i=this.hls,a=wT(i.config.playlistLoadPolicy,e),o=this.playlistError++,l=(n=e.response)==null?void 0:n.code;if(yd(a,o,gd(e),l))return{action:gn.RetryRequest,flags:mi.None,retryConfig:a,retryCount:o};const c=this.getLevelSwitchAction(e,r);return a&&(c.retryConfig=a,c.retryCount=o),c}getFragRetryOrSwitchAction(e){const r=this.hls,n=this.getVariantLevelIndex(e.frag),i=r.levels[n],{fragLoadPolicy:a,keyLoadPolicy:o}=r.config,l=wT(e.details.startsWith("key")?o:a,e),s=r.levels.reduce((f,d)=>f+d.fragmentError,0);if(i){var c;e.details!==ze.FRAG_GAP&&i.fragmentError++;const f=(c=e.response)==null?void 0:c.code;if(yd(l,s,gd(e),f))return{action:gn.RetryRequest,flags:mi.None,retryConfig:l,retryCount:s}}const u=this.getLevelSwitchAction(e,n);return l&&(u.retryConfig=l,u.retryCount=s),u}getLevelSwitchAction(e,r){const n=this.hls;r==null&&(r=n.loadLevel);const i=this.hls.levels[r];if(i&&(i.loadError++,n.autoLevelEnabled)){var a,o;let l=-1;const{levels:s,loadLevel:c,minAutoLevel:u,maxAutoLevel:f}=n,d=(a=e.frag)==null?void 0:a.type,{type:h,groupId:p}=(o=e.context)!=null?o:{};for(let v=s.length;v--;){const g=(v+c)%s.length;if(g!==c&&g>=u&&g<=f&&s[g].loadError===0){const m=s[g];if(e.details===ze.FRAG_GAP&&e.frag){const b=s[g].details;if(b){const x=gu(e.frag,b.fragments,e.frag.start);if(x!=null&&x.gap)continue}}else{if(h===tr.AUDIO_TRACK&&p===m.audioGroupId||h===tr.SUBTITLE_TRACK&&p===m.textGroupId)continue;if(d===Ct.AUDIO&&i.audioGroupId===m.audioGroupId||d===Ct.SUBTITLE&&i.textGroupId===m.textGroupId)continue}l=g;break}}if(l>-1&&n.loadLevel!==l)return e.levelRetry=!0,this.playlistError=0,{action:gn.SendAlternateToPenaltyBox,flags:mi.None,nextAutoLevel:l}}return{action:gn.SendAlternateToPenaltyBox,flags:mi.MoveAllAlternatesMatchingHost}}onErrorOut(e,r){var n;switch((n=r.errorAction)==null?void 0:n.action){case gn.DoNothing:break;case gn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(r),!r.errorAction.resolved&&r.details!==ze.FRAG_GAP&&(r.fatal=!0);break}if(r.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const r=this.hls,n=e.errorAction;if(!n)return;const{flags:i,hdcpLevel:a,nextAutoLevel:o}=n;switch(i){case mi.None:this.switchLevel(e,o);break;case mi.MoveAllAlternatesMatchingHost:n.resolved||(n.resolved=this.redundantFailover(e));break;case mi.MoveAllAlternatesMatchingHDCP:a&&(r.maxHdcpLevel=vm[vm.indexOf(a)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${r.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,o)}switchLevel(e,r){r!==void 0&&e.errorAction&&(this.warn(`switching to level ${r} after ${e.details}`),this.hls.nextAutoLevel=r,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}redundantFailover(e){const{hls:r,penalizedRenditions:n}=this,i=e.parent===Ct.MAIN?e.level:r.loadLevel,a=r.levels[i],o=a.url.length,l=e.frag?e.frag.urlId:a.urlId;a.urlId===l&&(!e.frag||a.details)&&this.penalizeRendition(a,e);for(let s=1;s<o;s++){const c=(l+s)%o,u=n[c];if(!u||gne(u,e,n[l]))return this.warn(`Switching to Redundant Stream ${c+1}/${o}: "${a.url[c]}" after ${e.details}`),this.playlistError=0,r.levels.forEach(f=>{f.urlId=c}),r.nextLoadLevel=i,!0}return!1}penalizeRendition(e,r){const{penalizedRenditions:n}=this,i=n[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};i.lastErrorPerfMs=performance.now(),i.errors.push(r),i.details=e.details,n[e.urlId]=i}}function gne(t,e,r){if(performance.now()-t.lastErrorPerfMs>vne)return!0;const n=t.details;if(e.details===ze.FRAG_GAP&&n&&e.frag){const i=e.frag.start,a=gu(null,n.fragments,i);if(a&&!a.gap)return!0}if(r&&t.errors.length<r.errors.length){const i=t.errors[t.errors.length-1];if(n&&i.frag&&e.frag&&Math.abs(i.frag.start-e.frag.start)>n.targetduration*3)return!0}return!1}class X0{constructor(e,r){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=Me.log.bind(Me,`${r}:`),this.warn=Me.warn.bind(Me,`${r}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){clearTimeout(this.timer),this.timer=-1}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,r){const n=r==null?void 0:r.renditionReports;if(n){let i=-1;for(let a=0;a<n.length;a++){const o=n[a];let l;try{l=new self.URL(o.URI,r.url).href}catch(s){Me.warn(`Could not construct new URL for Rendition Report: ${s}`),l=o.URI||""}if(l===e){i=a;break}else l===e.substring(0,l.length)&&(i=a)}if(i!==-1){const a=n[i],o=parseInt(a["LAST-MSN"])||(r==null?void 0:r.lastPartSn);let l=parseInt(a["LAST-PART"])||(r==null?void 0:r.lastPartIndex);if(this.hls.config.lowLatencyMode){const s=Math.min(r.age-r.partTarget,r.targetduration);l>=0&&s>r.partTarget&&(l+=1)}return new TT(o,l>=0?l:void 0,Qc.No)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,r,n){const{details:i,stats:a}=r,o=self.performance.now(),l=a.loading.first?Math.max(0,o-a.loading.first):0;if(i.advancedDateTime=Date.now()-l,i.live||n!=null&&n.live){if(i.reloaded(n),n&&this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),n&&i.fragments.length>0&&ane(n,i),!this.canLoad||!i.live)return;let s,c,u;if(i.canBlockReload&&i.endSN&&i.advanced){const g=this.hls.config.lowLatencyMode,m=i.lastPartSn,b=i.endSN,x=i.lastPartIndex,T=x!==-1,A=m===b,O=g?0:x;T?(c=A?b+1:m,u=A?O:x+1):c=b+1;const I=i.age,_=I+i.ageHeader;let k=Math.min(_-i.partTarget,i.targetduration*1.5);if(k>0){if(n&&k>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${k} with playlist age: ${i.age}`),k=0;else{const L=Math.floor(k/i.targetduration);if(c+=L,u!==void 0){const P=Math.round(k%i.targetduration/i.partTarget);u+=P}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${I.toFixed(2)}s goal: ${k} skip sn ${L} to part ${u}`)}i.tuneInGoal=k}if(s=this.getDeliveryDirectives(i,r.deliveryDirectives,c,u),g||!A){this.loadPlaylist(s);return}}else(i.canBlockReload||i.canSkipUntil)&&(s=this.getDeliveryDirectives(i,r.deliveryDirectives,c,u));const f=this.hls.mainForwardBufferInfo,d=f?f.end-f.len:0,h=(i.edge-d)*1e3,p=cne(i,h);i.updated&&o>this.requestScheduled+p&&(this.requestScheduled=a.loading.start),c!==void 0&&i.canBlockReload?this.requestScheduled=a.loading.first+p-(i.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+p<o?this.requestScheduled=o:this.requestScheduled-o<=0&&(this.requestScheduled+=p);let v=this.requestScheduled-o;v=Math.max(0,v),this.log(`reload live playlist ${e} in ${Math.round(v)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(s),v)}else this.clearTimer()}getDeliveryDirectives(e,r,n,i){let a=ine(e,n);return r!=null&&r.skip&&e.deltaUpdateFailed&&(n=r.msn,i=r.part,a=Qc.No),new TT(n,i,a)}checkRetry(e){const r=e.details,n=gd(e),i=e.errorAction,{action:a,retryCount:o=0,retryConfig:l}=i||{},s=!!i&&!!l&&(a===gn.RetryRequest||!i.resolved&&a===gn.SendAlternateToPenaltyBox);if(s){var c;if(this.requestScheduled=-1,o>=l.maxNumRetry)return!1;if(n&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${o+1}/${l.maxNumRetry} after "${r}" without delivery-directives`),this.loadPlaylist();else{const u=q0(l,o);this.timer=self.setTimeout(()=>this.loadPlaylist(),u),this.warn(`Retrying playlist loading ${o+1}/${l.maxNumRetry} after "${r}" in ${u}ms`)}e.levelRetry=!0,i.resolved=!0}return s}}let Vp;class yne extends X0{constructor(e,r){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=r,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(z.LEVEL_LOADED,this.onLevelLoaded,this),e.on(z.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(z.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(z.FRAG_LOADED,this.onFragLoaded,this),e.on(z.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(z.LEVEL_LOADED,this.onLevelLoaded,this),e.off(z.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(z.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(z.FRAG_LOADED,this.onFragLoaded,this),e.off(z.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}startLoad(){this._levels.forEach(r=>{r.loadError=0,r.fragmentError=0}),super.startLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]}onManifestLoading(e,r){this.resetLevels()}onManifestLoaded(e,r){const n=[],i={};let a;r.levels.forEach(o=>{var l;const s=o.attrs;((l=o.audioCodec)==null?void 0:l.indexOf("mp4a.40.34"))!==-1&&(Vp||(Vp=/chrome|firefox/i.test(navigator.userAgent)),Vp&&(o.audioCodec=void 0));const{AUDIO:c,CODECS:u,"FRAME-RATE":f,"PATHWAY-ID":d,RESOLUTION:h,SUBTITLES:p}=s,g=`${`${d||"."}-`}${o.bitrate}-${h}-${f}-${u}`;a=i[g],a?a.addFallback(o):(a=new mu(o),i[g]=a,n.push(a)),bd(a,"audio",c),bd(a,"text",p)}),this.filterAndSortMediaOptions(n,r)}filterAndSortMediaOptions(e,r){let n=[],i=[],a=!1,o=!1,l=!1,s=e.filter(({audioCodec:h,videoCodec:p,width:v,height:g,unknownCodecs:m})=>(a||(a=!!(v&&g)),o||(o=!!p),l||(l=!!h),!(m!=null&&m.length)&&(!h||$p(h,"audio"))&&(!p||$p(p,"video"))));if((a||o)&&l&&(s=s.filter(({videoCodec:h,width:p,height:v})=>!!h||!!(p&&v))),s.length===0){Promise.resolve().then(()=>{if(this.hls){const h=new Error("no level with compatible codecs found in manifest");this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:r.url,error:h,reason:h.message})}});return}r.audioTracks&&(n=r.audioTracks.filter(h=>!h.audioCodec||$p(h.audioCodec,"audio")),IT(n)),r.subtitles&&(i=r.subtitles,IT(i));const c=s.slice(0);s.sort((h,p)=>h.attrs["HDCP-LEVEL"]!==p.attrs["HDCP-LEVEL"]?(h.attrs["HDCP-LEVEL"]||"")>(p.attrs["HDCP-LEVEL"]||"")?1:-1:h.bitrate!==p.bitrate?h.bitrate-p.bitrate:h.attrs["FRAME-RATE"]!==p.attrs["FRAME-RATE"]?h.attrs.decimalFloatingPoint("FRAME-RATE")-p.attrs.decimalFloatingPoint("FRAME-RATE"):h.attrs.SCORE!==p.attrs.SCORE?h.attrs.decimalFloatingPoint("SCORE")-p.attrs.decimalFloatingPoint("SCORE"):a&&h.height!==p.height?h.height-p.height:0);let u=c[0];if(this.steering&&(s=this.steering.filterParsedLevels(s),s.length!==c.length)){for(let h=0;h<c.length;h++)if(c[h].pathwayId===s[0].pathwayId){u=c[h];break}}this._levels=s;for(let h=0;h<s.length;h++)if(s[h]===u){this._firstLevel=h,this.log(`manifest loaded, ${s.length} level(s) found, first bitrate: ${u.bitrate}`);break}const f=l&&!o,d={levels:s,audioTracks:n,subtitleTracks:i,sessionData:r.sessionData,sessionKeys:r.sessionKeys,firstLevel:this._firstLevel,stats:r.stats,audio:l,video:o,altAudio:!f&&n.some(h=>!!h.url)};this.hls.trigger(z.MANIFEST_PARSED,d),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const r=this._levels;if(r.length===0)return;if(e<0||e>=r.length){const u=new Error("invalid level idx"),f=e<0;if(this.hls.trigger(z.ERROR,{type:Tt.OTHER_ERROR,details:ze.LEVEL_SWITCH_ERROR,level:e,fatal:f,error:u,reason:u.message}),f)return;e=Math.min(e,r.length-1)}const n=this.currentLevelIndex,i=this.currentLevel,a=i?i.attrs["PATHWAY-ID"]:void 0,o=r[e],l=o.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=o,n===e&&o.details&&i&&a===l)return;this.log(`Switching to level ${e}${l?" with Pathway "+l:""} from level ${n}${a?" with Pathway "+a:""}`);const s=zr({},o,{level:e,maxBitrate:o.maxBitrate,attrs:o.attrs,uri:o.uri,urlId:o.urlId});delete s._attrs,delete s._urlId,this.hls.trigger(z.LEVEL_SWITCHING,s);const c=o.details;if(!c||c.live){const u=this.switchParams(o.uri,i==null?void 0:i.details);this.loadPlaylist(u)}}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._firstLevel}else return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,r){r.fatal||!r.context||r.context.type===tr.LEVEL&&r.context.level===this.level&&this.checkRetry(r)}onFragLoaded(e,{frag:r}){if(r!==void 0&&r.type===Ct.MAIN){const n=this._levels[r.level];n!==void 0&&(n.loadError=0)}}onLevelLoaded(e,r){var n;const{level:i,details:a}=r,o=this._levels[i];if(!o){var l;this.warn(`Invalid level index ${i}`),(l=r.deliveryDirectives)!=null&&l.skip&&(a.deltaUpdateFailed=!0);return}i===this.currentLevelIndex?(o.fragmentError===0&&(o.loadError=0),this.playlistLoaded(i,r,o.details)):(n=r.deliveryDirectives)!=null&&n.skip&&(a.deltaUpdateFailed=!0)}onAudioTrackSwitched(e,r){const n=this.currentLevel;if(!n)return;const i=this.hls.audioTracks[r.id].groupId;if(n.audioGroupIds&&n.audioGroupId!==i){let a=-1;for(let o=0;o<n.audioGroupIds.length;o++)if(n.audioGroupIds[o]===i){a=o;break}a!==-1&&a!==n.urlId&&(n.urlId=a,this.canLoad&&this.startLoad())}}loadPlaylist(e){super.loadPlaylist();const r=this.currentLevelIndex,n=this.currentLevel;if(n&&this.shouldLoadPlaylist(n)){const i=n.urlId;let a=n.uri;if(e)try{a=e.addDirectives(a)}catch(l){this.warn(`Could not construct new URL with HLS Delivery Directives: ${l}`)}const o=n.attrs["PATHWAY-ID"];this.log(`Loading level index ${r}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${o?" Pathway "+o:""} URI ${i+1}/${n.url.length} ${a}`),this.clearTimer(),this.hls.trigger(z.LEVEL_LOADING,{url:a,level:r,id:i,deliveryDirectives:e||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,r){const n=(a,o)=>o!==r,i=this._levels.filter((a,o)=>o!==e?!0:a.url.length>1&&r!==void 0?(a.url=a.url.filter(n),a.audioGroupIds&&(a.audioGroupIds=a.audioGroupIds.filter(n)),a.textGroupIds&&(a.textGroupIds=a.textGroupIds.filter(n)),a.urlId=0,!0):(this.steering&&this.steering.removeLevel(a),!1));this.hls.trigger(z.LEVELS_UPDATED,{levels:i})}onLevelsUpdated(e,{levels:r}){r.forEach((n,i)=>{const{details:a}=n;a!=null&&a.fragments&&a.fragments.forEach(o=>{o.level=i})}),this._levels=r}}function bd(t,e,r){r&&(e==="audio"?(t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds[t.url.length-1]=r):e==="text"&&(t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds[t.url.length-1]=r))}function IT(t){const e={};t.forEach(r=>{const n=r.groupId||"";r.id=e[n]=e[n]||0,e[n]++})}var Qr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class bne{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.on(z.BUFFER_APPENDED,this.onBufferAppended,this),e.on(z.FRAG_BUFFERED,this.onFragBuffered,this),e.on(z.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(z.BUFFER_APPENDED,this.onBufferAppended,this),e.off(z.FRAG_BUFFERED,this.onFragBuffered,this),e.off(z.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,r){const n=this.activePartLists[r];if(n)for(let i=n.length;i--;){const a=n[i];if(!a)break;const o=a.end;if(a.start<=e&&o!==null&&e<=o)return a}return this.getBufferedFrag(e,r)}getBufferedFrag(e,r){const{fragments:n}=this,i=Object.keys(n);for(let a=i.length;a--;){const o=n[i[a]];if((o==null?void 0:o.body.type)===r&&o.buffered){const l=o.body;if(l.start<=e&&e<=l.end)return l}}return null}detectEvictedFragments(e,r,n,i){this.timeRanges&&(this.timeRanges[e]=r);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){l.body.type===n&&this.removeFragment(l.body);return}const s=l.range[e];s&&s.time.some(c=>{const u=!this.isTimeBuffered(c.startPTS,c.endPTS,r);return u&&this.removeFragment(l.body),u})})}detectPartialFragments(e){const r=this.timeRanges,{frag:n,part:i}=e;if(!r||n.sn==="initSegment")return;const a=js(n),o=this.fragments[a];if(!o||o.buffered&&n.gap)return;const l=!n.relurl;Object.keys(r).forEach(s=>{const c=n.elementaryStreams[s];if(!c)return;const u=r[s],f=l||c.partial===!0;o.range[s]=this.getBufferedTimes(n,i,f,u)}),o.loaded=null,Object.keys(o.range).length?(o.buffered=!0,(o.body.endList=n.endList||o.body.endList)&&(this.endListFragments[o.body.type]=o),gf(o)||this.removeParts(n.sn-1,n.type)):this.removeFragment(o.body)}removeParts(e,r){const n=this.activePartLists[r];n&&(this.activePartLists[r]=n.filter(i=>i.fragment.sn>=e))}fragBuffered(e,r){const n=js(e);let i=this.fragments[n];!i&&r&&(i=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)}getBufferedTimes(e,r,n,i){const a={time:[],partial:n},o=e.start,l=e.end,s=e.minEndPTS||l,c=e.maxStartPTS||o;for(let u=0;u<i.length;u++){const f=i.start(u)-this.bufferPadding,d=i.end(u)+this.bufferPadding;if(c>=f&&s<=d){a.time.push({startPTS:Math.max(o,i.start(u)),endPTS:Math.min(l,i.end(u))});break}else if(o<d&&l>f)a.partial=!0,a.time.push({startPTS:Math.max(o,i.start(u)),endPTS:Math.min(l,i.end(u))});else if(l<=f)break}return a}getPartialFragment(e){let r=null,n,i,a,o=0;const{bufferPadding:l,fragments:s}=this;return Object.keys(s).forEach(c=>{const u=s[c];u&&gf(u)&&(i=u.body.start-l,a=u.body.end+l,e>=i&&e<=a&&(n=Math.min(e-i,a-e),o<=n&&(r=u.body,o=n)))}),r}isEndListAppended(e){const r=this.endListFragments[e];return r!==void 0&&(r.buffered||gf(r))}getState(e){const r=js(e),n=this.fragments[r];return n?n.buffered?gf(n)?Qr.PARTIAL:Qr.OK:Qr.APPENDING:Qr.NOT_LOADED}isTimeBuffered(e,r,n){let i,a;for(let o=0;o<n.length;o++){if(i=n.start(o)-this.bufferPadding,a=n.end(o)+this.bufferPadding,e>=i&&r<=a)return!0;if(r<=i)return!1}return!1}onFragLoaded(e,r){const{frag:n,part:i}=r;if(n.sn==="initSegment"||n.bitrateTest)return;const a=i?null:r,o=js(n);this.fragments[o]={body:n,appendedPTS:null,loaded:a,buffered:!1,range:Object.create(null)}}onBufferAppended(e,r){const{frag:n,part:i,timeRanges:a}=r;if(n.sn==="initSegment")return;const o=n.type;if(i){let l=this.activePartLists[o];l||(this.activePartLists[o]=l=[]),l.push(i)}this.timeRanges=a,Object.keys(a).forEach(l=>{const s=a[l];this.detectEvictedFragments(l,s,o,i)})}onFragBuffered(e,r){this.detectPartialFragments(r)}hasFragment(e){const r=js(e);return!!this.fragments[r]}hasParts(e){var r;return!!((r=this.activePartLists[e])!=null&&r.length)}removeFragmentsInRange(e,r,n,i,a){i&&!this.hasGaps||Object.keys(this.fragments).forEach(o=>{const l=this.fragments[o];if(!l)return;const s=l.body;s.type!==n||i&&!s.gap||s.start<r&&s.end>e&&(l.buffered||a)&&this.removeFragment(s)})}removeFragment(e){const r=js(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const i=e.sn;this.activePartLists[e.type]=n.filter(a=>a.fragment.sn!==i)}delete this.fragments[r],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function gf(t){var e,r,n;return t.buffered&&(t.body.gap||((e=t.range.video)==null?void 0:e.partial)||((r=t.range.audio)==null?void 0:r.partial)||((n=t.range.audiovideo)==null?void 0:n.partial))}function js(t){return`${t.type}_${t.level}_${t.urlId}_${t.sn}`}const _T=Math.pow(2,17);class xne{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,r){const n=e.url;if(!n)return Promise.reject(new Sa({type:Tt.NETWORK_ERROR,details:ze.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const i=this.config,a=i.fLoader,o=i.loader;return new Promise((l,s)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(h=>h[0]==="GAP")){s(LT(e));return}else e.gap=!1;const c=this.loader=e.loader=a?new a(i):new o(i),u=RT(e),f=CT(i.fragLoadPolicy.default),d={loadPolicy:f,timeout:f.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:_T};e.stats=c.stats,c.load(u,d,{onSuccess:(h,p,v,g)=>{this.resetLoader(e,c);let m=h.data;v.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(m.slice(0,16)),m=m.slice(16)),l({frag:e,part:null,payload:m,networkDetails:g})},onError:(h,p,v,g)=>{this.resetLoader(e,c),s(new Sa({type:Tt.NETWORK_ERROR,details:ze.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:kn({url:n,data:void 0},h),error:new Error(`HTTP Error ${h.code} ${h.text}`),networkDetails:v,stats:g}))},onAbort:(h,p,v)=>{this.resetLoader(e,c),s(new Sa({type:Tt.NETWORK_ERROR,details:ze.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:v,stats:h}))},onTimeout:(h,p,v)=>{this.resetLoader(e,c),s(new Sa({type:Tt.NETWORK_ERROR,details:ze.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${d.timeout}ms`),networkDetails:v,stats:h}))},onProgress:(h,p,v,g)=>{r&&r({frag:e,part:null,payload:v,networkDetails:g})}})})}loadPart(e,r,n){this.abort();const i=this.config,a=i.fLoader,o=i.loader;return new Promise((l,s)=>{if(this.loader&&this.loader.destroy(),e.gap||r.gap){s(LT(e,r));return}const c=this.loader=e.loader=a?new a(i):new o(i),u=RT(e,r),f=CT(i.fragLoadPolicy.default),d={loadPolicy:f,timeout:f.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:_T};r.stats=c.stats,c.load(u,d,{onSuccess:(h,p,v,g)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,r);const m={frag:e,part:r,payload:h.data,networkDetails:g};n(m),l(m)},onError:(h,p,v,g)=>{this.resetLoader(e,c),s(new Sa({type:Tt.NETWORK_ERROR,details:ze.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:r,response:kn({url:u.url,data:void 0},h),error:new Error(`HTTP Error ${h.code} ${h.text}`),networkDetails:v,stats:g}))},onAbort:(h,p,v)=>{e.stats.aborted=r.stats.aborted,this.resetLoader(e,c),s(new Sa({type:Tt.NETWORK_ERROR,details:ze.INTERNAL_ABORTED,fatal:!1,frag:e,part:r,error:new Error("Aborted"),networkDetails:v,stats:h}))},onTimeout:(h,p,v)=>{this.resetLoader(e,c),s(new Sa({type:Tt.NETWORK_ERROR,details:ze.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:r,error:new Error(`Timeout after ${d.timeout}ms`),networkDetails:v,stats:h}))}})})}updateStatsFromPart(e,r){const n=e.stats,i=r.stats,a=i.total;if(n.loaded+=i.loaded,a){const s=Math.round(e.duration/r.duration),c=Math.min(Math.round(n.loaded/a),s),f=(s-c)*Math.round(n.loaded/c);n.total=n.loaded+f}else n.total=Math.max(n.loaded,n.total);const o=n.loading,l=i.loading;o.start?o.first+=l.first-l.start:(o.start=l.start,o.first=l.first),o.end=l.end}resetLoader(e,r){e.loader=null,this.loader===r&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),r.destroy()}}function RT(t,e=null){const r=e||t,n={frag:t,part:e,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},i=r.byteRangeStartOffset,a=r.byteRangeEndOffset;if(vt(i)&&vt(a)){var o;let l=i,s=a;if(t.sn==="initSegment"&&((o=t.decryptdata)==null?void 0:o.method)==="AES-128"){const c=a-i;c%16&&(s=a+(16-c%16)),i!==0&&(n.resetIV=!0,l=i-16)}n.rangeStart=l,n.rangeEnd=s}return n}function LT(t,e){const r=new Error(`GAP ${t.gap?"tag":"attribute"} found`),n={type:Tt.MEDIA_ERROR,details:ze.FRAG_GAP,fatal:!1,frag:t,error:r,networkDetails:null};return e&&(n.part=e),(e||t).stats.aborted=!0,new Sa(n)}class Sa extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Ane{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const n=this.keyUriToKeyInfo[r].loader;if(n){if(e&&e!==n.context.frag.type)return;n.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[e];(r.mediaKeySessionContext||r.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[e].loader;r&&r.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,r=ze.KEY_LOAD_ERROR,n,i,a){return new Sa({type:Tt.NETWORK_ERROR,details:r,fatal:!1,frag:e,response:a,error:n,networkDetails:i})}loadClear(e,r){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:i}=e;for(let a=0;a<r.length;a++){const o=r[a];if(i<=o.cc&&(n==="initSegment"||o.sn==="initSegment"||n<o.sn)){this.emeController.selectKeySystemFormat(o).then(l=>{o.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(r=>this.loadInternal(e,r)):this.loadInternal(e)}loadInternal(e,r){var n,i;r&&e.setKeyFormat(r);const a=e.decryptdata;if(!a){const c=new Error(r?`Expected frag.decryptdata to be defined after setting format ${r}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,ze.KEY_LOAD_ERROR,c))}const o=a.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,ze.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${o}"`)));let l=this.keyUriToKeyInfo[o];if((n=l)!=null&&n.decryptdata.key)return a.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((i=l)!=null&&i.keyLoadPromise){var s;switch((s=l.mediaKeySessionContext)==null?void 0:s.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(a.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[o]={decryptdata:a,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},a.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return a.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,ze.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${a.method}"`)))}}loadKeyEME(e,r){const n={frag:r,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(n);if(i)return(e.keyLoadPromise=i.then(a=>(e.mediaKeySessionContext=a,n))).catch(a=>{throw e.keyLoadPromise=null,a})}return Promise.resolve(n)}loadKeyHTTP(e,r){const n=this.config,i=n.loader,a=new i(n);return r.keyLoader=e.loader=a,e.keyLoadPromise=new Promise((o,l)=>{const s={keyInfo:e,frag:r,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},f={onSuccess:(d,h,p,v)=>{const{frag:g,keyInfo:m,url:b}=p;if(!g.decryptdata||m!==this.keyUriToKeyInfo[b])return l(this.createKeyLoadError(g,ze.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),v));m.decryptdata.key=g.decryptdata.key=new Uint8Array(d.data),g.keyLoader=null,m.loader=null,o({frag:g,keyInfo:m})},onError:(d,h,p,v)=>{this.resetLoader(h),l(this.createKeyLoadError(r,ze.KEY_LOAD_ERROR,new Error(`HTTP Error ${d.code} loading key ${d.text}`),p,kn({url:s.url,data:void 0},d)))},onTimeout:(d,h,p)=>{this.resetLoader(h),l(this.createKeyLoadError(r,ze.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),p))},onAbort:(d,h,p)=>{this.resetLoader(h),l(this.createKeyLoadError(r,ze.INTERNAL_ABORTED,new Error("key loading aborted"),p))}};a.load(s,u,f)})}resetLoader(e){const{frag:r,keyInfo:n,url:i}=e,a=n.loader;r.keyLoader===a&&(r.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[i],a&&a.destroy()}}class Ene{constructor(){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(){}}const Tne={length:0,start:()=>0,end:()=>0};class Sr{static isBuffered(e,r){try{if(e){const n=Sr.getBuffered(e);for(let i=0;i<n.length;i++)if(r>=n.start(i)&&r<=n.end(i))return!0}}catch{}return!1}static bufferInfo(e,r,n){try{if(e){const i=Sr.getBuffered(e),a=[];let o;for(o=0;o<i.length;o++)a.push({start:i.start(o),end:i.end(o)});return this.bufferedInfo(a,r,n)}}catch{}return{len:0,start:r,end:r,nextStart:void 0}}static bufferedInfo(e,r,n){r=Math.max(0,r),e.sort(function(c,u){const f=c.start-u.start;return f||u.end-c.end});let i=[];if(n)for(let c=0;c<e.length;c++){const u=i.length;if(u){const f=i[u-1].end;e[c].start-f<n?e[c].end>f&&(i[u-1].end=e[c].end):i.push(e[c])}else i.push(e[c])}else i=e;let a=0,o,l=r,s=r;for(let c=0;c<i.length;c++){const u=i[c].start,f=i[c].end;if(r+n>=u&&r<f)l=u,s=f,a=s-r;else if(r+n<u){o=u;break}}return{len:a,start:l||0,end:s||0,nextStart:o}}static getBuffered(e){try{return e.buffered}catch(r){return Me.log("failed to get media.buffered",r),Tne}}}class Z0{constructor(e,r,n,i=0,a=-1,o=!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=yf(),this.buffering={audio:yf(),video:yf(),audiovideo:yf()},this.level=e,this.sn=r,this.id=n,this.size=i,this.part=a,this.partial=o}}function yf(){return{start:0,executeStart:0,executeEnd:0,end:0}}function JR(t,e){let r=null;for(let n=0,i=t.length;n<i;n++){const a=t[n];if(a&&a.cc===e){r=a;break}}return r}function Sne(t,e,r){return!!(e.details&&(r.endCC>r.startCC||t&&t.cc<r.startCC))}function wne(t,e,r=0){const n=t.fragments,i=e.fragments;if(!i.length||!n.length){Me.log("No fragments to align");return}const a=JR(n,i[0].cc);if(!a||a&&!a.startPTS){Me.log("No frag in previous level to align on");return}return a}function DT(t,e){if(t){const r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}}function J0(t,e){const r=e.fragments;for(let n=0,i=r.length;n<i;n++)DT(r[n],t);e.fragmentHint&&DT(e.fragmentHint,t),e.alignedSliding=!0}function Cne(t,e,r){e&&(Ine(t,r,e),!r.alignedSliding&&e.details&&_ne(r,e.details),!r.alignedSliding&&e.details&&!r.skippedSegments&&qR(e.details,r))}function Ine(t,e,r){if(Sne(t,r,e)){const n=wne(r.details,e);n&&vt(n.start)&&(Me.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),J0(n.start,e))}}function _ne(t,e){if(!e.fragments.length||!t.hasProgramDateTime||!e.hasProgramDateTime)return;const r=e.fragments[0].programDateTime,n=t.fragments[0].programDateTime,i=(n-r)/1e3+e.fragments[0].start;i&&vt(i)&&(Me.log(`Adjusting PTS using programDateTime delta ${n-r}ms, sliding:${i.toFixed(3)} ${t.url} `),J0(i,t))}function QR(t,e){if(!t.hasProgramDateTime||!e.hasProgramDateTime)return;const r=t.fragments,n=e.fragments;if(!r.length||!n.length)return;const i=Math.round(n.length/2)-1,a=n[i],o=JR(r,a.cc)||r[Math.round(r.length/2)-1],l=a.programDateTime,s=o.programDateTime;if(l===null||s===null)return;const c=(s-l)/1e3-(o.start-a.start);J0(c,t)}class Rne{constructor(e,r){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=r}decrypt(e,r){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},r,e)}}class Lne{constructor(e,r){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=r}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function Dne(t){const e=t.byteLength,r=e&&new DataView(t.buffer).getUint8(e-1);return r?gs(t,0,e-r):t}class One{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 r=new DataView(e),n=new Uint32Array(4);for(let i=0;i<4;i++)n[i]=r.getUint32(i*4);return n}initTable(){const e=this.sBox,r=this.invSBox,n=this.subMix,i=n[0],a=n[1],o=n[2],l=n[3],s=this.invSubMix,c=s[0],u=s[1],f=s[2],d=s[3],h=new Uint32Array(256);let p=0,v=0,g=0;for(g=0;g<256;g++)g<128?h[g]=g<<1:h[g]=g<<1^283;for(g=0;g<256;g++){let m=v^v<<1^v<<2^v<<3^v<<4;m=m>>>8^m&255^99,e[p]=m,r[m]=p;const b=h[p],x=h[b],T=h[x];let A=h[m]*257^m*16843008;i[p]=A<<24|A>>>8,a[p]=A<<16|A>>>16,o[p]=A<<8|A>>>24,l[p]=A,A=T*16843009^x*65537^b*257^p*16843008,c[m]=A<<24|A>>>8,u[m]=A<<16|A>>>16,f[m]=A<<8|A>>>24,d[m]=A,p?(p=b^h[h[h[T^b]]],v^=h[h[v]]):p=v=1}}expandKey(e){const r=this.uint8ArrayToUint32Array_(e);let n=!0,i=0;for(;i<r.length&&n;)n=r[i]===this.key[i],i++;if(n)return;this.key=r;const a=this.keySize=r.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);const o=this.ksRows=(a+6+1)*4;let l,s;const c=this.keySchedule=new Uint32Array(o),u=this.invKeySchedule=new Uint32Array(o),f=this.sBox,d=this.rcon,h=this.invSubMix,p=h[0],v=h[1],g=h[2],m=h[3];let b,x;for(l=0;l<o;l++){if(l<a){b=c[l]=r[l];continue}x=b,l%a===0?(x=x<<8|x>>>24,x=f[x>>>24]<<24|f[x>>>16&255]<<16|f[x>>>8&255]<<8|f[x&255],x^=d[l/a|0]<<24):a>6&&l%a===4&&(x=f[x>>>24]<<24|f[x>>>16&255]<<16|f[x>>>8&255]<<8|f[x&255]),c[l]=b=(c[l-a]^x)>>>0}for(s=0;s<o;s++)l=o-s,s&3?x=c[l]:x=c[l-4],s<4||l<=4?u[s]=x:u[s]=p[f[x>>>24]]^v[f[x>>>16&255]]^g[f[x>>>8&255]]^m[f[x&255]],u[s]=u[s]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,r,n){const i=this.keySize+6,a=this.invKeySchedule,o=this.invSBox,l=this.invSubMix,s=l[0],c=l[1],u=l[2],f=l[3],d=this.uint8ArrayToUint32Array_(n);let h=d[0],p=d[1],v=d[2],g=d[3];const m=new Int32Array(e),b=new Int32Array(m.length);let x,T,A,O,I,_,k,L,P,W,q,V,G,pe;const J=this.networkToHostOrderSwap;for(;r<m.length;){for(P=J(m[r]),W=J(m[r+1]),q=J(m[r+2]),V=J(m[r+3]),I=P^a[0],_=V^a[1],k=q^a[2],L=W^a[3],G=4,pe=1;pe<i;pe++)x=s[I>>>24]^c[_>>16&255]^u[k>>8&255]^f[L&255]^a[G],T=s[_>>>24]^c[k>>16&255]^u[L>>8&255]^f[I&255]^a[G+1],A=s[k>>>24]^c[L>>16&255]^u[I>>8&255]^f[_&255]^a[G+2],O=s[L>>>24]^c[I>>16&255]^u[_>>8&255]^f[k&255]^a[G+3],I=x,_=T,k=A,L=O,G=G+4;x=o[I>>>24]<<24^o[_>>16&255]<<16^o[k>>8&255]<<8^o[L&255]^a[G],T=o[_>>>24]<<24^o[k>>16&255]<<16^o[L>>8&255]<<8^o[I&255]^a[G+1],A=o[k>>>24]<<24^o[L>>16&255]<<16^o[I>>8&255]<<8^o[_&255]^a[G+2],O=o[L>>>24]<<24^o[I>>16&255]<<16^o[_>>8&255]<<8^o[k&255]^a[G+3],b[r]=J(x^h),b[r+1]=J(O^p),b[r+2]=J(A^v),b[r+3]=J(T^g),h=P,p=W,v=q,g=V,r=r+4}return b.buffer}}const kne=16;class Q0{constructor(e,{removePKCS7Padding:r=!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.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=r,r)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch{}this.subtle===null&&(this.useSoftware=!0)}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:r}=this;if(!e||r)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Dne(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,r,n){return this.useSoftware?new Promise((i,a)=>{this.softwareDecrypt(new Uint8Array(e),r,n);const o=this.flush();o?i(o.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),r,n)}softwareDecrypt(e,r,n){const{currentIV:i,currentResult:a,remainderData:o}=this;this.logOnce("JS AES decrypt"),o&&(e=Ts(o,e),this.remainderData=null);const l=this.getValidChunk(e);if(!l.length)return null;i&&(n=i);let s=this.softwareDecrypter;s||(s=this.softwareDecrypter=new One),s.expandKey(r);const c=a;return this.currentResult=s.decrypt(l.buffer,0,n),this.currentIV=gs(l,-16).buffer,c||null}webCryptoDecrypt(e,r,n){const i=this.subtle;return(this.key!==r||!this.fastAesKey)&&(this.key=r,this.fastAesKey=new Lne(i,r)),this.fastAesKey.expandKey().then(a=>i?(this.logOnce("WebCrypto AES decrypt"),new Rne(i,new Uint8Array(n)).decrypt(e.buffer,a)):Promise.reject(new Error("web crypto not initialized"))).catch(a=>(Me.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${a.name}: ${a.message}`),this.onWebCryptoError(e,r,n)))}onWebCryptoError(e,r,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,r,n);const i=this.flush();if(i)return i.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let r=e;const n=e.length-e.length%kne;return n!==e.length&&(r=gs(e,0,n),this.remainderData=gs(e,n)),r}logOnce(e){this.logEnabled&&(Me.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Mne={toString:function(t){let e="";const r=t.length;for(let n=0;n<r;n++)e+=`[${t.start(n).toFixed(3)}-${t.end(n).toFixed(3)}]`;return e}},rt={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 ey extends Ene{constructor(e,r,n,i,a){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=rt.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.loadedmetadata=!1,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.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=a,this.logPrefix=i,this.log=Me.log.bind(Me,`${i}:`),this.warn=Me.warn.bind(Me,`${i}:`),this.hls=e,this.fragmentLoader=new xne(e.config),this.keyLoader=n,this.fragmentTracker=r,this.config=e.config,this.decrypter=new Q0(e.config),e.on(z.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){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=rt.STOPPED}_streamEnded(e,r){if(r.live||e.nextStart||!e.end||!this.media)return!1;const n=r.partList;if(n!=null&&n.length){const a=n[n.length-1];return Sr.isBuffered(this.media,a.start+a.duration/2)}const i=r.fragments[r.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levels[this.levelLastLoaded])==null?void 0:e.details}}onMediaAttached(e,r){const n=this.media=this.mediaBuffer=r.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);const i=this.config;this.levels&&i.autoStartLoad&&this.state===rt.STOPPED&&this.startLoad(i.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:r,media:n,mediaBuffer:i,state:a}=this,o=n?n.currentTime:0,l=Sr.bufferInfo(i||n,o,e.maxBufferHole);if(this.log(`media seeking to ${vt(o)?o.toFixed(3):o}, state: ${a}`),this.state===rt.ENDED)this.resetLoadingState();else if(r){const s=e.maxFragLookUpTolerance,c=r.start-s,u=r.start+r.duration+s;if(!l.len||u<l.start||c>l.end){const f=o>u;(o<c||f)&&(f&&r.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),r.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}n&&(this.fragmentTracker.removeFragmentsInRange(o,1/0,this.playlistType,!0),this.lastCurrentTime=o),!this.loadedmetadata&&!l.len&&(this.nextLoadPosition=this.startPosition=o),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,r){this.startTimeOffset=r.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.stopLoad(),super.onHandlerDestroying()}onHandlerDestroyed(){this.state=rt.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,r,n){this._loadFragForPlayback(e,r,n)}_loadFragForPlayback(e,r,n){const i=a=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${a.part?" p: "+a.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(a)};this._doFragLoad(e,r,n,i).then(a=>{if(!a)return;const o=this.state;if(this.fragContextChanged(e)){(o===rt.FRAG_LOADING||!this.fragCurrent&&o===rt.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=rt.IDLE);return}"payload"in a&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(z.FRAG_LOADED,a)),this._handleFragmentLoadComplete(a)}).catch(a=>{this.state===rt.STOPPED||this.state===rt.ERROR||(this.warn(a),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var r;const{fragmentTracker:n}=this;if(n.getState(e)===Qr.APPENDING){const a=e.type,o=this.getFwdBufferInfo(this.mediaBuffer,a),l=Math.max(e.duration,o?o.len:this.config.maxBufferLength);this.reduceMaxBufferLength(l)&&n.removeFragment(e)}else((r=this.mediaBuffer)==null?void 0:r.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===Qr.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const r=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:r,part:null,stats:r.stats,id:r.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,r,n=null){if(!(e-r))return;const i={startOffset:e,endOffset:r,type:n};this.hls.trigger(z.BUFFER_FLUSHING,i)}_loadInitSegment(e,r){this._doFragLoad(e,r).then(n=>{if(!n||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:i}=this,{payload:a}=n,o=e.decryptdata;if(a&&a.byteLength>0&&o&&o.key&&o.iv&&o.method==="AES-128"){const l=self.performance.now();return this.decrypter.decrypt(new Uint8Array(a),o.key.buffer,o.iv.buffer).catch(s=>{throw i.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_DECRYPT_ERROR,fatal:!1,error:s,reason:s.message,frag:e}),s}).then(s=>{const c=self.performance.now();return i.trigger(z.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:l,tdecrypt:c}}),n.payload=s,n})}return n}).then(n=>{const{fragCurrent:i,hls:a,levels:o}=this;if(!o)throw new Error("init load aborted, missing levels");const l=e.stats;this.state=rt.IDLE,r.fragmentError=0,e.data=new Uint8Array(n.payload),l.parsing.start=l.buffering.start=self.performance.now(),l.parsing.end=l.buffering.end=self.performance.now(),n.frag===i&&a.trigger(z.FRAG_BUFFERED,{stats:l,frag:i,part:null,id:e.type}),this.tick()}).catch(n=>{this.state===rt.STOPPED||this.state===rt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}fragContextChanged(e){const{fragCurrent:r}=this;return!e||!r||e.level!==r.level||e.sn!==r.sn||e.urlId!==r.urlId}fragBufferedComplete(e,r){var n,i,a,o;const l=this.mediaBuffer?this.mediaBuffer:this.media;this.log(`Buffered ${e.type} sn: ${e.sn}${r?" part: "+r.index:""} of ${this.playlistType===Ct.MAIN?"level":"track"} ${e.level} (frag:[${((n=e.startPTS)!=null?n:NaN).toFixed(3)}-${((i=e.endPTS)!=null?i:NaN).toFixed(3)}] > buffer:${l?Mne.toString(Sr.getBuffered(l)):"(detached)"})`),this.state=rt.IDLE,l&&(!this.loadedmetadata&&e.type==Ct.MAIN&&l.buffered.length&&((a=this.fragCurrent)==null?void 0:a.sn)===((o=this.fragPrevious)==null?void 0:o.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:r}=this;if(!r)return;const{frag:n,part:i,partsLoaded:a}=e,o=!a||a.length===0||a.some(s=>!s),l=new Z0(n.level,n.sn,n.stats.chunkCount+1,0,i?i.index:-1,!o);r.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,r,n=null,i){var a;const o=r==null?void 0:r.details;if(!this.levels||!o)throw new Error(`frag load aborted, missing level${o?"":" detail"}s`);let l=null;if(e.encrypted&&!((a=e.decryptdata)!=null&&a.key)?(this.log(`Loading key for ${e.sn} of [${o.startSN}-${o.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=rt.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(u=>{if(!this.fragContextChanged(u.frag))return this.hls.trigger(z.KEY_LOADED,u),this.state===rt.KEY_LOADING&&(this.state=rt.IDLE),u}),this.hls.trigger(z.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(l=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&o.encryptedFragments.length&&this.keyLoader.loadClear(e,o.encryptedFragments),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const u=o.partList;if(u&&i){n>e.end&&o.fragmentHint&&(e=o.fragmentHint);const f=this.getNextPart(u,e,n);if(f>-1){const d=u[f];this.log(`Loading part sn: ${e.sn} p: ${d.index} cc: ${e.cc} of playlist [${o.startSN}-${o.endSN}] parts [0-${f}-${u.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=d.start+d.duration,this.state=rt.FRAG_LOADING;let h;return l?h=l.then(p=>!p||this.fragContextChanged(p.frag)?null:this.doFragPartsLoad(e,d,r,i)).catch(p=>this.handleFragLoadError(p)):h=this.doFragPartsLoad(e,d,r,i).catch(p=>this.handleFragLoadError(p)),this.hls.trigger(z.FRAG_LOADING,{frag:e,part:d,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):h}else if(!e.url||this.loadedEndOfParts(u,n))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${o?"of ["+o.startSN+"-"+o.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),vt(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=rt.FRAG_LOADING;const s=this.config.progressive;let c;return s&&l?c=l.then(u=>!u||this.fragContextChanged(u==null?void 0:u.frag)?null:this.fragmentLoader.load(e,i)).catch(u=>this.handleFragLoadError(u)):c=Promise.all([this.fragmentLoader.load(e,s?i:void 0),l]).then(([u])=>(!s&&u&&i&&i(u),u)).catch(u=>this.handleFragLoadError(u)),this.hls.trigger(z.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):c}doFragPartsLoad(e,r,n,i){return new Promise((a,o)=>{var l;const s=[],c=(l=n.details)==null?void 0:l.partList,u=f=>{this.fragmentLoader.loadPart(e,f,i).then(d=>{s[f.index]=d;const h=d.part;this.hls.trigger(z.FRAG_LOADED,d);const p=ST(n,e.sn,f.index+1)||XR(c,e.sn,f.index+1);if(p)u(p);else return a({frag:e,part:h,partsLoaded:s})}).catch(o)};u(r)})}handleFragLoadError(e){if("data"in e){const r=e.data;e.data&&r.details===ze.INTERNAL_ABORTED?this.handleFragLoadAborted(r.frag,r.part):this.hls.trigger(z.ERROR,r)}else this.hls.trigger(z.ERROR,{type:Tt.OTHER_ERROR,details:ze.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const r=this.getCurrentContext(e);if(!r||this.state!==rt.PARSING){!this.fragCurrent&&this.state!==rt.STOPPED&&this.state!==rt.ERROR&&(this.state=rt.IDLE);return}const{frag:n,part:i,level:a}=r,o=self.performance.now();n.stats.parsing.end=o,i&&(i.stats.parsing.end=o),this.updateLevelTiming(n,i,a,e.partial)}getCurrentContext(e){const{levels:r,fragCurrent:n}=this,{level:i,sn:a,part:o}=e;if(!(r!=null&&r[i]))return this.warn(`Levels object was unset while buffering fragment ${a} of level ${i}. The current chunk will not be buffered.`),null;const l=r[i],s=o>-1?ST(l,a,o):null,c=s?s.fragment:une(l,a,n);return c?(n&&n!==c&&(c.stats=n.stats),{frag:c,part:s,level:l}):null}bufferFragmentData(e,r,n,i,a){var o;if(!e||this.state!==rt.PARSING)return;const{data1:l,data2:s}=e;let c=l;if(l&&s&&(c=Ts(l,s)),!((o=c)!=null&&o.length))return;const u={type:e.type,frag:r,part:n,chunkMeta:i,parent:r.type,data:c};if(this.hls.trigger(z.BUFFER_APPENDING,u),e.dropped&&e.independent&&!n){if(a)return;this.flushBufferGap(r)}}flushBufferGap(e){const r=this.media;if(!r)return;if(!Sr.isBuffered(r,r.currentTime)){this.flushMainBuffer(0,e.start);return}const n=r.currentTime,i=Sr.bufferInfo(r,n,0),a=e.duration,o=Math.min(this.config.maxFragLookUpTolerance*2,a*.25),l=Math.max(Math.min(e.start-o,i.end-o),n+o);e.start-l>o&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,r){const n=this.getLoadPosition();return vt(n)?this.getFwdBufferInfoAtPos(e,n,r):null}getFwdBufferInfoAtPos(e,r,n){const{config:{maxBufferHole:i}}=this,a=Sr.bufferInfo(e,r,i);if(a.len===0&&a.nextStart!==void 0){const o=this.fragmentTracker.getBufferedFrag(r,n);if(o&&a.nextStart<o.end)return Sr.bufferInfo(e,r,Math.max(a.nextStart,i))}return a}getMaxBufferLength(e){const{config:r}=this;let n;return e?n=Math.max(8*r.maxBufferSize/e,r.maxBufferLength):n=r.maxBufferLength,Math.min(n,r.maxMaxBufferLength)}reduceMaxBufferLength(e){const r=this.config,n=e||r.maxBufferLength;return r.maxMaxBufferLength>=n?(r.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${r.maxMaxBufferLength}s`),!0):!1}getAppendedFrag(e,r=Ct.MAIN){const n=this.fragmentTracker.getAppendedFrag(e,Ct.MAIN);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,r){const n=r.fragments,i=n.length;if(!i)return null;const{config:a}=this,o=n[0].start;let l;if(r.live){const s=a.initialLiveManifestSize;if(i<s)return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${s})`),null;!r.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(l=this.getInitialLiveFragment(r,n),this.startPosition=l?this.hls.liveSyncPosition||l.start:e)}else e<=o&&(l=n[0]);if(!l){const s=a.lowLatencyMode?r.partEnd:r.fragmentEnd;l=this.getFragmentAtPosition(e,s,r)}return this.mapToInitFragWhenRequired(l)}isLoopLoading(e,r){const n=this.fragmentTracker.getState(e);return(n===Qr.OK||n===Qr.PARTIAL&&!!e.gap)&&this.nextLoadPosition>r}getNextFragmentLoopLoading(e,r,n,i,a){const o=e.gap,l=this.getNextFragment(this.nextLoadPosition,r);if(l===null)return l;if(e=l,o&&e&&!e.gap&&n.nextStart){const s=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,i);if(s!==null&&n.len+s.len>=a)return this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,r,n){let i=-1,a=!1,o=!0;for(let l=0,s=e.length;l<s;l++){const c=e[l];if(o=o&&!c.independent,i>-1&&n<c.start)break;const u=c.loaded;u?i=-1:(a||c.independent||o)&&c.fragment===r&&(i=l),a=u}return i}loadedEndOfParts(e,r){const n=e[e.length-1];return n&&r>n.start&&n.loaded}getInitialLiveFragment(e,r){const n=this.fragPrevious;let i=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),i=dne(r,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const a=n.sn+1;if(a>=e.startSN&&a<=e.endSN){const o=r[a-e.startSN];n.cc===o.cc&&(i=o,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=pne(r,n.cc),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const a=this.hls.liveSyncPosition;a!==null&&(i=this.getFragmentAtPosition(a,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,r,n){const{config:i}=this;let{fragPrevious:a}=this,{fragments:o,endSN:l}=n;const{fragmentHint:s}=n,c=i.maxFragLookUpTolerance,u=n.partList,f=!!(i.lowLatencyMode&&u!=null&&u.length&&s);f&&s&&!this.bitrateTest&&(o=o.concat(s),l=s.sn);let d;if(e<r){const h=e>r-c?0:c;d=gu(a,o,e,h)}else d=o[o.length-1];if(d){const h=d.sn-n.startSN,p=this.fragmentTracker.getState(d);if((p===Qr.OK||p===Qr.PARTIAL&&d.gap)&&(a=d),a&&d.sn===a.sn&&(!f||u[0].fragment.sn>d.sn)&&a&&d.level===a.level){const g=o[h+1];d.sn<l&&this.fragmentTracker.getState(g)!==Qr.OK?d=g:d=null}}return d}synchronizeToLiveEdge(e){const{config:r,media:n}=this;if(!n)return;const i=this.hls.liveSyncPosition,a=n.currentTime,o=e.fragments[0].start,l=e.edge,s=a>=o-r.maxFragLookUpTolerance&&a<=l;if(i!==null&&n.duration>i&&(a<i||!s)){const c=r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:r.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||a<l-c)&&(this.loadedmetadata||(this.nextLoadPosition=i),n.readyState&&(this.warn(`Playback: ${a.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${i.toFixed(3)}`),n.currentTime=i))}}alignPlaylists(e,r){const{levels:n,levelLastLoaded:i,fragPrevious:a}=this,o=i!==null?n[i]:null,l=e.fragments.length;if(!l)return this.warn("No fragments in live playlist"),0;const s=e.fragments[0].start,c=!r,u=e.alignedSliding&&vt(s);if(c||!u&&!s){Cne(a,o,e);const f=e.fragments[0].start;return this.log(`Live playlist sliding: ${f.toFixed(2)} start-sn: ${r?r.startSN:"na"}->${e.startSN} prev-sn: ${a?a.sn:"na"} fragments: ${l}`),f}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,r){let n=this.startPosition;if(n<r&&(n=-1),n===-1||this.lastCurrentTime===-1){const i=this.startTimeOffset!==null,a=i?this.startTimeOffset:e.startTimeOffset;a!==null&&vt(a)?(n=r+a,a<0&&(n+=e.totalduration),n=Math.min(Math.max(r,n),r+e.totalduration),this.log(`Start time offset ${a} found in ${i?"multivariant":"media"} playlist, adjust startPosition to ${n}`),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||r:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n}getLoadPosition(){const{media:e}=this;let r=0;return this.loadedmetadata&&e?r=e.currentTime:this.nextLoadPosition&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,r){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${r?" part "+r.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==rt.FRAG_LOADING_WAITING_RETRY)&&(this.state=rt.IDLE)}onFragmentOrKeyLoadError(e,r){if(r.chunkMeta&&!r.frag){const f=this.getCurrentContext(r.chunkMeta);f&&(r.frag=f.frag)}const n=r.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var i;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const a=r.details===ze.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(n,!0);const o=r.errorAction,{action:l,retryCount:s=0,retryConfig:c}=o||{};if(o&&l===gn.RetryRequest&&c){var u;this.resetStartWhenNotLoaded((u=this.levelLastLoaded)!=null?u:n.level);const f=q0(c,s);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${r.details}, retrying loading ${s+1}/${c.maxNumRetry} in ${f}ms`),o.resolved=!0,this.retryDate=self.performance.now()+f,this.state=rt.FRAG_LOADING_WAITING_RETRY}else c&&o?(this.resetFragmentErrors(e),s<c.maxNumRetry?a||(o.resolved=!0):Me.warn(`${r.details} reached or exceeded max retry (${s})`)):(o==null?void 0:o.action)===gn.SendAlternateToPenaltyBox?this.state=rt.WAITING_LEVEL:this.state=rt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===rt.PARSING||this.state===rt.PARSED){const r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),i=n&&n.len>.5;i&&this.reduceMaxBufferLength(n.len);const a=!i;return a&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${r} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),a}return!1}resetFragmentErrors(e){e===Ct.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==rt.STOPPED&&(this.state=rt.IDLE)}afterBufferFlushed(e,r,n){if(!e)return;const i=Sr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(r,i,n),this.state===rt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=rt.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const r=this.levels?this.levels[e].details:null;r!=null&&r.live?(this.startPosition=-1,this.setStartPosition(r,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){var r;this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded((r=this.levelLastLoaded)!=null?r:e.level),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,r,n,i){var a;const o=n.details;if(!o){this.warn("level.details undefined");return}if(Object.keys(e.elementaryStreams).reduce((s,c)=>{const u=e.elementaryStreams[c];if(u){const f=u.endPTS-u.startPTS;if(f<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${f})`),s||!1;const d=i?0:YR(o,e,u.startPTS,u.endPTS,u.startDTS,u.endDTS);return this.hls.trigger(z.LEVEL_PTS_UPDATED,{details:o,level:n,drift:d,type:c,frag:e,start:u.startPTS,end:u.endPTS}),!0}return s},!1))n.fragmentError=0;else if(((a=this.transmuxer)==null?void 0:a.error)===null){const s=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(n.fragmentError===0&&(n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(s.message),this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_PARSING_ERROR,fatal:!1,error:s,frag:e,reason:`Found no media in msn ${e.sn} of level "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=rt.PARSED,this.hls.trigger(z.FRAG_PARSED,{frag:e,part:r})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){if(e.event==="demuxerWorker"){var r,n,i;this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded((r=(n=this.levelLastLoaded)!=null?n:(i=this.fragCurrent)==null?void 0:i.level)!=null?r:0),this.resetLoadingState()}}set state(e){const r=this._state;r!==e&&(this._state=e,this.log(`${r}->${e}`))}get state(){return this._state}}function eL(){return self.SourceBuffer||self.WebKitSourceBuffer}function Fne(){const t=ch();if(!t)return!1;const e=eL(),r=t&&typeof t.isTypeSupported=="function"&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!r&&!!n}function Pne(){var t;const e=eL();return typeof(e==null||(t=e.prototype)==null?void 0:t.changeType)=="function"}function Nne(){return typeof __HLS_WORKER_BUNDLE__=="function"}function $ne(){const t=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(t);return{worker:new self.Worker(e),objectURL:e}}function Bne(t){const e=new self.URL(t,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function ra(t="",e=9e4){return{type:t,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class tL{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,r,n,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,r){return!1}appendFrame(e,r,n){}demux(e,r){this.cachedData&&(e=Ts(this.cachedData,e),this.cachedData=null);let n=vd(e,0),i=n?n.length:0,a;const o=this._audioTrack,l=this._id3Track,s=n?Are(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&vt(s))&&(this.basePTS=Une(s,r,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ki.audioId3,duration:Number.POSITIVE_INFINITY});i<c;){if(this.canParse(e,i)){const u=this.appendFrame(o,e,i);u?(this.frameIndex++,this.lastPTS=u.sample.pts,i+=u.length,a=i):i=c}else xre(e,i)?(n=vd(e,i),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ki.audioId3,duration:Number.POSITIVE_INFINITY}),i+=n.length,a=i):i++;if(i===c&&a!==c){const u=gs(e,a);this.cachedData?this.cachedData=Ts(this.cachedData,u):this.cachedData=u}}return{audioTrack:o,videoTrack:ra(),id3Track:l,textTrack:ra()}}demuxSampleAes(e,r,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),{audioTrack:this._audioTrack,videoTrack:ra(),id3Track:this._id3Track,textTrack:ra()}}destroy(){}}const Une=(t,e,r)=>{if(vt(t))return t*90;const n=r?r.baseTime*9e4/r.timescale:0;return e*9e4+n};function Hne(t,e,r,n){let i,a,o,l;const s=navigator.userAgent.toLowerCase(),c=n,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=((e[r+2]&192)>>>6)+1;const f=(e[r+2]&60)>>>2;if(f>u.length-1){t.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_PARSING_ERROR,fatal:!0,reason:`invalid ADTS sampling index:${f}`});return}return o=(e[r+2]&1)<<2,o|=(e[r+3]&192)>>>6,Me.log(`manifest codec:${n}, ADTS type:${i}, samplingIndex:${f}`),/firefox/i.test(s)?f>=6?(i=5,l=new Array(4),a=f-3):(i=2,l=new Array(2),a=f):s.indexOf("android")!==-1?(i=2,l=new Array(2),a=f):(i=5,l=new Array(4),n&&(n.indexOf("mp4a.40.29")!==-1||n.indexOf("mp4a.40.5")!==-1)||!n&&f>=6?a=f-3:((n&&n.indexOf("mp4a.40.2")!==-1&&(f>=6&&o===1||/vivaldi/i.test(s))||!n&&o===1)&&(i=2,l=new Array(2)),a=f)),l[0]=i<<3,l[0]|=(f&14)>>1,l[1]|=(f&1)<<7,l[1]|=o<<3,i===5&&(l[1]|=(a&14)>>1,l[2]=(a&1)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:u[f],channelCount:o,codec:"mp4a.40."+i,manifestCodec:c}}function rL(t,e){return t[e]===255&&(t[e+1]&246)===240}function nL(t,e){return t[e+1]&1?7:9}function ty(t,e){return(t[e+3]&3)<<11|t[e+4]<<3|(t[e+5]&224)>>>5}function Vne(t,e){return e+5<t.length}function xd(t,e){return e+1<t.length&&rL(t,e)}function jne(t,e){return Vne(t,e)&&rL(t,e)&&ty(t,e)<=t.length-e}function Wne(t,e){if(xd(t,e)){const r=nL(t,e);if(e+r>=t.length)return!1;const n=ty(t,e);if(n<=r)return!1;const i=e+n;return i===t.length||xd(t,i)}return!1}function iL(t,e,r,n,i){if(!t.samplerate){const a=Hne(e,r,n,i);if(!a)return;t.config=a.config,t.samplerate=a.samplerate,t.channelCount=a.channelCount,t.codec=a.codec,t.manifestCodec=a.manifestCodec,Me.log(`parsed codec:${t.codec}, rate:${a.samplerate}, channels:${a.channelCount}`)}}function aL(t){return 1024*9e4/t}function Gne(t,e){const r=nL(t,e);if(e+r<=t.length){const n=ty(t,e)-r;if(n>0)return{headerLength:r,frameLength:n}}}function oL(t,e,r,n,i){const a=aL(t.samplerate),o=n+i*a,l=Gne(e,r);let s;if(l){const{frameLength:f,headerLength:d}=l,h=d+f,p=Math.max(0,r+h-e.length);p?(s=new Uint8Array(h-d),s.set(e.subarray(r+d,e.length),0)):s=e.subarray(r+d,r+h);const v={unit:s,pts:o};return p||t.samples.push(v),{sample:v,length:h,missing:p}}const c=e.length-r;return s=new Uint8Array(c),s.set(e.subarray(r,e.length),0),{sample:{unit:s,pts:o},length:c,missing:-1}}class zne extends tL{constructor(e,r){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=r}resetInitSegment(e,r,n,i){super.resetInitSegment(e,r,n,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:r,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let n=(vd(e,0)||[]).length;for(let i=e.length;n<i;n++)if(Wne(e,n))return Me.log("ADTS sync word found !"),!0;return!1}canParse(e,r){return jne(e,r)}appendFrame(e,r,n){iL(e,this.observer,r,n,e.manifestCodec);const i=oL(e,r,n,this.basePTS,this.frameIndex);if(i&&i.missing===0)return i}}const Kne=/\/emsg[-/]ID3/i;class Yne{constructor(e,r){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=r}resetTimeStamp(){}resetInitSegment(e,r,n,i){const a=this.videoTrack=ra("video",1),o=this.audioTrack=ra("audio",1),l=this.txtTrack=ra("text",1);if(this.id3Track=ra("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const s=HR(e);if(s.video){const{id:c,timescale:u,codec:f}=s.video;a.id=c,a.timescale=l.timescale=u,a.codec=f}if(s.audio){const{id:c,timescale:u,codec:f}=s.audio;o.id=c,o.timescale=u,o.codec=f}l.id=$R.text,a.sampleDuration=0,a.duration=o.duration=i}resetContiguity(){this.remainderData=null}static probe(e){return e=e.length>16384?e.subarray(0,16384):e,Zt(e,["moof"]).length>0}demux(e,r){this.timeOffset=r;let n=e;const i=this.videoTrack,a=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Ts(this.remainderData,e));const l=Pre(n);this.remainderData=l.remainder,i.samples=l.valid||new Uint8Array}else i.samples=n;const o=this.extractID3Track(i,r);return a.samples=lT(r,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:o,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,r=this.videoTrack,n=this.txtTrack;r.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(r,this.timeOffset);return n.samples=lT(e,r),{videoTrack:r,audioTrack:ra(),id3Track:i,textTrack:ra()}}extractID3Track(e,r){const n=this.id3Track;if(e.samples.length){const i=Zt(e.samples,["emsg"]);i&&i.forEach(a=>{const o=Bre(a);if(Kne.test(o.schemeIdUri)){const l=vt(o.presentationTime)?o.presentationTime/o.timeScale:r+o.presentationTimeDelta/o.timeScale;let s=o.eventDuration===4294967295?Number.POSITIVE_INFINITY:o.eventDuration/o.timeScale;s<=.001&&(s=Number.POSITIVE_INFINITY);const c=o.payload;n.samples.push({data:c,len:c.byteLength,dts:l,pts:l,type:ki.emsg,duration:s})}})}return n}demuxSampleAes(e,r,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}let bf=null;const qne=[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],Xne=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Zne=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Jne=[0,1,1,4];function sL(t,e,r,n,i){if(r+24>e.length)return;const a=lL(e,r);if(a&&r+a.frameLength<=e.length){const o=a.samplesPerFrame*9e4/a.sampleRate,l=n+i*o,s={unit:e.subarray(r,r+a.frameLength),pts:l,dts:l};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}function lL(t,e){const r=t[e+1]>>3&3,n=t[e+1]>>1&3,i=t[e+2]>>4&15,a=t[e+2]>>2&3;if(r!==1&&i!==0&&i!==15&&a!==3){const o=t[e+2]>>1&1,l=t[e+3]>>6,s=r===3?3-n:n===3?3:4,c=qne[s*14+i-1]*1e3,f=Xne[(r===3?0:r===2?1:2)*3+a],d=l===3?1:2,h=Zne[r][n],p=Jne[n],v=h*8*p,g=Math.floor(h*c/f+o)*p;if(bf===null){const x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);bf=x?parseInt(x[1]):0}return!!bf&&bf<=87&&n===2&&c>=224e3&&l===0&&(t[e+3]=t[e+3]|128),{sampleRate:f,channelCount:d,frameLength:g,samplesPerFrame:v}}}function ry(t,e){return t[e]===255&&(t[e+1]&224)===224&&(t[e+1]&6)!==0}function cL(t,e){return e+1<t.length&&ry(t,e)}function Qne(t,e){return ry(t,e)&&4<=t.length-e}function eie(t,e){if(e+1<t.length&&ry(t,e)){const n=lL(t,e);let i=4;n!=null&&n.frameLength&&(i=n.frameLength);const a=e+i;return a===t.length||cL(t,a)}return!1}class OT{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,r=this.bytesAvailable,n=e.byteLength-r,i=new Uint8Array(4),a=Math.min(4,r);if(a===0)throw new Error("no bytes available");i.set(e.subarray(n,n+a)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a}skipBits(e){let r;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,r=e>>3,e-=r<<3,this.bytesAvailable-=r,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let r=Math.min(this.bitsAvailable,e);const n=this.word>>>32-r;if(e>32&&Me.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=r,this.bitsAvailable>0)this.word<<=r;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return r=e-r,r>0&&this.bitsAvailable?n<<r|this.readBits(r):n}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)}skipScalingList(e){let r=8,n=8,i;for(let a=0;a<e;a++)n!==0&&(i=this.readEG(),n=(r+i+256)%256),r=n===0?r:n}readSPS(){let e=0,r=0,n=0,i=0,a,o,l;const s=this.readUByte.bind(this),c=this.readBits.bind(this),u=this.readUEG.bind(this),f=this.readBoolean.bind(this),d=this.skipBits.bind(this),h=this.skipEG.bind(this),p=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);s();const g=s();if(c(5),d(3),s(),p(),g===100||g===110||g===122||g===244||g===44||g===83||g===86||g===118||g===128){const O=u();if(O===3&&d(1),p(),p(),d(1),f())for(o=O!==3?8:12,l=0;l<o;l++)f()&&(l<6?v(16):v(64))}p();const m=u();if(m===0)u();else if(m===1)for(d(1),h(),h(),a=u(),l=0;l<a;l++)h();p(),d(1);const b=u(),x=u(),T=c(1);T===0&&d(1),d(1),f()&&(e=u(),r=u(),n=u(),i=u());let A=[1,1];if(f()&&f())switch(s()){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:{A=[s()<<8|s(),s()<<8|s()];break}}return{width:Math.ceil((b+1)*16-e*2-r*2),height:(2-T)*(x+1)*16-(T?2:4)*(n+i),pixelRatio:A}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class tie{constructor(e,r,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Q0(r,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,r,n){const i=e[r].unit;if(i.length<=16)return;const a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(o).then(l=>{const s=new Uint8Array(l);i.set(s,16),this.decrypter.isSync()||this.decryptAacSamples(e,r+1,n)})}decryptAacSamples(e,r,n){for(;;r++){if(r>=e.length){n();return}if(!(e[r].unit.length<32)&&(this.decryptAacSample(e,r,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const r=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(r);let i=0;for(let a=32;a<e.length-16;a+=160,i+=16)n.set(e.subarray(a,a+16),i);return n}getAvcDecryptedUnit(e,r){const n=new Uint8Array(r);let i=0;for(let a=32;a<e.length-16;a+=160,i+=16)e.set(n.subarray(i,i+16),a);return e}decryptAvcSample(e,r,n,i,a){const o=WR(a.data),l=this.getAvcEncryptedData(o);this.decryptBuffer(l.buffer).then(s=>{a.data=this.getAvcDecryptedUnit(o,s),this.decrypter.isSync()||this.decryptAvcSamples(e,r,n+1,i)})}decryptAvcSamples(e,r,n,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,n=0){if(r>=e.length){i();return}const a=e[r].units;for(;!(n>=a.length);n++){const o=a[n];if(!(o.data.length<=48||o.type!==1&&o.type!==5)&&(this.decryptAvcSample(e,r,n,i,o),!this.decrypter.isSync()))return}}}}const mn=188;class uo{constructor(e,r,n){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._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=r,this.typeSupported=n}static probe(e){const r=uo.syncOffset(e);return r>0&&Me.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const r=e.length;let n=Math.min(mn*5,e.length-mn)+1,i=0;for(;i<n;){let a=!1,o=-1,l=0;for(let s=i;s<r;s+=mn)if(e[s]===71){if(l++,o===-1&&(o=s,o!==0&&(n=Math.min(o+mn*99,e.length-mn)+1)),a||(a=ym(e,s)===0),a&&l>1&&(o===0&&l>2||s+mn>n))return o}else{if(l)return-1;break}i++}return-1}static createTrack(e,r){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:$R[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?r:void 0}}resetInitSegment(e,r,n,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=uo.createTrack("video"),this._audioTrack=uo.createTrack("audio",i),this._id3Track=uo.createTrack("id3"),this._txtTrack=uo.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=r,this.videoCodec=n,this._duration=i}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_avcTrack:r,_id3Track:n}=this;e&&(e.pesData=null),r&&(r.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null}demux(e,r,n=!1,i=!1){n||(this.sampleAes=null);let a;const o=this._avcTrack,l=this._audioTrack,s=this._id3Track,c=this._txtTrack;let u=o.pid,f=o.pesData,d=l.pid,h=s.pid,p=l.pesData,v=s.pesData,g=null,m=this.pmtParsed,b=this._pmtId,x=e.length;if(this.remainderData&&(e=Ts(this.remainderData,e),x=e.length,this.remainderData=null),x<mn&&!i)return this.remainderData=e,{audioTrack:l,videoTrack:o,id3Track:s,textTrack:c};const T=Math.max(0,uo.syncOffset(e));x-=(x-T)%mn,x<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,x,e.buffer.byteLength-x));let A=0;for(let I=T;I<x;I+=mn)if(e[I]===71){const _=!!(e[I+1]&64),k=ym(e,I),L=(e[I+3]&48)>>4;let P;if(L>1){if(P=I+5+e[I+4],P===I+mn)continue}else P=I+4;switch(k){case u:_&&(f&&(a=Ws(f))&&this.parseAVCPES(o,c,a,!1),f={data:[],size:0}),f&&(f.data.push(e.subarray(P,I+mn)),f.size+=I+mn-P);break;case d:if(_){if(p&&(a=Ws(p)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,a);break;case"mp3":this.parseMPEGPES(l,a);break}p={data:[],size:0}}p&&(p.data.push(e.subarray(P,I+mn)),p.size+=I+mn-P);break;case h:_&&(v&&(a=Ws(v))&&this.parseID3PES(s,a),v={data:[],size:0}),v&&(v.data.push(e.subarray(P,I+mn)),v.size+=I+mn-P);break;case 0:_&&(P+=e[P]+1),b=this._pmtId=rie(e,P);break;case b:{_&&(P+=e[P]+1);const W=nie(e,P,this.typeSupported,n);u=W.avc,u>0&&(o.pid=u),d=W.audio,d>0&&(l.pid=d,l.segmentCodec=W.segmentCodec),h=W.id3,h>0&&(s.pid=h),g!==null&&!m&&(Me.warn(`MPEG-TS PMT found at ${I} after unknown PID '${g}'. Backtracking to sync byte @${T} to parse all TS packets.`),g=null,I=T-188),m=this.pmtParsed=!0;break}case 17:case 8191:break;default:g=k;break}}else A++;if(A>0){const I=new Error(`Found ${A} TS packet/s that do not start with 0x47`);this.observer.emit(z.ERROR,z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_PARSING_ERROR,fatal:!1,error:I,reason:I.message})}o.pesData=f,l.pesData=p,s.pesData=v;const O={audioTrack:l,videoTrack:o,id3Track:s,textTrack:c};return i&&this.extractRemainingSamples(O),O}flush(){const{remainderData:e}=this;this.remainderData=null;let r;return e?r=this.demux(e,-1,!1,!0):r={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(r),this.sampleAes?this.decrypt(r,this.sampleAes):r}extractRemainingSamples(e){const{audioTrack:r,videoTrack:n,id3Track:i,textTrack:a}=e,o=n.pesData,l=r.pesData,s=i.pesData;let c;if(o&&(c=Ws(o))?(this.parseAVCPES(n,a,c,!0),n.pesData=null):n.pesData=o,l&&(c=Ws(l))){switch(r.segmentCodec){case"aac":this.parseAACPES(r,c);break;case"mp3":this.parseMPEGPES(r,c);break}r.pesData=null}else l!=null&&l.size&&Me.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=l;s&&(c=Ws(s))?(this.parseID3PES(i,c),i.pesData=null):i.pesData=s}demuxSampleAes(e,r,n){const i=this.demux(e,n,!0,!this.config.progressive),a=this.sampleAes=new tie(this.observer,this.config,r);return this.decrypt(i,a)}decrypt(e,r){return new Promise(n=>{const{audioTrack:i,videoTrack:a}=e;i.samples&&i.segmentCodec==="aac"?r.decryptAacSamples(i.samples,0,()=>{a.samples?r.decryptAvcSamples(a.samples,0,0,()=>{n(e)}):n(e)}):a.samples&&r.decryptAvcSamples(a.samples,0,0,()=>{n(e)})})}destroy(){this._duration=0}parseAVCPES(e,r,n,i){const a=this.parseAVCNALu(e,n.data);let o=this.avcSample,l,s=!1;n.data=null,o&&a.length&&!e.audFound&&(fc(o,e),o=this.avcSample=xf(!1,n.pts,n.dts,"")),a.forEach(c=>{var u;switch(c.type){case 1:{let d=!1;l=!0;const h=c.data;if(s&&h.length>4){const p=new OT(h).readSliceType();(p===2||p===4||p===7||p===9)&&(d=!0)}if(d){var f;(f=o)!=null&&f.frame&&!o.key&&(fc(o,e),o=this.avcSample=null)}o||(o=this.avcSample=xf(!0,n.pts,n.dts,"")),o.frame=!0,o.key=d;break}case 5:l=!0,(u=o)!=null&&u.frame&&!o.key&&(fc(o,e),o=this.avcSample=null),o||(o=this.avcSample=xf(!0,n.pts,n.dts,"")),o.key=!0,o.frame=!0;break;case 6:{l=!0,jR(c.data,1,n.pts,r.samples);break}case 7:if(l=!0,s=!0,!e.sps){const d=c.data,p=new OT(d).readSPS();e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[d],e.duration=this._duration;const v=d.subarray(1,4);let g="avc1.";for(let m=0;m<3;m++){let b=v[m].toString(16);b.length<2&&(b="0"+b),g+=b}e.codec=g}break;case 8:l=!0,e.pps||(e.pps=[c.data]);break;case 9:l=!1,e.audFound=!0,o&&fc(o,e),o=this.avcSample=xf(!1,n.pts,n.dts,"");break;case 12:l=!0;break;default:l=!1,o&&(o.debug+="unknown NAL "+c.type+" ");break}o&&l&&o.units.push(c)}),i&&o&&(fc(o,e),this.avcSample=null)}getLastNalUnit(e){var r;let n=this.avcSample,i;if((!n||n.units.length===0)&&(n=e[e.length-1]),(r=n)!=null&&r.units){const a=n.units;i=a[a.length-1]}return i}parseAVCNALu(e,r){const n=r.byteLength;let i=e.naluState||0;const a=i,o=[];let l=0,s,c,u,f=-1,d=0;for(i===-1&&(f=0,d=r[0]&31,i=0,l=1);l<n;){if(s=r[l++],!i){i=s?0:1;continue}if(i===1){i=s?0:2;continue}if(!s)i=3;else if(s===1){if(f>=0){const h={data:r.subarray(f,l-i-1),type:d};o.push(h)}else{const h=this.getLastNalUnit(e.samples);if(h&&(a&&l<=4-a&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-a)),c=l-i-1,c>0)){const p=new Uint8Array(h.data.byteLength+c);p.set(h.data,0),p.set(r.subarray(0,c),h.data.byteLength),h.data=p,h.state=0}}l<n?(u=r[l]&31,f=l,d=u,i=0):i=-1}else i=0}if(f>=0&&i>=0){const h={data:r.subarray(f,n),type:d,state:i};o.push(h)}if(o.length===0){const h=this.getLastNalUnit(e.samples);if(h){const p=new Uint8Array(h.data.byteLength+r.byteLength);p.set(h.data,0),p.set(r,h.data.byteLength),h.data=p}}return e.naluState=i,o}parseAACPES(e,r){let n=0;const i=this.aacOverFlow;let a=r.data;if(i){this.aacOverFlow=null;const f=i.missing,d=i.sample.unit.byteLength;if(f===-1){const h=new Uint8Array(d+a.byteLength);h.set(i.sample.unit,0),h.set(a,d),a=h}else{const h=d-f;i.sample.unit.set(a.subarray(0,f),h),e.samples.push(i.sample),n=i.missing}}let o,l;for(o=n,l=a.length;o<l-1&&!xd(a,o);o++);if(o!==n){let f;const d=o<l-1;d?f=`AAC PES did not start with ADTS header,offset:${o}`:f="No ADTS header found in AAC PES";const h=new Error(f);if(Me.warn(`parsing error: ${f}`),this.observer.emit(z.ERROR,z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_PARSING_ERROR,fatal:!1,levelRetry:d,error:h,reason:f}),!d)return}iL(e,this.observer,a,o,this.audioCodec);let s;if(r.pts!==void 0)s=r.pts;else if(i){const f=aL(e.samplerate);s=i.sample.pts+f}else{Me.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,u;for(;o<l;)if(u=oL(e,a,o,s,c),o+=u.length,u.missing){this.aacOverFlow=u;break}else for(c++;o<l-1&&!xd(a,o);o++);}parseMPEGPES(e,r){const n=r.data,i=n.length;let a=0,o=0;const l=r.pts;if(l===void 0){Me.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;o<i;)if(cL(n,o)){const s=sL(e,n,o,l,a);if(s)o+=s.length,a++;else break}else o++}parseID3PES(e,r){if(r.pts===void 0){Me.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=zr({},r,{type:this._avcTrack?ki.emsg:ki.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function xf(t,e,r,n){return{key:t,frame:!1,pts:e,dts:r,units:[],debug:n,length:0}}function ym(t,e){return((t[e+1]&31)<<8)+t[e+2]}function rie(t,e){return(t[e+10]&31)<<8|t[e+11]}function nie(t,e,r,n){const i={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},a=(t[e+1]&15)<<8|t[e+2],o=e+3+a-4,l=(t[e+10]&15)<<8|t[e+11];for(e+=12+l;e<o;){const s=ym(t,e);switch(t[e]){case 207:if(!n){Me.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:i.audio===-1&&(i.audio=s);break;case 21:i.id3===-1&&(i.id3=s);break;case 219:if(!n){Me.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:i.avc===-1&&(i.avc=s);break;case 3:case 4:r.mpeg!==!0&&r.mp3!==!0?Me.log("MPEG audio found, not supported in this browser"):i.audio===-1&&(i.audio=s,i.segmentCodec="mp3");break;case 36:Me.warn("Unsupported HEVC stream type found");break}e+=((t[e+3]&15)<<8|t[e+4])+5}return i}function Ws(t){let e=0,r,n,i,a,o;const l=t.data;if(!t||t.size===0)return null;for(;l[0].length<19&&l.length>1;){const c=new Uint8Array(l[0].length+l[1].length);c.set(l[0]),c.set(l[1],l[0].length),l[0]=c,l.splice(1,1)}if(r=l[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(n=(r[4]<<8)+r[5],n&&n>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&&(Me.warn(`${Math.round((a-o)/9e4)}s delta between PTS and DTS, align them`),a=o)):o=a),i=r[8];let u=i+9;if(t.size<=u)return null;t.size-=u;const f=new Uint8Array(t.size);for(let d=0,h=l.length;d<h;d++){r=l[d];let p=r.byteLength;if(u)if(u>p){u-=p;continue}else r=r.subarray(u),p-=u,u=0;f.set(r,e),e+=p}return n&&(n-=i+3),{data:f,pts:a,dts:o,len:n}}return null}function fc(t,e){if(t.units.length&&t.frame){if(t.pts===void 0){const r=e.samples,n=r.length;if(n){const i=r[n-1];t.pts=i.pts,t.dts=i.dts}else{e.dropped++;return}}e.samples.push(t)}t.debug.length&&Me.log(t.pts+"/"+t.dts+":"+t.debug)}class iie extends tL{resetInitSegment(e,r,n,i){super.resetInitSegment(e,r,n,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:r,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let n=(vd(e,0)||[]).length;for(let i=e.length;n<i;n++)if(eie(e,n))return Me.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,r){return Qne(e,r)}appendFrame(e,r,n){if(this.basePTS!==null)return sL(e,r,n,this.basePTS,this.frameIndex)}}class kT{static getSilentFrame(e,r){switch(e){case"mp4a.40.2":if(r===1)return new Uint8Array([0,200,0,128,35,128]);if(r===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(r===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(r===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(r===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(r===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(r===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(r===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(r===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 no=Math.pow(2,32)-1;class He{static init(){He.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in He.types)He.types.hasOwnProperty(e)&&(He.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const r=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]),n=new Uint8Array([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]);He.HDLR_TYPES={video:r,audio:n};const i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);He.STTS=He.STSC=He.STCO=a,He.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),He.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),He.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),He.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const o=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);He.FTYP=He.box(He.types.ftyp,o,s,o,l),He.DINF=He.box(He.types.dinf,He.box(He.types.dref,i))}static box(e,...r){let n=8,i=r.length;const a=i;for(;i--;)n+=r[i].byteLength;const o=new Uint8Array(n);for(o[0]=n>>24&255,o[1]=n>>16&255,o[2]=n>>8&255,o[3]=n&255,o.set(e,4),i=0,n=8;i<a;i++)o.set(r[i],n),n+=r[i].byteLength;return o}static hdlr(e){return He.box(He.types.hdlr,He.HDLR_TYPES[e])}static mdat(e){return He.box(He.types.mdat,e)}static mdhd(e,r){r*=e;const n=Math.floor(r/(no+1)),i=Math.floor(r%(no+1));return He.box(He.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,n>>24,n>>16&255,n>>8&255,n&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))}static mdia(e){return He.box(He.types.mdia,He.mdhd(e.timescale,e.duration),He.hdlr(e.type),He.minf(e))}static mfhd(e){return He.box(He.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"?He.box(He.types.minf,He.box(He.types.smhd,He.SMHD),He.DINF,He.stbl(e)):He.box(He.types.minf,He.box(He.types.vmhd,He.VMHD),He.DINF,He.stbl(e))}static moof(e,r,n){return He.box(He.types.moof,He.mfhd(e),He.traf(n,r))}static moov(e){let r=e.length;const n=[];for(;r--;)n[r]=He.trak(e[r]);return He.box.apply(null,[He.types.moov,He.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(He.mvex(e)))}static mvex(e){let r=e.length;const n=[];for(;r--;)n[r]=He.trex(e[r]);return He.box.apply(null,[He.types.mvex,...n])}static mvhd(e,r){r*=e;const n=Math.floor(r/(no+1)),i=Math.floor(r%(no+1)),a=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,n>>24,n>>16&255,n>>8&255,n&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 He.box(He.types.mvhd,a)}static sdtp(e){const r=e.samples||[],n=new Uint8Array(4+r.length);let i,a;for(i=0;i<r.length;i++)a=r[i].flags,n[i+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy;return He.box(He.types.sdtp,n)}static stbl(e){return He.box(He.types.stbl,He.stsd(e),He.box(He.types.stts,He.STTS),He.box(He.types.stsc,He.STSC),He.box(He.types.stsz,He.STSZ),He.box(He.types.stco,He.STCO))}static avc1(e){let r=[],n=[],i,a,o;for(i=0;i<e.sps.length;i++)a=e.sps[i],o=a.byteLength,r.push(o>>>8&255),r.push(o&255),r=r.concat(Array.prototype.slice.call(a));for(i=0;i<e.pps.length;i++)a=e.pps[i],o=a.byteLength,n.push(o>>>8&255),n.push(o&255),n=n.concat(Array.prototype.slice.call(a));const l=He.box(He.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(n))),s=e.width,c=e.height,u=e.pixelRatio[0],f=e.pixelRatio[1];return He.box(He.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,s>>8&255,s&255,c>>8&255,c&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]),l,He.box(He.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),He.box(He.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,f>>24,f>>16&255,f>>8&255,f&255])))}static esds(e){const r=e.config.length;return new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(e.config).concat([6,1,2]))}static mp4a(e){const r=e.samplerate;return He.box(He.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]),He.box(He.types.esds,He.esds(e)))}static mp3(e){const r=e.samplerate;return He.box(He.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?He.box(He.types.stsd,He.STSD,He.mp3(e)):He.box(He.types.stsd,He.STSD,He.mp4a(e)):He.box(He.types.stsd,He.STSD,He.avc1(e))}static tkhd(e){const r=e.id,n=e.duration*e.timescale,i=e.width,a=e.height,o=Math.floor(n/(no+1)),l=Math.floor(n%(no+1));return He.box(He.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,r&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,l>>24,l>>16&255,l>>8&255,l&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,a>>8&255,a&255,0,0]))}static traf(e,r){const n=He.sdtp(e),i=e.id,a=Math.floor(r/(no+1)),o=Math.floor(r%(no+1));return He.box(He.types.traf,He.box(He.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),He.box(He.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,o>>24,o>>16&255,o>>8&255,o&255])),He.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,He.box(He.types.trak,He.tkhd(e),He.mdia(e))}static trex(e){const r=e.id;return He.box(He.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,r){const n=e.samples||[],i=n.length,a=12+16*i,o=new Uint8Array(a);let l,s,c,u,f,d;for(r+=8+a,o.set([e.type==="video"?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255],0),l=0;l<i;l++)s=n[l],c=s.duration,u=s.size,f=s.flags,d=s.cts,o.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,f.isLeading<<2|f.dependsOn,f.isDependedOn<<6|f.hasRedundancy<<4|f.paddingValue<<1|f.isNonSync,f.degradPrio&61440,f.degradPrio&15,d>>>24&255,d>>>16&255,d>>>8&255,d&255],12+16*l);return He.box(He.types.trun,o)}static initSegment(e){He.types||He.init();const r=He.moov(e),n=new Uint8Array(He.FTYP.byteLength+r.byteLength);return n.set(He.FTYP),n.set(r,He.FTYP.byteLength),n}}He.types=void 0;He.HDLR_TYPES=void 0;He.STTS=void 0;He.STSC=void 0;He.STCO=void 0;He.STSZ=void 0;He.VMHD=void 0;He.SMHD=void 0;He.STSD=void 0;He.FTYP=void 0;He.DINF=void 0;const uL=9e4;function ny(t,e,r=1,n=!1){const i=t*e*r;return n?Math.round(i):i}function aie(t,e,r=1,n=!1){return ny(t,e,1/r,n)}function dc(t,e=!1){return ny(t,1e3,1/uL,e)}function oie(t,e=1){return ny(t,uL,1/e)}const sie=10*1e3,MT=1024,lie=1152;let Af=null,jp=null;class Wp{constructor(e,r,n,i=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=r,this.typeSupported=n,this.ISGenerated=!1,Af===null){const o=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Af=o?parseInt(o[1]):0}if(jp===null){const a=navigator.userAgent.match(/Safari\/(\d+)/i);jp=a?parseInt(a[1]):0}}destroy(){}resetTimeStamp(e){Me.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){Me.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){Me.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1}getVideoStartPts(e){let r=!1;const n=e.reduce((i,a)=>{const o=a.pts-i;return o<-4294967296?(r=!0,gi(i,a.pts)):o>0?i:a.pts},e[0].pts);return r&&Me.debug("PTS rollover detected"),n}remux(e,r,n,i,a,o,l,s){let c,u,f,d,h,p,v=a,g=a;const m=e.pid>-1,b=r.pid>-1,x=r.samples.length,T=e.samples.length>0,A=l&&x>0||x>1;if((!m||T)&&(!b||A)||this.ISGenerated||l){this.ISGenerated||(f=this.generateIS(e,r,a,o));const I=this.isVideoContiguous;let _=-1,k;if(A&&(_=cie(r.samples),!I&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,_>0){Me.warn(`[mp4-remuxer]: Dropped ${_} out of ${x} video samples due to a missing keyframe`);const L=this.getVideoStartPts(r.samples);r.samples=r.samples.slice(_),r.dropped+=_,g+=(r.samples[0].pts-L)/r.inputTimeScale,k=g}else _===-1&&(Me.warn(`[mp4-remuxer]: No keyframe found out of ${x} video samples`),p=!1);if(this.ISGenerated){if(T&&A){const L=this.getVideoStartPts(r.samples),W=(gi(e.samples[0].pts,L)-L)/r.inputTimeScale;v+=Math.max(0,W),g+=Math.max(0,-W)}if(T){if(e.samplerate||(Me.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),f=this.generateIS(e,r,a,o)),u=this.remuxAudio(e,v,this.isAudioContiguous,o,b||A||s===Ct.AUDIO?g:void 0),A){const L=u?u.endPTS-u.startPTS:0;r.inputTimeScale||(Me.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),f=this.generateIS(e,r,a,o)),c=this.remuxVideo(r,g,I,L)}}else A&&(c=this.remuxVideo(r,g,I,0));c&&(c.firstKeyFrame=_,c.independent=_!==-1,c.firstKeyFramePTS=k)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(h=fL(n,a,this._initPTS,this._initDTS)),i.samples.length&&(d=dL(i,a,this._initPTS))),{audio:u,video:c,initSegment:f,independent:p,text:d,id3:h}}generateIS(e,r,n,i){const a=e.samples,o=r.samples,l=this.typeSupported,s={},c=this._initPTS;let u=!c||i,f="audio/mp4",d,h,p;if(u&&(d=h=1/0),e.config&&a.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(f="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break}s.audio={id:"audio",container:f,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):He.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(p=e.inputTimeScale,!c||p!==c.timescale?d=h=a[0].pts-Math.round(p*n):u=!1)}if(r.sps&&r.pps&&o.length&&(r.timescale=r.inputTimeScale,s.video={id:"main",container:"video/mp4",codec:r.codec,initSegment:He.initSegment([r]),metadata:{width:r.width,height:r.height}},u))if(p=r.inputTimeScale,!c||p!==c.timescale){const v=this.getVideoStartPts(o),g=Math.round(p*n);h=Math.min(h,gi(o[0].dts,v)-g),d=Math.min(d,v-g)}else u=!1;if(Object.keys(s).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:d,timescale:p},this._initDTS={baseTime:h,timescale:p}):d=p=void 0,{tracks:s,initPTS:d,timescale:p}}remuxVideo(e,r,n,i){const a=e.inputTimeScale,o=e.samples,l=[],s=o.length,c=this._initPTS;let u=this.nextAvcDts,f=8,d=this.videoSampleDuration,h,p,v=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=!1;if(!n||u===null){const N=r*a,Z=o[0].pts-gi(o[0].dts,o[0].pts);u=N-Z}const b=c.baseTime*a/c.timescale;for(let N=0;N<s;N++){const Z=o[N];Z.pts=gi(Z.pts-b,u),Z.dts=gi(Z.dts-b,u),Z.dts<o[N>0?N-1:N].dts&&(m=!0)}m&&o.sort(function(N,Z){const le=N.dts-Z.dts,ye=N.pts-Z.pts;return le||ye}),h=o[0].dts,p=o[o.length-1].dts;const x=p-h,T=x?Math.round(x/(s-1)):d||e.inputTimeScale/30;if(n){const N=h-u,Z=N>T,le=N<-1;if((Z||le)&&(Z?Me.warn(`AVC: ${dc(N,!0)} ms (${N}dts) hole between fragments detected, filling it`):Me.warn(`AVC: ${dc(-N,!0)} ms (${N}dts) overlapping between fragments detected`),!le||u>=o[0].pts)){h=u;const ye=o[0].pts-N;o[0].dts=h,o[0].pts=ye,Me.log(`Video: First PTS/DTS adjusted: ${dc(ye,!0)}/${dc(h,!0)}, delta: ${dc(N,!0)} ms`)}}h=Math.max(0,h);let A=0,O=0;for(let N=0;N<s;N++){const Z=o[N],le=Z.units,ye=le.length;let me=0;for(let Re=0;Re<ye;Re++)me+=le[Re].data.length;O+=me,A+=ye,Z.length=me,Z.dts=Math.max(Z.dts,h),v=Math.min(Z.pts,v),g=Math.max(Z.pts,g)}p=o[s-1].dts;const I=O+4*A+8;let _;try{_=new Uint8Array(I)}catch(N){this.observer.emit(z.ERROR,z.ERROR,{type:Tt.MUX_ERROR,details:ze.REMUX_ALLOC_ERROR,fatal:!1,error:N,bytes:I,reason:`fail allocating video mdat ${I}`});return}const k=new DataView(_.buffer);k.setUint32(0,I),_.set(He.types.mdat,4);let L=!1,P=Number.POSITIVE_INFINITY,W=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,V=Number.NEGATIVE_INFINITY;for(let N=0;N<s;N++){const Z=o[N],le=Z.units;let ye=0;for(let be=0,Ce=le.length;be<Ce;be++){const we=le[be],ce=we.data,re=we.data.byteLength;k.setUint32(f,re),f+=4,_.set(ce,f),f+=re,ye+=4+re}let me;if(N<s-1)d=o[N+1].dts-Z.dts,me=o[N+1].pts-Z.pts;else{const be=this.config,Ce=N>0?Z.dts-o[N-1].dts:T;if(me=N>0?Z.pts-o[N-1].pts:T,be.stretchShortVideoTrack&&this.nextAudioPts!==null){const we=Math.floor(be.maxBufferHole*a),ce=(i?v+i*a:this.nextAudioPts)-Z.pts;ce>we?(d=ce-Ce,d<0?d=Ce:L=!0,Me.log(`[mp4-remuxer]: It is approximately ${ce/90} ms to the next segment; using duration ${d/90} ms for the last video frame.`)):d=Ce}else d=Ce}const Re=Math.round(Z.pts-Z.dts);P=Math.min(P,d),q=Math.max(q,d),W=Math.min(W,me),V=Math.max(V,me),l.push(new FT(Z.key,d,ye,Re))}if(l.length){if(Af){if(Af<70){const N=l[0].flags;N.dependsOn=2,N.isNonSync=0}}else if(jp&&V-W<q-P&&T/q<.025&&l[0].cts===0){Me.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let N=h;for(let Z=0,le=l.length;Z<le;Z++){const ye=N+l[Z].duration,me=N+l[Z].cts;if(Z<le-1){const Re=ye+l[Z+1].cts;l[Z].duration=Re-me}else l[Z].duration=Z?l[Z-1].duration:T;l[Z].cts=0,N=ye}}}d=L||!d?T:d,this.nextAvcDts=u=p+d,this.videoSampleDuration=d,this.isVideoContiguous=!0;const G=He.moof(e.sequenceNumber++,h,zr({},e,{samples:l})),pe="video",J={data1:G,data2:_,startPTS:v/a,endPTS:(g+d)/a,startDTS:h/a,endDTS:u/a,type:pe,hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,J}remuxAudio(e,r,n,i,a){const o=e.inputTimeScale,l=e.samplerate?e.samplerate:o,s=o/l,c=e.segmentCodec==="aac"?MT:lie,u=c*s,f=this._initPTS,d=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,h=[],p=a!==void 0;let v=e.samples,g=d?0:8,m=this.nextAudioPts||-1;const b=r*o,x=f.baseTime*o/f.timescale;if(this.isAudioContiguous=n=n||v.length&&m>0&&(i&&Math.abs(b-m)<9e3||Math.abs(gi(v[0].pts-x,b)-m)<20*u),v.forEach(function(pe){pe.pts=gi(pe.pts-x,b)}),!n||m<0){if(v=v.filter(pe=>pe.pts>=0),!v.length)return;a===0?m=0:i&&!p?m=Math.max(0,b):m=v[0].pts}if(e.segmentCodec==="aac"){const pe=this.config.maxAudioFramesDrift;for(let J=0,N=m;J<v.length;J++){const Z=v[J],le=Z.pts,ye=le-N,me=Math.abs(1e3*ye/o);if(ye<=-pe*u&&p)J===0&&(Me.warn(`Audio frame @ ${(le/o).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*ye/o)} ms.`),this.nextAudioPts=m=N=le);else if(ye>=pe*u&&me<sie&&p){let Re=Math.round(ye/u);N=le-Re*u,N<0&&(Re--,N+=u),J===0&&(this.nextAudioPts=m=N),Me.warn(`[mp4-remuxer]: Injecting ${Re} audio frame @ ${(N/o).toFixed(3)}s due to ${Math.round(1e3*ye/o)} ms gap.`);for(let be=0;be<Re;be++){const Ce=Math.max(N,0);let we=kT.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);we||(Me.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),we=Z.unit.subarray()),v.splice(J,0,{unit:we,pts:Ce}),N+=u,J++}}Z.pts=N,N+=u}}let T=null,A=null,O,I=0,_=v.length;for(;_--;)I+=v[_].unit.byteLength;for(let pe=0,J=v.length;pe<J;pe++){const N=v[pe],Z=N.unit;let le=N.pts;if(A!==null){const me=h[pe-1];me.duration=Math.round((le-A)/s)}else if(n&&e.segmentCodec==="aac"&&(le=m),T=le,I>0){I+=g;try{O=new Uint8Array(I)}catch(me){this.observer.emit(z.ERROR,z.ERROR,{type:Tt.MUX_ERROR,details:ze.REMUX_ALLOC_ERROR,fatal:!1,error:me,bytes:I,reason:`fail allocating audio mdat ${I}`});return}d||(new DataView(O.buffer).setUint32(0,I),O.set(He.types.mdat,4))}else return;O.set(Z,g);const ye=Z.byteLength;g+=ye,h.push(new FT(!0,c,ye,0)),A=le}const k=h.length;if(!k)return;const L=h[h.length-1];this.nextAudioPts=m=A+s*L.duration;const P=d?new Uint8Array(0):He.moof(e.sequenceNumber++,T/s,zr({},e,{samples:h}));e.samples=[];const W=T/o,q=m/o,G={data1:P,data2:O,startPTS:W,endPTS:q,startDTS:W,endDTS:q,type:"audio",hasAudio:!0,hasVideo:!1,nb:k};return this.isAudioContiguous=!0,G}remuxEmptyAudio(e,r,n,i){const a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,l=a/o,s=this.nextAudioPts,c=this._initDTS,u=c.baseTime*9e4/c.timescale,f=(s!==null?s:i.startDTS*a)+u,d=i.endDTS*a+u,h=l*MT,p=Math.ceil((d-f)/h),v=kT.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(Me.warn("[mp4-remuxer]: remux empty Audio"),!v){Me.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const g=[];for(let m=0;m<p;m++){const b=f+m*h;g.push({unit:v,pts:b,dts:b})}return e.samples=g,this.remuxAudio(e,r,n,!1)}}function gi(t,e){let r;if(e===null)return t;for(e<t?r=-8589934592:r=8589934592;Math.abs(t-e)>4294967296;)t+=r;return t}function cie(t){for(let e=0;e<t.length;e++)if(t[e].key)return e;return-1}function fL(t,e,r,n){const i=t.samples.length;if(!i)return;const a=t.inputTimeScale;for(let l=0;l<i;l++){const s=t.samples[l];s.pts=gi(s.pts-r.baseTime*a/r.timescale,e*a)/a,s.dts=gi(s.dts-n.baseTime*a/n.timescale,e*a)/a}const o=t.samples;return t.samples=[],{samples:o}}function dL(t,e,r){const n=t.samples.length;if(!n)return;const i=t.inputTimeScale;for(let o=0;o<n;o++){const l=t.samples[o];l.pts=gi(l.pts-r.baseTime*i/r.timescale,e*i)/i}t.samples.sort((o,l)=>o.pts-l.pts);const a=t.samples;return t.samples=[],{samples:a}}class FT{constructor(e,r,n,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=r,this.size=n,this.cts=i,this.flags=new uie(e)}}class uie{constructor(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}}class fie{constructor(){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}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,r,n,i){this.audioCodec=r,this.videoCodec=n,this.generateInitSegment(Dre(e,i)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:r,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const i=this.initData=HR(e);r||(r=PT(i.audio,ur.AUDIO)),n||(n=PT(i.video,ur.VIDEO));const a={};i.audio&&i.video?a.audiovideo={container:"video/mp4",codec:r+","+n,initSegment:e,id:"main"}:i.audio?a.audio={container:"audio/mp4",codec:r,initSegment:e,id:"audio"}:i.video?a.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:Me.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a}remux(e,r,n,i,a,o){var l,s;let{initPTS:c,lastEndTime:u}=this;const f={audio:void 0,video:void 0,text:i,id3:n,initSegment:void 0};vt(u)||(u=this.lastEndTime=a||0);const d=r.samples;if(!(d!=null&&d.length))return f;const h={initPTS:void 0,timescale:1};let p=this.initData;if((l=p)!=null&&l.length||(this.generateInitSegment(d),p=this.initData),!((s=p)!=null&&s.length))return Me.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),f;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1);const v=kre(d,p),g=Ore(p,d),m=g===null?a:g;(die(c,m,a,v)||h.timescale!==c.timescale&&o)&&(h.initPTS=m-a,c&&c.timescale===1&&Me.warn(`Adjusting initPTS by ${h.initPTS-c.baseTime}`),this.initPTS=c={baseTime:h.initPTS,timescale:1});const b=e?m-c.baseTime/c.timescale:u,x=b+v;Fre(p,d,c.baseTime/c.timescale),v>0?this.lastEndTime=x:(Me.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const T=!!p.audio,A=!!p.video;let O="";T&&(O+="audio"),A&&(O+="video");const I={data1:d,startPTS:b,startDTS:b,endPTS:x,endDTS:x,type:O,hasAudio:T,hasVideo:A,nb:1,dropped:0};return f.audio=I.type==="audio"?I:void 0,f.video=I.type!=="audio"?I:void 0,f.initSegment=h,f.id3=fL(n,a,c,c),i.samples.length&&(f.text=dL(i,a,c)),f}}function die(t,e,r,n){if(t===null)return!0;const i=Math.max(n,1),a=e-t.baseTime/t.timescale;return Math.abs(a-r)>i}function PT(t,e){const r=t==null?void 0:t.codec;return r&&r.length>4?r:r==="hvc1"||r==="hev1"?"hvc1.1.6.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||e===ur.VIDEO?"avc1.42e01e":"mp4a.40.5"}let wa;try{wa=self.performance.now.bind(self.performance)}catch{Me.debug("Unable to use Performance API on this environment"),wa=typeof self<"u"&&self.Date.now}const Gp=[{demux:Yne,remux:fie},{demux:uo,remux:Wp},{demux:zne,remux:Wp},{demux:iie,remux:Wp}];class NT{constructor(e,r,n,i,a){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=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=r,this.config=n,this.vendor=i,this.id=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,r,n,i){const a=n.transmuxing;a.executeStart=wa();let o=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:s}=this;i&&(this.currentTransmuxState=i);const{contiguous:c,discontinuity:u,trackSwitch:f,accurateTimeOffset:d,timeOffset:h,initSegmentChange:p}=i||l,{audioCodec:v,videoCodec:g,defaultInitPts:m,duration:b,initSegmentData:x}=s,T=hie(o,r);if(T&&T.method==="AES-128"){const _=this.getDecrypter();if(_.isSync()){let k=_.softwareDecrypt(o,T.key.buffer,T.iv.buffer);if(n.part>-1&&(k=_.flush()),!k)return a.executeEnd=wa(),zp(n);o=new Uint8Array(k)}else return this.decryptionPromise=_.webCryptoDecrypt(o,T.key.buffer,T.iv.buffer).then(k=>{const L=this.push(k,null,n);return this.decryptionPromise=null,L}),this.decryptionPromise}const A=this.needsProbing(u,f);if(A){const _=this.configureTransmuxer(o);if(_)return Me.warn(`[transmuxer] ${_.message}`),this.observer.emit(z.ERROR,z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_PARSING_ERROR,fatal:!1,error:_,reason:_.message}),a.executeEnd=wa(),zp(n)}(u||f||p||A)&&this.resetInitSegment(x,v,g,b,r),(u||p||A)&&this.resetInitialTimestamp(m),c||this.resetContiguity();const O=this.transmux(o,T,h,d,n),I=this.currentTransmuxState;return I.contiguous=!0,I.discontinuity=!1,I.trackSwitch=!1,a.executeEnd=wa(),O}flush(e){const r=e.transmuxing;r.executeStart=wa();const{decrypter:n,currentTransmuxState:i,decryptionPromise:a}=this;if(a)return a.then(()=>this.flush(e));const o=[],{timeOffset:l}=i;if(n){const f=n.flush();f&&o.push(this.push(f,null,e))}const{demuxer:s,remuxer:c}=this;if(!s||!c)return r.executeEnd=wa(),[zp(e)];const u=s.flush(l);return Of(u)?u.then(f=>(this.flushRemux(o,f,e),o)):(this.flushRemux(o,u,e),o)}flushRemux(e,r,n){const{audioTrack:i,videoTrack:a,id3Track:o,textTrack:l}=r,{accurateTimeOffset:s,timeOffset:c}=this.currentTransmuxState;Me.log(`[transmuxer.ts]: Flushed fragment ${n.sn}${n.part>-1?" p: "+n.part:""} of level ${n.level}`);const u=this.remuxer.remux(i,a,o,l,c,s,!0,this.id);e.push({remuxResult:u,chunkMeta:n}),n.transmuxing.executeEnd=wa()}resetInitialTimestamp(e){const{demuxer:r,remuxer:n}=this;!r||!n||(r.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:r}=this;!e||!r||(e.resetContiguity(),r.resetNextTimestamp())}resetInitSegment(e,r,n,i,a){const{demuxer:o,remuxer:l}=this;!o||!l||(o.resetInitSegment(e,r,n,i),l.resetInitSegment(e,r,n,a))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,r,n,i,a){let o;return r&&r.method==="SAMPLE-AES"?o=this.transmuxSampleAes(e,r,n,i,a):o=this.transmuxUnencrypted(e,n,i,a),o}transmuxUnencrypted(e,r,n,i){const{audioTrack:a,videoTrack:o,id3Track:l,textTrack:s}=this.demuxer.demux(e,r,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(a,o,l,s,r,n,!1,this.id),chunkMeta:i}}transmuxSampleAes(e,r,n,i,a){return this.demuxer.demuxSampleAes(e,r,n).then(o=>({remuxResult:this.remuxer.remux(o.audioTrack,o.videoTrack,o.id3Track,o.textTrack,n,i,!1,this.id),chunkMeta:a}))}configureTransmuxer(e){const{config:r,observer:n,typeSupported:i,vendor:a}=this;let o;for(let f=0,d=Gp.length;f<d;f++)if(Gp[f].demux.probe(e)){o=Gp[f];break}if(!o)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,s=this.remuxer,c=o.remux,u=o.demux;(!s||!(s instanceof c))&&(this.remuxer=new c(n,r,i,a)),(!l||!(l instanceof u))&&(this.demuxer=new u(n,r,i),this.probe=u.probe)}needsProbing(e,r){return!this.demuxer||!this.remuxer||e||r}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Q0(this.config)),e}}function hie(t,e){let r=null;return t.byteLength>0&&e!=null&&e.key!=null&&e.iv!==null&&e.method!=null&&(r=e),r}const zp=t=>({remuxResult:{},chunkMeta:t});function Of(t){return"then"in t&&t.then instanceof Function}class pie{constructor(e,r,n,i,a){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=r,this.initSegmentData=n,this.duration=i,this.defaultInitPts=a||null}}class vie{constructor(e,r,n,i,a,o){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=r,this.accurateTimeOffset=n,this.trackSwitch=i,this.timeOffset=a,this.initSegmentChange=o}}var hL={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(s,c,u){this.fn=s,this.context=c,this.once=u||!1}function a(s,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||s,d),p=r?r+c:c;return s._events[p]?s._events[p].fn?s._events[p]=[s._events[p],h]:s._events[p].push(h):(s._events[p]=h,s._eventsCount++),s}function o(s,c){--s._eventsCount===0?s._events=new n:delete s._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)e.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},l.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},l.prototype.listenerCount=function(c){var u=r?r+c:c,f=this._events[u];return f?f.fn?1:f.length:0},l.prototype.emit=function(c,u,f,d,h,p){var v=r?r+c:c;if(!this._events[v])return!1;var g=this._events[v],m=arguments.length,b,x;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),m){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,f),!0;case 4:return g.fn.call(g.context,u,f,d),!0;case 5:return g.fn.call(g.context,u,f,d,h),!0;case 6:return g.fn.call(g.context,u,f,d,h,p),!0}for(x=1,b=new Array(m-1);x<m;x++)b[x-1]=arguments[x];g.fn.apply(g.context,b)}else{var T=g.length,A;for(x=0;x<T;x++)switch(g[x].once&&this.removeListener(c,g[x].fn,void 0,!0),m){case 1:g[x].fn.call(g[x].context);break;case 2:g[x].fn.call(g[x].context,u);break;case 3:g[x].fn.call(g[x].context,u,f);break;case 4:g[x].fn.call(g[x].context,u,f,d);break;default:if(!b)for(A=1,b=new Array(m-1);A<m;A++)b[A-1]=arguments[A];g[x].fn.apply(g[x].context,b)}}return!0},l.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},l.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},l.prototype.removeListener=function(c,u,f,d){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var v=0,g=[],m=p.length;v<m;v++)(p[v].fn!==u||d&&!p[v].once||f&&p[v].context!==f)&&g.push(p[v]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},l.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(hL);var mie=hL.exports,iy=Qte(mie);const Kp=ch()||{isTypeSupported:()=>!1};class pL{constructor(e,r,n,i){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const a=e.config;this.hls=e,this.id=r,this.useWorker=!!a.enableWorker,this.onTransmuxComplete=n,this.onFlush=i;const o=(c,u)=>{u=u||{},u.frag=this.frag,u.id=this.id,c===z.ERROR&&(this.error=u.error),this.hls.trigger(c,u)};this.observer=new iy,this.observer.on(z.FRAG_DECRYPTED,o),this.observer.on(z.ERROR,o);const l={mp4:Kp.isTypeSupported("video/mp4"),mpeg:Kp.isTypeSupported("audio/mpeg"),mp3:Kp.isTypeSupported('audio/mp4; codecs="mp3"')},s=navigator.vendor;if(this.useWorker&&typeof Worker<"u"&&(a.workerPath||Nne())){try{a.workerPath?(Me.log(`loading Web Worker ${a.workerPath} for "${r}"`),this.workerContext=Bne(a.workerPath)):(Me.log(`injecting Web Worker for "${r}"`),this.workerContext=$ne()),this.onwmsg=f=>this.onWorkerMessage(f);const{worker:u}=this.workerContext;u.addEventListener("message",this.onwmsg),u.onerror=f=>{const d=new Error(`${f.message}  (${f.filename}:${f.lineno})`);a.enableWorker=!1,Me.warn(`Error in "${r}" Web Worker, fallback to inline`),this.hls.trigger(z.ERROR,{type:Tt.OTHER_ERROR,details:ze.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:d})},u.postMessage({cmd:"init",typeSupported:l,vendor:s,id:r,config:JSON.stringify(a)})}catch(u){Me.warn(`Error setting up "${r}" Web Worker, fallback to inline`,u),this.resetWorker(),this.error=null,this.transmuxer=new NT(this.observer,l,a,s,r)}return}this.transmuxer=new NT(this.observer,l,a,s,r)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:r}=this.workerContext;r&&self.URL.revokeObjectURL(r),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,r,n,i,a,o,l,s,c,u){var f,d;c.transmuxing.start=self.performance.now();const{transmuxer:h}=this,p=o?o.start:a.start,v=a.decryptdata,g=this.frag,m=!(g&&a.cc===g.cc),b=!(g&&c.level===g.level),x=g?c.sn-g.sn:-1,T=this.part?c.part-this.part.index:-1,A=x===0&&c.id>1&&c.id===(g==null?void 0:g.stats.chunkCount),O=!b&&(x===1||x===0&&(T===1||A&&T<=0)),I=self.performance.now();(b||x||a.stats.parsing.start===0)&&(a.stats.parsing.start=I),o&&(T||!O)&&(o.stats.parsing.start=I);const _=!(g&&((f=a.initSegment)==null?void 0:f.url)===((d=g.initSegment)==null?void 0:d.url)),k=new vie(m,O,s,b,p,_);if(!O||m||_){Me.log(`[transmuxer-interface, ${a.type}]: Starting new transmux session for sn: ${c.sn} p: ${c.part} level: ${c.level} id: ${c.id}
        discontinuity: ${m}
        trackSwitch: ${b}
        contiguous: ${O}
        accurateTimeOffset: ${s}
        timeOffset: ${p}
        initSegmentChange: ${_}`);const L=new pie(n,i,r,l,u);this.configureTransmuxer(L)}if(this.frag=a,this.part=o,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:v,chunkMeta:c,state:k},e instanceof ArrayBuffer?[e]:[]);else if(h){const L=h.push(e,v,c,k);Of(L)?(h.async=!0,L.then(P=>{this.handleTransmuxComplete(P)}).catch(P=>{this.transmuxerError(P,c,"transmuxer-interface push error")})):(h.async=!1,this.handleTransmuxComplete(L))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(r){let n=r.flush(e);Of(n)||r.async?(Of(n)||(n=Promise.resolve(n)),n.then(a=>{this.handleFlushResult(a,e)}).catch(a=>{this.transmuxerError(a,e,"transmuxer-interface flush error")})):this.handleFlushResult(n,e)}}transmuxerError(e,r,n){this.hls&&(this.error=e,this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_PARSING_ERROR,chunkMeta:r,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,r){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(r)}onWorkerMessage(e){const r=e.data,n=this.hls;switch(r.event){case"init":{var i;const a=(i=this.workerContext)==null?void 0:i.objectURL;a&&self.URL.revokeObjectURL(a);break}case"transmuxComplete":{this.handleTransmuxComplete(r.data);break}case"flush":{this.onFlush(r.data);break}case"workerLog":Me[r.data.logType]&&Me[r.data.logType](r.data.message);break;default:{r.data=r.data||{},r.data.frag=this.frag,r.data.id=this.id,n.trigger(r.event,r.data);break}}}configureTransmuxer(e){const{transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const gie=250,Yp=2,yie=.1,bie=.05;class xie{constructor(e,r,n,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=r,this.fragmentTracker=n,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,r){const{config:n,media:i,stalled:a}=this;if(i===null)return;const{currentTime:o,seeking:l}=i,s=this.seeking&&!l,c=!this.seeking&&l;if(this.seeking=l,o!==e){if(this.moved=!0,a!==null){if(this.stallReported){const m=self.performance.now()-a;Me.warn(`playback not stuck anymore @${o}, after ${Math.round(m)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(c||s){this.stalled=null;return}if(i.paused&&!l||i.ended||i.playbackRate===0||!Sr.getBuffered(i).length)return;const u=Sr.bufferInfo(i,o,0),f=u.len>0,d=u.nextStart||0;if(!f&&!d)return;if(l){const m=u.len>Yp,b=!d||r&&r.start<=o||d-o>Yp&&!this.fragmentTracker.getPartialFragment(o);if(m||b)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var h;const m=Math.max(d,u.start||0)-o,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,T=(b==null||(h=b.details)==null?void 0:h.live)?b.details.targetduration*2:Yp,A=this.fragmentTracker.getPartialFragment(o);if(m>0&&(m<=T||A)){this._trySkipBufferHole(A);return}}const p=self.performance.now();if(a===null){this.stalled=p;return}const v=p-a;if(!l&&v>=gie&&(this._reportStall(u),!this.media))return;const g=Sr.bufferInfo(i,o,n.maxBufferHole);this._tryFixBufferStall(g,v)}_tryFixBufferStall(e,r){const{config:n,fragmentTracker:i,media:a}=this;if(a===null)return;const o=a.currentTime,l=i.getPartialFragment(o);l&&(this._trySkipBufferHole(l)||!this.media)||(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-o<n.maxBufferHole)&&r>n.highBufferWatchdogPeriod*1e3&&(Me.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:r,media:n,stallReported:i}=this;if(!i&&n){this.stallReported=!0;const a=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${JSON.stringify(e)})`);Me.warn(a.message),r.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len})}}_trySkipBufferHole(e){const{config:r,hls:n,media:i}=this;if(i===null)return 0;const a=i.currentTime,o=Sr.bufferInfo(i,a,0),l=a<o.start?o.start:o.nextStart;if(l){const s=o.len<=r.maxBufferHole,c=o.len>0&&o.len<1&&i.readyState<3,u=l-a;if(u>0&&(s||c)){if(u>r.maxBufferHole){const{fragmentTracker:d}=this;let h=!1;if(a===0){const p=d.getAppendedFrag(0,Ct.MAIN);p&&l<p.end&&(h=!0)}if(!h){const p=e||d.getAppendedFrag(a,Ct.MAIN);if(p){let v=!1,g=p.end;for(;g<l;){const m=d.getPartialFragment(g);if(m)g+=m.duration;else{v=!0;break}}if(v)return 0}}}const f=Math.max(l+bie,a+yie);if(Me.warn(`skipping hole, adjusting currentTime from ${a} to ${f}`),this.moved=!0,this.stalled=null,i.currentTime=f,e&&!e.gap){const d=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${f}`);n.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:e})}return f}}return 0}_tryNudgeBuffer(){const{config:e,hls:r,media:n,nudgeRetry:i}=this;if(n===null)return;const a=n.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const o=a+(i+1)*e.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${a} to ${o}`);Me.warn(l.message),n.currentTime=o,r.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1})}else{const o=new Error(`Playhead still not moving while enough data buffered @${a} after ${e.nudgeMaxRetry} nudges`);Me.error(o.message),r.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_STALLED_ERROR,error:o,fatal:!0})}}}const Aie=100;class Eie extends ey{constructor(e,r,n){super(e,r,n,"[stream-controller]",Ct.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.LEVEL_LOADING,this.onLevelLoading,this),e.on(z.LEVEL_LOADED,this.onLevelLoaded,this),e.on(z.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(z.ERROR,this.onError,this),e.on(z.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(z.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(z.BUFFER_CREATED,this.onBufferCreated,this),e.on(z.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(z.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(z.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.LEVEL_LOADED,this.onLevelLoaded,this),e.off(z.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(z.ERROR,this.onError,this),e.off(z.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(z.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(z.BUFFER_CREATED,this.onBufferCreated,this),e.off(z.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(z.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(z.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),this.onMediaDetaching()}startLoad(e){if(this.levels){const{lastCurrentTime:r,hls:n}=this;if(this.stopLoad(),this.setInterval(Aie),this.level=-1,!this.startFragRequested){let i=n.startLevel;i===-1&&(n.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=n.nextAutoLevel),this.level=n.nextLoadLevel=i,this.loadedmetadata=!1}r>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=rt.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=rt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case rt.WAITING_LEVEL:{var e;const{levels:n,level:i}=this,a=n==null||(e=n[i])==null?void 0:e.details;if(a&&(!a.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(a))break;this.state=rt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=rt.IDLE;break}break}case rt.FRAG_LOADING_WAITING_RETRY:{var r;const n=self.performance.now(),i=this.retryDate;(!i||n>=i||(r=this.media)!=null&&r.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=rt.IDLE)}break}this.state===rt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:r,levels:n,media:i}=this,{config:a,nextLoadLevel:o}=e;if(r===null||!i&&(this.startFragRequested||!a.startFragPrefetch)||this.altAudio&&this.audioOnly||!(n!=null&&n[o]))return;const l=n[o],s=this.getMainFwdBufferInfo();if(s===null)return;const c=this.getLevelDetails();if(c&&this._streamEnded(s,c)){const g={};this.altAudio&&(g.type="video"),this.hls.trigger(z.BUFFER_EOS,g),this.state=rt.ENDED;return}e.loadLevel!==o&&e.manualLevel===-1&&this.log(`Adapting to level ${o} from level ${this.level}`),this.level=e.nextLoadLevel=o;const u=l.details;if(!u||this.state===rt.WAITING_LEVEL||u.live&&this.levelLastLoaded!==o){this.level=o,this.state=rt.WAITING_LEVEL;return}const f=s.len,d=this.getMaxBufferLength(l.maxBitrate);if(f>=d)return;this.backtrackFragment&&this.backtrackFragment.start>s.end&&(this.backtrackFragment=null);const h=this.backtrackFragment?this.backtrackFragment.start:s.end;let p=this.getNextFragment(h,u);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==Qr.OK){var v;const m=((v=this.backtrackFragment)!=null?v:p).sn-u.startSN,b=u.fragments[m-1];b&&p.cc===b.cc&&(p=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&s.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,h)){if(!p.gap){const m=this.audioOnly&&!this.altAudio?ur.AUDIO:ur.VIDEO,b=(m===ur.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,m,Ct.MAIN)}p=this.getNextFragmentLoopLoading(p,u,s,Ct.MAIN,d)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,l,h))}loadFragment(e,r,n){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===Qr.NOT_LOADED||i===Qr.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,r):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,r)):(this.startFragRequested=!0,super.loadFragment(e,r,n)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,Ct.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:r}=this;if(r!=null&&r.readyState){let n;const i=this.getAppendedFrag(r.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const a=this.getLevelDetails();if(a!=null&&a.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<a.targetduration*2)return}if(!r.paused&&e){const l=this.hls.nextLoadLevel,s=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*s.maxBitrate/(1e3*c)+1:n=0}else n=0;const o=this.getBufferedFrag(r.currentTime+n);if(o){const l=this.followingBufferedFrag(o);if(l){this.abortCurrentFrag();const s=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,u=Math.max(o.end,s+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*.5),c*.75));this.flushMainBuffer(u,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 rt.KEY_LOADING:case rt.FRAG_LOADING:case rt.FRAG_LOADING_WAITING_RETRY:case rt.PARSING:case rt.PARSED:this.state=rt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,r){super.flushMainBuffer(e,r,this.altAudio?"video":null)}onMediaAttached(e,r){super.onMediaAttached(e,r);const n=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new xie(this.config,n,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,r=e?e.currentTime:null;vt(r)&&this.log(`Media seeked to ${r.toFixed(3)}`);const n=this.getMainFwdBufferInfo();if(n===null||n.len===0){this.warn(`Main forward buffer length on "seeked" event ${n?n.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(z.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(e,r){let n=!1,i=!1,a;r.levels.forEach(o=>{a=o.audioCodec,a&&(a.indexOf("mp4a.40.2")!==-1&&(n=!0),a.indexOf("mp4a.40.5")!==-1&&(i=!0))}),this.audioCodecSwitch=n&&i&&!Pne(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=r.levels,this.startFragRequested=!1}onLevelLoading(e,r){const{levels:n}=this;if(!n||this.state!==rt.IDLE)return;const i=n[r.level];(!i.details||i.details.live&&this.levelLastLoaded!==r.level||this.waitForCdnTuneIn(i.details))&&(this.state=rt.WAITING_LEVEL)}onLevelLoaded(e,r){var n;const{levels:i}=this,a=r.level,o=r.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 s=i[a],c=this.fragCurrent;c&&(this.state===rt.FRAG_LOADING||this.state===rt.FRAG_LOADING_WAITING_RETRY)&&(c.level!==r.level||c.urlId!==s.urlId)&&c.loader&&this.abortCurrentFrag();let u=0;if(o.live||(n=s.details)!=null&&n.live){if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;u=this.alignPlaylists(o,s.details)}if(s.details=o,this.levelLastLoaded=a,this.hls.trigger(z.LEVEL_UPDATED,{details:o,level:a}),this.state===rt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=rt.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,u),this.tick()}_handleFragmentLoadProgress(e){var r;const{frag:n,part:i,payload:a}=e,{levels:o}=this;if(!o){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=o[n.level],s=l.details;if(!s){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=l.videoCodec,u=s.PTSKnown||!s.live,f=(r=n.initSegment)==null?void 0:r.data,d=this._getAudioCodec(l),h=this.transmuxer=this.transmuxer||new pL(this.hls,Ct.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=i?i.index:-1,v=p!==-1,g=new Z0(n.level,n.sn,n.stats.chunkCount,a.byteLength,p,v),m=this.initPTS[n.cc];h.push(a,f,d,c,n,i,s.totalduration,u,g,m)}onAudioTrackSwitching(e,r){const n=this.altAudio;if(!!!r.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const o=this.fragCurrent;o&&(this.log("Switching to main audio track, cancel main fragment load"),o.abortRequests(),this.fragmentTracker.removeFragment(o)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const a=this.hls;n&&(a.trigger(z.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),a.trigger(z.AUDIO_TRACK_SWITCHED,r)}}onAudioTrackSwitched(e,r){const n=r.id,i=!!this.hls.audioTracks[n].url;if(i){const a=this.videoBuffer;a&&this.mediaBuffer!==a&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=a)}this.altAudio=i,this.tick()}onBufferCreated(e,r){const n=r.tracks;let i,a,o=!1;for(const l in n){const s=n[l];if(s.id==="main"){if(a=l,i=s,l==="video"){const c=n[l];c&&(this.videoBuffer=c.buffer)}}else o=!0}o&&i?(this.log(`Alternate track found, use ${a}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,r){const{frag:n,part:i}=r;if(n&&n.type!==Ct.MAIN)return;if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===rt.PARSED&&(this.state=rt.IDLE);return}const a=i?i.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),n.sn!=="initSegment"&&(this.fragPrevious=n),this.fragBufferedComplete(n,i)}onError(e,r){var n;if(r.fatal){this.state=rt.ERROR;return}switch(r.details){case ze.FRAG_GAP:case ze.FRAG_PARSING_ERROR:case ze.FRAG_DECRYPT_ERROR:case ze.FRAG_LOAD_ERROR:case ze.FRAG_LOAD_TIMEOUT:case ze.KEY_LOAD_ERROR:case ze.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ct.MAIN,r);break;case ze.LEVEL_LOAD_ERROR:case ze.LEVEL_LOAD_TIMEOUT:case ze.LEVEL_PARSING_ERROR:!r.levelRetry&&this.state===rt.WAITING_LEVEL&&((n=r.context)==null?void 0:n.type)===tr.LEVEL&&(this.state=rt.IDLE);break;case ze.BUFFER_FULL_ERROR:if(!r.parent||r.parent!=="main")return;this.reduceLengthAndFlushBuffer(r)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case ze.INTERNAL_EXCEPTION:this.recoverWorkerError(r);break}}checkBuffer(){const{media:e,gapController:r}=this;if(!(!e||!r||!e.readyState)){if(this.loadedmetadata||!Sr.getBuffered(e).length){const n=this.state!==rt.IDLE?this.fragCurrent:null;r.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=rt.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:r}){if(r!==ur.AUDIO||this.audioOnly&&!this.altAudio){const n=(r===ur.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,r,Ct.MAIN)}}onLevelsUpdated(e,r){this.levels=r.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const r=e.currentTime;let n=this.startPosition;if(n>=0&&r<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${r}`);return}const i=Sr.getBuffered(e),o=(i.length?i.start(0):0)-n;o>0&&(o<this.config.maxBufferHole||o<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${o} to match buffer start`),n+=o,this.startPosition=n),this.log(`seek to target start position ${n} from current time ${r}`),e.currentTime=n}}_getAudioCodec(e){let r=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&r&&(this.log("Swapping audio codec"),r.indexOf("mp4a.40.5")!==-1?r="mp4a.40.2":r="mp4a.40.5"),r}_loadBitrateTestFrag(e,r){e.bitrateTest=!0,this._doFragLoad(e,r).then(n=>{const{hls:i}=this;if(!n||this.fragContextChanged(e))return;r.fragmentError=0,this.state=rt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(z.FRAG_LOADED,n),e.bitrateTest=!1})}_handleTransmuxComplete(e){var r;const n="main",{hls:i}=this,{remuxResult:a,chunkMeta:o}=e,l=this.getCurrentContext(o);if(!l){this.resetWhenMissingContext(o);return}const{frag:s,part:c,level:u}=l,{video:f,text:d,id3:h,initSegment:p}=a,{details:v}=u,g=this.altAudio?void 0:a.audio;if(this.fragContextChanged(s)){this.fragmentTracker.removeFragment(s);return}if(this.state=rt.PARSING,p){if(p!=null&&p.tracks){const x=s.initSegment||s;this._bufferInitSegment(u,p.tracks,x,o),i.trigger(z.FRAG_PARSING_INIT_SEGMENT,{frag:x,id:n,tracks:p.tracks})}const m=p.initPTS,b=p.timescale;vt(m)&&(this.initPTS[s.cc]={baseTime:m,timescale:b},i.trigger(z.INIT_PTS_FOUND,{frag:s,id:n,initPTS:m,timescale:b}))}if(f&&v&&s.sn!=="initSegment"){const m=v.fragments[s.sn-1-v.startSN],b=s.sn===v.startSN,x=!m||s.cc>m.cc;if(a.independent!==!1){const{startPTS:T,endPTS:A,startDTS:O,endDTS:I}=f;if(c)c.elementaryStreams[f.type]={startPTS:T,endPTS:A,startDTS:O,endDTS:I};else if(f.firstKeyFrame&&f.independent&&o.id===1&&!x&&(this.couldBacktrack=!0),f.dropped&&f.independent){const _=this.getMainFwdBufferInfo(),k=(_?_.end:this.getLoadPosition())+this.config.maxBufferHole,L=f.firstKeyFramePTS?f.firstKeyFramePTS:T;if(!b&&k<L-this.config.maxBufferHole&&!x){this.backtrack(s);return}else x&&(s.gap=!0);s.setElementaryStreamInfo(f.type,s.start,A,s.start,I,!0)}s.setElementaryStreamInfo(f.type,T,A,O,I),this.backtrackFragment&&(this.backtrackFragment=s),this.bufferFragmentData(f,s,c,o,b||x)}else if(b||x)s.gap=!0;else{this.backtrack(s);return}}if(g){const{startPTS:m,endPTS:b,startDTS:x,endDTS:T}=g;c&&(c.elementaryStreams[ur.AUDIO]={startPTS:m,endPTS:b,startDTS:x,endDTS:T}),s.setElementaryStreamInfo(ur.AUDIO,m,b,x,T),this.bufferFragmentData(g,s,c,o)}if(v&&h!=null&&(r=h.samples)!=null&&r.length){const m={id:n,frag:s,details:v,samples:h.samples};i.trigger(z.FRAG_PARSING_METADATA,m)}if(v&&d){const m={id:n,frag:s,details:v,samples:d.samples};i.trigger(z.FRAG_PARSING_USERDATA,m)}}_bufferInitSegment(e,r,n,i){if(this.state!==rt.PARSING)return;this.audioOnly=!!r.audio&&!r.video,this.altAudio&&!this.audioOnly&&delete r.audio;const{audio:a,video:o,audiovideo:l}=r;if(a){let s=e.audioCodec;const c=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(s&&(s.indexOf("mp4a.40.5")!==-1?s="mp4a.40.2":s="mp4a.40.5"),a.metadata.channelCount!==1&&c.indexOf("firefox")===-1&&(s="mp4a.40.5")),c.indexOf("android")!==-1&&a.container!=="audio/mpeg"&&(s="mp4a.40.2",this.log(`Android: force audio codec to ${s}`)),e.audioCodec&&e.audioCodec!==s&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${s}"`),a.levelCodec=s,a.id="main",this.log(`Init audio buffer, container:${a.container}, codecs[selected/level/parsed]=[${s||""}/${e.audioCodec||""}/${a.codec}]`)}o&&(o.levelCodec=e.videoCodec,o.id="main",this.log(`Init video buffer, container:${o.container}, codecs[level/parsed]=[${e.videoCodec||""}/${o.codec}]`)),l&&this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.attrs.CODECS||""}/${l.codec}]`),this.hls.trigger(z.BUFFER_CODECS,r),Object.keys(r).forEach(s=>{const u=r[s].initSegment;u!=null&&u.byteLength&&this.hls.trigger(z.BUFFER_APPENDING,{type:s,data:u,frag:n,part:null,chunkMeta:i,parent:n.type})}),this.tick()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Ct.MAIN)}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=rt.IDLE}checkFragmentChanged(){const e=this.media;let r=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Sr.isBuffered(e,n)?r=this.getAppendedFrag(n):Sr.isBuffered(e,n+.1)&&(r=this.getAppendedFrag(n+.1)),r){this.backtrackFragment=null;const i=this.fragPlaying,a=r.level;(!i||r.sn!==i.sn||i.level!==a||r.urlId!==i.urlId)&&(this.fragPlaying=r,this.hls.trigger(z.FRAG_CHANGED,{frag:r}),(!i||i.level!==a)&&this.hls.trigger(z.LEVEL_SWITCHED,{level:a}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const r=e.currentTime,n=this.currentFrag;if(n&&vt(r)&&vt(n.programDateTime)){const i=n.programDateTime+(r-n.start)*1e3;return new Date(i)}}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 Gs{constructor(e,r=0,n=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_=r,this.totalWeight_=n}sample(e,r){const n=Math.pow(this.alpha_,e);this.estimate_=r*(1-n)+n*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 Tie{constructor(e,r,n,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_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Gs(e),this.fast_=new Gs(r),this.defaultTTFB_=i,this.ttfb_=new Gs(e)}update(e,r){const{slow_:n,fast_:i,ttfb_:a}=this;n.halfLife!==e&&(this.slow_=new Gs(e,n.getEstimate(),n.getTotalWeight())),i.halfLife!==r&&(this.fast_=new Gs(r,i.getEstimate(),i.getTotalWeight())),a.halfLife!==e&&(this.ttfb_=new Gs(e,a.getEstimate(),a.getTotalWeight()))}sample(e,r){e=Math.max(e,this.minDelayMs_);const n=8*r,i=e/1e3,a=n/i;this.fast_.sample(i,a),this.slow_.sample(i,a)}sampleTTFB(e){const r=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(r,2)/2);this.ttfb_.sample(n,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_}destroy(){}}class Sie{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;const r=e.config;this.bwEstimator=new Tie(r.abrEwmaSlowVoD,r.abrEwmaFastVoD,r.abrEwmaDefaultEstimate),this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(z.FRAG_LOADING,this.onFragLoading,this),e.on(z.FRAG_LOADED,this.onFragLoaded,this),e.on(z.FRAG_BUFFERED,this.onFragBuffered,this),e.on(z.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(z.LEVEL_LOADED,this.onLevelLoaded,this)}unregisterListeners(){const{hls:e}=this;e.off(z.FRAG_LOADING,this.onFragLoading,this),e.off(z.FRAG_LOADED,this.onFragLoaded,this),e.off(z.FRAG_BUFFERED,this.onFragBuffered,this),e.off(z.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(z.LEVEL_LOADED,this.onLevelLoaded,this)}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null}onFragLoading(e,r){var n;const i=r.frag;this.ignoreFragment(i)||(this.fragCurrent=i,this.partCurrent=(n=r.part)!=null?n:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))}onLevelSwitching(e,r){this.clearTimer()}getTimeToLoadFrag(e,r,n,i){const a=e+n/r,o=i?this.lastLevelLoadSec:0;return a+o}onLevelLoaded(e,r){const n=this.hls.config,{total:i,bwEstimate:a}=r.stats;vt(i)&&vt(a)&&(this.lastLevelLoadSec=8*i/a),r.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)}_abandonRulesCheck(){const{fragCurrent:e,partCurrent:r,hls:n}=this,{autoLevelEnabled:i,media:a}=n;if(!e||!a)return;const o=performance.now(),l=r?r.stats:e.stats,s=r?r.duration:e.duration,c=o-l.loading.start;if(l.aborted||l.loaded&&l.loaded===l.total||e.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||a.paused||!a.playbackRate||!a.readyState)return;const u=n.mainForwardBufferInfo;if(u===null)return;const f=this.bwEstimator.getEstimateTTFB(),d=Math.abs(a.playbackRate);if(c<=Math.max(f,1e3*(s/(d*2))))return;const h=u.len/d;if(h>=2*s/d)return;const p=l.loading.first?l.loading.first-l.loading.start:-1,v=l.loaded&&p>-1,g=this.bwEstimator.getEstimate(),{levels:m,minAutoLevel:b}=n,x=m[e.level],T=l.total||Math.max(l.loaded,Math.round(s*x.maxBitrate/8));let A=c-p;A<1&&v&&(A=Math.min(c,l.loaded*8/g));const O=v?l.loaded*1e3/A:0,I=O?(T-l.loaded)/O:T*8/g+f/1e3;if(I<=h)return;const _=O?O*8:g;let k=Number.POSITIVE_INFINITY,L;for(L=e.level-1;L>b;L--){const P=m[L].maxBitrate;if(k=this.getTimeToLoadFrag(f/1e3,_,s*P,!m[L].details),k<h)break}k>=I||k>s*10||(n.nextLoadLevel=L,v?this.bwEstimator.sample(c-Math.min(f,p),l.loaded):this.bwEstimator.sampleTTFB(c),this.clearTimer(),Me.warn(`[abr] Fragment ${e.sn}${r?" part "+r.index:""} of level ${e.level} is loading too slowly;
      Time to underbuffer: ${h.toFixed(3)} s
      Estimated load time for current fragment: ${I.toFixed(3)} s
      Estimated load time for down switch fragment: ${k.toFixed(3)} s
      TTFB estimate: ${p}
      Current BW estimate: ${vt(g)?(g/1024).toFixed(3):"Unknown"} Kb/s
      New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s
      Aborting and switching to level ${L}`),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),n.trigger(z.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:r,stats:l}))}onFragLoaded(e,{frag:r,part:n}){const i=n?n.stats:r.stats;if(r.type===Ct.MAIN&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(r)){if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const a=n?n.duration:r.duration,o=this.hls.levels[r.level],l=(o.loaded?o.loaded.bytes:0)+i.loaded,s=(o.loaded?o.loaded.duration:0)+a;o.loaded={bytes:l,duration:s},o.realBitrate=Math.round(8*l/s)}if(r.bitrateTest){const a={stats:i,frag:r,part:n,id:r.type};this.onFragBuffered(z.FRAG_BUFFERED,a),r.bitrateTest=!1}}}onFragBuffered(e,r){const{frag:n,part:i}=r,a=i!=null&&i.stats.loaded?i.stats:n.stats;if(a.aborted||this.ignoreFragment(n))return;const o=a.parsing.end-a.loading.start-Math.min(a.loading.first-a.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(o,a.loaded),a.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==Ct.MAIN||e.sn==="initSegment"}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const e=this._nextAutoLevel,r=this.bwEstimator;if(e!==-1&&!r.canEstimate())return e;let n=this.getNextABRAutoLevel();if(e!==-1){const i=this.hls.levels;if(i.length>Math.max(e,n)&&i[e].loadError<=i[n].loadError)return e}return e!==-1&&(n=Math.min(e,n)),n}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:r,hls:n}=this,{maxAutoLevel:i,config:a,minAutoLevel:o,media:l}=n,s=r?r.duration:e?e.duration:0,c=l&&l.playbackRate!==0?Math.abs(l.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():a.abrEwmaDefaultEstimate,f=n.mainForwardBufferInfo,d=(f?f.len:0)/c;let h=this.findBestLevel(u,o,i,d,a.abrBandWidthFactor,a.abrBandWidthUpFactor);if(h>=0)return h;Me.trace(`[abr] ${d?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let p=s?Math.min(s,a.maxStarvationDelay):a.maxStarvationDelay,v=a.abrBandWidthFactor,g=a.abrBandWidthUpFactor;if(!d){const m=this.bitrateTestDelay;m&&(p=(s?Math.min(s,a.maxLoadingDelay):a.maxLoadingDelay)-m,Me.trace(`[abr] bitrate test took ${Math.round(1e3*m)}ms, set first fragment max fetchDuration to ${Math.round(1e3*p)} ms`),v=g=1)}return h=this.findBestLevel(u,o,i,d+p,v,g),Math.max(h,0)}findBestLevel(e,r,n,i,a,o){var l;const{fragCurrent:s,partCurrent:c,lastLoadedFragLevel:u}=this,{levels:f}=this.hls,d=f[u],h=!!(d!=null&&(l=d.details)!=null&&l.live),p=d==null?void 0:d.codecSet,v=c?c.duration:s?s.duration:0,g=this.bwEstimator.getEstimateTTFB()/1e3;let m=r,b=-1;for(let x=n;x>=r;x--){const T=f[x];if(!T||p&&T.codecSet!==p){T&&(m=Math.min(x,m),b=Math.max(x,b));continue}b!==-1&&Me.trace(`[abr] Skipped level(s) ${m}-${b} with CODECS:"${f[b].attrs.CODECS}"; not compatible with "${d.attrs.CODECS}"`);const A=T.details,O=(c?A==null?void 0:A.partTarget:A==null?void 0:A.averagetargetduration)||v;let I;x<=u?I=a*e:I=o*e;const _=f[x].maxBitrate,k=this.getTimeToLoadFrag(g,I,_*O,A===void 0);if(Me.trace(`[abr] level:${x} adjustedbw-bitrate:${Math.round(I-_)} avgDuration:${O.toFixed(1)} maxFetchDuration:${i.toFixed(1)} fetchDuration:${k.toFixed(1)}`),I>_&&(k===0||!vt(k)||h&&!this.bitrateTestDelay||k<i))return x}return-1}set nextAutoLevel(e){this._nextAutoLevel=e}}class vL{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:r}=this;let n;if(e.length)e.length===1?n=e[0]:n=wie(e,r);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function wie(t,e){const r=new Uint8Array(e);let n=0;for(let i=0;i<t.length;i++){const a=t[i];r.set(a,n),n+=a.length}return r}const $T=100;class Cie extends ey{constructor(e,r,n){super(e,r,n,"[audio-stream-controller]",Ct.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.LEVEL_LOADED,this.onLevelLoaded,this),e.on(z.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(z.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(z.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(z.ERROR,this.onError,this),e.on(z.BUFFER_RESET,this.onBufferReset,this),e.on(z.BUFFER_CREATED,this.onBufferCreated,this),e.on(z.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(z.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(z.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.LEVEL_LOADED,this.onLevelLoaded,this),e.off(z.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(z.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(z.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(z.ERROR,this.onError,this),e.off(z.BUFFER_RESET,this.onBufferReset,this),e.off(z.BUFFER_CREATED,this.onBufferCreated,this),e.off(z.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(z.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(z.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:r,id:n,initPTS:i,timescale:a}){if(n==="main"){const o=r.cc;this.initPTS[r.cc]={baseTime:i,timescale:a},this.log(`InitPTS for cc: ${o} found from main: ${i}`),this.videoTrackCC=o,this.state===rt.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=rt.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval($T),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=rt.IDLE):(this.loadedmetadata=!1,this.state=rt.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case rt.IDLE:this.doTickIdle();break;case rt.WAITING_TRACK:{var e;const{levels:n,trackId:i}=this,a=n==null||(e=n[i])==null?void 0:e.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=rt.WAITING_INIT_PTS}break}case rt.FRAG_LOADING_WAITING_RETRY:{var r;const n=performance.now(),i=this.retryDate;(!i||n>=i||(r=this.media)!=null&&r.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=rt.IDLE);break}case rt.WAITING_INIT_PTS:{const n=this.waitingData;if(n){const{frag:i,part:a,cache:o,complete:l}=n;if(this.initPTS[i.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=rt.FRAG_LOADING;const s=o.flush(),c={frag:i,part:a,payload:s,networkDetails:null};this._handleFragmentLoadProgress(c),l&&super._handleFragmentLoadComplete(c)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${i.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const s=this.getLoadPosition(),c=Sr.bufferInfo(this.mediaBuffer,s,this.config.maxBufferHole);gm(c.end,this.config.maxFragLookUpTolerance,i)<0&&(this.log(`Waiting fragment cc (${i.cc}) @ ${i.start} cancelled because another fragment at ${c.end} is needed`),this.clearWaitingFragment())}}else this.state=rt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=rt.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:r,media:n,trackId:i}=this,a=e.config;if(!(r!=null&&r[i])||!n&&(this.startFragRequested||!a.startFragPrefetch))return;const o=r[i],l=o.details;if(!l||l.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(l)){this.state=rt.WAITING_TRACK;return}const s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,ur.AUDIO,Ct.AUDIO));const c=this.getFwdBufferInfo(s,Ct.AUDIO);if(c===null)return;const{bufferedTrack:u,switchingTrack:f}=this;if(!f&&this._streamEnded(c,l)){e.trigger(z.BUFFER_EOS,{type:"audio"}),this.state=rt.ENDED;return}const d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Ct.MAIN),h=c.len,p=this.getMaxBufferLength(d==null?void 0:d.len);if(h>=p&&!f)return;const g=l.fragments[0].start;let m=c.end;if(f&&n){const A=this.getLoadPosition();u&&f.attrs!==u.attrs&&(m=A),l.PTSKnown&&A<g&&(c.end>g||c.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=g+.05)}let b=this.getNextFragment(m,l),x=!1;if(b&&this.isLoopLoading(b,m)&&(x=!!b.gap,b=this.getNextFragmentLoopLoading(b,l,c,Ct.MAIN,p)),!b){this.bufferFlushed=!0;return}const T=d&&b.start>d.end+l.targetduration;if(T||!(d!=null&&d.len)&&c.len){const A=this.getAppendedFrag(b.start,Ct.MAIN);if(A===null||(x||(x=!!A.gap||!!T&&d.len===0),T&&!x||x&&c.nextStart&&c.nextStart<A.end))return}this.loadFragment(b,o,m)}getMaxBufferLength(e){const r=super.getMaxBufferLength();return e?Math.min(Math.max(r,e),this.config.maxMaxBufferLength):r}onMediaDetaching(){this.videoBuffer=null,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:r}){this.resetTransmuxer(),this.levels=r.map(n=>new mu(n))}onAudioTrackSwitching(e,r){const n=!!r.url;this.trackId=r.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),n?this.setInterval($T):this.resetTransmuxer(),n?(this.switchingTrack=r,this.state=rt.IDLE):(this.switchingTrack=null,this.bufferedTrack=r,this.state=rt.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,r){this.mainDetails=r.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(z.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,r){var n;if(this.mainDetails==null){this.cachedTrackLoadedData=r;return}const{levels:i}=this,{details:a,id:o}=r;if(!i){this.warn(`Audio tracks were reset while loading level ${o}`);return}this.log(`Track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`);const l=i[o];let s=0;if(a.live||(n=l.details)!=null&&n.live){this.checkLiveUpdate(a);const c=this.mainDetails;if(a.deltaUpdateFailed||!c)return;!l.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(QR(a,c),s=a.fragments[0].start):s=this.alignPlaylists(a,l.details)}l.details=a,this.levelLastLoaded=o,!this.startFragRequested&&(this.mainDetails||!a.live)&&this.setStartPosition(l.details,s),this.state===rt.WAITING_TRACK&&!this.waitForCdnTuneIn(a)&&(this.state=rt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var r;const{frag:n,part:i,payload:a}=e,{config:o,trackId:l,levels:s}=this;if(!s){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=s[l];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const u=c.details;if(!u){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const f=o.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let d=this.transmuxer;d||(d=this.transmuxer=new pL(this.hls,Ct.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const h=this.initPTS[n.cc],p=(r=n.initSegment)==null?void 0:r.data;if(h!==void 0){const g=i?i.index:-1,m=g!==-1,b=new Z0(n.level,n.sn,n.stats.chunkCount,a.byteLength,g,m);d.push(a,p,f,"",n,i,u.totalduration,!1,b,h)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${u.startSN} ,${u.endSN}],track ${l}`);const{cache:v}=this.waitingData=this.waitingData||{frag:n,part:i,cache:new vL,complete:!1};v.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=rt.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,r){const n=r.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),r.tracks.video&&(this.videoBuffer=r.tracks.video.buffer||null)}onFragBuffered(e,r){const{frag:n,part:i}=r;if(n.type!==Ct.AUDIO){if(!this.loadedmetadata&&n.type===Ct.MAIN){const a=this.videoBuffer||this.media;a&&Sr.getBuffered(a).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(n.sn!=="initSegment"){this.fragPrevious=n;const a=this.switchingTrack;a&&(this.bufferedTrack=a,this.switchingTrack=null,this.hls.trigger(z.AUDIO_TRACK_SWITCHED,kn({},a)))}this.fragBufferedComplete(n,i)}onError(e,r){var n;if(r.fatal){this.state=rt.ERROR;return}switch(r.details){case ze.FRAG_GAP:case ze.FRAG_PARSING_ERROR:case ze.FRAG_DECRYPT_ERROR:case ze.FRAG_LOAD_ERROR:case ze.FRAG_LOAD_TIMEOUT:case ze.KEY_LOAD_ERROR:case ze.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ct.AUDIO,r);break;case ze.AUDIO_TRACK_LOAD_ERROR:case ze.AUDIO_TRACK_LOAD_TIMEOUT:case ze.LEVEL_PARSING_ERROR:!r.levelRetry&&this.state===rt.WAITING_TRACK&&((n=r.context)==null?void 0:n.type)===tr.AUDIO_TRACK&&(this.state=rt.IDLE);break;case ze.BUFFER_FULL_ERROR:if(!r.parent||r.parent!=="audio")return;this.reduceLengthAndFlushBuffer(r)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case ze.INTERNAL_EXCEPTION:this.recoverWorkerError(r);break}}onBufferFlushed(e,{type:r}){r===ur.AUDIO&&(this.bufferFlushed=!0,this.state===rt.ENDED&&(this.state=rt.IDLE))}_handleTransmuxComplete(e){var r;const n="audio",{hls:i}=this,{remuxResult:a,chunkMeta:o}=e,l=this.getCurrentContext(o);if(!l){this.resetWhenMissingContext(o);return}const{frag:s,part:c,level:u}=l,{details:f}=u,{audio:d,text:h,id3:p,initSegment:v}=a;if(this.fragContextChanged(s)||!f){this.fragmentTracker.removeFragment(s);return}if(this.state=rt.PARSING,this.switchingTrack&&d&&this.completeAudioSwitch(this.switchingTrack),v!=null&&v.tracks){const g=s.initSegment||s;this._bufferInitSegment(v.tracks,g,o),i.trigger(z.FRAG_PARSING_INIT_SEGMENT,{frag:g,id:n,tracks:v.tracks})}if(d){const{startPTS:g,endPTS:m,startDTS:b,endDTS:x}=d;c&&(c.elementaryStreams[ur.AUDIO]={startPTS:g,endPTS:m,startDTS:b,endDTS:x}),s.setElementaryStreamInfo(ur.AUDIO,g,m,b,x),this.bufferFragmentData(d,s,c,o)}if(p!=null&&(r=p.samples)!=null&&r.length){const g=zr({id:n,frag:s,details:f},p);i.trigger(z.FRAG_PARSING_METADATA,g)}if(h){const g=zr({id:n,frag:s,details:f},h);i.trigger(z.FRAG_PARSING_USERDATA,g)}}_bufferInitSegment(e,r,n){if(this.state!==rt.PARSING)return;e.video&&delete e.video;const i=e.audio;if(!i)return;i.levelCodec=i.codec,i.id="audio",this.log(`Init audio buffer, container:${i.container}, codecs[parsed]=[${i.codec}]`),this.hls.trigger(z.BUFFER_CODECS,e);const a=i.initSegment;if(a!=null&&a.byteLength){const o={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:a};this.hls.trigger(z.BUFFER_APPENDING,o)}this.tick()}loadFragment(e,r,n){const i=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||i===Qr.NOT_LOADED||i===Qr.PARTIAL){var a;e.sn==="initSegment"?this._loadInitSegment(e,r):(a=r.details)!=null&&a.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=rt.WAITING_INIT_PTS):(this.startFragRequested=!0,super.loadFragment(e,r,n))}else this.clearTrackerIfNeeded(e)}completeAudioSwitch(e){const{hls:r,media:n,bufferedTrack:i}=this,a=i==null?void 0:i.attrs,o=e.attrs;n&&a&&(a.CHANNELS!==o.CHANNELS||a.NAME!==o.NAME||a.LANGUAGE!==o.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=e,this.switchingTrack=null,r.trigger(z.AUDIO_TRACK_SWITCHED,kn({},e))}}class Iie extends X0{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.LEVEL_LOADING,this.onLevelLoading,this),e.on(z.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(z.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(z.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.LEVEL_LOADING,this.onLevelLoading,this),e.off(z.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(z.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(z.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,r){this.tracks=r.audioTracks||[]}onAudioTrackLoaded(e,r){const{id:n,groupId:i,details:a}=r,o=this.tracksInGroup[n];if(!o||o.groupId!==i){this.warn(`Track with id:${n} and group:${i} not found in active group ${o.groupId}`);return}const l=o.details;o.details=r.details,this.log(`audio-track ${n} "${o.name}" lang:${o.lang} group:${i} loaded [${a.startSN}-${a.endSN}]`),n===this.trackId&&this.playlistLoaded(n,r,l)}onLevelLoading(e,r){this.switchLevel(r.level)}onLevelSwitching(e,r){this.switchLevel(r.level)}switchLevel(e){const r=this.hls.levels[e];if(!(r!=null&&r.audioGroupIds))return;const n=r.audioGroupIds[r.urlId];if(this.groupId!==n){this.groupId=n||null;const i=this.tracks.filter(o=>!n||o.groupId===n);this.selectDefaultTrack&&!i.some(o=>o.default)&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;const a={audioTracks:i};this.log(`Updating audio tracks, ${i.length} track(s) found in group:${n}`),this.hls.trigger(z.AUDIO_TRACKS_UPDATED,a),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}onError(e,r){r.fatal||!r.context||r.context.type===tr.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(r))}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioTrack(e){const r=this.tracksInGroup;if(e<0||e>=r.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();const n=this.currentTrack;r[this.trackId];const i=r[e],{groupId:a,name:o}=i;if(this.log(`Switching to audio-track ${e} "${o}" lang:${i.lang} group:${a}`),this.trackId=e,this.currentTrack=i,this.selectDefaultTrack=!1,this.hls.trigger(z.AUDIO_TRACK_SWITCHING,kn({},i)),i.details&&!i.details.live)return;const l=this.switchParams(i.url,n==null?void 0:n.details);this.loadPlaylist(l)}selectInitialTrack(){const e=this.tracksInGroup,r=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(r!==-1)this.setAudioTrack(r);else{const n=new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${e.length}`);this.warn(n.message),this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:n})}}findTrackId(e){const r=this.tracksInGroup;for(let n=0;n<r.length;n++){const i=r[n];if((!this.selectDefaultTrack||i.default)&&(!e||e.attrs["STABLE-RENDITION-ID"]!==void 0&&e.attrs["STABLE-RENDITION-ID"]===i.attrs["STABLE-RENDITION-ID"]||e.name===i.name&&e.lang===i.lang))return i.id}return-1}loadPlaylist(e){super.loadPlaylist();const r=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(r)){const n=r.id,i=r.groupId;let a=r.url;if(e)try{a=e.addDirectives(a)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}this.log(`loading audio-track playlist ${n} "${r.name}" lang:${r.lang} group:${i}`),this.clearTimer(),this.hls.trigger(z.AUDIO_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}}}function mL(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!_ie(t[r].attrs,e[r].attrs))return!1;return!0}function _ie(t,e){const r=t["STABLE-RENDITION-ID"];return r?r===e["STABLE-RENDITION-ID"]:!["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED"].some(n=>t[n]!==e[n])}const BT=500;class Rie extends ey{constructor(e,r,n){super(e,r,n,"[subtitle-stream-controller]",Ct.SUBTITLE),this.levels=[],this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.LEVEL_LOADED,this.onLevelLoaded,this),e.on(z.ERROR,this.onError,this),e.on(z.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(z.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(z.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(z.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(z.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(z.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.LEVEL_LOADED,this.onLevelLoaded,this),e.off(z.ERROR,this.onError,this),e.off(z.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(z.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(z.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(z.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(z.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(z.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=rt.IDLE,this.setInterval(BT),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,r){this.mainDetails=r.details}onSubtitleFragProcessed(e,r){const{frag:n,success:i}=r;if(this.fragPrevious=n,this.state=rt.IDLE,!i)return;const a=this.tracksBuffered[this.currentTrackId];if(!a)return;let o;const l=n.start;for(let c=0;c<a.length;c++)if(l>=a[c].start&&l<=a[c].end){o=a[c];break}const s=n.start+n.duration;o?o.end=s:(o={start:l,end:s},a.push(o)),this.fragmentTracker.fragBuffered(n)}onBufferFlushing(e,r){const{startOffset:n,endOffset:i}=r;if(n===0&&i!==Number.POSITIVE_INFINITY){const a=i-1;if(a<=0)return;r.endOffsetSubtitles=Math.max(0,a),this.tracksBuffered.forEach(o=>{for(let l=0;l<o.length;){if(o[l].end<=a){o.shift();continue}else if(o[l].start<a)o[l].start=a;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(n,a,Ct.SUBTITLE)}}onFragBuffered(e,r){if(!this.loadedmetadata&&r.frag.type===Ct.MAIN){var n;(n=this.media)!=null&&n.buffered.length&&(this.loadedmetadata=!0)}}onError(e,r){const n=r.frag;(n==null?void 0:n.type)===Ct.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==rt.STOPPED&&(this.state=rt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:r}){if(mL(this.levels,r)){this.levels=r.map(n=>new mu(n));return}this.tracksBuffered=[],this.levels=r.map(n=>{const i=new mu(n);return this.tracksBuffered[i.id]=[],i}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ct.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,r){if(this.currentTrackId=r.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}const n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(BT)}onSubtitleTrackLoaded(e,r){var n;const{details:i,id:a}=r,{currentTrackId:o,levels:l}=this;if(!l.length)return;const s=l[o];if(a>=l.length||a!==o||!s)return;this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(i.live||(n=s.details)!=null&&n.live){const u=this.mainDetails;if(i.deltaUpdateFailed||!u)return;const f=u.fragments[0];s.details?(c=this.alignPlaylists(i,s.details),c===0&&f&&(c=f.start,mm(i,c))):i.hasProgramDateTime&&u.hasProgramDateTime?(QR(i,u),c=i.fragments[0].start):f&&(c=f.start,mm(i,c))}s.details=i,this.levelLastLoaded=a,!this.startFragRequested&&(this.mainDetails||!i.live)&&this.setStartPosition(s.details,c),this.tick(),i.live&&!this.fragCurrent&&this.media&&this.state===rt.IDLE&&(gu(null,i.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0))}_handleFragmentLoadComplete(e){const{frag:r,payload:n}=e,i=r.decryptdata,a=this.hls;if(!this.fragContextChanged(r)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&i.method==="AES-128"){const o=performance.now();this.decrypter.decrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).catch(l=>{throw a.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:r}),l}).then(l=>{const s=performance.now();a.trigger(z.FRAG_DECRYPTED,{frag:r,payload:l,stats:{tstart:o,tdecrypt:s}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=rt.IDLE})}}doTick(){if(!this.media){this.state=rt.IDLE;return}if(this.state===rt.IDLE){const{currentTrackId:e,levels:r}=this,n=r[e];if(!r.length||!n||!n.details)return;const{config:i}=this,a=this.getLoadPosition(),o=Sr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a,i.maxBufferHole),{end:l,len:s}=o,c=this.getFwdBufferInfo(this.media,Ct.MAIN),u=n.details,f=this.getMaxBufferLength(c==null?void 0:c.len)+u.levelTargetDuration;if(s>f)return;const d=u.fragments,h=d.length,p=u.edge;let v=null;const g=this.fragPrevious;if(l<p){const m=i.maxFragLookUpTolerance,b=l>p-m?0:m;v=gu(g,d,Math.max(d[0].start,l),b),!v&&g&&g.start<d[0].start&&(v=d[0])}else v=d[h-1];if(!v)return;if(v=this.mapToInitFragWhenRequired(v),v.sn!=="initSegment"){const m=v.sn-u.startSN,b=d[m-1];b&&b.cc===v.cc&&this.fragmentTracker.getState(b)===Qr.NOT_LOADED&&(v=b)}this.fragmentTracker.getState(v)===Qr.NOT_LOADED&&this.loadFragment(v,n,l)}}getMaxBufferLength(e){const r=super.getMaxBufferLength();return e?Math.max(r,e):r}loadFragment(e,r,n){this.fragCurrent=e,e.sn==="initSegment"?this._loadInitSegment(e,r):(this.startFragRequested=!0,super.loadFragment(e,r,n))}get mediaBufferTimeRanges(){return new Lie(this.tracksBuffered[this.currentTrackId]||[])}}class Lie{constructor(e){this.buffered=void 0;const r=(n,i,a)=>{if(i=i>>>0,i>a-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${a})`);return e[i][n]};this.buffered={get length(){return e.length},end(n){return r("end",n,e.length)},start(n){return r("start",n,e.length)}}}}class Die extends X0{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.trackChangeListener=()=>this.onTextTracksChanged(),this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}registerListeners(){const{hls:e}=this;e.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.LEVEL_LOADING,this.onLevelLoading,this),e.on(z.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(z.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(z.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.LEVEL_LOADING,this.onLevelLoading,this),e.off(z.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(z.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(z.ERROR,this.onError,this)}onMediaAttached(e,r){this.media=r.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.trackChangeListener,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),qp(this.media.textTracks).forEach(r=>{nl(r)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,r){this.tracks=r.subtitleTracks}onSubtitleTrackLoaded(e,r){const{id:n,details:i}=r,{trackId:a}=this,o=this.tracksInGroup[a];if(!o){this.warn(`Invalid subtitle track id ${n}`);return}const l=o.details;o.details=r.details,this.log(`subtitle track ${n} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,r,l)}onLevelLoading(e,r){this.switchLevel(r.level)}onLevelSwitching(e,r){this.switchLevel(r.level)}switchLevel(e){const r=this.hls.levels[e];if(!(r!=null&&r.textGroupIds))return;const n=r.textGroupIds[r.urlId],i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==n){const a=this.tracks.filter(s=>!n||s.groupId===n);this.tracksInGroup=a;const o=this.findTrackId(i==null?void 0:i.name)||this.findTrackId();this.groupId=n||null;const l={subtitleTracks:a};this.log(`Updating subtitle tracks, ${a.length} track(s) found in "${n}" group-id`),this.hls.trigger(z.SUBTITLE_TRACKS_UPDATED,l),o!==-1&&this.setSubtitleTrack(o,i)}else this.shouldReloadPlaylist(i)&&this.setSubtitleTrack(this.trackId,i)}findTrackId(e){const r=this.tracksInGroup;for(let n=0;n<r.length;n++){const i=r[n];if((!this.selectDefaultTrack||i.default)&&(!e||e===i.name))return i.id}return-1}onError(e,r){r.fatal||!r.context||r.context.type===tr.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.checkRetry(r)}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1;const r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,r)}loadPlaylist(e){super.loadPlaylist();const r=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(r)){const n=r.id,i=r.groupId;let a=r.url;if(e)try{a=e.addDirectives(a)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}this.log(`Loading subtitle playlist for id ${n}`),this.hls.trigger(z.SUBTITLE_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}}toggleTrackModes(e){const{media:r,trackId:n}=this;if(!r)return;const i=qp(r.textTracks),a=i.filter(l=>l.groupId===this.groupId);if(e===-1)[].slice.call(i).forEach(l=>{l.mode="disabled"});else{const l=a[n];l&&(l.mode="disabled")}const o=a[e];o&&(o.mode=this.subtitleDisplay?"showing":"hidden")}setSubtitleTrack(e,r){var n;const i=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(e===-1||(n=i[e])!=null&&n.details)||e<-1||e>=i.length)return;this.clearTimer();const a=i[e];if(this.log(`Switching to subtitle-track ${e}`+(a?` "${a.name}" lang:${a.lang} group:${a.groupId}`:"")),this.trackId=e,a){const{id:o,groupId:l="",name:s,type:c,url:u}=a;this.hls.trigger(z.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:s,type:c,url:u});const f=this.switchParams(a.url,r==null?void 0:r.details);this.loadPlaylist(f)}else this.hls.trigger(z.SUBTITLE_TRACK_SWITCH,{id:e})}onTextTracksChanged(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=-1;const r=qp(this.media.textTracks);for(let n=0;n<r.length;n++)if(r[n].mode==="hidden")e=n;else if(r[n].mode==="showing"){e=n;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}}function qp(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(t[r])}return e}class Oie{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,r){const n=this.queues[r];n.push(e),n.length===1&&this.buffers[r]&&this.executeNext(r)}insertAbort(e,r){this.queues[r].unshift(e),this.executeNext(r)}appendBlocker(e){let r;const n=new Promise(a=>{r=a}),i={execute:r,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(i,e),n}executeNext(e){const{buffers:r,queues:n}=this,i=r[e],a=n[e];if(a.length){const o=a[0];try{o.execute()}catch(l){Me.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(l),i!=null&&i.updating||(a.shift(),this.executeNext(e))}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const UT=ch(),HT=/([ha]vc.)(?:\.[^.,]+)+/;class kie{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=()=>{const{media:r,mediaSource:n}=this;Me.log("[buffer-controller]: Media source opened"),r&&(r.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(z.MEDIA_ATTACHED,{media:r})),n&&n.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{Me.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=()=>{Me.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=()=>{const{media:r,_objectUrl:n}=this;r&&r.src!==n&&Me.error(`Media element src was set while attaching MediaSource (${n} > ${r.src})`)},this.hls=e,this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null}registerListeners(){const{hls:e}=this;e.on(z.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.BUFFER_RESET,this.onBufferReset,this),e.on(z.BUFFER_APPENDING,this.onBufferAppending,this),e.on(z.BUFFER_CODECS,this.onBufferCodecs,this),e.on(z.BUFFER_EOS,this.onBufferEos,this),e.on(z.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(z.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(z.FRAG_PARSED,this.onFragParsed,this),e.on(z.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(z.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.BUFFER_RESET,this.onBufferReset,this),e.off(z.BUFFER_APPENDING,this.onBufferAppending,this),e.off(z.BUFFER_CODECS,this.onBufferCodecs,this),e.off(z.BUFFER_EOS,this.onBufferEos,this),e.off(z.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(z.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(z.FRAG_PARSED,this.onFragParsed,this),e.off(z.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new Oie(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,r){let n=2;(r.audio&&!r.video||!r.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,Me.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,r){const n=this.media=r.media;if(n&&UT){const i=this.mediaSource=new UT;i.addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(i),this._objectUrl=n.src,n.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:r,_objectUrl:n}=this;if(r){if(Me.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(i){Me.warn(`[buffer-controller]: onMediaDetaching: ${i.message} while calling endOfStream`)}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):Me.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(z.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{const r=this.sourceBuffer[e];try{r&&(this.removeBufferListeners(e),this.mediaSource&&this.mediaSource.removeSourceBuffer(r),this.sourceBuffer[e]=void 0)}catch(n){Me.warn(`[buffer-controller]: Failed to reset the ${e} buffer`,n)}}),this._initSourceBuffer()}onBufferCodecs(e,r){const n=this.getSourceBufferTypes().length;Object.keys(r).forEach(i=>{if(n){const a=this.tracks[i];if(a&&typeof a.buffer.changeType=="function"){const{id:o,codec:l,levelCodec:s,container:c,metadata:u}=r[i],f=(a.levelCodec||a.codec).replace(HT,"$1"),d=(s||l).replace(HT,"$1");if(f!==d){const h=`${c};codecs=${s||l}`;this.appendChangeType(i,h),Me.log(`[buffer-controller]: switching codec ${f} to ${d}`),this.tracks[i]={buffer:a.buffer,codec:l,container:c,levelCodec:s,metadata:u,id:o}}}}else this.pendingTracks[i]=r[i]}),!n&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())}appendChangeType(e,r){const{operationQueue:n}=this,i={execute:()=>{const a=this.sourceBuffer[e];a&&(Me.log(`[buffer-controller]: changing ${e} sourceBuffer type to ${r}`),a.changeType(r)),n.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:a=>{Me.warn(`[buffer-controller]: Failed to change ${e} SourceBuffer type`,a)}};n.append(i,e)}onBufferAppending(e,r){const{hls:n,operationQueue:i,tracks:a}=this,{data:o,type:l,frag:s,part:c,chunkMeta:u}=r,f=u.buffering[l],d=self.performance.now();f.start=d;const h=s.stats.buffering,p=c?c.stats.buffering:null;h.start===0&&(h.start=d),p&&p.start===0&&(p.start=d);const v=a.audio;let g=!1;l==="audio"&&(v==null?void 0:v.container)==="audio/mpeg"&&(g=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const m=s.start,b={execute:()=>{if(f.executeStart=self.performance.now(),g){const x=this.sourceBuffer[l];if(x){const T=m-x.timestampOffset;Math.abs(T)>=.1&&(Me.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${m} (delta: ${T}) sn: ${s.sn})`),x.timestampOffset=m)}}this.appendExecutor(o,l)},onStart:()=>{},onComplete:()=>{const x=self.performance.now();f.executeEnd=f.end=x,h.first===0&&(h.first=x),p&&p.first===0&&(p.first=x);const{sourceBuffer:T}=this,A={};for(const O in T)A[O]=Sr.getBuffered(T[O]);this.appendError=0,this.hls.trigger(z.BUFFER_APPENDED,{type:l,frag:s,part:c,chunkMeta:u,parent:s.type,timeRanges:A})},onError:x=>{Me.error(`[buffer-controller]: Error encountered while trying to append to the ${l} SourceBuffer`,x);const T={type:Tt.MEDIA_ERROR,parent:s.type,details:ze.BUFFER_APPEND_ERROR,frag:s,part:c,chunkMeta:u,error:x,err:x,fatal:!1};x.code===DOMException.QUOTA_EXCEEDED_ERR?T.details=ze.BUFFER_FULL_ERROR:(this.appendError++,T.details=ze.BUFFER_APPEND_ERROR,this.appendError>n.config.appendErrorMaxRetry&&(Me.error(`[buffer-controller]: Failed ${n.config.appendErrorMaxRetry} times to append segment in sourceBuffer`),T.fatal=!0)),n.trigger(z.ERROR,T)}};i.append(b,l)}onBufferFlushing(e,r){const{operationQueue:n}=this,i=a=>({execute:this.removeExecutor.bind(this,a,r.startOffset,r.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(z.BUFFER_FLUSHED,{type:a})},onError:o=>{Me.warn(`[buffer-controller]: Failed to remove from ${a} SourceBuffer`,o)}});r.type?n.append(i(r.type),r.type):this.getSourceBufferTypes().forEach(a=>{n.append(i(a),a)})}onFragParsed(e,r){const{frag:n,part:i}=r,a=[],o=i?i.elementaryStreams:n.elementaryStreams;o[ur.AUDIOVIDEO]?a.push("audiovideo"):(o[ur.AUDIO]&&a.push("audio"),o[ur.VIDEO]&&a.push("video"));const l=()=>{const s=self.performance.now();n.stats.buffering.end=s,i&&(i.stats.buffering.end=s);const c=i?i.stats:n.stats;this.hls.trigger(z.FRAG_BUFFERED,{frag:n,part:i,stats:c,id:n.type})};a.length===0&&Me.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(l,a)}onFragChanged(e,r){this.flushBackBuffer()}onBufferEos(e,r){this.getSourceBufferTypes().reduce((i,a)=>{const o=this.sourceBuffer[a];return o&&(!r.type||r.type===a)&&(o.ending=!0,o.ended||(o.ended=!0,Me.log(`[buffer-controller]: ${a} sourceBuffer now EOS`))),i&&!!(!o||o.ended)},!0)&&(Me.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(a=>{const o=this.sourceBuffer[a];o&&(o.ending=!1)});const{mediaSource:i}=this;if(!i||i.readyState!=="open"){i&&Me.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${i.readyState}`);return}Me.log("[buffer-controller]: Calling mediaSource.endOfStream()"),i.endOfStream()}))}onLevelUpdated(e,{details:r}){r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}flushBackBuffer(){const{hls:e,details:r,media:n,sourceBuffer:i}=this;if(!n||r===null)return;const a=this.getSourceBufferTypes();if(!a.length)return;const o=r.live&&e.config.liveBackBufferLength!==null?e.config.liveBackBufferLength:e.config.backBufferLength;if(!vt(o)||o<0)return;const l=n.currentTime,s=r.levelTargetDuration,c=Math.max(o,s),u=Math.floor(l/s)*s-c;a.forEach(f=>{const d=i[f];if(d){const h=Sr.getBuffered(d);if(h.length>0&&u>h.start(0)){if(e.trigger(z.BACK_BUFFER_REACHED,{bufferEnd:u}),r.live)e.trigger(z.LIVE_BACK_BUFFER_REACHED,{bufferEnd:u});else if(d.ended&&h.end(h.length-1)-l<s*2){Me.info(`[buffer-controller]: Cannot flush ${f} back buffer while SourceBuffer is in ended state`);return}e.trigger(z.BUFFER_FLUSHING,{startOffset:0,endOffset:u,type:f})}}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:r,media:n,mediaSource:i}=this,a=e.fragments[0].start+e.totalduration,o=n.duration,l=vt(i.duration)?i.duration:0;e.live&&r.config.liveDurationInfinity?(Me.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(a>l&&a>o||!vt(o))&&(Me.log(`[buffer-controller]: Updating Media Source duration to ${a.toFixed(3)}`),i.duration=a)}updateSeekableRange(e){const r=this.mediaSource,n=e.fragments;if(n.length&&e.live&&r!=null&&r.setLiveSeekableRange){const a=Math.max(0,n[0].start),o=Math.max(a,a+e.totalduration);r.setLiveSeekableRange(a,o)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:r,pendingTracks:n}=this,i=Object.keys(n).length;if(i&&!e||i===2){this.createSourceBuffers(n),this.pendingTracks={};const a=this.getSourceBufferTypes();if(a.length)this.hls.trigger(z.BUFFER_CREATED,{tracks:this.tracks}),a.forEach(o=>{r.executeNext(o)});else{const o=new Error("could not create source buffer for media codec(s)");this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:o,reason:o.message})}}}createSourceBuffers(e){const{sourceBuffer:r,mediaSource:n}=this;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(const i in e)if(!r[i]){const a=e[i];if(!a)throw Error(`source buffer exists for track ${i}, however track does not`);const o=a.levelCodec||a.codec,l=`${a.container};codecs=${o}`;Me.log(`[buffer-controller]: creating sourceBuffer(${l})`);try{const s=r[i]=n.addSourceBuffer(l),c=i;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[i]={buffer:s,codec:o,container:a.container,levelCodec:a.levelCodec,metadata:a.metadata,id:a.id}}catch(s){Me.error(`[buffer-controller]: error while trying to add sourceBuffer: ${s.message}`),this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:s,mimeType:l})}}}_onSBUpdateStart(e){const{operationQueue:r}=this;r.current(e).onStart()}_onSBUpdateEnd(e){const{operationQueue:r}=this;r.current(e).onComplete(),r.shiftAndExecuteNext(e)}_onSBUpdateError(e,r){const n=new Error(`${e} SourceBuffer error`);Me.error(`[buffer-controller]: ${n}`,r),this.hls.trigger(z.ERROR,{type:Tt.MEDIA_ERROR,details:ze.BUFFER_APPENDING_ERROR,error:n,fatal:!1});const i=this.operationQueue.current(e);i&&i.onError(r)}removeExecutor(e,r,n){const{media:i,mediaSource:a,operationQueue:o,sourceBuffer:l}=this,s=l[e];if(!i||!a||!s){Me.warn(`[buffer-controller]: Attempting to remove from the ${e} SourceBuffer, but it does not exist`),o.shiftAndExecuteNext(e);return}const c=vt(i.duration)?i.duration:1/0,u=vt(a.duration)?a.duration:1/0,f=Math.max(0,r),d=Math.min(n,c,u);d>f&&!s.ending?(s.ended=!1,Me.log(`[buffer-controller]: Removing [${f},${d}] from the ${e} SourceBuffer`),s.remove(f,d)):o.shiftAndExecuteNext(e)}appendExecutor(e,r){const{operationQueue:n,sourceBuffer:i}=this,a=i[r];if(!a){Me.warn(`[buffer-controller]: Attempting to append to the ${r} SourceBuffer, but it does not exist`),n.shiftAndExecuteNext(r);return}a.ended=!1,a.appendBuffer(e)}blockBuffers(e,r=this.getSourceBufferTypes()){if(!r.length){Me.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:n}=this,i=r.map(a=>n.appendBlocker(a));Promise.all(i).then(()=>{e(),r.forEach(a=>{const o=this.sourceBuffer[a];o!=null&&o.updating||n.shiftAndExecuteNext(a)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,r,n){const i=this.sourceBuffer[e];if(!i)return;const a=n.bind(this,e);this.listeners[e].push({event:r,listener:a}),i.addEventListener(r,a)}removeBufferListeners(e){const r=this.sourceBuffer[e];r&&this.listeners[e].forEach(n=>{r.removeEventListener(n.event,n.listener)})}}const VT={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},gL=function(e){let r=e;return VT.hasOwnProperty(e)&&(r=VT[e]),String.fromCharCode(r)},Di=15,Ea=100,Mie={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Fie={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Pie={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Nie={25:2,26:4,29:6,30:8,31:10,27:13,28:15},$ie=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Bie{constructor(){this.time=null,this.verboseLevel=0}log(e,r){if(this.verboseLevel>=e){const n=typeof r=="function"?r():r;Me.log(`${this.time} [${e}] ${n}`)}}}const Go=function(e){const r=[];for(let n=0;n<e.length;n++)r.push(e[n].toString(16));return r};class yL{constructor(e,r,n,i,a){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=r||!1,this.italics=n||!1,this.background=i||"black",this.flash=a||!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const r=["foreground","underline","italics","background","flash"];for(let n=0;n<r.length;n++){const i=r[n];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 Uie{constructor(e,r,n,i,a,o){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new yL(r,n,i,a,o)}reset(){this.uchar=" ",this.penState.reset()}setChar(e,r){this.uchar=e,this.penState.copy(r)}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 Hie{constructor(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(let r=0;r<Ea;r++)this.chars.push(new Uie);this.logger=e,this.pos=0,this.currPenState=new yL}equals(e){let r=!0;for(let n=0;n<Ea;n++)if(!this.chars[n].equals(e.chars[n])){r=!1;break}return r}copy(e){for(let r=0;r<Ea;r++)this.chars[r].copy(e.chars[r])}isEmpty(){let e=!0;for(let r=0;r<Ea;r++)if(!this.chars[r].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>Ea&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ea)}moveCursor(e){const r=this.pos+e;if(e>1)for(let n=this.pos+1;n<r+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(r)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const r=gL(e);if(this.pos>=Ea){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+r+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(r,this.currPenState),this.moveCursor(1)}clearFromPos(e){let r;for(r=e;r<Ea;r++)this.chars[r].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let r=!0;for(let n=0;n<Ea;n++){const i=this.chars[n].uchar;i!==" "&&(r=!1),e.push(i)}return r?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Xp{constructor(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(let r=0;r<Di;r++)this.rows.push(new Hie(e));this.logger=e,this.currRow=Di-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}reset(){for(let e=0;e<Di;e++)this.rows[e].clear();this.currRow=Di-1}equals(e){let r=!0;for(let n=0;n<Di;n++)if(!this.rows[n].equals(e.rows[n])){r=!1;break}return r}copy(e){for(let r=0;r<Di;r++)this.rows[r].copy(e.rows[r])}isEmpty(){let e=!0;for(let r=0;r<Di;r++)if(!this.rows[r].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 = "+JSON.stringify(e));let r=e.row-1;if(this.nrRollUpRows&&r<this.nrRollUpRows-1&&(r=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==r){for(let l=0;l<Di;l++)this.rows[l].clear();const a=this.currRow+1-this.nrRollUpRows,o=this.lastOutputScreen;if(o){const l=o.rows[a].cueStartTime,s=this.logger.time;if(l&&s!==null&&l<s)for(let c=0;c<this.nrRollUpRows;c++)this.rows[r-this.nrRollUpRows+c+1].copy(o.rows[a+c])}}this.currRow=r;const n=this.rows[this.currRow];if(e.indent!==null){const a=e.indent,o=Math.max(a-1,0);n.setCursor(e.indent),e.color=n.chars[o].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 = "+JSON.stringify(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,r=this.rows.splice(e,1)[0];r.clear(),this.rows.splice(this.currRow,0,r),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const r=[];let n="",i=-1;for(let a=0;a<Di;a++){const o=this.rows[a].getTextString();o&&(i=a+1,e?r.push("Row "+i+": '"+o+"'"):r.push(o.trim()))}return r.length>0&&(e?n="["+r.join(" | ")+"]":n=r.join(`
`)),n}getTextAndFormat(){return this.rows}}class jT{constructor(e,r,n){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=r,this.mode=null,this.verbose=0,this.displayedMemory=new Xp(n),this.nonDisplayedMemory=new Xp(n),this.lastOutputScreen=new Xp(n),this.currRollUpRow=this.displayedMemory.rows[Di-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Di-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 n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>r+": "+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 r={flash:!1};if(r.underline=e%2===1,r.italics=e>=46,r.italics)r.foreground="white";else{const n=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];r.foreground=i[n]}this.logger.log(2,"MIDROW: "+JSON.stringify(r)),this.writeScreen.setPen(r)}outputDataUpdate(e=!1){const r=this.logger.time;r!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=r:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,r,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:r),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 WT{constructor(e,r,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;const i=new Bie;this.channels=[null,new jT(e,r,i),new jT(e+1,n,i)],this.cmdHistory=zT(),this.logger=i}getHandler(e){return this.channels[e].getHandler()}setHandler(e,r){this.channels[e].setHandler(r)}addData(e,r){let n,i,a,o=!1;this.logger.time=e;for(let l=0;l<r.length;l+=2)if(i=r[l]&127,a=r[l+1]&127,!(i===0&&a===0)){if(this.logger.log(3,"["+Go([r[l],r[l+1]])+"] -> ("+Go([i,a])+")"),n=this.parseCmd(i,a),n||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a),o)){const s=this.currentChannel;s&&s>0?this.channels[s].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!n&&!o&&this.logger.log(2,"Couldn't parse cleaned data "+Go([i,a])+" orig: "+Go([r[l],r[l+1]]))}}parseCmd(e,r){const{cmdHistory:n}=this,i=(e===20||e===28||e===21||e===29)&&r>=32&&r<=47,a=(e===23||e===31)&&r>=33&&r<=35;if(!(i||a))return!1;if(GT(e,r,n))return zs(null,null,n),this.logger.log(3,"Repeated command ("+Go([e,r])+") is dropped"),!0;const o=e===20||e===21||e===23?1:2,l=this.channels[o];return e===20||e===21||e===28||e===29?r===32?l.ccRCL():r===33?l.ccBS():r===34?l.ccAOF():r===35?l.ccAON():r===36?l.ccDER():r===37?l.ccRU(2):r===38?l.ccRU(3):r===39?l.ccRU(4):r===40?l.ccFON():r===41?l.ccRDC():r===42?l.ccTR():r===43?l.ccRTD():r===44?l.ccEDM():r===45?l.ccCR():r===46?l.ccENM():r===47&&l.ccEOC():l.ccTO(r-32),zs(e,r,n),this.currentChannel=o,!0}parseMidrow(e,r){let n=0;if((e===17||e===25)&&r>=32&&r<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[n];return i?(i.ccMIDROW(r),this.logger.log(3,"MIDROW ("+Go([e,r])+")"),!0):!1}return!1}parsePAC(e,r){let n;const i=this.cmdHistory,a=(e>=17&&e<=23||e>=25&&e<=31)&&r>=64&&r<=127,o=(e===16||e===24)&&r>=64&&r<=95;if(!(a||o))return!1;if(GT(e,r,i))return zs(null,null,i),!0;const l=e<=23?1:2;r>=64&&r<=95?n=l===1?Mie[e]:Pie[e]:n=l===1?Fie[e]:Nie[e];const s=this.channels[l];return s?(s.setPAC(this.interpretPAC(n,r)),zs(e,r,i),this.currentChannel=l,!0):!1}interpretPAC(e,r){let n;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return r>95?n=r-96:n=r-64,i.underline=(n&1)===1,n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=Math.floor((n-16)/2)*4,i}parseChars(e,r){let n,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19){let o;a===17?o=r+80:a===18?o=r+112:o=r+144,this.logger.log(2,"Special char '"+gL(o)+"' in channel "+n),i=[o]}else e>=32&&e<=127&&(i=r===0?[e]:[e,r]);if(i){const o=Go(i);this.logger.log(3,"Char codes =  "+o.join(",")),zs(e,r,this.cmdHistory)}return i}parseBackgroundAttributes(e,r){const n=(e===16||e===24)&&r>=32&&r<=47,i=(e===23||e===31)&&r>=45&&r<=47;if(!(n||i))return!1;let a;const o={};e===16||e===24?(a=Math.floor((r-32)/2),o.background=$ie[a],r%2===1&&(o.background=o.background+"_semi")):r===45?o.background="transparent":(o.foreground="black",r===47&&(o.underline=!0));const l=e<=23?1:2;return this.channels[l].setBkgData(o),zs(e,r,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const r=this.channels[e];r&&r.reset()}this.cmdHistory=zT()}cueSplitAtTime(e){for(let r=0;r<this.channels.length;r++){const n=this.channels[r];n&&n.cueSplitAtTime(e)}}}function zs(t,e,r){r.a=t,r.b=e}function GT(t,e,r){return r.a===t&&r.b===e}function zT(){return{a:null,b:null}}class Ef{constructor(e,r){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=r}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,r,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=r,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var ay=function(){if(typeof self<"u"&&self.VTTCue)return self.VTTCue;const t=["","lr","rl"],e=["start","middle","end","left","right"];function r(l,s){if(typeof s!="string"||!Array.isArray(l))return!1;const c=s.toLowerCase();return~l.indexOf(c)?c:!1}function n(l){return r(t,l)}function i(l){return r(e,l)}function a(l,...s){let c=1;for(;c<arguments.length;c++){const u=arguments[c];for(const f in u)l[f]=u[f]}return l}function o(l,s,c){const u=this,f={enumerable:!0};u.hasBeenReset=!1;let d="",h=!1,p=l,v=s,g=c,m=null,b="",x=!0,T="auto",A="start",O=50,I="middle",_=50,k="middle";Object.defineProperty(u,"id",a({},f,{get:function(){return d},set:function(L){d=""+L}})),Object.defineProperty(u,"pauseOnExit",a({},f,{get:function(){return h},set:function(L){h=!!L}})),Object.defineProperty(u,"startTime",a({},f,{get:function(){return p},set:function(L){if(typeof L!="number")throw new TypeError("Start time must be set to a number.");p=L,this.hasBeenReset=!0}})),Object.defineProperty(u,"endTime",a({},f,{get:function(){return v},set:function(L){if(typeof L!="number")throw new TypeError("End time must be set to a number.");v=L,this.hasBeenReset=!0}})),Object.defineProperty(u,"text",a({},f,{get:function(){return g},set:function(L){g=""+L,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",a({},f,{get:function(){return m},set:function(L){m=L,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",a({},f,{get:function(){return b},set:function(L){const P=n(L);if(P===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=P,this.hasBeenReset=!0}})),Object.defineProperty(u,"snapToLines",a({},f,{get:function(){return x},set:function(L){x=!!L,this.hasBeenReset=!0}})),Object.defineProperty(u,"line",a({},f,{get:function(){return T},set:function(L){if(typeof L!="number"&&L!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");T=L,this.hasBeenReset=!0}})),Object.defineProperty(u,"lineAlign",a({},f,{get:function(){return A},set:function(L){const P=i(L);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");A=P,this.hasBeenReset=!0}})),Object.defineProperty(u,"position",a({},f,{get:function(){return O},set:function(L){if(L<0||L>100)throw new Error("Position must be between 0 and 100.");O=L,this.hasBeenReset=!0}})),Object.defineProperty(u,"positionAlign",a({},f,{get:function(){return I},set:function(L){const P=i(L);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");I=P,this.hasBeenReset=!0}})),Object.defineProperty(u,"size",a({},f,{get:function(){return _},set:function(L){if(L<0||L>100)throw new Error("Size must be between 0 and 100.");_=L,this.hasBeenReset=!0}})),Object.defineProperty(u,"align",a({},f,{get:function(){return k},set:function(L){const P=i(L);if(!P)throw new SyntaxError("An invalid or illegal string was specified.");k=P,this.hasBeenReset=!0}})),u.displayState=void 0}return o.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},o}();class Vie{decode(e,r){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function bL(t){function e(n,i,a,o){return(n|0)*3600+(i|0)*60+(a|0)+parseFloat(o||0)}const r=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}class jie{constructor(){this.values=Object.create(null)}set(e,r){!this.get(e)&&r!==""&&(this.values[e]=r)}get(e,r,n){return n?this.has(e)?this.values[e]:r[n]:this.has(e)?this.values[e]:r}has(e){return e in this.values}alt(e,r,n){for(let i=0;i<n.length;++i)if(r===n[i]){this.set(e,r);break}}integer(e,r){/^-?\d+$/.test(r)&&this.set(e,parseInt(r,10))}percent(e,r){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(r)){const n=parseFloat(r);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function xL(t,e,r,n){const i=n?t.split(n):[t];for(const a in i){if(typeof i[a]!="string")continue;const o=i[a].split(r);if(o.length!==2)continue;const l=o[0],s=o[1];e(l,s)}}const bm=new ay(0,0,""),Tf=bm.align==="middle"?"middle":"center";function Wie(t,e,r){const n=t;function i(){const l=bL(t);if(l===null)throw new Error("Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),l}function a(l,s){const c=new jie;xL(l,function(d,h){let p;switch(d){case"region":for(let v=r.length-1;v>=0;v--)if(r[v].id===h){c.set(d,r[v].region);break}break;case"vertical":c.alt(d,h,["rl","lr"]);break;case"line":p=h.split(","),c.integer(d,p[0]),c.percent(d,p[0])&&c.set("snapToLines",!1),c.alt(d,p[0],["auto"]),p.length===2&&c.alt("lineAlign",p[1],["start",Tf,"end"]);break;case"position":p=h.split(","),c.percent(d,p[0]),p.length===2&&c.alt("positionAlign",p[1],["start",Tf,"end","line-left","line-right","auto"]);break;case"size":c.percent(d,h);break;case"align":c.alt(d,h,["start",Tf,"end","left","right"]);break}},/:/,/\s/),s.region=c.get("region",null),s.vertical=c.get("vertical","");let u=c.get("line","auto");u==="auto"&&bm.line===-1&&(u=-1),s.line=u,s.lineAlign=c.get("lineAlign","start"),s.snapToLines=c.get("snapToLines",!0),s.size=c.get("size",100),s.align=c.get("align",Tf);let f=c.get("position","auto");f==="auto"&&bm.position===50&&(f=s.align==="start"||s.align==="left"?0:s.align==="end"||s.align==="right"?100:50),s.position=f}function o(){t=t.replace(/^\s+/,"")}if(o(),e.startTime=i(),o(),t.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);t=t.slice(3),o(),e.endTime=i(),o(),a(t,e)}function AL(t){return t.replace(/<br(?: \/)?>/gi,`
`)}class Gie{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Vie,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const r=this;e&&(r.buffer+=r.decoder.decode(e,{stream:!0}));function n(){let a=r.buffer,o=0;for(a=AL(a);o<a.length&&a[o]!=="\r"&&a[o]!==`
`;)++o;const l=a.slice(0,o);return a[o]==="\r"&&++o,a[o]===`
`&&++o,r.buffer=a.slice(o),l}function i(a){xL(a,function(o,l){},/:/)}try{let a="";if(r.state==="INITIAL"){if(!/\r\n|\n/.test(r.buffer))return this;a=n();const l=a.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[0]))throw new Error("Malformed WebVTT signature.");r.state="HEADER"}let o=!1;for(;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;switch(o?o=!1:a=n(),r.state){case"HEADER":/:/.test(a)?i(a):a||(r.state="ID");continue;case"NOTE":a||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(a)){r.state="NOTE";break}if(!a)continue;if(r.cue=new ay(0,0,""),r.state="CUE",a.indexOf("-->")===-1){r.cue.id=a;continue}case"CUE":if(!r.cue){r.state="BADCUE";continue}try{Wie(a,r.cue,r.regionList)}catch{r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":{const l=a.indexOf("-->")!==-1;if(!a||l&&(o=!0)){r.oncue&&r.cue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}if(r.cue===null)continue;r.cue.text&&(r.cue.text+=`
`),r.cue.text+=a}continue;case"BADCUE":a||(r.state="ID")}}}catch{r.state==="CUETEXT"&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state=r.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`

`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(r){e.onparsingerror&&e.onparsingerror(r)}return e.onflush&&e.onflush(),this}}const zie=/\r\n|\n\r|\n|\r/g,Zp=function(e,r,n=0){return e.slice(n,n+r.length)===r},Kie=function(e){let r=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),a=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!vt(r)||!vt(n)||!vt(i)||!vt(a))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return r+=1e3*n,r+=60*1e3*i,r+=60*60*1e3*a,r},Jp=function(e){let r=5381,n=e.length;for(;n;)r=r*33^e.charCodeAt(--n);return(r>>>0).toString()};function oy(t,e,r){return Jp(t.toString())+Jp(e.toString())+Jp(r)}const Yie=function(e,r,n){let i=e[r],a=e[i.prevCC];if(!a||!a.new&&i.new){e.ccOffset=e.presentationOffset=i.start,i.new=!1;return}for(;(o=a)!=null&&o.new;){var o;e.ccOffset+=i.start-a.start,i.new=!1,i=a,a=e[i.prevCC]}e.presentationOffset=n};function qie(t,e,r,n,i,a,o){const l=new Gie,s=oa(new Uint8Array(t)).trim().replace(zie,`
`).split(`
`),c=[],u=e?oie(e.baseTime,e.timescale):0;let f="00:00.000",d=0,h=0,p,v=!0;l.oncue=function(g){const m=r[n];let b=r.ccOffset;const x=(d-u)/9e4;if(m!=null&&m.new&&(h!==void 0?b=r.ccOffset=m.start:Yie(r,n,x)),x){if(!e){p=new Error("Missing initPTS for VTT MPEGTS");return}b=x-r.presentationOffset}const T=g.endTime-g.startTime,A=gi((g.startTime+b-h)*9e4,i*9e4)/9e4;g.startTime=Math.max(A,0),g.endTime=Math.max(A+T,0);const O=g.text.trim();g.text=decodeURIComponent(encodeURIComponent(O)),g.id||(g.id=oy(g.startTime,g.endTime,O)),g.endTime>0&&c.push(g)},l.onparsingerror=function(g){p=g},l.onflush=function(){if(p){o(p);return}a(c)},s.forEach(g=>{if(v)if(Zp(g,"X-TIMESTAMP-MAP=")){v=!1,g.slice(16).split(",").forEach(m=>{Zp(m,"LOCAL:")?f=m.slice(6):Zp(m,"MPEGTS:")&&(d=parseInt(m.slice(7)))});try{h=Kie(f)/1e3}catch(m){p=m}return}else g===""&&(v=!1);l.parse(g+`
`)}),l.flush()}const Qp="stpp.ttml.im1t",EL=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,TL=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Xie={left:"start",center:"center",right:"end",start:"start",end:"end"};function KT(t,e,r,n){const i=Zt(new Uint8Array(t),["mdat"]);if(i.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const a=i.map(l=>oa(l)),o=aie(e.baseTime,1,e.timescale);try{a.forEach(l=>r(Zie(l,o)))}catch(l){n(l)}}function Zie(t,e){const i=new DOMParser().parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const a={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},o=Object.keys(a).reduce((f,d)=>(f[d]=i.getAttribute(`ttp:${d}`)||a[d],f),{}),l=i.getAttribute("xml:space")!=="preserve",s=YT(ev(i,"styling","style")),c=YT(ev(i,"layout","region")),u=ev(i,"body","[begin]");return[].map.call(u,f=>{const d=SL(f,l);if(!d||!f.hasAttribute("begin"))return null;const h=rv(f.getAttribute("begin"),o),p=rv(f.getAttribute("dur"),o);let v=rv(f.getAttribute("end"),o);if(h===null)throw qT(f);if(v===null){if(p===null)throw qT(f);v=h+p}const g=new ay(h-e,v-e,d);g.id=oy(g.startTime,g.endTime,g.text);const m=c[f.getAttribute("region")],b=s[f.getAttribute("style")],x=Jie(m,b,s),{textAlign:T}=x;if(T){const A=Xie[T];A&&(g.lineAlign=A),g.align=T}return zr(g,x),g}).filter(f=>f!==null)}function ev(t,e,r){const n=t.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(r)):[]}function YT(t){return t.reduce((e,r)=>{const n=r.getAttribute("xml:id");return n&&(e[n]=r),e},{})}function SL(t,e){return[].slice.call(t.childNodes).reduce((r,n,i)=>{var a;return n.nodeName==="br"&&i?r+`
`:(a=n.childNodes)!=null&&a.length?SL(n,e):e?r+n.textContent.trim().replace(/\s+/g," "):r+n.textContent},"")}function Jie(t,e,r){const n="http://www.w3.org/ns/ttml#styling";let i=null;const a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=t!=null&&t.hasAttribute("style")?t.getAttribute("style"):null;return o&&r.hasOwnProperty(o)&&(i=r[o]),a.reduce((l,s)=>{const c=tv(e,n,s)||tv(t,n,s)||tv(i,n,s);return c&&(l[s]=c),l},{})}function tv(t,e,r){return t&&t.hasAttributeNS(e,r)?t.getAttributeNS(e,r):null}function qT(t){return new Error(`Could not parse ttml timestamp ${t}`)}function rv(t,e){if(!t)return null;let r=bL(t);return r===null&&(EL.test(t)?r=Qie(t,e):TL.test(t)&&(r=eae(t,e))),r}function Qie(t,e){const r=EL.exec(t),n=(r[4]|0)+(r[5]|0)/e.subFrameRate;return(r[1]|0)*3600+(r[2]|0)*60+(r[3]|0)+n/e.frameRate}function eae(t,e){const r=TL.exec(t),n=Number(r[1]);switch(r[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class tae{constructor(e){if(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.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=XT(),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}},this.config.enableCEA708Captions){const r=new Ef(this,"textTrack1"),n=new Ef(this,"textTrack2"),i=new Ef(this,"textTrack3"),a=new Ef(this,"textTrack4");this.cea608Parser1=new WT(1,r,n),this.cea608Parser2=new WT(3,i,a)}e.on(z.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(z.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(z.FRAG_LOADING,this.onFragLoading,this),e.on(z.FRAG_LOADED,this.onFragLoaded,this),e.on(z.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(z.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(z.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(z.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(z.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(z.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(z.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(z.FRAG_LOADING,this.onFragLoading,this),e.off(z.FRAG_LOADED,this.onFragLoaded,this),e.off(z.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(z.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(z.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(z.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(z.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null}addCues(e,r,n,i,a){let o=!1;for(let l=a.length;l--;){const s=a[l],c=nae(s[0],s[1],r,n);if(c>=0&&(s[0]=Math.min(s[0],r),s[1]=Math.max(s[1],n),o=!0,c/(n-r)>.5))return}if(o||a.push([r,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,r,n,i)}else{const l=this.Cues.newCue(null,r,n,i);this.hls.trigger(z.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:r,id:n,initPTS:i,timescale:a}){const{unparsedVttFrags:o}=this;n==="main"&&(this.initPTS[r.cc]={baseTime:i,timescale:a}),o.length&&(this.unparsedVttFrags=[],o.forEach(l=>{this.onFragLoaded(z.FRAG_LOADED,l)}))}getExistingTrack(e){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const i=r.textTracks[n];if(i[e])return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:r,captionsTracks:n,media:i}=this,{label:a,languageCode:o}=r[e],l=this.getExistingTrack(e);if(l)n[e]=l,nl(n[e]),zR(n[e],i);else{const s=this.createTextTrack("captions",a,o);s&&(s[e]=!0,n[e]=s)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const r=this.captionsProperties[e];if(!r)return;const n=r.label,i={_id:e,label:n,kind:"captions",default:r.media?!!r.media.default:!1,closedCaptions:r.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(z.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,r,n){const i=this.media;if(i)return i.addTextTrack(e,r,n)}onMediaAttaching(e,r){this.media=r.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(r=>{nl(e[r]),delete e[r]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=XT(),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 r=e.textTracks;if(r)for(let n=0;n<r.length;n++)nl(r[n])}onSubtitleTracksUpdated(e,r){const n=r.subtitleTracks||[],i=n.some(a=>a.textCodec===Qp);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(mL(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const o=this.media?this.media.textTracks:null;this.tracks.forEach((l,s)=>{let c;if(o&&s<o.length){let u=null;for(let f=0;f<o.length;f++)if(rae(o[f],l)){u=o[f];break}u&&(c=u)}if(c)nl(c);else{const u=this._captionsOrSubtitlesFromCharacteristics(l);c=this.createTextTrack(u,l.name,l.lang),c&&(c.mode="disabled")}c&&(c.groupId=l.groupId,this.textTracks.push(c))})}else if(this.tracks.length){const o=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(z.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:o})}}}_captionsOrSubtitlesFromCharacteristics(e){if(e.attrs.CHARACTERISTICS){const r=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),n=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(r&&n)return"captions"}return"subtitles"}onManifestLoaded(e,r){this.config.enableCEA708Captions&&r.captions&&r.captions.forEach(n=>{const i=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!i)return;const a=`textTrack${i[1]}`,o=this.captionsProperties[a];o&&(o.label=n.name,n.lang&&(o.languageCode=n.lang),o.media=n)})}closedCaptionsForLevel(e){const r=this.hls.levels[e.level];return r==null?void 0:r.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,r){const{cea608Parser1:n,cea608Parser2:i,lastSn:a,lastPartIndex:o}=this;if(!(!this.enabled||!(n&&i))&&r.frag.type===Ct.MAIN){var l,s;const c=r.frag.sn,u=(l=r==null||(s=r.part)==null?void 0:s.index)!=null?l:-1;c===a+1||c===a&&u===o+1||(n.reset(),i.reset()),this.lastSn=c,this.lastPartIndex=u}}onFragLoaded(e,r){const{frag:n,payload:i}=r;if(n.type===Ct.SUBTITLE)if(i.byteLength){const a=n.decryptdata,o="stats"in r;if(a==null||!a.encrypted||o){const l=this.tracks[n.level],s=this.vttCCs;s[n.cc]||(s[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===Qp?this._parseIMSC1(n,i):this._parseVTTs(r)}}else this.hls.trigger(z.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,r){const n=this.hls;KT(r,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),n.trigger(z.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{Me.log(`Failed to parse IMSC1: ${i}`),n.trigger(z.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:i})})}_parseVTTs(e){var r;const{frag:n,payload:i}=e,{initPTS:a,unparsedVttFrags:o}=this,l=a.length-1;if(!a[n.cc]&&l===-1){o.push(e);return}const s=this.hls,c=(r=n.initSegment)!=null&&r.data?Ts(n.initSegment.data,new Uint8Array(i)):i;qie(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,u=>{this._appendCues(u,n.level),s.trigger(z.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},u=>{const f=u.message==="Missing initPTS for VTT MPEGTS";f?o.push(e):this._fallbackToIMSC1(n,i),Me.log(`Failed to parse VTT cue: ${u}`),!(f&&l>n.cc)&&s.trigger(z.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:u})})}_fallbackToIMSC1(e,r){const n=this.tracks[e.level];n.textCodec||KT(r,this.initPTS[e.cc],()=>{n.textCodec=Qp,this._parseIMSC1(e,r)},()=>{n.textCodec="wvtt"})}_appendCues(e,r){const n=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[r];if(!i||i.mode==="disabled")return;e.forEach(a=>KR(i,a))}else{const i=this.tracks[r];if(!i)return;const a=i.default?"default":"subtitles"+r;n.trigger(z.CUES_PARSED,{type:"subtitles",cues:e,track:a})}}onFragDecrypted(e,r){const{frag:n}=r;n.type===Ct.SUBTITLE&&this.onFragLoaded(z.FRAG_LOADED,r)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,r){const{cea608Parser1:n,cea608Parser2:i}=this;if(!this.enabled||!(n&&i))return;const{frag:a,samples:o}=r;if(!(a.type===Ct.MAIN&&this.closedCaptionsForLevel(a)==="NONE"))for(let l=0;l<o.length;l++){const s=o[l].bytes;if(s){const c=this.extractCea608Data(s);n.addData(o[l].pts,c[0]),i.addData(o[l].pts,c[1])}}}onBufferFlushing(e,{startOffset:r,endOffset:n,endOffsetSubtitles:i,type:a}){const{media:o}=this;if(!(!o||o.currentTime<n)){if(!a||a==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(s=>hm(l[s],r,n))}if(this.config.renderTextTracksNatively&&r===0&&i!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(s=>hm(l[s],r,i))}}}extractCea608Data(e){const r=[[],[]],n=e[0]&31;let i=2;for(let a=0;a<n;a++){const o=e[i++],l=127&e[i++],s=127&e[i++];if(l===0&&s===0)continue;if((4&o)!==0){const u=3&o;(u===0||u===1)&&(r[u].push(l),r[u].push(s))}}return r}}function rae(t,e){return!!t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function nae(t,e,r,n){return Math.min(e,n)-Math.max(t,r)}function XT(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class sy{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.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(z.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(z.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(z.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.BUFFER_CODECS,this.onBufferCodecs,this),e.on(z.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(z.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(z.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(z.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.BUFFER_CODECS,this.onBufferCodecs,this),e.off(z.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,r){const n=this.hls.levels[r.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,r){this.media=r.media instanceof HTMLVideoElement?r.media:null,this.clientRect=null}onManifestParsed(e,r){const n=this.hls;this.restrictedLevels=[],this.firstLevel=r.firstLevel,n.config.capLevelToPlayerSize&&r.video&&this.startCapping()}onBufferCodecs(e,r){this.hls.config.capLevelToPlayerSize&&r.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){const e=this.hls.levels;if(e.length){const r=this.hls;r.autoLevelCapping=this.getMaxLevel(e.length-1),r.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=r.autoLevelCapping}}}getMaxLevel(e){const r=this.hls.levels;if(!r.length)return-1;const n=r.filter((i,a)=>this.isLevelAllowed(i)&&a<=e);return this.clientRect=null,sy.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),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,r={width:0,height:0};if(e){const n=e.getBoundingClientRect();r.width=n.width,r.height=n.height,!r.width&&!r.height&&(r.width=n.right-n.left||e.width||0,r.height=n.bottom-n.top||e.height||0)}return this.clientRect=r,r}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 e}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,r,n){if(!(e!=null&&e.length))return-1;const i=(o,l)=>l?o.width!==l.width||o.height!==l.height:!0;let a=e.length-1;for(let o=0;o<e.length;o+=1){const l=e[o];if((l.width>=r||l.height>=n)&&i(l,e[o+1])){a=o;break}}return a}}class iae{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}registerListeners(){this.hls.on(z.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(z.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,r){const n=this.hls.config;if(n.capLevelOnFPSDrop){const i=r.media instanceof self.HTMLVideoElement?r.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),n.fpsDroppedMonitoringPeriod)}}checkFPS(e,r,n){const i=performance.now();if(r){if(this.lastTime){const a=i-this.lastTime,o=n-this.lastDroppedFrames,l=r-this.lastDecodedFrames,s=1e3*o/a,c=this.hls;if(c.trigger(z.FPS_DROP,{currentDropped:o,currentDecoded:l,totalDroppedFrames:n}),s>0&&o>c.config.fpsDroppedMonitoringThreshold*l){let u=c.currentLevel;Me.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=u)&&(u=u-1,c.trigger(z.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:c.currentLevel}),c.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=r}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const r=e.getVideoPlaybackQuality();this.checkFPS(e,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const Sf="[eme]";class hl{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=hl.CDMCleanupPromise?[hl.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=Me.debug.bind(Me,Sf),this.log=Me.log.bind(Me,Sf),this.warn=Me.warn.bind(Me,Sf),this.error=Me.error.bind(Me,Sf),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(z.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(z.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(z.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(z.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(z.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(z.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:r,widevineLicenseUrl:n}=this.config,i=r[e];if(i)return i.licenseUrl;if(e===_r.WIDEVINE&&n)return n;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:r}=this.config,n=r[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const r=this.hls.levels,n=(o,l,s)=>!!o&&s.indexOf(o)===l,i=r.map(o=>o.audioCodec).filter(n),a=r.map(o=>o.videoCodec).filter(n);return i.length+a.length===0&&a.push("avc1.42e01e"),new Promise((o,l)=>{const s=c=>{const u=c.shift();this.getMediaKeysPromise(u,i,a).then(f=>o({keySystem:u,mediaKeys:f})).catch(f=>{c.length?s(c):f instanceof vi?l(f):l(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_NO_ACCESS,error:f,fatal:!0},f.message))})};s(e)})}requestMediaKeySystemAccess(e,r){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let i=`Configured requestMediaKeySystemAccess is not a function ${n}`;return MR===null&&self.location.protocol==="http:"&&(i=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(i))}return n(e,r)}getMediaKeysPromise(e,r,n){const i=yre(e,r,n,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e];let o=a==null?void 0:a.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(i)}`),o=this.requestMediaKeySystemAccess(e,i);const l=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(s=>{this.log(`Failed to obtain access to key-system "${e}": ${s}`)}),o.then(s=>{this.log(`Access for key-system "${s.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),l.mediaKeys=s.createMediaKeys().then(u=>(this.log(`Media-keys created for "${e}"`),c.then(f=>f?this.setMediaKeysServerCertificate(u,e,f):u))),l.mediaKeys.catch(u=>{this.error(`Failed to create media-keys for "${e}"}: ${u}`)}),l.mediaKeys})}return o.then(()=>a.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:r,mediaKeys:n}){this.log(`Creating key-system session "${r}" keyId: ${Qi.hexDump(e.keyId||[])}`);const i=n.createSession(),a={decryptdata:e,keySystem:r,mediaKeys:n,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a}renewKeySession(e){const r=e.decryptdata;if(r.pssh){const n=this.createMediaKeySessionContext(e),i=this.getKeyIdString(r),a="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(n,a,r.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return Qi.hexDump(e.keyId)}updateKeySession(e,r){var n;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${Qi.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
      } (data length: ${r&&r.byteLength})`),i.update(r)}selectKeySystemFormat(e){const r=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((r,n)=>{const i=Fp(this.config),a=e.map(oT).filter(o=>!!o&&i.indexOf(o)!==-1);return this.getKeySystemSelectionPromise(a).then(({keySystem:o})=>{const l=sT(o);l?r(l):n(new Error(`Unable to find format for key-system "${o}"`))}).catch(n)})}loadKey(e){const r=e.keyInfo.decryptdata,n=this.getKeyIdString(r),i=`(keyId: ${n} format: "${r.keyFormat}" method: ${r.method} uri: ${r.uri})`;this.log(`Starting session for key ${i}`);let a=this.keyIdToKeySessionPromise[n];return a||(a=this.keyIdToKeySessionPromise[n]=this.getKeySystemForKeyPromise(r).then(({keySystem:o,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(o,l).then(()=>{this.throwIfDestroyed();const s=this.createMediaKeySessionContext({keySystem:o,mediaKeys:l,decryptdata:r}),c="cenc";return this.generateRequestWithPreferredKeySession(s,c,r.pssh,"playlist-key")}))),a.catch(o=>this.handleError(o))),a}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof vi?this.hls.trigger(z.ERROR,e.data):this.hls.trigger(z.ERROR,{type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const r=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[r];if(!n){const i=oT(e.keyFormat),a=i?[i]:Fp(this.config);return this.attemptKeySystemAccess(a)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Fp(this.config)),e.length===0)throw new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:r,initData:n}=e;if(this.debug(`"${e.type}" event: init data type: "${r}"`),n===null)return;let i,a;if(r==="sinf"&&this.config.drmSystems[_r.FAIRPLAY]){const u=dn(new Uint8Array(n));try{const f=K0(JSON.parse(u).sinf),d=VR(new Uint8Array(f));if(!d)return;i=d.subarray(8,24),a=_r.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const u=Vre(n);if(u===null)return;u.version===0&&u.systemId===kR.WIDEVINE&&u.data&&(i=u.data.subarray(8,24)),a=gre(u.systemId)}if(!a||!i)return;const o=Qi.hexDump(i),{keyIdToKeySessionPromise:l,mediaKeySessions:s}=this;let c=l[o];for(let u=0;u<s.length;u++){const f=s[u],d=f.decryptdata;if(d.pssh||!d.keyId)continue;const h=Qi.hexDump(d.keyId);if(o===h||d.uri.replace(/-/g,"").indexOf(o)!==-1){c=l[h],delete l[h],d.pssh=new Uint8Array(n),d.keyId=i,c=l[o]=c.then(()=>this.generateRequestWithPreferredKeySession(f,r,n,"encrypted-event-key-match"));break}}c||(c=l[o]=this.getKeySystemSelectionPromise([a]).then(({keySystem:u,mediaKeys:f})=>{var d;this.throwIfDestroyed();const h=new vu("ISO-23001-7",o,(d=sT(u))!=null?d:"");return h.pssh=new Uint8Array(n),h.keyId=i,this.attemptSetMediaKeys(u,f).then(()=>{this.throwIfDestroyed();const p=this.createMediaKeySessionContext({decryptdata:h,keySystem:u,mediaKeys:f});return this.generateRequestWithPreferredKeySession(p,r,n,"encrypted-event-no-match")})})),c.catch(u=>this.handleError(u))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,r){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(r)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(a=>n.indexOf(a)===-1)})}generateRequestWithPreferredKeySession(e,r,n,i){var a,o;const l=(a=this.config.drmSystems)==null||(o=a[e.keySystem])==null?void 0:o.generateRequest;if(l)try{const d=l.call(this.hls,r,n,e);if(!d)throw new Error("Invalid response from configured generateRequest filter");r=d.initDataType,n=e.decryptdata.pssh=d.initData?new Uint8Array(d.initData):null}catch(d){var s;if(this.warn(d.message),(s=this.hls)!=null&&s.config.debug)throw d}if(n===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${c} (init data type: ${r} length: ${n?n.byteLength:null})`);const u=new iy;e.mediaKeysSession.onmessage=d=>{const h=e.mediaKeysSession;if(!h){u.emit("error",new Error("invalid state"));return}const{messageType:p,message:v}=d;this.log(`"${p}" message event for session "${h.sessionId}" message size: ${v.byteLength}`),p==="license-request"||p==="license-renewal"?this.renewLicense(e,v).catch(g=>{this.handleError(g),u.emit("error",g)}):p==="license-release"?e.keySystem===_r.FAIRPLAY&&(this.updateKeySession(e,OR("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${p}"`)},e.mediaKeysSession.onkeystatuseschange=d=>{if(!e.mediaKeysSession){u.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const p=e.keyStatus;u.emit("keyStatus",p),p==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};const f=new Promise((d,h)=>{u.on("error",h),u.on("keyStatus",p=>{p.startsWith("usable")?d():p==="output-restricted"?h(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):p==="internal-error"?h(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${p}"`)):p==="expired"?h(new Error("key expired while generating request")):this.warn(`unhandled key status change "${p}"`)})});return e.mediaKeysSession.generateRequest(r,n).then(()=>{var d;this.log(`Request generated for key-session "${(d=e.mediaKeysSession)==null?void 0:d.sessionId}" keyId: ${c}`)}).catch(d=>{throw new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_NO_SESSION,error:d,fatal:!1},`Error generating key-session request: ${d}`)}).then(()=>f).catch(d=>{throw u.removeAllListeners(),this.removeSession(e),d}).then(()=>(u.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((r,n)=>{this.log(`key status change "${r}" for keyStatuses keyId: ${Qi.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${Qi.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=r})}fetchServerCertificate(e){const r=this.config,n=r.loader,i=new n(r),a=this.getServerCertificateUrl(e);return a?(this.log(`Fetching serverCertificate for "${e}"`),new Promise((o,l)=>{const s={responseType:"arraybuffer",url:a},c=r.certLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},f={onSuccess:(d,h,p,v)=>{o(d.data)},onError:(d,h,p,v)=>{l(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:kn({url:s.url,data:void 0},d)},`"${e}" certificate request failed (${a}). Status: ${d.code} (${d.text})`))},onTimeout:(d,h,p)=>{l(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:{url:s.url,data:void 0}},`"${e}" certificate request timed out (${a})`))},onAbort:(d,h,p)=>{l(new Error("aborted"))}};i.load(s,u,f)})):Promise.resolve()}setMediaKeysServerCertificate(e,r,n){return new Promise((i,a)=>{e.setServerCertificate(n).then(o=>{this.log(`setServerCertificate ${o?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${r}"`),i(e)}).catch(o=>{a(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:o,fatal:!0},o.message))})})}renewLicense(e,r){return this.requestLicense(e,new Uint8Array(r)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(i=>{throw new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}setupLicenseXHR(e,r,n,i){const a=this.config.licenseXhrSetup;return a?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return a.call(this.hls,e,r,n,i)}).catch(o=>{if(!n.decryptdata)throw o;return e.open("POST",r,!0),a.call(this.hls,e,r,n,i)}).then(o=>(e.readyState||e.open("POST",r,!0),{xhr:e,licenseChallenge:o||i})):(e.open("POST",r,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,r){const n=this.config.keyLoadPolicy.default;return new Promise((i,a)=>{const o=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${o}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let s=l.response;this.log(`License received ${s instanceof ArrayBuffer?s.byteLength:s}`);const c=this.config.licenseResponseCallback;if(c)try{s=c.call(this.hls,l,o,e)}catch(u){this.error(u)}i(s)}else{const s=n.errorRetry,c=s?s.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)a(new vi({type:Tt.KEY_SYSTEM_ERROR,details:ze.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:o,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${o}). Status: ${l.status} (${l.statusText})`));else{const u=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${u} attempts left`),this.requestLicense(e,r).then(i,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,o,e,r).then(({xhr:s,licenseChallenge:c})=>{s.send(c)})})}onMediaAttached(e,r){if(!this.config.emeEnabled)return;const n=r.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,r=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},vu.clearKeyUriToKeyIdMap();const n=r.length;hl.CDMCleanupPromise=Promise.all(r.map(i=>this.removeSession(i)).concat(e==null?void 0:e.setMediaKeys(null).catch(i=>{this.log(`Could not clear media keys: ${i}. media.src: ${e==null?void 0:e.src}`)}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),r.length=0)}).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}. media.src: ${e==null?void 0:e.src}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:r}){if(!(!r||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=r.reduce((i,a)=>(i.indexOf(a.keyFormat)===-1&&i.push(a.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:r,licenseXhr:n}=e;if(r){this.log(`Remove licenses and keys and close session ${r.sessionId}`),r.onmessage=null,r.onkeystatuseschange=null,n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),r.remove().catch(a=>{this.log(`Could not remove session: ${a}`)}).then(()=>r.close()).catch(a=>{this.log(`Could not close session: ${a}`)})}}}hl.CDMCleanupPromise=void 0;class vi extends Error{constructor(e,r){super(r),this.data=void 0,e.error||(e.error=new Error(r)),this.data=e,e.err=e.error}}const aae=1;var Nn={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"};const oae="h";class fo{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.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:Nn.MANIFEST,su:!this.initialized})}catch(a){Me.warn("Could not generate manifest CMCD data.",a)}},this.applyFragmentData=i=>{try{const a=i.frag,o=this.hls.levels[a.level],l=this.getObjectType(a),s={d:a.duration*1e3,ot:l};(l===Nn.VIDEO||l===Nn.AUDIO||l==Nn.MUXED)&&(s.br=o.bitrate/1e3,s.tb=this.getTopBandwidth(l)/1e3,s.bl=this.getBufferLength(l)),this.apply(i,s)}catch(a){Me.warn("Could not generate segment CMCD data.",a)}},this.hls=e;const r=this.config=e.config,{cmcd:n}=r;n!=null&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||fo.uuid(),this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.registerListeners())}registerListeners(){const e=this.hls;e.on(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.MEDIA_DETACHED,this.onMediaDetached,this),e.on(z.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(z.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.MEDIA_DETACHED,this.onMediaDetached,this),e.off(z.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null}onMediaAttached(e,r){this.media=r.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,r){var n,i;this.audioBuffer=(n=r.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(i=r.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:aae,sf:oae,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,r={}){zr(r,this.createData());const n=r.ot===Nn.INIT||r.ot===Nn.VIDEO||r.ot===Nn.MUXED;if(this.starved&&n&&(r.bs=!0,r.su=!0,this.starved=!1),r.su==null&&(r.su=this.buffering),this.useHeaders){const i=fo.toHeaders(r);if(!Object.keys(i).length)return;e.headers||(e.headers={}),zr(e.headers,i)}else{const i=fo.toQuery(r);if(!i)return;e.url=fo.appendQueryToUri(e.url,i)}}getObjectType(e){const{type:r}=e;if(r==="subtitle")return Nn.TIMED_TEXT;if(e.sn==="initSegment")return Nn.INIT;if(r==="audio")return Nn.AUDIO;if(r==="main")return this.hls.audioTracks.length?Nn.VIDEO:Nn.MUXED}getTopBandwidth(e){let r=0,n;const i=this.hls;if(e===Nn.AUDIO)n=i.audioTracks;else{const a=i.maxAutoLevel,o=a>-1?a+1:i.levels.length;n=i.levels.slice(0,o)}for(const a of n)a.bitrate>r&&(r=a.bitrate);return r>0?r:NaN}getBufferLength(e){const r=this.hls.media,n=e===Nn.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!r?NaN:Sr.bufferInfo(n,r.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,r=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(a){this.loader=void 0,this.loader=new n(a)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(a,o,l){r(a),this.loader.load(a,o,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,r=this.applyFragmentData,n=e||this.config.loader;return class{constructor(a){this.loader=void 0,this.loader=new n(a)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(a,o,l){r(a),this.loader.load(a,o,l)}}}static uuid(){const e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.slice(r.lastIndexOf("/")+1)}static serialize(e){const r=[],n=c=>!Number.isNaN(c)&&c!=null&&c!==""&&c!==!1,i=c=>Math.round(c),a=c=>i(c/100)*100,l={br:i,d:i,bl:a,dl:a,mtp:a,nor:c=>encodeURIComponent(c),rtp:a,tb:i},s=Object.keys(e||{}).sort();for(const c of s){let u=e[c];if(!n(u)||c==="v"&&u===1||c=="pr"&&u===1)continue;const f=l[c];f&&(u=f(u));const d=typeof u;let h;c==="ot"||c==="sf"||c==="st"?h=`${c}=${u}`:d==="boolean"?h=c:d==="number"?h=`${c}=${u}`:h=`${c}=${JSON.stringify(u)}`,r.push(h)}return r.join(",")}static toHeaders(e){const r=Object.keys(e),n={},i=["Object","Request","Session","Status"],a=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};for(const l of r){const s=o[l]!=null?o[l]:1;a[s][l]=e[l]}for(let l=0;l<a.length;l++){const s=fo.serialize(a[l]);s&&(n[`CMCD-${i[l]}`]=s)}return n}static toQuery(e){return`CMCD=${encodeURIComponent(fo.serialize(e))}`}static appendQueryToUri(e,r){if(!r)return e;const n=e.includes("?")?"&":"?";return`${e}${n}${r}`}}const sae=3e5;class lae{constructor(e){this.hls=void 0,this.log=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.log=Me.log.bind(Me,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(z.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(z.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(z.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(z.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.ERROR,this.onError,this))}startLoad(){if(this.started=!0,self.clearTimeout(this.reloadTimer),this.enabled&&this.uri)if(this.updated){const e=Math.max(this.timeToLoad*1e3-(performance.now()-this.updated),0);this.scheduleRefresh(this.uri,e)}else this.loadSteeringManifest(this.uri)}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),self.clearTimeout(this.reloadTimer)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const r=this.levels;r&&(this.levels=r.filter(n=>n!==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,r){const{contentSteering:n}=r;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,r){this.audioTracks=r.audioTracks,this.subtitleTracks=r.subtitleTracks}onError(e,r){const{errorAction:n}=r;if((n==null?void 0:n.action)===gn.SendAlternateToPenaltyBox&&n.flags===mi.MoveAllAlternatesMatchingHost){let i=this.pathwayPriority;const a=this.pathwayId;this.penalizedPathways[a]||(this.penalizedPathways[a]=performance.now()),!i&&this.levels&&(i=this.levels.reduce((o,l)=>(o.indexOf(l.pathwayId)===-1&&o.push(l.pathwayId),o),[])),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==a)}}filterParsedLevels(e){this.levels=e;let r=this.getLevelsForPathway(this.pathwayId);if(r.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),r=this.getLevelsForPathway(n),this.pathwayId=n}return r.length!==e.length?(this.log(`Found ${r.length}/${e.length} levels in Pathway "${this.pathwayId}"`),r):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(r=>e===r.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let r;const n=this.penalizedPathways,i=performance.now();Object.keys(n).forEach(a=>{i-n[a]>sae&&delete n[a]});for(let a=0;a<e.length;a++){const o=e[a];if(n[o])continue;if(o===this.pathwayId)return;const l=this.hls.nextLoadLevel,s=this.hls.levels[l];if(r=this.getLevelsForPathway(o),r.length>0){this.log(`Setting Pathway to "${o}"`),this.pathwayId=o,this.hls.trigger(z.LEVELS_UPDATED,{levels:r});const c=this.hls.levels[l];s&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==s.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==s.bitrate&&this.log(`Unstable Pathways change from bitrate ${s.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}clonePathways(e){const r=this.levels;if(!r)return;const n={},i={};e.forEach(a=>{const{ID:o,"BASE-ID":l,"URI-REPLACEMENT":s}=a;if(r.some(u=>u.pathwayId===o))return;const c=this.getLevelsForPathway(l).map(u=>{const f=zr({},u);f.details=void 0,f.url=wL(u.uri,u.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",s);const d=new Ir(u.attrs);d["PATHWAY-ID"]=o;const h=d.AUDIO&&`${d.AUDIO}_clone_${o}`,p=d.SUBTITLES&&`${d.SUBTITLES}_clone_${o}`;h&&(n[d.AUDIO]=h,d.AUDIO=h),p&&(i[d.SUBTITLES]=p,d.SUBTITLES=p),f.attrs=d;const v=new mu(f);return bd(v,"audio",h),bd(v,"text",p),v});r.push(...c),ZT(this.audioTracks,n,s,o),ZT(this.subtitleTracks,i,s,o)})}loadSteeringManifest(e){const r=this.hls.config,n=r.loader;this.loader&&this.loader.destroy(),this.loader=new n(r);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 u=(this.hls.bandwidthEstimate||r.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+u)}const a={responseType:"json",url:i.href},o=r.steeringManifestLoadPolicy.default,l=o.errorRetry||o.timeoutRetry||{},s={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(u,f,d,h)=>{this.log(`Loaded steering manifest: "${i}"`);const p=u.data;if(p.VERSION!==1){this.log(`Steering VERSION ${p.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=p.TTL;const{"RELOAD-URI":v,"PATHWAY-CLONES":g,"PATHWAY-PRIORITY":m}=p;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||d.url),g&&this.clonePathways(g),m&&this.updatePathwayPriority(m)},onError:(u,f,d,h)=>{if(this.log(`Error loading steering manifest: ${u.code} ${u.text} (${f.url})`),this.stopLoad(),u.code===410){this.enabled=!1,this.log(`Steering manifest ${f.url} no longer available`);return}let p=this.timeToLoad*1e3;if(u.code===429){const v=this.loader;if(typeof(v==null?void 0:v.getResponseHeader)=="function"){const g=v.getResponseHeader("Retry-After");g&&(p=parseFloat(g)*1e3)}this.log(`Steering manifest ${f.url} rate limited`);return}this.scheduleRefresh(this.uri||f.url,p)},onTimeout:(u,f,d)=>{this.log(`Timeout loading steering manifest (${f.url})`),this.scheduleRefresh(this.uri||f.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(a,s,c)}scheduleRefresh(e,r=this.timeToLoad*1e3){self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout(()=>{this.loadSteeringManifest(e)},r)}}function ZT(t,e,r,n){t&&Object.keys(e).forEach(i=>{const a=t.filter(o=>o.groupId===i).map(o=>{const l=zr({},o);return l.details=void 0,l.attrs=new Ir(l.attrs),l.url=l.attrs.URI=wL(o.url,o.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",r),l.groupId=l.attrs["GROUP-ID"]=e[i],l.attrs["PATHWAY-ID"]=n,l});t.push(...a)})}function wL(t,e,r,n){const{HOST:i,PARAMS:a,[r]:o}=n;let l;e&&(l=o==null?void 0:o[e],l&&(t=l));const s=new self.URL(t);return i&&!l&&(s.host=i),a&&Object.keys(a).sort().forEach(c=>{c&&s.searchParams.set(c,a[c])}),s.href}const cae=/^age:\s*[\d.]+\s*$/im;class CL{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=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new sh,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=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,r,n){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=r,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:r}=this;if(!e)return;const n=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const a=this.xhrSetup;a?Promise.resolve().then(()=>{if(!this.stats.aborted)return a(n,r.url)}).catch(o=>(n.open("GET",r.url,!0),a(n,r.url))).then(()=>{this.stats.aborted||this.openAndSendXhr(n,r,e)}).catch(o=>{this.callbacks.onError({code:n.status,text:o.message},r,n,i)}):this.openAndSendXhr(n,r,e)}openAndSendXhr(e,r,n){e.readyState||e.open("GET",r.url,!0);const i=this.context.headers,{maxTimeToFirstByteMs:a,maxLoadTimeMs:o}=n.loadPolicy;if(i)for(const l in i)e.setRequestHeader(l,i[l]);r.rangeEnd&&e.setRequestHeader("Range","bytes="+r.rangeStart+"-"+(r.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=r.responseType,self.clearTimeout(this.requestTimeout),n.timeout=a&&vt(a)?a:o,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:r,stats:n}=this;if(!e||!r)return;const i=r.readyState,a=this.config;if(!n.aborted&&i>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),a.timeout!==a.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),a.timeout=a.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),r.onreadystatechange=null,r.onprogress=null;const o=r.status,l=r.responseType!=="text";if(o>=200&&o<300&&(l&&r.response||r.responseText!==null)){n.loading.end=Math.max(self.performance.now(),n.loading.first);const s=l?r.response:r.responseText,c=r.responseType==="arraybuffer"?s.byteLength:s.length;if(n.loaded=n.total=c,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first),!this.callbacks)return;const u=this.callbacks.onProgress;if(u&&u(n,e,s,r),!this.callbacks)return;const f={url:r.responseURL,data:s,code:o};this.callbacks.onSuccess(f,n,e,r)}else{const s=a.loadPolicy.errorRetry,c=n.retry;yd(s,c,!1,o)?this.retry(s):(Me.error(`${o} while loading ${e.url}`),this.callbacks.onError({code:o,text:r.statusText},e,r,n))}}}loadtimeout(){var e;const r=(e=this.config)==null?void 0:e.loadPolicy.timeoutRetry,n=this.stats.retry;if(yd(r,n,!0))this.retry(r);else{Me.warn(`timeout while loading ${this.context.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:r,stats:n}=this;this.retryDelay=q0(e,n.retry),n.retry++,Me.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${r.url}, retrying ${n.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 r=this.stats;r.loaded=e.loaded,e.lengthComputable&&(r.total=e.total)}getCacheAge(){let e=null;if(this.loader&&cae.test(this.loader.getAllResponseHeaders())){const r=this.loader.getResponseHeader("age");e=r?parseFloat(r):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function uae(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const fae=/(\d+)-(\d+)\/(\d+)/;class JT{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||vae,this.controller=new self.AbortController,this.stats=new sh}destroy(){this.loader=this.callbacks=null,this.abortInternal()}abortInternal(){const e=this.response;e!=null&&e.ok||(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,r,n){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const a=dae(e,this.controller.signal),o=n.onProgress,l=e.responseType==="arraybuffer",s=l?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:u}=r.loadPolicy;this.context=e,this.config=r,this.callbacks=n,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),r.timeout=c&&vt(c)?c:u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(i,e,this.response)},r.timeout),self.fetch(this.request).then(f=>{this.response=this.loader=f;const d=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),r.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(i,e,this.response)},u-(d-i.loading.start)),!f.ok){const{status:h,statusText:p}=f;throw new mae(p||"fetch, bad network response",h,f)}return i.loading.first=d,i.total=pae(f.headers)||i.total,o&&vt(r.highWaterMark)?this.loadProgressively(f,i,e,r.highWaterMark,o):l?f.arrayBuffer():e.responseType==="json"?f.json():f.text()}).then(f=>{const{response:d}=this;self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const h=f[s];h&&(i.loaded=i.total=h);const p={url:d.url,data:f,code:d.status};o&&!vt(r.highWaterMark)&&o(i,e,f,d),n.onSuccess(p,i,e,d)}).catch(f=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const d=f&&f.code||0,h=f?f.message:null;n.onError({code:d,text:h},e,f?f.details:null,i)})}getCacheAge(){let e=null;if(this.response){const r=this.response.headers.get("age");e=r?parseFloat(r):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,r,n,i=0,a){const o=new vL,l=e.body.getReader(),s=()=>l.read().then(c=>{if(c.done)return o.dataLength&&a(r,n,o.flush(),e),Promise.resolve(new ArrayBuffer(0));const u=c.value,f=u.length;return r.loaded+=f,f<i||o.dataLength?(o.push(u),o.dataLength>=i&&a(r,n,o.flush(),e)):a(r,n,u,e),s()}).catch(()=>Promise.reject());return s()}}function dae(t,e){const r={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(zr({},t.headers))};return t.rangeEnd&&r.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),r}function hae(t){const e=fae.exec(t);if(e)return parseInt(e[2])-parseInt(e[1])+1}function pae(t){const e=t.get("Content-Range");if(e){const n=hae(e);if(vt(n))return n}const r=t.get("Content-Length");if(r)return parseInt(r)}function vae(t,e){return new self.Request(t.url,e)}class mae extends Error{constructor(e,r,n){super(e),this.code=void 0,this.details=void 0,this.code=r,this.details=n}}const gae=/\s/,yae={newCue(t,e,r,n){const i=[];let a,o,l,s,c;const u=self.VTTCue||self.TextTrackCue;for(let d=0;d<n.rows.length;d++)if(a=n.rows[d],l=!0,s=0,c="",!a.isEmpty()){var f;for(let v=0;v<a.chars.length;v++)gae.test(a.chars[v].uchar)&&l?s++:(c+=a.chars[v].uchar,l=!1);a.cueStartTime=e,e===r&&(r+=1e-4),s>=16?s--:s++;const h=AL(c.trim()),p=oy(e,r,h);t!=null&&(f=t.cues)!=null&&f.getCueById(p)||(o=new u(e,r,h),o.id=p,o.line=d+1,o.align="left",o.position=10+Math.min(80,Math.floor(s*8/32)*10),i.push(o))}return t&&i.length&&(i.sort((d,h)=>d.line==="auto"||h.line==="auto"?0:d.line>8&&h.line>8?h.line-d.line:d.line-h.line),i.forEach(d=>KR(t,d))),i}},bae={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},xae=kn(kn({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,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,loader:CL,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Sie,bufferController:kie,capLevelController:sy,errorController:mne,fpsController:iae,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:MR,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:bae},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}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},Aae()),{},{subtitleStreamController:Rie,subtitleTrackController:Die,timelineController:tae,audioStreamController:Cie,audioTrackController:Iie,emeController:hl,cmcdController:fo,contentSteeringController:lae});function Aae(){return{cueHandler:yae,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 Eae(t,e){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=xm(t),n=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(a=>{const o=`${a==="level"?"playlist":a}LoadPolicy`,l=e[o]===void 0,s=[];i.forEach(c=>{const u=`${a}Loading${c}`,f=e[u];if(f!==void 0&&l){s.push(u);const d=r[o].default;switch(e[o]={default:d},c){case"TimeOut":d.maxLoadTimeMs=f,d.maxTimeToFirstByteMs=f;break;case"MaxRetry":d.errorRetry.maxNumRetry=f,d.timeoutRetry.maxNumRetry=f;break;case"RetryDelay":d.errorRetry.retryDelayMs=f,d.timeoutRetry.retryDelayMs=f;break;case"MaxRetryTimeout":d.errorRetry.maxRetryDelayMs=f,d.timeoutRetry.maxRetryDelayMs=f;break}}}),s.length&&Me.warn(`hls.js config: "${s.join('", "')}" setting(s) are deprecated, use "${o}": ${JSON.stringify(e[o])}`)}),kn(kn({},r),e)}function xm(t){return t&&typeof t=="object"?Array.isArray(t)?t.map(xm):Object.keys(t).reduce((e,r)=>(e[r]=xm(t[r]),e),{}):t}function Tae(t){const e=t.loader;e!==JT&&e!==CL?(Me.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):uae()&&(t.loader=JT,t.progressive=!0,t.enableSoftwareAES=!0,Me.log("[config]: Progressive streaming enabled, using FetchLoader"))}class il{static get version(){return"1.4.14"}static isSupported(){return Fne()}static get Events(){return z}static get ErrorTypes(){return Tt}static get ErrorDetails(){return ze}static get DefaultConfig(){return il.defaultConfig?il.defaultConfig:xae}static set DefaultConfig(e){il.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new iy,this._autoLevelCapping=void 0,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.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,sre(e.debug||!1,"Hls instance");const r=this.config=Eae(il.DefaultConfig,e);this.userConfig=e,this._autoLevelCapping=-1,r.progressive&&Tae(r);const{abrController:n,bufferController:i,capLevelController:a,errorController:o,fpsController:l}=r,s=new o(this),c=this.abrController=new n(this),u=this.bufferController=new i(this),f=this.capLevelController=new a(this),d=new l(this),h=new Zre(this),p=new rne(this),v=r.contentSteeringController,g=v?new v(this):null,m=this.levelController=new yne(this,g),b=new bne(this),x=new Ane(this.config),T=this.streamController=new Eie(this,b,x);f.setStreamController(T),d.setStreamController(T);const A=[h,m,T];g&&A.splice(1,0,g),this.networkControllers=A;const O=[c,u,f,d,p,b];this.audioTrackController=this.createController(r.audioTrackController,A);const I=r.audioStreamController;I&&A.push(new I(this,b,x)),this.subtitleTrackController=this.createController(r.subtitleTrackController,A);const _=r.subtitleStreamController;_&&A.push(new _(this,b,x)),this.createController(r.timelineController,O),x.emeController=this.emeController=this.createController(r.emeController,O),this.cmcdController=this.createController(r.cmcdController,O),this.latencyController=this.createController(nne,O),this.coreComponents=O,A.push(s);const k=s.onErrorOut;typeof k=="function"&&this.on(z.ERROR,k,s)}createController(e,r){if(e){const n=new e(this);return r&&r.push(n),n}return null}on(e,r,n=this){this._emitter.on(e,r,n)}once(e,r,n=this){this._emitter.once(e,r,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,r,n=this,i){this._emitter.off(e,r,n,i)}listeners(e){return this._emitter.listeners(e)}emit(e,r,n){return this._emitter.emit(e,r,n)}trigger(e,r){if(this.config.debug)return this.emit(e,e,r);try{return this.emit(e,e,r)}catch(n){Me.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),this.trigger(z.ERROR,{type:Tt.OTHER_ERROR,details:ze.INTERNAL_EXCEPTION,fatal:!1,event:e,error:n})}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){Me.log("destroy"),this.trigger(z.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(r=>r.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(r=>r.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){Me.log("attachMedia"),this._media=e,this.trigger(z.MEDIA_ATTACHING,{media:e})}detachMedia(){Me.log("detachMedia"),this.trigger(z.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const r=this.media,n=this.url,i=this.url=z0.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});Me.log(`loadSource:${i}`),r&&n&&(n!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(r)),this.trigger(z.MANIFEST_LOADING,{url:e})}startLoad(e=-1){Me.log(`startLoad(${e})`),this.networkControllers.forEach(r=>{r.startLoad(e)})}stopLoad(){Me.log("stopLoad"),this.networkControllers.forEach(e=>{e.stopLoad()})}swapAudioCodec(){Me.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){Me.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e,r=0){this.levelController.removeLevel(e,r)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){Me.log(`set currentLevel:${e}`),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){Me.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){Me.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){Me.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){return this.levelController.startLevel}set startLevel(e){Me.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 r=!!e;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(Me.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e)}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){vm.indexOf(e)>-1&&(this._maxHdcpLevel=e)}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:r}}=this;if(!e)return 0;const n=e.length;for(let i=0;i<n;i++)if(e[i].maxBitrate>=r)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:r,maxHdcpLevel:n}=this;let i;if(r===-1&&e&&e.length?i=e.length-1:i=r,n)for(let a=i;a--;){const o=e[a].attrs["HDCP-LEVEL"];if(o&&o<=n)return a}return i}get nextAutoLevel(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)}set nextAutoLevel(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}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 r=this.audioTrackController;r&&(r.audioTrack=e)}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 r=this.subtitleTrackController;r&&(r.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const r=this.subtitleTrackController;r&&(r.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}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}il.defaultConfig=void 0;function IL(t,e){return function(){return t.apply(e,arguments)}}const{toString:Sae}=Object.prototype,{getPrototypeOf:ly}=Object,uh=(t=>e=>{const r=Sae.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),da=t=>(t=t.toLowerCase(),e=>uh(e)===t),fh=t=>e=>typeof e===t,{isArray:$l}=Array,yu=fh("undefined");function wae(t){return t!==null&&!yu(t)&&t.constructor!==null&&!yu(t.constructor)&&Ti(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const _L=da("ArrayBuffer");function Cae(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_L(t.buffer),e}const Iae=fh("string"),Ti=fh("function"),RL=fh("number"),dh=t=>t!==null&&typeof t=="object",_ae=t=>t===!0||t===!1,kf=t=>{if(uh(t)!=="object")return!1;const e=ly(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Rae=da("Date"),Lae=da("File"),Dae=da("Blob"),Oae=da("FileList"),kae=t=>dh(t)&&Ti(t.pipe),Mae=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ti(t.append)&&((e=uh(t))==="formdata"||e==="object"&&Ti(t.toString)&&t.toString()==="[object FormData]"))},Fae=da("URLSearchParams"),Pae=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $u(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),$l(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const a=r?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length;let l;for(n=0;n<o;n++)l=a[n],e.call(null,t[l],l,t)}}function LL(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const DL=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),OL=t=>!yu(t)&&t!==DL;function Am(){const{caseless:t}=OL(this)&&this||{},e={},r=(n,i)=>{const a=t&&LL(e,i)||i;kf(e[a])&&kf(n)?e[a]=Am(e[a],n):kf(n)?e[a]=Am({},n):$l(n)?e[a]=n.slice():e[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&$u(arguments[n],r);return e}const Nae=(t,e,r,{allOwnKeys:n}={})=>($u(e,(i,a)=>{r&&Ti(i)?t[a]=IL(i,r):t[a]=i},{allOwnKeys:n}),t),$ae=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Bae=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Uae=(t,e,r,n)=>{let i,a,o;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),a=i.length;a-- >0;)o=i[a],(!n||n(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=r!==!1&&ly(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Hae=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Vae=t=>{if(!t)return null;if($l(t))return t;let e=t.length;if(!RL(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},jae=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ly(Uint8Array)),Wae=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const a=i.value;e.call(t,a[0],a[1])}},Gae=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},zae=da("HTMLFormElement"),Kae=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),QT=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Yae=da("RegExp"),kL=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};$u(r,(i,a)=>{e(i,a,t)!==!1&&(n[a]=i)}),Object.defineProperties(t,n)},qae=t=>{kL(t,(e,r)=>{if(Ti(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Ti(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Xae=(t,e)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return $l(t)?n(t):n(String(t).split(e)),r},Zae=()=>{},Jae=(t,e)=>(t=+t,Number.isFinite(t)?t:e),nv="abcdefghijklmnopqrstuvwxyz",e1="0123456789",ML={DIGIT:e1,ALPHA:nv,ALPHA_DIGIT:nv+nv.toUpperCase()+e1},Qae=(t=16,e=ML.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function eoe(t){return!!(t&&Ti(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const toe=t=>{const e=new Array(10),r=(n,i)=>{if(dh(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const a=$l(n)?[]:{};return $u(n,(o,l)=>{const s=r(o,i+1);!yu(s)&&(a[l]=s)}),e[i]=void 0,a}}return n};return r(t,0)},roe=da("AsyncFunction"),noe=t=>t&&(dh(t)||Ti(t))&&Ti(t.then)&&Ti(t.catch),qe={isArray:$l,isArrayBuffer:_L,isBuffer:wae,isFormData:Mae,isArrayBufferView:Cae,isString:Iae,isNumber:RL,isBoolean:_ae,isObject:dh,isPlainObject:kf,isUndefined:yu,isDate:Rae,isFile:Lae,isBlob:Dae,isRegExp:Yae,isFunction:Ti,isStream:kae,isURLSearchParams:Fae,isTypedArray:jae,isFileList:Oae,forEach:$u,merge:Am,extend:Nae,trim:Pae,stripBOM:$ae,inherits:Bae,toFlatObject:Uae,kindOf:uh,kindOfTest:da,endsWith:Hae,toArray:Vae,forEachEntry:Wae,matchAll:Gae,isHTMLForm:zae,hasOwnProperty:QT,hasOwnProp:QT,reduceDescriptors:kL,freezeMethods:qae,toObjectSet:Xae,toCamelCase:Kae,noop:Zae,toFiniteNumber:Jae,findKey:LL,global:DL,isContextDefined:OL,ALPHABET:ML,generateString:Qae,isSpecCompliantForm:eoe,toJSONObject:toe,isAsyncFn:roe,isThenable:noe};function qt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}qe.inherits(qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:qe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const FL=qt.prototype,PL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{PL[t]={value:t}});Object.defineProperties(qt,PL);Object.defineProperty(FL,"isAxiosError",{value:!0});qt.from=(t,e,r,n,i,a)=>{const o=Object.create(FL);return qe.toFlatObject(t,o,function(s){return s!==Error.prototype},l=>l!=="isAxiosError"),qt.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};const ioe=null;function Em(t){return qe.isPlainObject(t)||qe.isArray(t)}function NL(t){return qe.endsWith(t,"[]")?t.slice(0,-2):t}function t1(t,e,r){return t?t.concat(e).map(function(i,a){return i=NL(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function aoe(t){return qe.isArray(t)&&!t.some(Em)}const ooe=qe.toFlatObject(qe,{},null,function(e){return/^is[A-Z]/.test(e)});function hh(t,e,r){if(!qe.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=qe.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!qe.isUndefined(g[v])});const n=r.metaTokens,i=r.visitor||u,a=r.dots,o=r.indexes,s=(r.Blob||typeof Blob<"u"&&Blob)&&qe.isSpecCompliantForm(e);if(!qe.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(qe.isDate(p))return p.toISOString();if(!s&&qe.isBlob(p))throw new qt("Blob is not supported. Use a Buffer instead.");return qe.isArrayBuffer(p)||qe.isTypedArray(p)?s&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,v,g){let m=p;if(p&&!g&&typeof p=="object"){if(qe.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(qe.isArray(p)&&aoe(p)||(qe.isFileList(p)||qe.endsWith(v,"[]"))&&(m=qe.toArray(p)))return v=NL(v),m.forEach(function(x,T){!(qe.isUndefined(x)||x===null)&&e.append(o===!0?t1([v],T,a):o===null?v:v+"[]",c(x))}),!1}return Em(p)?!0:(e.append(t1(g,v,a),c(p)),!1)}const f=[],d=Object.assign(ooe,{defaultVisitor:u,convertValue:c,isVisitable:Em});function h(p,v){if(!qe.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(p),qe.forEach(p,function(m,b){(!(qe.isUndefined(m)||m===null)&&i.call(e,m,qe.isString(b)?b.trim():b,v,d))===!0&&h(m,v?v.concat(b):[b])}),f.pop()}}if(!qe.isObject(t))throw new TypeError("data must be an object");return h(t),e}function r1(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function cy(t,e){this._pairs=[],t&&hh(t,this,e)}const $L=cy.prototype;$L.append=function(e,r){this._pairs.push([e,r])};$L.toString=function(e){const r=e?function(n){return e.call(this,n,r1)}:r1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function soe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function BL(t,e,r){if(!e)return t;const n=r&&r.encode||soe,i=r&&r.serialize;let a;if(i?a=i(e,r):a=qe.isURLSearchParams(e)?e.toString():new cy(e,r).toString(n),a){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class loe{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){qe.forEach(this.handlers,function(n){n!==null&&e(n)})}}const n1=loe,UL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},coe=typeof URLSearchParams<"u"?URLSearchParams:cy,uoe=typeof FormData<"u"?FormData:null,foe=typeof Blob<"u"?Blob:null,doe=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),hoe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ia={isBrowser:!0,classes:{URLSearchParams:coe,FormData:uoe,Blob:foe},isStandardBrowserEnv:doe,isStandardBrowserWebWorkerEnv:hoe,protocols:["http","https","file","blob","url","data"]};function poe(t,e){return hh(t,new ia.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return ia.isNode&&qe.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function voe(t){return qe.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function moe(t){const e={},r=Object.keys(t);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],e[a]=t[a];return e}function HL(t){function e(r,n,i,a){let o=r[a++];const l=Number.isFinite(+o),s=a>=r.length;return o=!o&&qe.isArray(i)?i.length:o,s?(qe.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!qe.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],a)&&qe.isArray(i[o])&&(i[o]=moe(i[o])),!l)}if(qe.isFormData(t)&&qe.isFunction(t.entries)){const r={};return qe.forEachEntry(t,(n,i)=>{e(voe(n),i,r,0)}),r}return null}const goe={"Content-Type":void 0};function yoe(t,e,r){if(qe.isString(t))try{return(e||JSON.parse)(t),qe.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ph={transitional:UL,adapter:["xhr","http"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=qe.isObject(e);if(a&&qe.isHTMLForm(e)&&(e=new FormData(e)),qe.isFormData(e))return i&&i?JSON.stringify(HL(e)):e;if(qe.isArrayBuffer(e)||qe.isBuffer(e)||qe.isStream(e)||qe.isFile(e)||qe.isBlob(e))return e;if(qe.isArrayBufferView(e))return e.buffer;if(qe.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return poe(e,this.formSerializer).toString();if((l=qe.isFileList(e))||n.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return hh(l?{"files[]":e}:e,s&&new s,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),yoe(e)):e}],transformResponse:[function(e){const r=this.transitional||ph.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&qe.isString(e)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?qt.from(l,qt.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ia.classes.FormData,Blob:ia.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};qe.forEach(["delete","get","head"],function(e){ph.headers[e]={}});qe.forEach(["post","put","patch"],function(e){ph.headers[e]=qe.merge(goe)});const uy=ph,boe=qe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xoe=t=>{const e={};let r,n,i;return t&&t.split(`
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&boe[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},i1=Symbol("internals");function hc(t){return t&&String(t).trim().toLowerCase()}function Mf(t){return t===!1||t==null?t:qe.isArray(t)?t.map(Mf):String(t)}function Aoe(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Eoe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function iv(t,e,r,n,i){if(qe.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!qe.isString(e)){if(qe.isString(n))return e.indexOf(n)!==-1;if(qe.isRegExp(n))return n.test(e)}}function Toe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Soe(t,e){const r=qe.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,a,o){return this[n].call(this,e,i,a,o)},configurable:!0})})}class vh{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function a(l,s,c){const u=hc(s);if(!u)throw new Error("header name must be a non-empty string");const f=qe.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||s]=Mf(l))}const o=(l,s)=>qe.forEach(l,(c,u)=>a(c,u,s));return qe.isPlainObject(e)||e instanceof this.constructor?o(e,r):qe.isString(e)&&(e=e.trim())&&!Eoe(e)?o(xoe(e),r):e!=null&&a(r,e,n),this}get(e,r){if(e=hc(e),e){const n=qe.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return Aoe(i);if(qe.isFunction(r))return r.call(this,i,n);if(qe.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=hc(e),e){const n=qe.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||iv(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function a(o){if(o=hc(o),o){const l=qe.findKey(n,o);l&&(!r||iv(n,n[l],l,r))&&(delete n[l],i=!0)}}return qe.isArray(e)?e.forEach(a):a(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!e||iv(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){const r=this,n={};return qe.forEach(this,(i,a)=>{const o=qe.findKey(n,a);if(o){r[o]=Mf(i),delete r[a];return}const l=e?Toe(a):String(a).trim();l!==a&&delete r[a],r[l]=Mf(i),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return qe.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&qe.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[i1]=this[i1]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=hc(o);n[l]||(Soe(i,o),n[l]=!0)}return qe.isArray(e)?e.forEach(a):a(e),this}}vh.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);qe.freezeMethods(vh.prototype);qe.freezeMethods(vh);const Ra=vh;function av(t,e){const r=this||uy,n=e||r,i=Ra.from(n.headers);let a=n.data;return qe.forEach(t,function(l){a=l.call(r,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function VL(t){return!!(t&&t.__CANCEL__)}function Bu(t,e,r){qt.call(this,t??"canceled",qt.ERR_CANCELED,e,r),this.name="CanceledError"}qe.inherits(Bu,qt,{__CANCEL__:!0});function woe(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new qt("Request failed with status code "+r.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const Coe=ia.isStandardBrowserEnv?function(){return{write:function(r,n,i,a,o,l){const s=[];s.push(r+"="+encodeURIComponent(n)),qe.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),qe.isString(a)&&s.push("path="+a),qe.isString(o)&&s.push("domain="+o),l===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ioe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function _oe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function jL(t,e){return t&&!Ioe(e)?_oe(t,e):e}const Roe=ia.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(a){let o=a;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){const l=qe.isString(o)?i(o):o;return l.protocol===n.protocol&&l.host===n.host}}():function(){return function(){return!0}}();function Loe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Doe(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,a=0,o;return e=e!==void 0?e:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),c-o<e)return;const h=u&&c-u;return h?Math.round(d*1e3/h):void 0}}function a1(t,e){let r=0;const n=Doe(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-r,s=n(l),c=a<=o;r=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:s||void 0,estimated:s&&o&&c?(o-a)/s:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}const Ooe=typeof XMLHttpRequest<"u",koe=Ooe&&function(t){return new Promise(function(r,n){let i=t.data;const a=Ra.from(t.headers).normalize(),o=t.responseType;let l;function s(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}qe.isFormData(i)&&(ia.isStandardBrowserEnv||ia.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const h=t.auth.username||"",p=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.set("Authorization","Basic "+btoa(h+":"+p))}const u=jL(t.baseURL,t.url);c.open(t.method.toUpperCase(),BL(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function f(){if(!c)return;const h=Ra.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:t,request:c};woe(function(m){r(m),s()},function(m){n(m),s()},v),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(n(new qt("Request aborted",qt.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new qt("Network Error",qt.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let p=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const v=t.transitional||UL;t.timeoutErrorMessage&&(p=t.timeoutErrorMessage),n(new qt(p,v.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,t,c)),c=null},ia.isStandardBrowserEnv){const h=(t.withCredentials||Roe(u))&&t.xsrfCookieName&&Coe.read(t.xsrfCookieName);h&&a.set(t.xsrfHeaderName,h)}i===void 0&&a.setContentType(null),"setRequestHeader"in c&&qe.forEach(a.toJSON(),function(p,v){c.setRequestHeader(v,p)}),qe.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),o&&o!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",a1(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",a1(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=h=>{c&&(n(!h||h.type?new Bu(null,t,c):h),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const d=Loe(u);if(d&&ia.protocols.indexOf(d)===-1){n(new qt("Unsupported protocol "+d+":",qt.ERR_BAD_REQUEST,t));return}c.send(i||null)})},Ff={http:ioe,xhr:koe};qe.forEach(Ff,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Moe={getAdapter:t=>{t=qe.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let i=0;i<e&&(r=t[i],!(n=qe.isString(r)?Ff[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new qt(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(qe.hasOwnProp(Ff,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!qe.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Ff};function ov(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bu(null,t)}function o1(t){return ov(t),t.headers=Ra.from(t.headers),t.data=av.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Moe.getAdapter(t.adapter||uy.adapter)(t).then(function(n){return ov(t),n.data=av.call(t,t.transformResponse,n),n.headers=Ra.from(n.headers),n},function(n){return VL(n)||(ov(t),n&&n.response&&(n.response.data=av.call(t,t.transformResponse,n.response),n.response.headers=Ra.from(n.response.headers))),Promise.reject(n)})}const s1=t=>t instanceof Ra?t.toJSON():t;function Sl(t,e){e=e||{};const r={};function n(c,u,f){return qe.isPlainObject(c)&&qe.isPlainObject(u)?qe.merge.call({caseless:f},c,u):qe.isPlainObject(u)?qe.merge({},u):qe.isArray(u)?u.slice():u}function i(c,u,f){if(qe.isUndefined(u)){if(!qe.isUndefined(c))return n(void 0,c,f)}else return n(c,u,f)}function a(c,u){if(!qe.isUndefined(u))return n(void 0,u)}function o(c,u){if(qe.isUndefined(u)){if(!qe.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,f){if(f in e)return n(c,u);if(f in t)return n(void 0,c)}const s={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,u)=>i(s1(c),s1(u),!0)};return qe.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=s[u]||i,d=f(t[u],e[u],u);qe.isUndefined(d)&&f!==l||(r[u]=d)}),r}const WL="1.4.0",fy={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{fy[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const l1={};fy.transitional=function(e,r,n){function i(a,o){return"[Axios v"+WL+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,l)=>{if(e===!1)throw new qt(i(o," has been removed"+(r?" in "+r:"")),qt.ERR_DEPRECATED);return r&&!l1[o]&&(l1[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,l):!0}};function Foe(t,e,r){if(typeof t!="object")throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const a=n[i],o=e[a];if(o){const l=t[a],s=l===void 0||o(l,a,t);if(s!==!0)throw new qt("option "+a+" must be "+s,qt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new qt("Unknown option "+a,qt.ERR_BAD_OPTION)}}const Tm={assertOptions:Foe,validators:fy},io=Tm.validators;class Ad{constructor(e){this.defaults=e,this.interceptors={request:new n1,response:new n1}}request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Sl(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Tm.assertOptions(n,{silentJSONParsing:io.transitional(io.boolean),forcedJSONParsing:io.transitional(io.boolean),clarifyTimeoutError:io.transitional(io.boolean)},!1),i!=null&&(qe.isFunction(i)?r.paramsSerializer={serialize:i}:Tm.assertOptions(i,{encode:io.function,serialize:io.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=a&&qe.merge(a.common,a[r.method]),o&&qe.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),r.headers=Ra.concat(o,a);const l=[];let s=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(s=s&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,d;if(!s){const p=[o1.bind(this),void 0];for(p.unshift.apply(p,l),p.push.apply(p,c),d=p.length,u=Promise.resolve(r);f<d;)u=u.then(p[f++],p[f++]);return u}d=l.length;let h=r;for(f=0;f<d;){const p=l[f++],v=l[f++];try{h=p(h)}catch(g){v.call(this,g);break}}try{u=o1.call(this,h)}catch(p){return Promise.reject(p)}for(f=0,d=c.length;f<d;)u=u.then(c[f++],c[f++]);return u}getUri(e){e=Sl(this.defaults,e);const r=jL(e.baseURL,e.url);return BL(r,e.params,e.paramsSerializer)}}qe.forEach(["delete","get","head","options"],function(e){Ad.prototype[e]=function(r,n){return this.request(Sl(n||{},{method:e,url:r,data:(n||{}).data}))}});qe.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,l){return this.request(Sl(l||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Ad.prototype[e]=r(),Ad.prototype[e+"Form"]=r(!0)});const Pf=Ad;class dy{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{n.subscribe(l),a=l}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},e(function(a,o,l){n.reason||(n.reason=new Bu(a,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new dy(function(i){e=i}),cancel:e}}}const Poe=dy;function Noe(t){return function(r){return t.apply(null,r)}}function $oe(t){return qe.isObject(t)&&t.isAxiosError===!0}const Sm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sm).forEach(([t,e])=>{Sm[e]=t});const Boe=Sm;function GL(t){const e=new Pf(t),r=IL(Pf.prototype.request,e);return qe.extend(r,Pf.prototype,e,{allOwnKeys:!0}),qe.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return GL(Sl(t,i))},r}const Kr=GL(uy);Kr.Axios=Pf;Kr.CanceledError=Bu;Kr.CancelToken=Poe;Kr.isCancel=VL;Kr.VERSION=WL;Kr.toFormData=hh;Kr.AxiosError=qt;Kr.Cancel=Kr.CanceledError;Kr.all=function(e){return Promise.all(e)};Kr.spread=Noe;Kr.isAxiosError=$oe;Kr.mergeConfig=Sl;Kr.AxiosHeaders=Ra;Kr.formToJSON=t=>HL(qe.isHTMLForm(t)?new FormData(t):t);Kr.HttpStatusCode=Boe;Kr.default=Kr;const Uoe=Kr;function Hoe(t){t.interceptors.request.use(e=>e,e=>Promise.reject(e)),t.interceptors.response.use(e=>{const r={409:"name duplication",1e3:"not logged in or login is invalid",1001:"unknown account",1002:"not authorized",1003:"data error",1004:"session exception requires a new login",1005:"displayable exceptions",1006:"json processing exception",1007:"user storage space is insufficient"},{code:n=200,msg:i=""}=e.data||{};return n===200||XZ({type:"error",grouping:!0,message:(r==null?void 0:r[n])||i}),e},e=>Promise.reject(e))}function Voe(t={}){const e="https://api.rhplayer.com",r=Uoe.create({timeout:t.timeout||1e5,baseURL:t.baseURL||e});return Hoe(r),r}const Zce=Voe();function wm(t,e={},r){for(const n in t){const i=t[n],a=r?`${r}:${n}`:n;typeof i=="object"&&i!==null?wm(i,e,a):typeof i=="function"&&(e[a]=i)}return e}const joe={run:t=>t()},Woe=()=>joe,zL=typeof console.createTask<"u"?console.createTask:Woe;function Goe(t,e){const r=e.shift(),n=zL(r);return t.reduce((i,a)=>i.then(()=>n.run(()=>a(...e))),Promise.resolve())}function zoe(t,e){const r=e.shift(),n=zL(r);return Promise.all(t.map(i=>n.run(()=>i(...e))))}function sv(t,e){for(const r of[...t])r(e)}class Koe{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,r,n={}){if(!e||typeof r!="function")return()=>{};const i=e;let a;for(;this._deprecatedHooks[e];)a=this._deprecatedHooks[e],e=a.to;if(a&&!n.allowDeprecated){let o=a.message;o||(o=`${i} hook has been deprecated`+(a.to?`, please use ${a.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(o)||(console.warn(o),this._deprecatedMessages.add(o))}if(!r.name)try{Object.defineProperty(r,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(r),()=>{r&&(this.removeHook(e,r),r=void 0)}}hookOnce(e,r){let n,i=(...a)=>(typeof n=="function"&&n(),n=void 0,i=void 0,r(...a));return n=this.hook(e,i),n}removeHook(e,r){if(this._hooks[e]){const n=this._hooks[e].indexOf(r);n!==-1&&this._hooks[e].splice(n,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,r){this._deprecatedHooks[e]=typeof r=="string"?{to:r}:r;const n=this._hooks[e]||[];delete this._hooks[e];for(const i of n)this.hook(e,i)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const r in e)this.deprecateHook(r,e[r])}addHooks(e){const r=wm(e),n=Object.keys(r).map(i=>this.hook(i,r[i]));return()=>{for(const i of n.splice(0,n.length))i()}}removeHooks(e){const r=wm(e);for(const n in r)this.removeHook(n,r[n])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...r){return r.unshift(e),this.callHookWith(Goe,e,...r)}callHookParallel(e,...r){return r.unshift(e),this.callHookWith(zoe,e,...r)}callHookWith(e,r,...n){const i=this._before||this._after?{name:r,args:n,context:{}}:void 0;this._before&&sv(this._before,i);const a=e(r in this._hooks?[...this._hooks[r]]:[],n);return a instanceof Promise?a.finally(()=>{this._after&&i&&sv(this._after,i)}):(this._after&&i&&sv(this._after,i),a)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const r=this._before.indexOf(e);r!==-1&&this._before.splice(r,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const r=this._after.indexOf(e);r!==-1&&this._after.splice(r,1)}}}}function Yoe(){return new Koe}function qoe(t){return Array.isArray(t)?t:[t]}const Xoe=["title","titleTemplate","script","style","noscript"],Nf=["base","meta","link","style","script","noscript"],Zoe=["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"],Joe=["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"],KL=["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"],Qoe=typeof window<"u";function hy(t){let e=9;for(let r=0;r<t.length;)e=Math.imul(e^t.charCodeAt(r++),9**9);return((e^e>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function c1(t){return t._h||hy(t._d?t._d:`${t.tag}:${t.textContent||t.innerHTML||""}:${Object.entries(t.props).map(([e,r])=>`${e}:${String(r)}`).join(",")}`)}function YL(t,e){const{props:r,tag:n}=t;if(Joe.includes(n))return n;if(n==="link"&&r.rel==="canonical")return"canonical";if(r.charset)return"charset";const i=["id"];n==="meta"&&i.push("name","property","http-equiv");for(const a of i)if(typeof r[a]<"u"){const o=String(r[a]);return e&&!e(o)?!1:`${n}:${a}:${o}`}return!1}function u1(t,e){return t==null?e||null:typeof t=="function"?t(e):t}async function ese(t,e,r){const n={tag:t,props:await qL(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[["script","noscript","style"].includes(t)?"innerHTML":"textContent"]:e},["templateParams","titleTemplate"].includes(t))};return KL.forEach(i=>{const a=typeof n.props[i]<"u"?n.props[i]:r[i];typeof a<"u"&&((!["innerHTML","textContent","children"].includes(i)||Xoe.includes(n.tag))&&(n[i==="children"?"innerHTML":i]=a),delete n.props[i])}),n.props.body&&(n.tagPosition="bodyClose",delete n.props.body),n.tag==="script"&&typeof n.innerHTML=="object"&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||"application/json"),Array.isArray(n.props.content)?n.props.content.map(i=>({...n,props:{...n.props,content:i}})):n}function tse(t){return typeof t=="object"&&!Array.isArray(t)&&(t=Object.keys(t).filter(e=>t[e])),(Array.isArray(t)?t.join(" "):t).split(" ").filter(e=>e.trim()).filter(Boolean).join(" ")}async function qL(t,e){for(const r of Object.keys(t)){if(r==="class"){t[r]=tse(t[r]);continue}if(t[r]instanceof Promise&&(t[r]=await t[r]),!e&&!KL.includes(r)){const n=String(t[r]),i=r.startsWith("data-");n==="true"||n===""?t[r]=i?"true":!0:t[r]||(i&&n==="false"?t[r]="false":delete t[r])}}return t}const rse=10;async function nse(t){const e=[];return Object.entries(t.resolvedInput).filter(([r,n])=>typeof n<"u"&&Zoe.includes(r)).forEach(([r,n])=>{const i=qoe(n);e.push(...i.map(a=>ese(r,a,t)).flat())}),(await Promise.all(e)).flat().filter(Boolean).map((r,n)=>(r._e=t._i,t.mode&&(r._m=t.mode),r._p=(t._i<<rse)+n,r))}const f1={base:-10,title:10},d1={critical:-80,high:-10,low:20};function Ed(t){let e=100;const r=t.tagPriority;return typeof r=="number"?r:(t.tag==="meta"?(t.props["http-equiv"]==="content-security-policy"&&(e=-30),t.props.charset&&(e=-20),t.props.name==="viewport"&&(e=-15)):t.tag==="link"&&t.props.rel==="preconnect"?e=20:t.tag in f1&&(e=f1[t.tag]),typeof r=="string"&&r in d1?e+d1[r]:e)}const ise=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],XL=["onload","onerror","onabort","onprogress","onloadstart"],ao="%separator";function $f(t,e,r){if(typeof t!="string"||!t.includes("%"))return t;function n(o){let l;return["s","pageTitle"].includes(o)?l=e.pageTitle:o.includes(".")?l=o.split(".").reduce((s,c)=>s&&s[c]||void 0,e):l=e[o],typeof l<"u"?(l||"").replace(/"/g,'\\"'):!1}let i=t;try{i=decodeURI(t)}catch{}return(i.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(o=>{const l=n(o.slice(1));typeof l=="string"&&(t=t.replace(new RegExp(`\\${o}(\\W|$)`,"g"),(s,c)=>`${l}${c}`).trim())}),t.includes(ao)&&(t.endsWith(ao)&&(t=t.slice(0,-ao.length).trim()),t.startsWith(ao)&&(t=t.slice(ao.length).trim()),t=t.replace(new RegExp(`\\${ao}\\s*\\${ao}`,"g"),ao),t=$f(t,{separator:r},r)),t}async function ase(t){const e={tag:t.tagName.toLowerCase(),props:await qL(t.getAttributeNames().reduce((r,n)=>({...r,[n]:t.getAttribute(n)}),{})),innerHTML:t.innerHTML};return e._d=YL(e),e}async function ose(t,e={}){var u;const r=e.document||t.resolvedOptions.document;if(!r)return;const n={shouldRender:t.dirty,tags:[]};if(await t.hooks.callHook("dom:beforeRender",n),!n.shouldRender)return;const i=(await t.resolveTags()).map(f=>({tag:f,id:Nf.includes(f.tag)?c1(f):f.tag,shouldRender:!0}));let a=t._dom;if(!a){a={elMap:{htmlAttrs:r.documentElement,bodyAttrs:r.body}};for(const f of["body","head"]){const d=(u=r==null?void 0:r[f])==null?void 0:u.children;for(const h of[...d].filter(p=>Nf.includes(p.tagName.toLowerCase())))a.elMap[h.getAttribute("data-hid")||c1(await ase(h))]=h}}a.pendingSideEffects={...a.sideEffects||{}},a.sideEffects={};function o(f,d,h){const p=`${f}:${d}`;a.sideEffects[p]=h,delete a.pendingSideEffects[p]}function l({id:f,$el:d,tag:h}){const p=h.tag.endsWith("Attrs");a.elMap[f]=d,p||(["textContent","innerHTML"].forEach(v=>{h[v]&&h[v]!==d[v]&&(d[v]=h[v])}),o(f,"el",()=>{a.elMap[f].remove(),delete a.elMap[f]})),Object.entries(h.props).forEach(([v,g])=>{const m=`attr:${v}`;if(v==="class")for(const b of(g||"").split(" ").filter(Boolean))p&&o(f,`${m}:${b}`,()=>d.classList.remove(b)),!d.classList.contains(b)&&d.classList.add(b);else d.getAttribute(v)!==g&&d.setAttribute(v,g===!0?"":String(g)),p&&o(f,m,()=>d.removeAttribute(v))})}const s=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const f of i){const{tag:d,shouldRender:h,id:p}=f;if(h){if(d.tag==="title"){r.title=d.textContent;continue}f.$el=f.$el||a.elMap[p],f.$el?l(f):Nf.includes(d.tag)&&s.push(f)}}for(const f of s){const d=f.tag.tagPosition||"head";f.$el=r.createElement(f.tag.tag),l(f),c[d]=c[d]||r.createDocumentFragment(),c[d].appendChild(f.$el)}for(const f of i)await t.hooks.callHook("dom:renderTag",f,r,o);c.head&&r.head.appendChild(c.head),c.bodyOpen&&r.body.insertBefore(c.bodyOpen,r.body.firstChild),c.bodyClose&&r.body.appendChild(c.bodyClose),Object.values(a.pendingSideEffects).forEach(f=>f()),t._dom=a,t.dirty=!1,await t.hooks.callHook("dom:rendered",{renders:i})}async function sse(t,e={}){const r=e.delayFn||(n=>setTimeout(n,10));return t._domUpdatePromise=t._domUpdatePromise||new Promise(n=>r(async()=>{await ose(t,e),delete t._domUpdatePromise,n()}))}function lse(t){return e=>{var n,i;const r=((i=(n=e.resolvedOptions.document)==null?void 0:n.head.querySelector('script[id="unhead:payload"]'))==null?void 0:i.innerHTML)||!1;return r&&e.push(JSON.parse(r)),{mode:"client",hooks:{"entries:updated":function(a){sse(a,t)}}}}}const cse=["templateParams","htmlAttrs","bodyAttrs"],use={hooks:{"tag:normalise":function({tag:t}){["hid","vmid","key"].forEach(n=>{t.props[n]&&(t.key=t.props[n],delete t.props[n])});const r=YL(t)||(t.key?`${t.tag}:${t.key}`:!1);r&&(t._d=r)},"tags:resolve":function(t){const e={};t.tags.forEach(n=>{const i=(n.key?`${n.tag}:${n.key}`:n._d)||n._p,a=e[i];if(a){let l=n==null?void 0:n.tagDuplicateStrategy;if(!l&&cse.includes(n.tag)&&(l="merge"),l==="merge"){const s=a.props;["class","style"].forEach(c=>{n.props[c]&&s[c]&&(c==="style"&&!s[c].endsWith(";")&&(s[c]+=";"),n.props[c]=`${s[c]} ${n.props[c]}`)}),e[i].props={...s,...n.props};return}else if(n._e===a._e){a._duped=a._duped||[],n._d=`${a._d}:${a._duped.length+1}`,a._duped.push(n);return}else if(Ed(n)>Ed(a))return}const o=Object.keys(n.props).length+(n.innerHTML?1:0)+(n.textContent?1:0);if(Nf.includes(n.tag)&&o===0){delete e[i];return}e[i]=n});const r=[];Object.values(e).forEach(n=>{const i=n._duped;delete n._duped,r.push(n),i&&r.push(...i)}),t.tags=r,t.tags=t.tags.filter(n=>!(n.tag==="meta"&&(n.props.name||n.props.property)&&!n.props.content))}}},fse={mode:"server",hooks:{"tags:resolve":function(t){const e={};t.tags.filter(r=>["titleTemplate","templateParams","title"].includes(r.tag)&&r._m==="server").forEach(r=>{e[r.tag]=r.tag.startsWith("title")?r.textContent:r.props}),Object.keys(e).length&&t.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},dse=["script","link","bodyAttrs"];function hse(t){const e={},r={};return Object.entries(t.props).forEach(([n,i])=>{n.startsWith("on")&&typeof i=="function"?(XL.includes(n)&&(e[n]=`this.dataset.${n} = true`),r[n]=i):e[n]=i}),{props:e,eventHandlers:r}}const pse=t=>({hooks:{"tags:resolve":function(e){for(const r of e.tags)if(dse.includes(r.tag)){const{props:n,eventHandlers:i}=hse(r);r.props=n,Object.keys(i).length&&((r.props.src||r.props.href)&&(r.key=r.key||hy(r.props.src||r.props.href)),r._eventHandlers=i)}},"dom:renderTag":function(e,r,n){if(!e.tag._eventHandlers)return;const i=e.tag.tag==="bodyAttrs"?r.defaultView:e.$el;Object.entries(e.tag._eventHandlers).forEach(([a,o])=>{const l=`${e.tag._d||e.tag._p}:${a}`,s=a.slice(2).toLowerCase(),c=`data-h-${s}`;if(n(e.id,l,()=>{}),e.$el.hasAttribute(c))return;e.$el.setAttribute(c,"");let u;const f=d=>{o(d),u==null||u.disconnect()};a in e.$el.dataset?f(new Event(a.replace("on",""))):XL.includes(a)&&typeof MutationObserver<"u"?(u=new MutationObserver(d=>{d.some(p=>p.attributeName===`data-${a}`)&&(f(new Event(a.replace("on",""))),u==null||u.disconnect())}),u.observe(e.$el,{attributes:!0})):i.addEventListener(s,f),n(e.id,l,()=>{u==null||u.disconnect(),i.removeEventListener(s,f),e.$el.removeAttribute(c)})})}}}),vse=["link","style","script","noscript"],mse={hooks:{"tag:normalise":({tag:t})=>{t.key&&vse.includes(t.tag)&&(t.props["data-hid"]=t._h=hy(t.key))}}},gse={hooks:{"tags:resolve":t=>{const e=r=>{var n;return(n=t.tags.find(i=>i._d===r))==null?void 0:n._p};for(const{prefix:r,offset:n}of ise)for(const i of t.tags.filter(a=>typeof a.tagPriority=="string"&&a.tagPriority.startsWith(r))){const a=e(i.tagPriority.replace(r,""));typeof a<"u"&&(i._p=a+n)}t.tags.sort((r,n)=>r._p-n._p).sort((r,n)=>Ed(r)-Ed(n))}}},yse={meta:"content",link:"href",htmlAttrs:"lang"},bse=t=>({hooks:{"tags:resolve":e=>{var l;const{tags:r}=e,n=(l=r.find(s=>s.tag==="title"))==null?void 0:l.textContent,i=r.findIndex(s=>s.tag==="templateParams"),a=i!==-1?r[i].props:{},o=a.separator||"|";delete a.separator,a.pageTitle=$f(a.pageTitle||n||"",a,o);for(const s of r.filter(c=>c.processTemplateParams!==!1)){const c=yse[s.tag];c&&typeof s.props[c]=="string"?s.props[c]=$f(s.props[c],a,o):(s.processTemplateParams===!0||["titleTemplate","title"].includes(s.tag))&&["innerHTML","textContent"].forEach(u=>{typeof s[u]=="string"&&(s[u]=$f(s[u],a,o))})}t._templateParams=a,t._separator=o,e.tags=r.filter(s=>s.tag!=="templateParams")}}}),xse={hooks:{"tags:resolve":t=>{const{tags:e}=t;let r=e.findIndex(i=>i.tag==="titleTemplate");const n=e.findIndex(i=>i.tag==="title");if(n!==-1&&r!==-1){const i=u1(e[r].textContent,e[n].textContent);i!==null?e[n].textContent=i||e[n].textContent:delete e[n]}else if(r!==-1){const i=u1(e[r].textContent);i!==null&&(e[r].textContent=i,e[r].tag="title",r=-1)}r!==-1&&delete e[r],t.tags=e.filter(Boolean)}}},Ase={hooks:{"tags:afterResolve":function(t){for(const e of t.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&["application/ld+json","application/json"].includes(e.props.type)?e.innerHTML=e.innerHTML.replace(/</g,"\\u003C"):e.innerHTML=e.innerHTML.replace(new RegExp(`</${e.tag}`,"g"),`<\\/${e.tag}`))}}};function Ese(t={}){const e=Tse(t);return e.use(lse()),e}function h1(t,e){return!t||t==="server"&&e||t==="client"&&!e}function Tse(t={}){const e=Yoe();e.addHooks(t.hooks||{}),t.document=t.document||(Qoe?document:void 0);const r=!t.document,n=()=>{l.dirty=!0,e.callHook("entries:updated",l)};let i=0,a=[];const o=[],l={plugins:o,dirty:!1,resolvedOptions:t,hooks:e,headEntries(){return a},use(s){const c=typeof s=="function"?s(l):s;(!c.key||!o.some(u=>u.key===c.key))&&(o.push(c),h1(c.mode,r)&&e.addHooks(c.hooks||{}))},push(s,c){c==null||delete c.head;const u={_i:i++,input:s,...c};return h1(u.mode,r)&&(a.push(u),n()),{dispose(){a=a.filter(f=>f._i!==u._i),e.callHook("entries:updated",l),n()},patch(f){a=a.map(d=>(d._i===u._i&&(d.input=u.input=f),d)),n()}}},async resolveTags(){const s={tags:[],entries:[...a]};await e.callHook("entries:resolve",s);for(const c of s.entries){const u=c.resolvedInput||c.input;if(c.resolvedInput=await(c.transform?c.transform(u):u),c.resolvedInput)for(const f of await nse(c)){const d={tag:f,entry:c,resolvedOptions:l.resolvedOptions};await e.callHook("tag:normalise",d),s.tags.push(d.tag)}}return await e.callHook("tags:beforeResolve",s),await e.callHook("tags:resolve",s),await e.callHook("tags:afterResolve",s),s.tags},ssr:r};return[use,fse,pse,mse,gse,bse,xse,Ase,...(t==null?void 0:t.plugins)||[]].forEach(s=>l.use(s)),l.hooks.callHook("init",l),l}const Sse=TS.startsWith("3");function wse(t){return typeof t=="function"?t():Et(t)}function Cm(t,e=""){if(t instanceof Promise)return t;const r=wse(t);return!t||!r?r:Array.isArray(r)?r.map(n=>Cm(n,e)):typeof r=="object"?Object.fromEntries(Object.entries(r).map(([n,i])=>n==="titleTemplate"||n.startsWith("on")?[n,Et(i)]:[n,Cm(i,n)])):r}const Cse={hooks:{"entries:resolve":function(t){for(const e of t.entries)e.resolvedInput=Cm(e.input)}}},Ise="usehead";function _se(t){return{install(r){Sse&&(r.config.globalProperties.$unhead=t,r.config.globalProperties.$head=t,r.provide(Ise,t))}}.install}function Rse(t={}){t.domDelayFn=t.domDelayFn||(r=>Ie(()=>setTimeout(()=>r(),0)));const e=Ese(t);return e.use(Cse),e.install=_se(e),e}const Jce=[{file_meta:{display_name:"Photo 1",type:"FILE",size:463207,thumbnail:new URL("data:image/webp;base64,UklGRqgJAABXRUJQVlA4WAoAAAAwAAAAXwAAXwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIRwAAAAFHoLaRpDb6/nM85L4WIiL4/e55zAA0ta3k0ICJDEQggg2YCUEE1OzvuBvR/wnQvuiUunAbmh9aXPr6/nvQocXQvGimzUoBAFZQOCBqBwAA0CEAnQEqYABgAD5tKpBFpCKhmOs2AEAGxLKAY1gXZinr+D1n/3Jvsfc7/xWVLcf9nMfrKb5Fy09yHaH0CMFfCTSyzWPKXqGoo+o8LMIBWYU3zBzXaGwPaJy0/z+ZrvfDlgdTXEXWkPE0hOxqY7ScN55FvHFHs7tprQ5J1KLAf9SsLVsPGPngrUaMBhmlIzZW4ushE9krXsam3e5B+BwlQGkBeXcOiIEsKX2fuGS1Co3/etmdZc+YsiZeAKcZmlIbWqirc/ovIfMWhDBJMJxU+DE8em972aA5ftaD8aU5DYQVbsNi7Zp0CY6vVYH+ikTqHGz2HlYc0Xn7u+dhdtgPXdJTVozQHV6FadxBUR5PRWbUBU0/g8AAAP7+nVYL4i9aZ6whQ/XI7YdBd06NzD3lcAnPhaweBp2PB3OBJQ2XuvL7QPxT8eL79lfNPolTfuzbsxeohQc6y1mkt8M5qldtT0JWbHv2PkbIeYpp8nDA8FqAsYvJ8h42FKO+fT9y1DPXSWjHS49zna1l1rKSsFfzNTlpb3wm7uC6hkhs3siH8QHioAo3iiOkqP+pc6OGbC3oF1IVNKmAeZhdVH+E31FAMMGm++1x50NBdkkQAvkUsWOQmsmljTZlMZEkfN1TBVTx4BPSpnRS4+3Hgnk3hnBMZF8PKeB2j9h3HqgeZCuZVKYjRsNWmIlfS4BelfUZkXsc7v3ic1OTeE+h6trI2qGu6tM8G28FELWeM96mQQJeI+rdGfcgvkaXI9G3e4s2UrQKmX0DVR7z4V3pBCl61Tv+QMdxUatiHv1vWYA9f/ExX/qwLSyRVSQ1WX2mkfLlmkE5igCqO6FeNkxP6OeXil2O6h5Btmwg5GB3dodpvevxKlw9jKShjACRRFejIYPwy+noAy1aY3X6mDh4VF7AnKABzc+kzjo5VEBb+7KcqW92yv0MQRxvGV25DYSNEGKnlsyzOwgrHbqZeqY/G3JQk8GxZQb5Xbp+wEhgyRs82DwW40qRs8CLPq/5sCdNj6mDS8CPC22F33ZUb5UzWgIRqruSyFmWYtsO519VrL0mTu4xVsWuzYlAD4g31ZyX/Pbp347Oerba29Walinet7XqQQiheQF/lvtHEhpNgCjfFdhhg+UHVw72tAjbr3QFzotFYmq+ZlHMMIe4oL+DPvTfiw6Udtj3aevMfHQIrmavdjNIWQLAjEm6/NFI0ZpPboKm4JtEOzjZdt11zOQ9vbtXkpSwoy/3QwaiLW/w1YgQ5qEQaDtTsvcisFvueWNFeFzkVylisfQCpkdAsV6GlUqJ2pPoFCpC4vQCUFfNTlNt51cOLeA3Wi52zyBLBGSUO3/kcf0h+J9+H/pFMl8Q6AojnqyX8rmW3lng0QKdfWb9ngZP8M2banOUp9rkij932nUcJ75BY03cGEKw06ZIDjmgYx+hlXcuFTmTNrZSTsZTdDNvhVqqzfqf4uWqFRtSziu0bZ9a6UdpmmA1WvMSYh3DJVp5+AR9EoavBdtkfQdxGfo/Sa0CafapRpKrMu0z2NSWPfvJ6JgRu4nI8NCF30bePalH9m9BmsupkNWezj+UROAMshCNrg4lMlWaUWM2oLkLuJltC8q464BsHvFY67jEDZW8+WLvbEXmBdWudSjwXwdjIakd5MhGBhWsdcUnVcDKVs0PbdhjkurKRsljOaDsXd54LFk6+/HVd6c+y3FW5s0bvz7IMF8Vj/x8V4B68Gz+2Id7Av9MfAQDKXlsR49PJtkdU8YC5t0F2ISau1SGe2jlxJGwbsUtjIWysvHAYlE4Mo8uNxV3cSpKHVsZOUye7jF8g8vlU+3wqqKtMOP0tEWMx219odY5uk/NyjXFeeRXg+Hf1L8yiD/nnSOp1mHedKoMlNDcQbmB30O26d6iII6Cd39LCryMAM+vs/VJveiLs0GpRTVWvZmYyb8+lmMFdbeFMm3DJl5ljtILdt7KTPdcDiYe9/rbXsRfa6T+SBahaEmGQoJGVa4d0SFEww7h0FUnxwcXZ7AAtJtVN96CsZ5eJMpRg6KYRTrHFCATOsN7KMyXBEOguu5TDSlzjUL6kaOeAi24KPYRj0Qb4doQyTFv7TC9kkKM7cnS5YrBd9m/9E/s7YWOHSAjDFeNY1yrgFnQWZFhSX2c2M+4ZS4Ow/QgjI8EyluwiFWongNVwV3nCipyWjeWhDz07FK2Ur5YST/qgRgZoAo+eks9tZ+6nfaYCuRi3leTDKSEQL2t5vsftFCUwLnZLqv7MO04TB8tx2VNF0rE40z1OAi+kg4qlFEJecccd+eWnowVE9yeOk6o7heKO1EYPDKWFAbwJmCA1lgGw6+f2/7kwD/GJ7gxCG1xKRQTo/WeLhA8fgJduVDx+euHP/UeoVhT2LnQKJLhhy2I4ZjB29Qi0jnM1NpCgUUKVa21BUy9Q9+n+0d6XsZH3t5Q8ohowNPws5AgHIE0EPbaa+saVkDdWnmFjurLweqfnGEroRjFoVjsYvT2B7TLKDqYXBuGP7AG5JR8yY5SZRbI+8Ud7kgDMUyoAAA=",self.location).href},create_time:1689059406745},{file_meta:{display_name:"Photo 2",type:"FILE",size:163207,thumbnail:new URL("data:image/webp;base64,UklGRuwIAABXRUJQVlA4WAoAAAAwAAAAXwAAXwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIRAAAAAEvoKiNFGh3wTdC+Z8msBER8X5ZATW1rTakWGBPs8DOwQEH/4banIj+T4A+cC1I4NymN+7eFnz/19+9remNyZvp8yUIVlA4ILIGAABwIQCdASpgAGAAPm0wk0ckIqGhKrVbAIANiWUAuzP71dOQ9x4NuPSqaTif+R8G/OgD3aVtJz/0LDwO0pIYkMDtALKJicnM+plbx0Hj0NL3T2yO58F+sSGUsIPHRSdj7KchsqYn/LTYO5zXNS63glAx4g8zY3ixQnQdx8XIsQ1huaN0XKRfgk8L+cScYcZ2ltiidmSrrNrBw2iuRQ03ew7Pt/Ha/PsU6/0spz1X+rsrwUssT7uT2xjYPuzLvbMr1V9ERpiERaGq7ErRxCXw/OSsV0nuR6UJ2N/i3rXJHq6f+eO6fVcLjnell1/uNiyydGBxENRVeSY6EvqbSKJ8yrj9/tfBfLjwkIJx/eoM5VZauXoZmZQA/u4gawDDXe/XHLBwPLA4ypJ2IpgKp9tIll1UM5xz0uvbH70Q2azUtjTpGzg10yZ+bVw3C7boLp5D91DPFGFBLQlMuj5OHjtJaKoQ4Lp5U2fctIxbRsC/FwP5mpiWZO1FsAOmkP2lw5Yp7cP/uBOaILgpHDwFSGVkrXPQ40N2kSVq0nwFQLpKJ5wGkuVLKtkNeOczBsfaXTaUF5sk1zIYtMvyOEkTZWDlOs0ODd9wIEu3XYf7qay7DVtfP26wB0TBBK4LyCWr6CbFDHAH30Uz1v3QWueBRYFT4KL54pKMG+a46Q4rz5Q/CTj4sfffiVoibthKJEUT6vBLgb5dJIq+HFhdmHQsSY7hPCTrFGvUlRbHbKwBDPIbARudd6akhl9aDkQoL3jsuKgLVzSvB8OjgEg1FxOcIJIIhJtzkAChA022GspOSRQgHpAhcONoEDy2pfQUQumJyxG+VEMrb75hFf+mImRQCI0WxD9m1Up8g4JsioRXX+f3GXJWmGLpqYO15OVrWzAo9tuQRx89RbNA2zOqJPKhtTYYwNFC3NHEoPiGfK4VyBQ7ZHSmlbX/N6Yr5NlWISyM4rMt3bJIZWhszF2Hq8hHwLMnMZTLAxZvoYlJJrWxtdzItweVY37DD+7/C59o50f8Xt7XhNzam7kHirnxAzQhBY/hjGjR6wk0AFo+ABwZPTV5oWoWFUz6x3Dd00IuYYx/tQgUAMJGKK4KmqkscW4t7PEQMcnu2Xu+zUsdk6scZhaybI8fpy+MEHaYIOAP+G8Fzlt9H7Y1u1WWyRQENSvhrsh0L7GGY4hh3+tenbhC1fzX7eIEkqjMggzrS7G+vX+zlh534kyc1rmrz7F1ZEDNWxWp8IxYDDu6bzL+piufehe+xGNcokuewCtVcSIDquwHIqUeFo+amBGiLLbIlNlsOuEPzQTPIEWDJPqB4CiCfZ/kwC6Pk8tiMPdFHWFTLIFPOi3YqsQ+yWdRmN2u5mZK03fSNTmZQQ0ghJ+q8jC5YXQTCkWXcxsOS0N8mEn7qtmHMu7Qpn8fDka0XuZFNf77xJliyCqyyVoYx22LltbJzrWcugMyO7XTne8jqtn4Ib6jd5LZ/7aBS4usEaPxerA9kmfwNd2M+cVxFLJKIpOZKwdF/arwl72OzJBs8d3FtqUm0Mf2yIGY40pQgiQiP0JaOsUWOslE+jltiiuUYEnzzWxxjQ707qeXnCNCHssK3j9iayjiTGflzDNeI00aN02Qc4q8nisTZMeYyG5Acl3mFuXUryBdgZ0/vt6M0t6XCxCmxqj5zNJDo/42+GIvaTTfwOSSsgPRqtxT+hNbUikeJIbTMqsx7ckxuajK1E1RQSgcOiThoicdhNQpJFnDhGCjVFAZjeHBVbv4lQ+j4n0doR6RrqUxo3JFDLSTBSspNTDVQkK/NjXnhE5CjA3GKVhkhNiAXHUefhVaNy6O/OuxgqHZJcqTxkZusuvR2gxlCUjUTouuLbvm+SL4jAexpLAN9cTvWTXZU+fghZ2vLWddAji9iFk+GF96aGWb1bLcqzHqZmPtT28UqAFSAHobWaOykexyM+KrecDGFie6hUl3xCzMxuslQjQDR5sqzJyYK9wRY1goNNqJbYPnxsuWI8uw40tKsP4MGV8NxSbdCayDYOeBTZR81sRACG7P5BYCC1Q1SBXXrnQuxqCRQMeldPFTw0/bXWrNvkGrQ2UqJrdL1p2XCzK+VdCeJ1q7kbhks3qOdnWGzB78pNXmWeuBQmg7z635wGd05uWEBOdg7S1h7WbbXyVZEd3WCymnk7OL4mwlF4QOznCTQ7UkttrlOfnYl4oSZxRN9MhhUWBdtRJPxNTu9J9oLD1kXPTgvymfpZlpGQ1dAIYDA6JlTCNvQhbVfa463WArL7q4bRkpvNNcbgr5gfHs6gAA",self.location).href},create_time:1690879202212},{file_meta:{display_name:"Photo 3",type:"FILE",size:393207,thumbnail:new URL("data:image/webp;base64,UklGRooIAABXRUJQVlA4WAoAAAAwAAAAXwAAXwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIRAAAAAEvoKiNFGh3wTdC+Z8msBER8X5ZATW1rTakWGBPs8DOwQEH/4banIj+T4A+cC1I4NymN+7eFnz/19+9remNyZvp8yUIVlA4IFAGAACwHwCdASpgAGAAPm0qkEWkIqGZyo4AQAbEsoBdQCGKdJ9f0VNnw0xcdGYcZx+0uQFYD2hnwj8wlmPgpBq2S/hzSNdkZp2OqMSjb5ctIJfyu3+RPWFOdpD5hg6m6GA7PCJvRgHj2/j+54VGE2x8zdxDG+IeGRfOcOPWQLHtR1d+dWd33hLy7i5rjRy8bpk4OQOgqYofDZhEq9lCjmHQ+H+cHQIu1g812RqrO34P+X9uA0/jnMRsetYuiECRRv8I0fzwL9hwM+pIDWolsabo8F50aiiE2yuBL9yK+tEqyZ29zsq/cwra2Zml7Dc+BCH6fZZHnRDQGojuzMYSkW7uiIJIxeCxkaoAAP6j59cO62XtorgrGiKigOhB4fliqG8iX2/7Svvb2uLK+L9tuLIHuL7nU3qQUl160zOH3eS/XD0njcWcixkK4yAAy18vFcYWkxMYjFyLpcBDyvdh2MKBs2ZalyA0Smepn1g5fNWhtlIjj7VWVPwvdbXq/7RRaSPSVm49fkP6GJILvImXsGsiLuUIW0ULzxN0TsmpDC0jb5Z/ByAWYcb7Kt6s/Uckx7sMM9bKRWL4iTXV365Y0KhZmepQdQDhVI4zLTs9+1rBVoHW65KJ3lQa8a73By+eLNalPyimO/3y6H6KNUdecIvQe2urQyZZIQHnectZ70tyNdwHB/VX6zc/DO8W5ip7yY5d7Mix5v8fOi63so0JY44Z101MeIBDFew0yCsresIvExl7XeGHmdDcg8xIaOuLr3XkWdJF7/iOxCBEEvtjSVsDAP01NdbBS6kv5MFFDT4eqJw9BN+B3ojnhmMNxttiQTJuIxZ9RlX0tOvQ7sFccVVWS0G/OPVz2rJ9pQYXIIL9FAjz+M8dVYieGg7pXgyblhm97odeEF+jyGmB3rlXcFodUNK7fuY8WMhpWeQ548uWcJj1Ufpe12qgqo+5krBV+SAOBNlOybVJxx+D4GGI1+VrcNVPXfo2utzNN7mLHwuLOqwZ9lIwntPyACM50lP2FOhh+rCfDbbhH6C3l+nvbQiiuYAfPSGgWqfKl6c+Oipk7SC7oaxFhcBx1bVu8Sy9aCfgfsQfJ8eMxGwMu3bM5+k0hHdmR2SiujTaoo7yKXp14o3Zs3RYKL0bY+mDuImctgPf15o3Op0i7rdQ8TvrAkX0eZzfrothz4EeoQO9gSXVK/FUJF2xZD61uxlCk2UroVJPe6XsYe8oNdA9RQXp/o+djg/wltKagu53T0hli1+bEzvFAlH3k/Mmo9e5ZcBMPhGE3N0D6b5nj3dZTd9paeVGpeey1l7k6j+b5L2FYPSl/xmUV5it1Wl48RDSLkBL0ea60QCKTAuKIuR6DJqnNhG1aPuHPd9mt47ZoJgddEJvyCuPwyPRd8tuvitsPORkUCJ9KgtFKRO0Q1cyyPceinXnjB5tQCEQWAuNt4XEzRV+9jVEZnAgCxTiSBF0HLLuUIwctXm8vHaf5HbpbvNY10NTe7J6mbK6rj/QNLpqLA5OtnZOBf8cTMP7uIv9g04bhstFKo2AMVz5mjC8BGCyp+UEr27pAVKc5lEREBK0R6A+fiWGoSu7y86IP4knF/xUeJYB0fXIjDMduWcfZVrsRSJcfZIg7trTTNrLerNNyH0WqY0Ohe2t/0uXlvIhvatyN3y8NoN1eeJBbYfD4Ffp1i/puJhPufzzqfkt4QYr9pba/9ABCVkDNJoJ15aMJ2BsQ1/WiIzn+V5q8iiSEslNheugTJobcZlMMw/OpD1ndqL8QeJmLO6b5DWnbOfXfR4+vydCNr4AJp3sLoJTh4NFTJ9v1hBqPfbu/6dKuF9+9Q6BUXfByp9kxp6pYGto/s3fillwAaMwlIby3OynS7WUoTACCDP19+4EAdOvbfVfmdeAdjaMcKCaDeI2nCROSCoVhotpsJZtr/WALPcNke+qgcs4eqtxj5m/wP8KmcyUtXjWPfADEf8tt+UOKnJ9xammK2p7R/yN9urPyQggAEX6MhyV0v799ENCEkZzkKbrDUQKZpNHpfk67UaNLqtvbc+ff9X7Yu9cp0q4uhOf/2e01MxvG/ZWnPLMB9ZDq3EJAJwXdVh1s1XBJ5Kf/eCVaAXDXlezXlnSjMm6FiOg7TlE6gPPBgDVpF6eBdEKZf+M0rCxyBKoAA==",self.location).href},create_time:1703747194709},{file_meta:{display_name:"Photo 4",type:"FILE",size:2123207,thumbnail:new URL("data:image/webp;base64,UklGRuAHAABXRUJQVlA4WAoAAAAwAAAAXwAAXwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIRAAAAAEvoKiNFGh3wTdC+Z8msBER8X5ZATW1rTakWGBPs8DOwQEH/4banIj+T4A+cC1I4NymN+7eFnz/19+9remNyZvp8yUIVlA4IKYFAAAQGQCdASpgAGAAPm0wk0akIyGmqrqqqNANiUAXz4YCkJTVwb7cVvb++YDHrd6Qn03JL79UCO8N+WXawo0wzQhfPfKOs3PSe7HG8HLLLGncZVhnNokEe9d1OL4b6yYSFIFz1B5j5yPDup7MIeeJLuUAbFOpRGk9QKHVA8JarNHgq9PkIhUW3/3GNd0aMfa1VUh6JNcK/AgelB3YxdCjXbPg2u+ma7wRYmynLzQh/UufWJNXs5MEi9cMqWNzOXPlrVHa2GyqSpAo/IDM6S33p+Y0QAD++OOPgP30n/RhJ+L7zsRmtv15+xCCVjsizFFXRZwae7IgKwWvwImizmHvAJY0UFb6iaku4bQ39IqZrH3jxWPsdvHLvNK7QNon4cFLS9dvISq/3i1WTYF743cA9NxkfjHAqXGPnUYbjLTGGgl9Ikp7UULaHLSd9x99h3hMqTcr6c4pX2mnQj5UI9m+/JH36x+WWp4uk5jAgIiIDO48tEGMWSagQjjwROUp72Op+4sLtbxb5+DB8FobDyH457n7JovPTeNKnBQldarqxfawFwgfndzRfMwhndF7HQD8sd72KstljK/sfubInL/DyXcOFjTd+a7xrhkHG3BUpnFi9a+ngVBSOWXAdCtKHyNOl6nIBQi6mVxUHhL/37+3jDn6rh33xWpf8TD2LxGfnx7ibaxfHqMMk8aYyTuwxwUXzIdOLvNbY+3wyIYORWBMB8tKmtJGjCChHNrNlgv4XTUF1JwvazqO070I0/3m7GSbOZlVCGDKl4KjOqa1+4T1GMzPaYqE/vbkDfIwgqsrZnEWna97FFceB1P2+rMezQ+yZ9zBYX2UIgwO8YK4uYlRNQFFC3yu+eKuPRSDy3w3bZ+a0MkoELg6KDehr4+ecgH/iNf5ArEVXgvrCOd/fs7e6ErJWfTVGGyy/ItbO6S73Lqp+MTc+GBPiPnZsdBWpexlec1/jYPyVr19nDrpNxMMI233x/cWPOEibGdRXBCvsM16VLbfm6Or4yLF5iUEqDasMyUkmAorRhQ/aldzzXG7xT9UDgu/J+iCAb4eO2h5hJgnNx8jEZUj/31YSRX5hL1OCqQ6+3PntNBcMIngVilCEr56bIptXfq2vdSKNjNDXhTBusU00LP1KJnNDaMI0jZpwXiJM13TAgdOIU3ipeE/9LwoqT0eF2f50PLmGwbQP1SX8So2yF/ZAO0rGzs5ziToN2SNKS+ve3/ehu3o96+40wYvyIsGhAaKSshLtn6t5G8X6cOv/G0urgN8E704hgOdL5XsxJTJymXa6mex7lfmTTHzYpqBc7cpT48Y8tYQKIIqLvHMPq96nBdJ/Wwq9ePj56GqJi7dPSjREvrCmGzzhurr9LgB8Z5U7SInW9PjXgWvj0707QTV++TmESwKxbO5pbeOqgD7lsIHIOsPk1XXSx78pFnJgclG3sxYqljACHWmVQ5FhToAs6sgGNNlmhR5RG5YCvTxW36jaDnINefLWJY8n24r//KRd8gJiN8oEWvMrJd+JpTXXu2eRs8v4YYcaYSLr0hD/CfmtYXHvIxXRhjO5SIC7qjta1twNL/8uFIY5pTtceZoRbk4Y11S7u6SrlWSxXQMl3xP8cjb1chXEW8U6q2j8hylaF2aQvfNxWptSvxedp8pFmyAzd2n5R9LQPxXNiiKKR1TLN5U8NRUMjPX9yeuQOwaFQOWcIoQSp4NrISlib9JFzj/qL0G75Sc8nwhDnXa11bpanq6+p8OGI/4bslhRtWE8499dKFPwoaTPTub7yJHjUCf0CYgtUt+H7UNCunlGmq+0Z0mjCBjzU3ZZKMthqnmeumR4rdG+3viPYTVcB+LS+2I/6afGtWNDA5AcyE7+qyyNGNt0pgq3pD10huErU5vN+2Zbk06kHzvbzDYiUZYRwpGbcIjQLY+hBodTstkoAA=",self.location).href},create_time:1702628695952},{file_meta:{display_name:"Photo 5",type:"FILE",size:2632027,thumbnail:new URL("data:image/webp;base64,UklGRjYJAABXRUJQVlA4WAoAAAAwAAAAXwAAXwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIRAAAAAEvoKiNFGh3wTdC+Z8msBER8X5ZATW1rTakWGBPs8DOwQEH/4banIj+T4A+cC1I4NymN+7eFnz/19+9remNyZvp8yUIVlA4IPwGAABQIQCdASpgAGAAPm0ukUckIiGhK5O94IANiWMAr/NtTJgqv5IOfNn0/5jbquBpjqUKG9p/wnUa+WfmSMYfKOy5NPQz4g0FsKne5Gu/dlBCNQzDQ3SD65BaET+6f6owoWF57mdx8kyoP14j/w7R/kADDaNsz5HJJjXY5GuED8p97mMzw4XnY8QSuo8GZbQ7foSjxwj+GdxBvVYGZZNxE+MvEVZgj1tvR2IQQ9pN3xTmr8pBhHPt0F7+ofZ7moDQ6J1m58BPRlQnDvpTIb2+T/crz66OAKHD32f1HQOWJBn7BcBt+7RFLX8cZ2967t0wZt+mj/VtqGkHM8h4VPEarzDBPSl6HjXo4VP36ojsGmmnw2nCAAD+/tI3jezkcd6SqJamLoVzzmvF6hNhmR7RIjcraamW0D910gtQzEAKRmB5U7fx6QnHH7Mhucm1ZmUnV5owaLDgWK0u9yhtAyHz2O7pzLIeeaUuT+8Ab0Ez0l24q6q5ezJSE1HCZG7vQQwrqVHpLR4/XHitODynQ+/HQzovsItlFKR6ucLeHfGFtckvQpNs7GlCioX3UnjIqHYqBqBfwktwhuUzaIx35kn04m4rg2LS0ZRD1ihNlypPQ5894BWBWSeToKFeg9Eb/iTP0mvH5dy7/eK93ytBTQPQTzjbBVERaKFZ2+YM/3myFdp85bc2FnqqrVr5/v0Yz7SOgPkr3FQD7pBxjsUJgmW+ggaagXTa6Loe8wcxwC2olP5zAlS9lwJl2C4cbBVQf5d9hornXAvzNjdg8aroFe4AsPt8lrbPN0qrsDFkaKcyHEUhC101proGH6/1P8fZ/+pHVA6L1aEwVh7p/wvxIBsuCjuF4pVR3SAYnDwt51bJMjxwXzigSWFGtYyMEbDGQNaY3PclQXe+npUM5Wp5Z/nYQQuJnof+s+lS1Aq2YTEjnKwWJfPef2VEdUhRXBQWJieuoYSWZk3Xdbf8Yjc8wx+aiSEfXXmUDNZlPhgkHbFBAOU+sMWLdqbm9MIaosqYhSq/T96hIsng8IALOCwkruah37QTYtKlD3cXr4Uk/MyxZiFb6ru9aYISVsZhSTqGBx1jzngo0DQJvab7p7f5ikjFFvk+d3ptckJdEi0qrSsWCAi2h8jOkcDZnVOnkOv5BLnO7XPAgGfcpj1JJtZlHd3tN8yg5cuwtdzwWCf9yOCtN9rcqUGNI4Zz2mPUABO73KdpGesIZe77KbtkFs2lrapEAfuvxT46ECle1z25PGCOESKKMFpK9VlZ8o0MPYNJRp/Spngplo6yWcvIIT3ZPLdvKlbZzNLkzJH6xLCsNrzbJIDLOstAvV9G/JKI3atfZh/zO0hOPixmmgJfrxLxRLN1QAp7M6+MWsYaKya9EKkhWqikv3vAMYS+SdbsPBwjheWAw7Ljg5JOPqddQdOB35ru31UEuNO0Bep41okDmLFqMhxaPpLp1KybvuzRo+yKIILjMpmyl2y41k0pEgVZtUatoih4l/Lj7jPs1qzjRYoH90wfjRTap4tR68VSPlKwHId7TWTsUoXh6mOYu6avuHujmTZxJv+KdOn6kZiK1me9rC2Ri9LzUI9GXFgaGINMuM2nL1jBaDrlVjY1NO9InVWbX7bXJp2ttL9LObDVxua3WjaphpaY0XV/t0M4sxPOGDtweXK6zNwQu/X3dcRp2S2v9Ja0lMwrAL0Jh3ZeycqB7jKd6vNgug3eA1g0W06YymbC1CHsD/d95AyOCTIa01NM98PtgPKSTlLTmnISHRQ0+S1zHyNoRGdkgYG37Tv03I8viRMzlcLilotc842+Oi+06aiZnYboKMSG6mvedTvSFJsykNjyCJORI7/XwdxFxmQeKJ9esoTF7hv8T4G8r/WPBm+I4b86NEtYkX3AMHSxwjNs/AxZFW4xakNSrpJ7weq4bTp/J3RovGFXgWe/f/0Js6Zie9PgRhTIxY6BF6HzU7B4F6d2TCZxr/kWHmwNWjV61mxzfPkzRudBOcwIg10gw7WGwJFCaoCf7+hgcVUaNap+U/C9KdTnvihEV8Vav6AdptJit4GDHjsCrAuA3ClZwwpi5hf1qLCuSDbOzU2wRHqj1Zjzd5ymApkOTMw1GYpXviDHBBafBQ8fXw/guEK9DLg/iI7h9UXO38Mc8VL/Z1V2HCOdM7iCphmB24nYZ1QA1gkXwRs/dXYmKwJn+mzV070PPtvQyAWFHhhbWzL0jFvzD52XBEte/2S38arrugtaCacO0lssHVoqhEfj2K5oXHnHthNj9JJWIyWav/r6gXwRANpcy8YRSTRdH8TrXxEuHJ5cyz1MN2nqp1b0MRWoX42MCVSLkC9+hlU+fVfDfBmQuP8y0SnzbcVmtNUtl8RahZK8TtoFTEjQUg3gAAA=",self.location).href},create_time:1702951366390}],Qce={name:"Landscape picture",picture:new URL("data:image/webp;base64,UklGRk4IAABXRUJQVlA4WAoAAAAwAAAATwAATwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI6QIAAA2QNW3bGcmjehrVU1OpGrs7a2dmPTxa28aRbXO0tq0j29aRvdtYKzNrjWeai0byfW9ETABUjhZFk1TNKIQKKCkoyX9jyZPlb+A2uF1GZXjgUwgVjNWkaA3e3zhfxoOY2L85lAwyiU0zkq/tM8uMhfRs74KKkR066M4dKWSoeucRUDu07vD0radeM6JvNcgOFhMmVNl92cmALjFXC0YNSdnuTLNLtT5dwbC+zcATB1USJ8aDbWnOpzWyGhHL7GB+bMPpP5VLywKHhmaTcm4pVXuahwcgecTy58qkTQOnmnq5y28pEZHl4QWoNyLnZ2DiMnCsSZ40XQ5oop0noFnDNQHo+sSDb8PYTwddfiV2BfdzTpj90eeCf2lgptOPVloC0MZ92Vf1QaBQn737tY/OdhKQVOWUt5ARoNEwYWuhl56gMiH9yH9iezIw/JwMINFFR12dGUB/0BnaYR8Q3JwQdLhWhnagNDL5PDJIQcaN6Mq0NH0vglYRoocWk8YEWoOiJWIgVaOmmpEao0CNEEpNqECNAHJLBGJKCkKJKSgRiCnJNxKT/6YaMW8sEjGWvOggUiq+yRoTKXkeGSIpMr69b0rKPeBGBik3gPPJkYT8uAuUXetAyFkA2NchlIwCL2ZdXTJsrv/kc8PJ2AavR9ITiPh401vh1gkGEuxr4fNUlSQSnr7z9Xp3tp4AZzb8vOxuQ8BFrT/OzIESd5Y98Nt8Yg53C3X+uQ5+Gmvgyr4BAa9p2Iyr648Ck6dPStZw47m7Ggr+zBlRjxvrVih6a3luPQ0XHmsmFH6+fEQyF3e3QvFbOZOaGZizX18NFX9ObziWuQ2PoKq85tMciSnLQqh+8MTANnpmnBf36NRzmTPd2UkGJuxPs7Vg0nl5d5UJCQx8XPsOzL4+tTV9eN1QVQps226C6cIj53QdOkQq9uPsWReYl837riVnNBVNQQFU5Mn3btwFp2Xnb7yHJlqqZhRCBZQUlOS/sXzzQG0AVlA4IG4DAACQEgCdASpQAFAAPm0uk0YkIqGhKlgNKIANiWMAzAGSyjywAd6CaOr+72KejjwMiI11YRO57I2eZaVAHSJ9H6ERQuMh4WCkgkuGwvWBhVHmcLAyQ35HzlHnNk2VsObf1y10kV7g+jdi4QB4wNmF7y4dBtL/x6tnGG/OgBJFDdeP+M+qDmhIUU/E8+Wl0XR3cgScEGim/akanVG1JzsAAP79Mn22UdMnZMbvrIGpkBwaJAmH9O1kAz9kbF0hL4gMXJkUP7NmJ00eqLGO8UaNbE37pycTZiorhBbUO8ZdhaHPk4pU+7GFb0GlItWxYfx+8KcZOPA/gLK2sEJhH7WWzmsotSrg6f990Z9d0FlnTlusf6tgKCrhW9C4QLOGiZsz0lUizeF3OzxAgj/L7uIHOAsTYsFKeD/V7od2VKbTVTcZkxxAajLEb+AjFuj/mYw/7JvFObGiwbUxVQR4yMSwG7JDJ+NJCH3JYdD5ZxzosvfQ42zsPXPwqa2RUb0K/As9h2EJfMa9IplK+Ft7yi2fTOpo5XE3qwX585pj4BsurSP90IJSEhKQNQWnOIjX0Sqca4EEMwbLWCMiAQCIMg8k3JinC/a4iOwUjsJ4hqlMM1KPkJheG15ScbNiWs0y1g5e8XGEEvn31tgJK727lf8EILUataHPx9vJziEiHBmkh2LXpeG1YcomNxcf9FzpsvL5flknL4h2vkyC2LgNyoqyZEJDEI55dB+6JsL5aziyHe6cOCQ9q4JXvk2r1SLNithabOoEK6L3YfCoy0VDnc8O95zFc3aeQ/BbzbZW6c+Pbwmk6A4F2S+BvWz+MuFb+NM4GpikV7SaY91v4khZKLme95aS/6ljBHAflZPvNI15akrhv3ZY9IDhpXkdW1P5F5CHF1NAEA+AkjevXu1LX/p5mAtC98zrXVevgvuDGln3uqMRexktE0A29dTDFAY8iYSaCmnpSB8iARPx530duvKRY61jFGQdUpUs8jntUCRx61+AWm44x11fUSC2rdLBBOtBSQzMyF59/48Y5V241rjw9bq/xf7zf2XzuqkmGIE8F8QWZKQY2JJHtamdn83MiTW6uQNpxDw6jDq14L9poGb/8NMq6/RKmkjuXUxCb4BuSxBqFlJ/I/R8GzH9szu4zfKSWsm/F8Y03cU4EcO6+oAAAA==",self.location).href};const Lse=sK({history:Tz("/"),routes:[{path:"/",name:"home",component:()=>lc(()=>import("./HomeView-8f323c02.js"),["assets/HomeView-8f323c02.js","assets/h5-c77e4d24.js"])},{path:"/report",name:"report",component:()=>lc(()=>import("./index-f2c62122.js"),["assets/index-f2c62122.js","assets/h5-c77e4d24.js","assets/index-3d980c28.css"])},{path:"/terms",name:"terms",component:()=>lc(()=>import("./index-e3f1d925.js"),["assets/index-e3f1d925.js","assets/index-97a54865.css"])},{path:"/privacy",name:"privacy",component:()=>lc(()=>import("./index-8f4dfe85.js"),["assets/index-8f4dfe85.js","assets/index-7ddfb866.css"])},{path:"/dmca",name:"dmca",component:()=>lc(()=>import("./index-7e1b3e89.js"),["assets/index-7e1b3e89.js","assets/index-727020d4.css"])}]});function Dse(t){t.use(Lse)}function ZL(){}const mh=Object.assign,JL=typeof window<"u",gh=t=>t!==null&&typeof t=="object",wl=t=>t!=null,Im=t=>typeof t=="function",eue=t=>gh(t)&&Im(t.then)&&Im(t.catch),QL=t=>typeof t=="number"||/^\d+(\.\d+)?$/.test(t),Ose=()=>JL?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function p1(t,e){const r=e.split(".");let n=t;return r.forEach(i=>{var a;n=gh(n)&&(a=n[i])!=null?a:""}),n}function kse(t,e,r){return e.reduce((n,i)=>((!r||t[i]!==void 0)&&(n[i]=t[i]),n),{})}const _m=null,oi=[Number,String],bu={type:Boolean,default:!0},Mse=t=>({type:t,required:!0}),Fse=t=>({type:oi,default:t}),Ss=t=>({type:String,default:t});var ka=typeof window<"u",Pse=t=>t===window,v1=(t,e)=>({top:0,left:0,right:t,bottom:e,width:t,height:e}),xu=t=>{const e=Et(t);if(Pse(e)){const r=e.innerWidth,n=e.innerHeight;return v1(r,n)}return e!=null&&e.getBoundingClientRect?e.getBoundingClientRect():v1(0,0)};function Nse(t){const e=ct(t,null);if(e){const r=xn(),{link:n,unlink:i,internalChildren:a}=e;n(r),Rr(()=>i(r));const o=_e(()=>a.indexOf(r));return{parent:e,index:o}}return{parent:null,index:je(-1)}}function $se(t){const e=[],r=n=>{Array.isArray(n)&&n.forEach(i=>{var a;ys(i)&&(e.push(i),(a=i.component)!=null&&a.subTree&&(e.push(i.component.subTree),r(i.component.subTree.children)),i.children&&r(i.children))})};return r(t),e}var m1=(t,e)=>{const r=t.indexOf(e);return r===-1?t.findIndex(n=>e.key!==void 0&&e.key!==null&&n.type===e.type&&n.key===e.key):r};function Bse(t,e,r){const n=$se(t.subTree.children);r.sort((a,o)=>m1(n,a.vnode)-m1(n,o.vnode));const i=r.map(a=>a.proxy);e.sort((a,o)=>{const l=i.indexOf(a),s=i.indexOf(o);return l-s})}function Use(t){const e=Jt([]),r=Jt([]),n=xn();return{children:e,linkChildren:a=>{sr(t,Object.assign({link:s=>{s.proxy&&(r.push(s),e.push(s.proxy),Bse(n,e,r))},unlink:s=>{const c=r.indexOf(s);e.splice(c,1),r.splice(c,1)},children:e,internalChildren:r},a))}}}function Hse(t){let e;Er(()=>{t(),Ie(()=>{e=!0})}),Od(()=>{e&&t()})}function Vse(t,e,r={}){if(!ka)return;const{target:n=window,passive:i=!1,capture:a=!1}=r;let o=!1,l;const s=f=>{if(o)return;const d=Et(f);d&&!l&&(d.addEventListener(t,e,{capture:a,passive:i}),l=!0)},c=f=>{if(o)return;const d=Et(f);d&&l&&(d.removeEventListener(t,e,a),l=!1)};Rr(()=>c(n)),Xm(()=>c(n)),Hse(()=>s(n));let u;return Fr(n)&&(u=st(n,(f,d)=>{c(d),s(f)})),()=>{u==null||u(),c(n),o=!0}}var wf,lv;function jse(){if(!wf&&(wf=je(0),lv=je(0),ka)){const t=()=>{wf.value=window.innerWidth,lv.value=window.innerHeight};t(),window.addEventListener("resize",t,{passive:!0}),window.addEventListener("orientationchange",t,{passive:!0})}return{width:wf,height:lv}}var Wse=/scroll|auto|overlay/i,eD=ka?window:void 0;function Gse(t){return t.tagName!=="HTML"&&t.tagName!=="BODY"&&t.nodeType===1}function tD(t,e=eD){let r=t;for(;r&&r!==e&&Gse(r);){const{overflowY:n}=window.getComputedStyle(r);if(Wse.test(n))return r;r=r.parentNode}return e}function zse(t,e=eD){const r=je();return Er(()=>{t.value&&(r.value=tD(t.value,e))}),r}var Kse=Symbol("van-field");function Yse(t){const e=ct(Kse,null);e&&!e.customValue.value&&(e.customValue.value=t,st(t,()=>{e.resetValidation(),e.validateWithTrigger("onChange")}))}Ose();const qse=t=>t.stopPropagation();function tue(t,e){(typeof t.cancelable!="boolean"||t.cancelable)&&t.preventDefault(),e&&qse(t)}function Xse(t){const e=Et(t);if(!e)return!1;const r=window.getComputedStyle(e),n=r.display==="none",i=e.offsetParent===null&&r.position!=="fixed";return n||i}jse();function hn(t){if(wl(t))return QL(t)?`${t}px`:String(t)}function Zse(t){if(wl(t)){if(Array.isArray(t))return{width:hn(t[0]),height:hn(t[1])};const e=hn(t);return{width:e,height:e}}}function rue(t){const e={};return t!==void 0&&(e.zIndex=+t),e}const Jse=/-(\w)/g,rD=t=>t.replace(Jse,(e,r)=>r.toUpperCase()),{hasOwnProperty:Qse}=Object.prototype;function ele(t,e,r){const n=e[r];wl(n)&&(!Qse.call(t,r)||!gh(n)?t[r]=n:t[r]=nD(Object(t[r]),n))}function nD(t,e){return Object.keys(e).forEach(r=>{ele(t,e,r)}),t}var tle={name:"姓名",tel:"电话",save:"保存",clear:"清空",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(t,e)=>`${t}年${e}月`,rangePrompt:t=>`最多选择 ${t} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:t=>`${t}折`,condition:t=>`满${t}元可用`},vanCouponCell:{title:"优惠券",count:t=>`${t}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const g1=je("zh-CN"),y1=Jt({"zh-CN":tle}),rle={messages(){return y1[g1.value]},use(t,e){g1.value=t,this.add({[t]:e})},add(t={}){nD(y1,t)}};var nle=rle;function ile(t){const e=rD(t)+".";return(r,...n)=>{const i=nle.messages(),a=p1(i,e+r)||p1(i,r);return Im(a)?a(...n):a}}function Rm(t,e){return e?typeof e=="string"?` ${t}--${e}`:Array.isArray(e)?e.reduce((r,n)=>r+Rm(t,n),""):Object.keys(e).reduce((r,n)=>r+(e[n]?Rm(t,n):""),""):""}function ale(t){return(e,r)=>(e&&typeof e!="string"&&(r=e,e=""),e=e?`${t}__${e}`:t,`${e}${Rm(e,r)}`)}function Oo(t){const e=`van-${t}`;return[e,ale(e),ile(e)]}function Rs(t){return t.install=e=>{const{name:r}=t;r&&(e.component(r,t),e.component(rD(`-${r}`),t))},t}function ole(t){const e=xn();e&&mh(e.proxy,t)}const[sle,b1]=Oo("badge"),lle={dot:Boolean,max:oi,tag:Ss("div"),color:String,offset:Array,content:oi,showZero:bu,position:Ss("top-right")};var cle=xt({name:sle,props:lle,setup(t,{slots:e}){const r=()=>{if(e.content)return!0;const{content:l,showZero:s}=t;return wl(l)&&l!==""&&(s||l!==0&&l!=="0")},n=()=>{const{dot:l,max:s,content:c}=t;if(!l&&r())return e.content?e.content():wl(s)&&QL(c)&&+c>+s?`${s}+`:c},i=l=>l.startsWith("-")?l.replace("-",""):`-${l}`,a=_e(()=>{const l={background:t.color};if(t.offset){const[s,c]=t.offset,{position:u}=t,[f,d]=u.split("-");e.default?(typeof c=="number"?l[f]=hn(f==="top"?c:-c):l[f]=f==="top"?hn(c):i(c),typeof s=="number"?l[d]=hn(d==="left"?s:-s):l[d]=d==="left"?hn(s):i(s)):(l.marginTop=hn(c),l.marginLeft=hn(s))}return l}),o=()=>{if(r()||t.dot)return Rt("div",{class:b1([t.position,{dot:t.dot,fixed:!!e.default}]),style:a.value},[n()])};return()=>{if(e.default){const{tag:l}=t;return Rt(l,{class:b1("wrapper")},{default:()=>[e.default(),o()]})}return o()}}});const ule=Rs(cle),[fle,nue]=Oo("config-provider"),dle=Symbol(fle),[hle,x1]=Oo("icon"),ple=t=>t==null?void 0:t.includes("/"),vle={dot:Boolean,tag:Ss("i"),name:String,size:oi,badge:oi,color:String,badgeProps:Object,classPrefix:String};var mle=xt({name:hle,props:vle,setup(t,{slots:e}){const r=ct(dle,null),n=_e(()=>t.classPrefix||(r==null?void 0:r.iconPrefix)||x1());return()=>{const{tag:i,dot:a,name:o,size:l,badge:s,color:c}=t,u=ple(o);return Rt(ule,vl({dot:a,tag:i,class:[n.value,u?"":`${n.value}-${o}`],style:{color:c,fontSize:hn(l)},content:s},t.badgeProps),{default:()=>{var f;return[(f=e.default)==null?void 0:f.call(e),u&&Rt("img",{class:x1("image"),src:o},null)]}})}}});const py=Rs(mle),[gle,eu]=Oo("loading"),yle=Array(12).fill(null).map((t,e)=>Rt("i",{class:eu("line",String(e+1))},null)),ble=Rt("svg",{class:eu("circular"),viewBox:"25 25 50 50"},[Rt("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),xle={size:oi,type:Ss("circular"),color:String,vertical:Boolean,textSize:oi,textColor:String};var Ale=xt({name:gle,props:xle,setup(t,{slots:e}){const r=_e(()=>mh({color:t.color},Zse(t.size))),n=()=>{const a=t.type==="spinner"?yle:ble;return Rt("span",{class:eu("spinner",t.type),style:r.value},[e.icon?e.icon():a])},i=()=>{var a;if(e.default)return Rt("span",{class:eu("text"),style:{fontSize:hn(t.textSize),color:(a=t.textColor)!=null?a:t.color}},[e.default()])};return()=>{const{type:a,vertical:o}=t;return Rt("div",{class:eu([a,{vertical:o}]),"aria-live":"polite","aria-busy":!0},[n(),i()])}}});const iD=Rs(Ale),Ele=Symbol(),Tle=()=>ct(Ele,null),[aD,Sle]=Oo("radio-group"),wle={shape:String,disabled:Boolean,iconSize:oi,direction:String,modelValue:_m,checkedColor:String},oD=Symbol(aD);var Cle=xt({name:aD,props:wle,emits:["change","update:modelValue"],setup(t,{emit:e,slots:r}){const{linkChildren:n}=Use(oD),i=a=>e("update:modelValue",a);return st(()=>t.modelValue,a=>e("change",a)),n({props:t,updateValue:i}),Yse(()=>t.modelValue),()=>{var a;return Rt("div",{class:Sle([t.direction]),role:"radiogroup"},[(a=r.default)==null?void 0:a.call(r)])}}});const Ile=Rs(Cle),sD={name:_m,disabled:Boolean,iconSize:oi,modelValue:_m,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var _le=xt({props:mh({},sD,{bem:Mse(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:bu,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(t,{emit:e,slots:r}){const n=je(),i=d=>{if(t.parent&&t.bindGroup)return t.parent.props[d]},a=_e(()=>{if(t.parent&&t.bindGroup){const d=i("disabled")||t.disabled;if(t.role==="checkbox"){const h=i("modelValue").length,p=i("max"),v=p&&h>=+p;return d||v&&!t.checked}return d}return t.disabled}),o=_e(()=>i("direction")),l=_e(()=>{const d=t.checkedColor||i("checkedColor");if(d&&t.checked&&!a.value)return{borderColor:d,backgroundColor:d}}),s=_e(()=>t.shape||i("shape")||"round"),c=d=>{const{target:h}=d,p=n.value,v=p===h||(p==null?void 0:p.contains(h));!a.value&&(v||!t.labelDisabled)&&e("toggle"),e("click",d)},u=()=>{var d,h;const{bem:p,checked:v,indeterminate:g}=t,m=t.iconSize||i("iconSize");return Rt("div",{ref:n,class:p("icon",[s.value,{disabled:a.value,checked:v,indeterminate:g}]),style:s.value!=="dot"?{fontSize:hn(m)}:{width:hn(m),height:hn(m),borderColor:(d=l.value)==null?void 0:d.borderColor}},[r.icon?r.icon({checked:v,disabled:a.value}):s.value!=="dot"?Rt(py,{name:g?"minus":"success",style:l.value},null):Rt("div",{class:p("icon--dot__icon"),style:{backgroundColor:(h=l.value)==null?void 0:h.backgroundColor}},null)])},f=()=>{if(r.default)return Rt("span",{class:t.bem("label",[t.labelPosition,{disabled:a.value}])},[r.default()])};return()=>{const d=t.labelPosition==="left"?[f(),u()]:[u(),f()];return Rt("div",{role:t.role,class:t.bem([{disabled:a.value,"label-disabled":t.labelDisabled},o.value]),tabindex:a.value?void 0:0,"aria-checked":t.checked,onClick:c},[d])}}});const Rle=mh({},sD,{shape:String}),[Lle,Dle]=Oo("radio");var Ole=xt({name:Lle,props:Rle,emits:["update:modelValue"],setup(t,{emit:e,slots:r}){const{parent:n}=Nse(oD),i=()=>(n?n.props.modelValue:t.modelValue)===t.name,a=()=>{n?n.updateValue(t.name):e("update:modelValue",t.name)};return()=>Rt(_le,vl({bem:Dle,role:"radio",parent:n,checked:i(),onToggle:a},t),kse(r,["default","icon"]))}});const kle=Rs(Ole),A1=ka&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,zo={event:"event",observer:"observer"};function gc(t,e){if(!t.length)return;const r=t.indexOf(e);if(r>-1)return t.splice(r,1)}function E1(t,e){if(t.tagName!=="IMG"||!t.getAttribute("data-srcset"))return;let r=t.getAttribute("data-srcset");const i=t.parentNode.offsetWidth*e;let a,o,l;r=r.trim().split(",");const s=r.map(f=>(f=f.trim(),a=f.lastIndexOf(" "),a===-1?(o=f,l=999998):(o=f.substr(0,a),l=parseInt(f.substr(a+1,f.length-a-2),10)),[l,o]));s.sort((f,d)=>{if(f[0]<d[0])return 1;if(f[0]>d[0])return-1;if(f[0]===d[0]){if(d[1].indexOf(".webp",d[1].length-5)!==-1)return 1;if(f[1].indexOf(".webp",f[1].length-5)!==-1)return-1}return 0});let c="",u;for(let f=0;f<s.length;f++){u=s[f],c=u[1];const d=s[f+1];if(d&&d[0]<i){c=u[1];break}else if(!d){c=u[1];break}}return c}const Mle=(t=1)=>ka&&window.devicePixelRatio||t;function Fle(){if(!ka)return!1;let t=!0;try{const e=document.createElement("canvas");e.getContext&&e.getContext("2d")&&(t=e.toDataURL("image/webp").indexOf("data:image/webp")===0)}catch{t=!1}return t}function Ple(t,e){let r=null,n=0;return function(...i){if(r)return;const a=Date.now()-n,o=()=>{n=Date.now(),r=!1,t.apply(this,i)};a>=e?o():r=setTimeout(o,e)}}function Nle(t,e,r){t.addEventListener(e,r,{capture:!1,passive:!0})}function $le(t,e,r){t.removeEventListener(e,r,!1)}const Lm=(t,e,r)=>{const n=new Image;if(!t||!t.src)return r(new Error("image src is required"));n.src=t.src,t.cors&&(n.crossOrigin=t.cors),n.onload=()=>e({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src}),n.onerror=i=>r(i)};class Ble{constructor({max:e}){this.options={max:e||100},this.caches=[]}has(e){return this.caches.indexOf(e)>-1}add(e){this.has(e)||(this.caches.push(e),this.caches.length>this.options.max&&this.free())}free(){this.caches.shift()}}const[Ule,Ks]=Oo("image"),Hle={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:oi,height:oi,radius:oi,lazyLoad:Boolean,iconSize:oi,showError:bu,errorIcon:Ss("photo-fail"),iconPrefix:String,showLoading:bu,loadingIcon:Ss("photo")};var Vle=xt({name:Ule,props:Hle,emits:["load","error"],setup(t,{emit:e,slots:r}){const n=je(!1),i=je(!0),a=je(),{$Lazyload:o}=xn().proxy,l=_e(()=>{const g={width:hn(t.width),height:hn(t.height)};return wl(t.radius)&&(g.overflow="hidden",g.borderRadius=hn(t.radius)),g});st(()=>t.src,()=>{n.value=!1,i.value=!0});const s=g=>{i.value&&(i.value=!1,e("load",g))},c=()=>{const g=new Event("load");Object.defineProperty(g,"target",{value:a.value,enumerable:!0}),s(g)},u=g=>{n.value=!0,i.value=!1,e("error",g)},f=(g,m,b)=>b?b():Rt(py,{name:g,size:t.iconSize,class:m,classPrefix:t.iconPrefix},null),d=()=>{if(i.value&&t.showLoading)return Rt("div",{class:Ks("loading")},[f(t.loadingIcon,Ks("loading-icon"),r.loading)]);if(n.value&&t.showError)return Rt("div",{class:Ks("error")},[f(t.errorIcon,Ks("error-icon"),r.error)])},h=()=>{if(n.value||!t.src)return;const g={alt:t.alt,class:Ks("img"),style:{objectFit:t.fit,objectPosition:t.position}};return t.lazyLoad?qm(Rt("img",vl({ref:a},g),null),[[OO("lazy"),t.src]]):Rt("img",vl({ref:a,src:t.src,onLoad:s,onError:u},g),null)},p=({el:g})=>{const m=()=>{g===a.value&&i.value&&c()};a.value?m():Ie(m)},v=({el:g})=>{g===a.value&&!n.value&&u()};return o&&JL&&(o.$on("loaded",p),o.$on("error",v),Rl(()=>{o.$off("loaded",p),o.$off("error",v)})),Er(()=>{Ie(()=>{var g;(g=a.value)!=null&&g.complete&&!t.lazyLoad&&c()})}),()=>{var g;return Rt("div",{class:Ks({round:t.round,block:t.block}),style:l.value},[h(),d(),(g=r.default)==null?void 0:g.call(r)])}}});const jle=Rs(Vle),[Wle,Ys,Gle]=Oo("list"),zle={error:Boolean,offset:Fse(300),loading:Boolean,disabled:Boolean,finished:Boolean,scroller:Object,errorText:String,direction:Ss("down"),loadingText:String,finishedText:String,immediateCheck:bu};var Kle=xt({name:Wle,props:zle,emits:["load","update:error","update:loading"],setup(t,{emit:e,slots:r}){const n=je(t.loading),i=je(),a=je(),o=Tle(),l=zse(i),s=_e(()=>t.scroller||l.value),c=()=>{Ie(()=>{if(n.value||t.finished||t.disabled||t.error||(o==null?void 0:o.value)===!1)return;const{direction:p}=t,v=+t.offset,g=xu(s);if(!g.height||Xse(i))return;let m=!1;const b=xu(a);p==="up"?m=g.top-b.top<=v:m=b.bottom-g.bottom<=v,m&&(n.value=!0,e("update:loading",!0),e("load"))})},u=()=>{if(t.finished){const p=r.finished?r.finished():t.finishedText;if(p)return Rt("div",{class:Ys("finished-text")},[p])}},f=()=>{e("update:error",!1),c()},d=()=>{if(t.error){const p=r.error?r.error():t.errorText;if(p)return Rt("div",{role:"button",class:Ys("error-text"),tabindex:0,onClick:f},[p])}},h=()=>{if(n.value&&!t.finished&&!t.disabled)return Rt("div",{class:Ys("loading")},[r.loading?r.loading():Rt(iD,{class:Ys("loading-icon")},{default:()=>[t.loadingText||Gle("loading")]})])};return st(()=>[t.loading,t.finished,t.error],c),o&&st(o,p=>{p&&c()}),oS(()=>{n.value=t.loading}),Er(()=>{t.immediateCheck&&c()}),ole({check:c}),Vse("scroll",c,{target:s,passive:!0}),()=>{var p;const v=(p=r.default)==null?void 0:p.call(r),g=Rt("div",{ref:a,class:Ys("placeholder")},null);return Rt("div",{ref:i,role:"feed",class:Ys(),"aria-busy":n.value},[t.direction==="down"?v:g,h(),u(),d(),t.direction==="up"?v:g])}}});const Yle=Rs(Kle);class qle{constructor({el:e,src:r,error:n,loading:i,bindType:a,$parent:o,options:l,cors:s,elRenderer:c,imageCache:u}){this.el=e,this.src=r,this.error=n,this.loading=i,this.bindType=a,this.attempt=0,this.cors=s,this.naturalHeight=0,this.naturalWidth=0,this.options=l,this.$parent=o,this.elRenderer=c,this.imageCache=u,this.performanceData={loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(e){this.performanceData[e]=Date.now()}update({src:e,loading:r,error:n}){const i=this.src;this.src=e,this.loading=r,this.error=n,this.filter(),i!==this.src&&(this.attempt=0,this.initState())}checkInView(){const e=xu(this.el);return e.top<window.innerHeight*this.options.preLoad&&e.bottom>this.options.preLoadTop&&e.left<window.innerWidth*this.options.preLoad&&e.right>0}filter(){Object.keys(this.options.filter).forEach(e=>{this.options.filter[e](this,this.options)})}renderLoading(e){this.state.loading=!0,Lm({src:this.loading,cors:this.cors},()=>{this.render("loading",!1),this.state.loading=!1,e()},()=>{e(),this.state.loading=!1})}load(e=ZL){if(this.attempt>this.options.attempt-1&&this.state.error){e();return}if(!(this.state.rendered&&this.state.loaded)){if(this.imageCache.has(this.src))return this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,e();this.renderLoading(()=>{var r,n;this.attempt++,(n=(r=this.options.adapter).beforeLoad)==null||n.call(r,this,this.options),this.record("loadStart"),Lm({src:this.src,cors:this.cors},i=>{this.naturalHeight=i.naturalHeight,this.naturalWidth=i.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this.imageCache.add(this.src),e()},i=>{!this.options.silent&&console.error(i),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)})})}}render(e,r){this.elRenderer(this,e,r)}performance(){let e="loading",r=0;return this.state.loaded&&(e="loaded",r=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:r}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const T1="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Xle=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],Zle={rootMargin:"0px",threshold:0};function Jle(){return class{constructor({preLoad:e,error:r,throttleWait:n,preLoadTop:i,dispatchEvent:a,loading:o,attempt:l,silent:s=!0,scale:c,listenEvents:u,filter:f,adapter:d,observer:h,observerOptions:p}){this.mode=zo.event,this.listeners=[],this.targetIndex=0,this.targets=[],this.options={silent:s,dispatchEvent:!!a,throttleWait:n||200,preLoad:e||1.3,preLoadTop:i||0,error:r||T1,loading:o||T1,attempt:l||3,scale:c||Mle(c),ListenEvents:u||Xle,supportWebp:Fle(),filter:f||{},adapter:d||{},observer:!!h,observerOptions:p||Zle},this.initEvent(),this.imageCache=new Ble({max:200}),this.lazyLoadHandler=Ple(this.lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?zo.observer:zo.event)}config(e={}){Object.assign(this.options,e)}performance(){return this.listeners.map(e=>e.performance())}addLazyBox(e){this.listeners.push(e),ka&&(this.addListenerTarget(window),this.observer&&this.observer.observe(e.el),e.$el&&e.$el.parentNode&&this.addListenerTarget(e.$el.parentNode))}add(e,r,n){if(this.listeners.some(o=>o.el===e))return this.update(e,r),Ie(this.lazyLoadHandler);const i=this.valueFormatter(r.value);let{src:a}=i;Ie(()=>{a=E1(e,this.options.scale)||a,this.observer&&this.observer.observe(e);const o=Object.keys(r.modifiers)[0];let l;o&&(l=n.context.$refs[o],l=l?l.$el||l:document.getElementById(o)),l||(l=tD(e));const s=new qle({bindType:r.arg,$parent:l,el:e,src:a,loading:i.loading,error:i.error,cors:i.cors,elRenderer:this.elRenderer.bind(this),options:this.options,imageCache:this.imageCache});this.listeners.push(s),ka&&(this.addListenerTarget(window),this.addListenerTarget(l)),this.lazyLoadHandler(),Ie(()=>this.lazyLoadHandler())})}update(e,r,n){const i=this.valueFormatter(r.value);let{src:a}=i;a=E1(e,this.options.scale)||a;const o=this.listeners.find(l=>l.el===e);o?o.update({src:a,error:i.error,loading:i.loading}):this.add(e,r,n),this.observer&&(this.observer.unobserve(e),this.observer.observe(e)),this.lazyLoadHandler(),Ie(()=>this.lazyLoadHandler())}remove(e){if(!e)return;this.observer&&this.observer.unobserve(e);const r=this.listeners.find(n=>n.el===e);r&&(this.removeListenerTarget(r.$parent),this.removeListenerTarget(window),gc(this.listeners,r),r.$destroy())}removeComponent(e){e&&(gc(this.listeners,e),this.observer&&this.observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this.removeListenerTarget(e.$el.parentNode),this.removeListenerTarget(window))}setMode(e){!A1&&e===zo.observer&&(e=zo.event),this.mode=e,e===zo.event?(this.observer&&(this.listeners.forEach(r=>{this.observer.unobserve(r.el)}),this.observer=null),this.targets.forEach(r=>{this.initListen(r.el,!0)})):(this.targets.forEach(r=>{this.initListen(r.el,!1)}),this.initIntersectionObserver())}addListenerTarget(e){if(!e)return;let r=this.targets.find(n=>n.el===e);return r?r.childrenCount++:(r={el:e,id:++this.targetIndex,childrenCount:1,listened:!0},this.mode===zo.event&&this.initListen(r.el,!0),this.targets.push(r)),this.targetIndex}removeListenerTarget(e){this.targets.forEach((r,n)=>{r.el===e&&(r.childrenCount--,r.childrenCount||(this.initListen(r.el,!1),this.targets.splice(n,1),r=null))})}initListen(e,r){this.options.ListenEvents.forEach(n=>(r?Nle:$le)(e,n,this.lazyLoadHandler))}initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(e,r)=>{this.Event.listeners[e]||(this.Event.listeners[e]=[]),this.Event.listeners[e].push(r)},this.$once=(e,r)=>{const n=(...i)=>{this.$off(e,n),r.apply(this,i)};this.$on(e,n)},this.$off=(e,r)=>{if(!r){if(!this.Event.listeners[e])return;this.Event.listeners[e].length=0;return}gc(this.Event.listeners[e],r)},this.$emit=(e,r,n)=>{this.Event.listeners[e]&&this.Event.listeners[e].forEach(i=>i(r,n))}}lazyLoadHandler(){const e=[];this.listeners.forEach(r=>{(!r.el||!r.el.parentNode)&&e.push(r),r.checkInView()&&r.load()}),e.forEach(r=>{gc(this.listeners,r),r.$destroy()})}initIntersectionObserver(){A1&&(this.observer=new IntersectionObserver(this.observerHandler.bind(this),this.options.observerOptions),this.listeners.length&&this.listeners.forEach(e=>{this.observer.observe(e.el)}))}observerHandler(e){e.forEach(r=>{r.isIntersecting&&this.listeners.forEach(n=>{if(n.el===r.target){if(n.state.loaded)return this.observer.unobserve(n.el);n.load()}})})}elRenderer(e,r,n){if(!e.el)return;const{el:i,bindType:a}=e;let o;switch(r){case"loading":o=e.loading;break;case"error":o=e.error;break;default:({src:o}=e);break}if(a?i.style[a]='url("'+o+'")':i.getAttribute("src")!==o&&i.setAttribute("src",o),i.setAttribute("lazy",r),this.$emit(r,e,n),this.options.adapter[r]&&this.options.adapter[r](e,this.options),this.options.dispatchEvent){const l=new CustomEvent(r,{detail:e});i.dispatchEvent(l)}}valueFormatter(e){let r=e,{loading:n,error:i}=this.options;return gh(e)&&({src:r}=e,n=e.loading||this.options.loading,i=e.error||this.options.error),{src:r,loading:n,error:i}}}}var Qle=t=>({props:{tag:{type:String,default:"div"}},emits:["show"],render(){return D(this.tag,this.show&&this.$slots.default?this.$slots.default():null)},data(){return{el:null,state:{loaded:!1},show:!1}},mounted(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeUnmount(){t.removeComponent(this)},methods:{checkInView(){const e=xu(this.$el);return ka&&e.top<window.innerHeight*t.options.preLoad&&e.bottom>0&&e.left<window.innerWidth*t.options.preLoad&&e.right>0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});const ece={selector:"img"};class tce{constructor({el:e,binding:r,vnode:n,lazy:i}){this.el=null,this.vnode=n,this.binding=r,this.options={},this.lazy=i,this.queue=[],this.update({el:e,binding:r})}update({el:e,binding:r}){this.el=e,this.options=Object.assign({},ece,r.value),this.getImgs().forEach(i=>{this.lazy.add(i,Object.assign({},this.binding,{value:{src:"dataset"in i?i.dataset.src:i.getAttribute("data-src"),error:("dataset"in i?i.dataset.error:i.getAttribute("data-error"))||this.options.error,loading:("dataset"in i?i.dataset.loading:i.getAttribute("data-loading"))||this.options.loading}}),this.vnode)})}getImgs(){return Array.from(this.el.querySelectorAll(this.options.selector))}clear(){this.getImgs().forEach(r=>this.lazy.remove(r)),this.vnode=null,this.binding=null,this.lazy=null}}class rce{constructor({lazy:e}){this.lazy=e,this.queue=[]}bind(e,r,n){const i=new tce({el:e,binding:r,vnode:n,lazy:this.lazy});this.queue.push(i)}update(e,r,n){const i=this.queue.find(a=>a.el===e);i&&i.update({el:e,binding:r,vnode:n})}unbind(e){const r=this.queue.find(n=>n.el===e);r&&(r.clear(),gc(this.queue,r))}}var nce=t=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(){var e,r;return D(this.tag,{src:this.renderSrc},(r=(e=this.$slots).default)==null?void 0:r.call(e))},data(){return{el:null,options:{src:"",error:"",loading:"",attempt:t.options.attempt},state:{loaded:!1,error:!1,attempt:0},renderSrc:""}},watch:{src(){this.init(),t.addLazyBox(this),t.lazyLoadHandler()}},created(){this.init()},mounted(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeUnmount(){t.removeComponent(this)},methods:{init(){const{src:e,loading:r,error:n}=t.valueFormatter(this.src);this.state.loaded=!1,this.options.src=e,this.options.error=n,this.options.loading=r,this.renderSrc=this.options.loading},checkInView(){const e=xu(this.$el);return e.top<window.innerHeight*t.options.preLoad&&e.bottom>0&&e.left<window.innerWidth*t.options.preLoad&&e.right>0},load(e=ZL){if(this.state.attempt>this.options.attempt-1&&this.state.error){e();return}const{src:r}=this.options;Lm({src:r},({src:n})=>{this.renderSrc=n,this.state.loaded=!0},()=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0})}}});const ice={install(t,e={}){const r=Jle(),n=new r(e),i=new rce({lazy:n});t.config.globalProperties.$Lazyload=n,e.lazyComponent&&t.component("LazyComponent",Qle(n)),e.lazyImage&&t.component("LazyImage",nce(n)),t.directive("lazy",{beforeMount:n.add.bind(n),updated:n.update.bind(n),unmounted:n.remove.bind(n)}),t.directive("lazy-container",{beforeMount:i.bind.bind(i),updated:i.update.bind(i),unmounted:i.unbind.bind(i)})}};if(typeof window<"u"){let t=function(){var e=document.body,r=document.getElementById("__svg__icons__dom__");r||(r=document.createElementNS("http://www.w3.org/2000/svg","svg"),r.style.position="absolute",r.style.width="0",r.style.height="0",r.id="__svg__icons__dom__",r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),r.innerHTML='<symbol viewBox="0 0 48 48" fill="none"  id="icon-download"><path d="M6 24.008V42h36V24" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m33 23-9 9-9-9M23.992 6v26" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol   viewBox="0 0 89 88" id="icon-file-type-directory"><defs><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="icon-file-type-directory_b"><stop stop-color="#FFB598" offset="0%" /><stop stop-color="#FF8757" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-directory_c"><stop stop-color="#FFF" offset="0%" /><stop stop-color="#FFF" stop-opacity=".25" offset="100%" /></linearGradient><path d="M24 16h11.234c4.33 0 8.177 2.762 9.562 6.864a10.093 10.093 0 0 0 9.563 6.864H64c6.627 0 12 5.373 12 12V60c0 6.627-5.373 12-12 12H24c-6.627 0-12-5.373-12-12V28c0-6.627 5.373-12 12-12Z" id="icon-file-type-directory_a" /></defs><g transform="translate(.5)" fill="none" fill-rule="evenodd"><path d="M28 18h34c6.627 0 12 5.373 12 12v12c0 6.627-5.373 12-12 12H28c-6.627 0-12-5.373-12-12V30c0-6.627 5.373-12 12-12Z" fill="#FB804F" opacity=".3" /><mask id="icon-file-type-directory_d" fill="#fff"><use xlink:href="#icon-file-type-directory_a" /></mask><use fill="url(#icon-file-type-directory_b)" xlink:href="#icon-file-type-directory_a" /><rect fill="url(#icon-file-type-directory_c)" mask="url(#icon-file-type-directory_d)" x="22" y="57" width="16" height="5" rx="2.5" /><path mask="url(#icon-file-type-directory_d)" d="M0 0h88v88H0z" /></g></symbol><symbol  viewBox="0 0 88 88" id="icon-file-type-folder-expired"><defs><linearGradient x1="24.359%" y1="9.209%" x2="21.793%" y2="90.791%" id="icon-file-type-folder-expired_a"><stop stop-color="#C9C0BD" offset="0%" /><stop stop-color="#AA9A95" offset="100%" /></linearGradient><linearGradient x1="24.359%" y1="8.936%" x2="21.793%" y2="91.064%" id="icon-file-type-folder-expired_b"><stop stop-color="#C9C0BD" offset="0%" /><stop stop-color="#AA9A95" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-folder-expired_c"><stop stop-color="#F8F7F7" offset="0%" /><stop stop-color="#C3B9B4" offset="100%" /></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M0 0h88v88H0z" /><g transform="translate(12 14.608)"><path d="M12 2h38c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12H12C5.373 58 0 52.627 0 46V14C0 7.373 5.373 2 12 2Z" fill="url(#icon-file-type-folder-expired_a)" opacity=".302" /><path d="M12 0h11.325a8 8 0 0 1 6.098 2.823l6.794 8.002A9 9 0 0 0 43.077 14H52c6.627 0 12 5.373 12 12v20c0 6.627-5.373 12-12 12H12C5.373 58 0 52.627 0 46V12C0 5.373 5.373 0 12 0Z" fill="url(#icon-file-type-folder-expired_b)" /><rect fill="url(#icon-file-type-folder-expired_c)" x="9" y="43" width="17" height="5" rx="2.5" /><path fill="#FFF" d="m29.792 0-8.898 20.109 10.903 6.182-8.617 10.445 8.07 6.758-4.294 19.29 12.66-19.29-7.819-6.758L41.86 26.29l-10.062-7.187L41.86 0z" /></g></g></symbol><symbol   viewBox="0 0 89 88" id="icon-file-type-folder"><defs><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="icon-file-type-folder_b"><stop stop-color="#FFB598" offset="0%" /><stop stop-color="#FF8757" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-folder_c"><stop stop-color="#FFF" offset="0%" /><stop stop-color="#FFF" stop-opacity=".25" offset="100%" /></linearGradient><path d="M24 16h11.234c4.33 0 8.177 2.762 9.562 6.864a10.093 10.093 0 0 0 9.563 6.864H64c6.627 0 12 5.373 12 12V60c0 6.627-5.373 12-12 12H24c-6.627 0-12-5.373-12-12V28c0-6.627 5.373-12 12-12Z" id="icon-file-type-folder_a" /></defs><g transform="translate(.5)" fill="none" fill-rule="evenodd"><path d="M28 18h34c6.627 0 12 5.373 12 12v12c0 6.627-5.373 12-12 12H28c-6.627 0-12-5.373-12-12V30c0-6.627 5.373-12 12-12Z" fill="#FB804F" opacity=".3" /><mask id="icon-file-type-folder_d" fill="#fff"><use xlink:href="#icon-file-type-folder_a" /></mask><use fill="url(#icon-file-type-folder_b)" xlink:href="#icon-file-type-folder_a" /><rect fill="url(#icon-file-type-folder_c)" mask="url(#icon-file-type-folder_d)" x="22" y="57" width="16" height="5" rx="2.5" /><path mask="url(#icon-file-type-folder_d)" d="M0 0h88v88H0z" /></g></symbol><symbol  viewBox="0 0 88 88" id="icon-file-type-image-expired"><defs><linearGradient x1="96.377%" y1="8.976%" x2="5.437%" y2="8.976%" id="icon-file-type-image-expired_a"><stop stop-color="#CCD0D6" offset="0%" /><stop stop-color="#939CA6" offset="100%" /></linearGradient><linearGradient x1="5.353%" y1="22.455%" x2="94.023%" y2="81.75%" id="icon-file-type-image-expired_b"><stop stop-color="#C4C9CF" offset="0%" /><stop stop-color="#939CA6" offset="100%" /></linearGradient><linearGradient x1="50%" y1="19.441%" x2="50%" y2="100%" id="icon-file-type-image-expired_c"><stop stop-color="#BFC5CC" offset="0%" /><stop stop-color="#F4F4F5" offset="100%" /></linearGradient><linearGradient x1="50%" y1="100%" x2="50%" y2="19.441%" id="icon-file-type-image-expired_d"><stop stop-color="#9FA6AF" offset="0%" /><stop stop-color="#E7E7EB" offset="100%" /></linearGradient><linearGradient x1="50%" y1="100%" x2="50%" y2="19.441%" id="icon-file-type-image-expired_e"><stop stop-color="#9FA6AF" offset="0%" /><stop stop-color="#E7E7EB" offset="100%" /></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M0 0h88v88H0z" /><g transform="translate(13 13.608)"><path d="M15 1.392h34a7 7 0 0 1 7 7v31c0 6.628-5.373 12-12 12H20c-6.627 0-12-5.372-12-12v-31a7 7 0 0 1 7-7Z" fill="url(#icon-file-type-image-expired_a)" /><path d="M12 8.392h40c6.627 0 12 5.373 12 12v27c0 6.628-5.373 12-12 12H12c-6.627 0-12-5.372-12-12v-27c0-6.627 5.373-12 12-12Z" fill="url(#icon-file-type-image-expired_b)" /><path d="M20.915 28.248 10.03 45.234a4 4 0 0 0 3.368 6.158H35.17a4 4 0 0 0 3.367-6.158L27.651 28.248a4 4 0 0 0-6.736 0Z" fill="url(#icon-file-type-image-expired_c)" /><path d="m38.957 38.17-5.514 8.604a3 3 0 0 0 2.526 4.618h11.028a3 3 0 0 0 2.526-4.618l-5.514-8.604a3 3 0 0 0-5.052 0Z" fill="url(#icon-file-type-image-expired_d)" /><path fill="#FFF" d="m30.415 0-8.898 20.109 10.904 6.182-8.618 10.445 8.07 6.758-4.293 19.29 12.66-19.29-7.82-6.758L42.484 26.29 32.42 19.104 42.483 0z" /><circle fill="url(#icon-file-type-image-expired_e)" cx="48.462" cy="20.072" r="4" /></g></g></symbol><symbol  viewBox="0 0 44 44" id="icon-file-type-image"><defs><linearGradient x1="0%" y1="12.193%" x2="89.946%" y2="61.376%" id="icon-file-type-image_a"><stop stop-color="#61A6FF" offset="0%" /><stop stop-color="#D6E8FF" offset="100%" /></linearGradient><linearGradient x1="0%" y1="16.992%" x2="100%" y2="83.008%" id="icon-file-type-image_b"><stop stop-color="#B2D4FF" offset="0%" /><stop stop-color="#57A0FF" offset="100%" /></linearGradient><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="icon-file-type-image_c"><stop stop-color="#FFF" offset="0%" /><stop stop-color="#FFF" stop-opacity="0" offset="100%" /></linearGradient><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="icon-file-type-image_d"><stop stop-color="#FFF" stop-opacity="0" offset="0%" /><stop stop-color="#FFF" offset="100%" /></linearGradient><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="icon-file-type-image_e"><stop stop-color="#FFF" offset="0%" /><stop stop-color="#FFF" stop-opacity="0" offset="100%" /></linearGradient></defs><g fill="none" fill-rule="evenodd"><path opacity=".111" d="M0 0h44v44H0z" /><path d="M14 7h15a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H14a4 4 0 0 1-4-4V11a4 4 0 0 1 4-4Z" fill="url(#icon-file-type-image_a)" /><path d="M12 10h20a6 6 0 0 1 6 6v14a6 6 0 0 1-6 6H12a6 6 0 0 1-6-6V16a6 6 0 0 1 6-6Z" fill="url(#icon-file-type-image_b)" /><circle fill="url(#icon-file-type-image_c)" cx="30" cy="16" r="2" /><path d="m20.236 21.539 4.554 7.969a2 2 0 0 1-1.736 2.992h-9.108a2 2 0 0 1-1.736-2.992l4.554-7.97a2 2 0 0 1 3.472 0Z" fill="url(#icon-file-type-image_d)" /><path d="m29.752 25.686 2.118 3.85a2 2 0 0 1-1.753 2.964h-4.234a2 2 0 0 1-1.753-2.964l2.118-3.85a2 2 0 0 1 3.504 0Z" fill="url(#icon-file-type-image_e)" /><path d="M0 0h44v44H0z" /></g></symbol><symbol  viewBox="0 0 88 88" id="icon-file-type-video-expired"><defs><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-video-expired_a"><stop stop-color="#C7C3CB" offset="0%" /><stop stop-color="#918C9A" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-video-expired_b"><stop stop-color="#C7C3CB" offset="0%" /><stop stop-color="#918C9A" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-video-expired_c"><stop stop-color="#ECEBED" offset="0%" /><stop stop-color="#D4D2D7" offset="100%" /></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M0 0h88v88H0z" /><g transform="translate(11.169 14.608)"><rect fill="url(#icon-file-type-video-expired_a)" y=".618" width="51" height="58" rx="12" /><path d="M28.87 29.618 56.295 8.215a5 5 0 0 1 8.077 3.941v34.925a5 5 0 0 1-8.077 3.941L28.871 29.618Z" fill="url(#icon-file-type-video-expired_b)" /><rect fill="url(#icon-file-type-video-expired_c)" x="7" y="43.618" width="17" height="5" rx="2.5" /><path fill="#FFF" d="m31.623 0-8.898 17.367 10.904 4.975-8.618 10.61 8.865 7.336-5.088 22.497L42.24 40.288l-8.612-7.335 10.062-10.61-10.062-5.98L43.69 0z" /></g></g></symbol><symbol  viewBox="0 0 88 88" id="icon-file-type-video"><defs><linearGradient x1="12.842%" y1="0%" x2="87.158%" y2="100%" id="icon-file-type-video_a"><stop stop-color="#DED0FF" offset="0%" /><stop stop-color="#A37AFF" offset="100%" /></linearGradient><linearGradient x1="100%" y1="50%" x2="12.16%" y2="50%" id="icon-file-type-video_b"><stop stop-color="#A881FF" offset="0%" /><stop stop-color="#D6C4FF" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-file-type-video_c"><stop stop-color="#FFF" stop-opacity=".5" offset="0%" /><stop stop-color="#FFF" offset="100%" /></linearGradient></defs><g fill="none" fill-rule="evenodd"><path opacity=".103" d="M0 0h88v88H0z" /><path d="M12 0h26c6.627 0 12 5.373 12 12v34c0 6.627-5.373 12-12 12H12C5.373 58 0 52.627 0 46V12C0 5.373 5.373 0 12 0Z" fill="url(#icon-file-type-video_a)" transform="translate(12 15)" /><path d="M34.091 24.241 54.318 8.523A6 6 0 0 1 64 13.261v31.464a6 6 0 0 1-9.686 4.735L34.087 33.713a6 6 0 0 1 .004-9.472Z" fill="url(#icon-file-type-video_b)" transform="translate(12 15)" /><path d="M22.5 58h11a2.5 2.5 0 1 1 0 5h-11a2.5 2.5 0 1 1 0-5Z" fill="url(#icon-file-type-video_c)" opacity=".86" transform="rotate(-180 28 60.5)" /><path d="M0 0h88v88H0z" /></g></symbol><symbol   viewBox="0 0 89 88" id="icon-floder"><defs><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="icon-floder_b"><stop stop-color="#FFB598" offset="0%" /><stop stop-color="#FF8757" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-floder_c"><stop stop-color="#FFF" offset="0%" /><stop stop-color="#FFF" stop-opacity=".25" offset="100%" /></linearGradient><path d="M24 16h11.234c4.33 0 8.177 2.762 9.562 6.864a10.093 10.093 0 0 0 9.563 6.864H64c6.627 0 12 5.373 12 12V60c0 6.627-5.373 12-12 12H24c-6.627 0-12-5.373-12-12V28c0-6.627 5.373-12 12-12Z" id="icon-floder_a" /></defs><g transform="translate(.5)" fill="none" fill-rule="evenodd"><path d="M28 18h34c6.627 0 12 5.373 12 12v12c0 6.627-5.373 12-12 12H28c-6.627 0-12-5.373-12-12V30c0-6.627 5.373-12 12-12Z" fill="#FB804F" opacity=".3" /><mask id="icon-floder_d" fill="#fff"><use xlink:href="#icon-floder_a" /></mask><use fill="url(#icon-floder_b)" xlink:href="#icon-floder_a" /><rect fill="url(#icon-floder_c)" mask="url(#icon-floder_d)" x="22" y="57" width="16" height="5" rx="2.5" /><path mask="url(#icon-floder_d)" d="M0 0h88v88H0z" /></g></symbol><symbol class="icon" viewBox="0 0 1024 1024"  id="icon-h5_play"><path d="M870.2 466.333 251.533 93.053a53.333 53.333 0 0 0-80.866 45.667v746.56a53.207 53.207 0 0 0 80.886 45.667l618.667-373.28a53.333 53.333 0 0 0 0-91.334z" /></symbol><symbol  viewBox="0 0 88 88" id="icon-video"><defs><linearGradient x1="12.842%" y1="0%" x2="87.158%" y2="100%" id="icon-video_a"><stop stop-color="#DED0FF" offset="0%" /><stop stop-color="#A37AFF" offset="100%" /></linearGradient><linearGradient x1="100%" y1="50%" x2="12.16%" y2="50%" id="icon-video_b"><stop stop-color="#A881FF" offset="0%" /><stop stop-color="#D6C4FF" offset="100%" /></linearGradient><linearGradient x1="0%" y1="50%" x2="100%" y2="50%" id="icon-video_c"><stop stop-color="#FFF" stop-opacity=".5" offset="0%" /><stop stop-color="#FFF" offset="100%" /></linearGradient></defs><g fill="none" fill-rule="evenodd"><path opacity=".103" d="M0 0h88v88H0z" /><path d="M12 0h26c6.627 0 12 5.373 12 12v34c0 6.627-5.373 12-12 12H12C5.373 58 0 52.627 0 46V12C0 5.373 5.373 0 12 0Z" fill="url(#icon-video_a)" transform="translate(12 15)" /><path d="M34.091 24.241 54.318 8.523A6 6 0 0 1 64 13.261v31.464a6 6 0 0 1-9.686 4.735L34.087 33.713a6 6 0 0 1 .004-9.472Z" fill="url(#icon-video_b)" transform="translate(12 15)" /><path d="M22.5 58h11a2.5 2.5 0 1 1 0 5h-11a2.5 2.5 0 1 1 0-5Z" fill="url(#icon-video_c)" opacity=".86" transform="rotate(-180 28 60.5)" /><path d="M0 0h88v88H0z" /></g></symbol>',e.insertBefore(r,e.lastChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}function ace(){const t=IS(Vk),e=Rse();PF(t),Dse(t),t.use(e),t.use(Yle),t.use(kle),t.use(py),t.use(iD),t.use(jle),t.use(Ile),t.use(nz),t.use(ice,{lazyComponent:!0}),t.mount("#app")}ace();export{To as $,L0 as A,Df as B,lce as C,Xt as D,ho as E,yc as F,qm as G,lr as H,bi as I,Au as J,wS as K,wr as L,Rt as M,Hn as N,nq as O,xK as P,Ie as Q,Jt as R,oS as S,Pd as T,Qm as U,DO as V,$t as W,fr as X,g_ as Y,xi as Z,D0 as _,C0 as a,il as a$,Eu as a0,Ei as a1,rl as a2,tq as a3,vl as a4,AZ as a5,fZ as a6,It as a7,Ll as a8,xce as a9,Rce as aA,Fce as aB,TD as aC,f_ as aD,$ce as aE,Nce as aF,kce as aG,Mce as aH,TE as aI,vce as aJ,bce as aK,tk as aL,Hce as aM,Oce as aN,Bk as aO,gce as aP,Dce as aQ,fg as aR,O1 as aS,wD as aT,sce as aU,fce as aV,Kce as aW,zce as aX,cce as aY,uce as aZ,Yce as a_,Hm as aa,Xm as ab,R1 as ac,dZ as ad,lZ as ae,vr as af,IE as ag,S_ as ah,pce as ai,jce as aj,uX as ak,Vce as al,Pk as am,Ice as an,_ce as ao,dce as ap,Rr as aq,eq as ar,nr as as,oce as at,ek as au,Cce as av,yZ as aw,hce as ax,hZ as ay,G1 as az,s_ as b,Qce as b0,Gce as b1,Jce as b2,Fr as b3,oO as b4,Ece as b5,wce as b6,Tce as b7,Sce as b8,Uce as b9,JL as bA,gh as bB,yce as bC,XZ as bD,Wce as bE,Zce as bF,mce as bG,Pce as ba,Lce as bb,Nq as bc,D as bd,Bce as be,em as bf,vK as bg,eue as bh,ZL as bi,oi as bj,bu as bk,_m as bl,Hse as bm,tD as bn,tue as bo,Oo as bp,Vse as bq,mh as br,rue as bs,wl as bt,Rs as bu,Ss as bv,ole as bw,Od as bx,py as by,IS as bz,m_ as c,sd as d,_e as e,kt as f,xn as g,Ace as h,Pl as i,je as j,Rl as k,QY as l,aS as m,xZ as n,Er as o,R0 as p,hu as q,w0 as r,z1 as s,T0 as t,Et as u,sr as v,st as w,ys as x,xt as y,ct as z};