VANA/VANA-php/public/build/assets/app-DrolTuzr.js

308 lines
1.8 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

function g5(r,e){return function(){return r.apply(e,arguments)}}const{toString:QY}=Object.prototype,{getPrototypeOf:hC}=Object,v_=(r=>e=>{const t=QY.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ba=r=>(r=r.toLowerCase(),e=>v_(e)===r),g_=r=>e=>typeof e===r,{isArray:mf}=Array,Hp=g_("undefined");function JY(r){return r!==null&&!Hp(r)&&r.constructor!==null&&!Hp(r.constructor)&&dn(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const m5=ba("ArrayBuffer");function eK(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&m5(r.buffer),e}const tK=g_("string"),dn=g_("function"),y5=g_("number"),m_=r=>r!==null&&typeof r=="object",rK=r=>r===!0||r===!1,ry=r=>{if(v_(r)!=="object")return!1;const e=hC(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},iK=ba("Date"),nK=ba("File"),aK=ba("Blob"),sK=ba("FileList"),oK=r=>m_(r)&&dn(r.pipe),lK=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||dn(r.append)&&((e=v_(r))==="formdata"||e==="object"&&dn(r.toString)&&r.toString()==="[object FormData]"))},uK=ba("URLSearchParams"),[cK,hK,fK,dK]=["ReadableStream","Request","Response","Headers"].map(ba),pK=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ov(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let i,n;if(typeof r!="object"&&(r=[r]),mf(r))for(i=0,n=r.length;i<n;i++)e.call(null,r[i],i,r);else{const a=t?Object.getOwnPropertyNames(r):Object.keys(r),s=a.length;let o;for(i=0;i<s;i++)o=a[i],e.call(null,r[o],o,r)}}function _5(r,e){e=e.toLowerCase();const t=Object.keys(r);let i=t.length,n;for(;i-- >0;)if(n=t[i],e===n.toLowerCase())return n;return null}const fu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,b5=r=>!Hp(r)&&r!==fu;function mx(){const{caseless:r}=b5(this)&&this||{},e={},t=(i,n)=>{const a=r&&_5(e,n)||n;ry(e[a])&&ry(i)?e[a]=mx(e[a],i):ry(i)?e[a]=mx({},i):mf(i)?e[a]=i.slice():e[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Ov(arguments[i],t);return e}const vK=(r,e,t,{allOwnKeys:i}={})=>(Ov(e,(n,a)=>{t&&dn(n)?r[a]=g5(n,t):r[a]=n},{allOwnKeys:i}),r),gK=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),mK=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},yK=(r,e,t,i)=>{let n,a,s;const o={};if(e=e||{},r==null)return e;do{for(n=Object.getOwnPropertyNames(r),a=n.length;a-- >0;)s=n[a],(!i||i(s,r,e))&&!o[s]&&(e[s]=r[s],o[s]=!0);r=t!==!1&&hC(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},_K=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const i=r.indexOf(e,t);return i!==-1&&i===t},bK=r=>{if(!r)return null;if(mf(r))return r;let e=r.length;if(!y5(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},TK=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&hC(Uint8Array)),SK=(r,e)=>{const i=(r&&r[Symbol.iterator]).call(r);let n;for(;(n=i.next())&&!n.done;){const a=n.value;e.call(r,a[0],a[1])}},xK=(r,e)=>{let t;const i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},wK=ba("HTMLFormElement"),CK=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,n){return i.toUpperCase()+n}),BI=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),AK=ba("RegExp"),T5=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),i={};Ov(t,(n,a)=>{let s;(s=e(n,a,r))!==!1&&(i[a]=s||n)}),Object.defineProperties(r,i)},DK=r=>{T5(r,(e,t)=>{if(dn(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=r[t];if(dn(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},EK=(r,e)=>{const t={},i=n=>{n.forEach(a=>{t[a]=!0})};return mf(r)?i(r):i(String(r).split(e)),t},IK=()=>{},PK=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,rb="abcdefghijklmnopqrstuvwxyz",FI="0123456789",S5={DIGIT:FI,ALPHA:rb,ALPHA_DIGIT:rb+rb.toUpperCase()+FI},MK=(r=16,e=S5.ALPHA_DIGIT)=>{let t="";const{length:i}=e;for(;r--;)t+=e[Math.random()*i|0];return t};function LK(r){return!!(r&&dn(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const kK=r=>{const e=new Array(10),t=(i,n)=>{if(m_(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[n]=i;const a=mf(i)?[]:{};return Ov(i,(s,o)=>{const l=t(s,n+1);!Hp(l)&&(a[o]=l)}),e[n]=void 0,a}}return i};return t(r,0)},RK=ba("AsyncFunction"),OK=r=>r&&(m_(r)||dn(r))&&dn(r.then)&&dn(r.catch),x5=((r,e)=>r?setImmediate:e?((t,i)=>(fu.addEventListener("message",({source:n,data:a})=>{n===fu&&a===t&&i.length&&i.shift()()},!1),n=>{i.push(n),fu.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",dn(fu.postMessage)),NK=typeof queueMicrotask<"u"?queueMicrotask.bind(fu):typeof process<"u"&&process.nextTick||x5,ne={isArray:mf,isArrayBuffer:m5,isBuffer:JY,isFormData:lK,isArrayBufferView:eK,isString:tK,isNumber:y5,isBoolean:rK,isObject:m_,isPlainObject:ry,isReadableStream:cK,isRequest:hK,isResponse:fK,isHeaders:dK,isUndefined:Hp,isDate:iK,isFile:nK,isBlob:aK,isRegExp:AK,isFunction:dn,isStream:oK,isURLSearchParams:uK,isTypedArray:TK,isFileList:sK,forEach:Ov,merge:mx,extend:vK,trim:pK,stripBOM:gK,inherits:mK,toFlatObject:yK,kindOf:v_,kindOfTest:ba,endsWith:_K,toArray:bK,forEachEntry:SK,matchAll:xK,isHTMLForm:wK,hasOwnProperty:BI,hasOwnProp:BI,reduceDescriptors:T5,freezeMethods:DK,toObjectSet:EK,toCamelCase:CK,noop:IK,toFiniteNumber:PK,findKey:_5,global:fu,isContextDefined:b5,ALPHABET:S5,generateString:MK,isSpecCompliantForm:LK,toJSONObject:kK,isAsyncFn:RK,isThenable:OK,setImmediate:x5,asap:NK};function at(r,e,t,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}ne.inherits(at,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:ne.toJSONObject(this.config),code:this.code,status:this.status}}});const w5=at.prototype,C5={};["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(r=>{C5[r]={value:r}});Object.defineProperties(at,C5);Object.defineProperty(w5,"isAxiosError",{value:!0});at.from=(r,e,t,i,n,a)=>{const s=Object.create(w5);return ne.toFlatObject(r,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),at.call(s,r.message,e,t,i,n),s.cause=r,s.name=r.name,a&&Object.assign(s,a),s};const BK=null;function yx(r){return ne.isPlainObject(r)||ne.isArray(r)}function A5(r){return ne.endsWith(r,"[]")?r.slice(0,-2):r}function UI(r,e,t){return r?r.concat(e).map(function(n,a){return n=A5(n),!t&&a?"["+n+"]":n}).join(t?".":""):e}function FK(r){return ne.isArray(r)&&!r.some(yx)}const UK=ne.toFlatObject(ne,{},null,function(e){return/^is[A-Z]/.test(e)});function y_(r,e,t){if(!ne.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=ne.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!ne.isUndefined(g[v])});const i=t.metaTokens,n=t.visitor||c,a=t.dots,s=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&ne.isSpecCompliantForm(e);if(!ne.isFunction(n))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(ne.isDate(p))return p.toISOString();if(!l&&ne.isBlob(p))throw new at("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(p)||ne.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,g){let m=p;if(p&&!g&&typeof p=="object"){if(ne.endsWith(v,"{}"))v=i?v:v.slice(0,-2),p=JSON.stringify(p);else if(ne.isArray(p)&&FK(p)||(ne.isFileList(p)||ne.endsWith(v,"[]"))&&(m=ne.toArray(p)))return v=A5(v),m.forEach(function(_,b){!(ne.isUndefined(_)||_===null)&&e.append(s===!0?UI([v],b,a):s===null?v:v+"[]",u(_))}),!1}return yx(p)?!0:(e.append(UI(g,v,a),u(p)),!1)}const h=[],d=Object.assign(UK,{defaultVisitor:c,convertValue:u,isVisitable:yx});function f(p,v){if(!ne.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(p),ne.forEach(p,function(m,y){(!(ne.isUndefined(m)||m===null)&&n.call(e,m,ne.isString(y)?y.trim():y,v,d))===!0&&f(m,v?v.concat(y):[y])}),h.pop()}}if(!ne.isObject(r))throw new TypeError("data must be an object");return f(r),e}function VI(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function fC(r,e){this._pairs=[],r&&y_(r,this,e)}const D5=fC.prototype;D5.append=function(e,t){this._pairs.push([e,t])};D5.toString=function(e){const t=e?function(i){return e.call(this,i,VI)}:VI;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function VK(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function E5(r,e,t){if(!e)return r;const i=t&&t.encode||VK,n=t&&t.serialize;let a;if(n?a=n(e,t):a=ne.isURLSearchParams(e)?e.toString():new fC(e,t).toString(i),a){const s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class zI{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ne.forEach(this.handlers,function(i){i!==null&&e(i)})}}const I5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zK=typeof URLSearchParams<"u"?URLSearchParams:fC,GK=typeof FormData<"u"?FormData:null,HK=typeof Blob<"u"?Blob:null,$K={isBrowser:!0,classes:{URLSearchParams:zK,FormData:GK,Blob:HK},protocols:["http","https","file","blob","url","data"]},dC=typeof window<"u"&&typeof document<"u",_x=typeof navigator=="object"&&navigator||void 0,WK=dC&&(!_x||["ReactNative","NativeScript","NS"].indexOf(_x.product)<0),qK=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jK=dC&&window.location.href||"http://localhost",XK=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dC,hasStandardBrowserEnv:WK,hasStandardBrowserWebWorkerEnv:qK,navigator:_x,origin:jK},Symbol.toStringTag,{value:"Module"})),Gi={...XK,...$K};function YK(r,e){return y_(r,new Gi.classes.URLSearchParams,Object.assign({visitor:function(t,i,n,a){return Gi.isNode&&ne.isBuffer(t)?(this.append(i,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function KK(r){return ne.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ZK(r){const e={},t=Object.keys(r);let i;const n=t.length;let a;for(i=0;i<n;i++)a=t[i],e[a]=r[a];return e}function P5(r){function e(t,i,n,a){let s=t[a++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=a>=t.length;return s=!s&&ne.isArray(n)?n.length:s,l?(ne.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!o):((!n[s]||!ne.isObject(n[s]))&&(n[s]=[]),e(t,i,n[s],a)&&ne.isArray(n[s])&&(n[s]=ZK(n[s])),!o)}if(ne.isFormData(r)&&ne.isFunction(r.entries)){const t={};return ne.forEachEntry(r,(i,n)=>{e(KK(i),n,t,0)}),t}return null}function QK(r,e,t){if(ne.isString(r))try{return(e||JSON.parse)(r),ne.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(0,JSON.stringify)(r)}const Nv={transitional:I5,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,a=ne.isObject(e);if(a&&ne.isHTMLForm(e)&&(e=new FormData(e)),ne.isFormData(e))return n?JSON.stringify(P5(e)):e;if(ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e)||ne.isReadableStream(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return YK(e,this.formSerializer).toString();if((o=ne.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return y_(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||n?(t.setContentType("application/json",!1),QK(e)):e}],transformResponse:[function(e){const t=this.transitional||Nv.transitional,i=t&&t.forcedJSONParsing,n=this.responseType==="json";if(ne.isResponse(e)||ne.isReadableStream(e))return e;if(e&&ne.isString(e)&&(i&&!this.responseType||n)){const s=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?at.from(o,at.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gi.classes.FormData,Blob:Gi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],r=>{Nv.headers[r]={}});const JK=ne.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"]),eZ=r=>{const e={};let t,i,n;return r&&r.split(`
`).forEach(function(s){n=s.indexOf(":"),t=s.substring(0,n).trim().toLowerCase(),i=s.substring(n+1).trim(),!(!t||e[t]&&JK[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},GI=Symbol("internals");function id(r){return r&&String(r).trim().toLowerCase()}function iy(r){return r===!1||r==null?r:ne.isArray(r)?r.map(iy):String(r)}function tZ(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(r);)e[i[1]]=i[2];return e}const rZ=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ib(r,e,t,i,n){if(ne.isFunction(i))return i.call(this,e,t);if(n&&(e=t),!!ne.isString(e)){if(ne.isString(i))return e.indexOf(i)!==-1;if(ne.isRegExp(i))return i.test(e)}}function iZ(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function nZ(r,e){const t=ne.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+t,{value:function(n,a,s){return this[i].call(this,e,n,a,s)},configurable:!0})})}class Hi{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function a(o,l,u){const c=id(l);if(!c)throw new Error("header name must be a non-empty string");const h=ne.findKey(n,c);(!h||n[h]===void 0||u===!0||u===void 0&&n[h]!==!1)&&(n[h||l]=iy(o))}const s=(o,l)=>ne.forEach(o,(u,c)=>a(u,c,l));if(ne.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(ne.isString(e)&&(e=e.trim())&&!rZ(e))s(eZ(e),t);else if(ne.isHeaders(e))for(const[o,l]of e.entries())a(l,o,i);else e!=null&&a(t,e,i);return this}get(e,t){if(e=id(e),e){const i=ne.findKey(this,e);if(i){const n=this[i];if(!t)return n;if(t===!0)return tZ(n);if(ne.isFunction(t))return t.call(this,n,i);if(ne.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=id(e),e){const i=ne.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||ib(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let n=!1;function a(s){if(s=id(s),s){const o=ne.findKey(i,s);o&&(!t||ib(i,i[o],o,t))&&(delete i[o],n=!0)}}return ne.isArray(e)?e.forEach(a):a(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const a=t[i];(!e||ib(this,this[a],a,e,!0))&&(delete this[a],n=!0)}return n}normalize(e){const t=this,i={};return ne.forEach(this,(n,a)=>{const s=ne.findKey(i,a);if(s){t[s]=iy(n),delete t[a];return}const o=e?iZ(a):String(a).trim();o!==a&&delete t[a],t[o]=iy(n),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ne.forEach(this,(i,n)=>{i!=null&&i!==!1&&(t[n]=e&&ne.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(n=>i.set(n)),i}static accessor(e){const i=(this[GI]=this[GI]={accessors:{}}).accessors,n=this.prototype;function a(s){const o=id(s);i[o]||(nZ(n,s),i[o]=!0)}return ne.isArray(e)?e.forEach(a):a(e),this}}Hi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ne.reduceDescriptors(Hi.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(i){this[t]=i}}});ne.freezeMethods(Hi);function nb(r,e){const t=this||Nv,i=e||t,n=Hi.from(i.headers);let a=i.data;return ne.forEach(r,function(o){a=o.call(t,a,n.normalize(),e?e.status:void 0)}),n.normalize(),a}function M5(r){return!!(r&&r.__CANCEL__)}function yf(r,e,t){at.call(this,r??"canceled",at.ERR_CANCELED,e,t),this.name="CanceledError"}ne.inherits(yf,at,{__CANCEL__:!0});function L5(r,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new at("Request failed with status code "+t.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function aZ(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function sZ(r,e){r=r||10;const t=new Array(r),i=new Array(r);let n=0,a=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[a];s||(s=u),t[n]=l,i[n]=u;let h=a,d=0;for(;h!==n;)d+=t[h++],h=h%r;if(n=(n+1)%r,n===a&&(a=(a+1)%r),u-s<e)return;const f=c&&u-c;return f?Math.round(d*1e3/f):void 0}}function oZ(r,e){let t=0,i=1e3/e,n,a;const s=(u,c=Date.now())=>{t=c,n=null,a&&(clearTimeout(a),a=null),r.apply(null,u)};return[(...u)=>{const c=Date.now(),h=c-t;h>=i?s(u,c):(n=u,a||(a=setTimeout(()=>{a=null,s(n)},i-h)))},()=>n&&s(n)]}const Ry=(r,e,t=3)=>{let i=0;const n=sZ(50,250);return oZ(a=>{const s=a.loaded,o=a.lengthComputable?a.total:void 0,l=s-i,u=n(l),c=s<=o;i=s;const h={loaded:s,total:o,progress:o?s/o:void 0,bytes:l,rate:u||void 0,estimated:u&&o&&c?(o-s)/u:void 0,event:a,lengthComputable:o!=null,[e?"download":"upload"]:!0};r(h)},t)},HI=(r,e)=>{const t=r!=null;return[i=>e[0]({lengthComputable:t,total:r,loaded:i}),e[1]]},$I=r=>(...e)=>ne.asap(()=>r(...e)),lZ=Gi.hasStandardBrowserEnv?function(){const e=Gi.navigator&&/(msie|trident)/i.test(Gi.navigator.userAgent),t=document.createElement("a");let i;function n(a){let s=a;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(s){const o=ne.isString(s)?n(s):s;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}(),uZ=Gi.hasStandardBrowserEnv?{write(r,e,t,i,n,a){const s=[r+"="+encodeURIComponent(e)];ne.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),ne.isString(i)&&s.push("path="+i),ne.isString(n)&&s.push("domain="+n),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function cZ(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function hZ(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function k5(r,e){return r&&!cZ(e)?hZ(r,e):e}const WI=r=>r instanceof Hi?{...r}:r;function qu(r,e){e=e||{};const t={};function i(u,c,h){return ne.isPlainObject(u)&&ne.isPlainObject(c)?ne.merge.call({caseless:h},u,c):ne.isPlainObject(c)?ne.merge({},c):ne.isArray(c)?c.slice():c}function n(u,c,h){if(ne.isUndefined(c)){if(!ne.isUndefined(u))return i(void 0,u,h)}else return i(u,c,h)}function a(u,c){if(!ne.isUndefined(c))return i(void 0,c)}function s(u,c){if(ne.isUndefined(c)){if(!ne.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function o(u,c,h){if(h in e)return i(u,c);if(h in r)return i(void 0,u)}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(u,c)=>n(WI(u),WI(c),!0)};return ne.forEach(Object.keys(Object.assign({},r,e)),function(c){const h=l[c]||n,d=h(r[c],e[c],c);ne.isUndefined(d)&&h!==o||(t[c]=d)}),t}const R5=r=>{const e=qu({},r);let{data:t,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:a,headers:s,auth:o}=e;e.headers=s=Hi.from(s),e.url=E5(k5(e.baseURL,e.url),r.params,r.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(ne.isFormData(t)){if(Gi.hasStandardBrowserEnv||Gi.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Gi.hasStandardBrowserEnv&&(i&&ne.isFunction(i)&&(i=i(e)),i||i!==!1&&lZ(e.url))){const u=n&&a&&uZ.read(a);u&&s.set(n,u)}return e},fZ=typeof XMLHttpRequest<"u",dZ=fZ&&function(r){return new Promise(function(t,i){const n=R5(r);let a=n.data;const s=Hi.from(n.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=n,c,h,d,f,p;function v(){f&&f(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function m(){if(!g)return;const _=Hi.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:_,config:r,request:g};L5(function(C){t(C),v()},function(C){i(C),v()},S),g=null}"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(m)},g.onabort=function(){g&&(i(new at("Request aborted",at.ECONNABORTED,r,g)),g=null)},g.onerror=function(){i(new at("Network Error",at.ERR_NETWORK,r,g)),g=null},g.ontimeout=function(){let b=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const S=n.transitional||I5;n.timeoutErrorMessage&&(b=n.timeoutErrorMessage),i(new at(b,S.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,r,g)),g=null},a===void 0&&s.setContentType(null),"setRequestHeader"in g&&ne.forEach(s.toJSON(),function(b,S){g.setRequestHeader(S,b)}),ne.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),o&&o!=="json"&&(g.responseType=n.responseType),u&&([d,p]=Ry(u,!0),g.addEventListener("progress",d)),l&&g.upload&&([h,f]=Ry(l),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",f)),(n.cancelToken||n.signal)&&(c=_=>{g&&(i(!_||_.type?new yf(null,r,g):_),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const y=aZ(n.url);if(y&&Gi.protocols.indexOf(y)===-1){i(new at("Unsupported protocol "+y+":",at.ERR_BAD_REQUEST,r));return}g.send(a||null)})},pZ=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let i=new AbortController,n;const a=function(u){if(!n){n=!0,o();const c=u instanceof Error?u:this.reason;i.abort(c instanceof at?c:new yf(c instanceof Error?c.message:c))}};let s=e&&setTimeout(()=>{s=null,a(new at(`timeout ${e} of ms exceeded`,at.ETIMEDOUT))},e);const o=()=>{r&&(s&&clearTimeout(s),s=null,r.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),r=null)};r.forEach(u=>u.addEventListener("abort",a));const{signal:l}=i;return l.unsubscribe=()=>ne.asap(o),l}},vZ=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let i=0,n;for(;i<t;)n=i+e,yield r.slice(i,n),i=n},gZ=async function*(r,e){for await(const t of mZ(r))yield*vZ(t,e)},mZ=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},qI=(r,e,t,i)=>{const n=gZ(r,e);let a=0,s,o=l=>{s||(s=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await n.next();if(u){o(),l.close();return}let h=c.byteLength;if(t){let d=a+=h;t(d)}l.enqueue(new Uint8Array(c))}catch(u){throw o(u),u}},cancel(l){return o(l),n.return()}},{highWaterMark:2})},__=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",O5=__&&typeof ReadableStream=="function",yZ=__&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),N5=(r,...e)=>{try{return!!r(...e)}catch{return!1}},_Z=O5&&N5(()=>{let r=!1;const e=new Request(Gi.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),jI=64*1024,bx=O5&&N5(()=>ne.isReadableStream(new Response("").body)),Oy={stream:bx&&(r=>r.body)};__&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Oy[e]&&(Oy[e]=ne.isFunction(r[e])?t=>t[e]():(t,i)=>{throw new at(`Response type '${e}' is not supported`,at.ERR_NOT_SUPPORT,i)})})})(new Response);const bZ=async r=>{if(r==null)return 0;if(ne.isBlob(r))return r.size;if(ne.isSpecCompliantForm(r))return(await new Request(Gi.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(ne.isArrayBufferView(r)||ne.isArrayBuffer(r))return r.byteLength;if(ne.isURLSearchParams(r)&&(r=r+""),ne.isString(r))return(await yZ(r)).byteLength},TZ=async(r,e)=>{const t=ne.toFiniteNumber(r.getContentLength());return t??bZ(e)},SZ=__&&(async r=>{let{url:e,method:t,data:i,signal:n,cancelToken:a,timeout:s,onDownloadProgress:o,onUploadProgress:l,responseType:u,headers:c,withCredentials:h="same-origin",fetchOptions:d}=R5(r);u=u?(u+"").toLowerCase():"text";let f=pZ([n,a&&a.toAbortSignal()],s),p;const v=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(l&&_Z&&t!=="get"&&t!=="head"&&(g=await TZ(c,i))!==0){let S=new Request(e,{method:"POST",body:i,duplex:"half"}),x;if(ne.isFormData(i)&&(x=S.headers.get("content-type"))&&c.setContentType(x),S.body){const[C,D]=HI(g,Ry($I(l)));i=qI(S.body,jI,C,D)}}ne.isString(h)||(h=h?"include":"omit");const m="credentials"in Request.prototype;p=new Request(e,{...d,signal:f,method:t.toUpperCase(),headers:c.normalize().toJSON(),body:i,duplex:"half",credentials:m?h:void 0});let y=await fetch(p);const _=bx&&(u==="stream"||u==="response");if(bx&&(o||_&&v)){const S={};["status","statusText","headers"].forEach(I=>{S[I]=y[I]});const x=ne.toFiniteNumber(y.headers.get("content-length")),[C,D]=o&&HI(x,Ry($I(o),!0))||[];y=new Response(qI(y.body,jI,C,()=>{D&&D(),v&&v()}),S)}u=u||"text";let b=await Oy[ne.findKey(Oy,u)||"text"](y,r);return!_&&v&&v(),await new Promise((S,x)=>{L5(S,x,{data:b,headers:Hi.from(y.headers),status:y.status,statusText:y.statusText,config:r,request:p})})}catch(m){throw v&&v(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,r,p),{cause:m.cause||m}):at.from(m,m&&m.code,r,p)}}),Tx={http:BK,xhr:dZ,fetch:SZ};ne.forEach(Tx,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const XI=r=>`- ${r}`,xZ=r=>ne.isFunction(r)||r===null||r===!1,B5={getAdapter:r=>{r=ne.isArray(r)?r:[r];const{length:e}=r;let t,i;const n={};for(let a=0;a<e;a++){t=r[a];let s;if(i=t,!xZ(t)&&(i=Tx[(s=String(t)).toLowerCase()],i===void 0))throw new at(`Unknown adapter '${s}'`);if(i)break;n[s||"#"+a]=i}if(!i){const a=Object.entries(n).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?a.length>1?`since :
`+a.map(XI).join(`
`):" "+XI(a[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Tx};function ab(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new yf(null,r)}function YI(r){return ab(r),r.headers=Hi.from(r.headers),r.data=nb.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),B5.getAdapter(r.adapter||Nv.adapter)(r).then(function(i){return ab(r),i.data=nb.call(r,r.transformResponse,i),i.headers=Hi.from(i.headers),i},function(i){return M5(i)||(ab(r),i&&i.response&&(i.response.data=nb.call(r,r.transformResponse,i.response),i.response.headers=Hi.from(i.response.headers))),Promise.reject(i)})}const F5="1.7.7",pC={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{pC[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});const KI={};pC.transitional=function(e,t,i){function n(a,s){return"[Axios v"+F5+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return(a,s,o)=>{if(e===!1)throw new at(n(s," has been removed"+(t?" in "+t:"")),at.ERR_DEPRECATED);return t&&!KI[s]&&(KI[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,s,o):!0}};function wZ(r,e,t){if(typeof r!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let n=i.length;for(;n-- >0;){const a=i[n],s=e[a];if(s){const o=r[a],l=o===void 0||s(o,a,r);if(l!==!0)throw new at("option "+a+" must be "+l,at.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new at("Unknown option "+a,at.ERR_BAD_OPTION)}}const Sx={assertOptions:wZ,validators:pC},so=Sx.validators;class wu{constructor(e){this.defaults=e,this.interceptors={request:new zI,response:new zI}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;const a=n.stack?n.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
`+a):i.stack=a}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=qu(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:a}=t;i!==void 0&&Sx.assertOptions(i,{silentJSONParsing:so.transitional(so.boolean),forcedJSONParsing:so.transitional(so.boolean),clarifyTimeoutError:so.transitional(so.boolean)},!1),n!=null&&(ne.isFunction(n)?t.paramsSerializer={serialize:n}:Sx.assertOptions(n,{encode:so.function,serialize:so.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&ne.merge(a.common,a[t.method]);a&&ne.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),t.headers=Hi.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(l=l&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,h=0,d;if(!l){const p=[YI.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),d=p.length,c=Promise.resolve(t);h<d;)c=c.then(p[h++],p[h++]);return c}d=o.length;let f=t;for(h=0;h<d;){const p=o[h++],v=o[h++];try{f=p(f)}catch(g){v.call(this,g);break}}try{c=YI.call(this,f)}catch(p){return Promise.reject(p)}for(h=0,d=u.length;h<d;)c=c.then(u[h++],u[h++]);return c}getUri(e){e=qu(this.defaults,e);const t=k5(e.baseURL,e.url);return E5(t,e.params,e.paramsSerializer)}}ne.forEach(["delete","get","head","options"],function(e){wu.prototype[e]=function(t,i){return this.request(qu(i||{},{method:e,url:t,data:(i||{}).data}))}});ne.forEach(["post","put","patch"],function(e){function t(i){return function(a,s,o){return this.request(qu(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}wu.prototype[e]=t(),wu.prototype[e+"Form"]=t(!0)});class vC{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const i=this;this.promise.then(n=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](n);i._listeners=null}),this.promise.then=n=>{let a;const s=new Promise(o=>{i.subscribe(o),a=o}).then(n);return s.cancel=function(){i.unsubscribe(a)},s},e(function(a,s,o){i.reason||(i.reason=new yf(a,s,o),t(i.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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new vC(function(n){e=n}),cancel:e}}}function CZ(r){return function(t){return r.apply(null,t)}}function AZ(r){return ne.isObject(r)&&r.isAxiosError===!0}const xx={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(xx).forEach(([r,e])=>{xx[e]=r});function U5(r){const e=new wu(r),t=g5(wu.prototype.request,e);return ne.extend(t,wu.prototype,e,{allOwnKeys:!0}),ne.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return U5(qu(r,n))},t}const Cr=U5(Nv);Cr.Axios=wu;Cr.CanceledError=yf;Cr.CancelToken=vC;Cr.isCancel=M5;Cr.VERSION=F5;Cr.toFormData=y_;Cr.AxiosError=at;Cr.Cancel=Cr.CanceledError;Cr.all=function(e){return Promise.all(e)};Cr.spread=CZ;Cr.isAxiosError=AZ;Cr.mergeConfig=qu;Cr.AxiosHeaders=Hi;Cr.formToJSON=r=>P5(ne.isHTMLForm(r)?new FormData(r):r);Cr.getAdapter=B5.getAdapter;Cr.HttpStatusCode=xx;Cr.default=Cr;window.axios=Cr;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var Ny=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function V5(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var Gd;typeof window<"u"?Gd=window:typeof Ny<"u"?Gd=Ny:typeof self<"u"?Gd=self:Gd={};var b_=Gd;const H=Bv(b_),DZ={},EZ=Object.freeze(Object.defineProperty({__proto__:null,default:DZ},Symbol.toStringTag,{value:"Module"})),IZ=V5(EZ);var ZI=typeof Ny<"u"?Ny:typeof window<"u"?window:{},PZ=IZ,Hd;typeof document<"u"?Hd=document:(Hd=ZI["__GLOBAL_DOCUMENT_CACHE@4"],Hd||(Hd=ZI["__GLOBAL_DOCUMENT_CACHE@4"]=PZ));var z5=Hd;const de=Bv(z5);var gC={exports:{}};function ar(){return ar=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},ar.apply(null,arguments)}const MZ=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ar}},Symbol.toStringTag,{value:"Module"})),LZ=V5(MZ);var kZ=OZ,RZ=Object.prototype.toString;function OZ(r){if(!r)return!1;var e=RZ.call(r);return e==="[object Function]"||typeof r=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(r===window.setTimeout||r===window.alert||r===window.confirm||r===window.prompt)}function NZ(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=BZ(r))||e){t&&(r=t);var i=0;return function(){return i>=r.length?{done:!0}:{done:!1,value:r[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BZ(r,e){if(r){if(typeof r=="string")return QI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return QI(r,e)}}function QI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=r[t];return i}var FZ=function(){function r(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=r.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},e.addInterceptor=function(i,n){this.typeToInterceptorsMap_.has(i)||this.typeToInterceptorsMap_.set(i,new Set);var a=this.typeToInterceptorsMap_.get(i);return a.has(n)?!1:(a.add(n),!0)},e.removeInterceptor=function(i,n){var a=this.typeToInterceptorsMap_.get(i);return a&&a.has(n)?(a.delete(n),!0):!1},e.clearInterceptorsByType=function(i){var n=this.typeToInterceptorsMap_.get(i);return n?(this.typeToInterceptorsMap_.delete(i),this.typeToInterceptorsMap_.set(i,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(i){return this.typeToInterceptorsMap_.get(i)||new Set},e.execute=function(i,n){for(var a=this.getForType(i),s=NZ(a),o;!(o=s()).done;){var l=o.value;try{n=l(n)}catch{}}return n},r}(),UZ=FZ,VZ=function(){function r(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=r.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},e.getMaxAttempts=function(){return this.maxAttempts_},e.setMaxAttempts=function(i){this.maxAttempts_=i},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(i){this.delayFactor_=i},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(i){this.fuzzFactor_=i},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(i){this.initialDelay_=i},e.createRetry=function(i){var n=i===void 0?{}:i,a=n.maxAttempts,s=n.delayFactor,o=n.fuzzFactor,l=n.initialDelay;return new zZ({maxAttempts:a||this.maxAttempts_,delayFactor:s||this.delayFactor_,fuzzFactor:o||this.fuzzFactor_,initialDelay:l||this.initialDelay_})},r}(),zZ=function(){function r(t){this.maxAttempts_=t.maxAttempts,this.delayFactor_=t.delayFactor,this.fuzzFactor_=t.fuzzFactor,this.currentDelay_=t.initialDelay,this.currentAttempt_=1}var e=r.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var i=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+i},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},e.getCurrentDelay=function(){return this.currentDelay_},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},e.getCurrentFuzzedDelay=function(){var i=this.getCurrentMinPossibleDelay(),n=this.getCurrentMaxPossibleDelay();return i+Math.random()*(n-i)},r}(),GZ=VZ,HZ=b_,$Z=function(e,t){return t===void 0&&(t=!1),function(i,n,a){if(i){e(i);return}if(n.statusCode>=400&&n.statusCode<=599){var s=a;if(t)if(HZ.TextDecoder){var o=WZ(n.headers&&n.headers["content-type"]);try{s=new TextDecoder(o).decode(a)}catch{}}else s=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:s});return}e(null,a)}};function WZ(r){return r===void 0&&(r=""),r.toLowerCase().split(";").reduce(function(e,t){var i=t.split("="),n=i[0],a=i[1];return n.trim()==="charset"?a.trim():e},"utf-8")}var qZ=$Z,G5=b_,jZ=LZ,XZ=kZ,H5=UZ,YZ=GZ;dr.httpHandler=qZ;dr.requestInterceptorsStorage=new H5;dr.responseInterceptorsStorage=new H5;dr.retryManager=new YZ;/**
* @license
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
* Copyright (c) 2014 David Björklund
* Available under the MIT license
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
*/var KZ=function(e){var t={};return e&&e.trim().split(`
`).forEach(function(i){var n=i.indexOf(":"),a=i.slice(0,n).trim().toLowerCase(),s=i.slice(n+1).trim();typeof t[a]>"u"?t[a]=s:Array.isArray(t[a])?t[a].push(s):t[a]=[t[a],s]}),t};gC.exports=dr;gC.exports.default=dr;dr.XMLHttpRequest=G5.XMLHttpRequest||eQ;dr.XDomainRequest="withCredentials"in new dr.XMLHttpRequest?dr.XMLHttpRequest:G5.XDomainRequest;ZZ(["get","put","post","patch","head","delete"],function(r){dr[r==="delete"?"del":r]=function(e,t,i){return t=$5(e,t,i),t.method=r.toUpperCase(),mC(t)}});function ZZ(r,e){for(var t=0;t<r.length;t++)e(r[t])}function QZ(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0}function $5(r,e,t){var i=r;return XZ(e)?(t=e,typeof r=="string"&&(i={uri:r})):i=jZ({},e,{uri:r}),i.callback=t,i}function dr(r,e,t){return e=$5(r,e,t),mC(e)}function mC(r){if(typeof r.callback>"u")throw new Error("callback argument missing");if(r.requestType&&dr.requestInterceptorsStorage.getIsEnabled()){var e={uri:r.uri||r.url,headers:r.headers||{},body:r.body,metadata:r.metadata||{},retry:r.retry,timeout:r.timeout},t=dr.requestInterceptorsStorage.execute(r.requestType,e);r.uri=t.uri,r.headers=t.headers,r.body=t.body,r.metadata=t.metadata,r.retry=t.retry,r.timeout=t.timeout}var i=!1,n=function(S,x,C){i||(i=!0,r.callback(S,x,C))};function a(){u.readyState===4&&!dr.responseInterceptorsStorage.getIsEnabled()&&setTimeout(l,0)}function s(){var b=void 0;if(u.response?b=u.response:b=u.responseText||JZ(u),m)try{b=JSON.parse(b)}catch{}return b}function o(b){if(clearTimeout(y),clearTimeout(r.retryTimeout),b instanceof Error||(b=new Error(""+(b||"Unknown XMLHttpRequest Error"))),b.statusCode=0,!h&&dr.retryManager.getIsEnabled()&&r.retry&&r.retry.shouldRetry()){r.retryTimeout=setTimeout(function(){r.retry.moveToNextAttempt(),r.xhr=u,mC(r)},r.retry.getCurrentFuzzedDelay());return}if(r.requestType&&dr.responseInterceptorsStorage.getIsEnabled()){var S={headers:_.headers||{},body:_.body,responseUrl:u.responseURL,responseType:u.responseType},x=dr.responseInterceptorsStorage.execute(r.requestType,S);_.body=x.body,_.headers=x.headers}return n(b,_)}function l(){if(!h){var b;clearTimeout(y),clearTimeout(r.retryTimeout),r.useXDR&&u.status===void 0?b=200:b=u.status===1223?204:u.status;var S=_,x=null;if(b!==0?(S={body:s(),statusCode:b,method:f,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(S.headers=KZ(u.getAllResponseHeaders()))):x=new Error("Internal XMLHttpRequest Error"),r.requestType&&dr.responseInterceptorsStorage.getIsEnabled()){var C={headers:S.headers||{},body:S.body,responseUrl:u.responseURL,responseType:u.responseType},D=dr.responseInterceptorsStorage.execute(r.requestType,C);S.body=D.body,S.headers=D.headers}return n(x,S,S.body)}}var u=r.xhr||null;u||(r.cors||r.useXDR?u=new dr.XDomainRequest:u=new dr.XMLHttpRequest);var c,h,d=u.url=r.uri||r.url,f=u.method=r.method||"GET",p=r.body||r.data,v=u.headers=r.headers||{},g=!!r.sync,m=!1,y,_={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:u};if("json"in r&&r.json!==!1&&(m=!0,v.accept||v.Accept||(v.Accept="application/json"),f!=="GET"&&f!=="HEAD"&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),p=JSON.stringify(r.json===!0?p:r.json))),u.onreadystatechange=a,u.onload=l,u.onerror=o,u.onprogress=function(){},u.onabort=function(){h=!0,clearTimeout(r.retryTimeout)},u.ontimeout=o,u.open(f,d,!g,r.username,r.password),g||(u.withCredentials=!!r.withCredentials),!g&&r.timeout>0&&(y=setTimeout(function(){if(!h){h=!0,u.abort("timeout");var b=new Error("XMLHttpRequest timeout");b.code="ETIMEDOUT",o(b)}},r.timeout)),u.setRequestHeader)for(c in v)v.hasOwnProperty(c)&&u.setRequestHeader(c,v[c]);else if(r.headers&&!QZ(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(u.responseType=r.responseType),"beforeSend"in r&&typeof r.beforeSend=="function"&&r.beforeSend(u),u.send(p||null),u}function JZ(r){try{if(r.responseType==="document")return r.responseXML;var e=r.responseXML&&r.responseXML.documentElement.nodeName==="parsererror";if(r.responseType===""&&!e)return r.responseXML}catch{}return null}function eQ(){}var tQ=gC.exports;const W5=Bv(tQ);var q5={exports:{}},JI=z5,yC=Object.create||function(){function r(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return r.prototype=e,new r}}();function on(r,e){this.name="ParsingError",this.code=r.code,this.message=e||r.message}on.prototype=yC(Error.prototype);on.prototype.constructor=on;on.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function _C(r){function e(i,n,a,s){return(i|0)*3600+(n|0)*60+(a|0)+(s|0)/1e3}var t=r.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return t?t[3]?e(t[1],t[2],t[3].replace(":",""),t[4]):t[1]>59?e(t[1],t[2],0,t[4]):e(0,t[1],t[2],t[4]):null}function dp(){this.values=yC(null)}dp.prototype={set:function(r,e){!this.get(r)&&e!==""&&(this.values[r]=e)},get:function(r,e,t){return t?this.has(r)?this.values[r]:e[t]:this.has(r)?this.values[r]:e},has:function(r){return r in this.values},alt:function(r,e,t){for(var i=0;i<t.length;++i)if(e===t[i]){this.set(r,e);break}},integer:function(r,e){/^-?\d+$/.test(e)&&this.set(r,parseInt(e,10))},percent:function(r,e){return e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(r,e),!0):!1}};function $d(r,e,t,i){var n=i?r.split(i):[r];for(var a in n)if(typeof n[a]=="string"){var s=n[a].split(t);if(s.length===2){var o=s[0].trim(),l=s[1].trim();e(o,l)}}}function rQ(r,e,t){var i=r;function n(){var o=_C(r);if(o===null)throw new on(on.Errors.BadTimeStamp,"Malformed timestamp: "+i);return r=r.replace(/^[^\sa-zA-Z-]+/,""),o}function a(o,l){var u=new dp;$d(o,function(c,h){switch(c){case"region":for(var d=t.length-1;d>=0;d--)if(t[d].id===h){u.set(c,t[d].region);break}break;case"vertical":u.alt(c,h,["rl","lr"]);break;case"line":var f=h.split(","),p=f[0];u.integer(c,p),u.percent(c,p)&&u.set("snapToLines",!1),u.alt(c,p,["auto"]),f.length===2&&u.alt("lineAlign",f[1],["start","center","end"]);break;case"position":f=h.split(","),u.percent(c,f[0]),f.length===2&&u.alt("positionAlign",f[1],["start","center","end"]);break;case"size":u.percent(c,h);break;case"align":u.alt(c,h,["start","center","end","left","right"]);break}},/:/,/\s/),l.region=u.get("region",null),l.vertical=u.get("vertical","");try{l.line=u.get("line","auto")}catch{}l.lineAlign=u.get("lineAlign","start"),l.snapToLines=u.get("snapToLines",!0),l.size=u.get("size",100);try{l.align=u.get("align","center")}catch{l.align=u.get("align","middle")}try{l.position=u.get("position","auto")}catch{l.position=u.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},l.align)}l.positionAlign=u.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},l.align)}function s(){r=r.replace(/^\s+/,"")}if(s(),e.startTime=n(),s(),r.substr(0,3)!=="-->")throw new on(on.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+i);r=r.substr(3),s(),e.endTime=n(),s(),a(r,e)}var sb=JI.createElement&&JI.createElement("textarea"),iQ={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},eP={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},nQ={v:"title",lang:"lang"},tP={rt:"ruby"};function j5(r,e){function t(){if(!e)return null;function p(g){return e=e.substr(g.length),g}var v=e.match(/^([^<]*)(<[^>]*>?)?/);return p(v[1]?v[1]:v[2])}function i(p){return sb.innerHTML=p,p=sb.textContent,sb.textContent="",p}function n(p,v){return!tP[v.localName]||tP[v.localName]===p.localName}function a(p,v){var g=iQ[p];if(!g)return null;var m=r.document.createElement(g),y=nQ[p];return y&&v&&(m[y]=v.trim()),m}for(var s=r.document.createElement("div"),o=s,l,u=[];(l=t())!==null;){if(l[0]==="<"){if(l[1]==="/"){u.length&&u[u.length-1]===l.substr(2).replace(">","")&&(u.pop(),o=o.parentNode);continue}var c=_C(l.substr(1,l.length-2)),h;if(c){h=r.document.createProcessingInstruction("timestamp",c),o.appendChild(h);continue}var d=l.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!d||(h=a(d[1],d[3]),!h)||!n(o,h))continue;if(d[2]){var f=d[2].split(".");f.forEach(function(p){var v=/^bg_/.test(p),g=v?p.slice(3):p;if(eP.hasOwnProperty(g)){var m=v?"background-color":"color",y=eP[g];h.style[m]=y}}),h.className=f.join(" ")}u.push(d[1]),o.appendChild(h),o=h;continue}o.appendChild(r.document.createTextNode(i(l)))}return s}var rP=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function aQ(r){for(var e=0;e<rP.length;e++){var t=rP[e];if(r>=t[0]&&r<=t[1])return!0}return!1}function sQ(r){var e=[],t="",i;if(!r||!r.childNodes)return"ltr";function n(o,l){for(var u=l.childNodes.length-1;u>=0;u--)o.push(l.childNodes[u])}function a(o){if(!o||!o.length)return null;var l=o.pop(),u=l.textContent||l.innerText;if(u){var c=u.match(/^.*(\n|\r)/);return c?(o.length=0,c[0]):u}if(l.tagName==="ruby")return a(o);if(l.childNodes)return n(o,l),a(o)}for(n(e,r);t=a(e);)for(var s=0;s<t.length;s++)if(i=t.charCodeAt(s),aQ(i))return"rtl";return"ltr"}function oQ(r){if(typeof r.line=="number"&&(r.snapToLines||r.line>=0&&r.line<=100))return r.line;if(!r.track||!r.track.textTrackList||!r.track.textTrackList.mediaElement)return-1;for(var e=r.track,t=e.textTrackList,i=0,n=0;n<t.length&&t[n]!==e;n++)t[n].mode==="showing"&&i++;return++i*-1}function T_(){}T_.prototype.applyStyles=function(r,e){e=e||this.div;for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t])};T_.prototype.formatStyle=function(r,e){return r===0?0:r+e};function By(r,e,t){T_.call(this),this.cue=e,this.cueDiv=j5(r,e.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=r.document.createElement("div"),i={direction:sQ(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:t.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var n=0;switch(e.positionAlign){case"start":case"line-left":n=e.position;break;case"center":n=e.position-e.size/2;break;case"end":case"line-right":n=e.position-e.size;break}e.vertical===""?this.applyStyles({left:this.formatStyle(n,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(n,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}By.prototype=yC(T_.prototype);By.prototype.constructor=By;function bi(r){var e,t,i,n;if(r.div){t=r.div.offsetHeight,i=r.div.offsetWidth,n=r.div.offsetTop;var a=(a=r.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();r=r.div.getBoundingClientRect(),e=a?Math.max(a[0]&&a[0].height||0,r.height/a.length):0}this.left=r.left,this.right=r.right,this.top=r.top||n,this.height=r.height||t,this.bottom=r.bottom||n+(r.height||t),this.width=r.width||i,this.lineHeight=e!==void 0?e:r.lineHeight}bi.prototype.move=function(r,e){switch(e=e!==void 0?e:this.lineHeight,r){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}};bi.prototype.overlaps=function(r){return this.left<r.right&&this.right>r.left&&this.top<r.bottom&&this.bottom>r.top};bi.prototype.overlapsAny=function(r){for(var e=0;e<r.length;e++)if(this.overlaps(r[e]))return!0;return!1};bi.prototype.within=function(r){return this.top>=r.top&&this.bottom<=r.bottom&&this.left>=r.left&&this.right<=r.right};bi.prototype.overlapsOppositeAxis=function(r,e){switch(e){case"+x":return this.left<r.left;case"-x":return this.right>r.right;case"+y":return this.top<r.top;case"-y":return this.bottom>r.bottom}};bi.prototype.intersectPercentage=function(r){var e=Math.max(0,Math.min(this.right,r.right)-Math.max(this.left,r.left)),t=Math.max(0,Math.min(this.bottom,r.bottom)-Math.max(this.top,r.top)),i=e*t;return i/(this.height*this.width)};bi.prototype.toCSSCompatValues=function(r){return{top:this.top-r.top,bottom:r.bottom-this.bottom,left:this.left-r.left,right:r.right-this.right,height:this.height,width:this.width}};bi.getSimpleBoxPosition=function(r){var e=r.div?r.div.offsetHeight:r.tagName?r.offsetHeight:0,t=r.div?r.div.offsetWidth:r.tagName?r.offsetWidth:0,i=r.div?r.div.offsetTop:r.tagName?r.offsetTop:0;r=r.div?r.div.getBoundingClientRect():r.tagName?r.getBoundingClientRect():r;var n={left:r.left,right:r.right,top:r.top||i,height:r.height||e,bottom:r.bottom||i+(r.height||e),width:r.width||t};return n};function lQ(r,e,t,i){function n(g,m){for(var y,_=new bi(g),b=1,S=0;S<m.length;S++){for(;g.overlapsOppositeAxis(t,m[S])||g.within(t)&&g.overlapsAny(i);)g.move(m[S]);if(g.within(t))return g;var x=g.intersectPercentage(t);b>x&&(y=new bi(g),b=x),g=new bi(_)}return y||_}var a=new bi(e),s=e.cue,o=oQ(s),l=[];if(s.snapToLines){var u;switch(s.vertical){case"":l=["+y","-y"],u="height";break;case"rl":l=["+x","-x"],u="width";break;case"lr":l=["-x","+x"],u="width";break}var c=a.lineHeight,h=c*Math.round(o),d=t[u]+c,f=l[0];Math.abs(h)>d&&(h=h<0?-1:1,h*=Math.ceil(d/c)*c),o<0&&(h+=s.vertical===""?t.height:t.width,l=l.reverse()),a.move(f,h)}else{var p=a.lineHeight/t.height*100;switch(s.lineAlign){case"center":o-=p/2;break;case"end":o-=p;break}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(o,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(o,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],a=new bi(e)}var v=n(a,l);e.move(v.toCSSCompatValues(t))}function _f(){}_f.StringDecoder=function(){return{decode:function(r){if(!r)return"";if(typeof r!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(r))}}};_f.convertCueToDOMTree=function(r,e){return!r||!e?null:j5(r,e)};var uQ=.05,cQ="sans-serif",hQ="1.5%";_f.processCues=function(r,e,t){if(!r||!e||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var i=r.document.createElement("div");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin=hQ,t.appendChild(i);function n(c){for(var h=0;h<c.length;h++)if(c[h].hasBeenReset||!c[h].displayState)return!0;return!1}if(!n(e)){for(var a=0;a<e.length;a++)i.appendChild(e[a].displayState);return}var s=[],o=bi.getSimpleBoxPosition(i),l=Math.round(o.height*uQ*100)/100,u={font:l+"px "+cQ};(function(){for(var c,h,d=0;d<e.length;d++)h=e[d],c=new By(r,h,u),i.appendChild(c.div),lQ(r,c,o,s),h.displayState=c.div,s.push(bi.getSimpleBoxPosition(c))})()};_f.Parser=function(r,e,t){t||(t=e,e={}),e||(e={}),this.window=r,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]};_f.Parser.prototype={reportOrThrowError:function(r){if(r instanceof on)this.onparsingerror&&this.onparsingerror(r);else throw r},parse:function(r){var e=this;r&&(e.buffer+=e.decoder.decode(r,{stream:!0}));function t(){for(var c=e.buffer,h=0;h<c.length&&c[h]!=="\r"&&c[h]!==`
`;)++h;var d=c.substr(0,h);return c[h]==="\r"&&++h,c[h]===`
`&&++h,e.buffer=c.substr(h),d}function i(c){var h=new dp;if($d(c,function(f,p){switch(f){case"id":h.set(f,p);break;case"width":h.percent(f,p);break;case"lines":h.integer(f,p);break;case"regionanchor":case"viewportanchor":var v=p.split(",");if(v.length!==2)break;var g=new dp;if(g.percent("x",v[0]),g.percent("y",v[1]),!g.has("x")||!g.has("y"))break;h.set(f+"X",g.get("x")),h.set(f+"Y",g.get("y"));break;case"scroll":h.alt(f,p,["up"]);break}},/=/,/\s/),h.has("id")){var d=new(e.vttjs.VTTRegion||e.window.VTTRegion);d.width=h.get("width",100),d.lines=h.get("lines",3),d.regionAnchorX=h.get("regionanchorX",0),d.regionAnchorY=h.get("regionanchorY",100),d.viewportAnchorX=h.get("viewportanchorX",0),d.viewportAnchorY=h.get("viewportanchorY",100),d.scroll=h.get("scroll",""),e.onregion&&e.onregion(d),e.regionList.push({id:h.get("id"),region:d})}}function n(c){var h=new dp;$d(c,function(d,f){switch(d){case"MPEGT":h.integer(d+"S",f);break;case"LOCA":h.set(d+"L",_C(f));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:h.get("MPEGTS"),LOCAL:h.get("LOCAL")})}function a(c){c.match(/X-TIMESTAMP-MAP/)?$d(c,function(h,d){switch(h){case"X-TIMESTAMP-MAP":n(d);break}},/=/):$d(c,function(h,d){switch(h){case"Region":i(d);break}},/:/)}try{var s;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;s=t();var o=s.match(/^WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new on(on.Errors.BadSignature);e.state="HEADER"}for(var l=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(l?l=!1:s=t(),e.state){case"HEADER":/:/.test(s)?a(s):s||(e.state="ID");continue;case"NOTE":s||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){e.state="NOTE";break}if(!s)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch{e.cue.align="middle"}if(e.state="CUE",s.indexOf("-->")===-1){e.cue.id=s;continue}case"CUE":try{rQ(s,e.cue,e.regionList)}catch(c){e.reportOrThrowError(c),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var u=s.indexOf("-->")!==-1;if(!s||u&&(l=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=`
`),e.cue.text+=s.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":s||(e.state="ID");continue}}}catch(c){e.reportOrThrowError(c),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var r=this;try{if(r.buffer+=r.decoder.decode(),(r.cue||r.state==="HEADER")&&(r.buffer+=`
`,r.parse()),r.state==="INITIAL")throw new on(on.Errors.BadSignature)}catch(e){r.reportOrThrowError(e)}return r.onflush&&r.onflush(),this}};var fQ=_f,dQ="auto",pQ={"":1,lr:1,rl:1},vQ={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function gQ(r){if(typeof r!="string")return!1;var e=pQ[r.toLowerCase()];return e?r.toLowerCase():!1}function ob(r){if(typeof r!="string")return!1;var e=vQ[r.toLowerCase()];return e?r.toLowerCase():!1}function X5(r,e,t){this.hasBeenReset=!1;var i="",n=!1,a=r,s=e,o=t,l=null,u="",c=!0,h="auto",d="start",f="auto",p="auto",v=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return i},set:function(m){i=""+m}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(m){n=!!m}},startTime:{enumerable:!0,get:function(){return a},set:function(m){if(typeof m!="number")throw new TypeError("Start time must be set to a number.");a=m,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(m){if(typeof m!="number")throw new TypeError("End time must be set to a number.");s=m,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(m){o=""+m,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(m){l=m,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(m){var y=gQ(m);if(y===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");u=y,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(m){c=!!m,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(m){if(typeof m!="number"&&m!==dQ)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=m,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(m){var y=ob(m);y?(d=y,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return f},set:function(m){if(m<0||m>100)throw new Error("Position must be between 0 and 100.");f=m,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(m){var y=ob(m);y?(p=y,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(m){if(m<0||m>100)throw new Error("Size must be between 0 and 100.");v=m,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(m){var y=ob(m);if(!y)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=y,this.hasBeenReset=!0}}}),this.displayState=void 0}X5.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var mQ=X5,yQ={"":!0,up:!0};function _Q(r){if(typeof r!="string")return!1;var e=yQ[r.toLowerCase()];return e?r.toLowerCase():!1}function nd(r){return typeof r=="number"&&r>=0&&r<=100}function bQ(){var r=100,e=3,t=0,i=100,n=0,a=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return r},set:function(o){if(!nd(o))throw new Error("Width must be between 0 and 100.");r=o}},lines:{enumerable:!0,get:function(){return e},set:function(o){if(typeof o!="number")throw new TypeError("Lines must be set to a number.");e=o}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(o){if(!nd(o))throw new Error("RegionAnchorX must be between 0 and 100.");i=o}},regionAnchorX:{enumerable:!0,get:function(){return t},set:function(o){if(!nd(o))throw new Error("RegionAnchorY must be between 0 and 100.");t=o}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(o){if(!nd(o))throw new Error("ViewportAnchorY must be between 0 and 100.");a=o}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(o){if(!nd(o))throw new Error("ViewportAnchorX must be between 0 and 100.");n=o}},scroll:{enumerable:!0,get:function(){return s},set:function(o){var l=_Q(o);l===!1?console.warn("Scroll: an invalid or illegal string was specified."):s=l}}})}var TQ=bQ,Fs=b_,sc=q5.exports={WebVTT:fQ,VTTCue:mQ,VTTRegion:TQ};Fs.vttjs=sc;Fs.WebVTT=sc.WebVTT;var SQ=sc.VTTCue,xQ=sc.VTTRegion,wQ=Fs.VTTCue,CQ=Fs.VTTRegion;sc.shim=function(){Fs.VTTCue=SQ,Fs.VTTRegion=xQ};sc.restore=function(){Fs.VTTCue=wQ,Fs.VTTRegion=CQ};Fs.VTTCue||sc.shim();var AQ=q5.exports;const iP=Bv(AQ);var nP="https://example.com",S_=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=H.location&&H.location.href||"");var i=/^\/\//.test(e),n=!H.location&&!/\/\//i.test(e);e=new H.URL(e,H.location||nP);var a=new URL(t,e);return n?a.href.slice(nP.length):i?a.href.slice(a.protocol.length):a.href},bC=function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(i,n){this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push(n)},e.off=function(i,n){if(!this.listeners[i])return!1;var a=this.listeners[i].indexOf(n);return this.listeners[i]=this.listeners[i].slice(0),this.listeners[i].splice(a,1),a>-1},e.trigger=function(i){var n=this.listeners[i];if(n)if(arguments.length===2)for(var a=n.length,s=0;s<a;++s)n[s].call(this,arguments[1]);else for(var o=Array.prototype.slice.call(arguments,1),l=n.length,u=0;u<l;++u)n[u].apply(this,o)},e.dispose=function(){this.listeners={}},e.pipe=function(i){this.on("data",function(n){i.push(n)})},r}(),DQ=function(e){return H.atob?H.atob(e):Buffer.from(e,"base64").toString("binary")};function Y5(r){for(var e=DQ(r),t=new Uint8Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class EQ extends bC{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(`
`);t>-1;t=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const IQ=" ",lb=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),t={};return e[1]&&(t.length=parseInt(e[1],10)),e[2]&&(t.offset=parseInt(e[2],10)),t},PQ=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},fi=function(r){const e={};if(!r)return e;const t=r.split(PQ());let i=t.length,n;for(;i--;)t[i]!==""&&(n=/([^=]*)=(.*)/.exec(t[i]).slice(1),n[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),e[n[0]]=n[1]);return e},aP=r=>{const e=r.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class MQ extends bC{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((a,s)=>{const o=s(e);return o===e?a:a.concat([o])},[e]).forEach(a=>{for(let s=0;s<this.customParsers.length;s++)if(this.customParsers[s].call(this,a))return;if(a.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:a.slice(1)});return}if(a=a.replace("\r",""),t=/^#EXTM3U/.exec(a),t){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),t){i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),this.trigger("data",i);return}if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),this.trigger("data",i);return}if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),t){i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),this.trigger("data",i);return}if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),t){i=ar(lb(t[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",i);return}if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),t){i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),this.trigger("data",i);return}if(t=/^#EXT-X-MAP:(.*)$/.exec(a),t){if(i={type:"tag",tagType:"map"},t[1]){const s=fi(t[1]);s.URI&&(i.uri=s.URI),s.BYTERANGE&&(i.byterange=lb(s.BYTERANGE))}this.trigger("data",i);return}if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),t){i={type:"tag",tagType:"stream-inf"},t[1]&&(i.attributes=fi(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=aP(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))),this.trigger("data",i);return}if(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){i={type:"tag",tagType:"media"},t[1]&&(i.attributes=fi(t[1])),this.trigger("data",i);return}if(t=/^#EXT-X-ENDLIST/.exec(a),t){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(t=/^#EXT-X-DISCONTINUITY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),t){i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),this.trigger("data",i);return}if(t=/^#EXT-X-KEY:(.*)$/.exec(a),t){i={type:"tag",tagType:"key"},t[1]&&(i.attributes=fi(t[1]),i.attributes.IV&&(i.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),this.trigger("data",i);return}if(t=/^#EXT-X-START:(.*)$/.exec(a),t){i={type:"tag",tagType:"start"},t[1]&&(i.attributes=fi(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),this.trigger("data",i);return}if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),t){i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",this.trigger("data",i);return}if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),t){i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",this.trigger("data",i);return}if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),t){i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",this.trigger("data",i);return}if(t=/^#EXT-X-SKIP:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"skip"},i.attributes=fi(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(IQ)),this.trigger("data",i);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"part"},i.attributes=fi(t[1]),["DURATION"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseFloat(i.attributes[s]))}),["INDEPENDENT","GAP"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=/YES/.test(i.attributes[s]))}),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=lb(i.attributes.BYTERANGE)),this.trigger("data",i);return}if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"server-control"},i.attributes=fi(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseFloat(i.attributes[s]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=/YES/.test(i.attributes[s]))}),this.trigger("data",i);return}if(t=/^#EXT-X-PART-INF:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"part-inf"},i.attributes=fi(t[1]),["PART-TARGET"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseFloat(i.attributes[s]))}),this.trigger("data",i);return}if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"preload-hint"},i.attributes=fi(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(s){if(i.attributes.hasOwnProperty(s)){i.attributes[s]=parseInt(i.attributes[s],10);const o=s==="BYTERANGE-LENGTH"?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[o]=i.attributes[s],delete i.attributes[s]}}),this.trigger("data",i);return}if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"rendition-report"},i.attributes=fi(t[1]),["LAST-MSN","LAST-PART"].forEach(function(s){i.attributes.hasOwnProperty(s)&&(i.attributes[s]=parseInt(i.attributes[s],10))}),this.trigger("data",i);return}if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(a),t&&t[1]){i={type:"tag",tagType:"daterange"},i.attributes=fi(t[1]),["ID","CLASS"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=String(i.attributes[o]))}),["START-DATE","END-DATE"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=new Date(i.attributes[o]))}),["DURATION","PLANNED-DURATION"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=parseFloat(i.attributes[o]))}),["END-ON-NEXT"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=/YES/i.test(i.attributes[o]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=i.attributes[o].toString(16))});const s=/^X-([A-Z]+-)+[A-Z]+$/;for(const o in i.attributes){if(!s.test(o))continue;const l=/[0-9A-Fa-f]{6}/g.test(i.attributes[o]),u=/^\d+(\.\d+)?$/.test(i.attributes[o]);i.attributes[o]=l?i.attributes[o].toString(16):u?parseFloat(i.attributes[o]):String(i.attributes[o])}this.trigger("data",i);return}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),t){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),t){i={type:"tag",tagType:"content-steering"},i.attributes=fi(t[1]),this.trigger("data",i);return}if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),t){i={type:"tag",tagType:"i-frame-playlist"},i.attributes=fi(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=aP(i.attributes.RESOLUTION)),i.attributes["AVERAGE-BANDWIDTH"]&&(i.attributes["AVERAGE-BANDWIDTH"]=parseInt(i.attributes["AVERAGE-BANDWIDTH"],10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),this.trigger("data",i);return}if(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){i={type:"tag",tagType:"define"},i.attributes=fi(t[1]),this.trigger("data",i);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:t,dataParser:i,segment:n}){typeof i!="function"&&(i=a=>a),this.customParsers.push(a=>{if(e.exec(a))return this.trigger("data",{type:"custom",data:i(a),customType:t,segment:n}),!0})}addTagMapper({expression:e,map:t}){const i=n=>e.test(n)?t(n):n;this.tagMappers.push(i)}}const LQ=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),oo=function(r){const e={};return Object.keys(r).forEach(function(t){e[LQ(t)]=r[t]}),e},ub=function(r){const{serverControl:e,targetDuration:t,partTargetDuration:i}=r;if(!e)return;const n="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=t&&t*3,l=i&&i*2;t&&!e.hasOwnProperty(a)&&(e[a]=o,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&e[a]<o&&(this.trigger("warn",{message:`${n} clamping HOLD-BACK (${e[a]}) to targetDuration * 3 (${o})`}),e[a]=o),i&&!e.hasOwnProperty(s)&&(e[s]=i*3,this.trigger("info",{message:`${n} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[s]}).`})),i&&e[s]<l&&(this.trigger("warn",{message:`${n} clamping PART-HOLD-BACK (${e[s]}) to partTargetDuration * 2 (${l}).`}),e[s]=l)};class kQ extends bC{constructor(e={}){super(),this.lineStream=new EQ,this.parseStream=new MQ,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let n={},a,s,o=!1;const l=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let h=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,f=0;const p={};this.on("end",()=>{n.uri||!n.parts&&!n.preloadHints||(!n.map&&a&&(n.map=a),!n.key&&s&&(n.key=s),!n.timeline&&typeof h=="number"&&(n.timeline=h),this.manifest.preloadSegment=n)}),this.parseStream.on("data",function(v){let g,m;if(t.manifest.definitions){for(const y in t.manifest.definitions)if(v.uri&&(v.uri=v.uri.replace(`{$${y}}`,t.manifest.definitions[y])),v.attributes)for(const _ in v.attributes)typeof v.attributes[_]=="string"&&(v.attributes[_]=v.attributes[_].replace(`{$${y}}`,t.manifest.definitions[y]))}({tag(){({version(){v.version&&(this.manifest.version=v.version)},"allow-cache"(){this.manifest.allowCache=v.allowed,"allowed"in v||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const y={};"length"in v&&(n.byterange=y,y.length=v.length,"offset"in v||(v.offset=d)),"offset"in v&&(n.byterange=y,y.offset=v.offset),d=y.offset+y.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),v.title&&(n.title=v.title),v.duration>0&&(n.duration=v.duration),v.duration===0&&(n.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key(){if(!v.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(v.attributes.METHOD==="NONE"){s=null;return}if(!v.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(v.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:v.attributes};return}if(v.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:v.attributes.URI};return}if(v.attributes.KEYFORMAT===c){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(v.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(v.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),v.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(v.attributes.KEYID&&v.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:v.attributes.KEYFORMAT,keyId:v.attributes.KEYID.substring(2)},pssh:Y5(v.attributes.URI.split(",")[1])};return}v.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),s={method:v.attributes.METHOD||"AES-128",uri:v.attributes.URI},typeof v.attributes.IV<"u"&&(s.iv=v.attributes.IV)},"media-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+v.number});return}this.manifest.mediaSequence=v.number},"discontinuity-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+v.number});return}this.manifest.discontinuitySequence=v.number,h=v.number},"playlist-type"(){if(!/VOD|EVENT/.test(v.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+v.playlist});return}this.manifest.playlistType=v.playlistType},map(){a={},v.uri&&(a.uri=v.uri),v.byterange&&(a.byterange=v.byterange),s&&(a.key=s)},"stream-inf"(){if(this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||u,!v.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}n.attributes||(n.attributes={}),ar(n.attributes,v.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,!(v.attributes&&v.attributes.TYPE&&v.attributes["GROUP-ID"]&&v.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const y=this.manifest.mediaGroups[v.attributes.TYPE];y[v.attributes["GROUP-ID"]]=y[v.attributes["GROUP-ID"]]||{},g=y[v.attributes["GROUP-ID"]],m={default:/yes/i.test(v.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(v.attributes.AUTOSELECT),v.attributes.LANGUAGE&&(m.language=v.attributes.LANGUAGE),v.attributes.URI&&(m.uri=v.attributes.URI),v.attributes["INSTREAM-ID"]&&(m.instreamId=v.attributes["INSTREAM-ID"]),v.attributes.CHARACTERISTICS&&(m.characteristics=v.attributes.CHARACTERISTICS),v.attributes.FORCED&&(m.forced=/yes/i.test(v.attributes.FORCED)),g[v.attributes.NAME]=m},discontinuity(){h+=1,n.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=v.dateTimeString,this.manifest.dateTimeObject=v.dateTimeObject),n.dateTimeString=v.dateTimeString,n.dateTimeObject=v.dateTimeObject;const{lastProgramDateTime:y}=this;this.lastProgramDateTime=new Date(v.dateTimeString).getTime(),y===null&&this.manifest.segments.reduceRight((_,b)=>(b.programDateTime=_-b.duration*1e3,b.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(v.duration)||v.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+v.duration});return}this.manifest.targetDuration=v.duration,ub.call(this,this.manifest)},start(){if(!v.attributes||isNaN(v.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:v.attributes["TIME-OFFSET"],precise:v.attributes.PRECISE}},"cue-out"(){n.cueOut=v.data},"cue-out-cont"(){n.cueOutCont=v.data},"cue-in"(){n.cueIn=v.data},skip(){this.manifest.skip=oo(v.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",v.attributes,["SKIPPED-SEGMENTS"])},part(){o=!0;const y=this.manifest.segments.length,_=oo(v.attributes);n.parts=n.parts||[],n.parts.push(_),_.byterange&&(_.byterange.hasOwnProperty("offset")||(_.byterange.offset=f),f=_.byterange.offset+_.byterange.length);const b=n.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${b} for segment #${y}`,v.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((S,x)=>{S.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${x} lacks required attribute(s): LAST-PART`})})},"server-control"(){const y=this.manifest.serverControl=oo(v.attributes);y.hasOwnProperty("canBlockReload")||(y.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),ub.call(this,this.manifest),y.canSkipDateranges&&!y.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const y=this.manifest.segments.length,_=oo(v.attributes),b=_.type&&_.type==="PART";n.preloadHints=n.preloadHints||[],n.preloadHints.push(_),_.byterange&&(_.byterange.hasOwnProperty("offset")||(_.byterange.offset=b?f:0,b&&(f=_.byterange.offset+_.byterange.length)));const S=n.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${S} for segment #${y}`,v.attributes,["TYPE","URI"]),!!_.type)for(let x=0;x<n.preloadHints.length-1;x++){const C=n.preloadHints[x];C.type&&C.type===_.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${S} for segment #${y} has the same TYPE ${_.type} as preload hint #${x}`})}},"rendition-report"(){const y=oo(v.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(y);const _=this.manifest.renditionReports.length-1,b=["LAST-MSN","URI"];o&&b.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${_}`,v.attributes,b)},"part-inf"(){this.manifest.partInf=oo(v.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",v.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),ub.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(oo(v.attributes));const y=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${y}`,v.attributes,["ID","START-DATE"]);const _=this.manifest.dateRanges[y];_.endDate&&_.startDate&&new Date(_.endDate)<new Date(_.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),_.duration&&_.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),_.plannedDuration&&_.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const b=!!_.endOnNext;if(b&&!_.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),b&&(_.duration||_.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),_.duration&&_.endDate){const x=_.startDate.getTime()+_.duration*1e3;this.manifest.dateRanges[y].endDate=new Date(x)}if(!p[_.id])p[_.id]=_;else{for(const x in p[_.id])if(_[x]&&JSON.stringify(p[_.id][x])!==JSON.stringify(_[x])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const S=this.manifest.dateRanges.findIndex(x=>x.id===_.id);this.manifest.dateRanges[S]=ar(this.manifest.dateRanges[S],_),p[_.id]=ar(p[_.id],_),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=oo(v.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",v.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const y=(_,b)=>{if(_ in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${_}`});return}this.manifest.definitions[_]=b};if("QUERYPARAM"in v.attributes){if("NAME"in v.attributes||"IMPORT"in v.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const _=this.params.get(v.attributes.QUERYPARAM);if(!_){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${v.attributes.QUERYPARAM}`});return}y(v.attributes.QUERYPARAM,decodeURIComponent(_));return}if("NAME"in v.attributes){if("IMPORT"in v.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in v.attributes)||typeof v.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${v.attributes.NAME}`});return}y(v.attributes.NAME,v.attributes.VALUE);return}if("IMPORT"in v.attributes){if(!this.mainDefinitions[v.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${v.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}y(v.attributes.IMPORT,this.mainDefinitions[v.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:v.attributes,uri:v.uri,timeline:h}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",v.attributes,["BANDWIDTH","URI"])}}[v.tagType]||l).call(t)},uri(){n.uri=v.uri,i.push(n),this.manifest.targetDuration&&!("duration"in n)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),n.duration=this.manifest.targetDuration),s&&(n.key=s),n.timeline=h,a&&(n.map=a),f=0,this.lastProgramDateTime!==null&&(n.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=n.duration*1e3),n={}},comment(){},custom(){v.segment?(n.custom=n.custom||{},n.custom[v.customType]=v.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[v.customType]=v.data)}})[v.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const n=[];i.forEach(function(a){t.hasOwnProperty(a)||n.push(a)}),n.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${n.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var Cu={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},RQ=["video","audio","text"],sP=["Video","Audio","Text"],K5=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(t,i,n){var a=("00"+Number(i).toString(16)).slice(-2),s=("00"+Number(n).toString(16)).slice(-2);return"avc1."+a+"00"+s})},ka=function(e){e===void 0&&(e="");var t=e.split(","),i=[];return t.forEach(function(n){n=n.trim();var a;RQ.forEach(function(s){var o=Cu[s].exec(n.toLowerCase());if(!(!o||o.length<=1)){a=s;var l=n.substring(0,o[1].length),u=n.replace(l,"");i.push({type:l,details:u,mediaType:s})}}),a||i.push({type:n,details:"",mediaType:"unknown"})}),i},OQ=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var a=i[n];if(a.default&&a.playlists)return ka(a.playlists[0].attributes.CODECS)}return null},Z5=function(e){return e===void 0&&(e=""),Cu.audio.test(e.trim().toLowerCase())},NQ=function(e){return e===void 0&&(e=""),Cu.text.test(e.trim().toLowerCase())},Uh=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return K5(a.trim())}),i="video";t.length===1&&Z5(t[0])?i="audio":t.length===1&&NQ(t[0])&&(i="application");var n="mp4";return t.every(function(a){return Cu.mp4.test(a)})?n="mp4":t.every(function(a){return Cu.webm.test(a)})?n="webm":t.every(function(a){return Cu.ogg.test(a)})&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}},pp=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),H.MediaSource&&H.MediaSource.isTypeSupported&&H.MediaSource.isTypeSupported(Uh(e))||t&&H.ManagedMediaSource&&H.ManagedMediaSource.isTypeSupported&&H.ManagedMediaSource.isTypeSupported(Uh(e))||!1},cb=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var i=0;i<sP.length;i++){var n=sP[i];if(Cu["muxer"+n].test(t))return!0}return!1})},oP="mp4a.40.2",BQ="avc1.4d400d",FQ=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,UQ=/^application\/dash\+xml/i,Q5=function(e){return FQ.test(e)?"hls":UQ.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},VQ=function(e){return e.toString(2).length},zQ=function(e){return Math.ceil(VQ(e)/8)},J5=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},GQ=function(e){return J5(e)},$e=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!GQ(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Xr=H.BigInt||Number,Cx=[Xr("0x1"),Xr("0x100"),Xr("0x10000"),Xr("0x1000000"),Xr("0x100000000"),Xr("0x10000000000"),Xr("0x1000000000000"),Xr("0x100000000000000"),Xr("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var HQ=function(e,t){var i=t===void 0?{}:t,n=i.signed,a=n===void 0?!1:n,s=i.le,o=s===void 0?!1:s;e=$e(e);var l=o?"reduce":"reduceRight",u=e[l]?e[l]:Array.prototype[l],c=u.call(e,function(d,f,p){var v=o?p:Math.abs(p+1-e.length);return d+Xr(f)*Cx[v]},Xr(0));if(a){var h=Cx[e.length]/Xr(2)-Xr(1);c=Xr(c),c>h&&(c-=h,c-=h,c-=Xr(2))}return Number(c)},$Q=function(e,t){var i={},n=i.le,a=n===void 0?!1:n;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Xr(e);for(var s=zQ(e),o=new Uint8Array(new ArrayBuffer(s)),l=0;l<s;l++){var u=a?l:Math.abs(l+1-o.length);o[u]=Number(e/Cx[l]&Xr(255)),e<0&&(o[u]=Math.abs(~o[u]),o[u]-=l===0?1:2)}return o},e4=function(e,t){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},WQ=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(o){return o&&(o.byteLength||o.length)&&typeof o!="string"}),t.length<=1)return $e(t[0]);var n=t.reduce(function(o,l,u){return o+(l.byteLength||l.length)},0),a=new Uint8Array(n),s=0;return t.forEach(function(o){o=$e(o),a.set(o,s),s+=o.byteLength}),a},qt=function(e,t,i){var n=i===void 0?{}:i,a=n.offset,s=a===void 0?0:a,o=n.mask,l=o===void 0?[]:o;e=$e(e),t=$e(t);var u=t.every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&u.call(t,function(c,h){var d=l[h]?l[h]&e[s+h]:e[s+h];return c===d})},qQ=function(e,t,i){t.forEach(function(n){for(var a in e.mediaGroups[n])for(var s in e.mediaGroups[n][a]){var o=e.mediaGroups[n][a][s];i(o,n,a,s)}})},ol={},Qs={};function jQ(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var i=0;i<r.length;i++)if(Object.prototype.hasOwnProperty.call(r,i)){var n=r[i];if(e.call(void 0,n,i,r))return n}}function TC(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}function XQ(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}var t4=TC({HTML:"text/html",isHTML:function(r){return r===t4.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r4=TC({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===r4.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Qs.assign=XQ;Qs.find=jQ;Qs.freeze=TC;Qs.MIME_TYPE=t4;Qs.NAMESPACE=r4;var i4=Qs,Ya=i4.find,$p=i4.NAMESPACE;function YQ(r){return r!==""}function KQ(r){return r?r.split(/[\t\n\f\r ]+/).filter(YQ):[]}function ZQ(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}function lP(r){if(!r)return[];var e=KQ(r);return Object.keys(e.reduce(ZQ,{}))}function QQ(r){return function(e){return r&&r.indexOf(e)!==-1}}function Fv(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}function Zi(r,e){var t=r.prototype;if(!(t instanceof e)){let n=function(){};var i=n;n.prototype=e.prototype,n=new n,Fv(t,n),r.prototype=t=n}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}var Qi={},da=Qi.ELEMENT_NODE=1,Vh=Qi.ATTRIBUTE_NODE=2,Fy=Qi.TEXT_NODE=3,n4=Qi.CDATA_SECTION_NODE=4,a4=Qi.ENTITY_REFERENCE_NODE=5,JQ=Qi.ENTITY_NODE=6,s4=Qi.PROCESSING_INSTRUCTION_NODE=7,o4=Qi.COMMENT_NODE=8,l4=Qi.DOCUMENT_NODE=9,u4=Qi.DOCUMENT_TYPE_NODE=10,Us=Qi.DOCUMENT_FRAGMENT_NODE=11,eJ=Qi.NOTATION_NODE=12,ci={},Hr={};ci.INDEX_SIZE_ERR=(Hr[1]="Index size error",1);ci.DOMSTRING_SIZE_ERR=(Hr[2]="DOMString size error",2);var Oi=ci.HIERARCHY_REQUEST_ERR=(Hr[3]="Hierarchy request error",3);ci.WRONG_DOCUMENT_ERR=(Hr[4]="Wrong document",4);ci.INVALID_CHARACTER_ERR=(Hr[5]="Invalid character",5);ci.NO_DATA_ALLOWED_ERR=(Hr[6]="No data allowed",6);ci.NO_MODIFICATION_ALLOWED_ERR=(Hr[7]="No modification allowed",7);var c4=ci.NOT_FOUND_ERR=(Hr[8]="Not found",8);ci.NOT_SUPPORTED_ERR=(Hr[9]="Not supported",9);var uP=ci.INUSE_ATTRIBUTE_ERR=(Hr[10]="Attribute in use",10);ci.INVALID_STATE_ERR=(Hr[11]="Invalid state",11);ci.SYNTAX_ERR=(Hr[12]="Syntax error",12);ci.INVALID_MODIFICATION_ERR=(Hr[13]="Invalid modification",13);ci.NAMESPACE_ERR=(Hr[14]="Invalid namespace",14);ci.INVALID_ACCESS_ERR=(Hr[15]="Invalid access",15);function gr(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Hr[r]),this.message=Hr[r],Error.captureStackTrace&&Error.captureStackTrace(this,gr);return t.code=r,e&&(this.message=this.message+": "+e),t}gr.prototype=Error.prototype;Fv(ci,gr);function Ms(){}Ms.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,e){for(var t=[],i=0;i<this.length;i++)uh(this[i],t,r,e);return t.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function zh(r,e){this._node=r,this._refresh=e,SC(this)}function SC(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(S4(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var i=t.length;i in r;i++)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i];Fv(t,r),r._inc=e}}zh.prototype.item=function(r){return SC(this),this[r]||null};Zi(zh,Ms);function Uy(){}function h4(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}function cP(r,e,t,i){if(i?e[h4(e,i)]=t:e[e.length++]=t,r){t.ownerElement=r;var n=r.ownerDocument;n&&(i&&p4(n,r,i),tJ(n,r,t))}}function hP(r,e,t){var i=h4(e,t);if(i>=0){for(var n=e.length-1;i<n;)e[i]=e[++i];if(e.length=n,r){var a=r.ownerDocument;a&&(p4(a,r,t),t.ownerElement=null)}}else throw new gr(c4,new Error(r.tagName+"@"+t))}Uy.prototype={length:0,item:Ms.prototype.item,getNamedItem:function(r){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==r)return t}},setNamedItem:function(r){var e=r.ownerElement;if(e&&e!=this._ownerElement)throw new gr(uP);var t=this.getNamedItem(r.nodeName);return cP(this._ownerElement,this,r,t),t},setNamedItemNS:function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new gr(uP);return t=this.getNamedItemNS(r.namespaceURI,r.localName),cP(this._ownerElement,this,r,t),t},removeNamedItem:function(r){var e=this.getNamedItem(r);return hP(this._ownerElement,this,e),e},removeNamedItemNS:function(r,e){var t=this.getNamedItemNS(r,e);return hP(this._ownerElement,this,t),t},getNamedItemNS:function(r,e){for(var t=this.length;t--;){var i=this[t];if(i.localName==e&&i.namespaceURI==r)return i}return null}};function f4(){}f4.prototype={hasFeature:function(r,e){return!0},createDocument:function(r,e,t){var i=new Uv;if(i.implementation=this,i.childNodes=new Ms,i.doctype=t||null,t&&i.appendChild(t),e){var n=i.createElementNS(r,e);i.appendChild(n)}return i},createDocumentType:function(r,e,t){var i=new x_;return i.name=r,i.nodeName=r,i.publicId=e||"",i.systemId=t||"",i}};function Rt(){}Rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,e){return Vy(this,r,e)},replaceChild:function(r,e){Vy(this,r,e,g4),e&&this.removeChild(e)},removeChild:function(r){return v4(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return Ax(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==Fy&&r.nodeType==Fy?(this.removeChild(e),r.appendData(e.data)):(r.normalize(),r=e)}},isSupported:function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&t[i]===r)return i}e=e.nodeType==Vh?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(r){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];e=e.nodeType==Vh?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(r){var e=this.lookupPrefix(r);return e==null}};function d4(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}Fv(Qi,Rt);Fv(Qi,Rt.prototype);function Wp(r,e){if(e(r))return!0;if(r=r.firstChild)do if(Wp(r,e))return!0;while(r=r.nextSibling)}function Uv(){this.ownerDocument=this}function tJ(r,e,t){r&&r._inc++;var i=t.namespaceURI;i===$p.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function p4(r,e,t,i){r&&r._inc++;var n=t.namespaceURI;n===$p.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function xC(r,e,t){if(r&&r._inc){r._inc++;var i=e.childNodes;if(t)i[i.length++]=t;else{for(var n=e.firstChild,a=0;n;)i[a++]=n,n=n.nextSibling;i.length=a,delete i[i.length]}}}function v4(r,e){var t=e.previousSibling,i=e.nextSibling;return t?t.nextSibling=i:r.firstChild=i,i?i.previousSibling=t:r.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,xC(r.ownerDocument,r),e}function rJ(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function iJ(r){return r&&(Ka(r)||wC(r)||Vs(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function Vs(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Ka(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function wC(r){return r&&r.nodeType===Rt.TEXT_NODE}function fP(r,e){var t=r.childNodes||[];if(Ya(t,Ka)||Vs(e))return!1;var i=Ya(t,Vs);return!(e&&i&&t.indexOf(i)>t.indexOf(e))}function dP(r,e){var t=r.childNodes||[];function i(a){return Ka(a)&&a!==e}if(Ya(t,i))return!1;var n=Ya(t,Vs);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function nJ(r,e,t){if(!rJ(r))throw new gr(Oi,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new gr(c4,"child not in parent");if(!iJ(e)||Vs(e)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new gr(Oi,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}function aJ(r,e,t){var i=r.childNodes||[],n=e.childNodes||[];if(e.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var a=n.filter(Ka);if(a.length>1||Ya(n,wC))throw new gr(Oi,"More than one element or text in fragment");if(a.length===1&&!fP(r,t))throw new gr(Oi,"Element in fragment can not be inserted before doctype")}if(Ka(e)&&!fP(r,t))throw new gr(Oi,"Only one element can be added and only after doctype");if(Vs(e)){if(Ya(i,Vs))throw new gr(Oi,"Only one doctype is allowed");var s=Ya(i,Ka);if(t&&i.indexOf(s)<i.indexOf(t))throw new gr(Oi,"Doctype can only be inserted before an element");if(!t&&s)throw new gr(Oi,"Doctype can not be appended since element is present")}}function g4(r,e,t){var i=r.childNodes||[],n=e.childNodes||[];if(e.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var a=n.filter(Ka);if(a.length>1||Ya(n,wC))throw new gr(Oi,"More than one element or text in fragment");if(a.length===1&&!dP(r,t))throw new gr(Oi,"Element in fragment can not be inserted before doctype")}if(Ka(e)&&!dP(r,t))throw new gr(Oi,"Only one element can be added and only after doctype");if(Vs(e)){let l=function(u){return Vs(u)&&u!==t};var o=l;if(Ya(i,l))throw new gr(Oi,"Only one doctype is allowed");var s=Ya(i,Ka);if(t&&i.indexOf(s)<i.indexOf(t))throw new gr(Oi,"Doctype can only be inserted before an element")}}function Vy(r,e,t,i){nJ(r,e,t),r.nodeType===Rt.DOCUMENT_NODE&&(i||aJ)(r,e,t);var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===Us){var a=e.firstChild;if(a==null)return e;var s=e.lastChild}else a=s=e;var o=t?t.previousSibling:r.lastChild;a.previousSibling=o,s.nextSibling=t,o?o.nextSibling=a:r.firstChild=a,t==null?r.lastChild=s:t.previousSibling=s;do a.parentNode=r;while(a!==s&&(a=a.nextSibling));return xC(r.ownerDocument||r,r),e.nodeType==Us&&(e.firstChild=e.lastChild=null),e}function sJ(r,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=r,e.previousSibling=r.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,r.lastChild=e,xC(r.ownerDocument,r,e),e}Uv.prototype={nodeName:"#document",nodeType:l4,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,e){if(r.nodeType==Us){for(var t=r.firstChild;t;){var i=t.nextSibling;this.insertBefore(t,e),t=i}return r}return Vy(this,r,e),r.ownerDocument=this,this.documentElement===null&&r.nodeType===da&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),v4(this,r)},replaceChild:function(r,e){Vy(this,r,e,g4),r.ownerDocument=this,e&&this.removeChild(e),Ka(r)&&(this.documentElement=r)},importNode:function(r,e){return T4(this,r,e)},getElementById:function(r){var e=null;return Wp(this.documentElement,function(t){if(t.nodeType==da&&t.getAttribute("id")==r)return e=t,!0}),e},getElementsByClassName:function(r){var e=lP(r);return new zh(this,function(t){var i=[];return e.length>0&&Wp(t.documentElement,function(n){if(n!==t&&n.nodeType===da){var a=n.getAttribute("class");if(a){var s=r===a;if(!s){var o=lP(a);s=e.every(QQ(o))}s&&i.push(n)}}}),i})},createElement:function(r){var e=new ju;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new Ms;var t=e.attributes=new Uy;return t._ownerElement=e,e},createDocumentFragment:function(){var r=new w_;return r.ownerDocument=this,r.childNodes=new Ms,r},createTextNode:function(r){var e=new CC;return e.ownerDocument=this,e.appendData(r),e},createComment:function(r){var e=new AC;return e.ownerDocument=this,e.appendData(r),e},createCDATASection:function(r){var e=new DC;return e.ownerDocument=this,e.appendData(r),e},createProcessingInstruction:function(r,e){var t=new IC;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=r,t.nodeValue=t.data=e,t},createAttribute:function(r){var e=new zy;return e.ownerDocument=this,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},createEntityReference:function(r){var e=new EC;return e.ownerDocument=this,e.nodeName=r,e},createElementNS:function(r,e){var t=new ju,i=e.split(":"),n=t.attributes=new Uy;return t.childNodes=new Ms,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=r,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,n._ownerElement=t,t},createAttributeNS:function(r,e){var t=new zy,i=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=r,t.specified=!0,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,t}};Zi(Uv,Rt);function ju(){this._nsMap={}}ju.prototype={nodeType:da,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var e=this.getAttributeNode(r);return e&&e.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,e){var t=this.ownerDocument.createAttribute(r);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},appendChild:function(r){return r.nodeType===Us?this.insertBefore(r,null):sJ(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(r,e){return this.getAttributeNodeNS(r,e)!=null},getAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);return t&&t.value||""},setAttributeNS:function(r,e,t){var i=this.ownerDocument.createAttributeNS(r,e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},getAttributeNodeNS:function(r,e){return this.attributes.getNamedItemNS(r,e)},getElementsByTagName:function(r){return new zh(this,function(e){var t=[];return Wp(e,function(i){i!==e&&i.nodeType==da&&(r==="*"||i.tagName==r)&&t.push(i)}),t})},getElementsByTagNameNS:function(r,e){return new zh(this,function(t){var i=[];return Wp(t,function(n){n!==t&&n.nodeType===da&&(r==="*"||n.namespaceURI===r)&&(e==="*"||n.localName==e)&&i.push(n)}),i})}};Uv.prototype.getElementsByTagName=ju.prototype.getElementsByTagName;Uv.prototype.getElementsByTagNameNS=ju.prototype.getElementsByTagNameNS;Zi(ju,Rt);function zy(){}zy.prototype.nodeType=Vh;Zi(zy,Rt);function Vv(){}Vv.prototype={data:"",substringData:function(r,e){return this.data.substring(r,r+e)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,e){this.replaceData(r,0,e)},appendChild:function(r){throw new Error(Hr[Oi])},deleteData:function(r,e){this.replaceData(r,e,"")},replaceData:function(r,e,t){var i=this.data.substring(0,r),n=this.data.substring(r+e);t=i+t+n,this.nodeValue=this.data=t,this.length=t.length}};Zi(Vv,Rt);function CC(){}CC.prototype={nodeName:"#text",nodeType:Fy,splitText:function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};Zi(CC,Vv);function AC(){}AC.prototype={nodeName:"#comment",nodeType:o4};Zi(AC,Vv);function DC(){}DC.prototype={nodeName:"#cdata-section",nodeType:n4};Zi(DC,Vv);function x_(){}x_.prototype.nodeType=u4;Zi(x_,Rt);function m4(){}m4.prototype.nodeType=eJ;Zi(m4,Rt);function y4(){}y4.prototype.nodeType=JQ;Zi(y4,Rt);function EC(){}EC.prototype.nodeType=a4;Zi(EC,Rt);function w_(){}w_.prototype.nodeName="#document-fragment";w_.prototype.nodeType=Us;Zi(w_,Rt);function IC(){}IC.prototype.nodeType=s4;Zi(IC,Rt);function _4(){}_4.prototype.serializeToString=function(r,e,t){return b4.call(r,e,t)};Rt.prototype.toString=b4;function b4(r,e){var t=[],i=this.nodeType==9&&this.documentElement||this,n=i.prefix,a=i.namespaceURI;if(a&&n==null){var n=i.lookupPrefix(a);if(n==null)var s=[{namespace:a,prefix:null}]}return uh(this,t,r,e,s),t.join("")}function pP(r,e,t){var i=r.prefix||"",n=r.namespaceURI;if(!n||i==="xml"&&n===$p.XML||n===$p.XMLNS)return!1;for(var a=t.length;a--;){var s=t[a];if(s.prefix===i)return s.namespace!==n}return!0}function hb(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,d4),'"')}function uh(r,e,t,i,n){if(n||(n=[]),i)if(r=i(r),r){if(typeof r=="string"){e.push(r);return}}else return;switch(r.nodeType){case da:var a=r.attributes,s=a.length,m=r.firstChild,o=r.tagName;t=$p.isHTML(r.namespaceURI)||t;var l=o;if(!t&&!r.prefix&&r.namespaceURI){for(var u,c=0;c<a.length;c++)if(a.item(c).name==="xmlns"){u=a.item(c).value;break}if(!u)for(var h=n.length-1;h>=0;h--){var d=n[h];if(d.prefix===""&&d.namespace===r.namespaceURI){u=d.namespace;break}}if(u!==r.namespaceURI)for(var h=n.length-1;h>=0;h--){var d=n[h];if(d.namespace===r.namespaceURI){d.prefix&&(l=d.prefix+":"+o);break}}}e.push("<",l);for(var f=0;f<s;f++){var p=a.item(f);p.prefix=="xmlns"?n.push({prefix:p.localName,namespace:p.value}):p.nodeName=="xmlns"&&n.push({prefix:"",namespace:p.value})}for(var f=0;f<s;f++){var p=a.item(f);if(pP(p,t,n)){var v=p.prefix||"",g=p.namespaceURI;hb(e,v?"xmlns:"+v:"xmlns",g),n.push({prefix:v,namespace:g})}uh(p,e,t,i,n)}if(o===l&&pP(r,t,n)){var v=r.prefix||"",g=r.namespaceURI;hb(e,v?"xmlns:"+v:"xmlns",g),n.push({prefix:v,namespace:g})}if(m||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(e.push(">"),t&&/^script$/i.test(o))for(;m;)m.data?e.push(m.data):uh(m,e,t,i,n.slice()),m=m.nextSibling;else for(;m;)uh(m,e,t,i,n.slice()),m=m.nextSibling;e.push("</",l,">")}else e.push("/>");return;case l4:case Us:for(var m=r.firstChild;m;)uh(m,e,t,i,n.slice()),m=m.nextSibling;return;case Vh:return hb(e,r.name,r.value);case Fy:return e.push(r.data.replace(/[<&>]/g,d4));case n4:return e.push("<![CDATA[",r.data,"]]>");case o4:return e.push("<!--",r.data,"-->");case u4:var y=r.publicId,_=r.systemId;if(e.push("<!DOCTYPE ",r.name),y)e.push(" PUBLIC ",y),_&&_!="."&&e.push(" ",_),e.push(">");else if(_&&_!=".")e.push(" SYSTEM ",_,">");else{var b=r.internalSubset;b&&e.push(" [",b,"]"),e.push(">")}return;case s4:return e.push("<?",r.target," ",r.data,"?>");case a4:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}function T4(r,e,t){var i;switch(e.nodeType){case da:i=e.cloneNode(!1),i.ownerDocument=r;case Us:break;case Vh:t=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=r,i.parentNode=null,t)for(var n=e.firstChild;n;)i.appendChild(T4(r,n,t)),n=n.nextSibling;return i}function Ax(r,e,t){var i=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=e[n];typeof a!="object"&&a!=i[n]&&(i[n]=a)}switch(e.childNodes&&(i.childNodes=new Ms),i.ownerDocument=r,i.nodeType){case da:var s=e.attributes,o=i.attributes=new Uy,l=s.length;o._ownerElement=i;for(var u=0;u<l;u++)i.setAttributeNode(Ax(r,s.item(u),!0));break;case Vh:t=!0}if(t)for(var c=e.firstChild;c;)i.appendChild(Ax(r,c,t)),c=c.nextSibling;return i}function S4(r,e,t){r[e]=t}try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case da:case Us:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(r(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};var kAe=r;Object.defineProperty(zh.prototype,"length",{get:function(){return SC(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(e){switch(this.nodeType){case da:case Us:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),S4=function(e,t,i){e["$$"+t]=i}}}catch{}ol.DocumentType=x_;ol.DOMException=gr;ol.DOMImplementation=f4;ol.Element=ju;ol.Node=Rt;ol.NodeList=Ms;ol.XMLSerializer=_4;var C_={},x4={};(function(r){var e=Qs.freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"",dd:"",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:"",emsp13:"",emsp14:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"",escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",ExponentialE:"",exponentiale:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",Fscr:"",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"",hfr:"𝔥",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",Lscr:"",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"",midast:"*",midcir:"⫰",middot:"·",minus:"",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",Or:"⩔",or:"",orarr:"↻",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",Popf:"",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"",rationals:"",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",Rscr:"",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",Tilde:"",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"",vee:"",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),r.entityMap=r.HTML_ENTITIES})(x4);var PC={},qp=Qs.NAMESPACE,Dx=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,vP=new RegExp("[\\-\\.0-9"+Dx.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),gP=new RegExp("^"+Dx.source+vP.source+"*(?::"+Dx.source+vP.source+"*)?$"),ad=0,lo=1,wc=2,sd=3,Cc=4,Ac=5,od=6,Ug=7;function Gh(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Gh)}Gh.prototype=new Error;Gh.prototype.name=Gh.name;function w4(){}w4.prototype={parse:function(r,e,t){var i=this.domBuilder;i.startDocument(),C4(e,e={}),oJ(r,e,t,i,this.errorHandler),i.endDocument()}};function oJ(r,e,t,i,n){function a(U){if(U>65535){U-=65536;var $=55296+(U>>10),q=56320+(U&1023);return String.fromCharCode($,q)}else return String.fromCharCode(U)}function s(U){var $=U.slice(1,-1);return Object.hasOwnProperty.call(t,$)?t[$]:$.charAt(0)==="#"?a(parseInt($.substr(1).replace("x","0x"))):(n.error("entity not found:"+U),U)}function o(U){if(U>v){var $=r.substring(v,U).replace(/&#?\w+;/g,s);d&&l(v),i.characters($,0,U-v),v=U}}function l(U,$){for(;U>=c&&($=h.exec(r));)u=$.index,c=u+$[0].length,d.lineNumber++;d.columnNumber=U-u+1}for(var u=0,c=0,h=/.*(?:\r\n?|\n)|.*$/g,d=i.locator,f=[{currentNSMap:e}],p={},v=0;;){try{var g=r.indexOf("<",v);if(g<0){if(!r.substr(v).match(/^\s*$/)){var m=i.doc,y=m.createTextNode(r.substr(v));m.appendChild(y),i.currentElement=y}return}switch(g>v&&o(g),r.charAt(g+1)){case"/":var L=r.indexOf(">",g+3),_=r.substring(g+2,L).replace(/[ \t\n\r]+$/g,""),b=f.pop();L<0?(_=r.substring(g+2).replace(/[\s<].*/,""),n.error("end tag name: "+_+" is not complete:"+b.tagName),L=g+1+_.length):_.match(/\s</)&&(_=_.replace(/[\s<].*/,""),n.error("end tag name: "+_+" maybe not complete"),L=g+1+_.length);var S=b.localNSMap,x=b.tagName==_,C=x||b.tagName&&b.tagName.toLowerCase()==_.toLowerCase();if(C){if(i.endElement(b.uri,b.localName,_),S)for(var D in S)Object.prototype.hasOwnProperty.call(S,D)&&i.endPrefixMapping(D);x||n.fatalError("end tag name: "+_+" is not match the current start tagName:"+b.tagName)}else f.push(b);L++;break;case"?":d&&l(g),L=fJ(r,g,i);break;case"!":d&&l(g),L=hJ(r,g,i,n);break;default:d&&l(g);var I=new A4,M=f[f.length-1].currentNSMap,L=lJ(r,g,I,M,s,n),N=I.length;if(!I.closed&&cJ(r,L,I.tagName,p)&&(I.closed=!0,t.nbsp||n.warning("unclosed xml attribute")),d&&N){for(var O=mP(d,{}),B=0;B<N;B++){var F=I[B];l(F.offset),F.locator=mP(d,{})}i.locator=O,yP(I,i,M)&&f.push(I),i.locator=d}else yP(I,i,M)&&f.push(I);qp.isHTML(I.uri)&&!I.closed?L=uJ(r,L,I.tagName,s,i):L++}}catch(U){if(U instanceof Gh)throw U;n.error("element parse error: "+U),L=-1}L>v?v=L:o(Math.max(g,v)+1)}}function mP(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}function lJ(r,e,t,i,n,a){function s(d,f,p){t.attributeNames.hasOwnProperty(d)&&a.fatalError("Attribute "+d+" redefined"),t.addValue(d,f.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),p)}for(var o,l,u=++e,c=ad;;){var h=r.charAt(u);switch(h){case"=":if(c===lo)o=r.slice(e,u),c=sd;else if(c===wc)c=sd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(c===sd||c===lo)if(c===lo&&(a.warning('attribute value must after "="'),o=r.slice(e,u)),e=u+1,u=r.indexOf(h,e),u>0)l=r.slice(e,u),s(o,l,e-1),c=Ac;else throw new Error("attribute value no end '"+h+"' match");else if(c==Cc)l=r.slice(e,u),s(o,l,e),a.warning('attribute "'+o+'" missed start quot('+h+")!!"),e=u+1,c=Ac;else throw new Error('attribute value must after "="');break;case"/":switch(c){case ad:t.setTagName(r.slice(e,u));case Ac:case od:case Ug:c=Ug,t.closed=!0;case Cc:case lo:break;case wc:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),c==ad&&t.setTagName(r.slice(e,u)),u;case">":switch(c){case ad:t.setTagName(r.slice(e,u));case Ac:case od:case Ug:break;case Cc:case lo:l=r.slice(e,u),l.slice(-1)==="/"&&(t.closed=!0,l=l.slice(0,-1));case wc:c===wc&&(l=o),c==Cc?(a.warning('attribute "'+l+'" missed quot(")!'),s(o,l,e)):((!qp.isHTML(i[""])||!l.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),s(l,l,e));break;case sd:throw new Error("attribute value missed!!")}return u;case"€":h=" ";default:if(h<=" ")switch(c){case ad:t.setTagName(r.slice(e,u)),c=od;break;case lo:o=r.slice(e,u),c=wc;break;case Cc:var l=r.slice(e,u);a.warning('attribute "'+l+'" missed quot(")!!'),s(o,l,e);case Ac:c=od;break}else switch(c){case wc:t.tagName,(!qp.isHTML(i[""])||!o.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),s(o,o,e),e=u,c=lo;break;case Ac:a.warning('attribute space is required"'+o+'"!!');case od:c=lo,e=u;break;case sd:c=Cc,e=u;break;case Ug:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function yP(r,e,t){for(var i=r.tagName,n=null,h=r.length;h--;){var a=r[h],s=a.qName,o=a.value,d=s.indexOf(":");if(d>0)var l=a.prefix=s.slice(0,d),u=s.slice(d+1),c=l==="xmlns"&&u;else u=s,l=null,c=s==="xmlns"&&"";a.localName=u,c!==!1&&(n==null&&(n={},C4(t,t={})),t[c]=n[c]=o,a.uri=qp.XMLNS,e.startPrefixMapping(c,o))}for(var h=r.length;h--;){a=r[h];var l=a.prefix;l&&(l==="xml"&&(a.uri=qp.XML),l!=="xmlns"&&(a.uri=t[l||""]))}var d=i.indexOf(":");d>0?(l=r.prefix=i.slice(0,d),u=r.localName=i.slice(d+1)):(l=null,u=r.localName=i);var f=r.uri=t[l||""];if(e.startElement(f,u,i,r),r.closed){if(e.endElement(f,u,i),n)for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&e.endPrefixMapping(l)}else return r.currentNSMap=t,r.localNSMap=n,!0}function uJ(r,e,t,i,n){if(/^(?:script|textarea)$/i.test(t)){var a=r.indexOf("</"+t+">",e),s=r.substring(e+1,a);if(/[&<]/.test(s))return/^script$/i.test(t)?(n.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,i),n.characters(s,0,s.length),a)}return e+1}function cJ(r,e,t,i){var n=i[t];return n==null&&(n=r.lastIndexOf("</"+t+">"),n<e&&(n=r.lastIndexOf("</"+t)),i[t]=n),n<e}function C4(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}function hJ(r,e,t,i){var n=r.charAt(e+2);switch(n){case"-":if(r.charAt(e+3)==="-"){var a=r.indexOf("-->",e+4);return a>e?(t.comment(r,e+4,a-e-4),a+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(e+3,6)=="CDATA["){var a=r.indexOf("]]>",e+9);return t.startCDATA(),t.characters(r,e+9,a-e-9),t.endCDATA(),a+3}var s=dJ(r,e),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var l=s[1][0],u=!1,c=!1;o>3&&(/^public$/i.test(s[2][0])?(u=s[3][0],c=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(c=s[3][0]));var h=s[o-1];return t.startDTD(l,u,c),t.endDTD(),h.index+h[0].length}}return-1}function fJ(r,e,t){var i=r.indexOf("?>",e);if(i){var n=r.substring(e,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,t.processingInstruction(n[1],n[2]),i+2):-1}return-1}function A4(){this.attributeNames={}}A4.prototype={setTagName:function(r){if(!gP.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,e,t){if(!gP.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:t}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function dJ(r,e){var t,i=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=e,n.exec(r);t=n.exec(r);)if(i.push(t),t[1])return i}PC.XMLReader=w4;PC.ParseError=Gh;var pJ=Qs,vJ=ol,_P=x4,D4=PC,gJ=vJ.DOMImplementation,bP=pJ.NAMESPACE,mJ=D4.ParseError,yJ=D4.XMLReader;function E4(r){return r.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function I4(r){this.options=r||{locator:{}}}I4.prototype.parseFromString=function(r,e){var t=this.options,i=new yJ,n=t.domBuilder||new zv,a=t.errorHandler,s=t.locator,o=t.xmlns||{},l=/\/x?html?$/.test(e),u=l?_P.HTML_ENTITIES:_P.XML_ENTITIES;s&&n.setDocumentLocator(s),i.errorHandler=_J(a,n,s),i.domBuilder=t.domBuilder||n,l&&(o[""]=bP.HTML),o.xml=o.xml||bP.XML;var c=t.normalizeLineEndings||E4;return r&&typeof r=="string"?i.parse(c(r),o,u):i.errorHandler.error("invalid doc source"),n.doc};function _J(r,e,t){if(!r){if(e instanceof zv)return e;r=e}var i={},n=r instanceof Function;t=t||{};function a(s){var o=r[s];!o&&n&&(o=r.length==2?function(l){r(s,l)}:r),i[s]=o&&function(l){o("[xmldom "+s+"] "+l+Ex(t))}||function(){}}return a("warning"),a("error"),a("fatalError"),i}function zv(){this.cdata=!1}function Dc(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}zv.prototype={startDocument:function(){this.doc=new gJ().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,e,t,i){var n=this.doc,a=n.createElementNS(r,t||e),s=i.length;Vg(this,a),this.currentElement=a,this.locator&&Dc(this.locator,a);for(var o=0;o<s;o++){var r=i.getURI(o),l=i.getValue(o),t=i.getQName(o),u=n.createAttributeNS(r,t);this.locator&&Dc(i.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},endElement:function(r,e,t){var i=this.currentElement;i.tagName,this.currentElement=i.parentNode},startPrefixMapping:function(r,e){},endPrefixMapping:function(r){},processingInstruction:function(r,e){var t=this.doc.createProcessingInstruction(r,e);this.locator&&Dc(this.locator,t),Vg(this,t)},ignorableWhitespace:function(r,e,t){},characters:function(r,e,t){if(r=TP.apply(this,arguments),r){if(this.cdata)var i=this.doc.createCDATASection(r);else var i=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(r)&&this.doc.appendChild(i),this.locator&&Dc(this.locator,i)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,e,t){r=TP.apply(this,arguments);var i=this.doc.createComment(r);this.locator&&Dc(this.locator,i),Vg(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,e,t){var i=this.doc.implementation;if(i&&i.createDocumentType){var n=i.createDocumentType(r,e,t);this.locator&&Dc(this.locator,n),Vg(this,n),this.doc.doctype=n}},warning:function(r){console.warn("[xmldom warning] "+r,Ex(this.locator))},error:function(r){console.error("[xmldom error] "+r,Ex(this.locator))},fatalError:function(r){throw new mJ(r,this.locator)}};function Ex(r){if(r)return`
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function TP(r,e,t){return typeof r=="string"?r.substr(e,t):r.length>=e+t||e?new java.lang.String(r,e,t)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){zv.prototype[r]=function(){return null}});function Vg(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}C_.__DOMHandler=zv;C_.normalizeLineEndings=E4;C_.DOMParser=I4;var bJ=C_.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const SP=r=>!!r&&typeof r=="object",zr=(...r)=>r.reduce((e,t)=>(typeof t!="object"||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):SP(e[i])&&SP(t[i])?e[i]=zr(e[i],t[i]):e[i]=t[i]}),e),{}),P4=r=>Object.keys(r).map(e=>r[e]),TJ=(r,e)=>{const t=[];for(let i=r;i<e;i++)t.push(i);return t},Hh=r=>r.reduce((e,t)=>e.concat(t),[]),M4=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},SJ=(r,e)=>r.reduce((t,i,n)=>(i[e]&&t.push(n),t),[]),xJ=(r,e)=>P4(r.reduce((t,i)=>(i.forEach(n=>{t[e(n)]=n}),t),{}));var $h={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const jp=({baseUrl:r="",source:e="",range:t="",indexRange:i=""})=>{const n={uri:e,resolvedUri:S_(r||"",e)};if(t||i){const s=(t||i).split("-");let o=H.BigInt?H.BigInt(s[0]):parseInt(s[0],10),l=H.BigInt?H.BigInt(s[1]):parseInt(s[1],10);o<Number.MAX_SAFE_INTEGER&&typeof o=="bigint"&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l));let u;typeof l=="bigint"||typeof o=="bigint"?u=H.BigInt(l)-H.BigInt(o)+H.BigInt(1):u=l-o+1,typeof u=="bigint"&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),n.byterange={length:u,offset:o}}return n},wJ=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=H.BigInt(r.offset)+H.BigInt(r.length)-H.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},xP=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),CJ={static(r){const{duration:e,timescale:t=1,sourceDuration:i,periodDuration:n}=r,a=xP(r.endNumber),s=e/t;return typeof a=="number"?{start:0,end:a}:typeof n=="number"?{start:0,end:n/s}:{start:0,end:i/s}},dynamic(r){const{NOW:e,clientOffset:t,availabilityStartTime:i,timescale:n=1,duration:a,periodStart:s=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=r,u=xP(r.endNumber),c=(e+t)/1e3,h=i+s,f=c+o-h,p=Math.ceil(f*n/a),v=Math.floor((c-h-l)*n/a),g=Math.floor((c-h)*n/a);return{start:Math.max(0,v),end:typeof u=="number"?u:Math.min(p,g)}}},AJ=r=>e=>{const{duration:t,timescale:i=1,periodStart:n,startNumber:a=1}=r;return{number:a+e,duration:t/i,timeline:n,time:e*t}},MC=r=>{const{type:e,duration:t,timescale:i=1,periodDuration:n,sourceDuration:a}=r,{start:s,end:o}=CJ[e](r),l=TJ(s,o).map(AJ(r));if(e==="static"){const u=l.length-1,c=typeof n=="number"?n:a;l[u].duration=c-t/i*u}return l},L4=r=>{const{baseUrl:e,initialization:t={},sourceDuration:i,indexRange:n="",periodStart:a,presentationTime:s,number:o=0,duration:l}=r;if(!e)throw new Error($h.NO_BASE_URL);const u=jp({baseUrl:e,source:t.sourceURL,range:t.range}),c=jp({baseUrl:e,source:e,indexRange:n});if(c.map=u,l){const h=MC(r);h.length&&(c.duration=h[0].duration,c.timeline=h[0].timeline)}else i&&(c.duration=i,c.timeline=a);return c.presentationTime=s||a,c.number=o,[c]},LC=(r,e,t)=>{const i=r.sidx.map?r.sidx.map:null,n=r.sidx.duration,a=r.timeline||0,s=r.sidx.byterange,o=s.offset+s.length,l=e.timescale,u=e.references.filter(g=>g.referenceType!==1),c=[],h=r.endList?"static":"dynamic",d=r.sidx.timeline;let f=d,p=r.mediaSequence||0,v;typeof e.firstOffset=="bigint"?v=H.BigInt(o)+e.firstOffset:v=o+e.firstOffset;for(let g=0;g<u.length;g++){const m=e.references[g],y=m.referencedSize,_=m.subsegmentDuration;let b;typeof v=="bigint"?b=v+H.BigInt(y)-H.BigInt(1):b=v+y-1;const S=`${v}-${b}`,C=L4({baseUrl:t,timescale:l,timeline:a,periodStart:d,presentationTime:f,number:p,duration:_,sourceDuration:n,indexRange:S,type:h})[0];i&&(C.map=i),c.push(C),typeof v=="bigint"?v+=H.BigInt(y):v+=y,f+=_/l,p++}return r.segments=c,r},DJ=["AUDIO","SUBTITLES"],EJ=1/60,k4=r=>xJ(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),IJ=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},wP=r=>{let e=[];return qQ(r,DJ,(t,i,n,a)=>{e=e.concat(t.playlists||[])}),e},CP=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,i)=>{t.number=r.mediaSequence+i})},PJ=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(i=>{i.discontinuitySequence=t.findIndex(function({timeline:l}){return l===i.timeline});const n=IJ(r,i.attributes.NAME);if(!n||i.sidx)return;const a=i.segments[0],s=n.segments.findIndex(function(l){return Math.abs(l.presentationTime-a.presentationTime)<EJ});if(s===-1){CP({playlist:i,mediaSequence:n.mediaSequence+n.segments.length}),i.segments[0].discontinuity=!0,i.discontinuityStarts.unshift(0),(!n.segments.length&&i.timeline>n.timeline||n.segments.length&&i.timeline>n.segments[n.segments.length-1].timeline)&&i.discontinuitySequence--;return}n.segments[s].discontinuity&&!a.discontinuity&&(a.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),CP({playlist:i,mediaSequence:n.segments[s].number})})},MJ=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(wP(r)),i=e.playlists.concat(wP(e));return e.timelineStarts=k4([r.timelineStarts,e.timelineStarts]),PJ({oldPlaylists:t,newPlaylists:i,timelineStarts:e.timelineStarts}),e},A_=r=>r&&r.uri+"-"+wJ(r.byterange),fb=r=>{const e=r.reduce(function(i,n){return i[n.attributes.baseUrl]||(i[n.attributes.baseUrl]=[]),i[n.attributes.baseUrl].push(n),i},{});let t=[];return Object.values(e).forEach(i=>{const n=P4(i.reduce((a,s)=>{const o=s.attributes.id+(s.attributes.lang||"");return a[o]?(s.segments&&(s.segments[0]&&(s.segments[0].discontinuity=!0),a[o].segments.push(...s.segments)),s.attributes.contentProtection&&(a[o].attributes.contentProtection=s.attributes.contentProtection)):(a[o]=s,a[o].attributes.timelineStarts=[]),a[o].attributes.timelineStarts.push({start:s.attributes.periodStart,timeline:s.attributes.periodStart}),a},{}));t=t.concat(n)}),t.map(i=>(i.discontinuityStarts=SJ(i.segments||[],"discontinuity"),i))},kC=(r,e)=>{const t=A_(r.sidx),i=t&&e[t]&&e[t].sidx;return i&&LC(r,i,r.sidx.resolvedUri),r},LJ=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=kC(r[t],e);return r},kJ=({attributes:r,segments:e,sidx:t,mediaSequence:i,discontinuitySequence:n,discontinuityStarts:a},s)=>{const o={attributes:{NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuitySequence:n,discontinuityStarts:a,timelineStarts:r.timelineStarts,mediaSequence:i,segments:e};return r.contentProtection&&(o.contentProtection=r.contentProtection),r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),t&&(o.sidx=t),s&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},RJ=({attributes:r,segments:e,mediaSequence:t,discontinuityStarts:i,discontinuitySequence:n})=>{typeof e>"u"&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);const a={NAME:r.id,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1};r.codecs&&(a.CODECS=r.codecs);const s={attributes:a,uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:i,discontinuitySequence:n,mediaSequence:t,segments:e};return r.serviceLocation&&(s.attributes.serviceLocation=r.serviceLocation),s},OJ=(r,e={},t=!1)=>{let i;const n=r.reduce((a,s)=>{const o=s.attributes.role&&s.attributes.role.value||"",l=s.attributes.lang||"";let u=s.attributes.label||"main";if(l&&!s.attributes.label){const h=o?` (${o})`:"";u=`${s.attributes.lang}${h}`}a[u]||(a[u]={language:l,autoselect:!0,default:o==="main",playlists:[],uri:""});const c=kC(kJ(s,t),e);return a[u].playlists.push(c),typeof i>"u"&&o==="main"&&(i=s,i.default=!0),a},{});if(!i){const a=Object.keys(n)[0];n[a].default=!0}return n},NJ=(r,e={})=>r.reduce((t,i)=>{const n=i.attributes.label||i.attributes.lang||"text",a=i.attributes.lang||"und";return t[n]||(t[n]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),t[n].playlists.push(kC(RJ(i),e)),t},{}),BJ=r=>r.reduce((e,t)=>(t&&t.forEach(i=>{const{channel:n,language:a}=i;e[a]={autoselect:!1,default:!1,instreamId:n,language:a},i.hasOwnProperty("aspectRatio")&&(e[a].aspectRatio=i.aspectRatio),i.hasOwnProperty("easyReader")&&(e[a].easyReader=i.easyReader),i.hasOwnProperty("3D")&&(e[a]["3D"]=i["3D"])}),e),{}),FJ=({attributes:r,segments:e,sidx:t,discontinuityStarts:i})=>{const n={attributes:{NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuityStarts:i,timelineStarts:r.timelineStarts,segments:e};return r.frameRate&&(n.attributes["FRAME-RATE"]=r.frameRate),r.contentProtection&&(n.contentProtection=r.contentProtection),r.serviceLocation&&(n.attributes.serviceLocation=r.serviceLocation),t&&(n.sidx=t),n},UJ=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",VJ=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",zJ=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",GJ=(r,e)=>{r.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:i}){return i===t.timeline}),t.segments&&t.segments.forEach((i,n)=>{i.number=n})})},AP=r=>r?Object.keys(r).reduce((e,t)=>{const i=r[t];return e.concat(i.playlists)},[]):[],HJ=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:i={},previousManifest:n,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:s,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:u}=r[0].attributes,c=fb(r.filter(UJ)).map(FJ),h=fb(r.filter(VJ)),d=fb(r.filter(zJ)),f=r.map(b=>b.attributes.captionServices).filter(Boolean),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:s,playlists:LJ(c,i)};u>=0&&(p.minimumUpdatePeriod=u*1e3),e&&(p.locations=e),t&&(p.contentSteering=t),o==="dynamic"&&(p.suggestedPresentationDelay=l),a&&a.length>0&&(p.eventStream=a);const v=p.playlists.length===0,g=h.length?OJ(h,i,v):null,m=d.length?NJ(d,i):null,y=c.concat(AP(g),AP(m)),_=y.map(({timelineStarts:b})=>b);return p.timelineStarts=k4(_),GJ(y,p.timelineStarts),g&&(p.mediaGroups.AUDIO.audio=g),m&&(p.mediaGroups.SUBTITLES.subs=m),f.length&&(p.mediaGroups["CLOSED-CAPTIONS"].cc=BJ(f)),n?MJ({oldManifest:n,newManifest:p}):p},$J=(r,e,t)=>{const{NOW:i,clientOffset:n,availabilityStartTime:a,timescale:s=1,periodStart:o=0,minimumUpdatePeriod:l=0}=r,u=(i+n)/1e3,c=a+o,d=u+l-c;return Math.ceil((d*s-e)/t)},R4=(r,e)=>{const{type:t,minimumUpdatePeriod:i=0,media:n="",sourceDuration:a,timescale:s=1,startNumber:o=1,periodStart:l}=r,u=[];let c=-1;for(let h=0;h<e.length;h++){const d=e[h],f=d.d,p=d.r||0,v=d.t||0;c<0&&(c=v),v&&v>c&&(c=v);let g;if(p<0){const _=h+1;_===e.length?t==="dynamic"&&i>0&&n.indexOf("$Number$")>0?g=$J(r,c,f):g=(a*s-c)/f:g=(e[_].t-c)/f}else g=p+1;const m=o+u.length+g;let y=o+u.length;for(;y<m;)u.push({number:y,duration:f/s,time:c,timeline:l}),c+=f,y++}return u},WJ=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,qJ=r=>(e,t,i,n)=>{if(e==="$$")return"$";if(typeof r[t]>"u")return e;const a=""+r[t];return t==="RepresentationID"||(i?n=parseInt(n,10):n=1,a.length>=n)?a:`${new Array(n-a.length+1).join("0")}${a}`},DP=(r,e)=>r.replace(WJ,qJ(e)),jJ=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?MC(r):R4(r,e),XJ=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:i={sourceURL:"",range:""}}=r,n=jp({baseUrl:r.baseUrl,source:DP(i.sourceURL,t),range:i.range});return jJ(r,e).map(s=>{t.Number=s.number,t.Time=s.time;const o=DP(r.media||"",t),l=r.timescale||1,u=r.presentationTimeOffset||0,c=r.periodStart+(s.time-u)/l;return{uri:o,timeline:s.timeline,duration:s.duration,resolvedUri:S_(r.baseUrl||"",o),map:n,number:s.number,presentationTime:c}})},YJ=(r,e)=>{const{baseUrl:t,initialization:i={}}=r,n=jp({baseUrl:t,source:i.sourceURL,range:i.range}),a=jp({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=n,a},KJ=(r,e)=>{const{duration:t,segmentUrls:i=[],periodStart:n}=r;if(!t&&!e||t&&e)throw new Error($h.SEGMENT_TIME_UNSPECIFIED);const a=i.map(l=>YJ(r,l));let s;return t&&(s=MC(r)),e&&(s=R4(r,e)),s.map((l,u)=>{if(a[u]){const c=a[u],h=r.timescale||1,d=r.presentationTimeOffset||0;return c.timeline=l.timeline,c.duration=l.duration,c.number=l.number,c.presentationTime=n+(l.time-d)/h,c}}).filter(l=>l)},ZJ=({attributes:r,segmentInfo:e})=>{let t,i;e.template?(i=XJ,t=zr(r,e.template)):e.base?(i=L4,t=zr(r,e.base)):e.list&&(i=KJ,t=zr(r,e.list));const n={attributes:r};if(!i)return n;const a=i(t,e.segmentTimeline);if(t.duration){const{duration:s,timescale:o=1}=t;t.duration=s/o}else a.length?t.duration=a.reduce((s,o)=>Math.max(s,Math.ceil(o.duration)),0):t.duration=0;return n.attributes=t,n.segments=a,e.base&&t.indexRange&&(n.sidx=a[0],n.segments=[]),n},QJ=r=>r.map(ZJ),jt=(r,e)=>M4(r.childNodes).filter(({tagName:t})=>t===e),Gv=r=>r.textContent.trim(),JJ=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),Ec=r=>{const o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!o)return 0;const[l,u,c,h,d,f]=o.slice(1);return parseFloat(l||0)*31536e3+parseFloat(u||0)*2592e3+parseFloat(c||0)*86400+parseFloat(h||0)*3600+parseFloat(d||0)*60+parseFloat(f||0)},eee=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),EP={mediaPresentationDuration(r){return Ec(r)},availabilityStartTime(r){return eee(r)/1e3},minimumUpdatePeriod(r){return Ec(r)},suggestedPresentationDelay(r){return Ec(r)},type(r){return r},timeShiftBufferDepth(r){return Ec(r)},start(r){return Ec(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return JJ(r)},startNumber(r){return parseInt(r,10)},timescale(r){return parseInt(r,10)},presentationTimeOffset(r){return parseInt(r,10)},duration(r){const e=parseInt(r,10);return isNaN(e)?Ec(r):e},d(r){return parseInt(r,10)},t(r){return parseInt(r,10)},r(r){return parseInt(r,10)},presentationTime(r){return parseInt(r,10)},DEFAULT(r){return r}},Sr=r=>r&&r.attributes?M4(r.attributes).reduce((e,t)=>{const i=EP[t.name]||EP.DEFAULT;return e[t.name]=i(t.value),e},{}):{},tee={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},D_=(r,e)=>e.length?Hh(r.map(function(t){return e.map(function(i){const n=Gv(i),a=S_(t.baseUrl,n),s=zr(Sr(i),{baseUrl:a});return a!==n&&!s.serviceLocation&&t.serviceLocation&&(s.serviceLocation=t.serviceLocation),s})})):r,RC=r=>{const e=jt(r,"SegmentTemplate")[0],t=jt(r,"SegmentList")[0],i=t&&jt(t,"SegmentURL").map(h=>zr({tag:"SegmentURL"},Sr(h))),n=jt(r,"SegmentBase")[0],a=t||e,s=a&&jt(a,"SegmentTimeline")[0],o=t||n||e,l=o&&jt(o,"Initialization")[0],u=e&&Sr(e);u&&l?u.initialization=l&&Sr(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});const c={template:u,segmentTimeline:s&&jt(s,"S").map(h=>Sr(h)),list:t&&zr(Sr(t),{segmentUrls:i,initialization:Sr(l)}),base:n&&zr(Sr(n),{initialization:Sr(l)})};return Object.keys(c).forEach(h=>{c[h]||delete c[h]}),c},ree=(r,e,t)=>i=>{const n=jt(i,"BaseURL"),a=D_(e,n),s=zr(r,Sr(i)),o=RC(i);return a.map(l=>({segmentInfo:zr(t,o),attributes:zr(s,l)}))},iee=r=>r.reduce((e,t)=>{const i=Sr(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const n=tee[i.schemeIdUri];if(n){e[n]={attributes:i};const a=jt(t,"cenc:pssh")[0];if(a){const s=Gv(a);e[n].pssh=s&&Y5(s)}}return e},{}),nee=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{let i,n;return n=t,/^CC\d=/.test(t)?[i,n]=t.split("="):/^CC\d$/.test(t)&&(i=t),{channel:i,language:n}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{const i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[n,a=""]=t.split("=");i.channel=n,i.language=t,a.split(",").forEach(s=>{const[o,l]=s.split(":");o==="lang"?i.language=l:o==="er"?i.easyReader=Number(l):o==="war"?i.aspectRatio=Number(l):o==="3D"&&(i["3D"]=Number(l))})}else i.language=t;return i.channel&&(i.channel="SERVICE"+i.channel),i})},aee=r=>Hh(jt(r.node,"EventStream").map(e=>{const t=Sr(e),i=t.schemeIdUri;return jt(e,"Event").map(n=>{const a=Sr(n),s=a.presentationTime||0,o=t.timescale||1,l=a.duration||0,u=s/o+r.attributes.start;return{schemeIdUri:i,value:t.value,id:a.id,start:u,end:u+l/o,messageData:Gv(n)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),see=(r,e,t)=>i=>{const n=Sr(i),a=D_(e,jt(i,"BaseURL")),s=jt(i,"Role")[0],o={role:Sr(s)};let l=zr(r,n,o);const u=jt(i,"Accessibility")[0],c=nee(Sr(u));c&&(l=zr(l,{captionServices:c}));const h=jt(i,"Label")[0];if(h&&h.childNodes.length){const g=h.childNodes[0].nodeValue.trim();l=zr(l,{label:g})}const d=iee(jt(i,"ContentProtection"));Object.keys(d).length&&(l=zr(l,{contentProtection:d}));const f=RC(i),p=jt(i,"Representation"),v=zr(t,f);return Hh(p.map(ree(l,a,v)))},oee=(r,e)=>(t,i)=>{const n=D_(e,jt(t.node,"BaseURL")),a=zr(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const s=jt(t.node,"AdaptationSet"),o=RC(t.node);return Hh(s.map(see(a,n,o)))},lee=(r,e)=>{if(r.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!r.length)return null;const t=zr({serverURL:Gv(r[0])},Sr(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},uee=({attributes:r,priorPeriodAttributes:e,mpdType:t})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&t==="static"?0:null,cee=(r,e={})=>{const{manifestUri:t="",NOW:i=Date.now(),clientOffset:n=0,eventHandler:a=function(){}}=e,s=jt(r,"Period");if(!s.length)throw new Error($h.INVALID_NUMBER_OF_PERIOD);const o=jt(r,"Location"),l=Sr(r),u=D_([{baseUrl:t}],jt(r,"BaseURL")),c=jt(r,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=i,l.clientOffset=n,o.length&&(l.locations=o.map(Gv));const h=[];return s.forEach((d,f)=>{const p=Sr(d),v=h[f-1];p.start=uee({attributes:p,priorPeriodAttributes:v?v.attributes:null,mpdType:l.type}),h.push({node:d,attributes:p})}),{locations:l.locations,contentSteeringInfo:lee(c,a),representationInfo:Hh(h.map(oee(l,u))),eventStream:Hh(h.map(aee))}},O4=r=>{if(r==="")throw new Error($h.DASH_EMPTY_MANIFEST);const e=new bJ;let t,i;try{t=e.parseFromString(r,"application/xml"),i=t&&t.documentElement.tagName==="MPD"?t.documentElement:null}catch{}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error($h.DASH_INVALID_XML);return i},hee=r=>{const e=jt(r,"UTCTiming")[0];if(!e)return null;const t=Sr(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error($h.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},fee=(r,e={})=>{const t=cee(O4(r),e),i=QJ(t.representationInfo);return HJ({dashPlaylists:i,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},dee=r=>hee(O4(r));var N4=Math.pow(2,32),pee=function(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t;return e.getBigUint64?(t=e.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):e.getUint32(0)*N4+e.getUint32(4)},vee={getUint64:pee,MAX_UINT32:N4},IP=vee.getUint64,gee=function(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),t={version:r[0],flags:new Uint8Array(r.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},i=12;t.version===0?(t.earliestPresentationTime=e.getUint32(i),t.firstOffset=e.getUint32(i+4),i+=8):(t.earliestPresentationTime=IP(r.subarray(i)),t.firstOffset=IP(r.subarray(i+8)),i+=16),i+=2;var n=e.getUint16(i);for(i+=2;n>0;i+=12,n--)t.references.push({referenceType:(r[i]&128)>>>7,referencedSize:e.getUint32(i)&2147483647,subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(r[i+8]&128),sapType:(r[i+8]&112)>>>4,sapDeltaTime:e.getUint32(i+8)&268435455});return t},mee=gee;const yee=Bv(mee);var _ee=$e([73,68,51]),bee=function(e,t){t===void 0&&(t=0),e=$e(e);var i=e[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],a=(i&16)>>4;return a?n+20:n+10},Wd=function r(e,t){return t===void 0&&(t=0),e=$e(e),e.length-t<10||!qt(e,_ee,{offset:t})?t:(t+=bee(e,t),r(e,t))},PP=function(e){return typeof e=="string"?e4(e):e},Tee=function(e){return Array.isArray(e)?e.map(function(t){return PP(t)}):[PP(e)]},See=function r(e,t,i){i===void 0&&(i=!1),t=Tee(t),e=$e(e);var n=[];if(!t.length)return n;for(var a=0;a<e.length;){var s=(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0,o=e.subarray(a+4,a+8);if(s===0)break;var l=a+s;if(l>e.length){if(i)break;l=e.length}var u=e.subarray(a+8,l);qt(o,t[0])&&(t.length===1?n.push(u):n.push.apply(n,r(u,t.slice(1),i))),a=l}return n},zg={EBML:$e([26,69,223,163]),DocType:$e([66,130]),Segment:$e([24,83,128,103]),SegmentInfo:$e([21,73,169,102]),Tracks:$e([22,84,174,107]),Track:$e([174]),TrackNumber:$e([215]),DefaultDuration:$e([35,227,131]),TrackEntry:$e([174]),TrackType:$e([131]),FlagDefault:$e([136]),CodecID:$e([134]),CodecPrivate:$e([99,162]),VideoTrack:$e([224]),AudioTrack:$e([225]),Cluster:$e([31,67,182,117]),Timestamp:$e([231]),TimestampScale:$e([42,215,177]),BlockGroup:$e([160]),BlockDuration:$e([155]),Block:$e([161]),SimpleBlock:$e([163])},Ix=[128,64,32,16,8,4,2,1],xee=function(e){for(var t=1,i=0;i<Ix.length&&!(e&Ix[i]);i++)t++;return t},Gy=function(e,t,i,n){i===void 0&&(i=!0),n===void 0&&(n=!1);var a=xee(e[t]),s=e.subarray(t,t+a);return i&&(s=Array.prototype.slice.call(e,t,t+a),s[0]^=Ix[a-1]),{length:a,value:HQ(s,{signed:n}),bytes:s}},MP=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?$Q(e):e},wee=function(e){return Array.isArray(e)?e.map(function(t){return MP(t)}):[MP(e)]},Cee=function r(e,t,i){if(i>=t.length)return t.length;var n=Gy(t,i,!1);if(qt(e.bytes,n.bytes))return i;var a=Gy(t,i+n.length);return r(e,t,i+a.length+a.value+n.length)},LP=function r(e,t){t=wee(t),e=$e(e);var i=[];if(!t.length)return i;for(var n=0;n<e.length;){var a=Gy(e,n,!1),s=Gy(e,n+a.length),o=n+a.length+s.length;s.value===127&&(s.value=Cee(a,e,o),s.value!==e.length&&(s.value-=o));var l=o+s.value>e.length?e.length:o+s.value,u=e.subarray(o,l);qt(t[0],a.bytes)&&(t.length===1?i.push(u):i=i.concat(r(u,t.slice(1))));var c=a.length+s.length+u.length;n+=c}return i},Aee=$e([0,0,0,1]),Dee=$e([0,0,1]),Eee=$e([0,0,3]),Iee=function(e){for(var t=[],i=1;i<e.length-2;)qt(e.subarray(i,i+3),Eee)&&(t.push(i+2),i++),i++;if(t.length===0)return e;var n=e.length-t.length,a=new Uint8Array(n),s=0;for(i=0;i<n;s++,i++)s===t[0]&&(s++,t.shift()),a[i]=e[s];return a},B4=function(e,t,i,n){e=$e(e),i=[].concat(i);for(var a=0,s,o=0;a<e.length&&(o<n||s);){var l=void 0;if(qt(e.subarray(a),Aee)?l=4:qt(e.subarray(a),Dee)&&(l=3),!l){a++;continue}if(o++,s)return Iee(e.subarray(s,a));var u=void 0;t==="h264"?u=e[a+l]&31:t==="h265"&&(u=e[a+l]>>1&63),i.indexOf(u)!==-1&&(s=a+l),a+=l+(t==="h264"?1:2)}return e.subarray(0,0)},Pee=function(e,t,i){return B4(e,"h264",t,i)},Mee=function(e,t,i){return B4(e,"h265",t,i)},di={webm:$e([119,101,98,109]),matroska:$e([109,97,116,114,111,115,107,97]),flac:$e([102,76,97,67]),ogg:$e([79,103,103,83]),ac3:$e([11,119]),riff:$e([82,73,70,70]),avi:$e([65,86,73]),wav:$e([87,65,86,69]),"3gp":$e([102,116,121,112,51,103]),mp4:$e([102,116,121,112]),fmp4:$e([115,116,121,112]),mov:$e([102,116,121,112,113,116]),moov:$e([109,111,111,118]),moof:$e([109,111,111,102])},Wh={aac:function(e){var t=Wd(e);return qt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Wd(e);return qt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=LP(e,[zg.EBML,zg.DocType])[0];return qt(t,di.webm)},mkv:function(e){var t=LP(e,[zg.EBML,zg.DocType])[0];return qt(t,di.matroska)},mp4:function(e){if(Wh["3gp"](e)||Wh.mov(e))return!1;if(qt(e,di.mp4,{offset:4})||qt(e,di.fmp4,{offset:4})||qt(e,di.moof,{offset:4})||qt(e,di.moov,{offset:4}))return!0},mov:function(e){return qt(e,di.mov,{offset:4})},"3gp":function(e){return qt(e,di["3gp"],{offset:4})},ac3:function(e){var t=Wd(e);return qt(e,di.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var t=0;t+188<e.length&&t<188;){if(e[t]===71&&e[t+188]===71)return!0;t+=1}return!1},flac:function(e){var t=Wd(e);return qt(e,di.flac,{offset:t})},ogg:function(e){return qt(e,di.ogg)},avi:function(e){return qt(e,di.riff)&&qt(e,di.avi,{offset:8})},wav:function(e){return qt(e,di.riff)&&qt(e,di.wav,{offset:8})},h264:function(e){return Pee(e,7,3).length},h265:function(e){return Mee(e,[32,33],3).length}},Px=Object.keys(Wh).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);Px.forEach(function(r){var e=Wh[r];Wh[r]=function(t){return e($e(t))}});var Lee=Wh,OC=function(e){e=$e(e);for(var t=0;t<Px.length;t++){var i=Px[t];if(Lee[i](e))return i}return""},kee=function(e){return See(e,["moof"]).length>0},NC=9e4,BC,FC,E_,UC,F4,U4,V4;BC=function(r){return r*NC};FC=function(r,e){return r*e};E_=function(r){return r/NC};UC=function(r,e){return r/e};F4=function(r,e){return BC(UC(r,e))};U4=function(r,e){return FC(E_(r),e)};V4=function(r,e,t){return E_(t?r:r-e)};var du={ONE_SECOND_IN_TS:NC,secondsToVideoTs:BC,secondsToAudioTs:FC,videoTsToSeconds:E_,audioTsToSeconds:UC,audioTsToVideoTs:F4,videoTsToAudioTs:U4,metadataTsToSeconds:V4};/**
* @license
* Video.js 8.18.1 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
*/var Mx="8.18.1";const Cs={},Yo=function(r,e){return Cs[r]=Cs[r]||[],e&&(Cs[r]=Cs[r].concat(e)),Cs[r]},Ree=function(r,e){Yo(r,e)},z4=function(r,e){const t=Yo(r).indexOf(e);return t<=-1?!1:(Cs[r]=Cs[r].slice(),Cs[r].splice(t,1),!0)},Oee=function(r,e){Yo(r,[].concat(e).map(t=>{const i=(...n)=>(z4(r,i),t(...n));return i}))},Hy={prefixed:!0},ny=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],kP=ny[0];let qd;for(let r=0;r<ny.length;r++)if(ny[r][1]in de){qd=ny[r];break}if(qd){for(let r=0;r<qd.length;r++)Hy[kP[r]]=qd[r];Hy.prefixed=qd[0]!==kP[0]}let Ri=[];const Nee=(r,e,t)=>(i,n,a)=>{const s=e.levels[n],o=new RegExp(`^(${s})$`);let l=r;if(i!=="log"&&a.unshift(i.toUpperCase()+":"),t&&(l=`%c${r}`,a.unshift(t)),a.unshift(l+":"),Ri){Ri.push([].concat(a));const c=Ri.length-1e3;Ri.splice(0,c>0?c:0)}if(!H.console)return;let u=H.console[i];!u&&i==="debug"&&(u=H.console.info||H.console.log),!(!u||!s||!o.test(i))&&u[Array.isArray(a)?"apply":"call"](H.console,a)};function Lx(r,e=":",t=""){let i="info",n;function a(...s){n("log",i,s)}return n=Nee(r,a,t),a.createLogger=(s,o,l)=>{const u=o!==void 0?o:e,c=l!==void 0?l:t,h=`${r} ${u} ${s}`;return Lx(h,u,c)},a.createNewLogger=(s,o,l)=>Lx(s,o,l),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},a.level=s=>{if(typeof s=="string"){if(!a.levels.hasOwnProperty(s))throw new Error(`"${s}" in not a valid log level`);i=s}return i},a.history=()=>Ri?[].concat(Ri):[],a.history.filter=s=>(Ri||[]).filter(o=>new RegExp(`.*${s}.*`).test(o[0])),a.history.clear=()=>{Ri&&(Ri.length=0)},a.history.disable=()=>{Ri!==null&&(Ri.length=0,Ri=null)},a.history.enable=()=>{Ri===null&&(Ri=[])},a.error=(...s)=>n("error",i,s),a.warn=(...s)=>n("warn",i,s),a.debug=(...s)=>n("debug",i,s),a}const pt=Lx("VIDEOJS"),G4=pt.createLogger,Bee=Object.prototype.toString,H4=function(r){return es(r)?Object.keys(r):[]};function bh(r,e){H4(r).forEach(t=>e(r[t],t))}function $4(r,e,t=0){return H4(r).reduce((i,n)=>e(i,r[n],n),t)}function es(r){return!!r&&typeof r=="object"}function qh(r){return es(r)&&Bee.call(r)==="[object Object]"&&r.constructor===Object}function Ut(...r){const e={};return r.forEach(t=>{t&&bh(t,(i,n)=>{if(!qh(i)){e[n]=i;return}qh(e[n])||(e[n]={}),e[n]=Ut(e[n],i)})}),e}function W4(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const i=r[t];e.push(i)}return e}function I_(r,e,t,i=!0){const n=s=>Object.defineProperty(r,e,{value:s,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const s=t();return n(s),s}};return i&&(a.set=n),Object.defineProperty(r,e,a)}var Fee=Object.freeze({__proto__:null,each:bh,reduce:$4,isObject:es,isPlain:qh,merge:Ut,values:W4,defineLazyProperty:I_});let VC=!1,q4=null,ts=!1,j4,X4=!1,Th=!1,Sh=!1,rs=!1,zC=null,P_=null;const Uee=!!(H.cast&&H.cast.framework&&H.cast.framework.CastReceiverContext);let Y4=null,$y=!1,M_=!1,Wy=!1,L_=!1,qy=!1,jy=!1,Xy=!1;const Xp=!!(bf()&&("ontouchstart"in H||H.navigator.maxTouchPoints||H.DocumentTouch&&H.document instanceof H.DocumentTouch)),uo=H.navigator&&H.navigator.userAgentData;uo&&uo.platform&&uo.brands&&(ts=uo.platform==="Android",Th=!!uo.brands.find(r=>r.brand==="Microsoft Edge"),Sh=!!uo.brands.find(r=>r.brand==="Chromium"),rs=!Th&&Sh,zC=P_=(uo.brands.find(r=>r.brand==="Chromium")||{}).version||null,M_=uo.platform==="Windows");if(!Sh){const r=H.navigator&&H.navigator.userAgent||"";VC=/iPod/i.test(r),q4=function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),ts=/Android/i.test(r),j4=function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),X4=/Firefox/i.test(r),Th=/Edg/i.test(r),Sh=/Chrome/i.test(r)||/CriOS/i.test(r),rs=!Th&&Sh,zC=P_=function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Y4=function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(t=11),t}(),qy=/Tizen/i.test(r),jy=/Web0S/i.test(r),Xy=qy||jy,$y=/Safari/i.test(r)&&!rs&&!ts&&!Th&&!Xy,M_=/Windows/i.test(r),Wy=/iPad/i.test(r)||$y&&Xp&&!/iPhone/i.test(r),L_=/iPhone/i.test(r)&&!Wy}const xi=L_||Wy||VC,k_=($y||xi)&&!rs;var K4=Object.freeze({__proto__:null,get IS_IPOD(){return VC},get IOS_VERSION(){return q4},get IS_ANDROID(){return ts},get ANDROID_VERSION(){return j4},get IS_FIREFOX(){return X4},get IS_EDGE(){return Th},get IS_CHROMIUM(){return Sh},get IS_CHROME(){return rs},get CHROMIUM_VERSION(){return zC},get CHROME_VERSION(){return P_},IS_CHROMECAST_RECEIVER:Uee,get IE_VERSION(){return Y4},get IS_SAFARI(){return $y},get IS_WINDOWS(){return M_},get IS_IPAD(){return Wy},get IS_IPHONE(){return L_},get IS_TIZEN(){return qy},get IS_WEBOS(){return jy},get IS_SMART_TV(){return Xy},TOUCH_ENABLED:Xp,IS_IOS:xi,IS_ANY_SAFARI:k_});function RP(r){return typeof r=="string"&&!!r.trim()}function Vee(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function bf(){return de===H.document}function Tf(r){return es(r)&&r.nodeType===1}function Z4(){try{return H.parent!==H.self}catch{return!0}}function Q4(r){return function(e,t){if(!RP(e))return de[r](null);RP(t)&&(t=de.querySelector(t));const i=Tf(t)?t:de;return i[r]&&i[r](e)}}function Ke(r="div",e={},t={},i){const n=de.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(a){const s=e[a];a==="textContent"?ll(n,s):(n[a]!==s||a==="tabIndex")&&(n[a]=s)}),Object.getOwnPropertyNames(t).forEach(function(a){n.setAttribute(a,t[a])}),i&&GC(n,i),n}function ll(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function kx(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function vp(r,e){return Vee(e),r.classList.contains(e)}function Au(r,...e){return r.classList.add(...e.reduce((t,i)=>t.concat(i.split(/\s+/)),[])),r}function R_(r,...e){return r?(r.classList.remove(...e.reduce((t,i)=>t.concat(i.split(/\s+/)),[])),r):(pt.warn("removeClass was called with an element that doesn't exist"),null)}function J4(r,e,t){return typeof t=="function"&&(t=t(r,e)),typeof t!="boolean"&&(t=void 0),e.split(/\s+/).forEach(i=>r.classList.toggle(i,t)),r}function eF(r,e){Object.getOwnPropertyNames(e).forEach(function(t){const i=e[t];i===null||typeof i>"u"||i===!1?r.removeAttribute(t):r.setAttribute(t,i===!0?"":i)})}function Co(r){const e={},t=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const i=r.attributes;for(let n=i.length-1;n>=0;n--){const a=i[n].name;let s=i[n].value;t.includes(a)&&(s=s!==null),e[a]=s}}return e}function tF(r,e){return r.getAttribute(e)}function jh(r,e,t){r.setAttribute(e,t)}function O_(r,e){r.removeAttribute(e)}function rF(){de.body.focus(),de.onselectstart=function(){return!1}}function iF(){de.onselectstart=function(){return!0}}function Xh(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(i=>{e[i]!==void 0&&(t[i]=e[i])}),t.height||(t.height=parseFloat(Yh(r,"height"))),t.width||(t.width=parseFloat(Yh(r,"width"))),t}}function Yp(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,t=r.offsetHeight;let i=0,n=0;for(;r.offsetParent&&r!==de[Hy.fullscreenElement];)i+=r.offsetLeft,n+=r.offsetTop,r=r.offsetParent;return{left:i,top:n,width:e,height:t}}function N_(r,e){const t={x:0,y:0};if(xi){let c=r;for(;c&&c.nodeName.toLowerCase()!=="html";){const h=Yh(c,"transform");if(/^matrix/.test(h)){const d=h.slice(7,-1).split(/,\s/).map(Number);t.x+=d[4],t.y+=d[5]}else if(/^matrix3d/.test(h)){const d=h.slice(9,-1).split(/,\s/).map(Number);t.x+=d[12],t.y+=d[13]}if(c.assignedSlot&&c.assignedSlot.parentElement&&H.WebKitCSSMatrix){const d=H.getComputedStyle(c.assignedSlot.parentElement).transform,f=new H.WebKitCSSMatrix(d);t.x+=f.m41,t.y+=f.m42}c=c.parentNode||c.host}}const i={},n=Yp(e.target),a=Yp(r),s=a.width,o=a.height;let l=e.offsetY-(a.top-n.top),u=e.offsetX-(a.left-n.left);return e.changedTouches&&(u=e.changedTouches[0].pageX-a.left,l=e.changedTouches[0].pageY+a.top,xi&&(u-=t.x,l-=t.y)),i.y=1-Math.max(0,Math.min(1,l/o)),i.x=Math.max(0,Math.min(1,u/s)),i}function nF(r){return es(r)&&r.nodeType===3}function B_(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function aF(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),Tf(e)||nF(e))return e;if(typeof e=="string"&&/\S/.test(e))return de.createTextNode(e)}).filter(e=>e)}function GC(r,e){return aF(e).forEach(t=>r.appendChild(t)),r}function sF(r,e){return GC(B_(r),e)}function Kp(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const Ko=Q4("querySelector"),oF=Q4("querySelectorAll");function Yh(r,e){if(!r||!e)return"";if(typeof H.getComputedStyle=="function"){let t;try{t=H.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function lF(r){[...de.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(n=>n.cssText).join(""),i=de.createElement("style");i.textContent=t,r.document.head.appendChild(i)}catch{const i=de.createElement("link");i.rel="stylesheet",i.type=e.type,i.media=e.media.mediaText,i.href=e.href,r.document.head.appendChild(i)}})}var uF=Object.freeze({__proto__:null,isReal:bf,isEl:Tf,isInFrame:Z4,createEl:Ke,textContent:ll,prependTo:kx,hasClass:vp,addClass:Au,removeClass:R_,toggleClass:J4,setAttributes:eF,getAttributes:Co,getAttribute:tF,setAttribute:jh,removeAttribute:O_,blockTextSelection:rF,unblockTextSelection:iF,getBoundingClientRect:Xh,findPosition:Yp,getPointerPosition:N_,isTextNode:nF,emptyEl:B_,normalizeContent:aF,appendContent:GC,insertContent:sF,isSingleLeftClick:Kp,$:Ko,$$:oF,computedStyle:Yh,copyStyleSheetsToWindow:lF});let cF=!1,Rx;const zee=function(){if(Rx.options.autoSetup===!1)return;const r=Array.prototype.slice.call(de.getElementsByTagName("video")),e=Array.prototype.slice.call(de.getElementsByTagName("audio")),t=Array.prototype.slice.call(de.getElementsByTagName("video-js")),i=r.concat(e,t);if(i&&i.length>0)for(let n=0,a=i.length;n<a;n++){const s=i[n];if(s&&s.getAttribute)s.player===void 0&&s.getAttribute("data-setup")!==null&&Rx(s);else{Ox(1);break}}else cF||Ox(1)};function Ox(r,e){bf()&&(e&&(Rx=e),H.setTimeout(zee,r))}function Nx(){cF=!0,H.removeEventListener("load",Nx)}bf()&&(de.readyState==="complete"?Nx():H.addEventListener("load",Nx));const hF=function(r){const e=de.createElement("style");return e.className=r,e},fF=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var Ti=new WeakMap;const Gee=3;let Hee=Gee;function qn(){return Hee++}function OP(r,e){if(!Ti.has(r))return;const t=Ti.get(r);t.handlers[e].length===0&&(delete t.handlers[e],r.removeEventListener?r.removeEventListener(e,t.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,t.dispatcher)),Object.getOwnPropertyNames(t.handlers).length<=0&&(delete t.handlers,delete t.dispatcher,delete t.disabled),Object.getOwnPropertyNames(t).length===0&&Ti.delete(r)}function HC(r,e,t,i){t.forEach(function(n){r(e,n,i)})}function F_(r){if(r.fixed_)return r;function e(){return!0}function t(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const i=r||H.event;r={};const n=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const a in i)n.includes(a)||a==="returnValue"&&i.preventDefault||(r[a]=i[a]);if(r.target||(r.target=r.srcElement||de),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){i.preventDefault&&i.preventDefault(),r.returnValue=!1,i.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),r.cancelBubble=!0,i.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=t,r.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=t,r.clientX!==null&&r.clientX!==void 0){const a=de.documentElement,s=de.body;r.pageX=r.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),r.pageY=r.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let Gg;const $ee=function(){if(typeof Gg!="boolean"){Gg=!1;try{const r=Object.defineProperty({},"passive",{get(){Gg=!0}});H.addEventListener("test",null,r),H.removeEventListener("test",null,r)}catch{}}return Gg},Wee=["touchstart","touchmove"];function _n(r,e,t){if(Array.isArray(e))return HC(_n,r,e,t);Ti.has(r)||Ti.set(r,{});const i=Ti.get(r);if(i.handlers||(i.handlers={}),i.handlers[e]||(i.handlers[e]=[]),t.guid||(t.guid=qn()),i.handlers[e].push(t),i.dispatcher||(i.disabled=!1,i.dispatcher=function(n,a){if(i.disabled)return;n=F_(n);const s=i.handlers[n.type];if(s){const o=s.slice(0);for(let l=0,u=o.length;l<u&&!n.isImmediatePropagationStopped();l++)try{o[l].call(r,n,a)}catch(c){pt.error(c)}}}),i.handlers[e].length===1)if(r.addEventListener){let n=!1;$ee()&&Wee.indexOf(e)>-1&&(n={passive:!0}),r.addEventListener(e,i.dispatcher,n)}else r.attachEvent&&r.attachEvent("on"+e,i.dispatcher)}function ni(r,e,t){if(!Ti.has(r))return;const i=Ti.get(r);if(!i.handlers)return;if(Array.isArray(e))return HC(ni,r,e,t);const n=function(s,o){i.handlers[o]=[],OP(s,o)};if(e===void 0){for(const s in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},s)&&n(r,s);return}const a=i.handlers[e];if(a){if(!t){n(r,e);return}if(t.guid)for(let s=0;s<a.length;s++)a[s].guid===t.guid&&a.splice(s--,1);OP(r,e)}}function Sf(r,e,t){const i=Ti.has(r)?Ti.get(r):{},n=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=F_(e),i.dispatcher&&i.dispatcher.call(r,e,t),n&&!e.isPropagationStopped()&&e.bubbles===!0)Sf.call(null,n,e,t);else if(!n&&!e.defaultPrevented&&e.target&&e.target[e.type]){Ti.has(e.target)||Ti.set(e.target,{});const a=Ti.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function U_(r,e,t){if(Array.isArray(e))return HC(U_,r,e,t);const i=function(){ni(r,e,i),t.apply(this,arguments)};i.guid=t.guid=t.guid||qn(),_n(r,e,i)}function $C(r,e,t){const i=function(){ni(r,e,i),t.apply(this,arguments)};i.guid=t.guid=t.guid||qn(),_n(r,e,i)}var qee=Object.freeze({__proto__:null,fixEvent:F_,on:_n,off:ni,trigger:Sf,one:U_,any:$C});const jn=30,Ht=function(r,e,t){e.guid||(e.guid=qn());const i=e.bind(r);return i.guid=t?t+"_"+e.guid:e.guid,i},is=function(r,e){let t=H.performance.now();return function(...n){const a=H.performance.now();a-t>=e&&(r(...n),t=a)}},dF=function(r,e,t,i=H){let n;const a=()=>{i.clearTimeout(n),n=null},s=function(){const o=this,l=arguments;let u=function(){n=null,u=null,t||r.apply(o,l)};!n&&t&&r.apply(o,l),i.clearTimeout(n),n=i.setTimeout(u,e)};return s.cancel=a,s};var jee=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:jn,bind_:Ht,throttle:is,debounce:dF});let ld;class bn{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},_n(this,e,t),this.addEventListener=i}off(e,t){ni(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},U_(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},$C(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=F_(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Sf(this,e)}queueTrigger(e){ld||(ld=new Map);const t=e.type||e;let i=ld.get(this);i||(i=new Map,ld.set(this,i));const n=i.get(t);i.delete(t),H.clearTimeout(n);const a=H.setTimeout(()=>{i.delete(t),i.size===0&&(i=null,ld.delete(this)),this.trigger(e)},0);i.set(t,a)}}bn.prototype.allowedEvents_={};bn.prototype.addEventListener=bn.prototype.on;bn.prototype.removeEventListener=bn.prototype.off;bn.prototype.dispatchEvent=bn.prototype.trigger;const V_=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,Ls=r=>r instanceof bn||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),Xee=(r,e)=>{Ls(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},Bx=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,Yy=(r,e,t)=>{if(!r||!r.nodeName&&!Ls(r))throw new Error(`Invalid target for ${V_(e)}#${t}; must be a DOM node or evented object.`)},pF=(r,e,t)=>{if(!Bx(r))throw new Error(`Invalid event type for ${V_(e)}#${t}; must be a non-empty string or array.`)},vF=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${V_(e)}#${t}; must be a function.`)},db=(r,e,t)=>{const i=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let n,a,s;return i?(n=r.eventBusEl_,e.length>=3&&e.shift(),[a,s]=e):(n=e[0],a=e[1],s=e[2]),Yy(n,r,t),pF(a,r,t),vF(s,r,t),s=Ht(r,s),{isTargetingSelf:i,target:n,type:a,listener:s}},Sl=(r,e,t,i)=>{Yy(r,r,e),r.nodeName?qee[e](r,t,i):r[e](t,i)},Yee={on(...r){const{isTargetingSelf:e,target:t,type:i,listener:n}=db(this,r,"on");if(Sl(t,"on",i,n),!e){const a=()=>this.off(t,i,n);a.guid=n.guid;const s=()=>this.off("dispose",a);s.guid=n.guid,Sl(this,"on","dispose",a),Sl(t,"on","dispose",s)}},one(...r){const{isTargetingSelf:e,target:t,type:i,listener:n}=db(this,r,"one");if(e)Sl(t,"one",i,n);else{const a=(...s)=>{this.off(t,i,a),n.apply(null,s)};a.guid=n.guid,Sl(t,"one",i,a)}},any(...r){const{isTargetingSelf:e,target:t,type:i,listener:n}=db(this,r,"any");if(e)Sl(t,"any",i,n);else{const a=(...s)=>{this.off(t,i,a),n.apply(null,s)};a.guid=n.guid,Sl(t,"any",i,a)}},off(r,e,t){if(!r||Bx(r))ni(this.eventBusEl_,r,e);else{const i=r,n=e;Yy(i,this,"off"),pF(n,this,"off"),vF(t,this,"off"),t=Ht(this,t),this.off("dispose",t),i.nodeName?(ni(i,n,t),ni(i,"dispose",t)):Ls(i)&&(i.off(n,t),i.off("dispose",t))}},trigger(r,e){Yy(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!Bx(t))throw new Error(`Invalid event type for ${V_(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return Sf(this.eventBusEl_,r,e)}};function WC(r,e={}){const{eventBusKey:t}=e;if(t){if(!r[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);r.eventBusEl_=r[t]}else r.eventBusEl_=Ke("span",{className:"vjs-event-bus"});return Object.assign(r,Yee),r.eventedCallbacks&&r.eventedCallbacks.forEach(i=>{i()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(i){i&&Ti.has(i)&&Ti.delete(i)}),H.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const Kee={state:{},setState(r){typeof r=="function"&&(r=r());let e;return bh(r,(t,i)=>{this.state[i]!==t&&(e=e||{},e[i]={from:this.state[i],to:t}),this.state[i]=t}),e&&Ls(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function gF(r,e){return Object.assign(r,Kee),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&Ls(r)&&r.on("statechanged",r.handleStateChanged),r}const gp=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},nr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},mF=function(r,e){return nr(r)===nr(e)};var Zee=Object.freeze({__proto__:null,toLowerCase:gp,toTitleCase:nr,titleCaseEquals:mF});class ae{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Ut({},this.options_),t=this.options_=Ut(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const n=e&&e.id&&e.id()||"no_player";this.id_=`${n}_component_${qn()}`}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(n=>this.addClass(n)),["on","off","one","any","trigger"].forEach(n=>{this[n]=void 0}),t.evented!==!1&&(WC(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),gF(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,t.initChildren!==!1&&this.initChildren(),this.ready(i),t.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=Ut(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Ke(e,t,i)}localize(e,t,i=e){const n=this.player_.language&&this.player_.language(),a=this.player_.languages&&this.player_.languages(),s=a&&a[n],o=n&&n.split("-")[0],l=a&&a[o];let u=i;return s&&s[e]?u=s[e]:l&&l[e]&&(u=l[e]),t&&(u=u.replace(/\{(\d+)\}/g,function(c,h){const d=t[h-1];let f=d;return typeof d>"u"&&(f=c),f})),u}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((i,n)=>i.concat(n),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i="http://www.w3.org/2000/svg",n=Ke("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=de.createElementNS(i,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const s=de.createElementNS(i,"use");return a.appendChild(s),s.setAttributeNS(null,"href",`#vjs-icon-${e}`),n.appendChild(a),this.iconIsSet_?t.replaceChild(n,t.querySelector(".vjs-icon-placeholder")):t.appendChild(n),this.iconIsSet_=!0,n}addChild(e,t={},i=this.children_.length){let n,a;if(typeof e=="string"){a=nr(e);const s=t.componentClass||a;t.name=a;const o=ae.getComponent(s);if(!o)throw new Error(`Component ${s} does not exist`);if(typeof o!="function")return null;n=new o(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,typeof n.id=="function"&&(this.childIndex_[n.id()]=n),a=a||n.name&&nr(n.name()),a&&(this.childNameIndex_[a]=n,this.childNameIndex_[gp(a)]=n),typeof n.el=="function"&&n.el()){let s=null;this.children_[i+1]&&(this.children_[i+1].el_?s=this.children_[i+1].el_:Tf(this.children_[i+1])&&(s=this.children_[i+1])),this.contentEl().insertBefore(n.el(),s)}return n}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[nr(e.name())]=null,this.childNameIndex_[gp(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=s=>{const o=s.name;let l=s.opts;if(t[o]!==void 0&&(l=t[o]),l===!1)return;l===!0&&(l={}),l.playerOptions=this.options_.playerOptions;const u=this.addChild(o,l);u&&(this[o]=u)};let n;const a=ae.getComponent("Tech");Array.isArray(e)?n=e:n=Object.keys(e),n.concat(Object.keys(this.options_).filter(function(s){return!n.some(function(o){return typeof o=="string"?s===o:s===o.name})})).map(s=>{let o,l;return typeof s=="string"?(o=s,l=e[o]||this.options_[o]||{}):(o=s.name,l=s),{name:o,opts:l}}).filter(s=>{const o=ae.getComponent(s.opts.componentClass||nr(s.name));return o&&!a.isTech(o)}).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}t?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)}$(e,t){return Ko(e,t||this.contentEl())}$$(e,t){return oF(e,t||this.contentEl())}hasClass(e){return vp(this.el_,e)}addClass(...e){Au(this.el_,...e)}removeClass(...e){R_(this.el_,...e)}toggleClass(e,t){J4(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return tF(this.el_,e)}setAttribute(e,t){jh(this.el_,e,t)}removeAttribute(e){O_(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[e]=t:t==="auto"?this.el_.style[e]="":this.el_.style[e]=t+"px",i||this.trigger("componentresize");return}if(!this.el_)return 0;const n=this.el_.style[e],a=n.indexOf("px");return parseInt(a!==-1?n.slice(0,a):this.el_["offset"+nr(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=Yh(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const i=`offset${nr(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),t={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},i={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:t,center:i}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const i=10,n=200;let a;this.on("touchstart",function(o){o.touches.length===1&&(t={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},e=H.performance.now(),a=!0)}),this.on("touchmove",function(o){if(o.touches.length>1)a=!1;else if(t){const l=o.touches[0].pageX-t.pageX,u=o.touches[0].pageY-t.pageY;Math.sqrt(l*l+u*u)>i&&(a=!1)}});const s=function(){a=!1};this.on("touchleave",s),this.on("touchcancel",s),this.on("touchend",function(o){t=null,a===!0&&H.performance.now()-e<n&&(o.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Ht(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const i=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=Ht(this,e),this.clearTimersOnDispose_(),i=H.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),H.clearTimeout(e)),e}setInterval(e,t){e=Ht(this,e),this.clearTimersOnDispose_();const i=H.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),H.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=Ht(this,e),t=H.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=Ht(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),H.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((i,n)=>this[t](n))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(a){const s=H.getComputedStyle(a,null),o=s.getPropertyValue("visibility");return s.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(o)}function i(a){return!(!t(a.parentElement)||!t(a)||a.style.opacity==="0"||H.getComputedStyle(a).height==="0px"||H.getComputedStyle(a).width==="0px")}function n(a){if(a.offsetWidth+a.offsetHeight+a.getBoundingClientRect().height+a.getBoundingClientRect().width===0)return!1;const s={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2};if(s.x<0||s.x>(de.documentElement.clientWidth||H.innerWidth)||s.y<0||s.y>(de.documentElement.clientHeight||H.innerHeight))return!1;let o=de.elementFromPoint(s.x,s.y);for(;o;){if(o===a)return!0;if(o.parentNode)o=o.parentNode;else return!1}}return e||(e=this.el()),!!(n(e)&&i(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,t){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=ae.getComponent("Tech"),n=i&&i.isTech(t),a=ae===t||ae.prototype.isPrototypeOf(t.prototype);if(n||!a){let o;throw n?o="techs must be registered using Tech.registerTech()":o="must be a Component subclass",new Error(`Illegal component, "${e}"; ${o}.`)}e=nr(e),ae.components_||(ae.components_={});const s=ae.getComponent("Player");if(e==="Player"&&s&&s.players){const o=s.players,l=Object.keys(o);if(o&&l.length>0&&l.map(u=>o[u]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return ae.components_[e]=t,ae.components_[gp(e)]=t,t}static getComponent(e){if(!(!e||!ae.components_))return ae.components_[e]}}ae.registerComponent("Component",ae);function Qee(r,e,t){if(typeof e!="number"||e<0||e>t)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${t}).`)}function NP(r,e,t,i){return Qee(r,i,t.length-1),t[i][e]}function pb(r){let e;return r===void 0||r.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:r.length,start:NP.bind(null,"start",0,r),end:NP.bind(null,"end",1,r)},H.Symbol&&H.Symbol.iterator&&(e[H.Symbol.iterator]=()=>(r||[]).values()),e}function pa(r,e){return Array.isArray(r)?pb(r):r===void 0||e===void 0?pb():pb([[r,e]])}const yF=function(r,e){r=r<0?0:r;let t=Math.floor(r%60),i=Math.floor(r/60%60),n=Math.floor(r/3600);const a=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(n=i=t="-"),n=n>0||s>0?n+":":"",i=((n||a>=10)&&i<10?"0"+i:i)+":",t=t<10?"0"+t:t,n+i+t};let qC=yF;function _F(r){qC=r}function bF(){qC=yF}function Xu(r,e=r){return qC(r,e)}var Jee=Object.freeze({__proto__:null,createTimeRanges:pa,createTimeRange:pa,setFormatTime:_F,resetFormatTime:bF,formatTime:Xu});function TF(r,e){let t=0,i,n;if(!e)return 0;(!r||!r.length)&&(r=pa(0,0));for(let a=0;a<r.length;a++)i=r.start(a),n=r.end(a),n>e&&(n=e),t+=n-i;return t/e}function tr(r){if(r instanceof tr)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:es(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=tr.defaultMessages[this.code]||"")}tr.prototype.code=0;tr.prototype.message="";tr.prototype.status=null;tr.prototype.metadata=null;tr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];tr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};tr.MEDIA_ERR_CUSTOM=0;tr.prototype.MEDIA_ERR_CUSTOM=0;tr.MEDIA_ERR_ABORTED=1;tr.prototype.MEDIA_ERR_ABORTED=1;tr.MEDIA_ERR_NETWORK=2;tr.prototype.MEDIA_ERR_NETWORK=2;tr.MEDIA_ERR_DECODE=3;tr.prototype.MEDIA_ERR_DECODE=3;tr.MEDIA_ERR_SRC_NOT_SUPPORTED=4;tr.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;tr.MEDIA_ERR_ENCRYPTED=5;tr.prototype.MEDIA_ERR_ENCRYPTED=5;function mp(r){return r!=null&&typeof r.then=="function"}function Va(r){mp(r)&&r.then(null,e=>{})}const Fx=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,i,n)=>(r[i]&&(t[i]=r[i]),t),{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},ete=function(r){const e=r.$$("track"),t=Array.prototype.map.call(e,n=>n.track);return Array.prototype.map.call(e,function(n){const a=Fx(n.track);return n.src&&(a.src=n.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(n){return t.indexOf(n)===-1}).map(Fx))},tte=function(r,e){return r.forEach(function(t){const i=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(n=>i.addCue(n))}),e.textTracks()};var BP={textTracksToJson:ete,jsonToTextTracks:tte,trackToJson_:Fx};const vb="vjs-modal-dialog";class xf extends ae{constructor(e,t){super(e,t),this.handleKeyDown_=i=>this.handleKeyDown(i),this.close_=i=>this.close(i),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ke("div",{className:`${vb}-content`},{role:"document"}),this.descEl_=Ke("p",{className:`${vb}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),ll(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${vb} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),sF(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);const a=this.getChild("closeButton");a&&i.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),B_(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=de.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let n;for(let a=0;a<t.length;a++)if(i===t[a]){n=a;break}de.activeElement===this.el_&&(n=0),e.shiftKey&&n===0?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&n===t.length-1&&(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,t=>(t instanceof H.HTMLAnchorElement||t instanceof H.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof H.HTMLInputElement||t instanceof H.HTMLSelectElement||t instanceof H.HTMLTextAreaElement||t instanceof H.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof H.HTMLIFrameElement||t instanceof H.HTMLObjectElement||t instanceof H.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}xf.prototype.options_={pauseOnOpen:!0,temporary:!0};ae.registerComponent("ModalDialog",xf);class Kh extends bn{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Ls(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const a=this[i];if(a.id===e){t=a;break}}return t}}Kh.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Kh.prototype.allowedEvents_)Kh.prototype["on"+r]=null;const gb=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].enabled=!1)};class rte extends Kh{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){gb(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&gb(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,gb(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const mb=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].selected=!1)};class ite extends Kh{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){mb(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set(){}})}addTrack(e){e.selected&&mb(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,mb(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class SF extends Kh{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class nte{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&typeof this.trackElements_[t].track.off=="function"&&this.trackElements_[t].track.off(),typeof this.trackElements_[t].off=="function"&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class Ky{constructor(e){Ky.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const n=e.length;this.cues_=e,this.length_=e.length;const a=function(s){""+s in this||Object.defineProperty(this,""+s,{get(){return this.cues_[s]}})};if(t<n)for(i=t;i<n;i++)a.call(this,i)}getCueById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const a=this[i];if(a.id===e){t=a;break}}return t}}const ate={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ste={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ote={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},FP={disabled:"disabled",hidden:"hidden",showing:"showing"};let jC=class extends bn{constructor(e={}){super();const t={id:e.id||"vjs_track_"+qn(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const n in t)Object.defineProperty(this,n,{get(){return t[n]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(n){n!==i&&(i=n,this.trigger("labelchange"))}})}};const XC=function(r){return new URL(r,de.baseURI)},xF=function(r){return new URL(r,de.baseURI).href},YC=function(r){if(typeof r=="string"){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(r);if(t)return t.pop().toLowerCase()}return""},z_=function(r,e=H.location){return XC(r).origin!==e.origin};var lte=Object.freeze({__proto__:null,parseUrl:XC,getAbsoluteURL:xF,getFileExtension:YC,isCrossOrigin:z_});const UP=function(r,e){const t=new H.WebVTT.Parser(H,H.vttjs,H.WebVTT.StringDecoder()),i=[];t.oncue=function(n){e.addCue(n)},t.onparsingerror=function(n){i.push(n)},t.onflush=function(){e.trigger({type:"loadeddata",target:e})},t.parse(r),i.length>0&&(H.console&&H.console.groupCollapsed&&H.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),i.forEach(n=>pt.error(n)),H.console&&H.console.groupEnd&&H.console.groupEnd()),t.flush()},VP=function(r,e){const t={uri:r},i=z_(r);i&&(t.cors=i);const n=e.tech_.crossOrigin()==="use-credentials";n&&(t.withCredentials=n),W5(t,Ht(this,function(a,s,o){if(a)return pt.error(a,s);e.loaded_=!0,typeof H.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],l=>{if(l.type==="vttjserror"){pt.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return UP(o,e)}):UP(o,e)}))};class Hv extends jC{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=Ut(e,{kind:ote[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=FP[t.mode]||"disabled";const n=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new Ky(this.cues_),s=new Ky(this.activeCues_);let o=!1;this.timeupdateHandler=Ht(this,function(u={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){u.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1),u.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const l=()=>{this.stopTracking()};this.tech_.one("dispose",l),i!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return n},set(){}},mode:{get(){return i},set(u){FP[u]&&i!==u&&(i=u,!this.preload_&&i!=="disabled"&&this.cues.length===0&&VP(this.src,this),this.stopTracking(),i!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return s;const u=this.tech_.currentTime(),c=[];for(let h=0,d=this.cues.length;h<d;h++){const f=this.cues[h];f.startTime<=u&&f.endTime>=u&&c.push(f)}if(o=!1,c.length!==this.activeCues_.length)o=!0;else for(let h=0;h<c.length;h++)this.activeCues_.indexOf(c[h])===-1&&(o=!0);return this.activeCues_=c,s.setCues_(this.activeCues_),s},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||t.kind!=="subtitles"&&t.kind!=="captions")&&VP(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new H.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const n in e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let n=0;n<i.length;n++)i[n]!==this&&i[n].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}Hv.prototype.allowedEvents_={cuechange:"cuechange"};class wF extends jC{constructor(e={}){const t=Ut(e,{kind:ste[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(n){typeof n!="boolean"||n===i||(i=n,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class CF extends jC{constructor(e={}){const t=Ut(e,{kind:ate[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(n){typeof n!="boolean"||n===i||(i=n,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class zs extends bn{constructor(e={}){super();let t;const i=new Hv(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return i}}}),t=zs.NONE,i.addEventListener("loadeddata",()=>{t=zs.LOADED,this.trigger({type:"load",target:this})})}}zs.prototype.allowedEvents_={load:"load"};zs.NONE=0;zs.LOADING=1;zs.LOADED=2;zs.ERROR=3;const $n={audio:{ListClass:rte,TrackClass:wF,capitalName:"Audio"},video:{ListClass:ite,TrackClass:CF,capitalName:"Video"},text:{ListClass:SF,TrackClass:Hv,capitalName:"Text"}};Object.keys($n).forEach(function(r){$n[r].getterName=`${r}Tracks`,$n[r].privateName=`${r}Tracks_`});const Zh={remoteText:{ListClass:SF,TrackClass:Hv,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:nte,TrackClass:zs,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},_i=Object.assign({},$n,Zh);Zh.names=Object.keys(Zh);$n.names=Object.keys($n);_i.names=[].concat(Zh.names).concat($n.names);function ute(r,e,t,i,n={}){const a=r.textTracks();n.kind=e,t&&(n.label=t),i&&(n.language=i),n.tech=r;const s=new _i.text.TrackClass(n);return a.addTrack(s),s}class it extends ae{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=i=>this.onDurationChange(i),this.trackProgress_=i=>this.trackProgress(i),this.trackCurrentTime_=i=>this.trackCurrentTime(i),this.stopTrackingCurrentTime_=i=>this.stopTrackingCurrentTime(i),this.disposeSourceHandler_=i=>this.disposeSourceHandler(i),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),_i.names.forEach(i=>{const n=_i[i];e&&e[n.getterName]&&(this[n.privateName]=e[n.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(i=>{e[`native${i}Tracks`]===!1&&(this[`featuresNative${i}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new _i.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ht(this,function(){const t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return pa(0,0)}bufferedPercent(){return TF(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks($n.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(t=>{const i=this[`${t}Tracks`]()||[];let n=i.length;for(;n--;){const a=i[n];t==="text"&&this.removeRemoteTextTrack(a),i.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new tr(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?pa(0,0):pa()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){$n.names.forEach(e=>{const t=$n[e],i=()=>{this.trigger(`${e}trackchange`)},n=this[t.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),this.on("dispose",()=>{n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!H.WebVTT)if(de.body.contains(this.el())){if(!this.options_["vtt.js"]&&qh(iP)&&Object.keys(iP).length>0){this.trigger("vttjsloaded");return}const e=de.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),H.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=o=>e.addTrack(o.track),n=o=>e.removeTrack(o.track);t.on("addtrack",i),t.on("removetrack",n),this.addWebVttScript_();const a=()=>this.trigger("texttrackchange"),s=()=>{a();for(let o=0;o<e.length;o++){const l=e[o];l.removeEventListener("cuechange",a),l.mode==="showing"&&l.addEventListener("cuechange",a)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",function(){t.off("addtrack",i),t.off("removetrack",n),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(let o=0;o<e.length;o++)e[o].removeEventListener("cuechange",a)})}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return ute(this,e,t,i)}createRemoteTextTrack(e){const t=Ut(e,{tech:this});return new Zh.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return typeof t!="boolean"&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),t===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=qn();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return it.canPlayType(e.type)}static isTech(e){return e.prototype instanceof it||e instanceof it||e===it}static registerTech(e,t){if(it.techs_||(it.techs_={}),!it.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!it.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!it.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=nr(e),it.techs_[e]=t,it.techs_[gp(e)]=t,e!=="Tech"&&it.defaultTechOrder_.push(e),t}static getTech(e){if(e){if(it.techs_&&it.techs_[e])return it.techs_[e];if(e=nr(e),H&&H.videojs&&H.videojs[e])return pt.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),H.videojs[e]}}}_i.names.forEach(function(r){const e=_i[r];it.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});it.prototype.featuresVolumeControl=!0;it.prototype.featuresMuteControl=!0;it.prototype.featuresFullscreenResize=!1;it.prototype.featuresPlaybackRate=!1;it.prototype.featuresProgressEvents=!1;it.prototype.featuresSourceset=!1;it.prototype.featuresTimeupdateEvents=!1;it.prototype.featuresNativeTextTracks=!1;it.prototype.featuresVideoFrameCallback=!1;it.withSourceHandlers=function(r){r.registerSourceHandler=function(t,i){let n=r.sourceHandlers;n||(n=r.sourceHandlers=[]),i===void 0&&(i=n.length),n.splice(i,0,t)},r.canPlayType=function(t){const i=r.sourceHandlers||[];let n;for(let a=0;a<i.length;a++)if(n=i[a].canPlayType(t),n)return n;return""},r.selectSourceHandler=function(t,i){const n=r.sourceHandlers||[];let a;for(let s=0;s<n.length;s++)if(a=n[s].canHandleSource(t,i),a)return n[s];return null},r.canPlaySource=function(t,i){const n=r.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""},["seekable","seeking","duration"].forEach(function(t){const i=this[t];typeof i=="function"&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):i.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(t){let i=r.selectSourceHandler(t,this.options_);i||(r.nativeSourceHandler?i=r.nativeSourceHandler:pt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==r.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};ae.registerComponent("Tech",it);it.registerTech("Tech",it);it.defaultTechOrder_=[];const Du={},Zy={},Qy={};function cte(r,e){Du[r]=Du[r]||[],Du[r].push(e)}function hte(r,e,t){r.setTimeout(()=>Zl(e,Du[e.type],t,r),1)}function fte(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function dte(r,e,t){return r.reduceRight(KC(t),e[t]())}function pte(r,e,t,i){return e[t](r.reduce(KC(t),i))}function zP(r,e,t,i=null){const n="call"+nr(t),a=r.reduce(KC(n),i),s=a===Qy,o=s?null:e[t](a);return mte(r,t,o,s),o}const vte={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gte={setCurrentTime:1,setMuted:1,setVolume:1},GP={play:1,pause:1};function KC(r){return(e,t)=>e===Qy?Qy:t[r]?t[r](e):e}function mte(r,e,t,i){for(let n=r.length-1;n>=0;n--){const a=r[n];a[e]&&a[e](i,t)}}function yte(r){Zy.hasOwnProperty(r.id())&&delete Zy[r.id()]}function _te(r,e){const t=Zy[r.id()];let i=null;if(t==null)return i=e(r),Zy[r.id()]=[[e,i]],i;for(let n=0;n<t.length;n++){const[a,s]=t[n];a===e&&(i=s)}return i===null&&(i=e(r),t.push([e,i])),i}function Zl(r={},e=[],t,i,n=[],a=!1){const[s,...o]=e;if(typeof s=="string")Zl(r,Du[s],t,i,n,a);else if(s){const l=_te(i,s);if(!l.setSource)return n.push(l),Zl(r,o,t,i,n,a);l.setSource(Object.assign({},r),function(u,c){if(u)return Zl(r,o,t,i,n,a);n.push(l),Zl(c,r.type===c.type?o:Du[c.type],t,i,n,a)})}else o.length?Zl(r,o,t,i,n,a):a?t(r,n):Zl(r,Du["*"],t,i,n,!0)}const bte={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Jy=function(r=""){const e=YC(r);return bte[e.toLowerCase()]||""},Tte=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const t=r.cache_.sources.filter(n=>n.src===e);if(t.length)return t[0].type;const i=r.$$("source");for(let n=0;n<i.length;n++){const a=i[n];if(a.type&&a.src&&a.src===e)return a.type}return Jy(e)},AF=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=AF(t),Array.isArray(t)?e=e.concat(t):es(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[HP({src:r})]:es(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[HP(r)]:r=[];return r};function HP(r){if(!r.type){const e=Jy(r.src);e&&(r.type=e)}return r}var Ste=`<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
<path d="M16 10v28l22-14z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
</symbol>
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
</symbol>
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
<circle cx="24" cy="24" r="20"></circle>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
</symbol>
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
</symbol>
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
<path fill="none" d="M-1-3h24v24H-1z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
</symbol>
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
</symbol>
</defs>
</svg>`;const $P=qy?10009:jy?461:8,Ic={codes:{play:415,pause:19,ff:417,rw:412,back:$P},names:{415:"play",19:"pause",417:"ff",412:"rw",[$P]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},WP=5;class xte extends bn{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const i=t.key.substring(5).toLowerCase();this.move(i)}else if(Ic.isEventKey(t,"play")||Ic.isEventKey(t,"pause")||Ic.isEventKey(t,"ff")||Ic.isEventKey(t,"rw")){t.preventDefault();const i=Ic.getEventName(t);this.performMediaAction_(i)}else Ic.isEventKey(t,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+WP);break;case"rw":this.userSeek_(this.player_.currentTime()-WP);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const n=this.getCurrentComponent(e.target);t&&(i=!!t.closest(".video-js"),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!i||!t)&&(n&&n.name()==="CloseButton"?this.refocusComponent():(this.pause(),n&&n.el()&&(this.lastFocusedComponent_=n)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(n){for(const a of n)a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&t.push(a),a.hasOwnProperty("children_")&&a.children_.length>0&&i(a.children_)}return e.children_.forEach(n=>{if(n.hasOwnProperty("el_"))if(n.getIsFocusable&&n.getIsAvailableToBeFocused&&n.getIsFocusable()&&n.getIsAvailableToBeFocused(n.el())){t.push(n);return}else n.hasOwnProperty("children_")&&n.children_.length>0?i(n.children_):n.hasOwnProperty("items")&&n.items.length>0?i(n.items):this.findSuitableDOMChild(n)&&t.push(n);if(n.name_==="ErrorDisplay"&&n.opened_){const a=n.el_.querySelector(".vjs-errors-ok-button-container");a&&a.querySelectorAll("button").forEach((o,l)=>{t.push({name:()=>"ModalButton"+(l+1),el:()=>o,getPositions:()=>{const u=o.getBoundingClientRect(),c={x:u.x,y:u.y,width:u.width,height:u.height,top:u.top,right:u.right,bottom:u.bottom,left:u.left},h={x:u.left+u.width/2,y:u.top+u.height/2,width:0,height:0,top:u.top+u.height/2,right:u.left+u.width/2,bottom:u.top+u.height/2,left:u.left+u.width/2};return{boundingClientRect:c,center:h}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:u=>!0,focus:()=>o.focus()})})}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let n=0;n<i.children.length;n++){const a=i.children[n],s=t(a);if(s)return s}return null}return e.el()?t(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length){for(const i of this.focusableComponents)if(i.el()===t)return i}}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name()){this.focusableComponents.splice(t,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),n=this.focusableComponents.filter(s=>s!==t&&this.isInDirection_(i.boundingClientRect,s.getPositions().boundingClientRect,e)),a=this.findBestCandidate_(i.center,n,e);a?this.focus(a):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let n=1/0,a=null;for(const s of t){const o=s.getPositions().center,l=this.calculateDistance_(e,o,i);l<n&&(n=l,a=s)}return a}isInDirection_(e,t,i){switch(i){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const n=Math.abs(e.x-t.x),a=Math.abs(e.y-t.y);let s;switch(i){case"right":case"left":s=n+a*100;break;case"up":s=a*2+n*.5;break;case"down":s=a*5+n;break;default:s=n+a}return s}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(t.constructor.name==="TextTrackSelect"){e.focus(t);break}}}class wte extends ae{constructor(e,t,i){const n=Ut({createEl:!1},t);if(super(e,n,i),!t.playerOptions.sources||t.playerOptions.sources.length===0)for(let a=0,s=t.playerOptions.techOrder;a<s.length;a++){const o=nr(s[a]);let l=it.getTech(o);if(o||(l=ae.getComponent(o)),l&&l.isSupported()){e.loadTech_(o);break}}else e.src(t.playerOptions.sources)}}ae.registerComponent("MediaLoader",wte);class G_ extends ae{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=i=>this.handleMouseOver(i),this.handleMouseOut_=i=>this.handleMouseOut(i),this.handleClick_=i=>this.handleClick(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),e==="button"&&pt.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const n=Ke(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ke("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(e===void 0)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,ll(this.controlTextEl_,i),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&t.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ae.registerComponent("ClickableComponent",G_);class Ux extends G_{constructor(e,t){super(e,t),this.update(),this.update_=i=>this.update(i),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Ke("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Ke("picture",{className:"vjs-poster",tabIndex:-1},{},Ke("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Va(this.player_.play()):this.player_.pause())}}Ux.prototype.crossorigin=Ux.prototype.crossOrigin;ae.registerComponent("PosterImage",Ux);const wn="#222",qP="#ccc",Cte={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function yb(r,e){let t;if(r.length===4)t=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)t=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+e+")"}function Ca(r,e,t){try{r.style[e]=t}catch{return}}function jP(r){return r?`${r}px`:""}class Ate extends ae{constructor(e,t,i){super(e,t,i);const n=s=>this.updateDisplay(s),a=s=>{this.updateDisplayOverlay(),this.updateDisplay(s)};e.on("loadstart",s=>this.toggleDisplay(s)),e.on("texttrackchange",n),e.on("loadedmetadata",s=>{this.updateDisplayOverlay(),this.preselectTrack(s)}),e.ready(Ht(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",a),e.on("playerresize",a);const s=H.screen.orientation||H,o=H.screen.orientation?"change":"orientationchange";s.addEventListener(o,a),e.on("dispose",()=>s.removeEventListener(o,a));const l=this.options_.playerOptions.tracks||[];for(let u=0;u<l.length;u++)this.player_.addRemoteTextTrack(l[u],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let n,a,s;for(let o=0;o<t.length;o++){const l=t[o];i&&i.enabled&&i.language&&i.language===l.language&&l.kind in e?l.kind===i.kind?s=l:s||(s=l):i&&!i.enabled?(s=null,n=null,a=null):l.default&&(l.kind==="descriptions"&&!n?n=l:l.kind in e&&!a&&(a=l))}s?s.mode="showing":a?a.mode="showing":n&&(n.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof H.WebVTT=="function"&&H.WebVTT.processCues(H,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const s=[];for(let o=0;o<e.length;++o){const l=e[o];l.mode==="showing"&&s.push(l)}this.updateForTrack(s);return}let i=null,n=null,a=e.length;for(;a--;){const s=e[a];s.mode==="showing"&&(s.kind==="descriptions"?i=s:n=s)}if(n?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):i&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i)),!H.CSS.supports("inset","10px")){const s=this.el_,o=s.querySelectorAll(".vjs-text-track-cue"),l=this.player_.controlBar.el_.getBoundingClientRect().height,u=this.player_.el_.getBoundingClientRect().height;s.style="",Ca(s,"position","relative"),Ca(s,"height",u-l+"px"),Ca(s,"top","unset"),Xy?Ca(s,"bottom",u+"px"):Ca(s,"bottom","0px"),o.length>0&&o.forEach(c=>{if(c.style.inset){const h=c.style.inset.split(" ");h.length===3&&Object.assign(c.style,{top:h[0],right:h[1],bottom:h[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!H.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,n=this.player_.videoWidth()/this.player_.videoHeight();let a=0,s=0;Math.abs(i-n)>.1&&(i>n?a=Math.round((e-t*n)/2):s=Math.round((t-e/n)/2)),Ca(this.el_,"insetInline",jP(a)),Ca(this.el_,"insetBlock",jP(s))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let n=i.length;for(;n--;){const a=i[n];if(!a)continue;const s=a.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&Ca(s.firstChild,"color",yb(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Ca(s.firstChild,"backgroundColor",yb(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Ca(s,"backgroundColor",yb(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&(t.edgeStyle==="dropshadow"?s.firstChild.style.textShadow=`2px 2px 3px ${wn}, 2px 2px 4px ${wn}, 2px 2px 5px ${wn}`:t.edgeStyle==="raised"?s.firstChild.style.textShadow=`1px 1px ${wn}, 2px 2px ${wn}, 3px 3px ${wn}`:t.edgeStyle==="depressed"?s.firstChild.style.textShadow=`1px 1px ${qP}, 0 1px ${qP}, -1px -1px ${wn}, 0 -1px ${wn}`:t.edgeStyle==="uniform"&&(s.firstChild.style.textShadow=`0 0 4px ${wn}, 0 0 4px ${wn}, 0 0 4px ${wn}, 0 0 4px ${wn}`)),t.fontPercent&&t.fontPercent!==1){const o=H.parseFloat(s.style.fontSize);s.style.fontSize=o*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&t.fontFamily!=="default"&&(t.fontFamily==="small-caps"?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Cte[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof H.WebVTT!="function"||e.every(i=>!i.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const n=e[i];for(let a=0;a<n.activeCues.length;++a)t.push(n.activeCues[a])}H.WebVTT.processCues(H,t,this.el_);for(let i=0;i<e.length;++i){const n=e[i];for(let a=0;a<n.activeCues.length;++a){const s=n.activeCues[a].displayState;Au(s,"vjs-text-track-cue","vjs-text-track-cue-"+(n.language?n.language:i)),n.language&&jh(s,"lang",n.language)}this.player_.textTrackSettings&&this.updateDisplayState(n)}}}ae.registerComponent("TextTrackDisplay",Ate);class Dte extends ae{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=Ke("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),n=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}ae.registerComponent("LoadingSpinner",Dte);class ai extends G_{createEl(e,t={},i={}){e="button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i);const n=Ke(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}addChild(e,t={}){const i=this.constructor.name;return pt.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),ae.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}}ae.registerComponent("Button",ai);class DF extends ai{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",i=>this.handleMouseDown(i))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e){Va(t),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(!n){this.player_.tech(!0).focus();return}const a=()=>n.focus();mp(t)?t.then(a,()=>{}):this.setTimeout(a,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}DF.prototype.controlText_="Play Video";ae.registerComponent("BigPlayButton",DF);class Ete extends ai{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ae.registerComponent("CloseButton",Ete);class EF extends ai{constructor(e,t={}){super(e,t),t.replay=t.replay===void 0||t.replay,this.setIcon("play"),this.on(e,"play",i=>this.handlePlay(i)),this.on(e,"pause",i=>this.handlePause(i)),t.replay&&this.on(e,"ended",i=>this.handleEnded(i))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Va(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",t=>this.handleSeeked(t))}}EF.prototype.controlText_="Play";ae.registerComponent("PlayToggle",EF);class wf extends ae{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],i=>this.update(i)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=Ke("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=Ke("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Xu(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let t=this.textNode_;t&&this.contentEl_.firstChild!==t&&(t=null,pt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=de.createTextNode(this.formattedTime_),this.textNode_&&(t?this.contentEl_.replaceChild(this.textNode_,t):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}wf.prototype.labelText_="Time";wf.prototype.controlText_="Time";ae.registerComponent("TimeDisplay",wf);class ZC extends wf{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;this.player_.ended()?t=this.player_.duration():t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}ZC.prototype.labelText_="Current Time";ZC.prototype.controlText_="Current Time";ae.registerComponent("CurrentTimeDisplay",ZC);class QC extends wf{constructor(e,t){super(e,t);const i=n=>this.updateContent(n);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}QC.prototype.labelText_="Duration";QC.prototype.controlText_="Duration";ae.registerComponent("DurationDisplay",QC);class Ite extends ae{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}ae.registerComponent("TimeDivider",Ite);class JC extends wf{constructor(e,t){super(e,t),this.on(e,"durationchange",i=>this.updateContent(i))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Ke("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let t;this.player_.ended()?t=0:this.player_.remainingTimeDisplay?t=this.player_.remainingTimeDisplay():t=this.player_.remainingTime(),this.updateTextNode_(t)}}JC.prototype.labelText_="Remaining Time";JC.prototype.controlText_="Remaining Time";ae.registerComponent("RemainingTimeDisplay",JC);class Pte extends ae{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",i=>this.updateShowing(i))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ke("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ke("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(de.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}ae.registerComponent("LiveDisplay",Pte);class IF extends ai{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=i=>this.updateLiveEdgeStatus(i),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Ke("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}IF.prototype.controlText_="Seek to live, currently playing live";ae.registerComponent("SeekToLive",IF);function $v(r,e,t){return r=Number(r),Math.min(t,Math.max(e,isNaN(r)?e:r))}var Mte=Object.freeze({__proto__:null,clamp:$v});class eA extends ae{constructor(e,t){super(e,t),this.handleMouseDown_=i=>this.handleMouseDown(i),this.handleMouseUp_=i=>this.handleMouseUp(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.handleClick_=i=>this.handleClick(i),this.handleMouseMove_=i=>this.handleMouseMove(i),this.update_=i=>this.update(i),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!rs&&e.preventDefault(),rF(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;iF(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number($v(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=N_(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,n=t&&t.horizontalSeek;i?n&&e.key==="ArrowLeft"||!n&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):n&&e.key==="ArrowRight"||!n&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}ae.registerComponent("Slider",eA);const _b=(r,e)=>$v(r/e*100,0,100).toFixed(2)+"%";class Lte extends ae{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",i=>this.update(i))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Ke("span",{className:"vjs-control-text"}),i=Ke("span",{textContent:this.localize("Loaded")}),n=de.createTextNode(": ");return this.percentageEl_=Ke("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const t=this.player_.liveTracker,i=this.player_.buffered(),n=t&&t.isLive()?t.seekableEnd():this.player_.duration(),a=this.player_.bufferedEnd(),s=this.partEls_,o=_b(a,n);this.percent_!==o&&(this.el_.style.width=o,ll(this.percentageEl_,o),this.percent_=o);for(let l=0;l<i.length;l++){const u=i.start(l),c=i.end(l);let h=s[l];h||(h=this.el_.appendChild(Ke()),s[l]=h),!(h.dataset.start===u&&h.dataset.end===c)&&(h.dataset.start=u,h.dataset.end=c,h.style.left=_b(u,a),h.style.width=_b(c-u,a))}for(let l=s.length;l>i.length;l--)this.el_.removeChild(s[l-1]);s.length=i.length})}}ae.registerComponent("LoadProgressBar",Lte);class kte extends ae{constructor(e,t){super(e,t),this.update=is(Ht(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const n=Yp(this.el_),a=Xh(this.player_.el()),s=e.width*t;if(!a||!n)return;let o=e.left-a.left+s,l=e.width-s+(a.right-e.right);l||(l=e.width-s,o=s);let u=n.width/2;o<u?u+=u-o:l<u&&(u=l),u<0?u=0:u>n.width&&(u=n.width),u=Math.round(u),this.el_.style.right=`-${u}px`,this.write(i)}write(e){ll(this.el_,e)}updateTime(e,t,i,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let a;const s=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const o=this.player_.liveTracker.liveWindow(),l=o-t*o;a=(l<1?"":"-")+Xu(l,o)}else a=Xu(i,s);this.update(e,t,a),n&&n()})}}ae.registerComponent("TimeTooltip",kte);class tA extends ae{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=is(Ht(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}}tA.prototype.options_={children:[]};!xi&&!ts&&tA.prototype.options_.children.push("timeTooltip");ae.registerComponent("PlayProgressBar",tA);class PF extends ae{constructor(e,t){super(e,t),this.update=is(Ht(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=`${e.width*t}px`})}}PF.prototype.options_={children:["timeTooltip"]};ae.registerComponent("MouseTimeDisplay",PF);const Hg=5,XP=12;class rA extends eA{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=Ht(this,this.update),this.update=is(this.update_,jn),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in de&&"visibilityState"in de&&this.on(de,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){de.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,jn))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(de.visibilityState==="hidden")return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),n=this.player_.liveTracker;let a=this.player_.duration();n&&n.isLive()&&(a=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(t*100).toFixed(2)),this.percent_=t),(this.currentTime_!==i||this.duration_!==a)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Xu(i,a),Xu(a,a)],"{1} of {2}")),this.currentTime_=i,this.duration_=a),this.bar&&this.bar.update(Xh(this.el()),this.getProgress())}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){Kp(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!Kp(e)||isNaN(this.player_.duration()))return;!t&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let i;const n=this.calculateDistance(e),a=this.player_.liveTracker;if(!a||!a.isLive())i=n*this.player_.duration(),i===this.player_.duration()&&(i=i-.1);else{if(n>=.99){a.seekToLiveEdge();return}const s=a.seekableStart(),o=a.liveCurrentTime();if(i=s+n*a.liveWindow(),i>=o&&(i=o),i<=s&&(i=s+.1),i===1/0)return}this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Va(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+Hg)}stepBack(){this.userSeek_(this.player_.currentTime()-Hg)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=parseInt(e.key,10)*.1;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-Hg*XP)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+Hg*XP)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in de&&"visibilityState"in de&&this.off(de,"visibilitychange",this.toggleVisibility_),super.dispose()}}rA.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!xi&&!ts&&rA.prototype.options_.children.splice(1,0,"mouseTimeDisplay");ae.registerComponent("SeekBar",rA);class MF extends ae{constructor(e,t){super(e,t),this.handleMouseMove=is(Ht(this,this.handleMouseMove),jn),this.throttledHandleMouseSeek=is(Ht(this,this.handleMouseSeek),jn),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.handleMouseDownHandler_=i=>this.handleMouseDown(i),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(!i&&!n)return;const a=t.el(),s=Yp(a);let o=N_(a,e).x;o=$v(o,0,1),n&&n.update(s,o),i&&i.update(s,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Va(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}MF.prototype.options_={children:["seekBar"]};ae.registerComponent("ProgressControl",MF);class LF extends ai{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],i=>this.handlePictureInPictureChange(i)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],i=>this.handlePictureInPictureEnabledChange(i)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){de.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in H?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof de.exitPictureInPicture=="function"&&super.show()}}LF.prototype.controlText_="Picture-in-Picture";ae.registerComponent("PictureInPictureToggle",LF);class kF extends ai{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",i=>this.handleFullscreenChange(i)),de[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}kF.prototype.controlText_="Fullscreen";ae.registerComponent("FullscreenToggle",kF);const Rte=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class Ote extends ae{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}ae.registerComponent("VolumeLevel",Ote);class Nte extends ae{constructor(e,t){super(e,t),this.update=is(Ht(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,n){if(!i){const a=Xh(this.el_),s=Xh(this.player_.el()),o=e.width*t;if(!s||!a)return;const l=e.left-s.left+o,u=e.width-o+(s.right-e.right);let c=a.width/2;l<c?c+=c-l:u<c&&(c=u),c<0?c=0:c>a.width&&(c=a.width),this.el_.style.right=`-${c}px`}this.write(`${n}%`)}write(e){ll(this.el_,e)}updateVolume(e,t,i,n,a){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,n.toFixed(0)),a&&a()})}}ae.registerComponent("VolumeLevelTooltip",Nte);class RF extends ae{constructor(e,t){super(e,t),this.update=is(Ht(this,this.update),jn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const n=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,n,()=>{i?this.el_.style.bottom=`${e.height*t}px`:this.el_.style.left=`${e.width*t}px`})}}RF.prototype.options_={children:["volumeLevelTooltip"]};ae.registerComponent("MouseVolumeLevelDisplay",RF);class H_ extends eA{constructor(e,t){super(e,t),this.on("slideractive",i=>this.updateLastVolume_(i)),this.on(e,"volumechange",i=>this.updateARIAAttributes(i)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Kp(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),n=Xh(i),a=this.vertical();let s=N_(i,e);s=a?s.y:s.x,s=$v(s,0,1),t.update(n,s,a)}Kp(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}H_.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!xi&&!ts&&H_.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");H_.prototype.playerEvent="volumechange";ae.registerComponent("VolumeBar",H_);class OF extends ae{constructor(e,t={}){t.vertical=t.vertical||!1,(typeof t.volumeBar>"u"||qh(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),Rte(this,e),this.throttledHandleMouseMove=is(Ht(this,this.handleMouseMove),jn),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.on("mousedown",i=>this.handleMouseDown(i)),this.on("touchstart",i=>this.handleMouseDown(i)),this.on("mousemove",i=>this.handleMouseMove(i)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}OF.prototype.options_={children:["volumeBar"]};ae.registerComponent("VolumeControl",OF);const Bte=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class NF extends ai{constructor(e,t){super(e,t),Bte(this,e),this.on(e,["loadstart","volumechange"],i=>this.update(i))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(t===0){const n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),xi&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),R_(this.el_,[0,1,2,3].reduce((i,n)=>i+`${n?" ":""}vjs-vol-${n}`,"")),Au(this.el_,`vjs-vol-${t}`)}updateControlText_(){const t=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}NF.prototype.controlText_="Mute";ae.registerComponent("MuteToggle",NF);class BF extends ae{constructor(e,t={}){typeof t.inline<"u"?t.inline=t.inline:t.inline=!0,(typeof t.volumeControl>"u"||qh(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=i=>this.handleKeyPress(i),this.on(e,["loadstart"],i=>this.volumePanelState_(i)),this.on(this.muteToggle,"keyup",i=>this.handleKeyPress(i)),this.on(this.volumeControl,"keyup",i=>this.handleVolumeControlKeyUp(i)),this.on("keydown",i=>this.handleKeyPress(i)),this.on("mouseover",i=>this.handleMouseOver(i)),this.on("mouseout",i=>this.handleMouseOut(i)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),_n(de,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),ni(de,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}BF.prototype.options_={children:["muteToggle","volumeControl"]};ae.registerComponent("VolumePanel",BF);class FF extends ai{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()?i.seekableEnd():this.player_.duration();let a;t+this.skipTime<=n?a=t+this.skipTime:a=n,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}FF.prototype.controlText_="Skip Forward";ae.registerComponent("SkipForward",FF);class UF extends ai{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()&&i.seekableStart();let a;n&&t-this.skipTime<=n?a=n:t>=this.skipTime?a=t-this.skipTime:a=0,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}UF.prototype.controlText_="Skip Backward";ae.registerComponent("SkipBackward",UF);class VF extends ae{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",i=>this.handleKeyDown(i)),this.boundHandleBlur_=i=>this.handleBlur(i),this.boundHandleTapClick_=i=>this.handleTapClick(i)}addEventListenerForItem(e){e instanceof ae&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof ae&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Ke(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),_n(t,"click",function(i){i.preventDefault(),i.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||de.activeElement;if(!this.children().some(i=>i.el()===t)){const i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(n=>n.el()===e.target)[0];if(!i)return;i.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}ae.registerComponent("Menu",VF);class iA extends ae{constructor(e,t={}){super(e,t),this.menuButton_=new ai(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=ai.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=a=>this.handleClick(a);this.handleMenuKeyUp_=a=>this.handleMenuKeyUp(a),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",a=>this.handleKeyDown(a)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),_n(de,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",a=>this.handleMouseLeave(a)),this.on("keydown",a=>this.handleSubmenuKeyDown(a))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new VF(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Ke("li",{className:"vjs-menu-title",textContent:nr(this.options_.title),tabIndex:-1}),i=new ae(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const t=ai.prototype.buildCSSClass();return`vjs-menu-button ${e} ${t} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),ni(de,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Esc"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Esc"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Esc"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),xi&&Z4())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}ae.registerComponent("MenuButton",iA);class nA extends iA{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const n=Ht(this,this.update);i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),this.player_.on("ready",n),this.player_.on("dispose",function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)})}}ae.registerComponent("TrackButton",nA);class Wv extends G_{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const n=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i),a=Ke("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?n.appendChild(a):n.replaceChild(a,n.querySelector(".vjs-icon-placeholder")),n}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}ae.registerComponent("MenuItem",Wv);class qv extends Wv{constructor(e,t){const i=t.track,n=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected=i.mode==="showing",super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const a=(...o)=>{this.handleTracksChange.apply(this,o)},s=(...o)=>{this.handleSelectedLanguageChange.apply(this,o)};if(e.on(["loadstart","texttrackchange"],a),n.addEventListener("change",a),n.addEventListener("selectedlanguagechange",s),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),n.removeEventListener("change",a),n.removeEventListener("selectedlanguagechange",s)}),n.onchange===void 0){let o;this.on(["tap","click"],function(){if(typeof H.Event!="object")try{o=new H.Event("change")}catch{}o||(o=de.createEvent("Event"),o.initEvent("change",!0,!0)),n.dispatchEvent(o)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),!!i)for(let n=0;n<i.length;n++){const a=i[n];this.kinds.indexOf(a.kind)!==-1&&(a===t?a.mode!=="showing"&&(a.mode="showing"):a.mode!=="disabled"&&(a.mode="disabled"))}}handleTracksChange(e){const t=this.track.mode==="showing";t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}ae.registerComponent("TextTrackMenuItem",qv);class zF extends qv{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,a=t.length;n<a;n++){const s=t[n];if(this.options_.kinds.indexOf(s.kind)>-1&&s.mode==="showing"){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,a=t.length;n<a;n++){const s=t[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&s.mode==="showing"){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}ae.registerComponent("OffTextTrackMenuItem",zF);class Cf extends nA{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=qv){let i;this.label_&&(i=`${this.label_} off`),e.push(new zF(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let a=0;a<n.length;a++){const s=n[a];if(this.kinds_.indexOf(s.kind)>-1){const o=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass(`vjs-${s.kind}-menu-item`),e.push(o)}}return e}}ae.registerComponent("TextTrackButton",Cf);class GF extends Wv{constructor(e,t){const i=t.track,n=t.cue,a=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=a&&a<n.endTime,super(e,t),this.track=i,this.cue=n}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}ae.registerComponent("ChaptersTrackMenuItem",GF);class aA extends Cf{constructor(e,t,i){super(e,t,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(n=>{n.selected(this.track_.activeCues[0]===n.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(nr(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,n=t.length;i<n;i++){const a=t[i],s=new GF(this.player_,{track:this.track_,cue:a});e.push(s)}return e}}aA.prototype.kind_="chapters";aA.prototype.controlText_="Chapters";ae.registerComponent("ChaptersButton",aA);class sA extends Cf{constructor(e,t,i){super(e,t,i),this.setIcon("audio-description");const n=e.textTracks(),a=Ht(this,this.handleTracksChange);n.addEventListener("change",a),this.on("dispose",function(){n.removeEventListener("change",a)})}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let n=0,a=t.length;n<a;n++){const s=t[n];if(s.kind!==this.kind_&&s.mode==="showing"){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}sA.prototype.kind_="descriptions";sA.prototype.controlText_="Descriptions";ae.registerComponent("DescriptionsButton",sA);class oA extends Cf{constructor(e,t,i){super(e,t,i),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}oA.prototype.kind_="subtitles";oA.prototype.controlText_="Subtitles";ae.registerComponent("SubtitlesButton",oA);class lA extends qv{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}ae.registerComponent("CaptionSettingsMenuItem",lA);class uA extends Cf{constructor(e,t,i){super(e,t,i),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new lA(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}uA.prototype.kind_="captions";uA.prototype.controlText_="Captions";ae.registerComponent("CaptionsButton",uA);class HF extends qv{createEl(e,t,i){const n=super.createEl(e,t,i),a=n.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",n):a.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Ke("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),n}}ae.registerComponent("SubsCapsMenuItem",HF);class cA extends Cf{constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(nr(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new lA(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,HF),e}}cA.prototype.kinds_=["captions","subtitles"];cA.prototype.controlText_="Subtitles";ae.registerComponent("SubsCapsButton",cA);class $F extends Wv{constructor(e,t){const i=t.track,n=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const a=(...s)=>{this.handleTracksChange.apply(this,s)};n.addEventListener("change",a),this.on("dispose",()=>{n.removeEventListener("change",a)})}createEl(e,t,i){const n=super.createEl(e,t,i),a=n.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(a.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Ke("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];n!==this.track&&(n.enabled=n===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}ae.registerComponent("AudioTrackMenuItem",$F);class WF extends nA{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];e.push(new $F(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e}}WF.prototype.controlText_="Audio Track";ae.registerComponent("AudioTrackButton",WF);class hA extends Wv{constructor(e,t){const i=t.rate,n=parseFloat(i,10);t.label=i,t.selected=n===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=n,this.on(e,"ratechange",a=>this.update(a))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}hA.prototype.contentElType="button";ae.registerComponent("PlaybackRateMenuItem",hA);class qF extends iA{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",i=>this.updateVisibility(i)),this.on(e,"ratechange",i=>this.updateLabel(i)),this.on(e,"playbackrateschange",i=>this.handlePlaybackRateschange(i))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ke("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new hA(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}qF.prototype.controlText_="Playback Rate";ae.registerComponent("PlaybackRateMenuButton",qF);class jF extends ae{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}ae.registerComponent("Spacer",jF);class Fte extends jF{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}ae.registerComponent("CustomControlSpacer",Fte);class XF extends ae{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}XF.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};ae.registerComponent("ControlBar",XF);class YF extends xf{constructor(e,t){super(e,t),this.on(e,"error",i=>{this.open(i)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}YF.prototype.options_=Object.assign({},xf.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});ae.registerComponent("ErrorDisplay",YF);class KF extends ae{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Ke("select",{id:this.options_.id},{},this.options_.SelectOptions.map(t=>{const i=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${qn()}`)+"-"+t[1].replace(/\W+/g,""),n=Ke("option",{id:i,value:this.localize(t[0]),textContent:t[1]});return n.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${i}`),n}))}}ae.registerComponent("TextTrackSelect",KF);class Eu extends ae{constructor(e,t={}){super(e,t);const i=Ke("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const n=this.options_.selects;for(const a of n){const s=this.options_.selectConfigs[a],o=s.className,l=s.id.replace("%s",this.options_.id_);let u=null;const c=`vjs_select_${qn()}`;if(this.options_.type==="colors"){u=Ke("span",{className:o});const d=Ke("label",{id:l,className:"vjs-label",textContent:s.label});d.setAttribute("for",c),u.appendChild(d)}const h=new KF(e,{SelectOptions:s.options,legendId:this.options_.legendId,id:c,labelId:l});this.addChild(h),this.options_.type==="colors"&&(u.appendChild(h.el()),this.el().appendChild(u))}}createEl(){return Ke("fieldset",{className:this.options_.className})}}ae.registerComponent("TextTrackFieldset",Eu);class ZF extends ae{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Eu(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const a=new Eu(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const s=new Eu(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s)}createEl(){return Ke("div",{className:"vjs-track-settings-colors"})}}ae.registerComponent("TextTrackSettingsColors",ZF);class QF extends ae{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Eu(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const a=new Eu(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);const s=new Eu(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s)}createEl(){return Ke("div",{className:"vjs-track-settings-font"})}}ae.registerComponent("TextTrackSettingsFont",QF);class JF extends ae{constructor(e,t={}){super(e,t);const i=this.localize("restore all settings to the default values"),n=new ai(e,{controlText:i,className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const a=new ai(e,{controlText:i,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=this.localize("Done"),this.addChild(a)}createEl(){return Ke("div",{className:"vjs-track-settings-controls"})}}ae.registerComponent("TrackSettingsControls",JF);const bb="vjs-text-track-settings",YP=["#000","Black"],KP=["#00F","Blue"],ZP=["#0FF","Cyan"],QP=["#0F0","Green"],JP=["#F0F","Magenta"],eM=["#F00","Red"],tM=["#FFF","White"],rM=["#FF0","Yellow"],Tb=["1","Opaque"],Sb=["0.5","Semi-Transparent"],iM=["0","Transparent"],Ao={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[YP,tM,eM,QP,KP,rM,JP,ZP],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Tb,Sb,iM],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[tM,YP,eM,QP,KP,rM,JP,ZP],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Tb,Sb],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[iM,Sb,Tb],className:"vjs-window-opacity vjs-opacity"}};Ao.windowColor.options=Ao.backgroundColor.options;function e8(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function Ute(r,e){const t=r.options[r.options.selectedIndex].value;return e8(t,e)}function Vte(r,e,t){if(e){for(let i=0;i<r.options.length;i++)if(e8(r.options[i].value,t)===e){r.selectedIndex=i;break}}}class zte extends xf{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Ke("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),t.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new ZF(e,{textTrackComponentid:this.id_,selectConfigs:Ao,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const i=new QF(e,{textTrackComponentid:this.id_,selectConfigs:Ao,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(i);const n=new JF(e);this.addChild(n)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),bh(Ao,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return $4(Ao,(e,t,i)=>{const n=Ute(this.$(t.selector),t.parser);return n!==void 0&&(e[i]=n),e},{})}setValues(e){bh(Ao,(t,i)=>{Vte(this.$(t.selector),e[i],t.parser)})}setDefaults(){bh(Ao,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(H.localStorage.getItem(bb))}catch(t){pt.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?H.localStorage.setItem(bb,JSON.stringify(e)):H.localStorage.removeItem(bb)}catch(t){pt.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}ae.registerComponent("TextTrackSettings",zte);class Gte extends ae{constructor(e,t){let i=t.ResizeObserver||H.ResizeObserver;t.ResizeObserver===null&&(i=!1);const n=Ut({createEl:!i,reportTouchActivity:!1},t);super(e,n),this.ResizeObserver=t.ResizeObserver||H.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=dF(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const a=this.debouncedHandler_;let s=this.unloadListener_=function(){ni(this,"resize",a),ni(this,"unload",s),s=null};_n(this.el_.contentWindow,"unload",s),_n(this.el_.contentWindow,"resize",a)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}ae.registerComponent("ResizeManager",Gte);const Hte={trackingThreshold:20,liveTolerance:15};class $te extends ae{constructor(e,t){const i=Ut(Hte,t,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=n=>this.handlePlay(n),this.handleFirstTimeupdate_=n=>this.handleFirstTimeupdate(n),this.handleSeeked_=n=>this.handleSeeked(n),this.seekToLiveEdge_=n=>this.seekToLiveEdge(n),this.reset_(),this.on(this.player_,"durationchange",n=>this.handleDurationchange(n)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(H.performance.now().toFixed(4)),i=this.lastTime_===-1?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const n=this.liveCurrentTime(),a=this.player_.currentTime();let s=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-a)>this.options_.liveTolerance;(!this.timeupdateSeen_||n===1/0)&&(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,jn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}ae.registerComponent("LiveTracker",$te);class Wte extends ae{constructor(e,t){super(e,t),this.on("statechanged",i=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Ke("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${qn()}`}),description:Ke("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${qn()}`})},Ke("div",{className:"vjs-title-bar"},{},W4(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(n=>{const a=this.state[n],s=this.els[n],o=i[n];B_(s),a&&ll(s,a),t&&(t.removeAttribute(o),a&&t.setAttribute(o,s.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}ae.registerComponent("TitleBar",Wte);const qte={initialDisplay:4e3,position:[],takeFocus:!1};class jte extends ai{constructor(e,t){t=Ut(qte,t),super(e,t),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],i=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Ke("button",{},{type:"button",class:this.buildCSSClass()},Ke("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}ae.registerComponent("TransientButton",jte);const Vx=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const t=r.$$("source"),i=[];let n="";if(!t.length)return!1;for(let a=0;a<t.length;a++){const s=t[a].src;s&&i.indexOf(s)===-1&&i.push(s)}return i.length?(i.length===1&&(n=i[0]),r.triggerSourceset(n),!0):!1},Xte=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=de.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const t=de.createDocumentFragment();for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);return this.innerText="",H.Element.prototype.appendChild.call(this,t),this.innerHTML}}),t8=(r,e)=>{let t={};for(let i=0;i<r.length&&(t=Object.getOwnPropertyDescriptor(r[i],e),!(t&&t.set&&t.get));i++);return t.enumerable=!0,t.configurable=!0,t},Yte=r=>t8([r.el(),H.HTMLMediaElement.prototype,H.Element.prototype,Xte],"innerHTML"),nM=function(r){const e=r.el();if(e.resetSourceWatch_)return;const t={},i=Yte(r),n=a=>(...s)=>{const o=a.apply(e,s);return Vx(r),o};["append","appendChild","insertAdjacentHTML"].forEach(a=>{e[a]&&(t[a]=e[a],e[a]=n(t[a]))}),Object.defineProperty(e,"innerHTML",Ut(i,{set:n(i.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(t).forEach(a=>{e[a]=t[a]}),Object.defineProperty(e,"innerHTML",i)},r.one("sourceset",e.resetSourceWatch_)},Kte=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?xF(H.Element.prototype.getAttribute.call(this,"src")):""},set(r){return H.Element.prototype.setAttribute.call(this,"src",r),r}}),Zte=r=>t8([r.el(),H.HTMLMediaElement.prototype,Kte],"src"),Qte=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const t=Zte(r),i=e.setAttribute,n=e.load;Object.defineProperty(e,"src",Ut(t,{set:a=>{const s=t.set.call(e,a);return r.triggerSourceset(e.src),s}})),e.setAttribute=(a,s)=>{const o=i.call(e,a,s);return/src/i.test(a)&&r.triggerSourceset(e.src),o},e.load=()=>{const a=n.call(e);return Vx(r)||(r.triggerSourceset(""),nM(r)),a},e.currentSrc?r.triggerSourceset(e.currentSrc):Vx(r)||nM(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=n,e.setAttribute=i,Object.defineProperty(e,"src",t),e.resetSourceWatch_&&e.resetSourceWatch_()}};class xe extends it{constructor(e,t){super(e,t);const i=e.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",i&&(this.el_.currentSrc!==i.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const a=this.el_.childNodes;let s=a.length;const o=[];for(;s--;){const l=a[s];l.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(l),this.remoteTextTracks().addTrack(l.track),this.textTracks().addTrack(l.track),!n&&!this.el_.hasAttribute("crossorigin")&&z_(l.src)&&(n=!0)):o.push(l))}for(let l=0;l<o.length;l++)this.el_.removeChild(o[l])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&n&&pt.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(Xp||L_)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),xe.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Qte(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let a=0;a<e.length;a++){const s=e[a];s.kind==="metadata"&&t.push({track:s,storedMode:s.mode})}};i(),e.addEventListener("change",i),this.on("dispose",()=>e.removeEventListener("change",i));const n=()=>{for(let a=0;a<t.length;a++){const s=t[a];s.track.mode==="disabled"&&s.track.mode!==s.storedMode&&(s.track.mode=s.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(n=>{this.el()[`${i}Tracks`].removeEventListener(n,this[`${i}TracksListeners_`][n])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=$n[e],i=this.el()[t.getterName],n=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const a={change:o=>{const l={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(l),e==="text"&&this[Zh.remoteText.getterName]().trigger(l)},addtrack(o){n.addTrack(o.track)},removetrack(o){n.removeTrack(o.track)}},s=function(){const o=[];for(let l=0;l<n.length;l++){let u=!1;for(let c=0;c<i.length;c++)if(i[c]===n[l]){u=!0;break}u||o.push(n[l])}for(;o.length;)n.removeTrack(o.shift())};this[t.getterName+"Listeners_"]=a,Object.keys(a).forEach(o=>{const l=a[o];i.addEventListener(o,l),this.on("dispose",u=>i.removeEventListener(o,l))}),this.on("loadstart",s),this.on("dispose",o=>this.off("loadstart",s))}proxyNativeTracks_(){$n.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),xe.disposeMediaElement(e),e=i}else{e=de.createElement("video");const i=this.options_.tag&&Co(this.options_.tag),n=Ut({},i);(!Xp||this.options_.nativeControlsForTouch!==!0)&&delete n.controls,eF(e,Object.assign(n,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&jh(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const n=t[i],a=this.options_[n];typeof a<"u"&&(a?jh(e,n,n):O_(e,n),e[n]=a)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let i=!1;const n=function(){i=!0};this.on("loadstart",n);const a=function(){i||this.trigger("loadstart")};this.on("loadedmetadata",a),this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",a),i||this.trigger("loadstart")});return}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready(function(){t.forEach(function(i){this.trigger(i)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&k_?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){pt(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&ts&&rs&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Va(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}reset(){xe.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=de.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)(e===t[i]||e===t[i].track)&&this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),H.performance&&(e.creationTime=H.performance.now()),e}}I_(xe,"TEST_VID",function(){if(!bf())return;const r=de.createElement("video"),e=de.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r});xe.isSupported=function(){try{xe.TEST_VID.volume=.5}catch{return!1}return!!(xe.TEST_VID&&xe.TEST_VID.canPlayType)};xe.canPlayType=function(r){return xe.TEST_VID.canPlayType(r)};xe.canPlaySource=function(r,e){return xe.canPlayType(r.type)};xe.canControlVolume=function(){try{const r=xe.TEST_VID.volume;xe.TEST_VID.volume=r/2+.1;const e=r!==xe.TEST_VID.volume;return e&&xi?(H.setTimeout(()=>{xe&&xe.prototype&&(xe.prototype.featuresVolumeControl=r!==xe.TEST_VID.volume)}),!1):e}catch{return!1}};xe.canMuteVolume=function(){try{const r=xe.TEST_VID.muted;return xe.TEST_VID.muted=!r,xe.TEST_VID.muted?jh(xe.TEST_VID,"muted","muted"):O_(xe.TEST_VID,"muted","muted"),r!==xe.TEST_VID.muted}catch{return!1}};xe.canControlPlaybackRate=function(){if(ts&&rs&&P_<58)return!1;try{const r=xe.TEST_VID.playbackRate;return xe.TEST_VID.playbackRate=r/2+.1,r!==xe.TEST_VID.playbackRate}catch{return!1}};xe.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(de.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(de.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(de.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(de.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};xe.supportsNativeTextTracks=function(){return k_||xi&&rs};xe.supportsNativeVideoTracks=function(){return!!(xe.TEST_VID&&xe.TEST_VID.videoTracks)};xe.supportsNativeAudioTracks=function(){return!!(xe.TEST_VID&&xe.TEST_VID.audioTracks)};xe.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([r,e]){I_(xe.prototype,r,()=>xe[e](),!0)});xe.prototype.featuresVolumeControl=xe.canControlVolume();xe.prototype.movingMediaElementInDOM=!xi;xe.prototype.featuresFullscreenResize=!0;xe.prototype.featuresProgressEvents=!0;xe.prototype.featuresTimeupdateEvents=!0;xe.prototype.featuresVideoFrameCallback=!!(xe.TEST_VID&&xe.TEST_VID.requestVideoFrameCallback);xe.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&function(){try{r.load()}catch{}}()}};xe.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let t=e.length;for(;t--;)r.removeChild(e[t]);r.removeAttribute("src"),typeof r.load=="function"&&function(){try{r.load()}catch{}}()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){xe.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){xe.prototype["set"+nr(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){xe.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){xe.prototype["set"+nr(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){xe.prototype[r]=function(){return this.el_[r]()}});it.withSourceHandlers(xe);xe.nativeSourceHandler={};xe.nativeSourceHandler.canPlayType=function(r){try{return xe.TEST_VID.canPlayType(r)}catch{return""}};xe.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return xe.nativeSourceHandler.canPlayType(r.type);if(r.src){const t=YC(r.src);return xe.nativeSourceHandler.canPlayType(`video/${t}`)}return""};xe.nativeSourceHandler.handleSource=function(r,e,t){e.setSrc(r.src)};xe.nativeSourceHandler.dispose=function(){};xe.registerSourceHandler(xe.nativeSourceHandler);it.registerTech("Html5",xe);const r8=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],xb={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},zx=["tiny","xsmall","small","medium","large","xlarge","huge"],ay={};zx.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;ay[r]=`vjs-layout-${e}`});const Jte={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};let Lr=class rh extends ae{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${qn()}`,t=Object.assign(rh.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const s=e.closest("[lang]");s&&(t.language=s.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=s=>this.documentFullscreenChange_(s),this.boundFullWindowOnEscKey_=s=>this.fullWindowOnEscKey(s),this.boundUpdateStyleEl_=s=>this.updateStyleEl_(s),this.boundApplyInitTime_=s=>this.applyInitTime_(s),this.boundUpdateCurrentBreakpoint_=s=>this.updateCurrentBreakpoint_(s),this.boundHandleTechClick_=s=>this.handleTechClick_(s),this.boundHandleTechDoubleClick_=s=>this.handleTechDoubleClick_(s),this.boundHandleTechTouchStart_=s=>this.handleTechTouchStart_(s),this.boundHandleTechTouchMove_=s=>this.handleTechTouchMove_(s),this.boundHandleTechTouchEnd_=s=>this.handleTechTouchEnd_(s),this.boundHandleTechTap_=s=>this.handleTechTap_(s),this.boundUpdatePlayerHeightOnAudioOnlyMode_=s=>this.updatePlayerHeightOnAudioOnlyMode_(s),this.isFullscreen_=!1,this.log=G4(this.id_),this.fsApi_=Hy,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Co(e),this.language(this.options_.language),t.languages){const s={};Object.getOwnPropertyNames(t.languages).forEach(function(o){s[o.toLowerCase()]=t.languages[o]}),this.languages_=s}else this.languages_=rh.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(s=>{if(typeof this[s]!="function")throw new Error(`plugin "${s}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),WC(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(_n(de,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=Ut(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(s=>{this[s](t.plugins[s])}),t.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const o=new H.DOMParser().parseFromString(Ste,"image/svg+xml");if(o.querySelector("parsererror"))pt.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const u=o.documentElement;u.style.display="none",this.el_.appendChild(u),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new xte(this),this.addClass("vjs-spatial-navigation-enabled")),Xp&&this.addClass("vjs-touch-enabled"),xi||this.addClass("vjs-workinghover"),rh.players[this.id_]=this;const a=Mx.split(".")[0];this.addClass(`vjs-v${a}`),this.userActive(!0),this.reportUserActivity(),this.one("play",s=>this.listenForUserActivity_(s)),this.on("keydown",s=>this.handleKeyDown(s)),this.on("languagechange",s=>this.handleLanguagechange(s)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),ni(de,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ni(de,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),rh.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),yte(this),_i.names.forEach(e=>{const t=_i[e],i=this[t.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,t,i=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const n=this.tag.tagName.toLowerCase()==="video-js";i?t=this.el_=e.parentNode:n||(t=this.el_=super.createEl("div"));const a=Co(e);if(n){for(t=this.el_=e,e=this.tag=de.createElement("video");t.children.length;)e.appendChild(t.firstChild);vp(t,"video-js")||Au(t,"video-js"),t.appendChild(e),i=this.playerElIngest_=t,Object.keys(t).forEach(l=>{try{e[l]=t[l]}catch{}})}e.setAttribute("tabindex","-1"),a.tabindex="-1",rs&&M_&&(e.setAttribute("role","application"),a.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(l){n&&l==="class"||t.setAttribute(l,a[l]),n&&e.setAttribute(l,a[l])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=t.player=this,this.addClass("vjs-paused");const s=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(l=>K4[l]).map(l=>"vjs-device-"+l.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...s),H.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=hF("vjs-styles-dimensions");const l=Ko(".vjs-styles-defaults"),u=Ko("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const o=e.getElementsByTagName("a");for(let l=0;l<o.length;l++){const u=o.item(l);Au(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!i&&e.parentNode.insertBefore(t,e),kx(e,t),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){pt.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(t===void 0)return this[i]||0;if(t===""||t==="auto"){this[i]=void 0,this.updateStyleEl_();return}const n=parseFloat(t);if(isNaN(n)){pt.error(`Improper value "${t}" supplied for for ${e}`);return}this[i]=n,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Ls(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),Xee(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(H.VIDEOJS_NO_DYNAMIC_STYLE===!0){const o=typeof this.width_=="number"?this.width_:this.options_.width,l=typeof this.height_=="number"?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),l>=0&&(u.height=l));return}let e,t,i,n;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?i=this.aspectRatio_:this.videoWidth()>0?i=this.videoWidth()+":"+this.videoHeight():i="16:9";const a=i.split(":"),s=a[1]/a[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/s:e=this.videoWidth()||300,this.height_!==void 0?t=this.height_:t=e*s,/^[^a-zA-Z]/.test(this.id())?n="dimensions-"+this.id():n=this.id()+"-dimensions",this.addClass(n),fF(this.styleEl_,`
.${n} {
width: ${e}px;
height: ${t}px;
}
.${n}.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: ${s*100}%;
}
`)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=nr(e),n=e.charAt(0).toLowerCase()+e.slice(1);i!=="Html5"&&this.tag&&(it.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let a=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(a=!1);const s={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};_i.names.forEach(l=>{const u=_i[l];s[u.getterName]=this[u.privateName]}),Object.assign(s,this.options_[i]),Object.assign(s,this.options_[n]),Object.assign(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);const o=it.getTech(e);if(!o)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new o(s),this.tech_.ready(Ht(this,this.handleTechReady_),!0),BP.jsonToTextTracks(this.textTracksJson_||[],this.tech_),r8.forEach(l=>{this.on(this.tech_,l,u=>this[`handleTech${nr(l)}_`](u))}),Object.keys(xb).forEach(l=>{this.on(this.tech_,l,u=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${xb[l]}_`].bind(this),event:u});return}this[`handleTech${xb[l]}_`](u)})}),this.on(this.tech_,"loadstart",l=>this.handleTechLoadStart_(l)),this.on(this.tech_,"sourceset",l=>this.handleTechSourceset_(l)),this.on(this.tech_,"waiting",l=>this.handleTechWaiting_(l)),this.on(this.tech_,"ended",l=>this.handleTechEnded_(l)),this.on(this.tech_,"seeking",l=>this.handleTechSeeking_(l)),this.on(this.tech_,"play",l=>this.handleTechPlay_(l)),this.on(this.tech_,"pause",l=>this.handleTechPause_(l)),this.on(this.tech_,"durationchange",l=>this.handleTechDurationChange_(l)),this.on(this.tech_,"fullscreenchange",(l,u)=>this.handleTechFullscreenChange_(l,u)),this.on(this.tech_,"fullscreenerror",(l,u)=>this.handleTechFullscreenError_(l,u)),this.on(this.tech_,"enterpictureinpicture",l=>this.handleTechEnterPictureInPicture_(l)),this.on(this.tech_,"leavepictureinpicture",l=>this.handleTechLeavePictureInPicture_(l)),this.on(this.tech_,"error",l=>this.handleTechError_(l)),this.on(this.tech_,"posterchange",l=>this.handleTechPosterChange_(l)),this.on(this.tech_,"textdata",l=>this.handleTechTextData_(l)),this.on(this.tech_,"ratechange",l=>this.handleTechRateChange_(l)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(i!=="Html5"||!this.tag)&&kx(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){_i.names.forEach(e=>{const t=_i[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=BP.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&pt.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_}version(){return{"video.js":Mx}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const t=()=>{const n=this.muted();this.muted(!0);const a=()=>{this.muted(n)};this.playTerminatedQueue_.push(a);const s=this.play();if(mp(s))return s.catch(o=>{throw a(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${o||""}`)})};let i;if(e==="any"&&!this.muted()?(i=this.play(),mp(i)&&(i=i.catch(t))):e==="muted"&&!this.muted()?i=t():i=this.play(),!!mp(i))return i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let t=e,i="";typeof t!="string"&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=Tte(this,t)),this.cache_.source=Ut({},e,{src:t,type:i});const n=this.cache_.sources.filter(l=>l.src&&l.src===t),a=[],s=this.$$("source"),o=[];for(let l=0;l<s.length;l++){const u=Co(s[l]);a.push(u),u.src&&u.src===t&&o.push(u.src)}o.length&&!n.length?this.cache_.sources=a:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=a=>this.updateSourceCaches_(a);const i=this.currentSource().src,n=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==i)&&(t=()=>{}),t(n),e.src||this.tech_.any(["sourceset","loadstart"],a=>{if(a.type==="sourceset")return;const s=this.techGet_("currentSrc");this.lastSource_.tech=s,this.updateSourceCaches_(s)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Va(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),i=>i.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let n=de[this.fsApi_.fullscreenElement]===i;!n&&i.matches&&(n=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in gte)return pte(this.middleware_,this.tech_,e,t);if(e in GP)return zP(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw pt(i),i}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in vte)return dte(this.middleware_,this.tech_,e);if(e in GP)return zP(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(pt(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t):t.name==="TypeError"?(pt(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t):(pt(t),t)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Va){this.playCallbacks_.push(e);const t=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),i=!!(k_||xi);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=s=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!t&&i&&this.load();return}const n=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),n===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(t){t()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(i){i(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||pa(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=pa(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=pa(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return TF(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;if(e!==void 0){t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,n)=>{function a(){t.off("fullscreenerror",o),t.off("fullscreenchange",s)}function s(){a(),i()}function o(u,c){a(),n(c)}t.one("fullscreenchange",s),t.one("fullscreenerror",o);const l=t.requestFullscreenHelper_(e);l&&(l.then(a,a),l.then(i,n))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(t=e)),this.fsApi_.requestFullscreen){const i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),i}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function n(){e.off("fullscreenerror",s),e.off("fullscreenchange",a)}function a(){n(),t()}function s(l,u){n(),i(u)}e.one("fullscreenchange",a),e.one("fullscreenerror",s);const o=e.exitFullscreenHelper_();o&&(o.then(n,n),o.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=de[this.fsApi_.exitFullscreen]();return e&&Va(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=de.documentElement.style.overflow,_n(de,"keydown",this.boundFullWindowOnEscKey_),de.documentElement.style.overflow="hidden",Au(de.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,ni(de,"keydown",this.boundFullWindowOnEscKey_),de.documentElement.style.overflow=this.docOrigOverflow,R_(de.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&H.documentPictureInPicture){const e=de.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Ke("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),H.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(lF(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",i=>{const n=i.target.querySelector(".video-js");e.parentNode.replaceChild(n,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in de&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(H.documentPictureInPicture&&H.documentPictureInPicture.window)return H.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in de)return de.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;!t||!t.hotkeys||(n=>{const a=n.tagName.toLowerCase();if(n.isContentEditable)return!0;const s=["button","checkbox","hidden","radio","reset","submit"];return a==="input"?s.indexOf(n.type)===-1:["textarea"].indexOf(a)!==-1})(this.el_.ownerDocument.activeElement)||(typeof t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=s=>e.key.toLowerCase()==="f",muteKey:n=s=>e.key.toLowerCase()==="m",playPauseKey:a=s=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const s=ae.getComponent("FullscreenToggle");de[this.fsApi_.fullscreenEnabled]!==!1&&s.prototype.handleClick.call(this,e)}else n.call(this,e)?(e.preventDefault(),e.stopPropagation(),ae.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ae.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let i=0,n=this.options_.techOrder;i<n.length;i++){const a=n[i];let s=it.getTech(a);if(s||(s=ae.getComponent(a)),!s){pt.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(s.isSupported()&&(t=s.canPlayType(e),t))return t}return""}selectSource(e){const t=this.options_.techOrder.map(o=>[o,it.getTech(o)]).filter(([o,l])=>l?l.isSupported():(pt.error(`The "${o}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(o,l,u){let c;return o.some(h=>l.some(d=>{if(c=u(h,d),c)return!0})),c};let n;const a=o=>(l,u)=>o(u,l),s=([o,l],u)=>{if(l.canPlaySource(u,this.options_[o.toLowerCase()]))return{source:u,tech:o}};return this.options_.sourceOrder?n=i(e,t,a(s)):n=i(t,e,s),n||!1}handleSrc_(e,t){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=AF(e);if(!i.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),hte(this,i[0],(n,a)=>{if(this.middleware_=a,t||(this.cache_.sources=i),this.updateSourceCaches_(n),this.src_(n)){if(i.length>1)return this.handleSrc_(i.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}fte(a,this.tech_)}),i.length>1){const n=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},a=()=>{this.off("error",n)};this.one("error",n),this.one("playing",a),this.resetRetryOnError_=()=>{this.off("error",n),this.off("playing",a)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return t?mF(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Va(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Ls(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:a}=i||{};e&&e.updateContent(),t&&t.updateContent(),n&&n.updateContent(),a&&(a.update(),a.loadProgressBar&&a.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(Yo("beforeerror").forEach(t=>{const i=t(this,e);if(!(es(i)&&!Array.isArray(i)||typeof i=="string"||typeof i=="number"||i===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=i}),this.options_.suppressNotSupportedError&&e&&e.code===4){const t=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new tr(e),this.addClass("vjs-error"),pt.error(`(CODE:${this.error_.code} ${tr.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),Yo("error").forEach(t=>t(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,i;const n=Ht(this,this.reportUserActivity),a=function(h){(h.screenX!==t||h.screenY!==i)&&(t=h.screenX,i=h.screenY,n())},s=function(){n(),this.clearInterval(e),e=this.setInterval(n,250)},o=function(h){n(),this.clearInterval(e)};this.on("mousedown",s),this.on("mousemove",a),this.on("mouseup",o),this.on("mouseleave",o);const l=this.getChild("controlBar");l&&!xi&&!ts&&(l.on("mouseenter",function(h){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),l.on("mouseleave",function(h){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",n),this.on("keyup",n);let u;const c=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(u);const h=this.options_.inactivityTimeout;h<=0||(u=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},h))};this.setInterval(c,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach(n=>{n!==t&&n.el_&&!n.hasClass("vjs-hidden")&&(n.hide(),this.audioOnlyCache_.hiddenChildren.push(n))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const t=[];return this.isInPictureInPicture()&&t.push(this.exitPictureInPicture()),this.isFullscreen()&&t.push(this.exitFullscreen()),this.audioPosterMode()&&t.push(this.audioPosterMode(!1)),Promise.all(t).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ls(this)&&this.trigger("languagechange"))}languages(){return Ut(rh.prototype.options_.languages,this.languages_)}toJSON(){const e=Ut(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let n=t[i];n=Ut(n),n.player=void 0,e.tracks[i]=n}return e}createModal(e,t){t=t||{},t.content=e||"";const i=new xf(this,t);return this.addChild(i),i.on("dispose",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<zx.length;i++){const n=zx[i],a=this.breakpoints_[n];if(t<=a){if(e===n)return;e&&this.removeClass(ay[e]),this.addClass(ay[n]),this.breakpoint_=n;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},Jte,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const t=this.responsive_;if(e!==t)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return ay[this.breakpoint_]||""}loadMedia(e,t){if(!e||typeof e!="object")return;const i=this.crossOrigin();this.reset(),this.cache_.media=Ut(e);const{artist:n,artwork:a,description:s,poster:o,src:l,textTracks:u,title:c}=this.cache_.media;!a&&o&&(this.cache_.media.artwork=[{src:o,type:Jy(o)}]),i&&this.crossOrigin(i),l&&this.src(l),o&&this.poster(o),Array.isArray(u)&&u.forEach(h=>this.addRemoteTextTrack(h,!1)),this.titleBar&&this.titleBar.update({title:c,description:s||n||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),n={src:t,textTracks:i};return e&&(n.poster=e,n.artwork=[{src:n.poster,type:Jy(n.poster)}]),n}return Ut(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=Co(e),n=i["data-setup"];if(vp(e,"vjs-fill")&&(i.fill=!0),vp(e,"vjs-fluid")&&(i.fluid=!0),n!==null)try{Object.assign(i,JSON.parse(n||"{}"))}catch(a){pt.error("data-setup",a)}if(Object.assign(t,i),e.hasChildNodes()){const a=e.childNodes;for(let s=0,o=a.length;s<o;s++){const l=a[s],u=l.nodeName.toLowerCase();u==="source"?t.sources.push(Co(l)):u==="track"&&t.tracks.push(Co(l))}}return t}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(t=>typeof t=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}};_i.names.forEach(function(r){const e=_i[r];Lr.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});Lr.prototype.crossorigin=Lr.prototype.crossOrigin;Lr.players={};const ud=H.navigator;Lr.prototype.options_={techOrder:it.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ud&&(ud.languages&&ud.languages[0]||ud.userLanguage||ud.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1};r8.forEach(function(r){Lr.prototype[`handleTech${nr(r)}_`]=function(){return this.trigger(r)}});ae.registerComponent("Player",Lr);const e0="plugin",xh="activePlugins_",ch={},t0=r=>ch.hasOwnProperty(r),sy=r=>t0(r)?ch[r]:void 0,i8=(r,e)=>{r[xh]=r[xh]||{},r[xh][e]=!0},r0=(r,e,t)=>{const i=(t?"before":"")+"pluginsetup";r.trigger(i,e),r.trigger(i+":"+e.name,e)},ere=function(r,e){const t=function(){r0(this,{name:r,plugin:e,instance:null},!0);const i=e.apply(this,arguments);return i8(this,r),r0(this,{name:r,plugin:e,instance:i}),i};return Object.keys(e).forEach(function(i){t[i]=e[i]}),t},aM=(r,e)=>(e.prototype.name=r,function(...t){r0(this,{name:r,plugin:e,instance:null},!0);const i=new e(this,...t);return this[r]=()=>i,r0(this,i.getEventHash()),i});class $i{constructor(e){if(this.constructor===$i)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),WC(this),delete this.trigger,gF(this,this.constructor.defaultState),i8(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return Sf(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[xh][e]=!1,this.player=this.state=null,t[e]=aM(e,ch[e])}static isBasic(e){const t=typeof e=="string"?sy(e):e;return typeof t=="function"&&!$i.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(t0(e))pt.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Lr.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof t!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return ch[e]=t,e!==e0&&($i.isBasic(t)?Lr.prototype[e]=ere(e,t):Lr.prototype[e]=aM(e,t)),t}static deregisterPlugin(e){if(e===e0)throw new Error("Cannot de-register base plugin.");t0(e)&&(delete ch[e],delete Lr.prototype[e])}static getPlugins(e=Object.keys(ch)){let t;return e.forEach(i=>{const n=sy(i);n&&(t=t||{},t[i]=n)}),t}static getPluginVersion(e){const t=sy(e);return t&&t.VERSION||""}}$i.getPlugin=sy;$i.BASE_PLUGIN_NAME=e0;$i.registerPlugin(e0,$i);Lr.prototype.usingPlugin=function(r){return!!this[xh]&&this[xh][r]===!0};Lr.prototype.hasPlugin=function(r){return!!t0(r)};function tre(r,e){let t=!1;return function(...i){return t||pt.warn(r),t=!0,e.apply(this,i)}}function Ta(r,e,t,i){return tre(`${e} is deprecated and will be removed in ${r}.0; please use ${t} instead.`,i)}var rre={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const n8=r=>r.indexOf("#")===0?r.slice(1):r;function K(r,e,t){let i=K.getPlayer(r);if(i)return e&&pt.warn(`Player "${r}" is already initialised. Options will not be applied.`),t&&i.ready(t),i;const n=typeof r=="string"?Ko("#"+n8(r)):r;if(!Tf(n))throw new TypeError("The element or ID supplied is not valid. (videojs)");const s=("getRootNode"in n?n.getRootNode()instanceof H.ShadowRoot:!1)?n.getRootNode():n.ownerDocument.body;(!n.ownerDocument.defaultView||!s.contains(n))&&pt.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player")?n.parentNode:n).cloneNode(!0)),Yo("beforesetup").forEach(l=>{const u=l(n,Ut(e));if(!es(u)||Array.isArray(u)){pt.error("please return an object in beforesetup hooks");return}e=Ut(e,u)});const o=ae.getComponent("Player");return i=new o(n,e,t),Yo("setup").forEach(l=>l(i)),i}K.hooks_=Cs;K.hooks=Yo;K.hook=Ree;K.hookOnce=Oee;K.removeHook=z4;if(H.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&bf()){let r=Ko(".vjs-styles-defaults");if(!r){r=hF("vjs-styles-defaults");const e=Ko("head");e&&e.insertBefore(r,e.firstChild),fF(r,`
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: 56.25%
}
`)}}Ox(1,K);K.VERSION=Mx;K.options=Lr.prototype.options_;K.getPlayers=()=>Lr.players;K.getPlayer=r=>{const e=Lr.players;let t;if(typeof r=="string"){const i=n8(r),n=e[i];if(n)return n;t=Ko("#"+i)}else t=r;if(Tf(t)){const{player:i,playerId:n}=t;if(i||e[n])return i||e[n]}};K.getAllPlayers=()=>Object.keys(Lr.players).map(r=>Lr.players[r]).filter(Boolean);K.players=Lr.players;K.getComponent=ae.getComponent;K.registerComponent=(r,e)=>(it.isTech(e)&&pt.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ae.registerComponent.call(ae,r,e));K.getTech=it.getTech;K.registerTech=it.registerTech;K.use=cte;Object.defineProperty(K,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(K.middleware,"TERMINATOR",{value:Qy,writeable:!1,enumerable:!0});K.browser=K4;K.obj=Fee;K.mergeOptions=Ta(9,"videojs.mergeOptions","videojs.obj.merge",Ut);K.defineLazyProperty=Ta(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",I_);K.bind=Ta(9,"videojs.bind","native Function.prototype.bind",Ht);K.registerPlugin=$i.registerPlugin;K.deregisterPlugin=$i.deregisterPlugin;K.plugin=(r,e)=>(pt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),$i.registerPlugin(r,e));K.getPlugins=$i.getPlugins;K.getPlugin=$i.getPlugin;K.getPluginVersion=$i.getPluginVersion;K.addLanguage=function(r,e){return r=(""+r).toLowerCase(),K.options.languages=Ut(K.options.languages,{[r]:e}),K.options.languages[r]};K.log=pt;K.createLogger=G4;K.time=Jee;K.createTimeRange=Ta(9,"videojs.createTimeRange","videojs.time.createTimeRanges",pa);K.createTimeRanges=Ta(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",pa);K.formatTime=Ta(9,"videojs.formatTime","videojs.time.formatTime",Xu);K.setFormatTime=Ta(9,"videojs.setFormatTime","videojs.time.setFormatTime",_F);K.resetFormatTime=Ta(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",bF);K.parseUrl=Ta(9,"videojs.parseUrl","videojs.url.parseUrl",XC);K.isCrossOrigin=Ta(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",z_);K.EventTarget=bn;K.any=$C;K.on=_n;K.one=U_;K.off=ni;K.trigger=Sf;K.xhr=W5;K.TextTrack=Hv;K.AudioTrack=wF;K.VideoTrack=CF;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{K[r]=function(){return pt.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),uF[r].apply(null,arguments)}});K.computedStyle=Ta(9,"videojs.computedStyle","videojs.dom.computedStyle",Yh);K.dom=uF;K.fn=jee;K.num=Mte;K.str=Zee;K.url=lte;K.Error=rre;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class ire{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(i){t.enabled_(i)}}),t}}class i0 extends K.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new ire(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const n=this[t];if(n.id===e)return n}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}i0.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in i0.prototype.allowedEvents_)i0.prototype["on"+r]=null;var a8="4.1.0";const nre=function(r,e){const t=r.qualityLevels,i=new i0,n=function(){i.dispose(),r.qualityLevels=t,r.off("dispose",n)};return r.on("dispose",n),r.qualityLevels=()=>i,r.qualityLevels.VERSION=a8,i},s8=function(r){return nre(this,K.obj.merge({},r))};K.registerPlugin("qualityLevels",s8);s8.VERSION=a8;/*! @name @videojs/http-streaming @version 3.14.2 @license Apache-2.0 */const Ni=S_,n0=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,Kn=r=>K.log.debug?K.log.debug.bind(K,"VHS:",`${r} >`):function(){};function It(...r){const e=K.obj||K;return(e.merge||e.mergeOptions).apply(e,r)}function Kr(...r){const e=K.time||K;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function are(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
`;for(let t=0;t<r.length;t++){const i=r.start(t),n=r.end(t);e+=`${i} --> ${n}. Duration (${n-i})
`}return e}const za=1/30,Ga=za*3,o8=function(r,e){const t=[];let i;if(r&&r.length)for(i=0;i<r.length;i++)e(r.start(i),r.end(i))&&t.push([r.start(i),r.end(i)]);return Kr(t)},hh=function(r,e){return o8(r,function(t,i){return t-Ga<=e&&i+Ga>=e})},$g=function(r,e){return o8(r,function(t){return t-za>=e})},sre=function(r){if(r.length<2)return Kr();const e=[];for(let t=1;t<r.length;t++){const i=r.end(t-1),n=r.start(t);e.push([i,n])}return Kr(e)},ore=function(r,e){let t=null,i=null,n=0;const a=[],s=[];if(!r||!r.length||!e||!e.length)return Kr();let o=r.length;for(;o--;)a.push({time:r.start(o),type:"start"}),a.push({time:r.end(o),type:"end"});for(o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(a.sort(function(l,u){return l.time-u.time}),o=0;o<a.length;o++)a[o].type==="start"?(n++,n===2&&(t=a[o].time)):a[o].type==="end"&&(n--,n===1&&(i=a[o].time)),t!==null&&i!==null&&(s.push([t,i]),t=null,i=null);return Kr(s)},l8=r=>{const e=[];if(!r||!r.length)return"";for(let t=0;t<r.length;t++)e.push(r.start(t)+" => "+r.end(t));return e.join(", ")},lre=function(r,e,t=1){return((r.length?r.end(r.length-1):0)-e)/t},pu=r=>{const e=[];for(let t=0;t<r.length;t++)e.push({start:r.start(t),end:r.end(t)});return e},ure=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let t=0;t<r.length;t++)if(r.start(t)!==e.start(t)||r.end(t)!==e.end(t))return!0;return!1},wb=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},fA=function(r,e){let t=0;if(!r||!r.length)return t;for(let i=0;i<r.length;i++){const n=r.start(i),a=r.end(i);if(!(e>a)){if(e>n&&e<=a){t+=a-e;continue}t+=a-n}}return t},dA=(r,e)=>{if(!e.preload)return e.duration;let t=0;return(e.parts||[]).forEach(function(i){t+=i.duration}),(e.preloadHints||[]).forEach(function(i){i.type==="PART"&&(t+=r.partTargetDuration)}),t},Gx=r=>(r.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(n,a){e.push({duration:n.duration,segmentIndex:i,partIndex:a,part:n,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),u8=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},c8=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:t}=r;let i=(t||[]).reduce((n,a)=>n+(a.type==="PART"?1:0),0);return i+=e&&e.length?e.length:0,i},h8=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=u8(e).length>0;return t&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:t&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},cre=function(r,e){let t=0,i=e-r.mediaSequence,n=r.segments[i];if(n){if(typeof n.start<"u")return{result:n.start,precise:!0};if(typeof n.end<"u")return{result:n.end-n.duration,precise:!0}}for(;i--;){if(n=r.segments[i],typeof n.end<"u")return{result:t+n.end,precise:!0};if(t+=dA(r,n),typeof n.start<"u")return{result:t+n.start,precise:!0}}return{result:t,precise:!1}},hre=function(r,e){let t=0,i,n=e-r.mediaSequence;for(;n<r.segments.length;n++){if(i=r.segments[n],typeof i.start<"u")return{result:i.start-t,precise:!0};if(t+=dA(r,i),typeof i.end<"u")return{result:i.end-t,precise:!0}}return{result:-1,precise:!1}},f8=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const i=cre(r,e);if(i.precise)return i.result;const n=hre(r,e);return n.precise?n.result:i.result+t},d8=function(r,e,t){if(!r)return 0;if(typeof t!="number"&&(t=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return H.Infinity}return f8(r,e,t)},yp=function({defaultDuration:r,durationList:e,startIndex:t,endIndex:i}){let n=0;if(t>i&&([t,i]=[i,t]),t<0){for(let a=t;a<Math.min(0,i);a++)n+=r;t=0}for(let a=t;a<i;a++)n+=e[a].duration;return n},p8=function(r,e,t,i){if(!r||!r.segments)return null;if(r.endList)return d8(r);if(e===null)return null;e=e||0;let n=f8(r,r.mediaSequence+r.segments.length,e);return t&&(i=typeof i=="number"?i:h8(null,r),n-=i),Math.max(0,n)},fre=function(r,e,t){const n=e||0;let a=p8(r,e,!0,t);return a===null?Kr():(a<n&&(a=n),Kr(n,a))},dre=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:i,startTime:n,exactManifestTimings:a}){let s=e-n;const o=Gx(r);let l=0;for(let u=0;u<o.length;u++){const c=o[u];if(t===c.segmentIndex&&!(typeof i=="number"&&typeof c.partIndex=="number"&&i!==c.partIndex)){l=u;break}}if(s<0){if(l>0)for(let u=l-1;u>=0;u--){const c=o[u];if(s+=c.duration,a){if(s<0)continue}else if(s+za<=0)continue;return{partIndex:c.partIndex,segmentIndex:c.segmentIndex,startTime:n-yp({defaultDuration:r.targetDuration,durationList:o,startIndex:l,endIndex:u})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e}}if(l<0){for(let u=l;u<0;u++)if(s-=r.targetDuration,s<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e};l=0}for(let u=l;u<o.length;u++){const c=o[u];s-=c.duration;const h=c.duration>za,d=s===0,f=h&&s+za>=0;if(!((d||f)&&u!==o.length-1)){if(a){if(s>0)continue}else if(s-za>=0)continue;return{partIndex:c.partIndex,segmentIndex:c.segmentIndex,startTime:n+yp({defaultDuration:r.targetDuration,durationList:o,startIndex:l,endIndex:u})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:e}},v8=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},pA=function(r){return r.excludeUntil&&r.excludeUntil===1/0},$_=function(r){const e=v8(r);return!r.disabled&&!e},pre=function(r){return r.disabled},vre=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},g8=function(r,e){return e.attributes&&e.attributes[r]},gre=function(r,e,t,i=0){return g8("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-i*8)/e:NaN},Hx=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(i=>$_(i)?(i.attributes.BANDWIDTH||0)<t:!1).length===0},vA=(r,e)=>!r&&!e||!r&&e||r&&!e?!1:!!(r===e||r.id&&e.id&&r.id===e.id||r.resolvedUri&&e.resolvedUri&&r.resolvedUri===e.resolvedUri||r.uri&&e.uri&&r.uri===e.uri),sM=function(r,e){const t=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let i=!1;for(const n in t){for(const a in t[n])if(i=e(t[n][a]),i)break;if(i)break}return!!i},jv=r=>{if(!r||!r.playlists||!r.playlists.length)return sM(r,t=>t.playlists&&t.playlists.length||t.uri);for(let e=0;e<r.playlists.length;e++){const t=r.playlists[e],i=t.attributes&&t.attributes.CODECS;if(!(i&&i.split(",").every(a=>Z5(a))||sM(r,a=>vA(t,a))))return!1}return!0};var Vi={liveEdgeDelay:h8,duration:d8,seekable:fre,getMediaInfoForTime:dre,isEnabled:$_,isDisabled:pre,isExcluded:v8,isIncompatible:pA,playlistEnd:p8,isAes:vre,hasAttribute:g8,estimateSegmentRequestTime:gre,isLowestEnabledRendition:Hx,isAudioOnly:jv,playlistMatch:vA,segmentDurationWithParts:dA};const{log:m8}=K,wh=(r,e)=>`${r}-${e}`,y8=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,mre=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:i=[],customTagMappers:n=[],llhls:a})=>{const s=new kQ;r&&s.on("warn",r),e&&s.on("info",e),i.forEach(u=>s.addParser(u)),n.forEach(u=>s.addTagMapper(u)),s.push(t),s.end();const o=s.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(u){o.hasOwnProperty(u)&&delete o[u]}),o.segments&&o.segments.forEach(function(u){["parts","preloadHints"].forEach(function(c){u.hasOwnProperty(c)&&delete u[c]})})),!o.targetDuration){let u=10;o.segments&&o.segments.length&&(u=o.segments.reduce((c,h)=>Math.max(c,h.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${u}`}),o.targetDuration=u}const l=u8(o);if(l.length&&!o.partTargetDuration){const u=l.reduce((c,h)=>Math.max(c,h.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${u}`}),m8.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=u}return o},Af=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(t=>{if(r.mediaGroups[t])for(const i in r.mediaGroups[t])for(const n in r.mediaGroups[t][i]){const a=r.mediaGroups[t][i][n];e(a,t,i,n)}})},_8=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},yre=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];_8({playlist:t,id:wh(e,t.uri)}),t.resolvedUri=Ni(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||m8.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},_re=r=>{Af(r,e=>{e.uri&&(e.resolvedUri=Ni(r.uri,e.uri))})},bre=(r,e)=>{const t=wh(0,e),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:H.location.href,resolvedUri:H.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return i.playlists[t]=i.playlists[0],i.playlists[e]=i.playlists[0],i},b8=(r,e,t=y8)=>{r.uri=e;for(let n=0;n<r.playlists.length;n++)if(!r.playlists[n].uri){const a=`placeholder-uri-${n}`;r.playlists[n].uri=a}const i=jv(r);Af(r,(n,a,s,o)=>{if(!n.playlists||!n.playlists.length){if(i&&a==="AUDIO"&&!n.uri)for(let l=0;l<r.playlists.length;l++){const u=r.playlists[l];if(u.attributes&&u.attributes.AUDIO&&u.attributes.AUDIO===s)return}n.playlists=[ar({},n)]}n.playlists.forEach(function(l,u){const c=t(a,s,o,l),h=wh(u,c);l.uri?l.resolvedUri=l.resolvedUri||Ni(r.uri,l.uri):(l.uri=u===0?c:h,l.resolvedUri=l.uri),l.id=l.id||h,l.attributes=l.attributes||{},r.playlists[l.id]=l,r.playlists[l.uri]=l})}),yre(r),_re(r)};class oM{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[t]=e;t.programDateTime!==void 0&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((n,a)=>(n.set(a.id,a),n),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,n)=>{if(!this.processedDateRanges_.has(n)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),!!i.class))if(e[i.class]){const a=e[i.class].push(i);i.classListIndex=a-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const n=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&n[i.classListIndex+1]?i.endTime=n[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((i,n)=>{i.startDate.getTime()<e&&this.processedDateRanges_.delete(n)})}}const T8=22,Iu=({requestType:r,request:e,error:t,parseFailure:i})=>{const n=e.status<200||e.status>299,a=e.status>=400&&e.status<=499,s={uri:e.uri,requestType:r},o=n&&!a||i;if(t&&a)s.error=ar({},t),s.errorType=K.Error.NetworkRequestFailed;else if(e.aborted)s.errorType=K.Error.NetworkRequestAborted;else if(e.timedout)s.erroType=K.Error.NetworkRequestTimeout;else if(o){const l=i?K.Error.NetworkBodyParserFailed:K.Error.NetworkBadStatus;s.errorType=l,s.status=e.status,s.headers=e.headers}return s},{EventTarget:Tre}=K,Sre=(r,e)=>{if(e.endList||!e.serverControl)return r;const t={};if(e.serverControl.canBlockReload){const{preloadSegment:i}=e;let n=e.mediaSequence+e.segments.length;if(i){const a=i.parts||[],s=c8(e)-1;s>-1&&s!==a.length-1&&(t._HLS_part=s),(s>-1||a.length)&&n--}t._HLS_msn=n}if(e.serverControl&&e.serverControl.canSkipUntil&&(t._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(t).length){const i=new H.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(n){t.hasOwnProperty(n)&&i.searchParams.set(n,t[n])}),r=i.toString()}return r},xre=(r,e)=>{if(!r)return e;const t=It(r,e);if(r.preloadHints&&!e.preloadHints&&delete t.preloadHints,r.parts&&!e.parts)delete t.parts;else if(r.parts&&e.parts)for(let i=0;i<e.parts.length;i++)r.parts&&r.parts[i]&&(t.parts[i]=It(r.parts[i],e.parts[i]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},wre=(r,e,t)=>{const i=r.slice(),n=e.slice();t=t||0;const a=[];let s;for(let o=0;o<n.length;o++){const l=i[o+t],u=n[o];l?(s=l.map||s,a.push(xre(l,u))):(s&&!u.map&&(u.map=s),a.push(u))}return a},S8=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=Ni(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=Ni(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=Ni(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=Ni(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=Ni(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=Ni(e,t.uri))})},x8=function(r){const e=r.segments||[],t=r.preloadSegment;if(t&&t.parts&&t.parts.length){if(t.preloadHints){for(let i=0;i<t.preloadHints.length;i++)if(t.preloadHints[i].type==="MAP")return e}t.duration=r.targetDuration,t.preload=!0,e.push(t)}return e},w8=(r,e)=>r===e||r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence&&r.preloadSegment===e.preloadSegment,$x=(r,e,t=w8)=>{const i=It(r,{}),n=i.playlists[e.id];if(!n||t(n,e))return null;e.segments=x8(e);const a=It(n,e);if(a.preloadSegment&&!e.preloadSegment&&delete a.preloadSegment,n.segments){if(e.skip){e.segments=e.segments||[];for(let s=0;s<e.skip.skippedSegments;s++)e.segments.unshift({skipped:!0})}a.segments=wre(n.segments,e.segments,e.mediaSequence-n.mediaSequence)}a.segments.forEach(s=>{S8(s,a.resolvedUri)});for(let s=0;s<i.playlists.length;s++)i.playlists[s].id===e.id&&(i.playlists[s]=a);return i.playlists[e.id]=a,i.playlists[e.uri]=a,Af(r,(s,o,l,u)=>{if(s.playlists)for(let c=0;c<s.playlists.length;c++)e.id===s.playlists[c].id&&(s.playlists[c]=a)}),i},Wx=(r,e)=>{const t=r.segments||[],i=t[t.length-1],n=i&&i.parts&&i.parts[i.parts.length-1],a=n&&n.duration||i&&i.duration;return e&&a?a*1e3:(r.partTargetDuration||r.targetDuration||10)*500},lM=(r,e,t)=>{if(!r)return;const i=[];return r.forEach(n=>{if(!n.attributes)return;const{BANDWIDTH:a,RESOLUTION:s,CODECS:o}=n.attributes;i.push({id:n.id,bandwidth:a,resolution:s,codecs:o})}),{type:e,isLive:t,renditions:i}};class fh extends Tre{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Kn("PlaylistLoader");const{withCredentials:n=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=n,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const a=t.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new oM,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();!t.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let t=Ni(this.main.uri,e.uri);this.llhls&&(t=Sre(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,n)=>{if(this.request){if(i)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,t,i){const{uri:n,id:a}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[a],status:e.status,message:`HLS playlist request error at URL: ${n}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Iu({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:t}){try{return mre({onwarn:({message:i})=>this.logger_(`m3u8-parser warn for ${e}: ${i}`),oninfo:({message:i})=>this.logger_(`m3u8-parser info for ${e}: ${i}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}catch(i){this.error=i,this.error.metadata={errorType:K.Error.StreamingHlsPlaylistParserError,error:i}}}haveMetadata({playlistString:e,playlistObject:t,url:i,id:n}){this.request=null,this.state="HAVE_METADATA";const a={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:a});const s=t||this.parseManifest_({url:i,manifestString:e});s.lastRequest=Date.now(),_8({playlist:s,uri:i,id:n});const o=$x(this.main,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,o?(this.main=o,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Wx(this.media(),!!o)),a.parsedPlaylist=lM(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),H.clearTimeout(this.mediaUpdateTimeout),H.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new oM,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(H.clearTimeout(this.finalRenditionTimeout),t){const o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=H.setTimeout(this.media.bind(this,e,!1),o);return}const i=this.state,n=!this.media_||e.id!==this.media_.id,a=this.main.playlists[e.id];if(a&&a.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,n&&(this.trigger("mediachanging"),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(Wx(e,!0)),!n)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const s={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:s}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(o,l)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=n0(e.resolvedUri,l),o)return this.playlistRequestError(this.request,e,i);this.trigger({type:"playlistrequestcomplete",metadata:s}),this.haveMetadata({playlistString:l.responseText,url:e.uri,id:e.id}),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const i=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=H.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},i);return}if(!this.started){this.start();return}t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=H.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=H.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:Iu({requestType:i.requestType,request:i,error:t})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=n0(this.src,i),this.trigger({type:"playlistparsestart",metadata:e});const n=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=lM(n.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(n)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,b8(this.main,this.srcUri()),e.playlists.forEach(i=>{i.segments=x8(i),i.segments.forEach(n=>{S8(n,i.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||H.location.href;this.main=bre(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const i=this.main,n=e.ID;let a=i.playlists.length;for(;a--;){const s=i.playlists[a];if(s.attributes["PATHWAY-ID"]===n){const o=s.resolvedUri,l=s.id;if(t){const u=this.createCloneURI_(s.resolvedUri,e),c=wh(n,u),h=this.createCloneAttributes_(n,s.attributes),d=this.createClonePlaylist_(s,c,e,h);i.playlists[a]=d,i.playlists[c]=d,i.playlists[u]=d}else i.playlists.splice(a,1);delete i.playlists[l],delete i.playlists[o]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,n=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!i.mediaGroups[a]||!i.mediaGroups[a][n])){for(const s in i.mediaGroups[a])if(s===n){for(const o in i.mediaGroups[a][s])i.mediaGroups[a][s][o].playlists.forEach((u,c)=>{const h=i.playlists[u.id],d=h.id,f=h.resolvedUri;delete i.playlists[d],delete i.playlists[f]});delete i.mediaGroups[a][s]}}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,n=i.playlists.length,a=this.createCloneURI_(t.resolvedUri,e),s=wh(e.ID,a),o=this.createCloneAttributes_(e.ID,t.attributes),l=this.createClonePlaylist_(t,s,e,o);i.playlists[n]=l,i.playlists[s]=l,i.playlists[a]=l,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],n=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!n.mediaGroups[a]||n.mediaGroups[a][t]))for(const s in n.mediaGroups[a]){if(s===i)n.mediaGroups[a][t]={};else continue;for(const o in n.mediaGroups[a][s]){const l=n.mediaGroups[a][s][o];n.mediaGroups[a][t][o]=ar({},l);const u=n.mediaGroups[a][t][o],c=this.createCloneURI_(l.resolvedUri,e);u.resolvedUri=c,u.uri=c,u.playlists=[],l.playlists.forEach((h,d)=>{const f=n.playlists[h.id],p=y8(a,t,o),v=wh(t,p);if(f&&!n.playlists[v]){const g=this.createClonePlaylist_(f,v,e),m=g.resolvedUri;n.playlists[v]=g,n.playlists[m]=g}u.playlists[d]=this.createClonePlaylist_(h,v,e)})}}})}createClonePlaylist_(e,t,i,n){const a=this.createCloneURI_(e.resolvedUri,i),s={resolvedUri:a,uri:a,id:t};return e.segments&&(s.segments=[]),n&&(s.attributes=n),It(e,s)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const n=t["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(n))i.searchParams.set(a,n[a]);return i.href}createCloneAttributes_(e,t){const i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(n=>{t[n]&&(i[n]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes.keyId;n&&t.add(n.toLowerCase())}return t}}}const qx=function(r,e,t,i){const n=r.responseType==="arraybuffer"?r.response:r.responseText;!e&&n&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=n.byteLength||n.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),t.headers&&(r.responseHeaders=t.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(n||r.responseText)))),i(e,r)},Cre=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(i=>{t=i(t)}),t},Are=(r,e,t,i)=>{!r||!r.size||r.forEach(n=>{n(e,t,i)})},C8=function(){const r=function e(t,i){t=It({timeout:45e3},t);const n=e.beforeRequest||K.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||K.Vhs.xhr._requestCallbackSet||new Set,s=e._responseCallbackSet||K.Vhs.xhr._responseCallbackSet;n&&typeof n=="function"&&(K.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(n));const o=K.Vhs.xhr.original===!0?K.xhr:K.Vhs.xhr,l=Cre(a,t);a.delete(n);const u=o(l||t,function(h,d){return Are(s,u,h,d),qx(u,h,d,i)}),c=u.abort;return u.abort=function(){return u.aborted=!0,c.apply(u,arguments)},u.uri=t.uri,u.requestType=t.requestType,u.requestTime=Date.now(),u};return r.original=!0,r},Dre=function(r){let e;const t=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=H.BigInt(r.offset)+H.BigInt(r.length)-H.BigInt(1):e=r.offset+r.length-1,"bytes="+t+"-"+e},jx=function(r){const e={};return r.byterange&&(e.Range=Dre(r.byterange)),e},Ere=function(r,e){return r.start(e)+"-"+r.end(e)},Ire=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},Pre=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},A8=function(r){const e={};return Object.keys(r).forEach(t=>{const i=r[t];J5(i)?e[t]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:e[t]=i}),e},a0=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},D8=function(r){return r.resolvedUri},E8=r=>{const e=Array.prototype.slice.call(r),t=16;let i="",n,a;for(let s=0;s<e.length/t;s++)n=e.slice(s*t,s*t+t).map(Ire).join(""),a=e.slice(s*t,s*t+t).map(Pre).join(""),i+=n+" "+a+`
`;return i},Mre=({bytes:r})=>E8(r),Lre=r=>{let e="",t;for(t=0;t<r.length;t++)e+=Ere(r,t)+" ";return e};var kre=Object.freeze({__proto__:null,createTransferableMessage:A8,initSegmentId:a0,segmentKeyId:D8,hexDump:E8,tagDump:Mre,textRanges:Lre});const I8=.25,Rre=(r,e)=>{if(!e.dateTimeObject)return null;const t=e.videoTimingInfo.transmuxerPrependedSeconds,n=e.videoTimingInfo.transmuxedPresentationStart+t,a=r-n;return new Date(e.dateTimeObject.getTime()+a*1e3)},Ore=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,Nre=(r,e)=>{let t;try{t=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let i=e.segments[0];if(t<new Date(i.dateTimeObject))return null;for(let l=0;l<e.segments.length-1;l++){i=e.segments[l];const u=new Date(e.segments[l+1].dateTimeObject);if(t<u)break}const n=e.segments[e.segments.length-1],a=n.dateTimeObject,s=n.videoTimingInfo?Ore(n.videoTimingInfo):n.duration+n.duration*I8,o=new Date(a.getTime()+s*1e3);return t>o?null:(t>new Date(a)&&(i=n),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:Vi.duration(e,e.mediaSequence+e.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})},Bre=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let t=0,i;for(let a=0;a<e.segments.length&&(i=e.segments[a],t=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:t+i.duration,!(r<=t));a++);const n=e.segments[e.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>t){if(r>t+n.duration*I8)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:t-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},Fre=(r,e)=>{let t,i;try{t=new Date(r),i=new Date(e)}catch{}const n=t.getTime();return(i.getTime()-n)/1e3},Ure=r=>{if(!r.segments||r.segments.length===0)return!1;for(let e=0;e<r.segments.length;e++)if(!r.segments[e].dateTimeObject)return!1;return!0},Vre=({playlist:r,time:e=void 0,callback:t})=>{if(!t)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});const i=Bre(e,r);if(!i)return t({message:"valid programTime was not found"});if(i.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:i.estimatedStart});const n={mediaSeconds:e},a=Rre(e,i.segment);return a&&(n.programDateTime=a.toISOString()),t(null,n)},P8=({programTime:r,playlist:e,retryCount:t=2,seekTo:i,pauseAfterSeek:n=!0,tech:a,callback:s})=>{if(!s)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!e||!i)return s({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!a.hasStarted_)return s({message:"player must be playing a live stream to start buffering"});if(!Ure(e))return s({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const o=Nre(r,e);if(!o)return s({message:`${r} was not found in the stream`});const l=o.segment,u=Fre(l.dateTimeObject,r);if(o.type==="estimate"){if(t===0)return s({message:`${r} is not buffered yet. Try again`});i(o.estimatedStart+u),a.one("seeked",()=>{P8({programTime:r,playlist:e,retryCount:t-1,seekTo:i,pauseAfterSeek:n,tech:a,callback:s})});return}const c=l.start+u,h=()=>s(null,a.currentTime());a.one("seeked",h),n&&a.pause(),i(c)},Cb=(r,e)=>{if(r.readyState===4)return e()},zre=(r,e,t,i)=>{let n=[],a,s=!1;const o=function(h,d,f,p){return d.abort(),s=!0,t(h,d,f,p)},l=function(h,d){if(s)return;if(h)return h.metadata=Iu({requestType:i,request:d,error:h}),o(h,d,"",n);const f=d.responseText.substring(n&&n.byteLength||0,d.responseText.length);if(n=WQ(n,e4(f,!0)),a=a||Wd(n),n.length<10||a&&n.length<a+2)return Cb(d,()=>o(h,d,"",n));const p=OC(n);return p==="ts"&&n.length<188?Cb(d,()=>o(h,d,"",n)):!p&&n.length<376?Cb(d,()=>o(h,d,"",n)):o(null,d,p,n)},c=e({uri:r,beforeSend(h){h.overrideMimeType("text/plain; charset=x-user-defined"),h.addEventListener("progress",function({total:d,loaded:f}){return qx(h,null,{statusCode:h.status},l)})}},function(h,d){return qx(c,h,d,l)});return c},{EventTarget:Gre}=K,uM=function(r,e){if(!w8(r,e)||r.sidx&&e.sidx&&(r.sidx.offset!==e.sidx.offset||r.sidx.length!==e.sidx.length))return!1;if(!r.sidx&&e.sidx||r.sidx&&!e.sidx||r.segments&&!e.segments||!r.segments&&e.segments)return!1;if(!r.segments&&!e.segments)return!0;for(let t=0;t<r.segments.length;t++){const i=r.segments[t],n=e.segments[t];if(i.uri!==n.uri)return!1;if(!i.byterange&&!n.byterange)continue;const a=i.byterange,s=n.byterange;if(a&&!s||!a&&s||a.offset!==s.offset||a.length!==s.length)return!1}return!0},Hre=(r,e,t,i)=>{const n=i.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${n}`},$re=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:i,previousManifest:n})=>{const a=fee(r,{manifestUri:e,clientOffset:t,sidxMapping:i,previousManifest:n});return b8(a,e,Hre),a},Wre=(r,e)=>{Af(r,(t,i,n,a)=>{(!e.mediaGroups[i][n]||!(a in e.mediaGroups[i][n]))&&delete r.mediaGroups[i][n][a]})},qre=(r,e,t)=>{let i=!0,n=It(r,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let a=0;a<e.playlists.length;a++){const s=e.playlists[a];if(s.sidx){const l=A_(s.sidx);t&&t[l]&&t[l].sidx&&LC(s,t[l].sidx,s.sidx.resolvedUri)}const o=$x(n,s,uM);o&&(n=o,i=!1)}return Af(e,(a,s,o,l)=>{if(a.playlists&&a.playlists.length){const u=a.playlists[0].id,c=$x(n,a.playlists[0],uM);c&&(n=c,l in n.mediaGroups[s][o]||(n.mediaGroups[s][o][l]=a),n.mediaGroups[s][o][l].playlists[0]=n.playlists[u],i=!1)}}),Wre(n,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(i=!1),i?null:n},jre=(r,e)=>(!r.map&&!e.map||!!(r.map&&e.map&&r.map.byterange.offset===e.map.byterange.offset&&r.map.byterange.length===e.map.byterange.length))&&r.uri===e.uri&&r.byterange.offset===e.byterange.offset&&r.byterange.length===e.byterange.length,cM=(r,e)=>{const t={};for(const i in r){const a=r[i].sidx;if(a){const s=A_(a);if(!e[s])break;const o=e[s].sidxInfo;jre(o,a)&&(t[s]=e[s])}}return t},Xre=(r,e)=>{let i=cM(r.playlists,e);return Af(r,(n,a,s,o)=>{if(n.playlists&&n.playlists.length){const l=n.playlists;i=It(i,cM(l,e))}}),i};class Xx extends Gre{constructor(e,t,i={},n){super(),this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:a=!1}=i;if(this.vhs_=t,this.withCredentials=a,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Kn("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata},i&&(this.state=i),this.trigger("error"),!0}addSidxSegments_(e,t,i){const n=e.sidx&&A_(e.sidx);if(!e.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n]){this.mediaRequest_=H.setTimeout(()=>i(!1),0);return}const a=n0(e.sidx.resolvedUri),s=(l,u)=>{if(this.requestErrored_(l,u,t))return;const c=this.mainPlaylistLoader_.sidxMapping_,{requestType:h}=u;let d;try{d=yee($e(u.response).subarray(8))}catch(f){f.metadata=Iu({requestType:h,request:u,parseFailure:!0}),this.requestErrored_(f,u,t);return}return c[n]={sidxInfo:e.sidx,sidx:d},LC(e,d,e.sidx.resolvedUri),i(!0)},o="dash-sidx";this.request=zre(a,this.vhs_.xhr,(l,u,c,h)=>{if(l)return s(l,u);if(!c||c!=="mp4"){const p=c||"unknown";return s({status:u.status,message:`Unsupported ${p} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},u)}const{offset:d,length:f}=e.sidx.byterange;if(h.length>=f+d)return s(l,{response:h.subarray(d,d+f),status:u.status,uri:u.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:jx({byterange:e.sidx.byterange})},s)},o)}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},H.clearTimeout(this.minimumUpdatePeriodTimeout_),H.clearTimeout(this.mediaRequest_),H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,i&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,n=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(H.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){H.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const i=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=H.setTimeout(()=>this.load(),i);return}if(!this.started){this.start();return}t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){this.mediaRequest_=H.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,t)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(i,n)=>{if(i){const{requestType:s}=n;i.metadata=Iu({requestType:s,request:n,error:i})}if(this.requestErrored_(i,n)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:t});const a=n.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?this.mainLoaded_=Date.parse(n.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=n0(this.mainPlaylistLoader_.srcUrl,n),a){this.handleMain_(),this.syncClientServerClock_(()=>e(n,a));return}return e(n,a)})}syncClientServerClock_(e){const t=dee(this.mainPlaylistLoader_.mainXml_);if(t===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(t.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e();this.request=this.vhs_.xhr({uri:Ni(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(i,n)=>{if(!this.request)return;if(i){const{requestType:s}=n;return this.error.metadata=Iu({requestType:s,request:n,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let a;t.method==="HEAD"?!n.responseHeaders||!n.responseHeaders.date?a=this.mainLoaded_:a=Date.parse(n.responseHeaders.date):a=Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=a-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:t});let i;try{i=$re({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:K.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(i=qre(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const n=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(n&&n!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=n),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:a,endList:s}=i,o=[];i.playlists.forEach(u=>{o.push({id:u.id,bandwidth:u.attributes.BANDWIDTH,resolution:u.attributes.RESOLUTION,codecs:u.attributes.CODECS})});const l={duration:a,isLive:!s,renditions:o};t.parsedManifest=l,this.trigger({type:"manifestparsecomplete",metadata:t})}return!!i}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(H.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`);return}this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=H.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=Xre(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,i=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const n=()=>{this.media().endList||(this.mediaUpdateTimeout=H.setTimeout(()=>{this.trigger("mediaupdatetimeout"),n()},Wx(this.media(),!!i)))};n()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const t=this.mainPlaylistLoader_.main.eventStream.map(i=>({cueTime:i.start,frames:[{data:i.messageData}]}));this.addMetadataToTextTrack("EventStream",t,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes["cenc:default_KID"];n&&t.add(n.replace(/-/g,"").toLowerCase())}return t}}}var Fr={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Yre=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer},M8=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},Kre=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const t=new BlobBuilder;return t.append(r),URL.createObjectURL(t.getBlob())}},L8=function(r){return function(){const e=Kre(r),t=M8(new Worker(e));t.objURL=e;const i=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),i.call(this)},t}},k8=function(r){return`var browserWorkerPolyFill = ${M8.toString()};
browserWorkerPolyFill(self);
`+r},R8=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},Zre=k8(R8(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var T={};this.on=function(w,E){T[w]||(T[w]=[]),T[w]=T[w].concat(E)},this.off=function(w,E){var A;return T[w]?(A=T[w].indexOf(E),T[w]=T[w].slice(),T[w].splice(A,1),A>-1):!1},this.trigger=function(w){var E,A,P,k;if(E=T[w],!!E)if(arguments.length===2)for(P=E.length,A=0;A<P;++A)E[A].call(this,arguments[1]);else{for(k=[],A=arguments.length,A=1;A<arguments.length;++A)k.push(arguments[A]);for(P=E.length,A=0;A<P;++A)E[A].apply(this,k)}},this.dispose=function(){T={}}}};e.prototype.pipe=function(T){return this.on("data",function(w){T.push(w)}),this.on("done",function(w){T.flush(w)}),this.on("partialdone",function(w){T.partialFlush(w)}),this.on("endedtimeline",function(w){T.endTimeline(w)}),this.on("reset",function(w){T.reset(w)}),T},e.prototype.push=function(T){this.trigger("data",T)},e.prototype.flush=function(T){this.trigger("done",T)},e.prototype.partialFlush=function(T){this.trigger("partialdone",T)},e.prototype.endTimeline=function(T){this.trigger("endedtimeline",T)},e.prototype.reset=function(T){this.trigger("reset",T)};var t=e,i=Math.pow(2,32),n=function(T){var w=new DataView(T.buffer,T.byteOffset,T.byteLength),E;return w.getBigUint64?(E=w.getBigUint64(0),E<Number.MAX_SAFE_INTEGER?Number(E):E):w.getUint32(0)*i+w.getUint32(4)},a={getUint64:n,MAX_UINT32:i},s=a.MAX_UINT32,o,l,u,c,h,d,f,p,v,g,m,y,_,b,S,x,C,D,I,M,L,N,O,B,F,U,$,q,Z,te,Q,se,he,ue,Ie,Oe;(function(){var T;if(O={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(T in O)O.hasOwnProperty(T)&&(O[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);B=new Uint8Array([105,115,111,109]),U=new Uint8Array([97,118,99,49]),F=new Uint8Array([0,0,0,1]),$=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]),q=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]),Z={video:$,audio:q},se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Q=new Uint8Array([0,0,0,0,0,0,0,0]),he=new Uint8Array([0,0,0,0,0,0,0,0]),ue=he,Ie=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Oe=he,te=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),o=function(T){var w=[],E=0,A,P,k;for(A=1;A<arguments.length;A++)w.push(arguments[A]);for(A=w.length;A--;)E+=w[A].byteLength;for(P=new Uint8Array(E+8),k=new DataView(P.buffer,P.byteOffset,P.byteLength),k.setUint32(0,P.byteLength),P.set(T,4),A=0,E=8;A<w.length;A++)P.set(w[A],E),E+=w[A].byteLength;return P},l=function(){return o(O.dinf,o(O.dref,se))},u=function(T){return o(O.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,T.audioobjecttype<<3|T.samplingfrequencyindex>>>1,T.samplingfrequencyindex<<7|T.channelcount<<3,6,1,2]))},c=function(){return o(O.ftyp,B,F,B,U)},x=function(T){return o(O.hdlr,Z[T])},h=function(T){return o(O.mdat,T)},S=function(T){var w=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,T.duration>>>24&255,T.duration>>>16&255,T.duration>>>8&255,T.duration&255,85,196,0,0]);return T.samplerate&&(w[12]=T.samplerate>>>24&255,w[13]=T.samplerate>>>16&255,w[14]=T.samplerate>>>8&255,w[15]=T.samplerate&255),o(O.mdhd,w)},b=function(T){return o(O.mdia,S(T),x(T.type),f(T))},d=function(T){return o(O.mfhd,new Uint8Array([0,0,0,0,(T&4278190080)>>24,(T&16711680)>>16,(T&65280)>>8,T&255]))},f=function(T){return o(O.minf,T.type==="video"?o(O.vmhd,te):o(O.smhd,Q),l(),D(T))},p=function(T,w){for(var E=[],A=w.length;A--;)E[A]=M(w[A]);return o.apply(null,[O.moof,d(T)].concat(E))},v=function(T){for(var w=T.length,E=[];w--;)E[w]=y(T[w]);return o.apply(null,[O.moov,m(4294967295)].concat(E).concat(g(T)))},g=function(T){for(var w=T.length,E=[];w--;)E[w]=L(T[w]);return o.apply(null,[O.mvex].concat(E))},m=function(T){var w=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(T&4278190080)>>24,(T&16711680)>>16,(T&65280)>>8,T&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 o(O.mvhd,w)},C=function(T){var w=T.samples||[],E=new Uint8Array(4+w.length),A,P;for(P=0;P<w.length;P++)A=w[P].flags,E[P+4]=A.dependsOn<<4|A.isDependedOn<<2|A.hasRedundancy;return o(O.sdtp,E)},D=function(T){return o(O.stbl,I(T),o(O.stts,Oe),o(O.stsc,ue),o(O.stsz,Ie),o(O.stco,he))},function(){var T,w;I=function(E){return o(O.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),E.type==="video"?T(E):w(E))},T=function(E){var A=E.sps||[],P=E.pps||[],k=[],V=[],z,G;for(z=0;z<A.length;z++)k.push((A[z].byteLength&65280)>>>8),k.push(A[z].byteLength&255),k=k.concat(Array.prototype.slice.call(A[z]));for(z=0;z<P.length;z++)V.push((P[z].byteLength&65280)>>>8),V.push(P[z].byteLength&255),V=V.concat(Array.prototype.slice.call(P[z]));if(G=[O.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,(E.width&65280)>>8,E.width&255,(E.height&65280)>>8,E.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o(O.avcC,new Uint8Array([1,E.profileIdc,E.profileCompatibility,E.levelIdc,255].concat([A.length],k,[P.length],V))),o(O.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],E.sarRatio){var W=E.sarRatio[0],Y=E.sarRatio[1];G.push(o(O.pasp,new Uint8Array([(W&4278190080)>>24,(W&16711680)>>16,(W&65280)>>8,W&255,(Y&4278190080)>>24,(Y&16711680)>>16,(Y&65280)>>8,Y&255])))}return o.apply(null,G)},w=function(E){return o(O.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(E.channelcount&65280)>>8,E.channelcount&255,(E.samplesize&65280)>>8,E.samplesize&255,0,0,0,0,(E.samplerate&65280)>>8,E.samplerate&255,0,0]),u(E))}}(),_=function(T){var w=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(T.id&4278190080)>>24,(T.id&16711680)>>16,(T.id&65280)>>8,T.id&255,0,0,0,0,(T.duration&4278190080)>>24,(T.duration&16711680)>>16,(T.duration&65280)>>8,T.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(T.width&65280)>>8,T.width&255,0,0,(T.height&65280)>>8,T.height&255,0,0]);return o(O.tkhd,w)},M=function(T){var w,E,A,P,k,V,z;return w=o(O.tfhd,new Uint8Array([0,0,0,58,(T.id&4278190080)>>24,(T.id&16711680)>>16,(T.id&65280)>>8,T.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),V=Math.floor(T.baseMediaDecodeTime/s),z=Math.floor(T.baseMediaDecodeTime%s),E=o(O.tfdt,new Uint8Array([1,0,0,0,V>>>24&255,V>>>16&255,V>>>8&255,V&255,z>>>24&255,z>>>16&255,z>>>8&255,z&255])),k=92,T.type==="audio"?(A=N(T,k),o(O.traf,w,E,A)):(P=C(T),A=N(T,P.length+k),o(O.traf,w,E,A,P))},y=function(T){return T.duration=T.duration||4294967295,o(O.trak,_(T),b(T))},L=function(T){var w=new Uint8Array([0,0,0,0,(T.id&4278190080)>>24,(T.id&16711680)>>16,(T.id&65280)>>8,T.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return T.type!=="video"&&(w[w.length-1]=0),o(O.trex,w)},function(){var T,w,E;E=function(A,P){var k=0,V=0,z=0,G=0;return A.length&&(A[0].duration!==void 0&&(k=1),A[0].size!==void 0&&(V=2),A[0].flags!==void 0&&(z=4),A[0].compositionTimeOffset!==void 0&&(G=8)),[0,0,k|V|z|G,1,(A.length&4278190080)>>>24,(A.length&16711680)>>>16,(A.length&65280)>>>8,A.length&255,(P&4278190080)>>>24,(P&16711680)>>>16,(P&65280)>>>8,P&255]},w=function(A,P){var k,V,z,G,W,Y;for(G=A.samples||[],P+=20+16*G.length,z=E(G,P),V=new Uint8Array(z.length+G.length*16),V.set(z),k=z.length,Y=0;Y<G.length;Y++)W=G[Y],V[k++]=(W.duration&4278190080)>>>24,V[k++]=(W.duration&16711680)>>>16,V[k++]=(W.duration&65280)>>>8,V[k++]=W.duration&255,V[k++]=(W.size&4278190080)>>>24,V[k++]=(W.size&16711680)>>>16,V[k++]=(W.size&65280)>>>8,V[k++]=W.size&255,V[k++]=W.flags.isLeading<<2|W.flags.dependsOn,V[k++]=W.flags.isDependedOn<<6|W.flags.hasRedundancy<<4|W.flags.paddingValue<<1|W.flags.isNonSyncSample,V[k++]=W.flags.degradationPriority&61440,V[k++]=W.flags.degradationPriority&15,V[k++]=(W.compositionTimeOffset&4278190080)>>>24,V[k++]=(W.compositionTimeOffset&16711680)>>>16,V[k++]=(W.compositionTimeOffset&65280)>>>8,V[k++]=W.compositionTimeOffset&255;return o(O.trun,V)},T=function(A,P){var k,V,z,G,W,Y;for(G=A.samples||[],P+=20+8*G.length,z=E(G,P),k=new Uint8Array(z.length+G.length*8),k.set(z),V=z.length,Y=0;Y<G.length;Y++)W=G[Y],k[V++]=(W.duration&4278190080)>>>24,k[V++]=(W.duration&16711680)>>>16,k[V++]=(W.duration&65280)>>>8,k[V++]=W.duration&255,k[V++]=(W.size&4278190080)>>>24,k[V++]=(W.size&16711680)>>>16,k[V++]=(W.size&65280)>>>8,k[V++]=W.size&255;return o(O.trun,k)},N=function(A,P){return A.type==="audio"?T(A,P):w(A,P)}}();var Fe={ftyp:c,mdat:h,moof:p,moov:v,initSegment:function(T){var w=c(),E=v(T),A;return A=new Uint8Array(w.byteLength+E.byteLength),A.set(w),A.set(E,w.byteLength),A}},me=function(T){var w,E,A=[],P=[];for(P.byteLength=0,P.nalCount=0,P.duration=0,A.byteLength=0,w=0;w<T.length;w++)E=T[w],E.nalUnitType==="access_unit_delimiter_rbsp"?(A.length&&(A.duration=E.dts-A.dts,P.byteLength+=A.byteLength,P.nalCount+=A.length,P.duration+=A.duration,P.push(A)),A=[E],A.byteLength=E.data.byteLength,A.pts=E.pts,A.dts=E.dts):(E.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(A.keyFrame=!0),A.duration=E.dts-A.dts,A.byteLength+=E.data.byteLength,A.push(E));return P.length&&(!A.duration||A.duration<=0)&&(A.duration=P[P.length-1].duration),P.byteLength+=A.byteLength,P.nalCount+=A.length,P.duration+=A.duration,P.push(A),P},ze=function(T){var w,E,A=[],P=[];for(A.byteLength=0,A.nalCount=0,A.duration=0,A.pts=T[0].pts,A.dts=T[0].dts,P.byteLength=0,P.nalCount=0,P.duration=0,P.pts=T[0].pts,P.dts=T[0].dts,w=0;w<T.length;w++)E=T[w],E.keyFrame?(A.length&&(P.push(A),P.byteLength+=A.byteLength,P.nalCount+=A.nalCount,P.duration+=A.duration),A=[E],A.nalCount=E.length,A.byteLength=E.byteLength,A.pts=E.pts,A.dts=E.dts,A.duration=E.duration):(A.duration+=E.duration,A.nalCount+=E.length,A.byteLength+=E.byteLength,A.push(E));return P.length&&A.duration<=0&&(A.duration=P[P.length-1].duration),P.byteLength+=A.byteLength,P.nalCount+=A.nalCount,P.duration+=A.duration,P.push(A),P},Pe=function(T){var w;return!T[0][0].keyFrame&&T.length>1&&(w=T.shift(),T.byteLength-=w.byteLength,T.nalCount-=w.nalCount,T[0][0].dts=w.dts,T[0][0].pts=w.pts,T[0][0].duration+=w.duration),T},ye=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Me=function(T,w){var E=ye();return E.dataOffset=w,E.compositionTimeOffset=T.pts-T.dts,E.duration=T.duration,E.size=4*T.length,E.size+=T.byteLength,T.keyFrame&&(E.flags.dependsOn=2,E.flags.isNonSyncSample=0),E},_t=function(T,w){var E,A,P,k,V,z=w||0,G=[];for(E=0;E<T.length;E++)for(k=T[E],A=0;A<k.length;A++)V=k[A],P=Me(V,z),z+=P.size,G.push(P);return G},Re=function(T){var w,E,A,P,k,V,z=0,G=T.byteLength,W=T.nalCount,Y=G+4*W,ee=new Uint8Array(Y),Se=new DataView(ee.buffer);for(w=0;w<T.length;w++)for(P=T[w],E=0;E<P.length;E++)for(k=P[E],A=0;A<k.length;A++)V=k[A],Se.setUint32(z,V.data.byteLength),z+=4,ee.set(V.data,z),z+=V.data.byteLength;return ee},Ge=function(T,w){var E,A=w||0,P=[];return E=Me(T,A),P.push(E),P},Pt=function(T){var w,E,A=0,P=T.byteLength,k=T.length,V=P+4*k,z=new Uint8Array(V),G=new DataView(z.buffer);for(w=0;w<T.length;w++)E=T[w],G.setUint32(A,E.data.byteLength),A+=4,z.set(E.data,A),A+=E.data.byteLength;return z},wt={groupNalsIntoFrames:me,groupFramesIntoGops:ze,extendFirstKeyFrame:Pe,generateSampleTable:_t,concatenateNalData:Re,generateSampleTableForFrame:Ge,concatenateNalDataForFrame:Pt},At=[33,16,5,32,164,27],rr=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ht=function(T){for(var w=[];T--;)w.push(0);return w},Ji=function(T){return Object.keys(T).reduce(function(w,E){return w[E]=new Uint8Array(T[E].reduce(function(A,P){return A.concat(P)},[])),w},{})},br,ro=function(){if(!br){var T={96e3:[At,[227,64],ht(154),[56]],88200:[At,[231],ht(170),[56]],64e3:[At,[248,192],ht(240),[56]],48e3:[At,[255,192],ht(268),[55,148,128],ht(54),[112]],44100:[At,[255,192],ht(268),[55,163,128],ht(84),[112]],32e3:[At,[255,192],ht(268),[55,234],ht(226),[112]],24e3:[At,[255,192],ht(268),[55,255,128],ht(268),[111,112],ht(126),[224]],16e3:[At,[255,192],ht(268),[55,255,128],ht(268),[111,255],ht(269),[223,108],ht(195),[1,192]],12e3:[rr,ht(268),[3,127,248],ht(268),[6,255,240],ht(268),[13,255,224],ht(268),[27,253,128],ht(259),[56]],11025:[rr,ht(268),[3,127,248],ht(268),[6,255,240],ht(268),[13,255,224],ht(268),[27,255,192],ht(268),[55,175,128],ht(108),[112]],8e3:[rr,ht(268),[3,121,16],ht(47),[7]]};br=Ji(T)}return br},io=9e4,gc,Mi,Sn,fl,mg,mc,yg;gc=function(T){return T*io},Mi=function(T,w){return T*w},Sn=function(T){return T/io},fl=function(T,w){return T/w},mg=function(T,w){return gc(fl(T,w))},mc=function(T,w){return Mi(Sn(T),w)},yg=function(T,w,E){return Sn(E?T:T-w)};var Nt={ONE_SECOND_IN_TS:io,secondsToVideoTs:gc,secondsToAudioTs:Mi,videoTsToSeconds:Sn,audioTsToSeconds:fl,audioTsToVideoTs:mg,videoTsToAudioTs:mc,metadataTsToSeconds:yg},$f=ro,dl=Nt,yc=function(T){var w,E,A=0;for(w=0;w<T.length;w++)E=T[w],A+=E.data.byteLength;return A},pl=function(T,w,E,A){var P,k=0,V=0,z=0,G=0,W,Y,ee;if(w.length&&(P=dl.audioTsToVideoTs(T.baseMediaDecodeTime,T.samplerate),k=Math.ceil(dl.ONE_SECOND_IN_TS/(T.samplerate/1024)),E&&A&&(V=P-Math.max(E,A),z=Math.floor(V/k),G=z*k),!(z<1||G>dl.ONE_SECOND_IN_TS/2))){for(W=$f()[T.samplerate],W||(W=w[0].data),Y=0;Y<z;Y++)ee=w[0],w.splice(0,0,{data:W,dts:ee.dts-k,pts:ee.pts-k});return T.baseMediaDecodeTime-=Math.floor(dl.videoTsToAudioTs(G,T.samplerate)),G}},F1=function(T,w,E){return w.minSegmentDts>=E?T:(w.minSegmentDts=1/0,T.filter(function(A){return A.dts>=E?(w.minSegmentDts=Math.min(w.minSegmentDts,A.dts),w.minSegmentPts=w.minSegmentDts,!0):!1}))},vl=function(T){var w,E,A=[];for(w=0;w<T.length;w++)E=T[w],A.push({size:E.data.byteLength,duration:1024});return A},ds=function(T){var w,E,A=0,P=new Uint8Array(yc(T));for(w=0;w<T.length;w++)E=T[w],P.set(E.data,A),A+=E.data.byteLength;return P},gl={prefixWithSilence:pl,trimAdtsFramesByEarliestDts:F1,generateSampleTable:vl,concatenateFrameData:ds},en=Nt.ONE_SECOND_IN_TS,_c=function(T,w){typeof w.pts=="number"&&(T.timelineStartInfo.pts===void 0&&(T.timelineStartInfo.pts=w.pts),T.minSegmentPts===void 0?T.minSegmentPts=w.pts:T.minSegmentPts=Math.min(T.minSegmentPts,w.pts),T.maxSegmentPts===void 0?T.maxSegmentPts=w.pts:T.maxSegmentPts=Math.max(T.maxSegmentPts,w.pts)),typeof w.dts=="number"&&(T.timelineStartInfo.dts===void 0&&(T.timelineStartInfo.dts=w.dts),T.minSegmentDts===void 0?T.minSegmentDts=w.dts:T.minSegmentDts=Math.min(T.minSegmentDts,w.dts),T.maxSegmentDts===void 0?T.maxSegmentDts=w.dts:T.maxSegmentDts=Math.max(T.maxSegmentDts,w.dts))},_g=function(T){delete T.minSegmentDts,delete T.maxSegmentDts,delete T.minSegmentPts,delete T.maxSegmentPts},bg=function(T,w){var E,A,P=T.minSegmentDts;return w||(P-=T.timelineStartInfo.dts),E=T.timelineStartInfo.baseMediaDecodeTime,E+=P,E=Math.max(0,E),T.type==="audio"&&(A=T.samplerate/en,E*=A,E=Math.floor(E)),E},Ve={clearDtsInfo:_g,calculateTrackBaseMediaDecodeTime:bg,collectDtsInfo:_c},X=4,fe=128,re=function(T){for(var w=0,E={payloadType:-1,payloadSize:0},A=0,P=0;w<T.byteLength&&T[w]!==fe;){for(;T[w]===255;)A+=255,w++;for(A+=T[w++];T[w]===255;)P+=255,w++;if(P+=T[w++],!E.payload&&A===X){var k=String.fromCharCode(T[w+3],T[w+4],T[w+5],T[w+6]);if(k==="GA94"){E.payloadType=A,E.payloadSize=P,E.payload=T.subarray(w,w+P);break}else E.payload=void 0}w+=P,A=0,P=0}return E},ve=function(T){return T.payload[0]!==181||(T.payload[1]<<8|T.payload[2])!==49||String.fromCharCode(T.payload[3],T.payload[4],T.payload[5],T.payload[6])!=="GA94"||T.payload[7]!==3?null:T.payload.subarray(8,T.payload.length-1)},Te=function(T,w){var E=[],A,P,k,V;if(!(w[0]&64))return E;for(P=w[0]&31,A=0;A<P;A++)k=A*3,V={type:w[k+2]&3,pts:T},w[k+2]&4&&(V.ccData=w[k+3]<<8|w[k+4],E.push(V));return E},Ae=function(T){for(var w=T.byteLength,E=[],A=1,P,k;A<w-2;)T[A]===0&&T[A+1]===0&&T[A+2]===3?(E.push(A+2),A+=2):A++;if(E.length===0)return T;P=w-E.length,k=new Uint8Array(P);var V=0;for(A=0;A<P;V++,A++)V===E[0]&&(V++,E.shift()),k[A]=T[V];return k},nt={parseSei:re,parseUserData:ve,parseCaptionPackets:Te,discardEmulationPreventionBytes:Ae,USER_DATA_REGISTERED_ITU_T_T35:X},Ne=t,Tt=nt,Ye=function(T){T=T||{},Ye.prototype.init.call(this),this.parse708captions_=typeof T.parse708captions=="boolean"?T.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Wt(0,0),new Wt(0,1),new Wt(1,0),new Wt(1,1)],this.parse708captions_&&(this.cc708Stream_=new ft({captionServices:T.captionServices})),this.reset(),this.ccStreams_.forEach(function(w){w.on("data",this.trigger.bind(this,"data")),w.on("partialdone",this.trigger.bind(this,"partialdone")),w.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ye.prototype=new Ne,Ye.prototype.push=function(T){var w,E,A;if(T.nalUnitType==="sei_rbsp"&&(w=Tt.parseSei(T.escapedRBSP),!!w.payload&&w.payloadType===Tt.USER_DATA_REGISTERED_ITU_T_T35&&(E=Tt.parseUserData(w),!!E))){if(T.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(T.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}A=Tt.parseCaptionPackets(T.pts,E),this.captionPackets_=this.captionPackets_.concat(A),this.latestDts_!==T.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=T.dts}},Ye.prototype.flushCCStreams=function(T){this.ccStreams_.forEach(function(w){return T==="flush"?w.flush():w.partialFlush()},this)},Ye.prototype.flushStream=function(T){if(!this.captionPackets_.length){this.flushCCStreams(T);return}this.captionPackets_.forEach(function(w,E){w.presortIndex=E}),this.captionPackets_.sort(function(w,E){return w.pts===E.pts?w.presortIndex-E.presortIndex:w.pts-E.pts}),this.captionPackets_.forEach(function(w){w.type<2?this.dispatchCea608Packet(w):this.dispatchCea708Packet(w)},this),this.captionPackets_.length=0,this.flushCCStreams(T)},Ye.prototype.flush=function(){return this.flushStream("flush")},Ye.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ye.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(T){T.reset()})},Ye.prototype.dispatchCea608Packet=function(T){this.setsTextOrXDSActive(T)?this.activeCea608Channel_[T.type]=null:this.setsChannel1Active(T)?this.activeCea608Channel_[T.type]=0:this.setsChannel2Active(T)&&(this.activeCea608Channel_[T.type]=1),this.activeCea608Channel_[T.type]!==null&&this.ccStreams_[(T.type<<1)+this.activeCea608Channel_[T.type]].push(T)},Ye.prototype.setsChannel1Active=function(T){return(T.ccData&30720)===4096},Ye.prototype.setsChannel2Active=function(T){return(T.ccData&30720)===6144},Ye.prototype.setsTextOrXDSActive=function(T){return(T.ccData&28928)===256||(T.ccData&30974)===4138||(T.ccData&30974)===6186},Ye.prototype.dispatchCea708Packet=function(T){this.parse708captions_&&this.cc708Stream_.push(T)};var Dt={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Kt=function(T){var w=Dt[T]||T;return T&4096&&T===w?"":String.fromCharCode(w)},ur=function(T){return 32<=T&&T<=127||160<=T&&T<=255},Dr=function(T){this.windowNum=T,this.reset()};Dr.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Dr.prototype.getText=function(){return this.rows.join(`
`)},Dr.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dr.prototype.newLine=function(T){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(T),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dr.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Dr.prototype.addText=function(T){this.rows[this.rowIdx]+=T},Dr.prototype.backspace=function(){if(!this.isEmpty()){var T=this.rows[this.rowIdx];this.rows[this.rowIdx]=T.substr(0,T.length-1)}};var qr=function(T,w,E){this.serviceNum=T,this.text="",this.currentWindow=new Dr(-1),this.windows=[],this.stream=E,typeof w=="string"&&this.createTextDecoder(w)};qr.prototype.init=function(T,w){this.startPts=T;for(var E=0;E<8;E++)this.windows[E]=new Dr(E),typeof w=="function"&&(this.windows[E].beforeRowOverflow=w)},qr.prototype.setCurrentWindow=function(T){this.currentWindow=this.windows[T]},qr.prototype.createTextDecoder=function(T){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(T)}catch(w){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+T+" encoding. "+w})}};var ft=function(T){T=T||{},ft.prototype.init.call(this);var w=this,E=T.captionServices||{},A={},P;Object.keys(E).forEach(k=>{P=E[k],/^SERVICE/.test(k)&&(A[k]=P.encoding)}),this.serviceEncodings=A,this.current708Packet=null,this.services={},this.push=function(k){k.type===3?(w.new708Packet(),w.add708Bytes(k)):(w.current708Packet===null&&w.new708Packet(),w.add708Bytes(k))}};ft.prototype=new Ne,ft.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ft.prototype.add708Bytes=function(T){var w=T.ccData,E=w>>>8,A=w&255;this.current708Packet.ptsVals.push(T.pts),this.current708Packet.data.push(E),this.current708Packet.data.push(A)},ft.prototype.push708Packet=function(){var T=this.current708Packet,w=T.data,E=null,A=null,P=0,k=w[P++];for(T.seq=k>>6,T.sizeCode=k&63;P<w.length;P++)k=w[P++],E=k>>5,A=k&31,E===7&&A>0&&(k=w[P++],E=k),this.pushServiceBlock(E,P,A),A>0&&(P+=A-1)},ft.prototype.pushServiceBlock=function(T,w,E){var A,P=w,k=this.current708Packet.data,V=this.services[T];for(V||(V=this.initService(T,P));P<w+E&&P<k.length;P++)A=k[P],ur(A)?P=this.handleText(P,V):A===24?P=this.multiByteCharacter(P,V):A===16?P=this.extendedCommands(P,V):128<=A&&A<=135?P=this.setCurrentWindow(P,V):152<=A&&A<=159?P=this.defineWindow(P,V):A===136?P=this.clearWindows(P,V):A===140?P=this.deleteWindows(P,V):A===137?P=this.displayWindows(P,V):A===138?P=this.hideWindows(P,V):A===139?P=this.toggleWindows(P,V):A===151?P=this.setWindowAttributes(P,V):A===144?P=this.setPenAttributes(P,V):A===145?P=this.setPenColor(P,V):A===146?P=this.setPenLocation(P,V):A===143?V=this.reset(P,V):A===8?V.currentWindow.backspace():A===12?V.currentWindow.clearText():A===13?V.currentWindow.pendingNewLine=!0:A===14?V.currentWindow.clearText():A===141&&P++},ft.prototype.extendedCommands=function(T,w){var E=this.current708Packet.data,A=E[++T];return ur(A)&&(T=this.handleText(T,w,{isExtended:!0})),T},ft.prototype.getPts=function(T){return this.current708Packet.ptsVals[Math.floor(T/2)]},ft.prototype.initService=function(T,w){var A="SERVICE"+T,E=this,A,P;return A in this.serviceEncodings&&(P=this.serviceEncodings[A]),this.services[T]=new qr(T,P,E),this.services[T].init(this.getPts(w),function(k){E.flushDisplayed(k,E.services[T])}),this.services[T]},ft.prototype.handleText=function(T,w,E){var A=E&&E.isExtended,P=E&&E.isMultiByte,k=this.current708Packet.data,V=A?4096:0,z=k[T],G=k[T+1],W=w.currentWindow,Y,ee;function Se(le){return le.map(je=>("0"+(je&255).toString(16)).slice(-2)).join("")}if(P?(ee=[z,G],T++):ee=[z],w.textDecoder_&&!A)Y=w.textDecoder_.decode(new Uint8Array(ee));else if(P){const le=Se(ee);Y=String.fromCharCode(parseInt(le,16))}else Y=Kt(V|z);return W.pendingNewLine&&!W.isEmpty()&&W.newLine(this.getPts(T)),W.pendingNewLine=!1,W.addText(Y),T},ft.prototype.multiByteCharacter=function(T,w){var E=this.current708Packet.data,A=E[T+1],P=E[T+2];return ur(A)&&ur(P)&&(T=this.handleText(++T,w,{isMultiByte:!0})),T},ft.prototype.setCurrentWindow=function(T,w){var E=this.current708Packet.data,A=E[T],P=A&7;return w.setCurrentWindow(P),T},ft.prototype.defineWindow=function(T,w){var E=this.current708Packet.data,A=E[T],P=A&7;w.setCurrentWindow(P);var k=w.currentWindow;return A=E[++T],k.visible=(A&32)>>5,k.rowLock=(A&16)>>4,k.columnLock=(A&8)>>3,k.priority=A&7,A=E[++T],k.relativePositioning=(A&128)>>7,k.anchorVertical=A&127,A=E[++T],k.anchorHorizontal=A,A=E[++T],k.anchorPoint=(A&240)>>4,k.rowCount=A&15,A=E[++T],k.columnCount=A&63,A=E[++T],k.windowStyle=(A&56)>>3,k.penStyle=A&7,k.virtualRowCount=k.rowCount+1,T},ft.prototype.setWindowAttributes=function(T,w){var E=this.current708Packet.data,A=E[T],P=w.currentWindow.winAttr;return A=E[++T],P.fillOpacity=(A&192)>>6,P.fillRed=(A&48)>>4,P.fillGreen=(A&12)>>2,P.fillBlue=A&3,A=E[++T],P.borderType=(A&192)>>6,P.borderRed=(A&48)>>4,P.borderGreen=(A&12)>>2,P.borderBlue=A&3,A=E[++T],P.borderType+=(A&128)>>5,P.wordWrap=(A&64)>>6,P.printDirection=(A&48)>>4,P.scrollDirection=(A&12)>>2,P.justify=A&3,A=E[++T],P.effectSpeed=(A&240)>>4,P.effectDirection=(A&12)>>2,P.displayEffect=A&3,T},ft.prototype.flushDisplayed=function(T,w){for(var E=[],A=0;A<8;A++)w.windows[A].visible&&!w.windows[A].isEmpty()&&E.push(w.windows[A].getText());w.endPts=T,w.text=E.join(`
`),this.pushCaption(w),w.startPts=T},ft.prototype.pushCaption=function(T){T.text!==""&&(this.trigger("data",{startPts:T.startPts,endPts:T.endPts,text:T.text,stream:"cc708_"+T.serviceNum}),T.text="",T.startPts=T.endPts)},ft.prototype.displayWindows=function(T,w){var E=this.current708Packet.data,A=E[++T],P=this.getPts(T);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&(w.windows[k].visible=1);return T},ft.prototype.hideWindows=function(T,w){var E=this.current708Packet.data,A=E[++T],P=this.getPts(T);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&(w.windows[k].visible=0);return T},ft.prototype.toggleWindows=function(T,w){var E=this.current708Packet.data,A=E[++T],P=this.getPts(T);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&(w.windows[k].visible^=1);return T},ft.prototype.clearWindows=function(T,w){var E=this.current708Packet.data,A=E[++T],P=this.getPts(T);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&w.windows[k].clearText();return T},ft.prototype.deleteWindows=function(T,w){var E=this.current708Packet.data,A=E[++T],P=this.getPts(T);this.flushDisplayed(P,w);for(var k=0;k<8;k++)A&1<<k&&w.windows[k].reset();return T},ft.prototype.setPenAttributes=function(T,w){var E=this.current708Packet.data,A=E[T],P=w.currentWindow.penAttr;return A=E[++T],P.textTag=(A&240)>>4,P.offset=(A&12)>>2,P.penSize=A&3,A=E[++T],P.italics=(A&128)>>7,P.underline=(A&64)>>6,P.edgeType=(A&56)>>3,P.fontStyle=A&7,T},ft.prototype.setPenColor=function(T,w){var E=this.current708Packet.data,A=E[T],P=w.currentWindow.penColor;return A=E[++T],P.fgOpacity=(A&192)>>6,P.fgRed=(A&48)>>4,P.fgGreen=(A&12)>>2,P.fgBlue=A&3,A=E[++T],P.bgOpacity=(A&192)>>6,P.bgRed=(A&48)>>4,P.bgGreen=(A&12)>>2,P.bgBlue=A&3,A=E[++T],P.edgeRed=(A&48)>>4,P.edgeGreen=(A&12)>>2,P.edgeBlue=A&3,T},ft.prototype.setPenLocation=function(T,w){var E=this.current708Packet.data,A=E[T],P=w.currentWindow.penLoc;return w.currentWindow.pendingNewLine=!0,A=E[++T],P.row=A&15,A=E[++T],P.column=A&63,T},ft.prototype.reset=function(T,w){var E=this.getPts(T);return this.flushDisplayed(E,w),this.initService(w.serviceNum,T)};var Er={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},zt=function(T){return T===null?"":(T=Er[T]||T,String.fromCharCode(T))},no=14,tn=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],ml=function(){for(var T=[],w=no+1;w--;)T.push({text:"",indent:0,offset:0});return T},Wt=function(T,w){Wt.prototype.init.call(this),this.field_=T||0,this.dataChannel_=w||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(E){var A,P,k,V,z;if(A=E.ccData&32639,A===this.lastControlCode_){this.lastControlCode_=null;return}if((A&61440)===4096?this.lastControlCode_=A:A!==this.PADDING_&&(this.lastControlCode_=null),k=A>>>8,V=A&255,A!==this.PADDING_)if(A===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(A===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(E.pts),this.flushDisplayed(E.pts),P=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=P,this.startPts_=E.pts;else if(A===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(E.pts);else if(A===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(E.pts);else if(A===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(E.pts);else if(A===this.CARRIAGE_RETURN_)this.clearFormatting(E.pts),this.flushDisplayed(E.pts),this.shiftRowsUp_(),this.startPts_=E.pts;else if(A===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(A===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(E.pts),this.displayed_=ml();else if(A===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=ml();else if(A===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(E.pts),this.displayed_=ml()),this.mode_="paintOn",this.startPts_=E.pts;else if(this.isSpecialCharacter(k,V))k=(k&3)<<8,z=zt(k|V),this[this.mode_](E.pts,z),this.column_++;else if(this.isExtCharacter(k,V))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),k=(k&3)<<8,z=zt(k|V),this[this.mode_](E.pts,z),this.column_++;else if(this.isMidRowCode(k,V))this.clearFormatting(E.pts),this[this.mode_](E.pts," "),this.column_++,(V&14)===14&&this.addFormatting(E.pts,["i"]),(V&1)===1&&this.addFormatting(E.pts,["u"]);else if(this.isOffsetControlCode(k,V)){const W=V&3;this.nonDisplayed_[this.row_].offset=W,this.column_+=W}else if(this.isPAC(k,V)){var G=tn.indexOf(A&7968);if(this.mode_==="rollUp"&&(G-this.rollUpRows_+1<0&&(G=this.rollUpRows_-1),this.setRollUp(E.pts,G)),G!==this.row_&&G>=0&&G<=14&&(this.clearFormatting(E.pts),this.row_=G),V&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(E.pts,["u"]),(A&16)===16){const W=(A&14)>>1;this.column_=W*4,this.nonDisplayed_[this.row_].indent+=W}this.isColorPAC(V)&&(V&14)===14&&this.addFormatting(E.pts,["i"])}else this.isNormalChar(k)&&(V===0&&(V=null),z=zt(k),z+=zt(V),this[this.mode_](E.pts,z),this.column_+=z.length)}};Wt.prototype=new Ne,Wt.prototype.flushDisplayed=function(T){const w=A=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+A+"."})},E=[];this.displayed_.forEach((A,P)=>{if(A&&A.text&&A.text.length){try{A.text=A.text.trim()}catch{w(P)}A.text.length&&E.push({text:A.text,line:P+1,position:10+Math.min(70,A.indent*10)+A.offset*2.5})}else A==null&&w(P)}),E.length&&this.trigger("data",{startPts:this.startPts_,endPts:T,content:E,stream:this.name_})},Wt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=ml(),this.nonDisplayed_=ml(),this.lastControlCode_=null,this.column_=0,this.row_=no,this.rollUpRows_=2,this.formatting_=[]},Wt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Wt.prototype.isSpecialCharacter=function(T,w){return T===this.EXT_&&w>=48&&w<=63},Wt.prototype.isExtCharacter=function(T,w){return(T===this.EXT_+1||T===this.EXT_+2)&&w>=32&&w<=63},Wt.prototype.isMidRowCode=function(T,w){return T===this.EXT_&&w>=32&&w<=47},Wt.prototype.isOffsetControlCode=function(T,w){return T===this.OFFSET_&&w>=33&&w<=35},Wt.prototype.isPAC=function(T,w){return T>=this.BASE_&&T<this.BASE_+8&&w>=64&&w<=127},Wt.prototype.isColorPAC=function(T){return T>=64&&T<=79||T>=96&&T<=127},Wt.prototype.isNormalChar=function(T){return T>=32&&T<=127},Wt.prototype.setRollUp=function(T,w){if(this.mode_!=="rollUp"&&(this.row_=no,this.mode_="rollUp",this.flushDisplayed(T),this.nonDisplayed_=ml(),this.displayed_=ml()),w!==void 0&&w!==this.row_)for(var E=0;E<this.rollUpRows_;E++)this.displayed_[w-E]=this.displayed_[this.row_-E],this.displayed_[this.row_-E]={text:"",indent:0,offset:0};w===void 0&&(w=this.row_),this.topRow_=w-this.rollUpRows_+1},Wt.prototype.addFormatting=function(T,w){this.formatting_=this.formatting_.concat(w);var E=w.reduce(function(A,P){return A+"<"+P+">"},"");this[this.mode_](T,E)},Wt.prototype.clearFormatting=function(T){if(this.formatting_.length){var w=this.formatting_.reverse().reduce(function(E,A){return E+"</"+A+">"},"");this.formatting_=[],this[this.mode_](T,w)}},Wt.prototype.popOn=function(T,w){var E=this.nonDisplayed_[this.row_].text;E+=w,this.nonDisplayed_[this.row_].text=E},Wt.prototype.rollUp=function(T,w){var E=this.displayed_[this.row_].text;E+=w,this.displayed_[this.row_].text=E},Wt.prototype.shiftRowsUp_=function(){var T;for(T=0;T<this.topRow_;T++)this.displayed_[T]={text:"",indent:0,offset:0};for(T=this.row_+1;T<no+1;T++)this.displayed_[T]={text:"",indent:0,offset:0};for(T=this.topRow_;T<this.row_;T++)this.displayed_[T]=this.displayed_[T+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Wt.prototype.paintOn=function(T,w){var E=this.displayed_[this.row_].text;E+=w,this.displayed_[this.row_].text=E};var YE={CaptionStream:Ye,Cea608Stream:Wt,Cea708Stream:ft},Tg={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},yX=t,_X=8589934592,bX=4294967296,KE="shared",U1=function(T,w){var E=1;for(T>w&&(E=-1);Math.abs(w-T)>bX;)T+=E*_X;return T},V1=function(T){var w,E;V1.prototype.init.call(this),this.type_=T||KE,this.push=function(A){if(A.type==="metadata"){this.trigger("data",A);return}this.type_!==KE&&A.type!==this.type_||(E===void 0&&(E=A.dts),A.dts=U1(A.dts,E),A.pts=U1(A.pts,E),w=A.dts,this.trigger("data",A))},this.flush=function(){E=w,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){E=void 0,w=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};V1.prototype=new yX;var ZE={TimestampRolloverStream:V1,handleRollover:U1},TX=(T,w,E)=>{if(!T)return-1;for(var A=E;A<T.length;A++)if(T[A]===w)return A;return-1},SX={typedArrayIndexOf:TX},Sg=SX.typedArrayIndexOf,xg={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},QE=function(T,w,E){var A,P="";for(A=w;A<E;A++)P+="%"+("00"+T[A].toString(16)).slice(-2);return P},Wf=function(T,w,E){return decodeURIComponent(QE(T,w,E))},qf=function(T,w,E){return unescape(QE(T,w,E))},jf=function(T){return T[0]<<21|T[1]<<14|T[2]<<7|T[3]},Xf={APIC:function(T){var w=1,E,A,P="-->";T.data[0]===xg.Utf8&&(E=Sg(T.data,0,w),!(E<0)&&(T.mimeType=qf(T.data,w,E),w=E+1,T.pictureType=T.data[w],w++,A=Sg(T.data,0,w),!(A<0)&&(T.description=Wf(T.data,w,A),w=A+1,T.mimeType===P?T.url=qf(T.data,w,T.data.length):T.pictureData=T.data.subarray(w,T.data.length))))},"T*":function(T){T.data[0]===xg.Utf8&&(T.value=Wf(T.data,1,T.data.length).replace(/\0*$/,""),T.values=T.value.split("\0"))},TXXX:function(T){var w;T.data[0]===xg.Utf8&&(w=Sg(T.data,0,1),w!==-1&&(T.description=Wf(T.data,1,w),T.value=Wf(T.data,w+1,T.data.length).replace(/\0*$/,""),T.data=T.value))},"W*":function(T){T.url=qf(T.data,0,T.data.length).replace(/\0.*$/,"")},WXXX:function(T){var w;T.data[0]===xg.Utf8&&(w=Sg(T.data,0,1),w!==-1&&(T.description=Wf(T.data,1,w),T.url=qf(T.data,w+1,T.data.length).replace(/\0.*$/,"")))},PRIV:function(T){var w;for(w=0;w<T.data.length;w++)if(T.data[w]===0){T.owner=qf(T.data,0,w);break}T.privateData=T.data.subarray(w+1),T.data=T.privateData}},xX=function(T){var w,E,A=10,P=0,k=[];if(!(T.length<10||T[0]!==73||T[1]!==68||T[2]!==51)){P=jf(T.subarray(6,10)),P+=10;var V=T[5]&64;V&&(A+=4,A+=jf(T.subarray(10,14)),P-=jf(T.subarray(16,20)));do{if(w=jf(T.subarray(A+4,A+8)),w<1)break;E=String.fromCharCode(T[A],T[A+1],T[A+2],T[A+3]);var z={id:E,data:T.subarray(A+10,A+w+10)};z.key=z.id,Xf[z.id]?Xf[z.id](z):z.id[0]==="T"?Xf["T*"](z):z.id[0]==="W"&&Xf["W*"](z),k.push(z),A+=10,A+=w}while(A<P);return k}},JE={parseId3Frames:xX,parseSyncSafeInteger:jf,frameParsers:Xf},wX=t,CX=Tg,ao=JE,wg;wg=function(T){var w={descriptor:T&&T.descriptor},E=0,A=[],P=0,k;if(wg.prototype.init.call(this),this.dispatchType=CX.METADATA_STREAM_TYPE.toString(16),w.descriptor)for(k=0;k<w.descriptor.length;k++)this.dispatchType+=("00"+w.descriptor[k].toString(16)).slice(-2);this.push=function(V){var z,G,W,Y,ee,Se;if(V.type==="timed-metadata"){if(V.dataAlignmentIndicator&&(P=0,A.length=0),A.length===0&&(V.data.length<10||V.data[0]!==73||V.data[1]!==68||V.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(A.push(V),P+=V.data.byteLength,A.length===1&&(E=ao.parseSyncSafeInteger(V.data.subarray(6,10)),E+=10),!(P<E)){for(z={data:new Uint8Array(E),frames:[],pts:A[0].pts,dts:A[0].dts},ee=0;ee<E;)z.data.set(A[0].data.subarray(0,E-ee),ee),ee+=A[0].data.byteLength,P-=A[0].data.byteLength,A.shift();G=10,z.data[5]&64&&(G+=4,G+=ao.parseSyncSafeInteger(z.data.subarray(10,14)),E-=ao.parseSyncSafeInteger(z.data.subarray(16,20)));do{if(W=ao.parseSyncSafeInteger(z.data.subarray(G+4,G+8)),W<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(Se=String.fromCharCode(z.data[G],z.data[G+1],z.data[G+2],z.data[G+3]),Y={id:Se,data:z.data.subarray(G+10,G+W+10)},Y.key=Y.id,ao.frameParsers[Y.id]?ao.frameParsers[Y.id](Y):Y.id[0]==="T"?ao.frameParsers["T*"](Y):Y.id[0]==="W"&&ao.frameParsers["W*"](Y),Y.owner==="com.apple.streaming.transportStreamTimestamp"){var le=Y.data,je=(le[3]&1)<<30|le[4]<<22|le[5]<<14|le[6]<<6|le[7]>>>2;je*=4,je+=le[7]&3,Y.timeStamp=je,z.pts===void 0&&z.dts===void 0&&(z.pts=Y.timeStamp,z.dts=Y.timeStamp),this.trigger("timestamp",Y)}z.frames.push(Y),G+=10,G+=W}while(G<E);this.trigger("data",z)}}}},wg.prototype=new wX;var AX=wg,z1=t,G1=YE,ea=Tg,DX=ZE.TimestampRolloverStream,Cg,Yf,Ag,bc=188,H1=71;Cg=function(){var T=new Uint8Array(bc),w=0;Cg.prototype.init.call(this),this.push=function(E){var A=0,P=bc,k;for(w?(k=new Uint8Array(E.byteLength+w),k.set(T.subarray(0,w)),k.set(E,w),w=0):k=E;P<k.byteLength;){if(k[A]===H1&&k[P]===H1){this.trigger("data",k.subarray(A,P)),A+=bc,P+=bc;continue}A++,P++}A<k.byteLength&&(T.set(k.subarray(A),0),w=k.byteLength-A)},this.flush=function(){w===bc&&T[0]===H1&&(this.trigger("data",T),w=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){w=0,this.trigger("reset")}},Cg.prototype=new z1,Yf=function(){var T,w,E,A;Yf.prototype.init.call(this),A=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,T=function(P,k){var V=0;k.payloadUnitStartIndicator&&(V+=P[V]+1),k.type==="pat"?w(P.subarray(V),k):E(P.subarray(V),k)},w=function(P,k){k.section_number=P[7],k.last_section_number=P[8],A.pmtPid=(P[10]&31)<<8|P[11],k.pmtPid=A.pmtPid},E=function(P,k){var V,z,G,W;if(P[5]&1){for(A.programMapTable={video:null,audio:null,"timed-metadata":{}},V=(P[1]&15)<<8|P[2],z=3+V-4,G=(P[10]&15)<<8|P[11],W=12+G;W<z;){var Y=P[W],ee=(P[W+1]&31)<<8|P[W+2];Y===ea.H264_STREAM_TYPE&&A.programMapTable.video===null?A.programMapTable.video=ee:Y===ea.ADTS_STREAM_TYPE&&A.programMapTable.audio===null?A.programMapTable.audio=ee:Y===ea.METADATA_STREAM_TYPE&&(A.programMapTable["timed-metadata"][ee]=Y),W+=((P[W+3]&15)<<8|P[W+4])+5}k.programMapTable=A.programMapTable}},this.push=function(P){var k={},V=4;if(k.payloadUnitStartIndicator=!!(P[1]&64),k.pid=P[1]&31,k.pid<<=8,k.pid|=P[2],(P[3]&48)>>>4>1&&(V+=P[V]+1),k.pid===0)k.type="pat",T(P.subarray(V),k),this.trigger("data",k);else if(k.pid===this.pmtPid)for(k.type="pmt",T(P.subarray(V),k),this.trigger("data",k);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([P,V,k]):this.processPes_(P,V,k)},this.processPes_=function(P,k,V){V.pid===this.programMapTable.video?V.streamType=ea.H264_STREAM_TYPE:V.pid===this.programMapTable.audio?V.streamType=ea.ADTS_STREAM_TYPE:V.streamType=this.programMapTable["timed-metadata"][V.pid],V.type="pes",V.data=P.subarray(k),this.trigger("data",V)}},Yf.prototype=new z1,Yf.STREAM_TYPES={h264:27,adts:15},Ag=function(){var T=this,w=!1,E={data:[],size:0},A={data:[],size:0},P={data:[],size:0},k,V=function(G,W){var Y;const ee=G[0]<<16|G[1]<<8|G[2];W.data=new Uint8Array,ee===1&&(W.packetLength=6+(G[4]<<8|G[5]),W.dataAlignmentIndicator=(G[6]&4)!==0,Y=G[7],Y&192&&(W.pts=(G[9]&14)<<27|(G[10]&255)<<20|(G[11]&254)<<12|(G[12]&255)<<5|(G[13]&254)>>>3,W.pts*=4,W.pts+=(G[13]&6)>>>1,W.dts=W.pts,Y&64&&(W.dts=(G[14]&14)<<27|(G[15]&255)<<20|(G[16]&254)<<12|(G[17]&255)<<5|(G[18]&254)>>>3,W.dts*=4,W.dts+=(G[18]&6)>>>1)),W.data=G.subarray(9+G[8]))},z=function(G,W,Y){var ee=new Uint8Array(G.size),Se={type:W},le=0,je=0,Je=!1,Ir;if(!(!G.data.length||G.size<9)){for(Se.trackId=G.data[0].pid,le=0;le<G.data.length;le++)Ir=G.data[le],ee.set(Ir.data,je),je+=Ir.data.byteLength;V(ee,Se),Je=W==="video"||Se.packetLength<=G.size,(Y||Je)&&(G.size=0,G.data.length=0),Je&&T.trigger("data",Se)}};Ag.prototype.init.call(this),this.push=function(G){({pat:function(){},pes:function(){var W,Y;switch(G.streamType){case ea.H264_STREAM_TYPE:W=E,Y="video";break;case ea.ADTS_STREAM_TYPE:W=A,Y="audio";break;case ea.METADATA_STREAM_TYPE:W=P,Y="timed-metadata";break;default:return}G.payloadUnitStartIndicator&&z(W,Y,!0),W.data.push(G),W.size+=G.data.byteLength},pmt:function(){var W={type:"metadata",tracks:[]};k=G.programMapTable,k.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.video,codec:"avc",type:"video"}),k.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.audio,codec:"adts",type:"audio"}),w=!0,T.trigger("data",W)}})[G.type]()},this.reset=function(){E.size=0,E.data.length=0,A.size=0,A.data.length=0,this.trigger("reset")},this.flushStreams_=function(){z(E,"video"),z(A,"audio"),z(P,"timed-metadata")},this.flush=function(){if(!w&&k){var G={type:"metadata",tracks:[]};k.video!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.video,codec:"avc",type:"video"}),k.audio!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.audio,codec:"adts",type:"audio"}),T.trigger("data",G)}w=!1,this.flushStreams_(),this.trigger("done")}},Ag.prototype=new z1;var eI={PAT_PID:0,MP2T_PACKET_LENGTH:bc,TransportPacketStream:Cg,TransportParseStream:Yf,ElementaryStream:Ag,TimestampRolloverStream:DX,CaptionStream:G1.CaptionStream,Cea608Stream:G1.Cea608Stream,Cea708Stream:G1.Cea708Stream,MetadataStream:AX};for(var $1 in ea)ea.hasOwnProperty($1)&&(eI[$1]=ea[$1]);var EX=eI,IX=t,PX=Nt.ONE_SECOND_IN_TS,Dg,tI=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Dg=function(T){var w,E=0;Dg.prototype.init.call(this),this.skipWarn_=function(A,P){this.trigger("log",{level:"warn",message:`adts skiping bytes ${A} to ${P} in frame ${E} outside syncword`})},this.push=function(A){var P=0,k,V,z,G,W;if(T||(E=0),A.type==="audio"){w&&w.length?(z=w,w=new Uint8Array(z.byteLength+A.data.byteLength),w.set(z),w.set(A.data,z.byteLength)):w=A.data;for(var Y;P+7<w.length;){if(w[P]!==255||(w[P+1]&246)!==240){typeof Y!="number"&&(Y=P),P++;continue}if(typeof Y=="number"&&(this.skipWarn_(Y,P),Y=null),V=(~w[P+1]&1)*2,k=(w[P+3]&3)<<11|w[P+4]<<3|(w[P+5]&224)>>5,G=((w[P+6]&3)+1)*1024,W=G*PX/tI[(w[P+2]&60)>>>2],w.byteLength-P<k)break;this.trigger("data",{pts:A.pts+E*W,dts:A.dts+E*W,sampleCount:G,audioobjecttype:(w[P+2]>>>6&3)+1,channelcount:(w[P+2]&1)<<2|(w[P+3]&192)>>>6,samplerate:tI[(w[P+2]&60)>>>2],samplingfrequencyindex:(w[P+2]&60)>>>2,samplesize:16,data:w.subarray(P+7+V,P+k)}),E++,P+=k}typeof Y=="number"&&(this.skipWarn_(Y,P),Y=null),w=w.subarray(P)}},this.flush=function(){E=0,this.trigger("done")},this.reset=function(){w=void 0,this.trigger("reset")},this.endTimeline=function(){w=void 0,this.trigger("endedtimeline")}},Dg.prototype=new IX;var MX=Dg,rI;rI=function(T){var w=T.byteLength,E=0,A=0;this.length=function(){return 8*w},this.bitsAvailable=function(){return 8*w+A},this.loadWord=function(){var P=T.byteLength-w,k=new Uint8Array(4),V=Math.min(4,w);if(V===0)throw new Error("no bytes available");k.set(T.subarray(P,P+V)),E=new DataView(k.buffer).getUint32(0),A=V*8,w-=V},this.skipBits=function(P){var k;A>P?(E<<=P,A-=P):(P-=A,k=Math.floor(P/8),P-=k*8,w-=k,this.loadWord(),E<<=P,A-=P)},this.readBits=function(P){var k=Math.min(A,P),V=E>>>32-k;return A-=k,A>0?E<<=k:w>0&&this.loadWord(),k=P-k,k>0?V<<k|this.readBits(k):V},this.skipLeadingZeros=function(){var P;for(P=0;P<A;++P)if(E&2147483648>>>P)return E<<=P,A-=P,P;return this.loadWord(),P+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var P=this.skipLeadingZeros();return this.readBits(P+1)-1},this.readExpGolomb=function(){var P=this.readUnsignedExpGolomb();return 1&P?1+P>>>1:-1*(P>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var LX=rI,iI=t,kX=LX,Eg,Kf,nI;Kf=function(){var T=0,w,E;Kf.prototype.init.call(this),this.push=function(A){var P;E?(P=new Uint8Array(E.byteLength+A.data.byteLength),P.set(E),P.set(A.data,E.byteLength),E=P):E=A.data;for(var k=E.byteLength;T<k-3;T++)if(E[T+2]===1){w=T+5;break}for(;w<k;)switch(E[w]){case 0:if(E[w-1]!==0){w+=2;break}else if(E[w-2]!==0){w++;break}T+3!==w-2&&this.trigger("data",E.subarray(T+3,w-2));do w++;while(E[w]!==1&&w<k);T=w-2,w+=3;break;case 1:if(E[w-1]!==0||E[w-2]!==0){w+=3;break}this.trigger("data",E.subarray(T+3,w-2)),T=w-2,w+=3;break;default:w+=3;break}E=E.subarray(T),w-=T,T=0},this.reset=function(){E=null,T=0,this.trigger("reset")},this.flush=function(){E&&E.byteLength>3&&this.trigger("data",E.subarray(T+3)),E=null,T=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Kf.prototype=new iI,nI={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Eg=function(){var T=new Kf,w,E,A,P,k,V,z;Eg.prototype.init.call(this),w=this,this.push=function(G){G.type==="video"&&(E=G.trackId,A=G.pts,P=G.dts,T.push(G))},T.on("data",function(G){var W={trackId:E,pts:A,dts:P,data:G,nalUnitTypeCode:G[0]&31};switch(W.nalUnitTypeCode){case 5:W.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:W.nalUnitType="sei_rbsp",W.escapedRBSP=k(G.subarray(1));break;case 7:W.nalUnitType="seq_parameter_set_rbsp",W.escapedRBSP=k(G.subarray(1)),W.config=V(W.escapedRBSP);break;case 8:W.nalUnitType="pic_parameter_set_rbsp";break;case 9:W.nalUnitType="access_unit_delimiter_rbsp";break}w.trigger("data",W)}),T.on("done",function(){w.trigger("done")}),T.on("partialdone",function(){w.trigger("partialdone")}),T.on("reset",function(){w.trigger("reset")}),T.on("endedtimeline",function(){w.trigger("endedtimeline")}),this.flush=function(){T.flush()},this.partialFlush=function(){T.partialFlush()},this.reset=function(){T.reset()},this.endTimeline=function(){T.endTimeline()},z=function(G,W){var Y=8,ee=8,Se,le;for(Se=0;Se<G;Se++)ee!==0&&(le=W.readExpGolomb(),ee=(Y+le+256)%256),Y=ee===0?Y:ee},k=function(G){for(var W=G.byteLength,Y=[],ee=1,Se,le;ee<W-2;)G[ee]===0&&G[ee+1]===0&&G[ee+2]===3?(Y.push(ee+2),ee+=2):ee++;if(Y.length===0)return G;Se=W-Y.length,le=new Uint8Array(Se);var je=0;for(ee=0;ee<Se;je++,ee++)je===Y[0]&&(je++,Y.shift()),le[ee]=G[je];return le},V=function(G){var W=0,Y=0,ee=0,Se=0,le,je,Je,Ir,xn,bl,LI,kI,RI,tb,OI,hr=[1,1],NI,Tl;if(le=new kX(G),je=le.readUnsignedByte(),Ir=le.readUnsignedByte(),Je=le.readUnsignedByte(),le.skipUnsignedExpGolomb(),nI[je]&&(xn=le.readUnsignedExpGolomb(),xn===3&&le.skipBits(1),le.skipUnsignedExpGolomb(),le.skipUnsignedExpGolomb(),le.skipBits(1),le.readBoolean()))for(OI=xn!==3?8:12,Tl=0;Tl<OI;Tl++)le.readBoolean()&&(Tl<6?z(16,le):z(64,le));if(le.skipUnsignedExpGolomb(),bl=le.readUnsignedExpGolomb(),bl===0)le.readUnsignedExpGolomb();else if(bl===1)for(le.skipBits(1),le.skipExpGolomb(),le.skipExpGolomb(),LI=le.readUnsignedExpGolomb(),Tl=0;Tl<LI;Tl++)le.skipExpGolomb();if(le.skipUnsignedExpGolomb(),le.skipBits(1),kI=le.readUnsignedExpGolomb(),RI=le.readUnsignedExpGolomb(),tb=le.readBits(1),tb===0&&le.skipBits(1),le.skipBits(1),le.readBoolean()&&(W=le.readUnsignedExpGolomb(),Y=le.readUnsignedExpGolomb(),ee=le.readUnsignedExpGolomb(),Se=le.readUnsignedExpGolomb()),le.readBoolean()&&le.readBoolean()){switch(NI=le.readUnsignedByte(),NI){case 1:hr=[1,1];break;case 2:hr=[12,11];break;case 3:hr=[10,11];break;case 4:hr=[16,11];break;case 5:hr=[40,33];break;case 6:hr=[24,11];break;case 7:hr=[20,11];break;case 8:hr=[32,11];break;case 9:hr=[80,33];break;case 10:hr=[18,11];break;case 11:hr=[15,11];break;case 12:hr=[64,33];break;case 13:hr=[160,99];break;case 14:hr=[4,3];break;case 15:hr=[3,2];break;case 16:hr=[2,1];break;case 255:{hr=[le.readUnsignedByte()<<8|le.readUnsignedByte(),le.readUnsignedByte()<<8|le.readUnsignedByte()];break}}hr&&hr[0]/hr[1]}return{profileIdc:je,levelIdc:Je,profileCompatibility:Ir,width:(kI+1)*16-W*2-Y*2,height:(2-tb)*(RI+1)*16-ee*2-Se*2,sarRatio:hr}}},Eg.prototype=new iI;var RX={H264Stream:Eg,NalByteStream:Kf},OX=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],aI=function(T,w){var E=T[w+6]<<21|T[w+7]<<14|T[w+8]<<7|T[w+9],A=T[w+5],P=(A&16)>>4;return E=E>=0?E:0,P?E+20:E+10},sI=function(T,w){return T.length-w<10||T[w]!==73||T[w+1]!==68||T[w+2]!==51?w:(w+=aI(T,w),sI(T,w))},NX=function(T){var w=sI(T,0);return T.length>=w+2&&(T[w]&255)===255&&(T[w+1]&240)===240&&(T[w+1]&22)===16},oI=function(T){return T[0]<<21|T[1]<<14|T[2]<<7|T[3]},BX=function(T,w,E){var A,P="";for(A=w;A<E;A++)P+="%"+("00"+T[A].toString(16)).slice(-2);return P},FX=function(T,w,E){return unescape(BX(T,w,E))},UX=function(T,w){var E=(T[w+5]&224)>>5,A=T[w+4]<<3,P=T[w+3]&6144;return P|A|E},VX=function(T,w){return T[w]===73&&T[w+1]===68&&T[w+2]===51?"timed-metadata":T[w]&!0&&(T[w+1]&240)===240?"audio":null},zX=function(T){for(var w=0;w+5<T.length;){if(T[w]!==255||(T[w+1]&246)!==240){w++;continue}return OX[(T[w+2]&60)>>>2]}return null},GX=function(T){var w,E,A,P;w=10,T[5]&64&&(w+=4,w+=oI(T.subarray(10,14)));do{if(E=oI(T.subarray(w+4,w+8)),E<1)return null;if(P=String.fromCharCode(T[w],T[w+1],T[w+2],T[w+3]),P==="PRIV"){A=T.subarray(w+10,w+E+10);for(var k=0;k<A.byteLength;k++)if(A[k]===0){var V=FX(A,0,k);if(V==="com.apple.streaming.transportStreamTimestamp"){var z=A.subarray(k+1),G=(z[3]&1)<<30|z[4]<<22|z[5]<<14|z[6]<<6|z[7]>>>2;return G*=4,G+=z[7]&3,G}break}}w+=10,w+=E}while(w<T.byteLength);return null},W1={isLikelyAacData:NX,parseId3TagSize:aI,parseAdtsSize:UX,parseType:VX,parseSampleRate:zX,parseAacTimestamp:GX},HX=t,lI=W1,Ig;Ig=function(){var T=new Uint8Array,w=0;Ig.prototype.init.call(this),this.setTimestamp=function(E){w=E},this.push=function(E){var A=0,P=0,k,V,z,G;for(T.length?(G=T.length,T=new Uint8Array(E.byteLength+G),T.set(T.subarray(0,G)),T.set(E,G)):T=E;T.length-P>=3;){if(T[P]===73&&T[P+1]===68&&T[P+2]===51){if(T.length-P<10||(A=lI.parseId3TagSize(T,P),P+A>T.length))break;V={type:"timed-metadata",data:T.subarray(P,P+A)},this.trigger("data",V),P+=A;continue}else if((T[P]&255)===255&&(T[P+1]&240)===240){if(T.length-P<7||(A=lI.parseAdtsSize(T,P),P+A>T.length))break;z={type:"audio",data:T.subarray(P,P+A),pts:w,dts:w},this.trigger("data",z),P+=A;continue}P++}k=T.length-P,k>0?T=T.subarray(P):T=new Uint8Array},this.reset=function(){T=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){T=new Uint8Array,this.trigger("endedtimeline")}},Ig.prototype=new HX;var $X=Ig,WX=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],qX=WX,jX=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],XX=jX,Pg=t,Zf=Fe,Qf=wt,Mg=gl,ta=Ve,ps=EX,Lg=Nt,uI=MX,YX=RX.H264Stream,KX=$X,ZX=W1.isLikelyAacData,QX=Nt.ONE_SECOND_IN_TS,q1=qX,j1=XX,Jf,Tc,kg,yl,JX=function(T,w){w.stream=T,this.trigger("log",w)},cI=function(T,w){for(var E=Object.keys(w),A=0;A<E.length;A++){var P=E[A];P==="headOfPipeline"||!w[P].on||w[P].on("log",JX.bind(T,P))}},hI=function(T,w){var E;if(T.length!==w.length)return!1;for(E=0;E<T.length;E++)if(T[E]!==w[E])return!1;return!0},X1=function(T,w,E,A,P,k){var V=E-w,z=A-w,G=P-E;return{start:{dts:T,pts:T+V},end:{dts:T+z,pts:T+G},prependedContentDuration:k,baseMediaDecodeTime:T}};Tc=function(T,w){var E=[],A,P=0,k=0,V=1/0;w=w||{},A=w.firstSequenceNumber||0,Tc.prototype.init.call(this),this.push=function(z){ta.collectDtsInfo(T,z),T&&q1.forEach(function(G){T[G]=z[G]}),E.push(z)},this.setEarliestDts=function(z){P=z},this.setVideoBaseMediaDecodeTime=function(z){V=z},this.setAudioAppendStart=function(z){k=z},this.flush=function(){var z,G,W,Y,ee,Se,le;if(E.length===0){this.trigger("done","AudioSegmentStream");return}z=Mg.trimAdtsFramesByEarliestDts(E,T,P),T.baseMediaDecodeTime=ta.calculateTrackBaseMediaDecodeTime(T,w.keepOriginalTimestamps),le=Mg.prefixWithSilence(T,z,k,V),T.samples=Mg.generateSampleTable(z),W=Zf.mdat(Mg.concatenateFrameData(z)),E=[],G=Zf.moof(A,[T]),Y=new Uint8Array(G.byteLength+W.byteLength),A++,Y.set(G),Y.set(W,G.byteLength),ta.clearDtsInfo(T),ee=Math.ceil(QX*1024/T.samplerate),z.length&&(Se=z.length*ee,this.trigger("segmentTimingInfo",X1(Lg.audioTsToVideoTs(T.baseMediaDecodeTime,T.samplerate),z[0].dts,z[0].pts,z[0].dts+Se,z[0].pts+Se,le||0)),this.trigger("timingInfo",{start:z[0].pts,end:z[0].pts+Se})),this.trigger("data",{track:T,boxes:Y}),this.trigger("done","AudioSegmentStream")},this.reset=function(){ta.clearDtsInfo(T),E=[],this.trigger("reset")}},Tc.prototype=new Pg,Jf=function(T,w){var E,A=[],P=[],k,V;w=w||{},E=w.firstSequenceNumber||0,Jf.prototype.init.call(this),delete T.minPTS,this.gopCache_=[],this.push=function(z){ta.collectDtsInfo(T,z),z.nalUnitType==="seq_parameter_set_rbsp"&&!k&&(k=z.config,T.sps=[z.data],j1.forEach(function(G){T[G]=k[G]},this)),z.nalUnitType==="pic_parameter_set_rbsp"&&!V&&(V=z.data,T.pps=[z.data]),A.push(z)},this.flush=function(){for(var z,G,W,Y,ee,Se,le=0,je,Je;A.length&&A[0].nalUnitType!=="access_unit_delimiter_rbsp";)A.shift();if(A.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(z=Qf.groupNalsIntoFrames(A),W=Qf.groupFramesIntoGops(z),W[0][0].keyFrame||(G=this.getGopForFusion_(A[0],T),G?(le=G.duration,W.unshift(G),W.byteLength+=G.byteLength,W.nalCount+=G.nalCount,W.pts=G.pts,W.dts=G.dts,W.duration+=G.duration):W=Qf.extendFirstKeyFrame(W)),P.length){var Ir;if(w.alignGopsAtEnd?Ir=this.alignGopsAtEnd_(W):Ir=this.alignGopsAtStart_(W),!Ir){this.gopCache_.unshift({gop:W.pop(),pps:T.pps,sps:T.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),A=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}ta.clearDtsInfo(T),W=Ir}ta.collectDtsInfo(T,W),T.samples=Qf.generateSampleTable(W),ee=Zf.mdat(Qf.concatenateNalData(W)),T.baseMediaDecodeTime=ta.calculateTrackBaseMediaDecodeTime(T,w.keepOriginalTimestamps),this.trigger("processedGopsInfo",W.map(function(xn){return{pts:xn.pts,dts:xn.dts,byteLength:xn.byteLength}})),je=W[0],Je=W[W.length-1],this.trigger("segmentTimingInfo",X1(T.baseMediaDecodeTime,je.dts,je.pts,Je.dts+Je.duration,Je.pts+Je.duration,le)),this.trigger("timingInfo",{start:W[0].pts,end:W[W.length-1].pts+W[W.length-1].duration}),this.gopCache_.unshift({gop:W.pop(),pps:T.pps,sps:T.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),A=[],this.trigger("baseMediaDecodeTime",T.baseMediaDecodeTime),this.trigger("timelineStartInfo",T.timelineStartInfo),Y=Zf.moof(E,[T]),Se=new Uint8Array(Y.byteLength+ee.byteLength),E++,Se.set(Y),Se.set(ee,Y.byteLength),this.trigger("data",{track:T,boxes:Se}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),A=[],this.gopCache_.length=0,P.length=0,this.trigger("reset")},this.resetStream_=function(){ta.clearDtsInfo(T),k=void 0,V=void 0},this.getGopForFusion_=function(z){var G=45e3,W=1e4,Y=1/0,ee,Se,le,je,Je;for(Je=0;Je<this.gopCache_.length;Je++)je=this.gopCache_[Je],le=je.gop,!(!(T.pps&&hI(T.pps[0],je.pps[0]))||!(T.sps&&hI(T.sps[0],je.sps[0])))&&(le.dts<T.timelineStartInfo.dts||(ee=z.dts-le.dts-le.duration,ee>=-W&&ee<=G&&(!Se||Y>ee)&&(Se=je,Y=ee)));return Se?Se.gop:null},this.alignGopsAtStart_=function(z){var G,W,Y,ee,Se,le,je,Je;for(Se=z.byteLength,le=z.nalCount,je=z.duration,G=W=0;G<P.length&&W<z.length&&(Y=P[G],ee=z[W],Y.pts!==ee.pts);){if(ee.pts>Y.pts){G++;continue}W++,Se-=ee.byteLength,le-=ee.nalCount,je-=ee.duration}return W===0?z:W===z.length?null:(Je=z.slice(W),Je.byteLength=Se,Je.duration=je,Je.nalCount=le,Je.pts=Je[0].pts,Je.dts=Je[0].dts,Je)},this.alignGopsAtEnd_=function(z){var G,W,Y,ee,Se,le;for(G=P.length-1,W=z.length-1,Se=null,le=!1;G>=0&&W>=0;){if(Y=P[G],ee=z[W],Y.pts===ee.pts){le=!0;break}if(Y.pts>ee.pts){G--;continue}G===P.length-1&&(Se=W),W--}if(!le&&Se===null)return null;var je;if(le?je=W:je=Se,je===0)return z;var Je=z.slice(je),Ir=Je.reduce(function(xn,bl){return xn.byteLength+=bl.byteLength,xn.duration+=bl.duration,xn.nalCount+=bl.nalCount,xn},{byteLength:0,duration:0,nalCount:0});return Je.byteLength=Ir.byteLength,Je.duration=Ir.duration,Je.nalCount=Ir.nalCount,Je.pts=Je[0].pts,Je.dts=Je[0].dts,Je},this.alignGopsWith=function(z){P=z}},Jf.prototype=new Pg,yl=function(T,w){this.numberOfTracks=0,this.metadataStream=w,T=T||{},typeof T.remux<"u"?this.remuxTracks=!!T.remux:this.remuxTracks=!0,typeof T.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=T.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,yl.prototype.init.call(this),this.push=function(E){if(E.content||E.text)return this.pendingCaptions.push(E);if(E.frames)return this.pendingMetadata.push(E);this.pendingTracks.push(E.track),this.pendingBytes+=E.boxes.byteLength,E.track.type==="video"&&(this.videoTrack=E.track,this.pendingBoxes.push(E.boxes)),E.track.type==="audio"&&(this.audioTrack=E.track,this.pendingBoxes.unshift(E.boxes))}},yl.prototype=new Pg,yl.prototype.flush=function(T){var w=0,E={captions:[],captionStreams:{},metadata:[],info:{}},A,P,k,V=0,z;if(this.pendingTracks.length<this.numberOfTracks){if(T!=="VideoSegmentStream"&&T!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(V=this.videoTrack.timelineStartInfo.pts,j1.forEach(function(G){E.info[G]=this.videoTrack[G]},this)):this.audioTrack&&(V=this.audioTrack.timelineStartInfo.pts,q1.forEach(function(G){E.info[G]=this.audioTrack[G]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?E.type=this.pendingTracks[0].type:E.type="combined",this.emittedTracks+=this.pendingTracks.length,k=Zf.initSegment(this.pendingTracks),E.initSegment=new Uint8Array(k.byteLength),E.initSegment.set(k),E.data=new Uint8Array(this.pendingBytes),z=0;z<this.pendingBoxes.length;z++)E.data.set(this.pendingBoxes[z],w),w+=this.pendingBoxes[z].byteLength;for(z=0;z<this.pendingCaptions.length;z++)A=this.pendingCaptions[z],A.startTime=Lg.metadataTsToSeconds(A.startPts,V,this.keepOriginalTimestamps),A.endTime=Lg.metadataTsToSeconds(A.endPts,V,this.keepOriginalTimestamps),E.captionStreams[A.stream]=!0,E.captions.push(A);for(z=0;z<this.pendingMetadata.length;z++)P=this.pendingMetadata[z],P.cueTime=Lg.metadataTsToSeconds(P.pts,V,this.keepOriginalTimestamps),E.metadata.push(P);for(E.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",E),z=0;z<E.captions.length;z++)A=E.captions[z],this.trigger("caption",A);for(z=0;z<E.metadata.length;z++)P=E.metadata[z],this.trigger("id3Frame",P)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},yl.prototype.setRemux=function(T){this.remuxTracks=T},kg=function(T){var w=this,E=!0,A,P;kg.prototype.init.call(this),T=T||{},this.baseMediaDecodeTime=T.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var k={};this.transmuxPipeline_=k,k.type="aac",k.metadataStream=new ps.MetadataStream,k.aacStream=new KX,k.audioTimestampRolloverStream=new ps.TimestampRolloverStream("audio"),k.timedMetadataTimestampRolloverStream=new ps.TimestampRolloverStream("timed-metadata"),k.adtsStream=new uI,k.coalesceStream=new yl(T,k.metadataStream),k.headOfPipeline=k.aacStream,k.aacStream.pipe(k.audioTimestampRolloverStream).pipe(k.adtsStream),k.aacStream.pipe(k.timedMetadataTimestampRolloverStream).pipe(k.metadataStream).pipe(k.coalesceStream),k.metadataStream.on("timestamp",function(V){k.aacStream.setTimestamp(V.timeStamp)}),k.aacStream.on("data",function(V){V.type!=="timed-metadata"&&V.type!=="audio"||k.audioSegmentStream||(P=P||{timelineStartInfo:{baseMediaDecodeTime:w.baseMediaDecodeTime},codec:"adts",type:"audio"},k.coalesceStream.numberOfTracks++,k.audioSegmentStream=new Tc(P,T),k.audioSegmentStream.on("log",w.getLogTrigger_("audioSegmentStream")),k.audioSegmentStream.on("timingInfo",w.trigger.bind(w,"audioTimingInfo")),k.adtsStream.pipe(k.audioSegmentStream).pipe(k.coalesceStream),w.trigger("trackinfo",{hasAudio:!!P,hasVideo:!!A}))}),k.coalesceStream.on("data",this.trigger.bind(this,"data")),k.coalesceStream.on("done",this.trigger.bind(this,"done")),cI(this,k)},this.setupTsPipeline=function(){var k={};this.transmuxPipeline_=k,k.type="ts",k.metadataStream=new ps.MetadataStream,k.packetStream=new ps.TransportPacketStream,k.parseStream=new ps.TransportParseStream,k.elementaryStream=new ps.ElementaryStream,k.timestampRolloverStream=new ps.TimestampRolloverStream,k.adtsStream=new uI,k.h264Stream=new YX,k.captionStream=new ps.CaptionStream(T),k.coalesceStream=new yl(T,k.metadataStream),k.headOfPipeline=k.packetStream,k.packetStream.pipe(k.parseStream).pipe(k.elementaryStream).pipe(k.timestampRolloverStream),k.timestampRolloverStream.pipe(k.h264Stream),k.timestampRolloverStream.pipe(k.adtsStream),k.timestampRolloverStream.pipe(k.metadataStream).pipe(k.coalesceStream),k.h264Stream.pipe(k.captionStream).pipe(k.coalesceStream),k.elementaryStream.on("data",function(V){var z;if(V.type==="metadata"){for(z=V.tracks.length;z--;)!A&&V.tracks[z].type==="video"?(A=V.tracks[z],A.timelineStartInfo.baseMediaDecodeTime=w.baseMediaDecodeTime):!P&&V.tracks[z].type==="audio"&&(P=V.tracks[z],P.timelineStartInfo.baseMediaDecodeTime=w.baseMediaDecodeTime);A&&!k.videoSegmentStream&&(k.coalesceStream.numberOfTracks++,k.videoSegmentStream=new Jf(A,T),k.videoSegmentStream.on("log",w.getLogTrigger_("videoSegmentStream")),k.videoSegmentStream.on("timelineStartInfo",function(G){P&&!T.keepOriginalTimestamps&&(P.timelineStartInfo=G,k.audioSegmentStream.setEarliestDts(G.dts-w.baseMediaDecodeTime))}),k.videoSegmentStream.on("processedGopsInfo",w.trigger.bind(w,"gopInfo")),k.videoSegmentStream.on("segmentTimingInfo",w.trigger.bind(w,"videoSegmentTimingInfo")),k.videoSegmentStream.on("baseMediaDecodeTime",function(G){P&&k.audioSegmentStream.setVideoBaseMediaDecodeTime(G)}),k.videoSegmentStream.on("timingInfo",w.trigger.bind(w,"videoTimingInfo")),k.h264Stream.pipe(k.videoSegmentStream).pipe(k.coalesceStream)),P&&!k.audioSegmentStream&&(k.coalesceStream.numberOfTracks++,k.audioSegmentStream=new Tc(P,T),k.audioSegmentStream.on("log",w.getLogTrigger_("audioSegmentStream")),k.audioSegmentStream.on("timingInfo",w.trigger.bind(w,"audioTimingInfo")),k.audioSegmentStream.on("segmentTimingInfo",w.trigger.bind(w,"audioSegmentTimingInfo")),k.adtsStream.pipe(k.audioSegmentStream).pipe(k.coalesceStream)),w.trigger("trackinfo",{hasAudio:!!P,hasVideo:!!A})}}),k.coalesceStream.on("data",this.trigger.bind(this,"data")),k.coalesceStream.on("id3Frame",function(V){V.dispatchType=k.metadataStream.dispatchType,w.trigger("id3Frame",V)}),k.coalesceStream.on("caption",this.trigger.bind(this,"caption")),k.coalesceStream.on("done",this.trigger.bind(this,"done")),cI(this,k)},this.setBaseMediaDecodeTime=function(k){var V=this.transmuxPipeline_;T.keepOriginalTimestamps||(this.baseMediaDecodeTime=k),P&&(P.timelineStartInfo.dts=void 0,P.timelineStartInfo.pts=void 0,ta.clearDtsInfo(P),V.audioTimestampRolloverStream&&V.audioTimestampRolloverStream.discontinuity()),A&&(V.videoSegmentStream&&(V.videoSegmentStream.gopCache_=[]),A.timelineStartInfo.dts=void 0,A.timelineStartInfo.pts=void 0,ta.clearDtsInfo(A),V.captionStream.reset()),V.timestampRolloverStream&&V.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(k){P&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(k)},this.setRemux=function(k){var V=this.transmuxPipeline_;T.remux=k,V&&V.coalesceStream&&V.coalesceStream.setRemux(k)},this.alignGopsWith=function(k){A&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(k)},this.getLogTrigger_=function(k){var V=this;return function(z){z.stream=k,V.trigger("log",z)}},this.push=function(k){if(E){var V=ZX(k);V&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!V&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),E=!1}this.transmuxPipeline_.headOfPipeline.push(k)},this.flush=function(){E=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},kg.prototype=new Pg;var eY={Transmuxer:kg,VideoSegmentStream:Jf,AudioSegmentStream:Tc,AUDIO_PROPERTIES:q1,VIDEO_PROPERTIES:j1,generateSegmentTimingInfo:X1},tY=function(T){return T>>>0},rY=function(T){return("00"+T.toString(16)).slice(-2)},Rg={toUnsigned:tY,toHexString:rY},iY=function(T){var w="";return w+=String.fromCharCode(T[0]),w+=String.fromCharCode(T[1]),w+=String.fromCharCode(T[2]),w+=String.fromCharCode(T[3]),w},fI=iY,nY=Rg.toUnsigned,aY=fI,dI=function(T,w){var E=[],A,P,k,V,z;if(!w.length)return null;for(A=0;A<T.byteLength;)P=nY(T[A]<<24|T[A+1]<<16|T[A+2]<<8|T[A+3]),k=aY(T.subarray(A+4,A+8)),V=P>1?A+P:T.byteLength,k===w[0]&&(w.length===1?E.push(T.subarray(A+8,V)):(z=dI(T.subarray(A+8,V),w.slice(1)),z.length&&(E=E.concat(z)))),A=V;return E},pI=dI,sY=Rg.toUnsigned,oY=a.getUint64,lY=function(T){var w={version:T[0],flags:new Uint8Array(T.subarray(1,4))};return w.version===1?w.baseMediaDecodeTime=oY(T.subarray(4)):w.baseMediaDecodeTime=sY(T[4]<<24|T[5]<<16|T[6]<<8|T[7]),w},vI=lY,uY=function(T){return{isLeading:(T[0]&12)>>>2,dependsOn:T[0]&3,isDependedOn:(T[1]&192)>>>6,hasRedundancy:(T[1]&48)>>>4,paddingValue:(T[1]&14)>>>1,isNonSyncSample:T[1]&1,degradationPriority:T[2]<<8|T[3]}},cY=uY,gI=cY,hY=function(T){var w={version:T[0],flags:new Uint8Array(T.subarray(1,4)),samples:[]},E=new DataView(T.buffer,T.byteOffset,T.byteLength),A=w.flags[2]&1,P=w.flags[2]&4,k=w.flags[1]&1,V=w.flags[1]&2,z=w.flags[1]&4,G=w.flags[1]&8,W=E.getUint32(4),Y=8,ee;for(A&&(w.dataOffset=E.getInt32(Y),Y+=4),P&&W&&(ee={flags:gI(T.subarray(Y,Y+4))},Y+=4,k&&(ee.duration=E.getUint32(Y),Y+=4),V&&(ee.size=E.getUint32(Y),Y+=4),G&&(w.version===1?ee.compositionTimeOffset=E.getInt32(Y):ee.compositionTimeOffset=E.getUint32(Y),Y+=4),w.samples.push(ee),W--);W--;)ee={},k&&(ee.duration=E.getUint32(Y),Y+=4),V&&(ee.size=E.getUint32(Y),Y+=4),z&&(ee.flags=gI(T.subarray(Y,Y+4)),Y+=4),G&&(w.version===1?ee.compositionTimeOffset=E.getInt32(Y):ee.compositionTimeOffset=E.getUint32(Y),Y+=4),w.samples.push(ee);return w},mI=hY,fY=function(T){var w=new DataView(T.buffer,T.byteOffset,T.byteLength),E={version:T[0],flags:new Uint8Array(T.subarray(1,4)),trackId:w.getUint32(4)},A=E.flags[2]&1,P=E.flags[2]&2,k=E.flags[2]&8,V=E.flags[2]&16,z=E.flags[2]&32,G=E.flags[0]&65536,W=E.flags[0]&131072,Y;return Y=8,A&&(Y+=4,E.baseDataOffset=w.getUint32(12),Y+=4),P&&(E.sampleDescriptionIndex=w.getUint32(Y),Y+=4),k&&(E.defaultSampleDuration=w.getUint32(Y),Y+=4),V&&(E.defaultSampleSize=w.getUint32(Y),Y+=4),z&&(E.defaultSampleFlags=w.getUint32(Y)),G&&(E.durationIsEmpty=!0),!A&&W&&(E.baseDataOffsetIsMoof=!0),E},yI=fY,ed;typeof window<"u"?ed=window:typeof r<"u"?ed=r:typeof self<"u"?ed=self:ed={};var _I=ed,dY=nt.discardEmulationPreventionBytes,pY=YE.CaptionStream,td=pI,vY=vI,gY=mI,mY=yI,bI=_I,yY=function(T,w){for(var E=T,A=0;A<w.length;A++){var P=w[A];if(E<P.size)return P;E-=P.size}return null},_Y=function(T,w,E){var A=new DataView(T.buffer,T.byteOffset,T.byteLength),P={logs:[],seiNals:[]},k,V,z,G;for(V=0;V+4<T.length;V+=z)if(z=A.getUint32(V),V+=4,!(z<=0))switch(T[V]&31){case 6:var W=T.subarray(V+1,V+1+z),Y=yY(V,w);if(k={nalUnitType:"sei_rbsp",size:z,data:W,escapedRBSP:dY(W),trackId:E},Y)k.pts=Y.pts,k.dts=Y.dts,G=Y;else if(G)k.pts=G.pts,k.dts=G.dts;else{P.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+V+" for trackId "+E+". See mux.js#223."});break}P.seiNals.push(k);break}return P},bY=function(T,w,E){var A=w,P=E.defaultSampleDuration||0,k=E.defaultSampleSize||0,V=E.trackId,z=[];return T.forEach(function(G){var W=gY(G),Y=W.samples;Y.forEach(function(ee){ee.duration===void 0&&(ee.duration=P),ee.size===void 0&&(ee.size=k),ee.trackId=V,ee.dts=A,ee.compositionTimeOffset===void 0&&(ee.compositionTimeOffset=0),typeof A=="bigint"?(ee.pts=A+bI.BigInt(ee.compositionTimeOffset),A+=bI.BigInt(ee.duration)):(ee.pts=A+ee.compositionTimeOffset,A+=ee.duration)}),z=z.concat(Y)}),z},TY=function(T,w){var E=td(T,["moof","traf"]),A=td(T,["mdat"]),P={},k=[];return A.forEach(function(V,z){var G=E[z];k.push({mdat:V,traf:G})}),k.forEach(function(V){var z=V.mdat,G=V.traf,W=td(G,["tfhd"]),Y=mY(W[0]),ee=Y.trackId,Se=td(G,["tfdt"]),le=Se.length>0?vY(Se[0]).baseMediaDecodeTime:0,je=td(G,["trun"]),Je,Ir;w===ee&&je.length>0&&(Je=bY(je,le,Y),Ir=_Y(z,Je,ee),P[ee]||(P[ee]={seiNals:[],logs:[]}),P[ee].seiNals=P[ee].seiNals.concat(Ir.seiNals),P[ee].logs=P[ee].logs.concat(Ir.logs))}),P},SY=function(T,w,E){var A;if(w===null)return null;A=TY(T,w);var P=A[w]||{};return{seiNals:P.seiNals,logs:P.logs,timescale:E}},xY=function(){var T=!1,w,E,A,P,k,V;this.isInitialized=function(){return T},this.init=function(z){w=new pY,T=!0,V=z?z.isPartial:!1,w.on("data",function(G){G.startTime=G.startPts/P,G.endTime=G.endPts/P,k.captions.push(G),k.captionStreams[G.stream]=!0}),w.on("log",function(G){k.logs.push(G)})},this.isNewInit=function(z,G){return z&&z.length===0||G&&typeof G=="object"&&Object.keys(G).length===0?!1:A!==z[0]||P!==G[A]},this.parse=function(z,G,W){var Y;if(this.isInitialized()){if(!G||!W)return null;if(this.isNewInit(G,W))A=G[0],P=W[A];else if(A===null||!P)return E.push(z),null}else return null;for(;E.length>0;){var ee=E.shift();this.parse(ee,G,W)}return Y=SY(z,A,P),Y&&Y.logs&&(k.logs=k.logs.concat(Y.logs)),Y===null||!Y.seiNals?k.logs.length?{logs:k.logs,captions:[],captionStreams:[]}:null:(this.pushNals(Y.seiNals),this.flushStream(),k)},this.pushNals=function(z){if(!this.isInitialized()||!z||z.length===0)return null;z.forEach(function(G){w.push(G)})},this.flushStream=function(){if(!this.isInitialized())return null;V?w.partialFlush():w.flush()},this.clearParsedCaptions=function(){k.captions=[],k.captionStreams={},k.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;w.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){E=[],A=null,P=null,k?this.clearParsedCaptions():k={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},wY=xY,CY=function(T){for(var w=0,E=String.fromCharCode(T[w]),A="";E!=="\0";)A+=E,w++,E=String.fromCharCode(T[w]);return A+=E,A},AY={uint8ToCString:CY},Og=AY.uint8ToCString,DY=a.getUint64,EY=function(T){var w=4,E=T[0],A,P,k,V,z,G,W,Y;if(E===0){A=Og(T.subarray(w)),w+=A.length,P=Og(T.subarray(w)),w+=P.length;var ee=new DataView(T.buffer);k=ee.getUint32(w),w+=4,z=ee.getUint32(w),w+=4,G=ee.getUint32(w),w+=4,W=ee.getUint32(w),w+=4}else if(E===1){var ee=new DataView(T.buffer);k=ee.getUint32(w),w+=4,V=DY(T.subarray(w)),w+=8,G=ee.getUint32(w),w+=4,W=ee.getUint32(w),w+=4,A=Og(T.subarray(w)),w+=A.length,P=Og(T.subarray(w)),w+=P.length}Y=new Uint8Array(T.subarray(w,T.byteLength));var Se={scheme_id_uri:A,value:P,timescale:k||1,presentation_time:V,presentation_time_delta:z,event_duration:G,id:W,message_data:Y};return PY(E,Se)?Se:void 0},IY=function(T,w,E,A){return T||T===0?T/w:A+E/w},PY=function(T,w){var E=w.scheme_id_uri!=="\0",A=T===0&&TI(w.presentation_time_delta)&&E,P=T===1&&TI(w.presentation_time)&&E;return!(T>1)&&A||P},TI=function(T){return T!==void 0||T!==null},MY={parseEmsgBox:EY,scaleTime:IY},Ng=Rg.toUnsigned,rd=Rg.toHexString,cr=pI,Sc=fI,Y1=MY,LY=yI,kY=mI,RY=vI,OY=a.getUint64,SI,xI,wI,CI,AI,K1,DI,Z1=_I,NY=JE.parseId3Frames;SI=function(T){var w={},E=cr(T,["moov","trak"]);return E.reduce(function(A,P){var k,V,z,G,W;return k=cr(P,["tkhd"])[0],!k||(V=k[0],z=V===0?12:20,G=Ng(k[z]<<24|k[z+1]<<16|k[z+2]<<8|k[z+3]),W=cr(P,["mdia","mdhd"])[0],!W)?null:(V=W[0],z=V===0?12:20,A[G]=Ng(W[z]<<24|W[z+1]<<16|W[z+2]<<8|W[z+3]),A)},w)},xI=function(T,w){var E;E=cr(w,["moof","traf"]);var A=E.reduce(function(P,k){var V=cr(k,["tfhd"])[0],z=Ng(V[4]<<24|V[5]<<16|V[6]<<8|V[7]),G=T[z]||9e4,W=cr(k,["tfdt"])[0],Y=new DataView(W.buffer,W.byteOffset,W.byteLength),ee;W[0]===1?ee=OY(W.subarray(4,12)):ee=Y.getUint32(4);let Se;return typeof ee=="bigint"?Se=ee/Z1.BigInt(G):typeof ee=="number"&&!isNaN(ee)&&(Se=ee/G),Se<Number.MAX_SAFE_INTEGER&&(Se=Number(Se)),Se<P&&(P=Se),P},1/0);return typeof A=="bigint"||isFinite(A)?A:0},wI=function(T,w){var E=cr(w,["moof","traf"]),A=0,P=0,k;if(E&&E.length){var V=cr(E[0],["tfhd"])[0],z=cr(E[0],["trun"])[0],G=cr(E[0],["tfdt"])[0];if(V){var W=LY(V);k=W.trackId}if(G){var Y=RY(G);A=Y.baseMediaDecodeTime}if(z){var ee=kY(z);ee.samples&&ee.samples.length&&(P=ee.samples[0].compositionTimeOffset||0)}}var Se=T[k]||9e4;typeof A=="bigint"&&(P=Z1.BigInt(P),Se=Z1.BigInt(Se));var le=(A+P)/Se;return typeof le=="bigint"&&le<Number.MAX_SAFE_INTEGER&&(le=Number(le)),le},CI=function(T){var w=cr(T,["moov","trak"]),E=[];return w.forEach(function(A){var P=cr(A,["mdia","hdlr"]),k=cr(A,["tkhd"]);P.forEach(function(V,z){var G=Sc(V.subarray(8,12)),W=k[z],Y,ee,Se;G==="vide"&&(Y=new DataView(W.buffer,W.byteOffset,W.byteLength),ee=Y.getUint8(0),Se=ee===0?Y.getUint32(12):Y.getUint32(20),E.push(Se))})}),E},K1=function(T){var w=T[0],E=w===0?12:20;return Ng(T[E]<<24|T[E+1]<<16|T[E+2]<<8|T[E+3])},AI=function(T){var w=cr(T,["moov","trak"]),E=[];return w.forEach(function(A){var P={},k=cr(A,["tkhd"])[0],V,z;k&&(V=new DataView(k.buffer,k.byteOffset,k.byteLength),z=V.getUint8(0),P.id=z===0?V.getUint32(12):V.getUint32(20));var G=cr(A,["mdia","hdlr"])[0];if(G){var W=Sc(G.subarray(8,12));W==="vide"?P.type="video":W==="soun"?P.type="audio":P.type=W}var Y=cr(A,["mdia","minf","stbl","stsd"])[0];if(Y){var ee=Y.subarray(8);P.codec=Sc(ee.subarray(4,8));var Se=cr(ee,[P.codec])[0],le,je;Se&&(/^[asm]vc[1-9]$/i.test(P.codec)?(le=Se.subarray(78),je=Sc(le.subarray(4,8)),je==="avcC"&&le.length>11?(P.codec+=".",P.codec+=rd(le[9]),P.codec+=rd(le[10]),P.codec+=rd(le[11])):P.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(P.codec)?(le=Se.subarray(28),je=Sc(le.subarray(4,8)),je==="esds"&&le.length>20&&le[19]!==0?(P.codec+="."+rd(le[19]),P.codec+="."+rd(le[20]>>>2&63).replace(/^0/,"")):P.codec="mp4a.40.2"):P.codec=P.codec.toLowerCase())}var Je=cr(A,["mdia","mdhd"])[0];Je&&(P.timescale=K1(Je)),E.push(P)}),E},DI=function(T,w=0){var E=cr(T,["emsg"]);return E.map(A=>{var P=Y1.parseEmsgBox(new Uint8Array(A)),k=NY(P.message_data);return{cueTime:Y1.scaleTime(P.presentation_time,P.timescale,P.presentation_time_delta,w),duration:Y1.scaleTime(P.event_duration,P.timescale),frames:k}})};var Q1={findBox:cr,parseType:Sc,timescale:SI,startTime:xI,compositionStartTime:wI,videoTrackIds:CI,tracks:AI,getTimescaleFromMediaHeader:K1,getEmsgID3:DI},J1=Tg,EI=function(T){var w=T[1]&31;return w<<=8,w|=T[2],w},Bg=function(T){return!!(T[1]&64)},Fg=function(T){var w=0;return(T[3]&48)>>>4>1&&(w+=T[4]+1),w},BY=function(T,w){var E=EI(T);return E===0?"pat":E===w?"pmt":w?"pes":null},FY=function(T){var w=Bg(T),E=4+Fg(T);return w&&(E+=T[E]+1),(T[E+10]&31)<<8|T[E+11]},UY=function(T){var w={},E=Bg(T),A=4+Fg(T);if(E&&(A+=T[A]+1),!!(T[A+5]&1)){var P,k,V;P=(T[A+1]&15)<<8|T[A+2],k=3+P-4,V=(T[A+10]&15)<<8|T[A+11];for(var z=12+V;z<k;){var G=A+z;w[(T[G+1]&31)<<8|T[G+2]]=T[G],z+=((T[G+3]&15)<<8|T[G+4])+5}return w}},VY=function(T,w){var E=EI(T),A=w[E];switch(A){case J1.H264_STREAM_TYPE:return"video";case J1.ADTS_STREAM_TYPE:return"audio";case J1.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},zY=function(T){var w=Bg(T);if(!w)return null;var E=4+Fg(T);if(E>=T.byteLength)return null;var A=null,P;return P=T[E+7],P&192&&(A={},A.pts=(T[E+9]&14)<<27|(T[E+10]&255)<<20|(T[E+11]&254)<<12|(T[E+12]&255)<<5|(T[E+13]&254)>>>3,A.pts*=4,A.pts+=(T[E+13]&6)>>>1,A.dts=A.pts,P&64&&(A.dts=(T[E+14]&14)<<27|(T[E+15]&255)<<20|(T[E+16]&254)<<12|(T[E+17]&255)<<5|(T[E+18]&254)>>>3,A.dts*=4,A.dts+=(T[E+18]&6)>>>1)),A},eb=function(T){switch(T){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},GY=function(T){for(var w=4+Fg(T),E=T.subarray(w),A=0,P=0,k=!1,V;P<E.byteLength-3;P++)if(E[P+2]===1){A=P+5;break}for(;A<E.byteLength;)switch(E[A]){case 0:if(E[A-1]!==0){A+=2;break}else if(E[A-2]!==0){A++;break}P+3!==A-2&&(V=eb(E[P+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0));do A++;while(E[A]!==1&&A<E.length);P=A-2,A+=3;break;case 1:if(E[A-1]!==0||E[A-2]!==0){A+=3;break}V=eb(E[P+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0),P=A-2,A+=3;break;default:A+=3;break}return E=E.subarray(P),A-=P,P=0,E&&E.byteLength>3&&(V=eb(E[P+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0)),k},HY={parseType:BY,parsePat:FY,parsePmt:UY,parsePayloadUnitStartIndicator:Bg,parsePesType:VY,parsePesTime:zY,videoPacketContainsKeyFrame:GY},II=Tg,xc=ZE.handleRollover,Mt={};Mt.ts=HY,Mt.aac=W1;var _l=Nt.ONE_SECOND_IN_TS,hi=188,wa=71,$Y=function(T,w){for(var E=0,A=hi,P,k;A<T.byteLength;){if(T[E]===wa&&T[A]===wa){switch(P=T.subarray(E,A),k=Mt.ts.parseType(P,w.pid),k){case"pat":w.pid=Mt.ts.parsePat(P);break;case"pmt":var V=Mt.ts.parsePmt(P);w.table=w.table||{},Object.keys(V).forEach(function(z){w.table[z]=V[z]});break}E+=hi,A+=hi;continue}E++,A++}},PI=function(T,w,E){for(var A=0,P=hi,k,V,z,G,W,Y=!1;P<=T.byteLength;){if(T[A]===wa&&(T[P]===wa||P===T.byteLength)){switch(k=T.subarray(A,P),V=Mt.ts.parseType(k,w.pid),V){case"pes":z=Mt.ts.parsePesType(k,w.table),G=Mt.ts.parsePayloadUnitStartIndicator(k),z==="audio"&&G&&(W=Mt.ts.parsePesTime(k),W&&(W.type="audio",E.audio.push(W),Y=!0));break}if(Y)break;A+=hi,P+=hi;continue}A++,P++}for(P=T.byteLength,A=P-hi,Y=!1;A>=0;){if(T[A]===wa&&(T[P]===wa||P===T.byteLength)){switch(k=T.subarray(A,P),V=Mt.ts.parseType(k,w.pid),V){case"pes":z=Mt.ts.parsePesType(k,w.table),G=Mt.ts.parsePayloadUnitStartIndicator(k),z==="audio"&&G&&(W=Mt.ts.parsePesTime(k),W&&(W.type="audio",E.audio.push(W),Y=!0));break}if(Y)break;A-=hi,P-=hi;continue}A--,P--}},WY=function(T,w,E){for(var A=0,P=hi,k,V,z,G,W,Y,ee,Se,le=!1,je={data:[],size:0};P<T.byteLength;){if(T[A]===wa&&T[P]===wa){switch(k=T.subarray(A,P),V=Mt.ts.parseType(k,w.pid),V){case"pes":if(z=Mt.ts.parsePesType(k,w.table),G=Mt.ts.parsePayloadUnitStartIndicator(k),z==="video"&&(G&&!le&&(W=Mt.ts.parsePesTime(k),W&&(W.type="video",E.video.push(W),le=!0)),!E.firstKeyFrame)){if(G&&je.size!==0){for(Y=new Uint8Array(je.size),ee=0;je.data.length;)Se=je.data.shift(),Y.set(Se,ee),ee+=Se.byteLength;if(Mt.ts.videoPacketContainsKeyFrame(Y)){var Je=Mt.ts.parsePesTime(Y);Je?(E.firstKeyFrame=Je,E.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}je.size=0}je.data.push(k),je.size+=k.byteLength}break}if(le&&E.firstKeyFrame)break;A+=hi,P+=hi;continue}A++,P++}for(P=T.byteLength,A=P-hi,le=!1;A>=0;){if(T[A]===wa&&T[P]===wa){switch(k=T.subarray(A,P),V=Mt.ts.parseType(k,w.pid),V){case"pes":z=Mt.ts.parsePesType(k,w.table),G=Mt.ts.parsePayloadUnitStartIndicator(k),z==="video"&&G&&(W=Mt.ts.parsePesTime(k),W&&(W.type="video",E.video.push(W),le=!0));break}if(le)break;A-=hi,P-=hi;continue}A--,P--}},qY=function(T,w){if(T.audio&&T.audio.length){var E=w;(typeof E>"u"||isNaN(E))&&(E=T.audio[0].dts),T.audio.forEach(function(k){k.dts=xc(k.dts,E),k.pts=xc(k.pts,E),k.dtsTime=k.dts/_l,k.ptsTime=k.pts/_l})}if(T.video&&T.video.length){var A=w;if((typeof A>"u"||isNaN(A))&&(A=T.video[0].dts),T.video.forEach(function(k){k.dts=xc(k.dts,A),k.pts=xc(k.pts,A),k.dtsTime=k.dts/_l,k.ptsTime=k.pts/_l}),T.firstKeyFrame){var P=T.firstKeyFrame;P.dts=xc(P.dts,A),P.pts=xc(P.pts,A),P.dtsTime=P.dts/_l,P.ptsTime=P.pts/_l}}},jY=function(T){for(var w=!1,E=0,A=null,P=null,k=0,V=0,z;T.length-V>=3;){var G=Mt.aac.parseType(T,V);switch(G){case"timed-metadata":if(T.length-V<10){w=!0;break}if(k=Mt.aac.parseId3TagSize(T,V),k>T.length){w=!0;break}P===null&&(z=T.subarray(V,V+k),P=Mt.aac.parseAacTimestamp(z)),V+=k;break;case"audio":if(T.length-V<7){w=!0;break}if(k=Mt.aac.parseAdtsSize(T,V),k>T.length){w=!0;break}A===null&&(z=T.subarray(V,V+k),A=Mt.aac.parseSampleRate(z)),E++,V+=k;break;default:V++;break}if(w)return null}if(A===null||P===null)return null;var W=_l/A,Y={audio:[{type:"audio",dts:P,pts:P},{type:"audio",dts:P+E*1024*W,pts:P+E*1024*W}]};return Y},XY=function(T){var w={pid:null,table:null},E={};$Y(T,w);for(var A in w.table)if(w.table.hasOwnProperty(A)){var P=w.table[A];switch(P){case II.H264_STREAM_TYPE:E.video=[],WY(T,w,E),E.video.length===0&&delete E.video;break;case II.ADTS_STREAM_TYPE:E.audio=[],PI(T,w,E),E.audio.length===0&&delete E.audio;break}}return E},YY=function(T,w){var E=Mt.aac.isLikelyAacData(T),A;return E?A=jY(T):A=XY(T),!A||!A.audio&&!A.video?null:(qY(A,w),A)},KY={inspect:YY,parseAudioPes_:PI};const ZY=function(T,w){w.on("data",function(E){const A=E.initSegment;E.initSegment={data:A.buffer,byteOffset:A.byteOffset,byteLength:A.byteLength};const P=E.data;E.data=P.buffer,T.postMessage({action:"data",segment:E,byteOffset:P.byteOffset,byteLength:P.byteLength},[E.data])}),w.on("done",function(E){T.postMessage({action:"done"})}),w.on("gopInfo",function(E){T.postMessage({action:"gopInfo",gopInfo:E})}),w.on("videoSegmentTimingInfo",function(E){const A={start:{decode:Nt.videoTsToSeconds(E.start.dts),presentation:Nt.videoTsToSeconds(E.start.pts)},end:{decode:Nt.videoTsToSeconds(E.end.dts),presentation:Nt.videoTsToSeconds(E.end.pts)},baseMediaDecodeTime:Nt.videoTsToSeconds(E.baseMediaDecodeTime)};E.prependedContentDuration&&(A.prependedContentDuration=Nt.videoTsToSeconds(E.prependedContentDuration)),T.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:A})}),w.on("audioSegmentTimingInfo",function(E){const A={start:{decode:Nt.videoTsToSeconds(E.start.dts),presentation:Nt.videoTsToSeconds(E.start.pts)},end:{decode:Nt.videoTsToSeconds(E.end.dts),presentation:Nt.videoTsToSeconds(E.end.pts)},baseMediaDecodeTime:Nt.videoTsToSeconds(E.baseMediaDecodeTime)};E.prependedContentDuration&&(A.prependedContentDuration=Nt.videoTsToSeconds(E.prependedContentDuration)),T.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:A})}),w.on("id3Frame",function(E){T.postMessage({action:"id3Frame",id3Frame:E})}),w.on("caption",function(E){T.postMessage({action:"caption",caption:E})}),w.on("trackinfo",function(E){T.postMessage({action:"trackinfo",trackInfo:E})}),w.on("audioTimingInfo",function(E){T.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Nt.videoTsToSeconds(E.start),end:Nt.videoTsToSeconds(E.end)}})}),w.on("videoTimingInfo",function(E){T.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Nt.videoTsToSeconds(E.start),end:Nt.videoTsToSeconds(E.end)}})}),w.on("log",function(E){T.postMessage({action:"log",log:E})})};class MI{constructor(w,E){this.options=E||{},this.self=w,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new eY.Transmuxer(this.options),ZY(this.self,this.transmuxer)}pushMp4Captions(w){this.captionParser||(this.captionParser=new wY,this.captionParser.init());const E=new Uint8Array(w.data,w.byteOffset,w.byteLength),A=this.captionParser.parse(E,w.trackIds,w.timescales);this.self.postMessage({action:"mp4Captions",captions:A&&A.captions||[],logs:A&&A.logs||[],data:E.buffer},[E.buffer])}probeMp4StartTime({timescales:w,data:E}){const A=Q1.startTime(w,E);this.self.postMessage({action:"probeMp4StartTime",startTime:A,data:E},[E.buffer])}probeMp4Tracks({data:w}){const E=Q1.tracks(w);this.self.postMessage({action:"probeMp4Tracks",tracks:E,data:w},[w.buffer])}probeEmsgID3({data:w,offset:E}){const A=Q1.getEmsgID3(w,E);this.self.postMessage({action:"probeEmsgID3",id3Frames:A,emsgData:w},[w.buffer])}probeTs({data:w,baseStartTime:E}){const A=typeof E=="number"&&!isNaN(E)?E*Nt.ONE_SECOND_IN_TS:void 0,P=KY.inspect(w,A);let k=null;P&&(k={hasVideo:P.video&&P.video.length===2||!1,hasAudio:P.audio&&P.audio.length===2||!1},k.hasVideo&&(k.videoStart=P.video[0].ptsTime),k.hasAudio&&(k.audioStart=P.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:k,data:w},[w.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(w){const E=new Uint8Array(w.data,w.byteOffset,w.byteLength);this.transmuxer.push(E)}reset(){this.transmuxer.reset()}setTimestampOffset(w){const E=w.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Nt.secondsToVideoTs(E)))}setAudioAppendStart(w){this.transmuxer.setAudioAppendStart(Math.ceil(Nt.secondsToVideoTs(w.appendStart)))}setRemux(w){this.transmuxer.setRemux(w.remux)}flush(w){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(w){this.transmuxer.alignGopsWith(w.gopsToAlignWith.slice())}}self.onmessage=function(T){if(T.data.action==="init"&&T.data.options){this.messageHandlers=new MI(self,T.data.options);return}this.messageHandlers||(this.messageHandlers=new MI(self)),T.data&&T.data.action&&T.data.action!=="init"&&this.messageHandlers[T.data.action]&&this.messageHandlers[T.data.action](T.data)}}));var Qre=L8(Zre);const Jre=(r,e,t)=>{const{type:i,initSegment:n,captions:a,captionStreams:s,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:u}=r.data.segment;e.buffer.push({captions:a,captionStreams:s,metadata:o});const c=r.data.segment.boxes||{data:r.data.segment.data},h={type:i,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};typeof l<"u"&&(h.videoFrameDtsTime=l),typeof u<"u"&&(h.videoFramePtsTime=u),t(h)},eie=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},tie=(r,e)=>{e.gopInfo=r.data.gopInfo},O8=r=>{const{transmuxer:e,bytes:t,audioAppendStart:i,gopsToAlignWith:n,remux:a,onData:s,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:u,onVideoSegmentTimingInfo:c,onAudioSegmentTimingInfo:h,onId3:d,onCaptions:f,onDone:p,onEndedTimeline:v,onTransmuxerLog:g,isEndOfTimeline:m,segment:y,triggerSegmentEventFn:_}=r,b={buffer:[]};let S=m;const x=D=>{e.currentTransmux===r&&(D.data.action==="data"&&Jre(D,b,s),D.data.action==="trackinfo"&&o(D.data.trackInfo),D.data.action==="gopInfo"&&tie(D,b),D.data.action==="audioTimingInfo"&&l(D.data.audioTimingInfo),D.data.action==="videoTimingInfo"&&u(D.data.videoTimingInfo),D.data.action==="videoSegmentTimingInfo"&&c(D.data.videoSegmentTimingInfo),D.data.action==="audioSegmentTimingInfo"&&h(D.data.audioSegmentTimingInfo),D.data.action==="id3Frame"&&d([D.data.id3Frame],D.data.id3Frame.dispatchType),D.data.action==="caption"&&f(D.data.caption),D.data.action==="endedtimeline"&&(S=!1,v()),D.data.action==="log"&&g(D.data.log),D.data.type==="transmuxed"&&(S||(e.onmessage=null,eie({transmuxedData:b,callback:p}),N8(e))))},C=()=>{const D={message:"Received an error message from the transmuxer worker",metadata:{errorType:K.Error.StreamingFailedToTransmuxSegment,segmentInfo:au({segment:y})}};p(null,D)};if(e.onmessage=x,e.onerror=C,i&&e.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(n)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),typeof a<"u"&&e.postMessage({action:"setRemux",remux:a}),t.byteLength){const D=t instanceof ArrayBuffer?t:t.buffer,I=t instanceof ArrayBuffer?0:t.byteOffset;_({type:"segmenttransmuxingstart",segment:y}),e.postMessage({action:"push",data:D,byteOffset:I,byteLength:t.byteLength},[D])}m&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},N8=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():O8(r.currentTransmux))},hM=(r,e)=>{r.postMessage({action:e}),N8(r)},B8=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,hM(e,r);return}e.transmuxQueue.push(hM.bind(null,e,r))},rie=r=>{B8("reset",r)},iie=r=>{B8("endTimeline",r)},F8=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,O8(r);return}r.transmuxer.transmuxQueue.push(r)},nie=r=>{const e=new Qre;e.currentTransmux=null,e.transmuxQueue=[];const t=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,t.call(e)),e.postMessage({action:"init",options:r}),e};var Ab={reset:rie,endTimeline:iie,transmux:F8,createTransmuxer:nie};const _p=function(r){const e=r.transmuxer,t=r.endAction||r.action,i=r.callback,n=ar({},r,{endAction:null,transmuxer:null,callback:null}),a=s=>{s.data.action===t&&(e.removeEventListener("message",a),s.data.data&&(s.data.data=new Uint8Array(s.data.data,r.byteOffset||0,r.byteLength||s.data.data.byteLength),r.data&&(r.data=s.data.data)),i(s.data))};if(e.addEventListener("message",a),r.data){const s=r.data instanceof ArrayBuffer;n.byteOffset=s?0:r.data.byteOffset,n.byteLength=r.data.byteLength;const o=[s?r.data:r.data.buffer];e.postMessage(n,o)}else e.postMessage(n)},Ha={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Yx=r=>{r.forEach(e=>{e.abort()})},aie=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),sie=r=>{const e=r.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return i.bytesReceived=r.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i},gA=(r,e)=>{const{requestType:t}=e,i=Iu({requestType:t,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Ha.TIMEOUT,xhr:e,metadata:i}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Ha.ABORTED,xhr:e,metadata:i}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Ha.FAILURE,xhr:e,metadata:i}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Ha.FAILURE,xhr:e,metadata:i}:null},fM=(r,e,t,i)=>(n,a)=>{const s=a.response,o=gA(n,a);if(o)return t(o,r);if(s.byteLength!==16)return t({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:Ha.FAILURE,xhr:a},r);const l=new DataView(s),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let h=0;h<e.length;h++)e[h].bytes=u;const c={uri:a.uri};return i({type:"segmentkeyloadcomplete",segment:r,keyInfo:c}),t(null,r)},U8=(r,e)=>{const t=OC(r.map.bytes);if(t!=="mp4"){const i=r.map.resolvedUri||r.map.uri,n=t||"unknown";return e({internal:!0,message:`Found unsupported ${n} container for initialization segment at URL: ${i}`,code:Ha.FAILURE,metadata:{mediaType:n}})}_p({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:i,data:n})=>(r.map.bytes=n,i.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale))}),e(null))})},oie=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(i,n)=>{const a=gA(i,n);if(a)return e(a,r);const s=new Uint8Array(n.response);if(t({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=s,e(null,r);r.map.bytes=s,U8(r,function(o){if(o)return o.xhr=n,o.status=n.status,e(o,r);e(null,r)})},lie=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:i})=>(n,a)=>{const s=gA(n,a);if(s)return e(s,r);i({type:"segmentloaded",segment:r});const o=t==="arraybuffer"||!a.responseText?a.response:Yre(a.responseText.substring(r.lastReachedChar||0));return r.stats=aie(a),r.key?r.encryptedBytes=new Uint8Array(o):r.bytes=new Uint8Array(o),e(null,r)},uie=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{const p=r.map&&r.map.tracks||{},v=!!(p.audio&&p.video);let g=i.bind(null,r,"audio","start");const m=i.bind(null,r,"audio","end");let y=i.bind(null,r,"video","start");const _=i.bind(null,r,"video","end"),b=()=>F8({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:v,onData:S=>{S.type=S.type==="combined"?"video":S.type,c(r,S)},onTrackInfo:S=>{t&&(v&&(S.isMuxed=!0),t(r,S))},onAudioTimingInfo:S=>{g&&typeof S.start<"u"&&(g(S.start),g=null),m&&typeof S.end<"u"&&m(S.end)},onVideoTimingInfo:S=>{y&&typeof S.start<"u"&&(y(S.start),y=null),_&&typeof S.end<"u"&&_(S.end)},onVideoSegmentTimingInfo:S=>{const x={pts:{start:S.start.presentation,end:S.end.presentation},dts:{start:S.start.decode,end:S.end.decode}};f({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:x}),n(S)},onAudioSegmentTimingInfo:S=>{const x={pts:{start:S.start.pts,end:S.end.pts},dts:{start:S.start.dts,end:S.end.dts}};f({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:x}),a(S)},onId3:(S,x)=>{s(r,S,x)},onCaptions:S=>{o(r,[S])},isEndOfTimeline:l,onEndedTimeline:()=>{u()},onTransmuxerLog:d,onDone:(S,x)=>{h&&(S.type=S.type==="combined"?"video":S.type,f({type:"segmenttransmuxingcomplete",segment:r}),h(x,r,S))},segment:r,triggerSegmentEventFn:f});_p({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:S=>{r.bytes=e=S.data;const x=S.result;x&&(t(r,{hasAudio:x.hasAudio,hasVideo:x.hasVideo,isMuxed:v}),t=null),b()}})},V8=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{let p=new Uint8Array(e);if(kee(p)){r.isFmp4=!0;const{tracks:v}=r.map,g={isFmp4:!0,hasVideo:!!v.video,hasAudio:!!v.audio};v.audio&&v.audio.codec&&v.audio.codec!=="enca"&&(g.audioCodec=v.audio.codec),v.video&&v.video.codec&&v.video.codec!=="encv"&&(g.videoCodec=v.video.codec),v.video&&v.audio&&(g.isMuxed=!0),t(r,g);const m=(y,_)=>{c(r,{data:p,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),_&&_.length&&s(r,_),y&&y.length&&o(r,y),h(null,r,{})};_p({action:"probeMp4StartTime",timescales:r.map.timescales,data:p,transmuxer:r.transmuxer,callback:({data:y,startTime:_})=>{e=y.buffer,r.bytes=p=y,g.hasAudio&&!g.isMuxed&&i(r,"audio","start",_),g.hasVideo&&i(r,"video","start",_),_p({action:"probeEmsgID3",data:p,transmuxer:r.transmuxer,offset:_,callback:({emsgData:b,id3Frames:S})=>{if(e=b.buffer,r.bytes=p=b,!v.video||!b.byteLength||!r.transmuxer){m(void 0,S);return}_p({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:p,timescales:r.map.timescales,trackIds:[v.video.id],callback:x=>{e=x.data.buffer,r.bytes=p=x.data,x.logs.forEach(function(C){d(It(C,{stream:"mp4CaptionParser"}))}),m(x.captions,S)}})}})}});return}if(!r.transmuxer){h(null,r,{});return}if(typeof r.container>"u"&&(r.container=OC(p)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),h(null,r,{});return}uie({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})},z8=function({id:r,key:e,encryptedBytes:t,decryptionWorker:i,segment:n,doneFn:a},s){const o=u=>{if(u.data.source===r){i.removeEventListener("message",o);const c=u.data.decrypted;s(new Uint8Array(c.bytes,c.byteOffset,c.byteLength))}};i.onerror=()=>{const u="An error occurred in the decryption worker",c=au({segment:n}),h={message:u,metadata:{error:new Error(u),errorType:K.Error.StreamingFailedToDecryptSegment,segmentInfo:c,keyInfo:{uri:n.key.resolvedUri||n.map.key.resolvedUri}}};a(h,n)},i.addEventListener("message",o);let l;e.bytes.slice?l=e.bytes.slice():l=new Uint32Array(Array.prototype.slice.call(e.bytes)),i.postMessage(A8({source:r,encrypted:t,key:l,iv:e.iv}),[t.buffer,l.buffer])},cie=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{f({type:"segmentdecryptionstart"}),z8({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:h},p=>{e.bytes=p,f({type:"segmentdecryptioncomplete",segment:e}),V8({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})})},hie=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})=>{let p=0,v=!1;return(g,m)=>{if(!v){if(g)return v=!0,Yx(r),h(g,m);if(p+=1,p===r.length){const y=function(){if(m.encryptedBytes)return cie({decryptionWorker:e,segment:m,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f});V8({segment:m,bytes:m.bytes,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:f})};if(m.endOfAllRequests=Date.now(),m.map&&m.map.encryptedBytes&&!m.map.bytes)return f({type:"segmentdecryptionstart",segment:m}),z8({decryptionWorker:e,id:m.requestId+"-init",encryptedBytes:m.map.encryptedBytes,key:m.map.key,segment:m,doneFn:h},_=>{m.map.bytes=_,f({type:"segmentdecryptioncomplete",segment:m}),U8(m,b=>{if(b)return Yx(r),h(b,m);y()})});y()}}}},fie=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},die=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c})=>h=>{if(!h.target.aborted)return r.stats=It(r.stats,sie(h)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(h,r)},pie=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:i,abortFn:n,progressFn:a,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:f,dataFn:p,doneFn:v,onTransmuxerLog:g,triggerSegmentEventFn:m})=>{const y=[],_=hie({activeXhrs:y,decryptionWorker:t,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:f,dataFn:p,doneFn:v,onTransmuxerLog:g,triggerSegmentEventFn:m});if(i.key&&!i.key.bytes){const D=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&D.push(i.map.key);const I=It(e,{uri:i.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),M=fM(i,D,_,m),L={uri:i.key.resolvedUri};m({type:"segmentkeyloadstart",segment:i,keyInfo:L});const N=r(I,M);y.push(N)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){const N=It(e,{uri:i.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),O=fM(i,[i.map.key],_,m),B={uri:i.map.key.resolvedUri};m({type:"segmentkeyloadstart",segment:i,keyInfo:B});const F=r(N,O);y.push(F)}const I=It(e,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:jx(i.map),requestType:"segment-media-initialization"}),M=oie({segment:i,finishProcessingFn:_,triggerSegmentEventFn:m});m({type:"segmentloadstart",segment:i});const L=r(I,M);y.push(L)}const b=It(e,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:jx(i),requestType:"segment"}),S=lie({segment:i,finishProcessingFn:_,responseType:b.responseType,triggerSegmentEventFn:m});m({type:"segmentloadstart",segment:i});const x=r(b,S);x.addEventListener("progress",die({segment:i,progressFn:a,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:f,dataFn:p})),y.push(x);const C={};return y.forEach(D=>{D.addEventListener("loadend",fie({loadendState:C,abortFn:n}))}),()=>Yx(y)},vie=Kn("CodecUtils"),gie=function(r){const e=r.attributes||{};if(e.CODECS)return ka(e.CODECS)},G8=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},mie=(r,e)=>{if(!G8(r,e))return!0;const t=e.attributes||{},i=r.mediaGroups.AUDIO[t.AUDIO];for(const n in i)if(!i[n].uri&&!i[n].playlists)return!0;return!1},s0=function(r){const e={};return r.forEach(({mediaType:t,type:i,details:n})=>{e[t]=e[t]||[],e[t].push(K5(`${i}${n}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){vie(`multiple ${t} codecs found as attributes: ${e[t].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[t]=null;return}e[t]=e[t][0]}),e},dM=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},bp=function(r,e){const t=e.attributes||{},i=s0(gie(e)||[]);if(G8(r,e)&&!i.audio&&!mie(r,e)){const n=s0(OQ(r,t.AUDIO)||[]);n.audio&&(i.audio=n.audio)}return i},Wg=Kn("PlaylistSelector"),pM=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},o0=function(r,e){if(!r)return"";const t=H.getComputedStyle(r);return t?t[e]:""},Ch=function(r,e){const t=r.slice();r.sort(function(i,n){const a=e(i,n);return a===0?t.indexOf(i)-t.indexOf(n):a})},mA=function(r,e){let t,i;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||H.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||H.Number.MAX_VALUE,t-i},yie=function(r,e){let t,i;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||H.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||H.Number.MAX_VALUE,t===i&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-i};let H8=function(r,e,t,i,n,a){if(!r)return;const s={bandwidth:e,width:t,height:i,limitRenditionByPlayerDimensions:n};let o=r.playlists;Vi.isAudioOnly(r)&&(o=a.getAudioTrackPlaylists_(),s.audioOnly=!0);let l=o.map(S=>{let x;const C=S.attributes&&S.attributes.RESOLUTION&&S.attributes.RESOLUTION.width,D=S.attributes&&S.attributes.RESOLUTION&&S.attributes.RESOLUTION.height;return x=S.attributes&&S.attributes.BANDWIDTH,x=x||H.Number.MAX_VALUE,{bandwidth:x,width:C,height:D,playlist:S}});Ch(l,(S,x)=>S.bandwidth-x.bandwidth),l=l.filter(S=>!Vi.isIncompatible(S.playlist));let u=l.filter(S=>Vi.isEnabled(S.playlist));u.length||(u=l.filter(S=>!Vi.isDisabled(S.playlist)));const c=u.filter(S=>S.bandwidth*Fr.BANDWIDTH_VARIANCE<e);let h=c[c.length-1];const d=c.filter(S=>S.bandwidth===h.bandwidth)[0];if(n===!1){const S=d||u[0]||l[0];if(S&&S.playlist){let x="sortedPlaylistReps";return d&&(x="bandwidthBestRep"),u[0]&&(x="enabledPlaylistReps"),Wg(`choosing ${pM(S)} using ${x} with options`,s),S.playlist}return Wg("could not choose a playlist with options",s),null}const f=c.filter(S=>S.width&&S.height);Ch(f,(S,x)=>S.width-x.width);const p=f.filter(S=>S.width===t&&S.height===i);h=p[p.length-1];const v=p.filter(S=>S.bandwidth===h.bandwidth)[0];let g,m,y;v||(g=f.filter(S=>S.width>t||S.height>i),m=g.filter(S=>S.width===g[0].width&&S.height===g[0].height),h=m[m.length-1],y=m.filter(S=>S.bandwidth===h.bandwidth)[0]);let _;if(a.leastPixelDiffSelector){const S=f.map(x=>(x.pixelDiff=Math.abs(x.width-t)+Math.abs(x.height-i),x));Ch(S,(x,C)=>x.pixelDiff===C.pixelDiff?C.bandwidth-x.bandwidth:x.pixelDiff-C.pixelDiff),_=S[0]}const b=_||y||v||d||u[0]||l[0];if(b&&b.playlist){let S="sortedPlaylistReps";return _?S="leastPixelDiffRep":y?S="resolutionPlusOneRep":v?S="resolutionBestRep":d?S="bandwidthBestRep":u[0]&&(S="enabledPlaylistReps"),Wg(`choosing ${pM(b)} using ${S} with options`,s),b.playlist}return Wg("could not choose a playlist with options",s),null};const vM=function(){let r=this.useDevicePixelRatio&&H.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),H8(this.playlists.main,this.systemBandwidth,parseInt(o0(this.tech_.el(),"width"),10)*r,parseInt(o0(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.playlistController_)},_ie=function(r){let e=-1,t=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let i=this.useDevicePixelRatio&&H.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(i=this.customPixelRatio),e<0&&(e=this.systemBandwidth,t=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==t&&(e=r*this.systemBandwidth+(1-r)*e,t=this.systemBandwidth),H8(this.playlists.main,e,parseInt(o0(this.tech_.el(),"width"),10)*i,parseInt(o0(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.playlistController_)}},bie=function(r){const{main:e,currentTime:t,bandwidth:i,duration:n,segmentDuration:a,timeUntilRebuffer:s,currentTimeline:o,syncController:l}=r,u=e.playlists.filter(p=>!Vi.isIncompatible(p));let c=u.filter(Vi.isEnabled);c.length||(c=u.filter(p=>!Vi.isDisabled(p)));const d=c.filter(Vi.hasAttribute.bind(null,"BANDWIDTH")).map(p=>{const g=l.getSyncPoint(p,n,o,t)?1:2,y=Vi.estimateSegmentRequestTime(a,i,p)*g-s;return{playlist:p,rebufferingImpact:y}}),f=d.filter(p=>p.rebufferingImpact<=0);return Ch(f,(p,v)=>mA(v.playlist,p.playlist)),f.length?f[0]:(Ch(d,(p,v)=>p.rebufferingImpact-v.rebufferingImpact),d[0]||null)},Tie=function(){const r=this.playlists.main.playlists.filter(Vi.isEnabled);return Ch(r,(t,i)=>mA(t,i)),r.filter(t=>!!bp(this.playlists.main,t).video)[0]||null},Sie=r=>{let e=0,t;return r.bytes&&(t=new Uint8Array(r.bytes),r.segments.forEach(i=>{t.set(i,e),e+=i.byteLength})),t};function $8(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const xie=function(r,e,t){if(!r[t]){e.trigger({type:"usage",name:"vhs-608"});let i=t;/^cc708_/.test(t)&&(i="SERVICE"+t.split("_")[1]);const n=e.textTracks().getTrackById(i);if(n)r[t]=n;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let s=t,o=t,l=!1;const u=a[i];u&&(s=u.label,o=u.language,l=u.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:i,default:l,label:s,language:o},!1).track}}},wie=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){if(!e)return;const i=H.WebKitDataCue||H.VTTCue;e.forEach(n=>{const a=n.stream;n.content?n.content.forEach(s=>{const o=new i(n.startTime+t,n.endTime+t,s.text);o.line=s.line,o.align="left",o.position=s.position,o.positionAlign="line-left",r[a].addCue(o)}):r[a].addCue(new i(n.startTime+t,n.endTime+t,n.text))})},Cie=function(r){Object.defineProperties(r.frame,{id:{get(){return K.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return K.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return K.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},Aie=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:i})=>{if(!e)return;const n=H.WebKitDataCue||H.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(c=>{const h=c.cueTime+t;typeof h!="number"||H.isNaN(h)||h<0||!(h<1/0)||!c.frames||!c.frames.length||c.frames.forEach(d=>{const f=new n(h,h,d.value||d.url||d.data||"");f.frame=d,f.value=d,Cie(f),a.addCue(f)})}),!a.cues||!a.cues.length))return;const s=a.cues,o=[];for(let c=0;c<s.length;c++)s[c]&&o.push(s[c]);const l=o.reduce((c,h)=>{const d=c[h.startTime]||[];return d.push(h),c[h.startTime]=d,c},{}),u=Object.keys(l).sort((c,h)=>Number(c)-Number(h));u.forEach((c,h)=>{const d=l[c],f=isFinite(i)?i:c,p=Number(u[h+1])||f;d.forEach(v=>{v.endTime=p})})},Die={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Eie=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Iie=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const i=H.WebKitDataCue||H.VTTCue;e.forEach(n=>{for(const a of Object.keys(n)){if(Eie.has(a))continue;const s=new i(n.startTime,n.endTime,"");s.id=n.id,s.type="com.apple.quicktime.HLS",s.value={key:Die[a],data:n[a]},(a==="scte35Out"||a==="scte35In")&&(s.value.data=new Uint8Array(s.value.data.match(/[\da-f]{2}/gi)).buffer),t.addCue(s)}n.processDateRange()})},gM=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,K.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},jd=function(r,e,t){let i,n;if(t&&t.cues)for(i=t.cues.length;i--;)n=t.cues[i],n.startTime>=r&&n.endTime<=e&&t.removeCue(n)},Pie=function(r){const e=r.cues;if(!e)return;const t={};for(let i=e.length-1;i>=0;i--){const n=e[i],a=`${n.startTime}-${n.endTime}-${n.text}`;t[a]?r.removeCue(n):t[a]=n}},Mie=(r,e,t)=>{if(typeof e>"u"||e===null||!r.length)return[];const i=Math.ceil((e-t+3)*du.ONE_SECOND_IN_TS);let n;for(n=0;n<r.length&&!(r[n].pts>i);n++);return r.slice(n)},Lie=(r,e,t)=>{if(!e.length)return r;if(t)return e.slice();const i=e[0].pts;let n=0;for(n;n<r.length&&!(r[n].pts>=i);n++);return r.slice(0,n).concat(e)},kie=(r,e,t,i)=>{const n=Math.ceil((e-i)*du.ONE_SECOND_IN_TS),a=Math.ceil((t-i)*du.ONE_SECOND_IN_TS),s=r.slice();let o=r.length;for(;o--&&!(r[o].pts<=a););if(o===-1)return s;let l=o+1;for(;l--&&!(r[l].pts<=n););return l=Math.max(l,0),s.splice(l,o-l+1),s},Rie=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const t=Object.keys(r).sort(),i=Object.keys(e).sort();if(t.length!==i.length)return!1;for(let n=0;n<t.length;n++){const a=t[n];if(a!==i[n]||r[a]!==e[a])return!1}return!0},Oie=function(r,e,t){e=e||[];const i=[];let n=0;for(let a=0;a<e.length;a++){const s=e[a];if(r===s.timeline&&(i.push(a),n+=s.duration,n>t))return a}return i.length===0?0:i[i.length-1]},cd=1,Nie=500,mM=r=>typeof r=="number"&&isFinite(r),qg=1/60,Bie=(r,e,t)=>r!=="main"||!e||!t?null:!t.hasAudio&&!t.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!t.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&t.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,Fie=(r,e,t)=>{let i=e-Fr.BACK_BUFFER_LENGTH;r.length&&(i=Math.max(i,r.start(0)));const n=e-t;return Math.min(n,i)},Pc=r=>{const{startOfSegment:e,duration:t,segment:i,part:n,playlist:{mediaSequence:a,id:s,segments:o=[]},mediaIndex:l,partIndex:u,timeline:c}=r,h=o.length-1;let d="mediaIndex/partIndex increment";r.getMediaInfoForTime?d=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(d="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(d+=` with independent ${r.independent}`);const f=typeof u=="number",p=r.segment.uri?"segment":"pre-segment",v=f?c8({preloadSegment:i})-1:0;return`${p} [${a+l}/${a+h}]`+(f?` part [${u}/${v}]`:"")+` segment start/end [${i.start} => ${i.end}]`+(f?` part start/end [${n.start} => ${n.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${c}] selected by [${d}] playlist [${s}]`},yM=r=>`${r}TimingInfo`,Uie=({segmentTimeline:r,currentTimeline:e,startOfSegment:t,buffered:i,overrideCheck:n})=>!n&&r===e?null:r<e?t:i.length?i.end(i.length-1):t,Kx=({timelineChangeController:r,currentTimeline:e,segmentTimeline:t,loaderType:i,audioDisabled:n})=>{if(e===t)return!1;if(i==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==t}if(i==="main"&&n){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===t)}return!1},Vie=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),t=r.pendingTimelineChange({type:"main"}),i=e&&t,n=i&&e.to!==t.to;return!!(i&&e.from!==-1&&t.from!==-1&&n)},zie=r=>{r&&(r.pause(),r.resetEverything(),r.load())},Gie=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},co=r=>{const e=r.pendingSegment_;if(!e)return;if(Kx({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&Vie(r.timelineChangeController_)){if(Gie(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}zie(r)}},Hie=r=>{let e=0;return["video","audio"].forEach(function(t){const i=r[`${t}TimingInfo`];if(!i)return;const{start:n,end:a}=i;let s;typeof n=="bigint"||typeof a=="bigint"?s=H.BigInt(a)-H.BigInt(n):typeof n=="number"&&typeof a=="number"&&(s=a-n),typeof s<"u"&&s>e&&(e=s)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},_M=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+za:!1,$ie=(r,e)=>{if(e!=="hls")return null;const t=Hie({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const i=r.playlist.targetDuration,n=_M({segmentDuration:t,maxDuration:i*2}),a=_M({segmentDuration:t,maxDuration:i}),s=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${t} when the reported duration is ${r.duration} and the target duration is ${i}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||a?{severity:n?"warn":"info",message:s}:null},au=({type:r,segment:e})=>{if(!e)return;const t=!!(e.key||e.map&&e.map.ke),i=!!(e.map&&!e.map.bytes),n=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:n,duration:e.duration,isEncrypted:t,isMediaInitialization:i}};class Zx extends K.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Kn(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(i){i!==this.state_&&(this.logger_(`${this.state_} -> ${i}`),this.state_=i,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)}),this.sourceUpdater_.on("codecschange",i=>{this.trigger(ar({type:"codecschange"},i))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",i=>{this.trigger(ar({type:"timelinechange"},i)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():co(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Ab.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&H.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,H.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Ab.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Kr();if(this.loaderType_==="main"){const{hasAudio:t,hasVideo:i,isMuxed:n}=e;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=a0(e);let n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e}segmentKey(e,t=!1){if(!e)return null;const i=D8(e);let n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});const a={resolvedUri:(n||e).resolvedUri};return n&&(a.bytes=n.bytes),a}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let a=null;if(i&&(i.id?a=i.id:i.uri&&(a=i.uri)),this.logger_(`playlist update [${a} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
currentTime: ${this.currentTime_()}
bufferedEnd: ${wb(this.buffered_())}
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const s=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${s}]`),this.mediaIndex!==null)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){const l=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=l}}n&&(n.mediaIndex-=s,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(H.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Ab.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=()=>{},n=!1){if(t===1/0&&(t=this.duration_()),t<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let a=1;const s=()=>{a--,a===0&&i()};(n||!this.audioDisabled_)&&(a++,this.sourceUpdater_.removeAudio(e,t,s)),(n||this.loaderType_==="main")&&(this.gopBuffer_=kie(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,s));for(const o in this.inbandTextTracks_)jd(e,t,this.inbandTextTracks_[o]);jd(e,t,this.segmentMetadataTrack_),s()}monitorBuffer_(){this.checkBufferTimeout_&&H.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=H.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&H.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=H.setTimeout(this.monitorBufferTick_.bind(this),Nie)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:au({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const n=typeof e=="number"&&t.segments[e],a=e+1===t.segments.length,s=!n||!n.parts||i+1===n.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&a&&s}chooseNextRequest_(){const e=this.buffered_(),t=wb(e)||0,i=fA(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,a=i>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||n||a)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(o.isSyncRequest)o.mediaIndex=Oie(this.currentTimeline_,s,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${o.mediaIndex}`);else if(this.mediaIndex!==null){const d=s[this.mediaIndex],f=typeof this.partIndex=="number"?this.partIndex:-1;o.startOfSegment=d.end?d.end:t,d.parts&&d.parts[f+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=f+1):o.mediaIndex=this.mediaIndex+1}else{let d,f,p;const v=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${v}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${t}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const g=this.getSyncInfoFromMediaSequenceSync_(v);if(!g){const m="No sync info found while using media sequence sync";return this.error({message:m,metadata:{errorType:K.Error.StreamingFailedToSelectNextSegment,error:new Error(m)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${g.start} --> ${g.end})`),d=g.segmentIndex,f=g.partIndex,p=g.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const g=Vi.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:v,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});d=g.segmentIndex,f=g.partIndex,p=g.startTime}o.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${v}`:`currentTime ${v}`,o.mediaIndex=d,o.startOfSegment=p,o.partIndex=f,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${o.mediaIndex} `)}const l=s[o.mediaIndex];let u=l&&typeof o.partIndex=="number"&&l.parts&&l.parts[o.partIndex];if(!l||typeof o.partIndex=="number"&&!u)return null;typeof o.partIndex!="number"&&l.parts&&(o.partIndex=0,u=l.parts[0]);const c=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&u&&!c&&!u.independent)if(o.partIndex===0){const d=s[o.mediaIndex-1],f=d.parts&&d.parts.length&&d.parts[d.parts.length-1];f&&f.independent&&(o.mediaIndex-=1,o.partIndex=d.parts.length-1,o.independent="previous segment")}else l.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");const h=this.mediaSource_&&this.mediaSource_.readyState==="ended";return o.mediaIndex>=s.length-1&&h&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,o.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(o))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const n=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return n?(n.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),n):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:n,startOfSegment:a,isSyncRequest:s,partIndex:o,forceTimestampOffset:l,getMediaInfoForTime:u}=e,c=i.segments[n],h=typeof o=="number"&&c.parts[o],d={requestId:"segment-loader-"+Math.random(),uri:h&&h.resolvedUri||c.resolvedUri,mediaIndex:n,partIndex:h?o:null,isSyncRequest:s,startOfSegment:a,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:c.timeline,duration:h&&h.duration||c.duration,segment:c,part:h,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},f=typeof l<"u"?l:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:c.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:f});const p=wb(this.sourceUpdater_.audioBuffered());return typeof p=="number"&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=Mie(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d}timestampOffsetForSegment_(e){return Uie(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,a=Vi.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),s=lre(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=s)return;const o=bie({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o)return;const u=a-s-o.rebufferingImpact;let c=.5;s<=za&&(c=1),!(!o.playlist||o.playlist.uri===this.playlist_.uri||u<c)&&(this.bandwidth=o.playlist.attributes.BANDWIDTH*Fr.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Pc(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:n}=t,a={segmentInfo:au({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:n}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:a}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(t)||(t=t||{},Rie(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this))))}handleTimingInfo_(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,s=yM(t);a[s]=a[s]||{},a[s][i]=n,this.logger_(`timinginfo: ${t} - ${i} - ${n}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():co(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(t.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));return}const n=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach(s=>{a[s.stream]=a[s.stream]||{startTime:1/0,captions:[],endTime:0};const o=a[s.stream];o.startTime=Math.min(o.startTime,s.startTime+n),o.endTime=Math.max(o.endTime,s.endTime+n),o.captions.push(s)}),Object.keys(a).forEach(s=>{const{startTime:o,endTime:l,captions:u}=a[s],c=this.inbandTextTracks_;this.logger_(`adding cues from ${o} -> ${l} for ${s}`),xie(c,this.vhs_.tech_,s),jd(o,l,c[s]),wie({captionArray:u,inbandTextTracks:c,timestampOffset:n})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i));return}this.addMetadataToTextTrack(i,t,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(t=>t())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(t=>t())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!Kx({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:n,isMuxed:a}=t;return!(n&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!a&&!e.audioTimingInfo||Kx({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){co(this),this.callQueue_.push(this.handleData_.bind(this,e,t));return}const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[yM(t.type)].start;else{const n=this.getCurrentMediaInfo_(),a=this.loaderType_==="main"&&n&&n.hasVideo;let s;a&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:this.loaderType_==="main"});const n=this.chooseNextRequest_();if(n.mediaIndex!==i.mediaIndex||n.partIndex!==i.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:n}){if(i){const a=a0(i);if(this.activeInitSegmentId_===a)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=a}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=n,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},n){const a=this.sourceUpdater_.audioBuffered(),s=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+pu(a).join(", ")),s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+pu(s).join(", "));const o=a.length?a.start(0):0,l=a.length?a.end(a.length-1):0,u=s.length?s.start(0):0,c=s.length?s.end(s.length-1):0;if(l-o<=cd&&c-u<=cd){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${pu(a).join(", ")}, video buffer: ${pu(s).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const d=this.currentTime_()-cd;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${cd}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=H.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},cd*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},n){if(n){if(n.code===T8){this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:K.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:n,bytes:a}){if(!a){const o=[n];let l=n.byteLength;i&&(o.unshift(i),l+=i.byteLength),a=Sie({bytes:l,segments:o})}const s={segmentInfo:au({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:s}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:a}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,a=`${e}TimingInfo`;n[a]||(n[a]={}),n[a].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[a].transmuxedPresentationStart=i.start.presentation,n[a].transmuxedDecodeStart=i.start.decode,n[a].transmuxedPresentationEnd=i.end.presentation,n[a].transmuxedDecodeEnd=i.end.decode,n[a].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:n}=t;if(!n||!n.byteLength||i==="audio"&&this.audioDisabled_)return;const a=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:a,data:n})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){co(this),this.loadQueue_.push(()=>{const t=ar({},e,{forceTimestampOffset:!0});ar(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),n=this.mediaIndex!==null,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=i||n&&a;this.logger_(`Requesting
${$8(e.uri)}
${Pc(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=pie({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:o,level:l,stream:u})=>{this.logger_(`${Pc(e)} logged from transmuxer stream ${u} as a ${l}: ${o}`)},triggerSegmentEventFn:({type:o,segment:l,keyInfo:u,trackInfo:c,timingInfo:h})=>{const f={segmentInfo:au({segment:l})};u&&(f.keyInfo=u),c&&(f.trackInfo=c),h&&(f.timingInfo=h),this.trigger({type:o,metadata:f})}})}trimBackBuffer_(e){const t=Fie(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,n=e.segment.key||e.segment.map&&e.segment.map.key,a=e.segment.map&&!e.segment.map.bytes,s={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:n,isMediaInitialization:a},o=e.playlist.segments[e.mediaIndex-1];if(o&&o.timeline===t.timeline&&(o.videoTimingInfo?s.baseStartTime=o.videoTimingInfo.transmuxedDecodeEnd:o.audioTimingInfo&&(s.baseStartTime=o.audioTimingInfo.transmuxedDecodeEnd)),t.key){const l=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=l}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<qg){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${qg}`);return}const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_||t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Ha.ABORTED)return;if(this.pause(),e.code===Ha.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=Lie(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);t!==null&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:n,currentVideoTimestampOffset:a,useVideoTimingInfo:s,videoTimingInfo:o,audioTimingInfo:l}){if(typeof e<"u")return e;if(!s)return l.start;const u=t.segments[i-1];return i===0||!u||typeof u.start>"u"||u.end!==n+a?n:o.start}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:i,hasVideo:n,isMuxed:a}=t,s=this.loaderType_==="main"&&n,o=!this.audioDisabled_&&i&&!a;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}s&&e.waitingOnAppends++,o&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=Bie(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),n=this.loaderType_==="main"&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end=typeof n.end=="number"?n.end:n.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const l={segmentInfo:au({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:l})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const t=$ie(e,this.sourceType_);if(t&&(t.severity==="warn"?K.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${Pc(e)}`);return}this.logger_(`Appended ${Pc(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,n=e.part,a=i.end&&this.currentTime_()-i.end>e.playlist.targetDuration*3,s=n&&n.end&&this.currentTime_()-n.end>e.playlist.partTargetDuration*3;if(a||s){this.logger_(`bad ${a?"segment":"part"} ${Pc(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<qg){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${qg}`);return}const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,n=t.end;if(!mM(i)||!mM(n))return;jd(i,n,this.segmentMetadataTrack_);const a=H.WebKitDataCue||H.VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},o=JSON.stringify(s),l=new a(i,n,o);l.value=s,this.segmentMetadataTrack_.addCue(l)}}function As(){}const W8=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},Wie=["video","audio"],Qx=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},qie=(r,e)=>{for(let t=0;t<e.length;t++){const i=e[t];if(i.type==="mediaSource")return null;if(i.type===r)return t}return null},Ah=(r,e)=>{if(e.queue.length===0)return;let t=0,i=e.queue[t];if(i.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),i.action(e),i.doneFn&&i.doneFn(),Ah("audio",e),Ah("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Qx(r,e))){if(i.type!==r){if(t=qie(r,e.queue),t===null)return;i=e.queue[t]}if(e.queue.splice(t,1),e.queuePending[r]=i,i.action(r,e),!i.doneFn){e.queuePending[r]=null,Ah(r,e);return}}},q8=(r,e)=>{const t=e[`${r}Buffer`],i=W8(r);t&&(t.removeEventListener("updateend",e[`on${i}UpdateEnd_`]),t.removeEventListener("error",e[`on${i}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},Na=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,rn={appendBuffer:(r,e,t)=>(i,n)=>{const a=n[`${i}Buffer`];if(Na(n.mediaSource,a)){n.logger_(`Appending segment ${e.mediaIndex}'s ${r.length} bytes to ${i}Buffer`);try{a.appendBuffer(r)}catch(s){n.logger_(`Error with code ${s.code} `+(s.code===T8?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${i}Buffer`),n.queuePending[i]=null,t(s)}}},remove:(r,e)=>(t,i)=>{const n=i[`${t}Buffer`];if(Na(i.mediaSource,n)){i.logger_(`Removing ${r} to ${e} from ${t}Buffer`);try{n.remove(r,e)}catch{i.logger_(`Remove ${r} to ${e} from ${t}Buffer failed`)}}},timestampOffset:r=>(e,t)=>{const i=t[`${e}Buffer`];Na(t.mediaSource,i)&&(t.logger_(`Setting ${e}timestampOffset to ${r}`),i.timestampOffset=r)},callback:r=>(e,t)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(t){K.log.warn("Failed to call media source endOfStream",t)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(t){K.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if(Na(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(i){K.log.warn(`Failed to abort on ${r}Buffer`,i)}}},addSourceBuffer:(r,e)=>t=>{const i=W8(r),n=Uh(e);t.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const a=t.mediaSource.addSourceBuffer(n);a.addEventListener("updateend",t[`on${i}UpdateEnd_`]),a.addEventListener("error",t[`on${i}Error_`]),t.codecs[r]=e,t[`${r}Buffer`]=a},removeSourceBuffer:r=>e=>{const t=e[`${r}Buffer`];if(q8(r,e),!!Na(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(i){K.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,i)}}},changeType:r=>(e,t)=>{const i=t[`${e}Buffer`],n=Uh(r);if(!Na(t.mediaSource,i))return;const a=r.substring(0,r.indexOf(".")),s=t.codecs[e];if(s.substring(0,s.indexOf("."))===a)return;const l={codecsChangeInfo:{from:s,to:r}};t.trigger({type:"codecschange",metadata:l}),t.logger_(`changing ${e}Buffer codec from ${s} to ${r}`);try{i.changeType(n),t.codecs[e]=r}catch(u){l.errorType=K.Error.StreamingCodecsChangeError,l.error=u,u.metadata=l,t.error_=u,t.trigger("error"),K.log.warn(`Failed to changeType on ${e}Buffer`,u)}}},nn=({type:r,sourceUpdater:e,action:t,doneFn:i,name:n})=>{e.queue.push({type:r,action:t,doneFn:i,name:n}),Ah(r,e)},bM=(r,e)=>t=>{const i=e[`${r}Buffered`](),n=are(i);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,n),e.queuePending[r]){const a=e.queuePending[r].doneFn;e.queuePending[r]=null,a&&a(e[`${r}Error_`])}Ah(r,e)};class j8 extends K.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Ah("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Kn("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=bM("video",this),this.onAudioUpdateEnd_=bM("audio",this),this.onVideoError_=t=>{this.videoError_=t},this.onAudioError_=t=>{this.audioError_=t},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){nn({type:"mediaSource",sourceUpdater:this,action:rn.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){nn({type:e,sourceUpdater:this,action:rn.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){K.log.error("removeSourceBuffer is not supported!");return}nn({type:"mediaSource",sourceUpdater:this,action:rn.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!K.browser.IS_FIREFOX&&H.MediaSource&&H.MediaSource.prototype&&typeof H.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return H.SourceBuffer&&H.SourceBuffer.prototype&&typeof H.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){K.log.error("changeType is not supported!");return}nn({type:e,sourceUpdater:this,action:rn.changeType(t),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:n,bytes:a}=e;if(this.processedAppend_=!0,n==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${a.length} until video append`);return}const s=t;if(nn({type:n,sourceUpdater:this,action:rn.appendBuffer(a,i||{mediaIndex:-1},s),doneFn:t,name:"appendBuffer"}),n==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const o=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${o.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,o.forEach(l=>{this.appendBuffer.apply(this,l)})}}audioBuffered(){return Na(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Kr()}videoBuffered(){return Na(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Kr()}buffered(){const e=Na(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Na(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():ore(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=As){nn({type:"mediaSource",sourceUpdater:this,action:rn.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=As){typeof e!="string"&&(e=void 0),nn({type:"mediaSource",sourceUpdater:this,action:rn.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=As){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){i();return}nn({type:"audio",sourceUpdater:this,action:rn.remove(e,t),doneFn:i,name:"remove"})}removeVideo(e,t,i=As){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){i();return}nn({type:"video",sourceUpdater:this,action:rn.remove(e,t),doneFn:i,name:"remove"})}updating(){return!!(Qx("audio",this)||Qx("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(nn({type:"audio",sourceUpdater:this,action:rn.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(nn({type:"video",sourceUpdater:this,action:rn.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&nn({type:"audio",sourceUpdater:this,action:rn.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&nn({type:"video",sourceUpdater:this,action:rn.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),Wie.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>q8(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const TM=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),jie=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},SM=new Uint8Array(`
`.split("").map(r=>r.charCodeAt(0)));class Xie extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class Yie extends Zx{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Kr();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Kr([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=a0(e);let n=this.initSegments_[i];if(t&&!n&&e.bytes){const a=SM.byteLength+e.bytes.byteLength,s=new Uint8Array(a);s.set(e.bytes),s.set(SM,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return n||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,t){jd(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const t=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",t),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Ha.TIMEOUT&&this.handleTimeout_(),e.code===Ha.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const a=n.segment;if(a.map&&(a.map.bytes=t.map.bytes),n.bytes=t.bytes,typeof H.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js"}));return}a.requested=!0;try{this.parseVTTCues_(n)}catch(s){this.stopForError({message:s.message,metadata:{errorType:K.Error.StreamingVttParserError,error:s}});return}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,n.cues.forEach(s=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new H.VTTCue(s.startTime,s.endTime,s.text):s)}),Pie(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;if(typeof H.WebVTT!="function")throw new Xie;typeof H.TextDecoder=="function"?t=new H.TextDecoder("utf8"):(t=H.WebVTT.StringDecoder(),i=!0);const n=new H.WebVTT.Parser(H,H.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=s=>{e.timestampmap=s},n.onparsingerror=s=>{K.log.warn("Error encountered when parsing cues: "+s.message)},e.segment.map){let s=e.segment.map.bytes;i&&(s=TM(s)),n.parse(s)}let a=e.bytes;i&&(a=TM(a)),n.parse(a),n.flush()}updateTimeMapping_(e,t,i){const n=e.segment;if(!t)return;if(!e.cues.length){n.empty=!0;return}const{MPEGTS:a,LOCAL:s}=e.timestampmap,l=a/du.ONE_SECOND_IN_TS-s+t.mapping;if(e.cues.forEach(u=>{const c=u.endTime-u.startTime,h=this.handleRollover_(u.startTime+l,t.time);u.startTime=Math.max(h,0),u.endTime=Math.max(h+c,0)}),!i.syncInfo){const u=e.cues[0].startTime,c=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(u,c-n.duration)}}}handleRollover_(e,t){if(t===null)return e;let i=e*du.ONE_SECOND_IN_TS;const n=t*du.ONE_SECOND_IN_TS;let a;for(n<i?a=-8589934592:a=8589934592;Math.abs(i-n)>4294967296;)i+=a;return i/du.ONE_SECOND_IN_TS}}const Kie=function(r,e){const t=r.cues;for(let i=0;i<t.length;i++){const n=t[i];if(e>=n.adStartTime&&e<=n.adEndTime)return n}return null},Zie=function(r,e,t=0){if(!r.segments)return;let i=t,n;for(let a=0;a<r.segments.length;a++){const s=r.segments[a];if(n||(n=Kie(e,i+s.duration/2)),n){if("cueIn"in s){n.endTime=i,n.adEndTime=i,i+=s.duration,n=null;continue}if(i<n.endTime){i+=s.duration;continue}n.endTime+=s.duration}else if("cueOut"in s&&(n=new H.VTTCue(i,i+s.duration,s.cueOut),n.adStartTime=i,n.adEndTime=i+parseFloat(s.cueOut),e.addCue(n)),"cueOutCont"in s){const[o,l]=s.cueOutCont.split("/").map(parseFloat);n=new H.VTTCue(i,i+s.duration,""),n.adStartTime=i-o,n.adEndTime=n.adStartTime+l,e.addCue(n)}i+=s.duration}};class xM{constructor({start:e,end:t,segmentIndex:i,partIndex:n=null,appended:a=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=n,this.appended_=a}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class Qie{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class X8{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:i,segments:n}=e;if(this.isReliable_=this.isReliablePlaylist_(i,n),!!this.isReliable_)return this.updateStorage_(n,i,this.calculateBaseTime_(i,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const n of i)if(n.isInRange(e))return n}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const n=new Map;let a=`
`,s=i,o=t;this.start_=s,e.forEach((l,u)=>{const c=this.storage_.get(o),h=s,d=h+l.duration,f=!!(c&&c.segmentSyncInfo&&c.segmentSyncInfo.isAppended),p=new xM({start:h,end:d,appended:f,segmentIndex:u});l.syncInfo=p;let v=s;const g=(l.parts||[]).map((m,y)=>{const _=v,b=v+m.duration,S=!!(c&&c.partsSyncInfo&&c.partsSyncInfo[y]&&c.partsSyncInfo[y].isAppended),x=new xM({start:_,end:b,appended:S,segmentIndex:u,partIndex:y});return v=b,a+=`Media Sequence: ${o}.${y} | Range: ${_} --> ${b} | Appended: ${S}
`,m.syncInfo=x,x});n.set(o,new Qie(p,g)),a+=`${$8(l.resolvedUri)} | Media Sequence: ${o} | Range: ${h} --> ${d} | Appended: ${f}
`,o++,s=d}),this.end_=s,this.storage_=n,this.diagnostics_=a}calculateBaseTime_(e,t){return this.storage_.size?this.storage_.has(e)?this.storage_.get(e).segmentSyncInfo.start:t:0}isReliablePlaylist_(e,t){return e!=null&&Array.isArray(t)&&t.length}}class wM extends X8{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t){if(!this.storage_.size){const i=this.parent_.getSyncInfoForMediaSequence(e);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t)}}const Jie=86400,Db=[{name:"VOD",run:(r,e,t,i,n)=>t!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,t,i,n,a)=>{const s=r.getMediaSequenceSync(a);if(!s||!s.isReliable)return null;const o=s.getSyncInfoForTime(n);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:"ProgramDateTime",run:(r,e,t,i,n)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,s=null;const o=Gx(e);n=n||0;for(let l=0;l<o.length;l++){const u=e.endList||n===0?l:o.length-(l+1),c=o[u],h=c.segment,d=r.timelineToDatetimeMappings[h.timeline];if(!d||!h.dateTimeObject)continue;let p=h.dateTimeObject.getTime()/1e3+d;if(h.parts&&typeof c.partIndex=="number")for(let g=0;g<c.partIndex;g++)p+=h.parts[g].duration;const v=Math.abs(n-p);if(s!==null&&(v===0||s<v))break;s=v,a={time:p,segmentIndex:c.segmentIndex,partIndex:c.partIndex}}return a}},{name:"Segment",run:(r,e,t,i,n)=>{let a=null,s=null;n=n||0;const o=Gx(e);for(let l=0;l<o.length;l++){const u=e.endList||n===0?l:o.length-(l+1),c=o[u],h=c.segment,d=c.part&&c.part.start||h&&h.start;if(h.timeline===i&&typeof d<"u"){const f=Math.abs(n-d);if(s!==null&&s<f)break;(!a||s===null||s>=f)&&(s=f,a={time:d,segmentIndex:c.segmentIndex,partIndex:c.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,t,i,n)=>{let a=null;if(n=n||0,e.discontinuityStarts&&e.discontinuityStarts.length){let s=null;for(let o=0;o<e.discontinuityStarts.length;o++){const l=e.discontinuityStarts[o],u=e.discontinuitySequence+o+1,c=r.discontinuities[u];if(c){const h=Math.abs(n-c.time);if(s!==null&&s<h)break;(!a||s===null||s>=h)&&(s=h,a={time:c.time,segmentIndex:l,partIndex:null})}}}return a}},{name:"Playlist",run:(r,e,t,i,n)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class ene extends K.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new X8,i=new wM(t),n=new wM(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:n},this.logger_=Kn("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,n,a){if(t!==1/0)return Db.find(({name:l})=>l==="VOD").run(this,e,t);const s=this.runStrategies_(e,t,i,n,a);if(!s.length)return null;for(const o of s){const{syncPoint:l,strategy:u}=o,{segmentIndex:c,time:h}=l;if(c<0)continue;const d=e.segments[c],f=h,p=f+d.duration;if(this.logger_(`Strategy: ${u}. Current time: ${n}. selected segment: ${c}. Time: [${f} -> ${p}]}`),n>=f&&n<p)return this.logger_("Found sync point with exact match: ",l),l}return this.selectSyncPoint_(s,{key:"time",value:n})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+yp({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,n,a){const s=[];for(let o=0;o<Db.length;o++){const l=Db[o],u=l.run(this,e,t,i,n,a);u&&(u.strategy=l.name,s.push({strategy:l.name,syncPoint:u}))}return s}selectSyncPoint_(e,t){let i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),a=e[0].strategy;for(let s=1;s<e.length;s++){const o=Math.abs(e[s].syncPoint[t.key]-t.value);o<n&&(n=o,i=e[s].syncPoint,a=e[s].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${a}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(typeof i.partIndex=="number"?`,partIndex:${i.partIndex}`:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>Jie){K.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);return}for(let n=i-1;n>=0;n--){const a=e.segments[n];if(a&&typeof a.start<"u"){t.syncInfo={mediaSequence:e.mediaSequence+n,time:a.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),n=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:n.start}));const a=n.dateTimeObject;n.discontinuity&&t&&a&&(this.timelineToDatetimeMappings[n.timeline]=-(a.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const n=e.segment,a=e.part;let s=this.timelines[e.timeline],o,l;if(typeof e.timestampOffset=="number")s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${s.time}] [mapping: ${s.mapping}]`)),o=e.startOfSegment,l=t.end+s.mapping;else if(s)o=t.start+s.mapping,l=t.end+s.mapping;else return!1;return a&&(a.start=o,a.end=l),(!n.start||o<n.start)&&(n.start=o),n.end=l,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let n=0;n<t.discontinuityStarts.length;n++){const a=t.discontinuityStarts[n],s=t.discontinuitySequence+n+1,o=a-e.mediaIndex,l=Math.abs(o);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>l){let u;o<0?u=i.start-yp({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):u=i.end+yp({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[s]={time:u,accuracy:l}}}}dispose(){this.trigger("dispose"),this.off()}}class tne extends K.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return typeof t=="number"&&typeof i=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if(typeof t=="number"&&typeof i=="number"){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const n={timelineChangeInfo:{from:t,to:i}};this.trigger({type:"timelinechange",metadata:n})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const rne=k8(R8(function(){var r=function(){function v(){this.listeners={}}var g=v.prototype;return g.on=function(y,_){this.listeners[y]||(this.listeners[y]=[]),this.listeners[y].push(_)},g.off=function(y,_){if(!this.listeners[y])return!1;var b=this.listeners[y].indexOf(_);return this.listeners[y]=this.listeners[y].slice(0),this.listeners[y].splice(b,1),b>-1},g.trigger=function(y){var _=this.listeners[y];if(_)if(arguments.length===2)for(var b=_.length,S=0;S<b;++S)_[S].call(this,arguments[1]);else for(var x=Array.prototype.slice.call(arguments,1),C=_.length,D=0;D<C;++D)_[D].apply(this,x)},g.dispose=function(){this.listeners={}},g.pipe=function(y){this.on("data",function(_){y.push(_)})},v}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(v){return v.subarray(0,v.byteLength-v[v.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const v=[[[],[],[],[],[]],[[],[],[],[],[]]],g=v[0],m=v[1],y=g[4],_=m[4];let b,S,x;const C=[],D=[];let I,M,L,N,O,B;for(b=0;b<256;b++)D[(C[b]=b<<1^(b>>7)*283)^b]=b;for(S=x=0;!y[S];S^=I||1,x=D[x]||1)for(N=x^x<<1^x<<2^x<<3^x<<4,N=N>>8^N&255^99,y[S]=N,_[N]=S,L=C[M=C[I=C[S]]],B=L*16843009^M*65537^I*257^S*16843008,O=C[N]*257^N*16843008,b=0;b<4;b++)g[b][S]=O=O<<24^O>>>8,m[b][N]=B=B<<24^B>>>8;for(b=0;b<5;b++)g[b]=g[b].slice(0),m[b]=m[b].slice(0);return v};let i=null;class n{constructor(g){i||(i=t()),this._tables=[[i[0][0].slice(),i[0][1].slice(),i[0][2].slice(),i[0][3].slice(),i[0][4].slice()],[i[1][0].slice(),i[1][1].slice(),i[1][2].slice(),i[1][3].slice(),i[1][4].slice()]];let m,y,_;const b=this._tables[0][4],S=this._tables[1],x=g.length;let C=1;if(x!==4&&x!==6&&x!==8)throw new Error("Invalid aes key size");const D=g.slice(0),I=[];for(this._key=[D,I],m=x;m<4*x+28;m++)_=D[m-1],(m%x===0||x===8&&m%x===4)&&(_=b[_>>>24]<<24^b[_>>16&255]<<16^b[_>>8&255]<<8^b[_&255],m%x===0&&(_=_<<8^_>>>24^C<<24,C=C<<1^(C>>7)*283)),D[m]=D[m-x]^_;for(y=0;m;y++,m--)_=D[y&3?m:m-4],m<=4||y<4?I[y]=_:I[y]=S[0][b[_>>>24]]^S[1][b[_>>16&255]]^S[2][b[_>>8&255]]^S[3][b[_&255]]}decrypt(g,m,y,_,b,S){const x=this._key[1];let C=g^x[0],D=_^x[1],I=y^x[2],M=m^x[3],L,N,O;const B=x.length/4-2;let F,U=4;const $=this._tables[1],q=$[0],Z=$[1],te=$[2],Q=$[3],se=$[4];for(F=0;F<B;F++)L=q[C>>>24]^Z[D>>16&255]^te[I>>8&255]^Q[M&255]^x[U],N=q[D>>>24]^Z[I>>16&255]^te[M>>8&255]^Q[C&255]^x[U+1],O=q[I>>>24]^Z[M>>16&255]^te[C>>8&255]^Q[D&255]^x[U+2],M=q[M>>>24]^Z[C>>16&255]^te[D>>8&255]^Q[I&255]^x[U+3],U+=4,C=L,D=N,I=O;for(F=0;F<4;F++)b[(3&-F)+S]=se[C>>>24]<<24^se[D>>16&255]<<16^se[I>>8&255]<<8^se[M&255]^x[U++],L=C,C=D,D=I,I=M,M=L}}class a extends r{constructor(){super(r),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(g){this.jobs.push(g),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(v){return v<<24|(v&65280)<<8|(v&16711680)>>8|v>>>24},o=function(v,g,m){const y=new Int32Array(v.buffer,v.byteOffset,v.byteLength>>2),_=new n(Array.prototype.slice.call(g)),b=new Uint8Array(v.byteLength),S=new Int32Array(b.buffer);let x,C,D,I,M,L,N,O,B;for(x=m[0],C=m[1],D=m[2],I=m[3],B=0;B<y.length;B+=4)M=s(y[B]),L=s(y[B+1]),N=s(y[B+2]),O=s(y[B+3]),_.decrypt(M,L,N,O,S,B),S[B]=s(S[B]^x),S[B+1]=s(S[B+1]^C),S[B+2]=s(S[B+2]^D),S[B+3]=s(S[B+3]^I),x=M,C=L,D=N,I=O;return b};class l{constructor(g,m,y,_){const b=l.STEP,S=new Int32Array(g.buffer),x=new Uint8Array(g.byteLength);let C=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(S.subarray(C,C+b),m,y,x)),C=b;C<S.length;C+=b)y=new Uint32Array([s(S[C-4]),s(S[C-3]),s(S[C-2]),s(S[C-1])]),this.asyncStream_.push(this.decryptChunk_(S.subarray(C,C+b),m,y,x));this.asyncStream_.push(function(){_(null,e(x))})}static get STEP(){return 32e3}decryptChunk_(g,m,y,_){return function(){const b=o(g,m,y);_.set(b,g.byteOffset)}}}var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},c;typeof window<"u"?c=window:typeof u<"u"?c=u:typeof self<"u"?c=self:c={};var h=c,d=function(g){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(g):g&&g.buffer instanceof ArrayBuffer},f=h.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var v=new Uint16Array([65484]),g=new Uint8Array(v.buffer,v.byteOffset,v.byteLength);return g[0]===255?"big":g[0]===204?"little":"unknown"}();const p=function(v){const g={};return Object.keys(v).forEach(m=>{const y=v[m];d(y)?g[m]={bytes:y.buffer,byteOffset:y.byteOffset,byteLength:y.byteLength}:g[m]=y}),g};self.onmessage=function(v){const g=v.data,m=new Uint8Array(g.encrypted.bytes,g.encrypted.byteOffset,g.encrypted.byteLength),y=new Uint32Array(g.key.bytes,g.key.byteOffset,g.key.byteLength/4),_=new Uint32Array(g.iv.bytes,g.iv.byteOffset,g.iv.byteLength/4);new l(m,y,_,function(b,S){self.postMessage(p({source:g.source,decrypted:S}),[S.buffer])})}}));var ine=L8(rne);const nne=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Y8=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Jx=(r,e)=>{e.activePlaylistLoader=r,r.load()},ane=(r,e)=>()=>{const{segmentLoaders:{[r]:t,main:i},mediaTypes:{[r]:n}}=e,a=n.activeTrack(),s=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;if(!(s&&l&&s.id===l.id)&&(n.lastGroup_=s,n.lastTrack_=a,Y8(t,n),!(!s||s.isMainPlaylist))){if(!s.playlistLoader){o&&i.resetEverything();return}t.resyncLoader(),Jx(s.playlistLoader,n)}},sne=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:i}}=e;i.lastGroup_=null,t.abort(),t.pause()},one=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:i,main:n},mediaTypes:{[r]:a}}=e,s=a.activeTrack(),o=a.getActiveGroup(),l=a.activePlaylistLoader,u=a.lastTrack_;if(!(u&&s&&u.id===s.id)&&(a.lastGroup_=o,a.lastTrack_=s,Y8(i,a),!!o)){if(o.isMainPlaylist){if(!s||!u||s.id===u.id)return;const c=e.vhs.playlistController_,h=c.selectPlaylist();if(c.media()===h)return;a.logger_(`track change. Switching main audio from ${u.id} to ${s.id}`),t.pause(),n.resetEverything(),c.fastQualityChange_(h);return}if(r==="AUDIO"){if(!o.playlistLoader){n.setAudio(!0),n.resetEverything();return}i.setAudio(!0),n.setAudio(!1)}if(l===o.playlistLoader){Jx(o.playlistLoader,a);return}i.track&&i.track(s),i.resetEverything(),Jx(o.playlistLoader,a)}},l0={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:t},excludePlaylist:i}=e,n=t.activeTrack(),a=t.activeGroup(),s=(a.filter(l=>l.default)[0]||a[0]).id,o=t.tracks[s];if(n===o){i({error:{message:"Problem encountered loading the default audio track."}});return}K.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const l in t.tracks)t.tracks[l].enabled=t.tracks[l]===o;t.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:t}}=e;K.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const i=t.activeTrack();i&&(i.mode="disabled"),t.onTrackChanged()}},CM={AUDIO:(r,e,t)=>{if(!e)return;const{tech:i,requestOptions:n,segmentLoaders:{[r]:a}}=t;e.on("loadedmetadata",()=>{const s=e.media();a.playlist(s,n),(!i.paused()||s.endList&&i.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),n),i.paused()||a.load()}),e.on("error",l0[r](r,t))},SUBTITLES:(r,e,t)=>{const{tech:i,requestOptions:n,segmentLoaders:{[r]:a},mediaTypes:{[r]:s}}=t;e.on("loadedmetadata",()=>{const o=e.media();a.playlist(o,n),a.track(s.activeTrack()),(!i.paused()||o.endList&&i.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),n),i.paused()||a.load()}),e.on("error",l0[r](r,t))}},lne={AUDIO:(r,e)=>{const{vhs:t,sourceType:i,segmentLoaders:{[r]:n},requestOptions:a,main:{mediaGroups:s},mediaTypes:{[r]:{groups:o,tracks:l,logger_:u}},mainPlaylistLoader:c}=e,h=jv(c.main);(!s[r]||Object.keys(s[r]).length===0)&&(s[r]={main:{default:{default:!0}}},h&&(s[r].main.default.playlists=c.main.playlists));for(const d in s[r]){o[d]||(o[d]=[]);for(const f in s[r][d]){let p=s[r][d][f],v;if(h?(u(`AUDIO group '${d}' label '${f}' is a main playlist`),p.isMainPlaylist=!0,v=null):i==="vhs-json"&&p.playlists?v=new fh(p.playlists[0],t,a):p.resolvedUri?v=new fh(p.resolvedUri,t,a):p.playlists&&i==="dash"?v=new Xx(p.playlists[0],t,a,c):v=null,p=It({id:f,playlistLoader:v},p),CM[r](r,p.playlistLoader,e),o[d].push(p),typeof l[f]>"u"){const g=new K.AudioTrack({id:f,kind:nne(p),enabled:!1,language:p.language,default:p.default,label:f});l[f]=g}}}n.on("error",l0[r](r,e))},SUBTITLES:(r,e)=>{const{tech:t,vhs:i,sourceType:n,segmentLoaders:{[r]:a},requestOptions:s,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:u}},mainPlaylistLoader:c}=e;for(const h in o[r]){l[h]||(l[h]=[]);for(const d in o[r][h]){if(!i.options_.useForcedSubtitles&&o[r][h][d].forced)continue;let f=o[r][h][d],p;if(n==="hls")p=new fh(f.resolvedUri,i,s);else if(n==="dash"){if(!f.playlists.filter(g=>g.excludeUntil!==1/0).length)return;p=new Xx(f.playlists[0],i,s,c)}else n==="vhs-json"&&(p=new fh(f.playlists?f.playlists[0]:f.resolvedUri,i,s));if(f=It({id:d,playlistLoader:p},f),CM[r](r,f.playlistLoader,e),l[h].push(f),typeof u[d]>"u"){const v=t.addRemoteTextTrack({id:d,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:d},!1).track;u[d]=v}}}a.on("error",l0[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:t,main:{mediaGroups:i},mediaTypes:{[r]:{groups:n,tracks:a}}}=e;for(const s in i[r]){n[s]||(n[s]=[]);for(const o in i[r][s]){const l=i[r][s][o];if(!/^(?:CC|SERVICE)/.test(l.instreamId))continue;const u=t.options_.vhs&&t.options_.vhs.captionServices||{};let c={label:o,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(u[c.instreamId]&&(c=It(c,u[c.instreamId])),c.default===void 0&&delete c.default,n[s].push(It({id:o},l)),typeof a[o]>"u"){const h=t.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;a[o]=h}}}}},K8=(r,e)=>{for(let t=0;t<r.length;t++)if(vA(e,r[t])||r[t].playlists&&K8(r[t].playlists,e))return!0;return!1},une=(r,e)=>t=>{const{mainPlaylistLoader:i,mediaTypes:{[r]:{groups:n}}}=e,a=i.media();if(!a)return null;let s=null;a.attributes[r]&&(s=n[a.attributes[r]]);const o=Object.keys(n);if(!s)if(r==="AUDIO"&&o.length>1&&jv(e.main))for(let l=0;l<o.length;l++){const u=n[o[l]];if(K8(u,a)){s=u;break}}else n.main?s=n.main:o.length===1&&(s=n[o[0]]);return typeof t>"u"?s:t===null||!s?null:s.filter(l=>l.id===t.id)[0]||null},cne={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const i in t)if(t[i].enabled)return t[i];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const i in t)if(t[i].mode==="showing"||t[i].mode==="hidden")return t[i];return null}},hne=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},fne=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{lne[u](u,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:i,vhs:n,segmentLoaders:{["AUDIO"]:a,main:s}}=r;["AUDIO","SUBTITLES"].forEach(u=>{e[u].activeGroup=une(u,r),e[u].activeTrack=cne[u](u,r),e[u].onGroupChanged=ane(u,r),e[u].onGroupChanging=sne(u,r),e[u].onTrackChanged=one(u,r),e[u].getActiveGroup=hne(u,r)});const o=e.AUDIO.activeGroup();if(o){const u=(o.filter(h=>h.default)[0]||o[0]).id;e.AUDIO.tracks[u].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),a.setAudio(!0)):s.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(u=>e[u].onGroupChanging())});const l=()=>{e.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"})};i.audioTracks().addEventListener("change",l),i.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),n.on("dispose",()=>{i.audioTracks().removeEventListener("change",l),i.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),i.clearTracks("audio");for(const u in e.AUDIO.tracks)i.audioTracks().addTrack(e.AUDIO.tracks[u])},dne=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:As,activeTrack:As,getActiveGroup:As,onGroupChanged:As,onTrackChanged:As,lastTrack_:null,logger_:Kn(`MediaGroups[${e}]`)}}),r};class AM{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Ni(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(t=>[t.ID,t])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class pne extends K.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new AM,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Kn("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i){this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),this.trigger("error");return}if(i.startsWith("data:")){this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1));return}this.steeringManifest.reloadUri=Ni(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const n={contentSteeringInfo:{uri:i}};this.trigger({type:"contentsteeringloadstart",metadata:n}),this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},(a,s)=>{if(a){if(s.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),this.excludedSteeringManifestURLs.add(i);return}if(s.status===429){const u=s.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${u} seconds.`),this.startTTLTimeout_(parseInt(u,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:n});let o;try{o=JSON.parse(this.request_.responseText)}catch(u){const c={errorType:K.Error.StreamingContentSteeringParserError,error:u};this.trigger({type:"error",metadata:c})}this.assignSteeringProperties_(o);const l={contentSteeringInfo:n.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:l}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new H.URL(e),i=new H.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(H.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new H.URL(e),i=this.getPathway(),n=this.getBandwidth_();if(i){const a=`_${this.manifestType_}_pathway`;t.searchParams.set(a,i)}if(n){const a=`_${this.manifestType_}_throughput`;t.searchParams.set(a,n)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const i=(n=>{for(const a of n)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=n=>this.excludedSteeringManifestURLs.has(n);if(this.proxyServerUrl_){const n=this.setProxyServerUrl_(e);if(!t(n))return n}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=e*1e3;this.ttlTimeout_=H.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){H.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new AM}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Ni(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const vne=10;let vs;const gne=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],mne=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},yne=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:i,bufferLowWaterLine:n,bufferHighWaterLine:a,duration:s,bufferBasedABR:o,log:l}){if(!i)return K.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${r&&r.id||"null"} -> ${i.id}`;if(!r)return l(`${u} as current playlist is not set`),!0;if(i.id===r.id)return!1;const c=!!hh(e,t).length;if(!r.endList)return!c&&typeof r.partTargetDuration=="number"?(l(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(l(`${u} as current playlist is live`),!0);const h=fA(e,t),d=o?Fr.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Fr.MAX_BUFFER_LOW_WATER_LINE;if(s<d)return l(`${u} as duration < max low water line (${s} < ${d})`),!0;const f=i.attributes.BANDWIDTH,p=r.attributes.BANDWIDTH;if(f<p&&(!o||h<a)){let v=`${u} as next bandwidth < current bandwidth (${f} < ${p})`;return o&&(v+=` and forwardBuffer < bufferHighWaterLine (${h} < ${a})`),l(v),!0}if((!o||f>p)&&h>=n){let v=`${u} as forwardBuffer >= bufferLowWaterLine (${h} >= ${n})`;return o&&(v+=` and next bandwidth > current bandwidth (${f} > ${p})`),l(v),!0}return l(`not ${u} as no switching criteria met`),!1};class _ne extends K.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:n,bandwidth:a,externVhs:s,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:u,sourceType:c,cacheEncryptionKeys:h,bufferBasedABR:d,leastPixelDiffSelector:f,captionServices:p,experimentalUseMMS:v}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:g}=e;(g===null||typeof g>"u")&&(g=1/0),vs=s,this.bufferBasedABR=!!d,this.leastPixelDiffSelector=!!f,this.withCredentials=i,this.tech_=n,this.vhs_=n.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=g,this.enableLowInitialPlaylist=u,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:g,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=dne(),v&&H.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new H.ManagedMediaSource,K.log("Using ManagedMediaSource")):H.MediaSource&&(this.mediaSource=new H.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Kr(),this.hasPlayed_=!1,this.syncController_=new ene(e),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new ine,this.sourceUpdater_=new j8(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new tne,this.keyStatusMap_=new Map;const m={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:p,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:h,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new Xx(t,this.vhs_,It(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new fh(t,this.vhs_,It(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Zx(It(m,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Zx(It(m,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Yie(It(m,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((b,S)=>{function x(){n.off("vttjserror",C),b()}function C(){n.off("vttjsloaded",x),S()}n.one("vttjsloaded",x),n.one("vttjserror",C),n.addWebVttScript_()})}),e);const y=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new pne(this.vhs_.xhr,y),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),gne.forEach(b=>{this[b+"_"]=mne.bind(this,b)}),this.logger_=Kn("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const _=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(_,()=>{const b=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-b,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const n=this.media(),a=n&&(n.id||n.uri),s=e&&(e.id||e.uri);if(a&&a!==s){this.logger_(`switch media ${a} -> ${s} from ${t}`);const o={renditionInfo:{id:s,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:o}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,n=this.contentSteeringController_.getPathway();if(i&&n){const s=(i.length?i[0].playlists:i.playlists).filter(o=>o.attributes.serviceLocation===n);s.length&&this.mediaTypes_[e].activePlaylistLoader.media(s[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=H.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(H.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,n=Object.keys(i);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const o=i.main||n.length&&i[n[0]];for(const l in o)if(o[l].default){a={label:l};break}}if(!a)return t;const s=[];for(const o in i)if(i[o][a.label]){const l=i[o][a.label];if(l.playlists&&l.playlists.length)s.push.apply(s,l.playlists);else if(l.uri)s.push(l);else if(e.playlists.length)for(let u=0;u<e.playlists.length;u++){const c=e.playlists[u];c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===o&&s.push(c)}}return s.length?s:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),i=t.targetDuration*1.5*1e3;Hx(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=i,t.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.mainSegmentLoader_.load()),fne({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),t),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let t=this.mainPlaylistLoader_.media();if(!t){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let i;if(this.enableLowInitialPlaylist&&(i=this.selectInitialPlaylist()),i||(i=this.selectPlaylist()),!i||!this.shouldSwitchToMedia_(i)||(this.initialMedia_=i,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{const t=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const t=this.mainPlaylistLoader_.media(),i=t.targetDuration*1.5*1e3;Hx(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=i,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const t=this.mainPlaylistLoader_.media();if(t.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(t)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(t=>{this.mainPlaylistLoader_.on(t,i=>{this.player_.trigger(ar({},i))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let n=!0;const a=Object.keys(i.AUDIO);for(const s in i.AUDIO)for(const o in i.AUDIO[s])i.AUDIO[s][o].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),vs.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(i.AUDIO[a[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),s=this.tech_.buffered();return yne({buffered:s,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:a,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const i=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const i=this.audioSegmentLoader_.pendingSegment_;if(!i||!i.segment||!i.segment.syncInfo)return;const n=i.segment.syncInfo.end+.01;this.tech_.setCurrentTime(n)}),this.mainSegmentLoader_.on("earlyabort",i=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:vne}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const i=this.getCodecsOrExclude_();i&&this.sourceUpdater_.addOrChangeSourceBuffers(i)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(i=>{this.mainSegmentLoader_.on(i,n=>{this.player_.trigger(ar({},n))}),this.audioSegmentLoader_.on(i,n=>{this.player_.trigger(ar({},n))}),this.subtitleSegmentLoader_.on(i,n=>{this.player_.trigger(ar({},n))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.mainSegmentLoader_.load()})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let n=i;if(e.start){const a=e.start.timeOffset;a<0?n=Math.max(i+a,t.start(0)):n=Math.min(i,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(n)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,t=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(i===null)return!1;const n=vs.Playlist.playlistEnd(e,i),a=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return n-a<=Ga;const o=s.end(s.length-1);return o-a<=Ga&&n-o<=Ga}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,a=n.filter($_),s=a.length===1&&a[0]===e;if(n.length===1&&i!==1/0)return K.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(s);if(s){if(this.main().contentSteering){const p=this.pathwayAttribute_(e),v=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(p),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(p)},v);return}let f=!1;n.forEach(p=>{if(p===e)return;const v=p.excludeUntil;typeof v<"u"&&v!==1/0&&(f=!0,delete p.excludeUntil)}),f&&(K.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let o;e.playlistErrors_>this.maxPlaylistRetries?o=1/0:o=Date.now()+i*1e3,e.excludeUntil=o,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const l=this.selectPlaylist();if(!l){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const u=t.internal?this.logger_:K.log.warn,c=t.message?" "+t.message:"";u(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${c} Switching to playlist ${l.id}.`),l.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const h=l.targetDuration/2*1e3||5*1e3,d=typeof l.lastRequest=="number"&&Date.now()-l.lastRequest<=h;return this.switchMedia_(l,"exclude",s||d)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],n=e==="all";(n||e==="main")&&i.push(this.mainPlaylistLoader_);const a=[];(n||e==="audio")&&a.push("AUDIO"),(n||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(s=>{const o=this.mediaTypes_[s]&&this.mediaTypes_[s].activePlaylistLoader;o&&i.push(o)}),["main","audio","subtitle"].forEach(s=>{const o=this[`${s}SegmentLoader_`];o&&(e===s||e==="all")&&i.push(o)}),i.forEach(s=>t.forEach(o=>{typeof s[o]=="function"&&s[o]()}))}setCurrentTime(e){const t=hh(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(t&&t.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:vs.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(i===null)return;const n=this.mainPlaylistLoader_.main,a=vs.Playlist.seekable(t,i,vs.Playlist.liveEdgeDelay(n,t));if(a.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),i===null||(e=vs.Playlist.seekable(t,i,vs.Playlist.liveEdgeDelay(n,t)),e.length===0)))return;let s,o;if(this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>a.end(0)||a.start(0)>e.end(0)?this.seekable_=a:this.seekable_=Kr([[e.start(0)>a.start(0)?e.start(0):a.start(0),e.end(0)<a.end(0)?e.end(0):a.end(0)]]):this.seekable_=a,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===o)return;this.logger_(`seekable updated [${l8(this.seekable_)}]`);const l={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:l}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const n=this.seekable();if(!n.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<n.end(n.length-1))&&this.sourceUpdater_.setDuration(n.end(n.length-1));return}const t=this.tech_.buffered();let i=vs.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(n=>{n.playlistLoader&&n.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=bp(this.main(),t),n={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||BQ),e.main.isMuxed&&(n.video+=`,${i.audio||e.main.audioCodec||oP}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||oP,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!n.audio&&!n.video){this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const s=(u,c)=>u?pp(c):cb(c),o={};let l;if(["video","audio"].forEach(function(u){if(n.hasOwnProperty(u)&&!s(e[u].isFmp4,n[u])){const c=e[u].isFmp4?"browser":"muxer";o[c]=o[c]||[],o[c].push(n[u]),u==="audio"&&(l=c)}}),a&&l&&t.attributes.AUDIO){const u=t.attributes.AUDIO;this.main().playlists.forEach(c=>{(c.attributes&&c.attributes.AUDIO)===u&&c!==t&&(c.excludeUntil=1/0)}),this.logger_(`excluding audio group ${u} as ${l} does not support codec(s): "${n.audio}"`)}if(Object.keys(o).length){const u=Object.keys(o).reduce((c,h)=>(c&&(c+=", "),c+=`${h} does not support codec(s): "${o[h].join(",")}"`,c),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:u},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const u=[];if(["video","audio"].forEach(c=>{const h=(ka(this.sourceUpdater_.codecs[c]||"")[0]||{}).type,d=(ka(n[c]||"")[0]||{}).type;h&&d&&h.toLowerCase()!==d.toLowerCase()&&u.push(`"${this.sourceUpdater_.codecs[c]}" -> "${n[c]}"`)}),u.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${u.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return n}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const n=e[i];if(t.indexOf(n.id)!==-1)return;t.push(n.id);const a=bp(this.main,n),s=[];a.audio&&!cb(a.audio)&&!pp(a.audio)&&s.push(`audio codec ${a.audio}`),a.video&&!cb(a.video)&&!pp(a.video)&&s.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&s.push(`text codec ${a.text}`),s.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${s.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,n=s0(ka(e)),a=dM(n),s=n.video&&ka(n.video)[0]||null,o=n.audio&&ka(n.audio)[0]||null;Object.keys(i).forEach(l=>{const u=i[l];if(t.indexOf(u.id)!==-1||u.excludeUntil===1/0)return;t.push(u.id);const c=[],h=bp(this.mainPlaylistLoader_.main,u),d=dM(h);if(!(!h.audio&&!h.video)){if(d!==a&&c.push(`codec count "${d}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const f=h.video&&ka(h.video)[0]||null,p=h.audio&&ka(h.audio)[0]||null;f&&s&&f.type.toLowerCase()!==s.type.toLowerCase()&&c.push(`video codec "${f.type}" !== "${s.type}"`),p&&o&&p.type.toLowerCase()!==o.type.toLowerCase()&&c.push(`audio codec "${p.type}" !== "${o.type}"`)}c.length&&(u.excludeUntil=1/0,this.logger_(`excluding ${u.id}: ${c.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),Zie(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Fr.GOAL_BUFFER_LENGTH,i=Fr.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,Fr.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Fr.BUFFER_LOW_WATER_LINE,i=Fr.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,Fr.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Fr.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?a:n)}bufferHighWaterLine(){return Fr.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){gM(this.inbandTextTracks_,"com.apple.streaming",this.tech_),Iie({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();gM(this.inbandTextTracks_,e,this.tech_),Aie({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(t=>{this.contentSteeringController_.on(t,i=>{this.trigger(ar({},i))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const t=this.main();(this.contentSteeringController_.didDASHTagChange(t.uri,t.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),s=[];for(const o of t.playlists){const l=o.attributes.serviceLocation;if(l&&(s.push(l),!a.has(l)))return!0}return!!(!s.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const i=this.main().playlists,n=new Set;let a=!1;Object.keys(i).forEach(s=>{const o=i[s],l=this.pathwayAttribute_(o),u=l&&e!==l;o.excludeUntil===1/0&&o.lastExcludeReason_==="content-steering"&&!u&&(delete o.excludeUntil,delete o.lastExcludeReason_,a=!0);const h=!o.excludeUntil&&o.excludeUntil!==1/0;!n.has(o.id)&&u&&h&&(n.add(o.id),o.excludeUntil=1/0,o.lastExcludeReason_="content-steering",this.logger_(`excluding ${o.id} for ${o.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(s=>{const o=this.mediaTypes_[s];if(o.activePlaylistLoader){const l=o.activePlaylistLoader.media_;l&&l.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const t=this.main().playlists,i=this.contentSteeringController_.currentPathwayClones,n=this.contentSteeringController_.nextPathwayClones;if(i&&i.size||n&&n.size){for(const[s,o]of i.entries())n.get(s)||(this.mainPlaylistLoader_.updateOrDeleteClone(o),this.contentSteeringController_.excludePathway(s));for(const[s,o]of n.entries()){const l=i.get(s);if(!l){t.filter(c=>c.attributes["PATHWAY-ID"]===o["BASE-ID"]).forEach(c=>{this.mainPlaylistLoader_.addClonePathway(o,c)}),this.contentSteeringController_.addAvailablePathway(s);continue}this.equalPathwayClones_(l,o)||(this.mainPlaylistLoader_.updateOrDeleteClone(o,!0),this.contentSteeringController_.addAvailablePathway(s))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...n])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(const a in i)if(i[a]!==n[a])return!1;for(const a in n)if(i[a]!==n[a])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const n=this.mainPlaylistLoader_.getKeyIdSet(i);!n||!n.size||n.forEach(a=>{const s="usable",o=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===s,l=i.lastExcludeReason_===t&&i.excludeUntil===1/0;o?o&&l&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${a} is ${s}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${s}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(i=>{const n=i&&i.attributes&&i.attributes.RESOLUTION&&i.attributes.RESOLUTION.height<720,a=i.excludeUntil===1/0&&i.lastExcludeReason_===t;n&&a&&(delete i.excludeUntil,K.log.warn(`enabling non-HD playlist ${i.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const a=(typeof e=="string"?e:jie(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const bne=(r,e,t)=>i=>{const n=r.main.playlists[e],a=pA(n),s=$_(n);if(typeof i>"u")return s;i?delete n.disabled:n.disabled=!0;const o={renditionInfo:{id:e,bandwidth:n.attributes.BANDWIDTH,resolution:n.attributes.RESOLUTION,codecs:n.attributes.CODECS},cause:"fast-quality"};return i!==s&&!a&&(t(n),i?r.trigger({type:"renditionenabled",metadata:o}):r.trigger({type:"renditiondisabled",metadata:o})),i};class Tne{constructor(e,t,i){const{playlistController_:n}=e,a=n.fastQualityChange_.bind(n);if(t.attributes){const s=t.attributes.RESOLUTION;this.width=s&&s.width,this.height=s&&s.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=bp(n.main(),t),this.playlist=t,this.id=i,this.enabled=bne(e.playlists,t.id,a)}}const Sne=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=jv(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(i=>!pA(i)).map((i,n)=>new Tne(r,i,i.id)):[]}},DM=["seeking","seeked","pause","playing","error"];class xne extends K.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Kn("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),s=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(c=>{l[c]={reset:()=>this.resetSegmentDownloads_(c),updateend:()=>this.checkSegmentDownloads_(c)},s[`${c}SegmentLoader_`].on("appendsdone",l[c].updateend),s[`${c}SegmentLoader_`].on("playlistupdate",l[c].reset),this.tech_.on(["seeked","seeking"],l[c].reset)});const u=c=>{["main","audio"].forEach(h=>{s[`${h}SegmentLoader_`][c]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(DM,a),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(DM,a),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(c=>{s[`${c}SegmentLoader_`].off("appendsdone",l[c].updateend),s[`${c}SegmentLoader_`].off("playlistupdate",l[c].reset),this.tech_.off(["seeked","seeking"],l[c].reset)}),this.checkCurrentTimeTimeout_&&H.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&H.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=H.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],n=i.buffered_(),a=ure(this[`${e}Buffered_`],n);if(this[`${e}Buffered_`]=n,a){const s={bufferedRanges:n};t.trigger({type:"bufferedrangeschanged",metadata:s}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:pu(n)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ga>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Kr([this.lastRecordedTime,e]));const i={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:i}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const t=this.seekable(),i=this.tech_.currentTime(),n=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(n&&(a=t.end(t.length-1)),this.beforeSeekableWindow_(t,i)){const p=t.start(0);a=p+(p===t.end(0)?0:Ga)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${l8(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const s=this.playlistController_.sourceUpdater_,o=this.tech_.buffered(),l=s.audioBuffer?s.audioBuffered():null,u=s.videoBuffer?s.videoBuffered():null,c=this.media(),h=c.partTargetDuration?c.partTargetDuration:(c.targetDuration-za)*2,d=[l,u];for(let p=0;p<d.length;p++){if(!d[p])continue;if(fA(d[p],i)<h)return!1}const f=$g(o,i);return f.length===0?!1:(a=f.start(0)+Ga,this.logger_(`Buffered region starts (${f.start(0)}) just beyond seek point (${i}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=hh(t,e);if(i.length&&e+3<=i.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const o=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${o}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const s=$g(n,t);return s.length>0?(this.logger_(`Stopped at ${t} and seeking to ${s.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0):!1}afterSeekableWindow_(e,t,i,n=!1){if(!e.length)return!1;let a=e.end(e.length-1)+Ga;const s=!i.endList,o=typeof i.partTargetDuration=="number";return s&&(o||n)&&(a=e.end(e.length-1)+i.targetDuration*3),t>a}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let n;if(e.length&&t.length){const a=hh(e,i-3),s=hh(e,i),o=hh(t,i);o.length&&!s.length&&a.length&&(n={start:a.end(0),end:o.end(0)})}else $g(e,i).length||(n=this.gapFromVideoUnderflow_(e,i));return n?(this.logger_(`Encountered a gap in video from ${n.start} to ${n.end}. Seeking to current time ${i}`),!0):!1}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),n=$g(t,i);if(this.resetTimeUpdate_(),n.length===0||i!==e)return;this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+za);const a={gapInfo:{from:i,to:n.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const i=sre(e);for(let n=0;n<i.length;n++){const a=i.start(n),s=i.end(n);if(t-a<4&&t-a>2)return{start:a,end:s}}return null}}const wne={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},Z8=function(r,e){let t=0,i=0;const n=It(wne,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){i&&r.currentTime(i)},s=function(c){c!=null&&(i=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(c),r.trigger({type:"usage",name:"vhs-error-reload"}),r.play())},o=function(){if(Date.now()-t<n.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!n.getSource||typeof n.getSource!="function"){K.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return t=Date.now(),n.getSource.call(r,s)},l=function(){r.off("loadedmetadata",a),r.off("error",o),r.off("dispose",l)},u=function(c){l(),Z8(r,c)};r.on("error",o),r.on("dispose",l),r.reloadSourceOnError=u},Cne=function(r){Z8(this,r)};var Q8="3.14.2",Ane="7.0.3",Dne="1.3.0",Ene="7.2.0",Ine="4.0.2";const Jt={PlaylistLoader:fh,Playlist:Vi,utils:kre,STANDARD_PLAYLIST_SELECTOR:vM,INITIAL_PLAYLIST_SELECTOR:Tie,lastBandwidthSelector:vM,movingAverageBandwidthSelector:_ie,comparePlaylistBandwidth:mA,comparePlaylistResolution:yie,xhr:C8()};Object.keys(Fr).forEach(r=>{Object.defineProperty(Jt,r,{get(){return K.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Fr[r]},set(e){if(K.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){K.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Fr[r]=e}})});const J8="videojs-vhs",eU=function(r,e){const t=e.media();let i=-1;for(let n=0;n<r.length;n++)if(r[n].id===t.id){i=n;break}r.selectedIndex_=i,r.trigger({selectedIndex:i,type:"change"})},Pne=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),eU(r,e.playlists)};Jt.canPlaySource=function(){return K.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const Mne=(r,e,t)=>{if(!r)return r;let i={};e&&e.attributes&&e.attributes.CODECS&&(i=s0(ka(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(i.audio=t.attributes.CODECS);const n=Uh(i.video),a=Uh(i.audio),s={};for(const o in r)s[o]={},a&&(s[o].audioContentType=a),n&&(s[o].videoContentType=n),e.contentProtection&&e.contentProtection[o]&&e.contentProtection[o].pssh&&(s[o].pssh=e.contentProtection[o].pssh),typeof r[o]=="string"&&(s[o].url=r[o]);return It(r,s)},Lne=(r,e)=>r.reduce((t,i)=>{if(!i.contentProtection)return t;const n=e.reduce((a,s)=>{const o=i.contentProtection[s];return o&&o.pssh&&(a[s]={pssh:o.pssh}),a},{});return Object.keys(n).length&&t.push(n),t},[]),kne=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:i})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const n=t?i.concat([t]):i,a=Lne(n,Object.keys(e)),s=[],o=[];return a.forEach(l=>{o.push(new Promise((u,c)=>{r.tech_.one("keysessioncreated",u)})),s.push(new Promise((u,c)=>{r.eme.initializeMediaKeys({keySystems:l},h=>{if(h){c(h);return}u()})}))}),Promise.race([Promise.all(s),Promise.race(o)])},Rne=({player:r,sourceKeySystems:e,media:t,audioMedia:i})=>{const n=Mne(e,t,i);return n?(r.currentSource().keySystems=n,n&&!r.eme?(K.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},tU=()=>{if(!H.localStorage)return null;const r=H.localStorage.getItem(J8);if(!r)return null;try{return JSON.parse(r)}catch{return null}},One=r=>{if(!H.localStorage)return!1;let e=tU();e=e?It(e,r):r;try{H.localStorage.setItem(J8,JSON.stringify(e))}catch{return!1}return e},Nne=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,rU=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},iU=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},nU=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},aU=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};Jt.supportsNativeHls=function(){if(!de||!de.createElement)return!1;const r=de.createElement("video");return K.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1}();Jt.supportsNativeDash=function(){return!de||!de.createElement||!K.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(de.createElement("video").canPlayType("application/dash+xml"))}();Jt.supportsTypeNatively=r=>r==="hls"?Jt.supportsNativeHls:r==="dash"?Jt.supportsNativeDash:!1;Jt.isSupported=function(){return K.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};Jt.xhr.onRequest=function(r){rU(Jt.xhr,r)};Jt.xhr.onResponse=function(r){iU(Jt.xhr,r)};Jt.xhr.offRequest=function(r){nU(Jt.xhr,r)};Jt.xhr.offResponse=function(r){aU(Jt.xhr,r)};const Bne=K.getComponent("Component");class sU extends Bne{constructor(e,t,i){if(super(t,i.vhs),typeof i.initialBandwidth=="number"&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Kn("VhsHandler"),t.options_&&t.options_.playerId){const n=K.getPlayer(t.options_.playerId);this.player_=n}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(de,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],n=>{const a=de.fullscreenElement||de.webkitFullscreenElement||de.mozFullScreenElement||de.msFullscreenElement;a&&a.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=It(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const i=tU();i&&i.bandwidth&&(this.options_.bandwidth=i.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),i&&i.throughput&&(this.options_.throughput=i.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Fr.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Fr.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(i=>{typeof this.source_[i]<"u"&&(this.options_[i]=this.source_[i])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;const t=this.options_.customPixelRatio;typeof t=="number"&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=Nne(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Jt,this.options_.sourceType=Q5(t),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new _ne(this.options_);const i=It({liveRangeSafeTimeDelta:Ga},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new xne(i),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=K.players[this.tech_.options_.playerId];let s=this.playlistController_.error;typeof s=="object"&&!s.code?s.code=3:typeof s=="string"&&(s={message:s,code:3}),a.error(s)});const n=this.options_.bufferBasedABR?Jt.movingAverageBandwidthSelector(.55):Jt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):n.bind(this),this.playlistController_.selectInitialPlaylist=Jt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const s=H.navigator.connection||H.navigator.mozConnection||H.navigator.webkitConnection,o=1e7;if(this.options_.useNetworkInformationApi&&s){const l=s.downlink*1e3*1e3;l>=o&&a>=o?a=Math.max(a,l):a=l}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let s;return this.throughput>0?s=1/this.throughput:s=0,Math.floor(1/(a+s))},set(){K.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>pu(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>pu(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&One({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{Sne(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=H.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),kne({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(t=>{this.logger_("error while creating EME key session",t),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Rne({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",i=>{this.playlistController_.updatePlaylistByKeyStatus(i.keyId,i.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!t){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=K.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{Pne(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{eU(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Q8,"mux.js":Ane,"mpd-parser":Dne,"m3u8-parser":Ene,"aes-decrypter":Ine}}version(){return this.constructor.version()}canChangeType(){return j8.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&H.URL.revokeObjectURL&&(H.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Vre({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,n=2){return P8({programTime:e,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{rU(this.xhr,e)},this.xhr.onResponse=e=>{iU(this.xhr,e)},this.xhr.offRequest=e=>{nU(this.xhr,e)},this.xhr.offResponse=e=>{aU(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],t=["gapjumped","playedrangeschanged"];e.forEach(i=>{this.playlistController_.on(i,n=>{this.player_.trigger(ar({},n))})}),t.forEach(i=>{this.playbackWatcher_.on(i,n=>{this.player_.trigger(ar({},n))})})}}const u0={name:"videojs-http-streaming",VERSION:Q8,canHandleSource(r,e={}){const t=It(K.options,e);return!t.vhs.experimentalUseMMS&&!pp("avc1.4d400d,mp4a.40.2",!1)?!1:u0.canPlayType(r.type,t)},handleSource(r,e,t={}){const i=It(K.options,t);return e.vhs=new sU(r,e,i),e.vhs.xhr=C8(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=Q5(r);if(!t)return"";const i=u0.getOverrideNative(e);return!Jt.supportsTypeNatively(t)||i?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(K.browser.IS_ANY_SAFARI||K.browser.IS_IOS),{overrideNative:i=t}=e;return i}},Fne=()=>pp("avc1.4d400d,mp4a.40.2",!0);Fne()&&K.getTech("Html5").registerSourceHandler(u0,0);K.VhsHandler=sU;K.VhsSourceHandler=u0;K.Vhs=Jt;K.use||K.registerComponent("Vhs",Jt);K.options.vhs=K.options.vhs||{};(!K.getPlugin||!K.getPlugin("reloadSourceOnError"))&&K.registerPlugin("reloadSourceOnError",Cne);/*! @name videojs-contrib-eme @version 3.11.2 @license Apache-2.0 */function c0(){return c0=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},c0.apply(this,arguments)}var Une=function(e){for(var t=new ArrayBuffer(e.length*2),i=new Uint16Array(t),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},Vne=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},zne=function(e){var t=de.createElement("a");return t.href=e,t.hostname},Gne=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var i=new DataView(e),n=new DataView(t),a=0;a<i.byteLength;a++)if(i.getUint8(a)!==n.getUint8(a))return!1;return!0},EM=function(e){return e instanceof Uint8Array||e instanceof Uint16Array?e.buffer:e},yA=function(){for(var e=K.obj||K,t=e.merge||e.mergeOptions,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return t.apply(e,n)},W_=function(){var e=yA.apply(void 0,arguments);return Object.keys(e).forEach(function(t){e[t]===null&&delete e[t]}),e},Qh=K.xhr.httpHandler;Qh||(Qh=function(e,t){return function(i,n,a){if(i){e(i);return}if(n.statusCode>=400&&n.statusCode<=599){var s=a;t&&(s=String.fromCharCode.apply(null,new Uint8Array(a))),e({cause:s});return}e(null,a)}});var Hne=function(e){var t=String.fromCharCode.apply(null,new Uint16Array(e)),i=new H.DOMParser().parseFromString(t,"application/xml"),n=i.getElementsByTagName("HttpHeaders")[0],a={};if(n)for(var s=n.getElementsByTagName("name"),o=n.getElementsByTagName("value"),l=0;l<s.length;l++)a[s[l].childNodes[0].nodeValue]=o[l].childNodes[0].nodeValue;var u=i.getElementsByTagName("Challenge")[0],c;return u&&(c=H.atob(u.childNodes[0].nodeValue)),i.querySelector("parsererror")&&(a={"Content-Type":"text/xml; charset=utf-8",SOAPAction:'"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"'},c=e),{headers:a,message:c}},oU=function(e,t,i,n){var a=Hne(t),s=a.message,o=W_(a.headers,i.emeHeaders,e.licenseHeaders);K.xhr({uri:e.url,method:"post",headers:o,body:s,responseType:"arraybuffer"},Qh(n,!0))},$ne=function(e){if(e.supportedConfigurations)return e.supportedConfigurations;var t={},i=e.audioContentType,n=e.audioRobustness,a=e.videoContentType,s=e.videoRobustness,o=e.persistentState;return(i||n)&&(t.audioCapabilities=[c0({},i?{contentType:i}:{},n?{robustness:n}:{})]),(a||s)&&(t.videoCapabilities=[c0({},a?{contentType:a}:{},s?{robustness:s}:{})]),o&&(t.persistentState=o),[t]},Wne=function(e){var t;return Object.keys(e).forEach(function(i){var n=$ne(e[i]);t?t=t.catch(function(a){return H.navigator.requestMediaKeySystemAccess(i,n)}):t=H.navigator.requestMediaKeySystemAccess(i,n)}),t},lU=function r(e,t){var i=t.mediaKeys,n=t.initDataType,a=t.initData,s=t.options,o=t.getLicense,l=t.removeSession,u=t.eventBus,c=i.createSession();return u.trigger("keysessioncreated"),e.on("dispose",function(){c.close()}),new Promise(function(h,d){c.addEventListener("message",function(f){f.messageType!=="license-request"&&f.messageType!=="license-renewal"||o(s,f.message).then(function(p){h(c.update(p))}).catch(function(p){d(p)})},!1),c.addEventListener("keystatuseschange",function(f){var p=!1;c.keyStatuses.forEach(function(v,g){switch(u.trigger({keyId:g,status:v,target:c,type:"keystatuschange"}),v){case"expired":p=!0;break;case"internal-error":var m=`Key status reported as "internal-error." Leaving the session open since we don't have enough details to know if this error is fatal.`;K.log.warn(m,f);break}}),p&&c.close().then(function(){l(a),r(e,t)})},!1),c.generateRequest(n,a).catch(function(){d("Unable to create or initialize key session")})})},qne=function(e){var t=e.player,i=e.video,n=e.initDataType,a=e.initData,s=e.options,o=e.getLicense,l=e.removeSession,u=e.eventBus;return i.mediaKeysObject?lU(t,{mediaKeys:i.mediaKeysObject,initDataType:n,initData:a,options:s,getLicense:o,removeSession:l,eventBus:u}):(i.pendingSessionData.push({initDataType:n,initData:a,options:s,getLicense:o,removeSession:l,eventBus:u}),Promise.resolve())},jne=function(e){var t=e.player,i=e.video,n=e.certificate,a=e.createdMediaKeys;i.mediaKeysObject=a;var s=[];n&&s.push(a.setServerCertificate(n));for(var o=0;o<i.pendingSessionData.length;o++){var l=i.pendingSessionData[o];s.push(lU(t,{mediaKeys:i.mediaKeysObject,initDataType:l.initDataType,initData:l.initData,options:l.options,getLicense:l.getLicense,removeSession:l.removeSession,eventBus:l.eventBus}))}return i.pendingSessionData=[],s.push(i.setMediaKeys(a)),Promise.all(s)},Xne=function(e){return function(t,i,n){oU(e,i,t,n)}},Yne=function(e){return function(t,i,n){var a=W_({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);K.xhr({uri:e.url,method:"POST",responseType:"arraybuffer",body:i,headers:a},Qh(n,!0))}},Kne=function(e,t){return function(i,n){return new Promise(function(a,s){e(i,n,function(o,l){if(t&&t.trigger("licenserequestattempted"),o){s(o);return}a(l)})})}},IM=function(e,t){if(typeof t=="string"&&(t={url:t}),!t.url&&!t.getLicense)throw new Error("Neither URL nor getLicense function provided to get license");return t.url&&!t.getLicense&&(t.getLicense=e==="com.microsoft.playready"?Xne(t):Yne(t)),t},Zne=function(e){var t=e.player,i=e.video,n=e.initDataType,a=e.initData,s=e.keySystemAccess,o=e.options,l=e.removeSession,u=e.eventBus,c=Promise.resolve();if(typeof i.mediaKeysObject>"u"){i.mediaKeysObject=null,i.pendingSessionData=[];var h,d;c=new Promise(function(f,p){if(i.keySystem=s.keySystem,d=IM(s.keySystem,o.keySystems[s.keySystem]),!d.getCertificate){f(s);return}d.getCertificate(o,function(v,g){if(v){p(v);return}h=g,f()})}).then(function(){return s.createMediaKeys()}).then(function(f){return jne({player:t,video:i,certificate:h,createdMediaKeys:f})}).catch(function(f){return f?Promise.reject(f):Promise.reject("Failed to create and initialize a MediaKeys object")})}return c.then(function(){var f=IM(i.keySystem,o.keySystems[i.keySystem]),p=f.getLicense;return qne({player:t,video:i,initDataType:n,initData:a,options:o,getLicense:i.keySystem?Kne(p,u):null,removeSession:l,eventBus:u})})},_A="com.apple.fps.1_0",Qne=function(e){var t=e.initData,i=e.id,n=e.cert;typeof i=="string"&&(i=Une(i));var a=0,s=new ArrayBuffer(t.byteLength+4+i.byteLength+4+n.byteLength),o=new DataView(s),l=new Uint8Array(s,a,t.byteLength);l.set(t),a+=t.byteLength,o.setUint32(a,i.byteLength,!0),a+=4;var u=new Uint16Array(s,a,i.length);u.set(i),a+=u.byteLength,o.setUint32(a,n.byteLength,!0),a+=4;var c=new Uint8Array(s,a,n.byteLength);return c.set(n),new Uint8Array(s,0,s.byteLength)},Jne=function(e){var t=e.video,i=e.contentId,n=e.initData,a=e.cert,s=e.options,o=e.getLicense,l=e.eventBus;return new Promise(function(u,c){if(!t.webkitKeys)try{t.webkitSetMediaKeys(new H.WebKitMediaKeys(_A))}catch{c("Could not create MediaKeys");return}var h;try{h=t.webkitKeys.createSession("video/mp4",Qne({id:i,initData:n,cert:a}))}catch{c("Could not create key session");return}l.trigger("keysessioncreated"),h.contentId=i,h.addEventListener("webkitkeymessage",function(d){o(s,i,d.message,function(f,p){if(l&&l.trigger("licenserequestattempted"),f){c(f);return}h.update(new Uint8Array(p))})}),h.addEventListener("webkitkeyadded",function(){u()}),h.addEventListener("webkitkeyerror",function(){var d=h.error;c("KeySession error: code "+d.code+", systemCode "+d.systemCode)})})},eae=function(e){return function(t,i){var n=W_(t.emeHeaders,e.certificateHeaders);K.xhr({uri:e.certificateUri,responseType:"arraybuffer",headers:n},Qh(function(a,s){if(a){i(a);return}i(null,new Uint8Array(s))}))}},tae=function(e,t){return zne(Vne(t))},rae=function(e){return function(t,i,n,a){var s=W_({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);K.xhr({uri:e.licenseUri,method:"POST",responseType:"arraybuffer",body:n,headers:s},Qh(a,!0))}},iae=function(e){var t=e.video,i=e.initData,n=e.options,a=e.eventBus,s=n.keySystems[_A],o=s.getCertificate||eae(s),l=s.getContentId||tae,u=s.getLicense||rae(s);return new Promise(function(c,h){o(n,function(d,f){if(d){h(d);return}c(f)})}).then(function(c){return Jne({video:t,cert:c,initData:i,getLicense:u,options:n,contentId:l(n,i),eventBus:a})})},dh="com.microsoft.playready",nae=function(e,t,i,n){var a=e.keySystems[dh];if(typeof a.getKey=="function"){a.getKey(e,i.destinationURL,i.message.buffer,function(o,l){if(o){n.trigger({message:"Unable to get key: "+o,target:t,type:"mskeyerror"});return}t.update(l)});return}typeof a=="string"?a={url:a}:typeof a=="boolean"&&(a={}),a.url||(a.url=i.destinationURL);var s=function(l,u){if(n&&n.trigger("licenserequestattempted"),l){n.trigger({message:"Unable to request key from url: "+a.url,target:t,type:"mskeyerror"});return}t.update(new Uint8Array(u))};a.getLicense?a.getLicense(e,i.message.buffer,s):oU(a,i.message.buffer,e,s)},aae=function(e,t,i,n){var a=e.msKeys.createSession("video/mp4",t);if(!a)throw new Error("Could not create key session.");n.trigger("keysessioncreated"),a.addEventListener("mskeymessage",function(s){nae(i,a,s,n)}),a.addEventListener("mskeyerror",function(s){n.trigger({message:"Unexpected key error from key session with "+("code: "+a.error.code+" and systemCode: "+a.error.systemCode),target:a,type:"mskeyerror"})}),a.addEventListener("mskeyadded",function(){n.trigger({target:a,type:"mskeyadded"})})},sae=function(r){var e=r.video,t=r.initData,i=r.options,n=r.eventBus;e.msKeys&&delete e.msKeys;try{e.msSetMediaKeys(new H.MSMediaKeys(dh))}catch(a){throw new Error("Unable to create media keys for PlayReady key system. Error: "+a.message)}aae(e,t,i,n)},oae="3.11.2",lae=function(e,t){for(var i=0;i<e.length;i++)if(e[i].initData){var n=EM(e[i].initData),a=EM(t);if(Gne(n,a))return!0}return!1},uae=function(e,t){for(var i=0;i<e.length;i++)if(e[i].initData===t){e.splice(i,1);return}},uU=function(e,t,i,n,a){if(!i||!i.keySystems)return Promise.resolve();var s=t.initData;return Wne(i.keySystems).then(function(o){var l=o.keySystem;return i.keySystems[l]&&i.keySystems[l].pssh&&(s=i.keySystems[l].pssh),lae(n,s)||!s?Promise.resolve():(n.push({initData:s}),Zne({player:e,video:t.target,initDataType:t.initDataType,initData:s,keySystemAccess:o,options:i,removeSession:uae.bind(null,n),eventBus:a}))})},cae=function(e,t,i){return!t.keySystems||!t.keySystems[_A]||!e.initData?Promise.resolve():iae({video:e.target,initData:e.initData,options:t,eventBus:i})},cU=function(e,t,i,n){if(!(!t.keySystems||!t.keySystems[dh])&&!i.reduce(function(s,o){return s||o.playready},!1)){var a=e.initData;t.keySystems[dh]&&t.keySystems[dh].pssh&&(a=t.keySystems[dh].pssh),a&&(i.push({playready:!0,initData:a}),sae({video:e.target,initData:a,options:t,eventBus:n}))}},jg=function(e){return yA(e.currentSource(),e.eme.options)},Xd=function(e){var t=e.src();t!==e.eme.activeSrc&&(e.eme.activeSrc=t,e.eme.sessions=[])},hae=function(e){return function(t){var i={code:5};typeof t=="string"?i.message=t:t&&(t.message&&(i.message=t.message),t.cause&&(t.cause.length||t.cause.byteLength)&&(i.cause=t.cause)),e.error(i)}},fae=function(e,t){if(e.$(".vjs-tech").tagName.toLowerCase()==="video")if(Xd(e),H.WebKitMediaKeys){var i=function(a){Xd(e),cae(a,jg(e),e.tech_).catch(t)};e.tech_.el_.addEventListener("webkitneedkey",function(n){var a=jg(e),s=a.firstWebkitneedkeyTimeout||1e3,o=e.src();e.eme.webkitneedkey_=e.eme.webkitneedkey_||{},e.eme.webkitneedkey_.src!==o&&(e.eme.webkitneedkey_={handledFirstEvent:!1,src:o}),e.eme.webkitneedkey_.handledFirstEvent?i(n):(e.clearTimeout(e.eme.webkitneedkey_.timeout),e.eme.webkitneedkey_.timeout=e.setTimeout(function(){e.eme.webkitneedkey_.handledFirstEvent=!0,e.eme.webkitneedkey_.timeout=null,i(n)},s))})}else H.MediaKeys?e.tech_.el_.addEventListener("encrypted",function(n){Xd(e),uU(e,n,jg(e),e.eme.sessions,e.tech_).catch(t)}):H.MSMediaKeys&&(e.tech_.el_.addEventListener("msneedkey",function(n){Xd(e);try{cU(n,jg(e),e.eme.sessions,e.tech_)}catch(a){t(a)}}),e.tech_.on("mskeyerror",t),e.on("dispose",function(){e.tech_.off("mskeyerror",t)}))},hU=function(e){e===void 0&&(e={});var t=this,i=hae(t);t.ready(function(){return fae(t,i)}),t.eme={initializeMediaKeys:function(a,s,o){a===void 0&&(a={}),s===void 0&&(s=function(){}),o===void 0&&(o=!1);var l=yA(t.currentSource(),e,a),u={initDataType:"cenc",initData:null,target:t.tech_.el_};if(Xd(t),t.tech_.el_.setMediaKeys)uU(t,u,l,t.eme.sessions,t.tech_).then(function(){return s()}).catch(function(h){s(h),o||i(h)});else if(t.tech_.el_.msSetMediaKeys){var c=function h(d){t.tech_.off("mskeyadded",h),t.tech_.off("mskeyerror",h),d.type==="mskeyerror"?(s(d.target.error),o||i(d.message)):s()};t.tech_.one("mskeyadded",c),t.tech_.one("mskeyerror",c);try{cU(u,l,t.eme.sessions,t.tech_)}catch(h){t.tech_.off("mskeyadded",c),t.tech_.off("mskeyerror",c),s(h),o||i(h)}}},options:e}};K.registerPlugin("eme",hU);hU.VERSION=oae;function PM(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function Yr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?PM(Object(t),!0).forEach(function(i){vae(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):PM(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function dae(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function pae(r){var e=dae(r,"string");return typeof e=="symbol"?e:e+""}function MM(r,e,t,i,n,a,s){try{var o=r[a](s),l=o.value}catch(u){t(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function ih(r){return function(){var e=this,t=arguments;return new Promise(function(i,n){var a=r.apply(e,t);function s(l){MM(a,i,n,s,o,"next",l)}function o(l){MM(a,i,n,s,o,"throw",l)}s(void 0)})}}function vae(r,e,t){return e=pae(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gae(r,e){if(r==null)return{};var t={},i=Object.keys(r),n,a;for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&(t[n]=r[n]);return t}function LM(r,e){if(r==null)return{};var t=gae(r,e),i,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)i=a[n],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(r,i)&&(t[i]=r[i])}return t}var mae="1.12.1";const yae=K.getComponent("player");class _ae extends yae{constructor(e,t,i){t=K.obj.merge(t,{plugins:{eme:!0}}),super(e,t,i)}audioTrack(e){const t=Array.from(this.player().audioTracks());if(!e)return t.find(s=>s.enabled);const{kind:i,language:n}=e,a=t.find(s=>s.language===n&&s.kind===i)||t.find(s=>s.language===n);return a&&(a.enabled=!0),a}bufferedRanges(){const e=[];for(let t=0;t<this.buffered().length;t++){const i=this.buffered().start(t),n=this.buffered().end(t);e.push({start:i,end:n})}return e}playedPercent(){if(!Number.isFinite(this.duration()))return NaN;let e=0;for(let i=0;i!=this.played().length;i++)e+=this.played().end(i)-this.played().start(i);return e/this.duration()}playedRanges(){const e=[];for(let t=0;t<this.played().length;t++){const i=this.played().start(t),n=this.played().end(t);e.push({start:i,end:n})}return e}seekableRanges(){const e=[];for(let t=0;t<this.seekable().length;t++){const i=this.seekable().start(t),n=this.seekable().end(t);e.push({start:i,end:n})}return e}textTrack(e){const t=Array.from(this.player().textTracks()).filter(s=>!["chapters","metadata"].includes(s.kind));if(!e)return t.find(s=>s.mode==="showing");t.forEach(s=>s.mode="disabled");const{kind:i,language:n}=e;return t.find(s=>(s.language===n&&s.kind===i&&(s.mode="showing"),s.mode==="showing"))||t.find(s=>(s.language===n&&(s.mode="showing"),s.mode==="showing"))}}K.registerComponent("player",_ae);const sr=K;sr.VERSION={pillarbox:mae,videojs:K.VERSION,[K.VhsSourceHandler.name]:K.VhsSourceHandler.VERSION,eme:K.getPlugin("eme").VERSION};sr.options.enableSmoothSeeking=!0;sr.options.fill=!0;sr.options.html5={vhs:{useForcedSubtitles:!0}};sr.options.liveTracker={trackingThreshold:120,liveTolerance:15};sr.options.liveui=!0;sr.options.playsinline=!0;sr.options.responsive=!0;sr.options.trackers={};class kM{constructor(e="il.srgssr.ch"){this.setIlHost(e)}setIlHost(e){this.baseUrl=`${e}/integrationlayer/2.1/`}handleRequest(e){var t=this;return function(){var i=ih(function*(n){const a=typeof e=="function"?e(n):t.mediaCompositionUrlHandler(n),s=yield fetch(a);if(!s.ok)throw s;return yield s.json()});return function(n){return i.apply(this,arguments)}}()}mediaCompositionUrlHandler(e){return`https://${this.baseUrl}mediaComposition/byUrn/${e}?onlyChapters=true&vector=portalplay`}}const Mc={WIDTH_240:"240",WIDTH_320:"320",WIDTH_480:"480",WIDTH_960:"960",WIDTH_1920:"1920"},Xg={JPG:"jpg",WEBP:"webp",PNG:"png"},bae="https://il.srgssr.ch/images/";let Tae=class{static scale({url:e,width:t=Mc.WIDTH_960,format:i=Xg.JPG}={},n=bae){if(!e)return;const a=new URL(n);return a.searchParams.set("imageUrl",e),a.searchParams.set("format",i),a.searchParams.set("width",t),decodeURIComponent(a.href)}static get JPG(){return Xg.JPG}static get PNG(){return Xg.PNG}static get WEBP(){return Xg.WEBP}static get WIDTH_240(){return Mc.WIDTH_240}static get WIDTH_320(){return Mc.WIDTH_320}static get WIDTH_480(){return Mc.WIDTH_480}static get WIDTH_960(){return Mc.WIDTH_960}static get WIDTH_1920(){return Mc.WIDTH_1920}};const Sae={WIDEVINE:"com.widevine.alpha",FAIRPLAY:"com.apple.fps.1_0",PLAYREADY:"com.microsoft.playready"};class Zp{static buildKeySystems(e=[]){const t={};return e.forEach(i=>{const n=Zp.vendors[i.type];if(Zp.vendors.FAIRPLAY===n){const{certificateUrl:a,licenseUrl:s}=i;t[n]={certificateUri:a,licenseUri:s}}else t[n]=i.licenseUrl}),{keySystems:t}}static hasDrm(e){return e.some(({drmList:t})=>t&&t.length>0)}static get vendors(){return Sae}}const Yg={AKAMAI:"AKAMAI",NONE:"NONE"};class Pu{static aclPath(e){const t=e.pathname;return`${t.substring(0,t.lastIndexOf("/")+1)}*`}static get AKAMAI(){return Yg.AKAMAI}static hasToken(e){return e.some(t=>Pu.isAkamai(t.tokenType))}static isAkamai(e){return Yg.AKAMAI===e}static isNone(e){return Yg.NONE===e}static get NONE(){return Yg.NONE}static tokenize(e,t){const i=new URL(`${e.url}`),n=Pu.aclPath(i),a=`${t}${encodeURIComponent(n)}`;return fetch(a).then(s=>s.ok?s.json():Promise.reject({status:s.status,statusText:s.statusText})).then(({token:{authparams:s}})=>(new URLSearchParams(s).forEach((l,u)=>i.searchParams.set(u,l)),Object.assign({},e,{url:i.toString()}))).catch(s=>Promise.reject(s))}static tokenizeSources(e,t="https://tp.srgssr.ch/akahd/token?acl="){const i=[];return e.forEach(n=>{const a=Pu.tokenize(n,t);i.push(a)}),Promise.all(i).then(n=>n).catch(n=>Promise.reject(n))}}const RM="emptied",OM="ended",NM="loadeddata",BM="loadstart",Eb="pause",xae="play",Ib="playing",FM="ratechange",UM="seeking",Pb="timeupdate",VM="waiting";class su{constructor(e,{debug:t=!1,environment:i="prod",playerVersion:n="none",tagCommanderScriptURL:a="//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js"}={}){this.isDebugEnabled=t,this.elapsedPlaybackTime=0,this.environment=i,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isSeeking=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.pendingTagCommanderReload=!1,this.player=e,this.playerVersion=n,this.srcMediaData=void 0,this.startPlaybackSession=0,this.tagCommanderScriptURL=a,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0,this.initScript(),this.initListeners()}beforeunload(){this.notify("stop")}clearTimers(){clearInterval(this.heartBeatIntervalId),clearInterval(this.uptimeIntervalId),clearTimeout(this.uptimeTimeoutId)}currentTime(){return Math.round(this.trackedCurrentTime)}debug(e){if(e===void 0)return this.isDebugEnabled||this.player.debug();this.isDebugEnabled=!!e}destroy(){this.clearTimers(),window.tc_vars||(window.tc_vars={}),this.elapsedPlaybackTime=0,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.srcMediaData=void 0,this.startPlaybackSession=0,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0}dispose(){this.beforeunload(),this.clearTimers(),window.removeEventListener("beforeunload",this.beforeunloadListener),this.player.off(RM,this.emptiedListener),this.player.off(OM,this.endedListener),this.player.off(BM,this.loadstartListener),this.player.off(NM,this.loadeddataListener),this.player.off(Ib,this.playListener),this.player.off(Eb,this.pauseListener),this.player.off(FM,this.rateChangeListener),this.player.off(UM,this.seekingListener),this.player.off(Pb,this.timeUpdateListener),this.player.off(VM,this.waitingListener)}emptied(){this.player.ended()||this.notify("stop")}ended(){this.notify("eof"),this.mediaSession=0,this.clearTimers()}flush(){this.isTrackerDisabled()||(this.pendingTagCommanderReload&&window.tC&&(window.tC.container.reload(),this.pendingTagCommanderReload=!1),window.tc_events_11&&this.pendingQueue.length>0&&(this.pendingQueue.forEach(e=>{window.tc_events_11(this.player.el(),e.action,e.labels)}),this.pendingQueue=[]))}getCurrentAudioTrack(){const e=Array.from(this.player.audioTracks()).find(i=>i.enabled);let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getCurrentTextTrack(){const e=this.player.textTrack();let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getDvrWindowPosition(){const{liveTracker:e}=this.player,t=this.currentTime()-e.seekableStart()|0,i=e.liveWindow()-t;return i<0||i===1/0?0:i*1e3}getDvrWindowSize(){const e=this.player.liveTracker.liveWindow()===1/0,t=this.player.liveTracker.liveWindow()*1e3;return e?0:t}getElapsedPlaybackTime(){return this.startPlaybackSession?this.getElapsedPlayingTime():this.elapsedPlaybackTime}getElapsedPlayingTime(){const e=su.now()-this.startPlaybackSession|0;return this.elapsedPlaybackTime+e}getEventLabels(e){const t={event_id:e,event_timestamp:su.now(),media_dvr_window_length:0,media_dvr_window_offset:0,media_is_dvr:!1,media_is_live:!1,media_mute:this.player.muted()?"1":"0",media_playback_rate:this.player.playbackRate(),media_position:this.currentTime(),media_quality:this.srcMediaData.mediaData.quality,media_subtitles_on:this.isTextTrackEnabled(),media_volume:(this.player.volume()*100).toFixed(0),navigation_environment:this.environment};return this.isAudioTrackEnabled()&&(t.media_audio_track=this.getCurrentAudioTrack()),this.isTextTrackEnabled()&&(t.media_subtitle_selection=this.getCurrentTextTrack()),this.isMediaOnDemand()||(t.media_is_live=!0,t.media_position=this.getElapsedPlaybackTime()),this.isMediaDvr()&&(t.media_dvr_window_offset=this.getDvrWindowPosition()|0,t.media_dvr_window_length=this.getDvrWindowSize()|0,t.media_is_dvr=!0,t.media_timeshift=[xae,Eb].includes(e)?this.timeShifted():0),t}getInternalLabels(){const e={media_bu_distributer:this.srcMediaData.mediaData.vendor,media_chromecast_selected:!!this.player.tech(!0).isCasting,media_embedding_url:document.referrer,media_player_display:"default",media_player_name:"pillarbox-web",media_player_version:this.playerVersion,media_url:this.srcMediaData.src},t=this.srcMediaData.mediaData.analyticsMetadata||{};window.tc_vars=Object.assign({},window.tc_vars,e,t)}heartBeat(){this.heartBeatIntervalId=setInterval(()=>{this.player.paused()||this.notify("pos")},3e4)}initCallbacks(){this.beforeunloadListener=this.beforeunload.bind(this),this.emptiedListener=this.emptied.bind(this),this.endedListener=this.ended.bind(this),this.loadstartListener=this.loadstart.bind(this),this.loadeddataListener=this.loadeddata.bind(this),this.playListener=this.play.bind(this),this.pauseListener=this.pause.bind(this),this.rateChangeListener=this.rateChange.bind(this),this.seekingListener=this.seeking.bind(this),this.timeUpdateListener=this.timeUpdate.bind(this),this.waitingListener=this.waiting.bind(this)}initListeners(){this.initCallbacks(),window.addEventListener("beforeunload",this.beforeunloadListener),this.player.on(RM,this.emptiedListener),this.player.on(OM,this.endedListener),this.player.on(BM,this.loadstartListener),this.player.on(NM,this.loadeddataListener),this.player.on(Ib,this.playListener),this.player.on(Eb,this.pauseListener),this.player.on(FM,this.rateChangeListener),this.player.on(UM,this.seekingListener),this.player.on(Pb,this.timeUpdateListener),this.player.on(VM,this.waitingListener),this.player.one("dispose",this.dispose.bind(this))}initScript(){const e="tc_script__11";if(!document.querySelector(`#${e}`)){const t=document.createElement("script"),i=this.tagCommanderScriptURL;t.defer=!0,t.id=e,t.src=i,t.type="text/javascript",t.onload=n=>{this.flush()},document.body.appendChild(t)}}isAudioTrackEnabled(){return!!this.getCurrentAudioTrack()}isMediaDvr(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e<this.player.liveTracker.liveWindow()}isMediaLive(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&e>this.player.liveTracker.liveWindow()}isMediaOnDemand(){return Number.isFinite(this.player.duration())}isTextTrackEnabled(){return!!this.getCurrentTextTrack()}isTrackerDisabled(){return!this.srcMediaData||!this.srcMediaData.mediaData?!0:Array.isArray(this.srcMediaData.disableTrackers)?!!this.srcMediaData.disableTrackers.find(e=>e.toLowerCase()===su.name.toLowerCase()):!!this.srcMediaData.disableTrackers}loadstart(){this.destroy(),this.updateSrcMediaData(this.player.currentSource()),!this.isTrackerDisabled()&&(this.getInternalLabels(),this.reloadTagCommanderContainer(),this.notify("buffer_start"),this.hasStarted=!1)}loadeddata(){this.notify("init"),this.initialized=!0,this.notify("buffer_stop")}log(e,t,i="log"){this.debug()&&console[i](`SRGAnalytics:${e}`,t,window.tc_vars)}notify(e,t){if(this.isTrackerDisabled())return;try{this.flush()}catch(n){this.log(e,n,"error")}const i=Object.assign({},this.getEventLabels(e),t);this.log(e,i);try{window.tc_events_11?window.tc_events_11(this.player.el(),e,i):this.pendingQueue.push({action:e,labels:i})}catch(n){this.log(e,n,"error")}}static now(){return(Date.now()/1e3).toFixed(0)}play(){this.hasStarted||(this.hasStarted=!0),!this.startPlaybackSession&&!this.isMediaOnDemand()&&(this.startPlaybackSession=su.now()),this.mediaSession===0&&(this.mediaSession=su.now(),this.heartBeat(),this.uptime()),this.timeUpdate(),this.notify("play"),this.isSeeking&&(this.isSeeking=!1)}pause(){if(this.isMediaOnDemand()||(this.elapsedPlaybackTime=this.getElapsedPlayingTime(),this.startPlaybackSession=0),!this.player.seeking()&&!this.isMediaLive()&&this.player.currentTime()<this.player.duration()){this.notify("pause");return}this.hasStarted&&!this.isSeeking&&(this.notify("seek"),this.isSeeking=!0)}rateChange(){this.notify("change_playback_rate")}reloadTagCommanderContainer(){window.tC?(window.tC.container.reload(),this.pendingTagCommanderReload=!1):this.pendingTagCommanderReload=!0}seeking(){this.hasStarted&&!this.player.paused()&&!this.isSeeking&&(this.notify("seek"),this.isSeeking=!0)}timeUpdate(){this.player.paused()||(this.trackedCurrentTime=this.player.currentTime())}timeShifted(){const e=this.player.liveTracker.atLiveEdge(),t=this.player.liveTracker.liveCurrentTime(),i=this.player.currentTime();return e?0:(t-i).toFixed(0)}updateSrcMediaData(e){this.srcMediaData=e}uptime(){const e=()=>{!this.player.paused()&&!this.isMediaOnDemand()&&this.notify("uptime")};this.uptimeTimeoutId=setTimeout(()=>{e(),this.uptimeIntervalId=setInterval(()=>{e()},6e4)},3e4)}waiting(){if(!this.initialized||this.isWaiting)return;const e=()=>{this.isWaiting=!1,this.notify("buffer_stop")};this.isWaiting=!0,this.notify("buffer_start"),sr.browser.IS_ANY_SAFARI?this.player.one(Pb,e):this.player.one(Ib,e)}}class wae{findChapterByUrn(e){if(this.chapterList){const[t]=this.chapterList.filter(i=>i.urn===e);return t}}findMainSegment(){if(!this.segmentUrn)return;const e=this.getMainSegments(),[t]=e.filter(i=>i.urn===this.segmentUrn);return t}findResourceListByUrn(e){const t=this.findChapterByUrn(e);if(t)return t.resourceList||[]}getChapters(){const e="AUDIO";return this.getMainChapter().mediaType===e?[]:this.chapterList.filter(({mediaType:t})=>t!==e)}getFilteredExternalSubtitles(){const{subtitleList:e}=this.getMainChapter(),[{subtitleInformationList:t}={}]=this.getResourceList().filter(({subtitleInformationList:a})=>a),i=e&&!t;if(!e)return[];const n=e.filter(a=>a.format!=="TTML");return i?n:n.filter(a=>!t.find(o=>o.locale===a.locale&&a.type===o.type))}getMainBlockReason(){const e=this.getMainChapter();if(!e)return;let{blockReason:t}=e;return!t&&new Date<this.getMainValidFromDate()&&(t="STARTDATE"),t}getMainBlockedSegments(){return this.getMainSegments().filter(e=>e.blockReason)}getMainChapter(){return this.mainChapter||(this.mainChapter=this.findChapterByUrn(this.chapterUrn)),!this.mainChapter&&this.chapterList&&this.chapterList.length>0&&([this.mainChapter]=this.chapterList),this.mainChapter}getMainChapterImageUrl(){const e=this.getMainChapter();if(!(!e||!e.imageUrl))return e.imageUrl}getMainResources(){const e=this.getResourceList();if(!(!e||!e.length))return e.map(t=>({analyticsData:this.getMergedAnalyticsData(t.analyticsData),analyticsMetadata:this.getMergedAnalyticsMetadata(t.analyticsMetadata),blockReason:this.getMainChapter().blockReason,blockedSegments:this.getMainBlockedSegments(),imageUrl:this.getMainChapterImageUrl(),chapters:this.getChapters(),drmList:t.drmList,dvr:t.dvr,eventData:this.getMainChapter().eventData,id:this.getMainChapter().id,imageCopyright:this.getMainChapter().imageCopyright,intervals:this.getMainTimeIntervals(),live:t.live,mediaType:this.getMainChapter().mediaType,mimeType:t.mimeType,presentation:t.presentation,quality:t.quality,streaming:t.streaming,streamOffset:t.streamOffset,subtitles:this.getFilteredExternalSubtitles(),title:this.getMainChapter().title,tokenType:t.tokenType,url:t.url,urn:this.chapterUrn,vendor:this.getMainChapter().vendor}))}getMainSegments(){const e=this.getMainChapter();return!this.mainSegments&&e&&e.segmentList&&(this.mainSegments=e.segmentList),this.mainSegments||[]}getMainTimeIntervals(){const{timeIntervalList:e=[]}=this.getMainChapter()||{};return e}getMainValidFromDate(){const e=this.getMainChapter();if(!e)return new Date(0);const{validFrom:t}=e;if(t)return new Date(t)}getMergedAnalyticsData(e){return Yr(Yr(Yr({},this.analyticsData),this.getMainChapter().analyticsData),e)}getMergedAnalyticsMetadata(e){return Yr(Yr(Yr({},this.analyticsMetadata),this.getMainChapter().analyticsMetadata),e)}getResourceList(){const{resourceList:e}=this.getMainChapter();return e||[]}}var fU="Wiedergabe",dU="Pause",pU="Erneut abspielen",vU="Dauer",gU="LIVE",mU="Geladen",yU="Status",_U="Vollbild",bU="Stumm schalten",TU="Ton einschalten",SU="Untertitel",xU="Untertitel",wU="Kapitel",CU="Schließen",AU="Beschreibungen",DU="Schrift",EU="Weiß",IU="Schwarz",PU="Rot",MU="Grün",LU="Blau",kU="Gelb",RU="Magenta",OU="Türkis",NU="Hintergrund",BU="Fenster",FU="Durchsichtig",UU="Undurchsichtig",VU="Kein",zU="Erhoben",GU="Gedrückt",HU="Uniform",$U="Zwanglos",WU="Schreibschrift",qU="Zurücksetzen",jU="Fertig",XU="Farbe",YU="Deckkraft",Cae={Play:fU,Pause:dU,Replay:pU,"Current Time":"Aktueller Zeitpunkt",Duration:vU,"Remaining Time":"Verbleibende Zeit","Stream Type":"Streamtyp",LIVE:gU,Loaded:mU,Progress:yU,Fullscreen:_U,"Exit Fullscreen":"Vollbildmodus beenden",Mute:bU,Unmute:TU,"Playback Rate":"Wiedergabegeschwindigkeit",Subtitles:SU,"subtitles off":"Untertitel aus",Captions:xU,"captions off":"Untertitel aus",Chapters:wU,"You aborted the media playback":"Sie haben die Videowiedergabe abgebrochen.","A network error caused the media download to fail part-way.":"Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.","No compatible source was found for this media.":"Für dieses Video wurde keine kompatible Quelle gefunden.","Play Video":"Video abspielen",Close:CU,"Modal Window":"Modales Fenster","This is a modal window":"Dies ist ein modales Fenster","This modal can be closed by pressing the Escape key or activating the close button.":'Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche "Schließen" wird dieses modale Fenster geschlossen.',", opens captions settings dialog":", öffnet Einstellungen für Untertitel",", opens subtitles settings dialog":", öffnet Einstellungen für Untertitel",", selected":", ausgewählt","captions settings":"Untertiteleinstellungen","subtitles settings":"Untertiteleinstellungen","descriptions settings":"Einstellungen für Beschreibungen","Close Modal Dialog":"Modales Fenster schließen",Descriptions:AU,"descriptions off":"Beschreibungen aus","The media is encrypted and we do not have the keys to decrypt it.":"Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.",", opens descriptions settings dialog":", öffnet Einstellungen für Beschreibungen","Audio Track":"Tonspur",Text:DU,White:EU,Black:IU,Red:PU,Green:MU,Blue:LU,Yellow:kU,Magenta:RU,Cyan:OU,Background:NU,Window:BU,Transparent:FU,"Semi-Transparent":"Halbdurchsichtig",Opaque:UU,"Font Size":"Schriftgröße","Text Edge Style":"Textkantenstil",None:VU,Raised:zU,Depressed:GU,Uniform:HU,"Drop shadow":"Schlagschatten","Font Family":"Schriftfamilie","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:$U,Script:WU,"Small Caps":"Small-Caps",Reset:qU,"restore all settings to the default values":"Alle Einstellungen auf die Standardwerte zurücksetzen",Done:jU,"Caption Settings Dialog":"Einstellungsdialog für Untertitel","Beginning of dialog window. Escape will cancel and close the window.":"Anfang des Dialogfensters. Esc bricht ab und schließt das Fenster.","End of dialog window.":"Ende des Dialogfensters.","Audio Player":"Audio-Player","Video Player":"Video-Player","Progress Bar":"Fortschrittsbalken","progress bar timing: currentTime={1} duration={2}":"{1} von {2}","Volume Level":"Lautstärke","{1} is loading.":"{1} wird geladen.","Seek to live, currently behind live":"Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.","Seek to live, currently playing live":"Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.","Exit Picture-in-Picture":"Bild-im-Bild-Modus beenden","Picture-in-Picture":"Bild-im-Bild-Modus","No content":"Kein Inhalt",Color:XU,Opacity:YU,"Text Background":"Texthintergrund","Caption Area Background":"Hintergrund des Untertitelbereichs","Playing in Picture-in-Picture":"Wird im Bild-im-Bild-Modus wiedergegeben","Skip forward {1} seconds":"{1} Sekunden vorwärts","Skip backward {1} seconds":"{1} Sekunden zurück"},Aae=Object.freeze({__proto__:null,Background:NU,Black:IU,Blue:LU,Captions:xU,Casual:$U,Chapters:wU,Close:CU,Color:XU,Cyan:OU,Depressed:GU,Descriptions:AU,Done:jU,Duration:vU,Fullscreen:_U,Green:MU,LIVE:gU,Loaded:mU,Magenta:RU,Mute:bU,None:VU,Opacity:YU,Opaque:UU,Pause:dU,Play:fU,Progress:yU,Raised:zU,Red:PU,Replay:pU,Reset:qU,Script:WU,Subtitles:SU,Text:DU,Transparent:FU,Uniform:HU,Unmute:TU,White:EU,Window:BU,Yellow:kU,default:Cae}),KU="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 20:00 und 06:00 Uhr zur Verfügung.",ZU="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 23:00 und 05:00 Uhr zur Verfügung.",QU="Die Werbung wurde übersprungen.",JU="Dieser Inhalt ist nicht mehr verfügbar.",e6="Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.",t6="Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.",r6="Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.",i6="Dieser Inhalt ist nicht verfügbar.",Dae={AGERATING12:KU,AGERATING18:ZU,COMMERCIAL:QU,ENDDATE:JU,GEOBLOCK:e6,LEGAL:t6,STARTDATE:r6,UNKNOWN:i6},Eae=Object.freeze({__proto__:null,AGERATING12:KU,AGERATING18:ZU,COMMERCIAL:QU,ENDDATE:JU,GEOBLOCK:e6,LEGAL:t6,STARTDATE:r6,UNKNOWN:i6,default:Dae});sr.addLanguage("de",Yr(Yr({},Aae),Eae));var n6="Play",a6="Pause",s6="Replay",o6="Duration",l6="LIVE",u6="Loaded",c6="Progress",h6="Fullscreen",f6="Mute",d6="Unmute",p6="Subtitles",v6="Captions",g6="Chapters",m6="Descriptions",y6="Close",_6="Text",b6="White",T6="Black",S6="Red",x6="Green",w6="Blue",C6="Yellow",A6="Magenta",D6="Cyan",E6="Background",I6="Window",P6="Transparent",M6="Opaque",L6="None",k6="Raised",R6="Depressed",O6="Uniform",N6="Casual",B6="Script",F6="Reset",U6="Done",V6="Color",z6="Opacity",Iae={"Audio Player":"Audio Player","Video Player":"Video Player",Play:n6,Pause:a6,Replay:s6,"Current Time":"Current Time",Duration:o6,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:l6,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:u6,Progress:c6,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:h6,"Exit Fullscreen":"Exit Fullscreen",Mute:f6,Unmute:d6,"Playback Rate":"Playback Rate",Subtitles:p6,"subtitles off":"subtitles off",Captions:v6,"captions off":"captions off",Chapters:g6,Descriptions:m6,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:y6,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:_6,White:b6,Black:T6,Red:S6,Green:x6,Blue:w6,Yellow:C6,Magenta:A6,Cyan:D6,Background:E6,Window:I6,Transparent:P6,"Semi-Transparent":"Semi-Transparent",Opaque:M6,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:L6,Raised:k6,Depressed:R6,Uniform:O6,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N6,Script:B6,"Small Caps":"Small Caps",Reset:F6,"restore all settings to the default values":"restore all settings to the default values",Done:U6,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V6,Opacity:z6,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},Pae=Object.freeze({__proto__:null,Background:E6,Black:T6,Blue:w6,Captions:v6,Casual:N6,Chapters:g6,Close:y6,Color:V6,Cyan:D6,Depressed:R6,Descriptions:m6,Done:U6,Duration:o6,Fullscreen:h6,Green:x6,LIVE:l6,Loaded:u6,Magenta:A6,Mute:f6,None:L6,Opacity:z6,Opaque:M6,Pause:a6,Play:n6,Progress:c6,Raised:k6,Red:S6,Replay:s6,Reset:F6,Script:B6,Subtitles:p6,Text:_6,Transparent:P6,Uniform:O6,Unmute:d6,White:b6,Window:I6,Yellow:C6,default:Iae}),G6="To protect children this content is only available between 8PM and 6AM.",H6="To protect children this content is only available between 10PM and 5AM.",$6="This commercial content is not available.",W6="This content is not available anymore.",q6="This content is not available outside Switzerland.",j6="This content is not available due to legal restrictions.",X6="This content is not available yet.",Y6="This content is not available.",Mae={AGERATING12:G6,AGERATING18:H6,COMMERCIAL:$6,ENDDATE:W6,GEOBLOCK:q6,LEGAL:j6,STARTDATE:X6,UNKNOWN:Y6},Lae=Object.freeze({__proto__:null,AGERATING12:G6,AGERATING18:H6,COMMERCIAL:$6,ENDDATE:W6,GEOBLOCK:q6,LEGAL:j6,STARTDATE:X6,UNKNOWN:Y6,default:Mae});sr.addLanguage("en",Yr(Yr({},Pae),Lae));var K6="Lecture",Z6="Pause",Q6="Revoir",J6="Durée",eV="EN DIRECT",tV="Chargé",rV="Progression",iV="Plein écran",nV="Mettre en sourdine",aV="Activer le son",sV="Sous-titres",oV="Sous-titres transcrits",lV="Chapitres",uV="Descriptions",cV="Fermer",hV="Texte",fV="Blanc",dV="Noir",pV="Rouge",vV="Vert",gV="Bleu",mV="Jaune",yV="Magenta",_V="Cyan",bV="Arrière-plan",TV="Fenêtre",SV="Transparent",xV="Opaque",wV="Aucun",CV="Élevé",AV="Enfoncé",DV="Uniforme",EV="Manuscrite",IV="Scripte",PV="Réinitialiser",MV="Terminé",LV="Couleur",kV="Opacité",kae={"Audio Player":"Lecteur audio","Video Player":"Lecteur vidéo",Play:K6,Pause:Z6,Replay:Q6,"Current Time":"Temps actuel",Duration:J6,"Remaining Time":"Temps restant","Stream Type":"Type de flux",LIVE:eV,"Seek to live, currently behind live":"Rechercher le direct, actuellement après le direct","Seek to live, currently playing live":"Rechercher le direct, le direct actuellement en cours de lecture",Loaded:tV,Progress:rV,"Progress Bar":"Barre de progression","progress bar timing: currentTime={1} duration={2}":"{1} de {2}",Fullscreen:iV,"Exit Fullscreen":"Fenêtré",Mute:nV,Unmute:aV,"Playback Rate":"Vitesse de lecture",Subtitles:sV,"subtitles off":"Sous-titres désactivés",Captions:oV,"captions off":"Sous-titres transcrits désactivés",Chapters:lV,Descriptions:uV,"descriptions off":"descriptions désactivées","Audio Track":"Piste audio","Volume Level":"Niveau de volume","You aborted the media playback":"Vous avez interrompu la lecture de la vidéo.","A network error caused the media download to fail part-way.":"Une erreur de réseau a interrompu le téléchargement de la vidéo.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.","No compatible source was found for this media.":"Aucune source compatible n'a été trouvée pour cette vidéo.","The media is encrypted and we do not have the keys to decrypt it.":"Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.","Play Video":"Lire la vidéo",Close:cV,"Close Modal Dialog":"Fermer la boîte de dialogue modale","Modal Window":"Fenêtre modale","This is a modal window":"Ceci est une fenêtre modale","This modal can be closed by pressing the Escape key or activating the close button.":"Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.",", opens captions settings dialog":", ouvrir les paramètres des sous-titres transcrits",", opens subtitles settings dialog":", ouvrir les paramètres des sous-titres",", opens descriptions settings dialog":", ouvrir les paramètres des descriptions",", selected":", sélectionné","captions settings":"Paramètres des sous-titres transcrits","subtitles settings":"Paramètres des sous-titres","descriptions settings":"Paramètres des descriptions",Text:hV,White:fV,Black:dV,Red:pV,Green:vV,Blue:gV,Yellow:mV,Magenta:yV,Cyan:_V,Background:bV,Window:TV,Transparent:SV,"Semi-Transparent":"Semi-transparent",Opaque:xV,"Font Size":"Taille des caractères","Text Edge Style":"Style des contours du texte",None:wV,Raised:CV,Depressed:AV,Uniform:DV,"Drop shadow":"Ombre portée","Font Family":"Famille de polices","Proportional Sans-Serif":"Polices à chasse variable sans empattement (Proportional Sans-Serif)","Monospace Sans-Serif":"Polices à chasse fixe sans empattement (Monospace Sans-Serif)","Proportional Serif":"Polices à chasse variable avec empattement (Proportional Serif)","Monospace Serif":"Polices à chasse fixe avec empattement (Monospace Serif)",Casual:EV,Script:IV,"Small Caps":"Petites capitales",Reset:PV,"restore all settings to the default values":"Restaurer tous les paramètres aux valeurs par défaut",Done:MV,"Caption Settings Dialog":"Boîte de dialogue des paramètres des sous-titres transcrits","Beginning of dialog window. Escape will cancel and close the window.":"Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.","End of dialog window.":"Fin de la fenêtre de dialogue.","Exit Picture-in-Picture":"Quitter le mode image dans l'image","Picture-in-Picture":"Image dans l'image","{1} is loading.":"{1} en cours de chargement.","No content":"Aucun contenu",Color:LV,Opacity:kV,"Text Background":"Arrière-plan du texte","Caption Area Background":"Arrière-plan de la zone de sous-titre","Skip backward {1} seconds":"Reculer de {1} secondes","Skip forward {1} seconds":"Avancer de {1} secondes"},Rae=Object.freeze({__proto__:null,Background:bV,Black:dV,Blue:gV,Captions:oV,Casual:EV,Chapters:lV,Close:cV,Color:LV,Cyan:_V,Depressed:AV,Descriptions:uV,Done:MV,Duration:J6,Fullscreen:iV,Green:vV,LIVE:eV,Loaded:tV,Magenta:yV,Mute:nV,None:wV,Opacity:kV,Opaque:xV,Pause:Z6,Play:K6,Progress:rV,Raised:CV,Red:pV,Replay:Q6,Reset:PV,Script:IV,Subtitles:sV,Text:hV,Transparent:SV,Uniform:DV,Unmute:aV,White:fV,Window:TV,Yellow:mV,default:kae}),RV="Pour protéger les enfants, ce contenu est accessible entre 20h et 6h.",OV="Pour protéger les enfants, ce contenu est accessible entre 23h et 5h.",NV="Ce contenu n'est actuellement pas disponible.",BV="Ce contenu n'est plus disponible.",FV="La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.",UV="Pour des raisons juridiques, ce contenu n'est pas disponible.",VV="Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.",zV="Ce contenu n'est actuellement pas disponible.",Oae={AGERATING12:RV,AGERATING18:OV,COMMERCIAL:NV,ENDDATE:BV,GEOBLOCK:FV,LEGAL:UV,STARTDATE:VV,UNKNOWN:zV},Nae=Object.freeze({__proto__:null,AGERATING12:RV,AGERATING18:OV,COMMERCIAL:NV,ENDDATE:BV,GEOBLOCK:FV,LEGAL:UV,STARTDATE:VV,UNKNOWN:zV,default:Oae});sr.addLanguage("fr",Yr(Yr({},Rae),Nae));var GV="Play",HV="Pausa",$V="Replay",WV="Durata",qV="LIVE",jV="Caricato",XV="Stato",YV="Schermo intero",KV="Disattiva laudio",ZV="Attiva laudio",QV="Sottotitoli",JV="Sottotitoli non udenti",ez="Capitolo",tz="Descrizioni",rz="Chiudi",iz="Testo",nz="Bianco",az="Nero",sz="Rosso",oz="Verde",lz="Blu",uz="Giallo",cz="Magenta",hz="Ciano",fz="Sfondo",dz="Finestra",pz="Trasparente",vz="Opaco",gz="Nessuno",mz="Uniforme",yz="Reinizializza",_z="Fatto",bz="Colore",Tz="Opacità",Bae={"Audio Player":"Lettore audio","Video Player":"Lettore video",Play:GV,Pause:HV,Replay:$V,"Current Time":"Orario attuale",Duration:WV,"Remaining Time":"Tempo rimanente","Stream Type":"Tipo di streaming",LIVE:qV,Loaded:jV,Progress:XV,"Progress Bar":"Barra di avanzamento","progress bar timing: currentTime={1} duration={2}":"{1} di {2}",Fullscreen:YV,"Exit Fullscreen":"Chiudi Schermo intero",Mute:KV,Unmute:ZV,"Playback Rate":"Velocità di riproduzione",Subtitles:QV,"subtitles off":"Senza sottotitoli",Captions:JV,"captions off":"Senza sottotitoli non udenti",Chapters:ez,Descriptions:tz,"descriptions off":"Descrizioni disattivate","Audio Track":"Traccia audio","Volume Level":"Livello del volume","You aborted the media playback":"La riproduzione del contenuto multimediale è stata interrotta.","A network error caused the media download to fail part-way.":"Il download del contenuto multimediale è stato interrotto a causa di un problema rete.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per lutilizzo di impostazioni non supportate dal browser.","No compatible source was found for this media.":"Non ci sono fonti compatibili per questo contenuto multimediale.","The media is encrypted and we do not have the keys to decrypt it.":"Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.","Play Video":"Riproduci il video",Close:rz,"Close Modal Dialog":"Chiudi la finestra di dialogo","Modal Window":"Finestra di dialogo","This is a modal window":"Questa è una finestra di dialogo","This modal can be closed by pressing the Escape key or activating the close button.":"Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.",", opens captions settings dialog":", aprire i parametri della trascrizione dei sottotitoli",", opens subtitles settings dialog":", aprire i parametri dei sottotitoli",", opens descriptions settings dialog":", aprire i parametri delle descrizioni",", selected":", selezionato","captions settings":"Parametri sottotitoli non udenti","subtitles settings":"Parametri sottotitoli","descriptions settings":"Parametri descrizioni",Text:iz,White:nz,Black:az,Red:sz,Green:oz,Blue:lz,Yellow:uz,Magenta:cz,Cyan:hz,Background:fz,Window:dz,Transparent:pz,"Semi-Transparent":"Semi-Trasparente",Opaque:vz,"Font Size":"Dimensione dei caratteri","Text Edge Style":"Stile dei bordi del testo",None:gz,Uniform:mz,"Drop shadow":"Ombra","Font Family":"Carattere","Proportional Sans-Serif":"Sans-Serif proporzionale","Monospace Sans-Serif":"Sans-Serif monospaziato","Proportional Serif":"Serif proporzionale","Monospace Serif":"Serif monospaziato","Small Caps":"Maiuscoletto",Reset:yz,"restore all settings to the default values":"Ripristina i valori predefiniti per tutti i parametri",Done:_z,"Caption Settings Dialog":"Finestra di dialogo dei parametri della trascrizione dei sottotitoli","Beginning of dialog window. Escape will cancel and close the window.":"Inizio della finestra di dialogo. Il tasto Esc annullerà loperazione e chiuderà la finestra.","End of dialog window.":"Fine della finestra di dialogo.","{1} is loading.":"{1} in fase di caricamento.","Exit Picture-in-Picture":"Esci dalla modalità Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture",Color:bz,Opacity:Tz,"Text Background":"Sfondo testo","Caption Area Background":"Sfondo area sottotitoli","Skip forward {1} seconds":"Avanti {1} secondi","Skip backward {1} seconds":"Indietro {1} secondi"},Fae=Object.freeze({__proto__:null,Background:fz,Black:az,Blue:lz,Captions:JV,Chapters:ez,Close:rz,Color:bz,Cyan:hz,Descriptions:tz,Done:_z,Duration:WV,Fullscreen:YV,Green:oz,LIVE:qV,Loaded:jV,Magenta:cz,Mute:KV,None:gz,Opacity:Tz,Opaque:vz,Pause:HV,Play:GV,Progress:XV,Red:sz,Replay:$V,Reset:yz,Subtitles:QV,Text:iz,Transparent:pz,Uniform:mz,Unmute:ZV,White:nz,Window:dz,Yellow:uz,default:Bae}),Sz="Per proteggere i bambini, questo media è disponibile solo fra le 20 e le 6.",xz="Per proteggere i bambini, questo media è disponibile solo fra le 23 le 5.",wz="Questo contenuto commerciale non è disponibile.",Cz="Questo media non è più disponibile.",Az="Questo media non è disponibile fuori dalla Svizzera.",Dz="Il contenuto non è fruibile a causa di restrizioni legali.",Ez="Il contenuto non è ancora disponibile. Per cortesia prova più tardi.",Iz="Questo media non è disponibile.",Uae={AGERATING12:Sz,AGERATING18:xz,COMMERCIAL:wz,ENDDATE:Cz,GEOBLOCK:Az,LEGAL:Dz,STARTDATE:Ez,UNKNOWN:Iz},Vae=Object.freeze({__proto__:null,AGERATING12:Sz,AGERATING18:xz,COMMERCIAL:wz,ENDDATE:Cz,GEOBLOCK:Az,LEGAL:Dz,STARTDATE:Ez,UNKNOWN:Iz,default:Uae});sr.addLanguage("it",Yr(Yr({},Fae),Vae));var Pz="Laschar ir",Mz="Pausa",Lz="Mussar danovamain",kz="Durada",Rz="LIVE",Oz="Chargià",Nz="Progress",Bz="Entir visur",Fz="Senza tun",Uz="Cun tun",Vz="Suttitels",zz="Suttitels",Gz="Chapitels",Hz="Descripziuns",$z="Serrar",Wz="Text",qz="Alv",jz="Nair",Xz="Cotschn",Yz="Verd",Kz="Blau",Zz="Mellen",Qz="Magenta",Jz="Cyan",e7="Fund",t7="Fanestra",r7="Transparent",i7="Betg transparent",n7="Nagin",a7="Auzà",s7="Sbassà",o7="Uniform",l7="Sumbriva",u7="Casual",c7="Script",h7="Da nov",f7="Fatg",d7="Per proteger uffants, è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.",p7="Per proteger uffants, è quest cuntegn disponibel mo tranter las 23.00 e las 05.00.",v7="Quest medium commerzial n'è betg disponibel.",g7="Quest cuntegn n'è betg pli disponibel.",m7="Quest cuntegn n'è betg disponibel ordaifer la Svizra.",y7="Quest cuntegn n'è betg disponibel perquai ch'el è scadì.",_7="Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.",b7="Quest cuntegn n'è betg disponibel.",zae={"Audio Player":"Audio-Player","Video Player":"Video-Player",Play:Pz,Pause:Mz,Replay:Lz,"Current Time":"Temp actual",Duration:kz,"Remaining Time":"Temp restant","Stream Type":"Tip dal stream",LIVE:Rz,Loaded:Oz,Progress:Nz,"Progress Bar":"Bar da progessiun","progress bar timing: currentTime={1} duration={2}":"{1} da {2}",Fullscreen:Bz,"Non-Fullscreen":"Betg entir visur",Mute:Fz,Unmute:Uz,"Playback Rate":"Tempo ",Subtitles:Vz,"subtitles off":"senza suttitels",Captions:zz,"captions off":"senza suttitels",Chapters:Gz,Descriptions:Hz,"descriptions off":"senza descripziuns","Audio Track":"Piese audio","Volume Level":"Nivel dal volumen","You aborted the media playback":"Vus avais interrut il vdieo","A network error caused the media download to fail part-way.":"In sbagl en la rait ha impedì il download","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il video n'è betg chargià - ubain per in sbagl da server / da la rait, ubain ch'il format n'è betg cumpatibel.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Il video è interrut: Ubain ch'il video è donnegià, ubain che funcziuns n'èn betg cumpatiblas.","No compatible source was found for this media.":"Chattà nagina funtauna cumpatibla per quest video.","The media is encrypted and we do not have the keys to decrypt it.":"Il video è codifitgà da moda nunenconuschenta.","Play Video":"Aviar video",Close:$z,"Close Modal Dialog":"Serrar la fanestra modala","Modal Window":"Fanestra modala","This is a modal window":"Quai è ina fanestra modala","This modal can be closed by pressing the Escape key or activating the close button.":'Questa fanestra modala pudais serrar cun la tasta "Escape" ubain cun il buttun.',", opens captions settings dialog":", avra opziuns per ils suttitels",", opens subtitles settings dialog":", avra opziuns per ils suttitels",", opens descriptions settings dialog":", avra opziuns per la descripziun",", selected":", selecziunà","captions settings":"opziuns per ils suttitels","subtitles settings":"opziuns per ils suttitels","descriptions settings":"opziuns per la descripziun",Text:Wz,White:qz,Black:jz,Red:Xz,Green:Yz,Blue:Kz,Yellow:Zz,Magenta:Qz,Cyan:Jz,Background:e7,Window:t7,Transparent:r7,"Semi-Transparent":"Mez transparent",Opaque:i7,"Font Size":"Grandezza dal text","Text Edge Style":"Stil dal text",None:n7,Raised:a7,Depressed:s7,Uniform:o7,Dropshadow:l7,"Font Family":"Scrittira","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:u7,Script:c7,"Small Caps":"Bustabs pitschens",Reset:h7,"restore all settings to the default values":"Enavos tar las opziuns da standard",Done:f7,"Caption Settings Dialog":"Opziuns per suttitels","Beginning of dialog window. Escape will cancel and close the window.":"Entschatta da la fanestra da dialog. Escape stizza e serra la fanestra.","End of dialog window.":"Fin da la fanestra da dialog.",AGERATING12:d7,AGERATING18:p7,COMMERCIAL:v7,ENDDATE:g7,GEOBLOCK:m7,LEGAL:y7,STARTDATE:_7,UNKNOWN:b7},Gae=Object.freeze({__proto__:null,AGERATING12:d7,AGERATING18:p7,Background:e7,Black:jz,Blue:Kz,COMMERCIAL:v7,Captions:zz,Casual:u7,Chapters:Gz,Close:$z,Cyan:Jz,Depressed:s7,Descriptions:Hz,Done:f7,Dropshadow:l7,Duration:kz,ENDDATE:g7,Fullscreen:Bz,GEOBLOCK:m7,Green:Yz,LEGAL:y7,LIVE:Rz,Loaded:Oz,Magenta:Qz,Mute:Fz,None:n7,Opaque:i7,Pause:Mz,Play:Pz,Progress:Nz,Raised:a7,Red:Xz,Replay:Lz,Reset:h7,STARTDATE:_7,Script:c7,Subtitles:Vz,Text:Wz,Transparent:r7,UNKNOWN:b7,Uniform:o7,Unmute:Uz,White:qz,Window:t7,Yellow:Zz,default:zae});sr.addLanguage("rm",Yr({},Gae));const Hae=["url","mimeType","keySystems"],$ae=["src"];class dt{static addBlockedSegments(e,t=[]){const i="srgssr-blocked-segments",n=e.textTracks().getTrackById(i);if(n&&e.textTracks().removeTrack(n),!Array.isArray(t)||!t.length)return;const a=t.filter(s=>s.blockReason);a.length&&dt.createTextTrack(e,i).then(s=>{a.forEach(o=>{dt.addTextTrackCue(s,o)}),e.textTracks().addTrack(s)})}static addRemoteTextTracks(e,t=[]){Array.isArray(t)&&t.forEach(({type:i,language:n,locale:a,url:s})=>{e.addRemoteTextTrack({kind:i==="SDH"?"captions":"subtitles",label:n,language:a,src:s})})}static addTextTrackCue(e,t){const i=(Number.isFinite(t.markIn)?t.markIn:t.fullLengthMarkIn)/1e3,n=(Number.isFinite(t.markOut)?t.markOut:t.fullLengthMarkOut)/1e3;e.addCue(new VTTCue(i,n,JSON.stringify(t)))}static addTextTracks(e,{mediaData:t}){dt.addRemoteTextTracks(e,t.subtitles),dt.addChapters(e,t.urn,t.chapters),dt.addBlockedSegments(e,t.blockedSegments),dt.addIntervals(e,t.intervals)}static addChapters(e,t,i=[]){const n="srgssr-chapters",a=e.textTracks().getTrackById(n);a&&e.textTracks().removeTrack(a),!(!Array.isArray(i)||!i.length)&&dt.createTextTrack(e,n).then(s=>{i.forEach(o=>{t===o.fullLengthUrn&&dt.addTextTrackCue(s,o)}),e.textTracks().addTrack(s)})}static addIntervals(e,t=[]){const i="srgssr-intervals",n=e.textTracks().getTrackById(i);n&&e.textTracks().removeTrack(n),!(!Array.isArray(t)||!t.length)&&dt.createTextTrack(e,i).then(a=>{t.forEach(s=>{dt.addTextTrackCue(a,s)}),e.textTracks().addTrack(a)})}static blockingReason(e,t){if(!t.mediaData.blockReason)return;const i=e.localize(t.mediaData.blockReason);return dt.error(e,{code:MediaError.MEDIA_ERR_ABORTED,message:i,metadata:{errorType:t.mediaData.blockReason,src:t}}),!0}static composeAkamaiResources(e=[]){return ih(function*(){return Pu.hasToken(e)?Pu.tokenizeSources(e):Promise.resolve(e)})()}static composeKeySystemsResources(e=[]){return Zp.hasDrm(e),e.map(t=>Yr(Yr({},t),Zp.buildKeySystems(t.drmList)))}static composeMainResources(e){return dt.composeAkamaiResources(dt.composeKeySystemsResources(dt.filterIncompatibleResources(e.getMainResources())))}static composeSrcMediaData({mediaData:e,disableTrackers:t},i){const n=sr.obj.merge(i,e),{url:a,mimeType:s,keySystems:o}=n,l=LM(n,Hae);return{src:a,type:s,keySystems:o,disableTrackers:t,mediaData:l}}static createTextTrack(e,t){return new Promise(i=>{setTimeout(()=>{i(new sr.TextTrack({id:t,kind:"metadata",label:t,tech:e.tech(!0)}))},100)})}static cuechangeEventProxy(e){e.textTracks().on("addtrack",({track:t})=>{["srgssr-chapters","srgssr-intervals"].includes(t.id)&&t.on("cuechange",()=>{const[i]=Array.from(t.activeCues),n=t.id.includes("srgssr-chapters")?"srgssr/chapter":"srgssr/interval";e.trigger({type:n,data:i})})})}static dataProvider(e){if(!e.options().srgOptions.dataProvider){const{dataProviderHost:t,dataProviderUrlHandler:i}=e.options().srgOptions,a=new kM(t).handleRequest(i);e.options({srgOptions:{dataProvider:a}})}return e.options().srgOptions.dataProvider}static dataProviderError(e,t){if(!t)return;const i=t.statusText?t.statusText:t.message;return dt.error(e,{code:0,message:e.localize("UNKNOWN"),metadata:{errorType:"UNKNOWN",urn:e.src(),status:t.status,statusText:i,url:t.url}}),!0}static error(e,{code:t,message:i,metadata:n}){e.error(null),e.error({code:t,message:i,metadata:n})}static filterIncompatibleResources(e=[]){return e.filter(t=>!["RTMP","HDS"].includes(t.streaming))}static getBlockedSegment(e){const i=e.textTracks().getTrackById("srgssr-blocked-segments");if(!i)return;const[n]=Array.from(i.activeCues);return n}static getBlockedSegmentByTime(e,t){const i=dt.getBlockedSegment(e);return i&&t>=i.startTime&&t<i.endTime?i:void 0}static getMediaComposition(e,t=new kM().handleRequest()){return ih(function*(){const i=yield t(e);return Object.assign(new wae,i)})()}static getMediaData(e=[]){if(Pu.hasToken(e))return e[0];const t=sr.browser.IS_ANY_SAFARI?"HLS":"DASH";return e.find(({streaming:n})=>n===t)||e[0]}static getSrcMediaObj(e,t){return ih(function*(){const{src:i}=t,n=LM(t,$ae),a=yield dt.getMediaComposition(i,dt.dataProvider(e)),s=yield dt.composeMainResources(a),o=dt.getMediaData(s);return dt.composeSrcMediaData(n,o)})()}static handleCurrentTime(e,t){const i=dt.getBlockedSegmentByTime(e,t);if(!i||!Number.isFinite(i.endTime))return t;const n=i.endTime+.1;return e.trigger({type:"srgssr/blocked-segment",data:i}),e.currentTime(n),n}static handleSetCurrentTime(e,t){const{endTime:i}=dt.getBlockedSegmentByTime(e,t)||{};return Number.isFinite(i)?i:t}static handleSetSource(e,t,i){return ih(function*(){try{const n=yield dt.getSrcMediaObj(e,t);return dt.srgAnalytics(e),dt.updateTitleBar(e,n),dt.updatePoster(e,n),dt.blockingReason(e,n)?void 0:(dt.addTextTracks(e,n),i(null,n))}catch(n){return dt.dataProviderError(e,n)?void 0:i(n)}})()}static srgAnalytics(e){if(e.options().trackers.srgAnalytics!==!1&&!e.options().trackers.srgAnalytics){const t=new su(e,{debug:e.debug(),playerVersion:sr.VERSION.pillarbox,tagCommanderScriptURL:e.options().srgOptions.tagCommanderScriptURL});e.options({trackers:{srgAnalytics:t}})}}static updatePoster(e,t,i=Tae){e.poster(i.scale({url:t.mediaData.imageUrl}))}static updateTitleBar(e,t){e.titleBar&&e.titleBar.update({title:t.mediaData.vendor,description:t.mediaData.title})}static middleware(e){return dt.cuechangeEventProxy(e),{currentTime:t=>dt.handleCurrentTime(e,t),setCurrentTime:t=>dt.handleSetCurrentTime(e,t),setSource:function(){var t=ih(function*(i,n){return dt.handleSetSource(e,i,n)});return function(n,a){return t.apply(this,arguments)}}()}}}sr.use("srgssr/urn",dt.middleware);sr.options.srgOptions={dataProvider:void 0,dataProviderHost:void 0,dataProviderUrlHandler:void 0,tagCommanderScriptURL:void 0};function bs(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function T7(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}/*!
* GSAP 3.12.5
* https://gsap.com
*
* @license Copyright 2008-2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for
* Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/var pn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Jh={duration:.5,overwrite:!1,delay:0},bA,si,Xt,zn=1e8,Gt=1/zn,ew=Math.PI*2,Wae=ew/4,qae=0,S7=Math.sqrt,jae=Math.cos,Xae=Math.sin,$r=function(e){return typeof e=="string"},or=function(e){return typeof e=="function"},Gs=function(e){return typeof e=="number"},TA=function(e){return typeof e>"u"},ns=function(e){return typeof e=="object"},Wi=function(e){return e!==!1},SA=function(){return typeof window<"u"},Kg=function(e){return or(e)||$r(e)},x7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},oi=Array.isArray,tw=/(?:-?\.?\d|\.)+/gi,w7=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ph=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Mb=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,C7=/[+-]=-?[.\d]+/,A7=/[^,'"\[\]\s]+/gi,Yae=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Zt,Ra,rw,xA,Tn={},h0={},D7,E7=function(e){return(h0=Yu(e,Tn))&&Yi},wA=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Qp=function(e,t){return!t&&console.warn(e)},I7=function(e,t){return e&&(Tn[e]=t)&&h0&&(h0[e]=t)||Tn},Jp=function(){return 0},Kae={suppressEvents:!0,isStart:!0,kill:!1},oy={suppressEvents:!0,kill:!1},Zae={suppressEvents:!0},CA={},Ho=[],iw={},P7,sn={},Lb={},zM=30,ly=[],AA="",DA=function(e){var t=e[0],i,n;if(ns(t)||or(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(n=ly.length;n--&&!ly[n].targetTest(t););i=ly[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new eG(e[n],i)))||e.splice(n,1);return e},Mu=function(e){return e._gsap||DA(Gn(e))[0]._gsap},M7=function(e,t,i){return(i=e[t])&&or(i)?e[t]():TA(i)&&e.getAttribute&&e.getAttribute(t)||i},qi=function(e,t){return(e=e.split(",")).forEach(t)||e},vr=function(e){return Math.round(e*1e5)/1e5||0},Vr=function(e){return Math.round(e*1e7)/1e7||0},Dh=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+n:i==="-"?e-n:i==="*"?e*n:e/n},Qae=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i},f0=function(){var e=Ho.length,t=Ho.slice(0),i,n;for(iw={},Ho.length=0,i=0;i<e;i++)n=t[i],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},L7=function(e,t,i,n){Ho.length&&!si&&f0(),e.render(t,i,si&&t<0&&(e._initted||e._startAt)),Ho.length&&!si&&f0()},k7=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(A7).length<2?t:$r(e)?e.trim():e},R7=function(e){return e},Xn=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Jae=function(e){return function(t,i){for(var n in i)n in t||n==="duration"&&e||n==="ease"||(t[n]=i[n])}},Yu=function(e,t){for(var i in t)e[i]=t[i];return e},GM=function r(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=ns(t[i])?r(e[i]||(e[i]={}),t[i]):t[i]);return e},d0=function(e,t){var i={},n;for(n in e)n in t||(i[n]=e[n]);return i},Tp=function(e){var t=e.parent||Zt,i=e.keyframes?Jae(oi(e.keyframes)):Xn;if(Wi(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},ese=function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0},O7=function(e,t,i,n,a){var s=e[n],o;if(a)for(o=t[a];s&&s[a]>o;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=s,t.parent=t._dp=e,t},q_=function(e,t,i,n){i===void 0&&(i="_first"),n===void 0&&(n="_last");var a=t._prev,s=t._next;a?a._next=s:e[i]===t&&(e[i]=s),s?s._prev=a:e[n]===t&&(e[n]=a),t._next=t._prev=t.parent=null},Zo=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Lu=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},tse=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},nw=function(e,t,i,n){return e._startAt&&(si?e._startAt.revert(oy):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},rse=function r(e){return!e||e._ts&&r(e.parent)},HM=function(e){return e._repeat?ef(e._tTime,e=e.duration()+e._rDelay)*e:0},ef=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},p0=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},j_=function(e){return e._end=Vr(e._start+(e._tDur/Math.abs(e._ts||e._rts||Gt)||0))},X_=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Vr(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),j_(e),i._dirty||Lu(i,e)),e},N7=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=p0(e.rawTime(),t),(!t._dur||Xv(0,t.totalDuration(),i)-t._tTime>Gt)&&t.render(i,!0)),Lu(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-Gt}},Ba=function(e,t,i,n){return t.parent&&Zo(t),t._start=Vr((Gs(i)?i:i||e!==Zt?Ln(e,i,t):e._time)+t._delay),t._end=Vr(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),O7(e,t,"_first","_last",e._sort?"_start":0),aw(t)||(e._recent=t),n||N7(e,t),e._ts<0&&X_(e,e._tTime),e},B7=function(e,t){return(Tn.ScrollTrigger||wA("scrollTrigger",t))&&Tn.ScrollTrigger.create(t,e)},F7=function(e,t,i,n,a){if(IA(e,t,a),!e._initted)return 1;if(!i&&e._pt&&!si&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&P7!==ln.frame)return Ho.push(e),e._lazy=[a,n],1},ise=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},aw=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},nse=function(e,t,i,n){var a=e.ratio,s=t<0||!t&&(!e._start&&ise(e)&&!(!e._initted&&aw(e))||(e._ts<0||e._dp._ts<0)&&!aw(e))?0:1,o=e._rDelay,l=0,u,c,h;if(o&&e._repeat&&(l=Xv(0,e._tDur,t),c=ef(l,o),e._yoyo&&c&1&&(s=1-s),c!==ef(e._tTime,o)&&(a=1-s,e.vars.repeatRefresh&&e._initted&&e.invalidate())),s!==a||si||n||e._zTime===Gt||!t&&e._zTime){if(!e._initted&&F7(e,t,n,i,l))return;for(h=e._zTime,e._zTime=t||(i?Gt:0),i||(i=t&&!h),e.ratio=s,e._from&&(s=1-s),e._time=0,e._tTime=l,u=e._pt;u;)u.r(s,u.d),u=u._next;t<0&&nw(e,t,i,!0),e._onUpdate&&!i&&hn(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&hn(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===s&&(s&&Zo(e,1),!i&&!si&&(hn(e,s?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},ase=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},tf=function(e,t,i,n){var a=e._repeat,s=Vr(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=s/e._dur),e._dur=s,e._tDur=a?a<0?1e10:Vr(s*(a+1)+e._rDelay*a):s,o>0&&!n&&X_(e,e._tTime=e._tDur*o),e.parent&&j_(e),i||Lu(e.parent,e),e},$M=function(e){return e instanceof Si?Lu(e):tf(e,e._dur)},sse={_start:0,endTime:Jp,totalDuration:Jp},Ln=function r(e,t,i){var n=e.labels,a=e._recent||sse,s=e.duration()>=zn?a.endTime(!1):e._dur,o,l,u;return $r(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",o=t.indexOf("="),l==="<"||l===">"?(o>=0&&(t=t.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(o<0?a:i).totalDuration()/100:1)):o<0?(t in n||(n[t]=s),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),u&&i&&(l=l/100*(oi(i)?i[0]:i).totalDuration()),o>1?r(e,t.substr(0,o-1),i)+l:s+l)):t==null?s:+t},Sp=function(e,t,i){var n=Gs(t[1]),a=(n?2:1)+(e<2?0:1),s=t[a],o,l;if(n&&(s.duration=t[1]),s.parent=i,e){for(o=s,l=i;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=Wi(l.vars.inherit)&&l.parent;s.immediateRender=Wi(o.immediateRender),e<2?s.runBackwards=1:s.startAt=t[a-1]}return new xr(t[0],s,t[a+1])},ul=function(e,t){return e||e===0?t(e):t},Xv=function(e,t,i){return i<e?e:i>t?t:i},ii=function(e,t){return!$r(e)||!(t=Yae.exec(e))?"":t[1]},ose=function(e,t,i){return ul(i,function(n){return Xv(e,t,n)})},sw=[].slice,U7=function(e,t){return e&&ns(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ns(e[0]))&&!e.nodeType&&e!==Ra},lse=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(n){var a;return $r(n)&&!t||U7(n,1)?(a=i).push.apply(a,Gn(n)):i.push(n)})||i},Gn=function(e,t,i){return Xt&&!t&&Xt.selector?Xt.selector(e):$r(e)&&!i&&(rw||!rf())?sw.call((t||xA).querySelectorAll(e),0):oi(e)?lse(e,i):U7(e)?sw.call(e,0):e?[e]:[]},ow=function(e){return e=Gn(e)[0]||Qp("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return Gn(t,i.querySelectorAll?i:i===e?Qp("Invalid scope")||xA.createElement("div"):e)}},V7=function(e){return e.sort(function(){return .5-Math.random()})},z7=function(e){if(or(e))return e;var t=ns(e)?e:{each:e},i=ku(t.ease),n=t.from||0,a=parseFloat(t.base)||0,s={},o=n>0&&n<1,l=isNaN(n)||o,u=t.axis,c=n,h=n;return $r(n)?c=h={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(c=n[0],h=n[1]),function(d,f,p){var v=(p||t).length,g=s[v],m,y,_,b,S,x,C,D,I;if(!g){if(I=t.grid==="auto"?0:(t.grid||[1,zn])[1],!I){for(C=-zn;C<(C=p[I++].getBoundingClientRect().left)&&I<v;);I<v&&I--}for(g=s[v]=[],m=l?Math.min(I,v)*c-.5:n%I,y=I===zn?0:l?v*h/I-.5:n/I|0,C=0,D=zn,x=0;x<v;x++)_=x%I-m,b=y-(x/I|0),g[x]=S=u?Math.abs(u==="y"?b:_):S7(_*_+b*b),S>C&&(C=S),S<D&&(D=S);n==="random"&&V7(g),g.max=C-D,g.min=D,g.v=v=(parseFloat(t.amount)||parseFloat(t.each)*(I>v?v-1:u?u==="y"?v/I:I:Math.max(I,v/I))||0)*(n==="edges"?-1:1),g.b=v<0?a-v:a,g.u=ii(t.amount||t.each)||0,i=i&&v<0?Z7(i):i}return v=(g[d]-g.min)/g.max||0,Vr(g.b+(i?i(v):v)*g.v)+g.u}},lw=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=Vr(Math.round(parseFloat(i)/e)*e*t);return(n-n%1)/t+(Gs(i)?0:ii(i))}},G7=function(e,t){var i=oi(e),n,a;return!i&&ns(e)&&(n=i=e.radius||zn,e.values?(e=Gn(e.values),(a=!Gs(e[0]))&&(n*=n)):e=lw(e.increment)),ul(t,i?or(e)?function(s){return a=e(s),Math.abs(a-s)<=n?a:s}:function(s){for(var o=parseFloat(a?s.x:s),l=parseFloat(a?s.y:0),u=zn,c=0,h=e.length,d,f;h--;)a?(d=e[h].x-o,f=e[h].y-l,d=d*d+f*f):d=Math.abs(e[h]-o),d<u&&(u=d,c=h);return c=!n||u<=n?e[c]:s,a||c===s||Gs(s)?c:c+ii(s)}:lw(e))},H7=function(e,t,i,n){return ul(oi(e)?!t:i===!0?!!(i=0):!n,function(){return oi(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*n)/n})},use=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduce(function(a,s){return s(a)},n)}},cse=function(e,t){return function(i){return e(parseFloat(i))+(t||ii(i))}},hse=function(e,t,i){return W7(e,t,0,1,i)},$7=function(e,t,i){return ul(i,function(n){return e[~~t(n)]})},fse=function r(e,t,i){var n=t-e;return oi(e)?$7(e,r(0,e.length),t):ul(i,function(a){return(n+(a-e)%n)%n+e})},dse=function r(e,t,i){var n=t-e,a=n*2;return oi(e)?$7(e,r(0,e.length-1),t):ul(i,function(s){return s=(a+(s-e)%a)%a||0,e+(s>n?a-s:s)})},ev=function(e){for(var t=0,i="",n,a,s,o;~(n=e.indexOf("random(",t));)s=e.indexOf(")",n),o=e.charAt(n+7)==="[",a=e.substr(n+7,s-n-7).match(o?A7:tw),i+=e.substr(t,n-t)+H7(o?a:+a[0],o?0:+a[1],+a[2]||1e-5),t=s+1;return i+e.substr(t,e.length-t)},W7=function(e,t,i,n,a){var s=t-e,o=n-i;return ul(a,function(l){return i+((l-e)/s*o||0)})},pse=function r(e,t,i,n){var a=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!a){var s=$r(e),o={},l,u,c,h,d;if(i===!0&&(n=1)&&(i=null),s)e={p:e},t={p:t};else if(oi(e)&&!oi(t)){for(c=[],h=e.length,d=h-2,u=1;u<h;u++)c.push(r(e[u-1],e[u]));h--,a=function(p){p*=h;var v=Math.min(d,~~p);return c[v](p-v)},i=t}else n||(e=Yu(oi(e)?[]:{},e));if(!c){for(l in t)EA.call(o,e,l,"get",t[l]);a=function(p){return LA(p,o)||(s?e.p:e)}}}return ul(i,a)},WM=function(e,t,i){var n=e.labels,a=zn,s,o,l;for(s in n)o=n[s]-t,o<0==!!i&&o&&a>(o=Math.abs(o))&&(l=s,a=o);return l},hn=function(e,t,i){var n=e.vars,a=n[t],s=Xt,o=e._ctx,l,u,c;if(a)return l=n[t+"Params"],u=n.callbackScope||e,i&&Ho.length&&f0(),o&&(Xt=o),c=l?a.apply(u,l):a.call(u),Xt=s,c},Yd=function(e){return Zo(e),e.scrollTrigger&&e.scrollTrigger.kill(!!si),e.progress()<1&&hn(e,"onInterrupt"),e},vh,q7=[],j7=function(e){if(e)if(e=!e.name&&e.default||e,SA()||e.headless){var t=e.name,i=or(e),n=t&&!i&&e.init?function(){this._props=[]}:e,a={init:Jp,render:LA,add:EA,kill:Pse,modifier:Ise,rawVars:0},s={targetTest:0,get:0,getSetter:MA,aliases:{},register:0};if(rf(),e!==n){if(sn[t])return;Xn(n,Xn(d0(e,a),s)),Yu(n.prototype,Yu(a,d0(e,s))),sn[n.prop=t]=n,e.targetTest&&(ly.push(n),CA[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}I7(t,n),e.register&&e.register(Yi,n,ji)}else q7.push(e)},Bt=255,Kd={aqua:[0,Bt,Bt],lime:[0,Bt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Bt],navy:[0,0,128],white:[Bt,Bt,Bt],olive:[128,128,0],yellow:[Bt,Bt,0],orange:[Bt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Bt,0,0],pink:[Bt,192,203],cyan:[0,Bt,Bt],transparent:[Bt,Bt,Bt,0]},kb=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*Bt+.5|0},X7=function(e,t,i){var n=e?Gs(e)?[e>>16,e>>8&Bt,e&Bt]:0:Kd.black,a,s,o,l,u,c,h,d,f,p;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Kd[e])n=Kd[e];else if(e.charAt(0)==="#"){if(e.length<6&&(a=e.charAt(1),s=e.charAt(2),o=e.charAt(3),e="#"+a+a+s+s+o+o+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&Bt,n&Bt,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&Bt,e&Bt]}else if(e.substr(0,3)==="hsl"){if(n=p=e.match(tw),!t)l=+n[0]%360/360,u=+n[1]/100,c=+n[2]/100,s=c<=.5?c*(u+1):c+u-c*u,a=c*2-s,n.length>3&&(n[3]*=1),n[0]=kb(l+1/3,a,s),n[1]=kb(l,a,s),n[2]=kb(l-1/3,a,s);else if(~e.indexOf("="))return n=e.match(w7),i&&n.length<4&&(n[3]=1),n}else n=e.match(tw)||Kd.transparent;n=n.map(Number)}return t&&!p&&(a=n[0]/Bt,s=n[1]/Bt,o=n[2]/Bt,h=Math.max(a,s,o),d=Math.min(a,s,o),c=(h+d)/2,h===d?l=u=0:(f=h-d,u=c>.5?f/(2-h-d):f/(h+d),l=h===a?(s-o)/f+(s<o?6:0):h===s?(o-a)/f+2:(a-s)/f+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(c*100+.5)),i&&n.length<4&&(n[3]=1),n},Y7=function(e){var t=[],i=[],n=-1;return e.split($o).forEach(function(a){var s=a.match(ph)||[];t.push.apply(t,s),i.push(n+=s.length+1)}),t.c=i,t},qM=function(e,t,i){var n="",a=(e+n).match($o),s=t?"hsla(":"rgba(",o=0,l,u,c,h;if(!a)return e;if(a=a.map(function(d){return(d=X7(d,t,1))&&s+(t?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),i&&(c=Y7(e),l=i.c,l.join(n)!==c.c.join(n)))for(u=e.replace($o,"1").split(ph),h=u.length-1;o<h;o++)n+=u[o]+(~l.indexOf(o)?a.shift()||s+"0,0,0,0)":(c.length?c:a.length?a:i).shift());if(!u)for(u=e.split($o),h=u.length-1;o<h;o++)n+=u[o]+a[o];return n+u[h]},$o=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Kd)r+="|"+e+"\\b";return new RegExp(r+")","gi")}(),vse=/hsl[a]?\(/,K7=function(e){var t=e.join(" "),i;if($o.lastIndex=0,$o.test(t))return i=vse.test(t),e[1]=qM(e[1],i),e[0]=qM(e[0],i,Y7(e[1])),!0},tv,ln=function(){var r=Date.now,e=500,t=33,i=r(),n=i,a=1e3/240,s=a,o=[],l,u,c,h,d,f,p=function v(g){var m=r()-n,y=g===!0,_,b,S,x;if((m>e||m<0)&&(i+=m-t),n+=m,S=n-i,_=S-s,(_>0||y)&&(x=++h.frame,d=S-h.time*1e3,h.time=S=S/1e3,s+=_+(_>=a?4:a-_),b=1),y||(l=u(v)),b)for(f=0;f<o.length;f++)o[f](S,d,x,g)};return h={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){D7&&(!rw&&SA()&&(Ra=rw=window,xA=Ra.document||{},Tn.gsap=Yi,(Ra.gsapVersions||(Ra.gsapVersions=[])).push(Yi.version),E7(h0||Ra.GreenSockGlobals||!Ra.gsap&&Ra||{}),q7.forEach(j7)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),u=c||function(g){return setTimeout(g,s-h.time*1e3+1|0)},tv=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),tv=0,u=Jp},lagSmoothing:function(g,m){e=g||1/0,t=Math.min(m||33,e)},fps:function(g){a=1e3/(g||240),s=h.time*1e3+a},add:function(g,m,y){var _=m?function(b,S,x,C){g(b,S,x,C),h.remove(_)}:g;return h.remove(g),o[y?"unshift":"push"](_),rf(),_},remove:function(g,m){~(m=o.indexOf(g))&&o.splice(m,1)&&f>=m&&f--},_listeners:o},h}(),rf=function(){return!tv&&ln.wake()},mt={},gse=/^[\d.\-M][\d.\-,\s]/,mse=/["']/g,yse=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),n=i[0],a=1,s=i.length,o,l,u;a<s;a++)l=i[a],o=a!==s-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),t[n]=isNaN(u)?u.replace(mse,"").trim():+u,n=l.substr(o+1).trim();return t},_se=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<i?e.indexOf(")",i+1):i)},bse=function(e){var t=(e+"").split("("),i=mt[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[yse(t[1])]:_se(e).split(",").map(k7)):mt._CE&&gse.test(e)?mt._CE("",e):i},Z7=function(e){return function(t){return 1-e(1-t)}},Q7=function r(e,t){for(var i=e._first,n;i;)i instanceof Si?r(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?r(i.timeline,t):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=t)),i=i._next},ku=function(e,t){return e&&(or(e)?e:mt[e]||bse(e))||t},oc=function(e,t,i,n){i===void 0&&(i=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var a={easeIn:t,easeOut:i,easeInOut:n},s;return qi(e,function(o){mt[o]=Tn[o]=a,mt[s=o.toLowerCase()]=i;for(var l in a)mt[s+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=mt[o+"."+l]=a[l]}),a},J7=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Rb=function r(e,t,i){var n=t>=1?t:1,a=(i||(e?.3:.45))/(t<1?t:1),s=a/ew*(Math.asin(1/n)||0),o=function(c){return c===1?1:n*Math.pow(2,-10*c)*Xae((c-s)*a)+1},l=e==="out"?o:e==="in"?function(u){return 1-o(1-u)}:J7(o);return a=ew/a,l.config=function(u,c){return r(e,u,c)},l},Ob=function r(e,t){t===void 0&&(t=1.70158);var i=function(s){return s?--s*s*((t+1)*s+t)+1:0},n=e==="out"?i:e==="in"?function(a){return 1-i(1-a)}:J7(i);return n.config=function(a){return r(e,a)},n};qi("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;oc(r+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});mt.Linear.easeNone=mt.none=mt.Linear.easeIn;oc("Elastic",Rb("in"),Rb("out"),Rb());(function(r,e){var t=1/e,i=2*t,n=2.5*t,a=function(o){return o<t?r*o*o:o<i?r*Math.pow(o-1.5/e,2)+.75:o<n?r*(o-=2.25/e)*o+.9375:r*Math.pow(o-2.625/e,2)+.984375};oc("Bounce",function(s){return 1-a(1-s)},a)})(7.5625,2.75);oc("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});oc("Circ",function(r){return-(S7(1-r*r)-1)});oc("Sine",function(r){return r===1?1:-jae(r*Wae)+1});oc("Back",Ob("in"),Ob("out"),Ob());mt.SteppedEase=mt.steps=Tn.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,n=e+(t?0:1),a=t?1:0,s=1-Gt;return function(o){return((n*Xv(0,s,o)|0)+a)*i}}};Jh.ease=mt["quad.out"];qi("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return AA+=r+","+r+"Params,"});var eG=function(e,t){this.id=qae++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:M7,this.set=t?t.getSetter:MA},rv=function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,tf(this,+t.duration,1,1),this.data=t.data,Xt&&(this._ctx=Xt,Xt.data.push(this)),tv||ln.wake()}var e=r.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,tf(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,n){if(rf(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(X_(this,i),!a._dp||a.parent||N7(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&Ba(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===Gt||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),L7(this,i,n)),this},e.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+HM(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},e.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+HM(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,n){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*a,n):this._repeat?ef(this._tTime,a)+1:1},e.timeScale=function(i,n){if(!arguments.length)return this._rts===-Gt?0:this._rts;if(this._rts===i)return this;var a=this.parent&&this._ts?p0(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-Gt?0:this._rts,this.totalTime(Xv(-Math.abs(this._delay),this._tDur,a),n!==!1),j_(this),tse(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(rf(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Gt&&(this._tTime-=Gt)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&Ba(n,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(Wi(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?p0(n.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=Zae);var n=si;return si=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),si=n,this},e.globalTime=function(i){for(var n=this,a=arguments.length?i:n.rawTime();n;)a=n._start+a/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(i):a},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,$M(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,$M(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,n){return this.totalTime(Ln(this,i),Wi(n))},e.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,Wi(n))},e.play=function(i,n){return i!=null&&this.seek(i,n),this.reversed(!1).paused(!1)},e.reverse=function(i,n){return i!=null&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(i,n){return i!=null&&this.seek(i,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-Gt:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Gt,this},e.isActive=function(){var i=this.parent||this._dp,n=this._start,a;return!!(!i||this._ts&&this._initted&&i.isActive()&&(a=i.rawTime(!0))>=n&&a<this.endTime(!0)-Gt)},e.eventCallback=function(i,n,a){var s=this.vars;return arguments.length>1?(n?(s[i]=n,a&&(s[i+"Params"]=a),i==="onUpdate"&&(this._onUpdate=n)):delete s[i],this):s[i]},e.then=function(i){var n=this;return new Promise(function(a){var s=or(i)?i:R7,o=function(){var u=n.then;n.then=null,or(s)&&(s=s(n))&&(s.then||s===n)&&(n.then=u),a(s),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){Yd(this)},r}();Xn(rv.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Gt,_prom:0,_ps:!1,_rts:1});var Si=function(r){T7(e,r);function e(i,n){var a;return i===void 0&&(i={}),a=r.call(this,i)||this,a.labels={},a.smoothChildTiming=!!i.smoothChildTiming,a.autoRemoveChildren=!!i.autoRemoveChildren,a._sort=Wi(i.sortChildren),Zt&&Ba(i.parent||Zt,bs(a),n),i.reversed&&a.reverse(),i.paused&&a.paused(!0),i.scrollTrigger&&B7(bs(a),i.scrollTrigger),a}var t=e.prototype;return t.to=function(n,a,s){return Sp(0,arguments,this),this},t.from=function(n,a,s){return Sp(1,arguments,this),this},t.fromTo=function(n,a,s,o){return Sp(2,arguments,this),this},t.set=function(n,a,s){return a.duration=0,a.parent=this,Tp(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new xr(n,a,Ln(this,s),1),this},t.call=function(n,a,s){return Ba(this,xr.delayedCall(0,n,a),s)},t.staggerTo=function(n,a,s,o,l,u,c){return s.duration=a,s.stagger=s.stagger||o,s.onComplete=u,s.onCompleteParams=c,s.parent=this,new xr(n,s,Ln(this,l)),this},t.staggerFrom=function(n,a,s,o,l,u,c){return s.runBackwards=1,Tp(s).immediateRender=Wi(s.immediateRender),this.staggerTo(n,a,s,o,l,u,c)},t.staggerFromTo=function(n,a,s,o,l,u,c,h){return o.startAt=s,Tp(o).immediateRender=Wi(o.immediateRender),this.staggerTo(n,a,o,l,u,c,h)},t.render=function(n,a,s){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=n<=0?0:Vr(n),h=this._zTime<0!=n<0&&(this._initted||!u),d,f,p,v,g,m,y,_,b,S,x,C;if(this!==Zt&&c>l&&n>=0&&(c=l),c!==this._tTime||s||h){if(o!==this._time&&u&&(c+=this._time-o,n+=this._time-o),d=c,b=this._start,_=this._ts,m=!_,h&&(u||(o=this._zTime),(n||!a)&&(this._zTime=n)),this._repeat){if(x=this._yoyo,g=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,a,s);if(d=Vr(c%g),c===l?(v=this._repeat,d=u):(v=~~(c/g),v&&v===c/g&&(d=u,v--),d>u&&(d=u)),S=ef(this._tTime,g),!o&&this._tTime&&S!==v&&this._tTime-S*g-this._dur<=0&&(S=v),x&&v&1&&(d=u-d,C=1),v!==S&&!this._lock){var D=x&&S&1,I=D===(x&&v&1);if(v<S&&(D=!D),o=D?0:c%u?u:c,this._lock=1,this.render(o||(C?0:Vr(v*g)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&hn(this,"onRepeat"),this.vars.repeatRefresh&&!C&&(this.invalidate()._lock=1),o&&o!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,I&&(this._lock=2,o=D?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!C&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;Q7(this,C)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=ase(this,Vr(o),Vr(d)),y&&(c-=d-(d=y._start))),this._tTime=c,this._time=d,this._act=!_,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&d&&!a&&!v&&(hn(this,"onStart"),this._tTime!==c))return this;if(d>=o&&n>=0)for(f=this._first;f;){if(p=f._next,(f._act||d>=f._start)&&f._ts&&y!==f){if(f.parent!==this)return this.render(n,a,s);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,a,s),d!==this._time||!this._ts&&!m){y=0,p&&(c+=this._zTime=-Gt);break}}f=p}else{f=this._last;for(var M=n<0?n:d;f;){if(p=f._prev,(f._act||M<=f._end)&&f._ts&&y!==f){if(f.parent!==this)return this.render(n,a,s);if(f.render(f._ts>0?(M-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(M-f._start)*f._ts,a,s||si&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!m){y=0,p&&(c+=this._zTime=M?-Gt:Gt);break}}f=p}}if(y&&!a&&(this.pause(),y.render(d>=o?0:-Gt)._zTime=d>=o?1:-1,this._ts))return this._start=b,j_(this),this.render(n,a,s);this._onUpdate&&!a&&hn(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(b===this._start||Math.abs(_)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&Zo(this,1),!a&&!(n<0&&!o)&&(c||o||!l)&&(hn(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,a){var s=this;if(Gs(a)||(a=Ln(this,a,n)),!(n instanceof rv)){if(oi(n))return n.forEach(function(o){return s.add(o,a)}),this;if($r(n))return this.addLabel(n,a);if(or(n))n=xr.delayedCall(0,n);else return this}return this!==n?Ba(this,n,a):this},t.getChildren=function(n,a,s,o){n===void 0&&(n=!0),a===void 0&&(a=!0),s===void 0&&(s=!0),o===void 0&&(o=-zn);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof xr?a&&l.push(u):(s&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,a,s)))),u=u._next;return l},t.getById=function(n){for(var a=this.getChildren(1,1,1),s=a.length;s--;)if(a[s].vars.id===n)return a[s]},t.remove=function(n){return $r(n)?this.removeLabel(n):or(n)?this.killTweensOf(n):(q_(this,n),n===this._recent&&(this._recent=this._last),Lu(this))},t.totalTime=function(n,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Vr(ln.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),r.prototype.totalTime.call(this,n,a),this._forcing=0,this):this._tTime},t.addLabel=function(n,a){return this.labels[n]=Ln(this,a),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,a,s){var o=xr.delayedCall(0,a||Jp,s);return o.data="isPause",this._hasPause=1,Ba(this,o,Ln(this,n))},t.removePause=function(n){var a=this._first;for(n=Ln(this,n);a;)a._start===n&&a.data==="isPause"&&Zo(a),a=a._next},t.killTweensOf=function(n,a,s){for(var o=this.getTweensOf(n,s),l=o.length;l--;)Po!==o[l]&&o[l].kill(n,a);return this},t.getTweensOf=function(n,a){for(var s=[],o=Gn(n),l=this._first,u=Gs(a),c;l;)l instanceof xr?Qae(l._targets,o)&&(u?(!Po||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&s.push(l):(c=l.getTweensOf(o,a)).length&&s.push.apply(s,c),l=l._next;return s},t.tweenTo=function(n,a){a=a||{};var s=this,o=Ln(s,n),l=a,u=l.startAt,c=l.onStart,h=l.onStartParams,d=l.immediateRender,f,p=xr.to(s,Xn({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale())||Gt,onStart:function(){if(s.pause(),!f){var g=a.duration||Math.abs((o-(u&&"time"in u?u.time:s._time))/s.timeScale());p._dur!==g&&tf(p,g,0,1).render(p._time,!0,!0),f=1}c&&c.apply(p,h||[])}},a));return d?p.render(0):p},t.tweenFromTo=function(n,a,s){return this.tweenTo(a,Xn({startAt:{time:Ln(this,n)}},s))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),WM(this,Ln(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),WM(this,Ln(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+Gt)},t.shiftChildren=function(n,a,s){s===void 0&&(s=0);for(var o=this._first,l=this.labels,u;o;)o._start>=s&&(o._start+=n,o._end+=n),o=o._next;if(a)for(u in l)l[u]>=s&&(l[u]+=n);return Lu(this)},t.invalidate=function(n){var a=this._first;for(this._lock=0;a;)a.invalidate(n),a=a._next;return r.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var a=this._first,s;a;)s=a._next,this.remove(a),a=s;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Lu(this)},t.totalDuration=function(n){var a=0,s=this,o=s._last,l=zn,u,c,h;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-n:n));if(s._dirty){for(h=s.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&s._sort&&o._ts&&!s._lock?(s._lock=1,Ba(s,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(a-=c,(!h&&!s._dp||h&&h.smoothChildTiming)&&(s._start+=c/s._ts,s._time-=c,s._tTime-=c),s.shiftChildren(-c,!1,-1/0),l=0),o._end>a&&o._ts&&(a=o._end),o=u;tf(s,s===Zt&&s._time>a?s._time:a,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(n){if(Zt._ts&&(L7(Zt,p0(n,Zt)),P7=ln.frame),ln.frame>=zM){zM+=pn.autoSleep||120;var a=Zt._first;if((!a||!a._ts)&&pn.autoSleep&&ln._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||ln.sleep()}}},e}(rv);Xn(Si.prototype,{_lock:0,_hasPause:0,_forcing:0});var Tse=function(e,t,i,n,a,s,o){var l=new ji(this._pt,e,t,0,1,sG,null,a),u=0,c=0,h,d,f,p,v,g,m,y;for(l.b=i,l.e=n,i+="",n+="",(m=~n.indexOf("random("))&&(n=ev(n)),s&&(y=[i,n],s(y,e,t),i=y[0],n=y[1]),d=i.match(Mb)||[];h=Mb.exec(n);)p=h[0],v=n.substring(u,h.index),f?f=(f+1)%5:v.substr(-5)==="rgba("&&(f=1),p!==d[c++]&&(g=parseFloat(d[c-1])||0,l._pt={_next:l._pt,p:v||c===1?v:",",s:g,c:p.charAt(1)==="="?Dh(g,p)-g:parseFloat(p)-g,m:f&&f<4?Math.round:0},u=Mb.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=o,(C7.test(n)||m)&&(l.e=0),this._pt=l,l},EA=function(e,t,i,n,a,s,o,l,u,c){or(n)&&(n=n(a||0,e,s));var h=e[t],d=i!=="get"?i:or(h)?u?e[t.indexOf("set")||!or(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():h,f=or(h)?u?Ase:nG:PA,p;if($r(n)&&(~n.indexOf("random(")&&(n=ev(n)),n.charAt(1)==="="&&(p=Dh(d,n)+(ii(d)||0),(p||p===0)&&(n=p))),!c||d!==n||uw)return!isNaN(d*n)&&n!==""?(p=new ji(this._pt,e,t,+d||0,n-(d||0),typeof h=="boolean"?Ese:aG,0,f),u&&(p.fp=u),o&&p.modifier(o,this,e),this._pt=p):(!h&&!(t in e)&&wA(t,n),Tse.call(this,e,t,d,n,f,l||pn.stringFilter,u))},Sse=function(e,t,i,n,a){if(or(e)&&(e=xp(e,a,t,i,n)),!ns(e)||e.style&&e.nodeType||oi(e)||x7(e))return $r(e)?xp(e,a,t,i,n):e;var s={},o;for(o in e)s[o]=xp(e[o],a,t,i,n);return s},tG=function(e,t,i,n,a,s){var o,l,u,c;if(sn[e]&&(o=new sn[e]).init(a,o.rawVars?t[e]:Sse(t[e],n,a,s,i),i,n,s)!==!1&&(i._pt=l=new ji(i._pt,a,e,0,1,o.render,o,0,o.priority),i!==vh))for(u=i._ptLookup[i._targets.indexOf(a)],c=o._props.length;c--;)u[o._props[c]]=l;return o},Po,uw,IA=function r(e,t,i){var n=e.vars,a=n.ease,s=n.startAt,o=n.immediateRender,l=n.lazy,u=n.onUpdate,c=n.runBackwards,h=n.yoyoEase,d=n.keyframes,f=n.autoRevert,p=e._dur,v=e._startAt,g=e._targets,m=e.parent,y=m&&m.data==="nested"?m.vars.targets:g,_=e._overwrite==="auto"&&!bA,b=e.timeline,S,x,C,D,I,M,L,N,O,B,F,U,$;if(b&&(!d||!a)&&(a="none"),e._ease=ku(a,Jh.ease),e._yEase=h?Z7(ku(h===!0?a:h,Jh.ease)):0,h&&e._yoyo&&!e._repeat&&(h=e._yEase,e._yEase=e._ease,e._ease=h),e._from=!b&&!!n.runBackwards,!b||d&&!n.stagger){if(N=g[0]?Mu(g[0]).harness:0,U=N&&n[N.prop],S=d0(n,CA),v&&(v._zTime<0&&v.progress(1),t<0&&c&&o&&!f?v.render(-1,!0):v.revert(c&&p?oy:Kae),v._lazy=0),s){if(Zo(e._startAt=xr.set(g,Xn({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!v&&Wi(l),startAt:null,delay:0,onUpdate:u&&function(){return hn(e,"onUpdate")},stagger:0},s))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(si||!o&&!f)&&e._startAt.revert(oy),o&&p&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(c&&p&&!v){if(t&&(o=!1),C=Xn({overwrite:!1,data:"isFromStart",lazy:o&&!v&&Wi(l),immediateRender:o,stagger:0,parent:m},S),U&&(C[N.prop]=U),Zo(e._startAt=xr.set(g,C)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(si?e._startAt.revert(oy):e._startAt.render(-1,!0)),e._zTime=t,!o)r(e._startAt,Gt,Gt);else if(!t)return}for(e._pt=e._ptCache=0,l=p&&Wi(l)||l&&!p,x=0;x<g.length;x++){if(I=g[x],L=I._gsap||DA(g)[x]._gsap,e._ptLookup[x]=B={},iw[L.id]&&Ho.length&&f0(),F=y===g?x:y.indexOf(I),N&&(O=new N).init(I,U||S,e,F,y)!==!1&&(e._pt=D=new ji(e._pt,I,O.name,0,1,O.render,O,0,O.priority),O._props.forEach(function(q){B[q]=D}),O.priority&&(M=1)),!N||U)for(C in S)sn[C]&&(O=tG(C,S,e,F,I,y))?O.priority&&(M=1):B[C]=D=EA.call(e,I,C,"get",S[C],F,y,0,n.stringFilter);e._op&&e._op[x]&&e.kill(I,e._op[x]),_&&e._pt&&(Po=e,Zt.killTweensOf(I,B,e.globalTime(t)),$=!e.parent,Po=0),e._pt&&l&&(iw[L.id]=1)}M&&oG(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!$,d&&t<=0&&b.render(zn,!0,!0)},xse=function(e,t,i,n,a,s,o,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,h,d,f;if(!u)for(u=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(c=d[f][t],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return uw=1,e.vars[t]="+=0",IA(e,o),uw=0,l?Qp(t+" not eligible for reset"):1;u.push(c)}for(f=u.length;f--;)h=u[f],c=h._pt||h,c.s=(n||n===0)&&!a?n:c.s+(n||0)+s*c.c,c.c=i-c.s,h.e&&(h.e=vr(i)+ii(h.e)),h.b&&(h.b=c.s+ii(h.b))},wse=function(e,t){var i=e[0]?Mu(e[0]).harness:0,n=i&&i.aliases,a,s,o,l;if(!n)return t;a=Yu({},t);for(s in n)if(s in a)for(l=n[s].split(","),o=l.length;o--;)a[l[o]]=a[s];return a},Cse=function(e,t,i,n){var a=t.ease||n||"power1.inOut",s,o;if(oi(t))o=i[e]||(i[e]=[]),t.forEach(function(l,u){return o.push({t:u/(t.length-1)*100,v:l,e:a})});else for(s in t)o=i[s]||(i[s]=[]),s==="ease"||o.push({t:parseFloat(e),v:t[s],e:a})},xp=function(e,t,i,n,a){return or(e)?e.call(t,i,n,a):$r(e)&&~e.indexOf("random(")?ev(e):e},rG=AA+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",iG={};qi(rG+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return iG[r]=1});var xr=function(r){T7(e,r);function e(i,n,a,s){var o;typeof n=="number"&&(a.duration=n,n=a,a=null),o=r.call(this,s?n:Tp(n))||this;var l=o.vars,u=l.duration,c=l.delay,h=l.immediateRender,d=l.stagger,f=l.overwrite,p=l.keyframes,v=l.defaults,g=l.scrollTrigger,m=l.yoyoEase,y=n.parent||Zt,_=(oi(i)||x7(i)?Gs(i[0]):"length"in n)?[i]:Gn(i),b,S,x,C,D,I,M,L;if(o._targets=_.length?DA(_):Qp("GSAP target "+i+" not found. https://gsap.com",!pn.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=f,p||d||Kg(u)||Kg(c)){if(n=o.vars,b=o.timeline=new Si({data:"nested",defaults:v||{},targets:y&&y.data==="nested"?y.vars.targets:_}),b.kill(),b.parent=b._dp=bs(o),b._start=0,d||Kg(u)||Kg(c)){if(C=_.length,M=d&&z7(d),ns(d))for(D in d)~rG.indexOf(D)&&(L||(L={}),L[D]=d[D]);for(S=0;S<C;S++)x=d0(n,iG),x.stagger=0,m&&(x.yoyoEase=m),L&&Yu(x,L),I=_[S],x.duration=+xp(u,bs(o),S,I,_),x.delay=(+xp(c,bs(o),S,I,_)||0)-o._delay,!d&&C===1&&x.delay&&(o._delay=c=x.delay,o._start+=c,x.delay=0),b.to(I,x,M?M(S,I,_):0),b._ease=mt.none;b.duration()?u=c=0:o.timeline=0}else if(p){Tp(Xn(b.vars.defaults,{ease:"none"})),b._ease=ku(p.ease||n.ease||"none");var N=0,O,B,F;if(oi(p))p.forEach(function(U){return b.to(_,U,">")}),b.duration();else{x={};for(D in p)D==="ease"||D==="easeEach"||Cse(D,p[D],x,p.easeEach);for(D in x)for(O=x[D].sort(function(U,$){return U.t-$.t}),N=0,S=0;S<O.length;S++)B=O[S],F={ease:B.e,duration:(B.t-(S?O[S-1].t:0))/100*u},F[D]=B.v,b.to(_,F,N),N+=F.duration;b.duration()<u&&b.to({},{duration:u-b.duration()})}}u||o.duration(u=b.duration())}else o.timeline=0;return f===!0&&!bA&&(Po=bs(o),Zt.killTweensOf(_),Po=0),Ba(y,bs(o),a),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(h||!u&&!p&&o._start===Vr(y._time)&&Wi(h)&&rse(bs(o))&&y.data!=="nested")&&(o._tTime=-Gt,o.render(Math.max(0,-c)||0)),g&&B7(bs(o),g),o}var t=e.prototype;return t.render=function(n,a,s){var o=this._time,l=this._tDur,u=this._dur,c=n<0,h=n>l-Gt&&!c?l:n<Gt?0:n,d,f,p,v,g,m,y,_,b;if(!u)nse(this,n,a,s);else if(h!==this._tTime||!n||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c){if(d=h,_=this.timeline,this._repeat){if(v=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(v*100+n,a,s);if(d=Vr(h%v),h===l?(p=this._repeat,d=u):(p=~~(h/v),p&&p===Vr(h/v)&&(d=u,p--),d>u&&(d=u)),m=this._yoyo&&p&1,m&&(b=this._yEase,d=u-d),g=ef(this._tTime,v),d===o&&!s&&this._initted&&p===g)return this._tTime=h,this;p!==g&&(_&&this._yEase&&Q7(_,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==v&&this._initted&&(this._lock=s=1,this.render(Vr(v*p),!0).invalidate()._lock=0))}if(!this._initted){if(F7(this,c?n:d,s,a,h))return this._tTime=0,this;if(o!==this._time&&!(s&&this.vars.repeatRefresh&&p!==g))return this;if(u!==this._dur)return this.render(n,a,s)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(b||this._ease)(d/u),this._from&&(this.ratio=y=1-y),d&&!o&&!a&&!p&&(hn(this,"onStart"),this._tTime!==h))return this;for(f=this._pt;f;)f.r(y,f.d),f=f._next;_&&_.render(n<0?n:_._dur*_._ease(d/this._dur),a,s)||this._startAt&&(this._zTime=n),this._onUpdate&&!a&&(c&&nw(this,n,a,s),hn(this,"onUpdate")),this._repeat&&p!==g&&this.vars.onRepeat&&!a&&this.parent&&hn(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(c&&!this._onUpdate&&nw(this,n,!0,!0),(n||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Zo(this,1),!a&&!(c&&!o)&&(h||o||m)&&(hn(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),r.prototype.invalidate.call(this,n)},t.resetTo=function(n,a,s,o,l){tv||ln.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||IA(this,u),c=this._ease(u/this._dur),xse(this,n,a,s,o,c,u,l)?this.resetTo(n,a,s,o,1):(X_(this,0),this.parent||O7(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,a){if(a===void 0&&(a="all"),!n&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?Yd(this):this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(n,a,Po&&Po.vars.overwrite!==!0)._first||Yd(this),this.parent&&s!==this.timeline.totalDuration()&&tf(this,this._dur*this.timeline._tDur/s,0,1),this}var o=this._targets,l=n?Gn(n):o,u=this._ptLookup,c=this._pt,h,d,f,p,v,g,m;if((!a||a==="all")&&ese(o,l))return a==="all"&&(this._pt=0),Yd(this);for(h=this._op=this._op||[],a!=="all"&&($r(a)&&(v={},qi(a,function(y){return v[y]=1}),a=v),a=wse(o,a)),m=o.length;m--;)if(~l.indexOf(o[m])){d=u[m],a==="all"?(h[m]=a,p=d,f={}):(f=h[m]=h[m]||{},p=a);for(v in p)g=d&&d[v],g&&((!("kill"in g.d)||g.d.kill(v)===!0)&&q_(this,g,"_pt"),delete d[v]),f!=="all"&&(f[v]=1)}return this._initted&&!this._pt&&c&&Yd(this),this},e.to=function(n,a){return new e(n,a,arguments[2])},e.from=function(n,a){return Sp(1,arguments)},e.delayedCall=function(n,a,s,o){return new e(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:a,onReverseComplete:a,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:o})},e.fromTo=function(n,a,s){return Sp(2,arguments)},e.set=function(n,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new e(n,a)},e.killTweensOf=function(n,a,s){return Zt.killTweensOf(n,a,s)},e}(rv);Xn(xr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});qi("staggerTo,staggerFrom,staggerFromTo",function(r){xr[r]=function(){var e=new Si,t=sw.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var PA=function(e,t,i){return e[t]=i},nG=function(e,t,i){return e[t](i)},Ase=function(e,t,i,n){return e[t](n.fp,i)},Dse=function(e,t,i){return e.setAttribute(t,i)},MA=function(e,t){return or(e[t])?nG:TA(e[t])&&e.setAttribute?Dse:PA},aG=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Ese=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},sG=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},LA=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},Ise=function(e,t,i,n){for(var a=this._pt,s;a;)s=a._next,a.p===n&&a.modifier(e,t,i),a=s},Pse=function(e){for(var t=this._pt,i,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?q_(this,t,"_pt"):t.dep||(i=1),t=n;return!i},Mse=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},oG=function(e){for(var t=e._pt,i,n,a,s;t;){for(i=t._next,n=a;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:s)?t._prev._next=t:a=t,(t._next=n)?n._prev=t:s=t,t=i}e._pt=a},ji=function(){function r(t,i,n,a,s,o,l,u,c){this.t=i,this.s=a,this.c=s,this.p=n,this.r=o||aG,this.d=l||this,this.set=u||PA,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(i,n,a){this.mSet=this.mSet||this.set,this.set=Mse,this.m=i,this.mt=a,this.tween=n},r}();qi(AA+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return CA[r]=1});Tn.TweenMax=Tn.TweenLite=xr;Tn.TimelineLite=Tn.TimelineMax=Si;Zt=new Si({sortChildren:!1,defaults:Jh,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});pn.stringFilter=K7;var Ru=[],uy={},Lse=[],jM=0,kse=0,Nb=function(e){return(uy[e]||Lse).map(function(t){return t()})},cw=function(){var e=Date.now(),t=[];e-jM>2&&(Nb("matchMediaInit"),Ru.forEach(function(i){var n=i.queries,a=i.conditions,s,o,l,u;for(o in n)s=Ra.matchMedia(n[o]).matches,s&&(l=1),s!==a[o]&&(a[o]=s,u=1);u&&(i.revert(),l&&t.push(i))}),Nb("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(n){return i.add(null,n)})}),jM=e,Nb("matchMedia"))},lG=function(){function r(t,i){this.selector=i&&ow(i),this.data=[],this._r=[],this.isReverted=!1,this.id=kse++,t&&this.add(t)}var e=r.prototype;return e.add=function(i,n,a){or(i)&&(a=n,n=i,i=or);var s=this,o=function(){var u=Xt,c=s.selector,h;return u&&u!==s&&u.data.push(s),a&&(s.selector=ow(a)),Xt=s,h=n.apply(s,arguments),or(h)&&s._r.push(h),Xt=u,s.selector=c,s.isReverted=!1,h};return s.last=o,i===or?o(s,function(l){return s.add(null,l)}):i?s[i]=o:o},e.ignore=function(i){var n=Xt;Xt=null,i(this),Xt=n},e.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof r?i.push.apply(i,n.getTweens()):n instanceof xr&&!(n.parent&&n.parent.data==="nested")&&i.push(n)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,n){var a=this;if(i?function(){for(var o=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,h){return h.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=a.data.length;l--;)u=a.data[l],u instanceof Si?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof xr)&&u.revert&&u.revert(i);a._r.forEach(function(c){return c(i,a)}),a.isReverted=!0}():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),n)for(var s=Ru.length;s--;)Ru[s].id===this.id&&Ru.splice(s,1)},e.revert=function(i){this.kill(i||{})},r}(),Rse=function(){function r(t){this.contexts=[],this.scope=t,Xt&&Xt.data.push(this)}var e=r.prototype;return e.add=function(i,n,a){ns(i)||(i={matches:i});var s=new lG(0,a||this.scope),o=s.conditions={},l,u,c;Xt&&!s.selector&&(s.selector=Xt.selector),this.contexts.push(s),n=s.add("onMatch",n),s.queries=i;for(u in i)u==="all"?c=1:(l=Ra.matchMedia(i[u]),l&&(Ru.indexOf(s)<0&&Ru.push(s),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(cw):l.addEventListener("change",cw)));return c&&n(s,function(h){return s.add(null,h)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},r}(),v0={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(n){return j7(n)})},timeline:function(e){return new Si(e)},getTweensOf:function(e,t){return Zt.getTweensOf(e,t)},getProperty:function(e,t,i,n){$r(e)&&(e=Gn(e)[0]);var a=Mu(e||{}).get,s=i?R7:k7;return i==="native"&&(i=""),e&&(t?s((sn[t]&&sn[t].get||a)(e,t,i,n)):function(o,l,u){return s((sn[o]&&sn[o].get||a)(e,o,l,u))})},quickSetter:function(e,t,i){if(e=Gn(e),e.length>1){var n=e.map(function(c){return Yi.quickSetter(c,t,i)}),a=n.length;return function(c){for(var h=a;h--;)n[h](c)}}e=e[0]||{};var s=sn[t],o=Mu(e),l=o.harness&&(o.harness.aliases||{})[t]||t,u=s?function(c){var h=new s;vh._pt=0,h.init(e,i?c+i:c,vh,0,[e]),h.render(1,h),vh._pt&&LA(1,vh)}:o.set(e,l);return s?u:function(c){return u(e,l,i?c+i:c,o,1)}},quickTo:function(e,t,i){var n,a=Yi.to(e,Yu((n={},n[t]="+=0.1",n.paused=!0,n),i||{})),s=function(l,u,c){return a.resetTo(t,l,u,c)};return s.tween=a,s},isTweening:function(e){return Zt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=ku(e.ease,Jh.ease)),GM(Jh,e||{})},config:function(e){return GM(pn,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,n=e.plugins,a=e.defaults,s=e.extendTimeline;(n||"").split(",").forEach(function(o){return o&&!sn[o]&&!Tn[o]&&Qp(t+" effect requires "+o+" plugin.")}),Lb[t]=function(o,l,u){return i(Gn(o),Xn(l||{},a),u)},s&&(Si.prototype[t]=function(o,l,u){return this.add(Lb[t](o,ns(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){mt[e]=ku(t)},parseEase:function(e,t){return arguments.length?ku(e,t):mt},getById:function(e){return Zt.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Si(e),n,a;for(i.smoothChildTiming=Wi(e.smoothChildTiming),Zt.remove(i),i._dp=0,i._time=i._tTime=Zt._time,n=Zt._first;n;)a=n._next,(t||!(!n._dur&&n instanceof xr&&n.vars.onComplete===n._targets[0]))&&Ba(i,n,n._start-n._delay),n=a;return Ba(Zt,i,0),i},context:function(e,t){return e?new lG(e,t):Xt},matchMedia:function(e){return new Rse(e)},matchMediaRefresh:function(){return Ru.forEach(function(e){var t=e.conditions,i,n;for(n in t)t[n]&&(t[n]=!1,i=1);i&&e.revert()})||cw()},addEventListener:function(e,t){var i=uy[e]||(uy[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=uy[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},utils:{wrap:fse,wrapYoyo:dse,distribute:z7,random:H7,snap:G7,normalize:hse,getUnit:ii,clamp:ose,splitColor:X7,toArray:Gn,selector:ow,mapRange:W7,pipe:use,unitize:cse,interpolate:pse,shuffle:V7},install:E7,effects:Lb,ticker:ln,updateRoot:Si.updateRoot,plugins:sn,globalTimeline:Zt,core:{PropTween:ji,globals:I7,Tween:xr,Timeline:Si,Animation:rv,getCache:Mu,_removeLinkedListItem:q_,reverting:function(){return si},context:function(e){return e&&Xt&&(Xt.data.push(e),e._ctx=Xt),Xt},suppressOverwrites:function(e){return bA=e}}};qi("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return v0[r]=xr[r]});ln.add(Si.updateRoot);vh=v0.to({},{duration:0});var Ose=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Nse=function(e,t){var i=e._targets,n,a,s;for(n in t)for(a=i.length;a--;)s=e._ptLookup[a][n],s&&(s=s.d)&&(s._pt&&(s=Ose(s,n)),s&&s.modifier&&s.modifier(t[n],e,i[a],n))},Bb=function(e,t){return{name:e,rawVars:1,init:function(n,a,s){s._onInit=function(o){var l,u;if($r(a)&&(l={},qi(a,function(c){return l[c]=1}),a=l),t){l={};for(u in a)l[u]=t(a[u]);a=l}Nse(o,a)}}}},Yi=v0.registerPlugin({name:"attr",init:function(e,t,i,n,a){var s,o,l;this.tween=i;for(s in t)l=e.getAttribute(s)||"",o=this.add(e,"setAttribute",(l||0)+"",t[s],n,a,0,0,s),o.op=s,o.b=l,this._props.push(s)},render:function(e,t){for(var i=t._pt;i;)si?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},Bb("roundProps",lw),Bb("modifiers"),Bb("snap",G7))||v0;xr.version=Si.version=Yi.version="3.12.5";D7=1;SA()&&rf();mt.Power0;mt.Power1;mt.Power2;mt.Power3;mt.Power4;mt.Linear;mt.Quad;mt.Cubic;mt.Quart;mt.Quint;mt.Strong;mt.Elastic;mt.Back;mt.SteppedEase;mt.Bounce;mt.Sine;mt.Expo;mt.Circ;/*!
* CSSPlugin 3.12.5
* https://gsap.com
*
* Copyright 2008-2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for
* Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/var XM,Mo,Eh,kA,vu,YM,RA,Bse=function(){return typeof window<"u"},Hs={},Ql=180/Math.PI,Ih=Math.PI/180,Lc=Math.atan2,KM=1e8,OA=/([A-Z])/g,Fse=/(left|right|width|margin|padding|x)/i,Use=/[\s,\(]\S/,$a={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},hw=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Vse=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},zse=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Gse=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},uG=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},cG=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Hse=function(e,t,i){return e.style[t]=i},$se=function(e,t,i){return e.style.setProperty(t,i)},Wse=function(e,t,i){return e._gsap[t]=i},qse=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},jse=function(e,t,i,n,a){var s=e._gsap;s.scaleX=s.scaleY=i,s.renderTransform(a,s)},Xse=function(e,t,i,n,a){var s=e._gsap;s[t]=i,s.renderTransform(a,s)},Qt="transform",Xi=Qt+"Origin",Yse=function r(e,t){var i=this,n=this.target,a=n.style,s=n._gsap;if(e in Hs&&a){if(this.tfm=this.tfm||{},e!=="transform")e=$a[e]||e,~e.indexOf(",")?e.split(",").forEach(function(o){return i.tfm[o]=xs(n,o)}):this.tfm[e]=s.x?s[e]:xs(n,e),e===Xi&&(this.tfm.zOrigin=s.zOrigin);else return $a.transform.split(",").forEach(function(o){return r.call(i,o,t)});if(this.props.indexOf(Qt)>=0)return;s.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Xi,t,"")),e=Qt}(a||t)&&this.props.push(e,t,a[e])},hG=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Kse=function(){var e=this.props,t=this.target,i=t.style,n=t._gsap,a,s;for(a=0;a<e.length;a+=3)e[a+1]?t[e[a]]=e[a+2]:e[a+2]?i[e[a]]=e[a+2]:i.removeProperty(e[a].substr(0,2)==="--"?e[a]:e[a].replace(OA,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)n[s]=this.tfm[s];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),a=RA(),(!a||!a.isStart)&&!i[Qt]&&(hG(i),n.zOrigin&&i[Xi]&&(i[Xi]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},fG=function(e,t){var i={target:e,props:[],revert:Kse,save:Yse};return e._gsap||Yi.core.getCache(e),t&&t.split(",").forEach(function(n){return i.save(n)}),i},dG,fw=function(e,t){var i=Mo.createElementNS?Mo.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Mo.createElement(e);return i&&i.style?i:Mo.createElement(e)},Za=function r(e,t,i){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(OA,"-$1").toLowerCase())||n.getPropertyValue(t)||!i&&r(e,nf(t)||t,1)||""},ZM="O,Moz,ms,Ms,Webkit".split(","),nf=function(e,t,i){var n=t||vu,a=n.style,s=5;if(e in a&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);s--&&!(ZM[s]+e in a););return s<0?null:(s===3?"ms":s>=0?ZM[s]:"")+e},dw=function(){Bse()&&window.document&&(XM=window,Mo=XM.document,Eh=Mo.documentElement,vu=fw("div")||{style:{}},fw("div"),Qt=nf(Qt),Xi=Qt+"Origin",vu.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",dG=!!nf("perspective"),RA=Yi.core.reverting,kA=1)},Fb=function r(e){var t=fw("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,a=this.style.cssText,s;if(Eh.appendChild(t),t.appendChild(this),this.style.display="block",e)try{s=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=r}catch{}else this._gsapBBox&&(s=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),Eh.removeChild(t),this.style.cssText=a,s},QM=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},pG=function(e){var t;try{t=e.getBBox()}catch{t=Fb.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===Fb||(t=Fb.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+QM(e,["x","cx","x1"])||0,y:+QM(e,["y","cy","y1"])||0,width:0,height:0}:t},vG=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&pG(e))},Ku=function(e,t){if(t){var i=e.style,n;t in Hs&&t!==Xi&&(t=Qt),i.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(n==="--"?t:t.replace(OA,"-$1").toLowerCase())):i.removeAttribute(t)}},Lo=function(e,t,i,n,a,s){var o=new ji(e._pt,t,i,0,1,s?cG:uG);return e._pt=o,o.b=n,o.e=a,e._props.push(i),o},JM={deg:1,rad:1,turn:1},Zse={grid:1,flex:1},Qo=function r(e,t,i,n){var a=parseFloat(i)||0,s=(i+"").trim().substr((a+"").length)||"px",o=vu.style,l=Fse.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),h=100,d=n==="px",f=n==="%",p,v,g,m;if(n===s||!a||JM[n]||JM[s])return a;if(s!=="px"&&!d&&(a=r(e,t,i,"px")),m=e.getCTM&&vG(e),(f||s==="%")&&(Hs[t]||~t.indexOf("adius")))return p=m?e.getBBox()[l?"width":"height"]:e[c],vr(f?a/p*h:a/100*p);if(o[l?"width":"height"]=h+(d?s:n),v=~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,m&&(v=(e.ownerSVGElement||{}).parentNode),(!v||v===Mo||!v.appendChild)&&(v=Mo.body),g=v._gsap,g&&f&&g.width&&l&&g.time===ln.time&&!g.uncache)return vr(a/g.width*h);if(f&&(t==="height"||t==="width")){var y=e.style[t];e.style[t]=h+n,p=e[c],y?e.style[t]=y:Ku(e,t)}else(f||s==="%")&&!Zse[Za(v,"display")]&&(o.position=Za(e,"position")),v===e&&(o.position="static"),v.appendChild(vu),p=vu[c],v.removeChild(vu),o.position="absolute";return l&&f&&(g=Mu(v),g.time=ln.time,g.width=v[c]),vr(d?p*a/h:p&&a?h/p*a:0)},xs=function(e,t,i,n){var a;return kA||dw(),t in $a&&t!=="transform"&&(t=$a[t],~t.indexOf(",")&&(t=t.split(",")[0])),Hs[t]&&t!=="transform"?(a=nv(e,n),a=t!=="transformOrigin"?a[t]:a.svg?a.origin:m0(Za(e,Xi))+" "+a.zOrigin+"px"):(a=e.style[t],(!a||a==="auto"||n||~(a+"").indexOf("calc("))&&(a=g0[t]&&g0[t](e,t,i)||Za(e,t)||M7(e,t)||(t==="opacity"?1:0))),i&&!~(a+"").trim().indexOf(" ")?Qo(e,t,a,i)+i:a},Qse=function(e,t,i,n){if(!i||i==="none"){var a=nf(t,e,1),s=a&&Za(e,a,1);s&&s!==i?(t=a,i=s):t==="borderColor"&&(i=Za(e,"borderTopColor"))}var o=new ji(this._pt,e.style,t,0,1,sG),l=0,u=0,c,h,d,f,p,v,g,m,y,_,b,S;if(o.b=i,o.e=n,i+="",n+="",n==="auto"&&(v=e.style[t],e.style[t]=n,n=Za(e,t)||n,v?e.style[t]=v:Ku(e,t)),c=[i,n],K7(c),i=c[0],n=c[1],d=i.match(ph)||[],S=n.match(ph)||[],S.length){for(;h=ph.exec(n);)g=h[0],y=n.substring(l,h.index),p?p=(p+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(p=1),g!==(v=d[u++]||"")&&(f=parseFloat(v)||0,b=v.substr((f+"").length),g.charAt(1)==="="&&(g=Dh(f,g)+b),m=parseFloat(g),_=g.substr((m+"").length),l=ph.lastIndex-_.length,_||(_=_||pn.units[t]||b,l===n.length&&(n+=_,o.e+=_)),b!==_&&(f=Qo(e,t,v,_)||0),o._pt={_next:o._pt,p:y||u===1?y:",",s:f,c:m-f,m:p&&p<4||t==="zIndex"?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r=t==="display"&&n==="none"?cG:uG;return C7.test(n)&&(o.e=0),this._pt=o,o},eL={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Jse=function(e){var t=e.split(" "),i=t[0],n=t[1]||"50%";return(i==="top"||i==="bottom"||n==="left"||n==="right")&&(e=i,i=n,n=e),t[0]=eL[i]||i,t[1]=eL[n]||n,t.join(" ")},eoe=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,n=i.style,a=t.u,s=i._gsap,o,l,u;if(a==="all"||a===!0)n.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)o=a[u],Hs[o]&&(l=1,o=o==="transformOrigin"?Xi:Qt),Ku(i,o);l&&(Ku(i,Qt),s&&(s.svg&&i.removeAttribute("transform"),nv(i,1),s.uncache=1,hG(n)))}},g0={clearProps:function(e,t,i,n,a){if(a.data!=="isFromStart"){var s=e._pt=new ji(e._pt,t,i,0,0,eoe);return s.u=n,s.pr=-10,s.tween=a,e._props.push(i),1}}},iv=[1,0,0,1,0,0],gG={},mG=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},tL=function(e){var t=Za(e,Qt);return mG(t)?iv:t.substr(7).match(w7).map(vr)},NA=function(e,t){var i=e._gsap||Mu(e),n=e.style,a=tL(e),s,o,l,u;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?iv:a):(a===iv&&!e.offsetParent&&e!==Eh&&!i.svg&&(l=n.display,n.display="block",s=e.parentNode,(!s||!e.offsetParent)&&(u=1,o=e.nextElementSibling,Eh.appendChild(e)),a=tL(e),l?n.display=l:Ku(e,"display"),u&&(o?s.insertBefore(e,o):s?s.appendChild(e):Eh.removeChild(e))),t&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},pw=function(e,t,i,n,a,s){var o=e._gsap,l=a||NA(e,!0),u=o.xOrigin||0,c=o.yOrigin||0,h=o.xOffset||0,d=o.yOffset||0,f=l[0],p=l[1],v=l[2],g=l[3],m=l[4],y=l[5],_=t.split(" "),b=parseFloat(_[0])||0,S=parseFloat(_[1])||0,x,C,D,I;i?l!==iv&&(C=f*g-p*v)&&(D=b*(g/C)+S*(-v/C)+(v*y-g*m)/C,I=b*(-p/C)+S*(f/C)-(f*y-p*m)/C,b=D,S=I):(x=pG(e),b=x.x+(~_[0].indexOf("%")?b/100*x.width:b),S=x.y+(~(_[1]||_[0]).indexOf("%")?S/100*x.height:S)),n||n!==!1&&o.smooth?(m=b-u,y=S-c,o.xOffset=h+(m*f+y*v)-m,o.yOffset=d+(m*p+y*g)-y):o.xOffset=o.yOffset=0,o.xOrigin=b,o.yOrigin=S,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!i,e.style[Xi]="0px 0px",s&&(Lo(s,o,"xOrigin",u,b),Lo(s,o,"yOrigin",c,S),Lo(s,o,"xOffset",h,o.xOffset),Lo(s,o,"yOffset",d,o.yOffset)),e.setAttribute("data-svg-origin",b+" "+S)},nv=function(e,t){var i=e._gsap||new eG(e);if("x"in i&&!t&&!i.uncache)return i;var n=e.style,a=i.scaleX<0,s="px",o="deg",l=getComputedStyle(e),u=Za(e,Xi)||"0",c,h,d,f,p,v,g,m,y,_,b,S,x,C,D,I,M,L,N,O,B,F,U,$,q,Z,te,Q,se,he,ue,Ie;return c=h=d=v=g=m=y=_=b=0,f=p=1,i.svg=!!(e.getCTM&&vG(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[Qt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Qt]!=="none"?l[Qt]:"")),n.scale=n.rotate=n.translate="none"),C=NA(e,i.svg),i.svg&&(i.uncache?(q=e.getBBox(),u=i.xOrigin-q.x+"px "+(i.yOrigin-q.y)+"px",$=""):$=!t&&e.getAttribute("data-svg-origin"),pw(e,$||u,!!$||i.originIsAbsolute,i.smooth!==!1,C)),S=i.xOrigin||0,x=i.yOrigin||0,C!==iv&&(L=C[0],N=C[1],O=C[2],B=C[3],c=F=C[4],h=U=C[5],C.length===6?(f=Math.sqrt(L*L+N*N),p=Math.sqrt(B*B+O*O),v=L||N?Lc(N,L)*Ql:0,y=O||B?Lc(O,B)*Ql+v:0,y&&(p*=Math.abs(Math.cos(y*Ih))),i.svg&&(c-=S-(S*L+x*O),h-=x-(S*N+x*B))):(Ie=C[6],he=C[7],te=C[8],Q=C[9],se=C[10],ue=C[11],c=C[12],h=C[13],d=C[14],D=Lc(Ie,se),g=D*Ql,D&&(I=Math.cos(-D),M=Math.sin(-D),$=F*I+te*M,q=U*I+Q*M,Z=Ie*I+se*M,te=F*-M+te*I,Q=U*-M+Q*I,se=Ie*-M+se*I,ue=he*-M+ue*I,F=$,U=q,Ie=Z),D=Lc(-O,se),m=D*Ql,D&&(I=Math.cos(-D),M=Math.sin(-D),$=L*I-te*M,q=N*I-Q*M,Z=O*I-se*M,ue=B*M+ue*I,L=$,N=q,O=Z),D=Lc(N,L),v=D*Ql,D&&(I=Math.cos(D),M=Math.sin(D),$=L*I+N*M,q=F*I+U*M,N=N*I-L*M,U=U*I-F*M,L=$,F=q),g&&Math.abs(g)+Math.abs(v)>359.9&&(g=v=0,m=180-m),f=vr(Math.sqrt(L*L+N*N+O*O)),p=vr(Math.sqrt(U*U+Ie*Ie)),D=Lc(F,U),y=Math.abs(D)>2e-4?D*Ql:0,b=ue?1/(ue<0?-ue:ue):0),i.svg&&($=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!mG(Za(e,Qt)),$&&e.setAttribute("transform",$))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(f*=-1,y+=v<=0?180:-180,v+=v<=0?180:-180):(p*=-1,y+=y<=0?180:-180)),t=t||i.uncache,i.x=c-((i.xPercent=c&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+s,i.y=h-((i.yPercent=h&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+s,i.z=d+s,i.scaleX=vr(f),i.scaleY=vr(p),i.rotation=vr(v)+o,i.rotationX=vr(g)+o,i.rotationY=vr(m)+o,i.skewX=y+o,i.skewY=_+o,i.transformPerspective=b+s,(i.zOrigin=parseFloat(u.split(" ")[2])||!t&&i.zOrigin||0)&&(n[Xi]=m0(u)),i.xOffset=i.yOffset=0,i.force3D=pn.force3D,i.renderTransform=i.svg?roe:dG?yG:toe,i.uncache=0,i},m0=function(e){return(e=e.split(" "))[0]+" "+e[1]},Ub=function(e,t,i){var n=ii(t);return vr(parseFloat(t)+parseFloat(Qo(e,"x",i+"px",n)))+n},toe=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,yG(e,t)},xl="0deg",hd="0px",wl=") ",yG=function(e,t){var i=t||this,n=i.xPercent,a=i.yPercent,s=i.x,o=i.y,l=i.z,u=i.rotation,c=i.rotationY,h=i.rotationX,d=i.skewX,f=i.skewY,p=i.scaleX,v=i.scaleY,g=i.transformPerspective,m=i.force3D,y=i.target,_=i.zOrigin,b="",S=m==="auto"&&e&&e!==1||m===!0;if(_&&(h!==xl||c!==xl)){var x=parseFloat(c)*Ih,C=Math.sin(x),D=Math.cos(x),I;x=parseFloat(h)*Ih,I=Math.cos(x),s=Ub(y,s,C*I*-_),o=Ub(y,o,-Math.sin(x)*-_),l=Ub(y,l,D*I*-_+_)}g!==hd&&(b+="perspective("+g+wl),(n||a)&&(b+="translate("+n+"%, "+a+"%) "),(S||s!==hd||o!==hd||l!==hd)&&(b+=l!==hd||S?"translate3d("+s+", "+o+", "+l+") ":"translate("+s+", "+o+wl),u!==xl&&(b+="rotate("+u+wl),c!==xl&&(b+="rotateY("+c+wl),h!==xl&&(b+="rotateX("+h+wl),(d!==xl||f!==xl)&&(b+="skew("+d+", "+f+wl),(p!==1||v!==1)&&(b+="scale("+p+", "+v+wl),y.style[Qt]=b||"translate(0, 0)"},roe=function(e,t){var i=t||this,n=i.xPercent,a=i.yPercent,s=i.x,o=i.y,l=i.rotation,u=i.skewX,c=i.skewY,h=i.scaleX,d=i.scaleY,f=i.target,p=i.xOrigin,v=i.yOrigin,g=i.xOffset,m=i.yOffset,y=i.forceCSS,_=parseFloat(s),b=parseFloat(o),S,x,C,D,I;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Ih,u*=Ih,S=Math.cos(l)*h,x=Math.sin(l)*h,C=Math.sin(l-u)*-d,D=Math.cos(l-u)*d,u&&(c*=Ih,I=Math.tan(u-c),I=Math.sqrt(1+I*I),C*=I,D*=I,c&&(I=Math.tan(c),I=Math.sqrt(1+I*I),S*=I,x*=I)),S=vr(S),x=vr(x),C=vr(C),D=vr(D)):(S=h,D=d,x=C=0),(_&&!~(s+"").indexOf("px")||b&&!~(o+"").indexOf("px"))&&(_=Qo(f,"x",s,"px"),b=Qo(f,"y",o,"px")),(p||v||g||m)&&(_=vr(_+p-(p*S+v*C)+g),b=vr(b+v-(p*x+v*D)+m)),(n||a)&&(I=f.getBBox(),_=vr(_+n/100*I.width),b=vr(b+a/100*I.height)),I="matrix("+S+","+x+","+C+","+D+","+_+","+b+")",f.setAttribute("transform",I),y&&(f.style[Qt]=I)},ioe=function(e,t,i,n,a){var s=360,o=$r(a),l=parseFloat(a)*(o&&~a.indexOf("rad")?Ql:1),u=l-n,c=n+u+"deg",h,d;return o&&(h=a.split("_")[1],h==="short"&&(u%=s,u!==u%(s/2)&&(u+=u<0?s:-s)),h==="cw"&&u<0?u=(u+s*KM)%s-~~(u/s)*s:h==="ccw"&&u>0&&(u=(u-s*KM)%s-~~(u/s)*s)),e._pt=d=new ji(e._pt,t,i,n,u,Vse),d.e=c,d.u="deg",e._props.push(i),d},rL=function(e,t){for(var i in t)e[i]=t[i];return e},noe=function(e,t,i){var n=rL({},i._gsap),a="perspective,force3D,transformOrigin,svgOrigin",s=i.style,o,l,u,c,h,d,f,p;n.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),s[Qt]=t,o=nv(i,1),Ku(i,Qt),i.setAttribute("transform",u)):(u=getComputedStyle(i)[Qt],s[Qt]=t,o=nv(i,1),s[Qt]=u);for(l in Hs)u=n[l],c=o[l],u!==c&&a.indexOf(l)<0&&(f=ii(u),p=ii(c),h=f!==p?Qo(i,l,u,p):parseFloat(u),d=parseFloat(c),e._pt=new ji(e._pt,o,l,h,d-h,hw),e._pt.u=p||0,e._props.push(l));rL(o,n)};qi("padding,margin,Width,Radius",function(r,e){var t="Top",i="Right",n="Bottom",a="Left",s=(e<3?[t,i,n,a]:[t+a,t+i,n+i,n+a]).map(function(o){return e<2?r+o:"border"+o+r});g0[e>1?"border"+r:r]=function(o,l,u,c,h){var d,f;if(arguments.length<4)return d=s.map(function(p){return xs(o,p,u)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(c+"").split(" "),f={},s.forEach(function(p,v){return f[p]=d[v]=d[v]||d[(v-1)/2|0]}),o.init(l,f,h)}});var _G={name:"css",register:dw,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,a){var s=this._props,o=e.style,l=i.vars.startAt,u,c,h,d,f,p,v,g,m,y,_,b,S,x,C,D;kA||dw(),this.styles=this.styles||fG(e),D=this.styles.props,this.tween=i;for(v in t)if(v!=="autoRound"&&(c=t[v],!(sn[v]&&tG(v,t,i,n,e,a)))){if(f=typeof c,p=g0[v],f==="function"&&(c=c.call(i,n,e,a),f=typeof c),f==="string"&&~c.indexOf("random(")&&(c=ev(c)),p)p(this,e,v,c,i)&&(C=1);else if(v.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(v)+"").trim(),c+="",$o.lastIndex=0,$o.test(u)||(g=ii(u),m=ii(c)),m?g!==m&&(u=Qo(e,v,u,m)+m):g&&(c+=g),this.add(o,"setProperty",u,c,n,a,0,0,v),s.push(v),D.push(v,0,o[v]);else if(f!=="undefined"){if(l&&v in l?(u=typeof l[v]=="function"?l[v].call(i,n,e,a):l[v],$r(u)&&~u.indexOf("random(")&&(u=ev(u)),ii(u+"")||u==="auto"||(u+=pn.units[v]||ii(xs(e,v))||""),(u+"").charAt(1)==="="&&(u=xs(e,v))):u=xs(e,v),d=parseFloat(u),y=f==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),h=parseFloat(c),v in $a&&(v==="autoAlpha"&&(d===1&&xs(e,"visibility")==="hidden"&&h&&(d=0),D.push("visibility",0,o.visibility),Lo(this,o,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),v!=="scale"&&v!=="transform"&&(v=$a[v],~v.indexOf(",")&&(v=v.split(",")[0]))),_=v in Hs,_){if(this.styles.save(v),b||(S=e._gsap,S.renderTransform&&!t.parseTransform||nv(e,t.parseTransform),x=t.smoothOrigin!==!1&&S.smooth,b=this._pt=new ji(this._pt,o,Qt,0,1,S.renderTransform,S,0,-1),b.dep=1),v==="scale")this._pt=new ji(this._pt,S,"scaleY",S.scaleY,(y?Dh(S.scaleY,y+h):h)-S.scaleY||0,hw),this._pt.u=0,s.push("scaleY",v),v+="X";else if(v==="transformOrigin"){D.push(Xi,0,o[Xi]),c=Jse(c),S.svg?pw(e,c,0,x,0,this):(m=parseFloat(c.split(" ")[2])||0,m!==S.zOrigin&&Lo(this,S,"zOrigin",S.zOrigin,m),Lo(this,o,v,m0(u),m0(c)));continue}else if(v==="svgOrigin"){pw(e,c,1,x,0,this);continue}else if(v in gG){ioe(this,S,v,d,y?Dh(d,y+c):c);continue}else if(v==="smoothOrigin"){Lo(this,S,"smooth",S.smooth,c);continue}else if(v==="force3D"){S[v]=c;continue}else if(v==="transform"){noe(this,c,e);continue}}else v in o||(v=nf(v)||v);if(_||(h||h===0)&&(d||d===0)&&!Use.test(c)&&v in o)g=(u+"").substr((d+"").length),h||(h=0),m=ii(c)||(v in pn.units?pn.units[v]:g),g!==m&&(d=Qo(e,v,u,m)),this._pt=new ji(this._pt,_?S:o,v,d,(y?Dh(d,y+h):h)-d,!_&&(m==="px"||v==="zIndex")&&t.autoRound!==!1?Gse:hw),this._pt.u=m||0,g!==m&&m!=="%"&&(this._pt.b=u,this._pt.r=zse);else if(v in o)Qse.call(this,e,v,u,y?y+c:c);else if(v in e)this.add(e,v,u||e[v],y?y+c:c,n,a);else if(v!=="parseTransform"){wA(v,c);continue}_||(v in o?D.push(v,0,o[v]):D.push(v,1,u||e[v])),s.push(v)}}C&&oG(this)},render:function(e,t){if(t.tween._time||!RA())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:xs,aliases:$a,getSetter:function(e,t,i){var n=$a[t];return n&&n.indexOf(",")<0&&(t=n),t in Hs&&t!==Xi&&(e._gsap.x||xs(e,"x"))?i&&YM===i?t==="scale"?qse:Wse:(YM=i||{})&&(t==="scale"?jse:Xse):e.style&&!TA(e.style[t])?Hse:~t.indexOf("-")?$se:MA(e,t)},core:{_removeProperty:Ku,_getMatrix:NA}};Yi.utils.checkPrefix=nf;Yi.core.getStyleSaver=fG;(function(r,e,t,i){var n=qi(r+","+e+","+t,function(a){Hs[a]=1});qi(e,function(a){pn.units[a]="deg",gG[a]=1}),$a[n[13]]=r+","+e,qi(i,function(a){var s=a.split(":");$a[s[1]]=n[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");qi("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){pn.units[r]="px"});Yi.registerPlugin(_G);var BA=Yi.registerPlugin(_G)||Yi;BA.core.Tween;/*!
* matrix 3.12.5
* https://gsap.com
*
* Copyright 2008-2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for
* Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/var Ds,Ou,FA,Y_,Zd,cy,y0,wp,ca="transform",vw=ca+"Origin",bG,TG=function(e){var t=e.ownerDocument||e;for(!(ca in e.style)&&("msTransform"in e.style)&&(ca="msTransform",vw=ca+"Origin");t.parentNode&&(t=t.parentNode););if(Ou=window,y0=new Zu,t){Ds=t,FA=t.documentElement,Y_=t.body,wp=Ds.createElementNS("http://www.w3.org/2000/svg","g"),wp.style.transform="none";var i=t.createElement("div"),n=t.createElement("div"),a=t&&(t.body||t.firstElementChild);a&&a.appendChild&&(a.appendChild(i),i.appendChild(n),i.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),bG=n.offsetParent!==i,a.removeChild(i))}return t},aoe=function(e){for(var t,i;e&&e!==Y_;)i=e._gsap,i&&i.uncache&&i.get(e,"x"),i&&!i.scaleX&&!i.scaleY&&i.renderTransform&&(i.scaleX=i.scaleY=1e-4,i.renderTransform(1,i),t?t.push(i):t=[i]),e=e.parentNode;return t},SG=[],xG=[],soe=function(){return Ou.pageYOffset||Ds.scrollTop||FA.scrollTop||Y_.scrollTop||0},ooe=function(){return Ou.pageXOffset||Ds.scrollLeft||FA.scrollLeft||Y_.scrollLeft||0},UA=function(e){return e.ownerSVGElement||((e.tagName+"").toLowerCase()==="svg"?e:null)},loe=function r(e){if(Ou.getComputedStyle(e).position==="fixed")return!0;if(e=e.parentNode,e&&e.nodeType===1)return r(e)},Vb=function r(e,t){if(e.parentNode&&(Ds||TG(e))){var i=UA(e),n=i?i.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",a=i?t?"rect":"g":"div",s=t!==2?0:100,o=t===3?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",u=Ds.createElementNS?Ds.createElementNS(n.replace(/^https/,"http"),a):Ds.createElement(a);return t&&(i?(cy||(cy=r(e)),u.setAttribute("width",.01),u.setAttribute("height",.01),u.setAttribute("transform","translate("+s+","+o+")"),cy.appendChild(u)):(Zd||(Zd=r(e),Zd.style.cssText=l),u.style.cssText=l+"width:0.1px;height:0.1px;top:"+o+"px;left:"+s+"px",Zd.appendChild(u))),u}throw"Need document and parent."},uoe=function(e){for(var t=new Zu,i=0;i<e.numberOfItems;i++)t.multiply(e.getItem(i).matrix);return t},coe=function(e){var t=e.getCTM(),i;return t||(i=e.style[ca],e.style[ca]="none",e.appendChild(wp),t=wp.getCTM(),e.removeChild(wp),i?e.style[ca]=i:e.style.removeProperty(ca.replace(/([A-Z])/g,"-$1").toLowerCase())),t||y0.clone()},hoe=function(e,t){var i=UA(e),n=e===i,a=i?SG:xG,s=e.parentNode,o,l,u,c,h,d;if(e===Ou)return e;if(a.length||a.push(Vb(e,1),Vb(e,2),Vb(e,3)),o=i?cy:Zd,i)n?(u=coe(e),c=-u.e/u.a,h=-u.f/u.d,l=y0):e.getBBox?(u=e.getBBox(),l=e.transform?e.transform.baseVal:{},l=l.numberOfItems?l.numberOfItems>1?uoe(l):l.getItem(0).matrix:y0,c=l.a*u.x+l.c*u.y,h=l.b*u.x+l.d*u.y):(l=new Zu,c=h=0),(n?i:s).appendChild(o),o.setAttribute("transform","matrix("+l.a+","+l.b+","+l.c+","+l.d+","+(l.e+c)+","+(l.f+h)+")");else{if(c=h=0,bG)for(l=e.offsetParent,u=e;u&&(u=u.parentNode)&&u!==l&&u.parentNode;)(Ou.getComputedStyle(u)[ca]+"").length>4&&(c=u.offsetLeft,h=u.offsetTop,u=0);if(d=Ou.getComputedStyle(e),d.position!=="absolute"&&d.position!=="fixed")for(l=e.offsetParent;s&&s!==l;)c+=s.scrollLeft||0,h+=s.scrollTop||0,s=s.parentNode;u=o.style,u.top=e.offsetTop-h+"px",u.left=e.offsetLeft-c+"px",u[ca]=d[ca],u[vw]=d[vw],u.position=d.position==="fixed"?"fixed":"absolute",e.parentNode.appendChild(o)}return o},zb=function(e,t,i,n,a,s,o){return e.a=t,e.b=i,e.c=n,e.d=a,e.e=s,e.f=o,e},Zu=function(){function r(t,i,n,a,s,o){t===void 0&&(t=1),i===void 0&&(i=0),n===void 0&&(n=0),a===void 0&&(a=1),s===void 0&&(s=0),o===void 0&&(o=0),zb(this,t,i,n,a,s,o)}var e=r.prototype;return e.inverse=function(){var i=this.a,n=this.b,a=this.c,s=this.d,o=this.e,l=this.f,u=i*s-n*a||1e-10;return zb(this,s/u,-n/u,-a/u,i/u,(a*l-s*o)/u,-(i*l-n*o)/u)},e.multiply=function(i){var n=this.a,a=this.b,s=this.c,o=this.d,l=this.e,u=this.f,c=i.a,h=i.c,d=i.b,f=i.d,p=i.e,v=i.f;return zb(this,c*n+d*s,c*a+d*o,h*n+f*s,h*a+f*o,l+p*n+v*s,u+p*a+v*o)},e.clone=function(){return new r(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(i){var n=this.a,a=this.b,s=this.c,o=this.d,l=this.e,u=this.f;return n===i.a&&a===i.b&&s===i.c&&o===i.d&&l===i.e&&u===i.f},e.apply=function(i,n){n===void 0&&(n={});var a=i.x,s=i.y,o=this.a,l=this.b,u=this.c,c=this.d,h=this.e,d=this.f;return n.x=a*o+s*u+h||0,n.y=a*l+s*c+d||0,n},r}();function ou(r,e,t,i){if(!r||!r.parentNode||(Ds||TG(r)).documentElement===r)return new Zu;var n=aoe(r),a=UA(r),s=a?SG:xG,o=hoe(r),l=s[0].getBoundingClientRect(),u=s[1].getBoundingClientRect(),c=s[2].getBoundingClientRect(),h=o.parentNode,d=loe(r),f=new Zu((u.left-l.left)/100,(u.top-l.top)/100,(c.left-l.left)/100,(c.top-l.top)/100,l.left+(d?0:ooe()),l.top+(d?0:soe()));if(h.removeChild(o),n)for(l=n.length;l--;)u=n[l],u.scaleX=u.scaleY=0,u.renderTransform(1,u);return e?f.inverse():f}function iL(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function foe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var gt,Ft,un,va,Es,Gb,ws,gw,Qd,ko,wG,mw,av,VA,Jd,na,ep,hy,CG,yw,_0=0,AG=function(){return typeof window<"u"},DG=function(){return gt||AG()&&(gt=window.gsap)&&gt.registerPlugin&&gt},Do=function(e){return typeof e=="function"},Cp=function(e){return typeof e=="object"},ua=function(e){return typeof e>"u"},fy=function(){return!1},Ap="transform",_w="transformOrigin",ho=function(e){return Math.round(e*1e4)/1e4},fd=Array.isArray,Zg=function(e,t){var i=un.createElementNS?un.createElementNS("http://www.w3.org/1999/xhtml".replace(/^https/,"http"),e):un.createElement(e);return i.style?i:un.createElement(e)},nL=180/Math.PI,Cl=1e20,doe=new Zu,fo=Date.now||function(){return new Date().getTime()},Nu=[],Ph={},poe=0,voe=/^(?:a|input|textarea|button|select)$/i,aL=0,kc={},_s={},EG=function(e,t){var i={},n;for(n in e)i[n]=t?e[n]*t:e[n];return i},goe=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},sL=function r(e,t){for(var i=e.length,n;i--;)t?e[i].style.touchAction=t:e[i].style.removeProperty("touch-action"),n=e[i].children,n&&n.length&&r(n,t)},IG=function(){return Nu.forEach(function(e){return e()})},moe=function(e){Nu.push(e),Nu.length===1&&gt.ticker.add(IG)},oL=function(){return!Nu.length&&gt.ticker.remove(IG)},lL=function(e){for(var t=Nu.length;t--;)Nu[t]===e&&Nu.splice(t,1);gt.to(oL,{overwrite:!0,delay:15,duration:0,onComplete:oL,data:"_draggable"})},yoe=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Pr=function(e,t,i,n){if(e.addEventListener){var a=av[t];n=n||(wG?{passive:!1}:null),e.addEventListener(a||t,i,n),a&&t!==a&&e.addEventListener(t,i,n)}},Tr=function(e,t,i,n){if(e.removeEventListener){var a=av[t];e.removeEventListener(a||t,i,n),a&&t!==a&&e.removeEventListener(t,i,n)}},Cn=function(e){e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation()},_oe=function(e,t){for(var i=e.length;i--;)if(e[i].identifier===t)return!0},boe=function r(e){VA=e.touches&&_0<e.touches.length,Tr(e.target,"touchend",r)},uL=function(e){VA=e.touches&&_0<e.touches.length,Pr(e.target,"touchend",boe)},Mh=function(e){return Ft.pageYOffset||e.scrollTop||e.documentElement.scrollTop||e.body.scrollTop||0},Lh=function(e){return Ft.pageXOffset||e.scrollLeft||e.documentElement.scrollLeft||e.body.scrollLeft||0},cL=function r(e,t){Pr(e,"scroll",t),af(e.parentNode)||r(e.parentNode,t)},hL=function r(e,t){Tr(e,"scroll",t),af(e.parentNode)||r(e.parentNode,t)},af=function(e){return!e||e===va||e.nodeType===9||e===un.body||e===Ft||!e.nodeType||!e.parentNode},fL=function(e,t){var i=t==="x"?"Width":"Height",n="scroll"+i,a="client"+i;return Math.max(0,af(e)?Math.max(va[n],Es[n])-(Ft["inner"+i]||va[a]||Es[a]):e[n]-e[a])},Hb=function r(e,t){var i=fL(e,"x"),n=fL(e,"y");af(e)?e=_s:r(e.parentNode,t),e._gsMaxScrollX=i,e._gsMaxScrollY=n,t||(e._gsScrollX=e.scrollLeft||0,e._gsScrollY=e.scrollTop||0)},$b=function(e,t,i){var n=e.style;n&&(ua(n[t])&&(t=Qd(t,e)||t),i==null?n.removeProperty&&n.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):n[t]=i)},sv=function(e){return Ft.getComputedStyle(e instanceof Element?e:e.host||(e.parentNode||{}).host||e)},Al={},Rc=function(e){if(e===Ft)return Al.left=Al.top=0,Al.width=Al.right=va.clientWidth||e.innerWidth||Es.clientWidth||0,Al.height=Al.bottom=(e.innerHeight||0)-20<va.clientHeight?va.clientHeight:e.innerHeight||Es.clientHeight||0,Al;var t=e.ownerDocument||un,i=ua(e.pageX)?!e.nodeType&&!ua(e.left)&&!ua(e.top)?e:ko(e)[0].getBoundingClientRect():{left:e.pageX-Lh(t),top:e.pageY-Mh(t),right:e.pageX-Lh(t)+1,bottom:e.pageY-Mh(t)+1};return ua(i.right)&&!ua(i.width)?(i.right=i.left+i.width,i.bottom=i.top+i.height):ua(i.width)&&(i={width:i.right-i.left,height:i.bottom-i.top,right:i.right,left:i.left,bottom:i.bottom,top:i.top}),i},fr=function(e,t,i){var n=e.vars,a=n[i],s=e._listeners[t],o;return Do(a)&&(o=a.apply(n.callbackScope||e,n[i+"Params"]||[e.pointerEvent])),s&&e.dispatchEvent(t)===!1&&(o=!1),o},dL=function(e,t){var i=ko(e)[0],n,a,s;return!i.nodeType&&i!==Ft?ua(e.left)?(a=e.min||e.minX||e.minRotation||0,n=e.min||e.minY||0,{left:a,top:n,width:(e.max||e.maxX||e.maxRotation||0)-a,height:(e.max||e.maxY||0)-n}):(s={x:0,y:0},{left:e.left-s.x,top:e.top-s.y,width:e.width,height:e.height}):Toe(i,t)},An={},Toe=function(e,t){t=ko(t)[0];var i=e.getBBox&&e.ownerSVGElement,n=e.ownerDocument||un,a,s,o,l,u,c,h,d,f,p,v,g,m;if(e===Ft)o=Mh(n),a=Lh(n),s=a+(n.documentElement.clientWidth||e.innerWidth||n.body.clientWidth||0),l=o+((e.innerHeight||0)-20<n.documentElement.clientHeight?n.documentElement.clientHeight:e.innerHeight||n.body.clientHeight||0);else{if(t===Ft||ua(t))return e.getBoundingClientRect();a=o=0,i?(p=e.getBBox(),v=p.width,g=p.height):(e.viewBox&&(p=e.viewBox.baseVal)&&(a=p.x||0,o=p.y||0,v=p.width,g=p.height),v||(m=sv(e),p=m.boxSizing==="border-box",v=(parseFloat(m.width)||e.clientWidth||0)+(p?0:parseFloat(m.borderLeftWidth)+parseFloat(m.borderRightWidth)),g=(parseFloat(m.height)||e.clientHeight||0)+(p?0:parseFloat(m.borderTopWidth)+parseFloat(m.borderBottomWidth)))),s=v,l=g}return e===t?{left:a,top:o,width:s-a,height:l-o}:(u=ou(t,!0).multiply(ou(e)),c=u.apply({x:a,y:o}),h=u.apply({x:s,y:o}),d=u.apply({x:s,y:l}),f=u.apply({x:a,y:l}),a=Math.min(c.x,h.x,d.x,f.x),o=Math.min(c.y,h.y,d.y,f.y),{left:a,top:o,width:Math.max(c.x,h.x,d.x,f.x)-a,height:Math.max(c.y,h.y,d.y,f.y)-o})},Wb=function(e,t,i,n,a,s){var o={},l,u,c;if(t)if(a!==1&&t instanceof Array){if(o.end=l=[],c=t.length,Cp(t[0]))for(u=0;u<c;u++)l[u]=EG(t[u],a);else for(u=0;u<c;u++)l[u]=t[u]*a;i+=1.1,n-=1.1}else Do(t)?o.end=function(h){var d=t.call(e,h),f,p;if(a!==1)if(Cp(d)){f={};for(p in d)f[p]=d[p]*a;d=f}else d*=a;return d}:o.end=t;return(i||i===0)&&(o.max=i),(n||n===0)&&(o.min=n),s&&(o.velocity=0),o},Soe=function r(e){var t;return!e||!e.getAttribute||e===Es?!1:(t=e.getAttribute("data-clickable"))==="true"||t!=="false"&&(voe.test(e.nodeName+"")||e.getAttribute("contentEditable")==="true")?!0:r(e.parentNode)},Qg=function(e,t){for(var i=e.length,n;i--;)n=e[i],n.ondragstart=n.onselectstart=t?null:fy,gt.set(n,{lazy:!0,userSelect:t?"text":"none"})},xoe=function r(e){if(sv(e).position==="fixed")return!0;if(e=e.parentNode,e&&e.nodeType===1)return r(e)},PG,bw,woe=function(e,t){e=gt.utils.toArray(e)[0],t=t||{};var i=document.createElement("div"),n=i.style,a=e.firstChild,s=0,o=0,l=e.scrollTop,u=e.scrollLeft,c=e.scrollWidth,h=e.scrollHeight,d=0,f=0,p=0,v,g,m,y,_,b;PG&&t.force3D!==!1?(_="translate3d(",b="px,0px)"):Ap&&(_="translate(",b="px)"),this.scrollTop=function(S,x){if(!arguments.length)return-this.top();this.top(-S,x)},this.scrollLeft=function(S,x){if(!arguments.length)return-this.left();this.left(-S,x)},this.left=function(S,x){if(!arguments.length)return-(e.scrollLeft+o);var C=e.scrollLeft-u,D=o;if((C>2||C<-2)&&!x){u=e.scrollLeft,gt.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-u),t.onKill&&t.onKill();return}S=-S,S<0?(o=S-.5|0,S=0):S>f?(o=S-f|0,S=f):o=0,(o||D)&&(this._skip||(n[Ap]=_+-o+"px,"+-s+b),o+d>=0&&(n.paddingRight=o+d+"px")),e.scrollLeft=S|0,u=e.scrollLeft},this.top=function(S,x){if(!arguments.length)return-(e.scrollTop+s);var C=e.scrollTop-l,D=s;if((C>2||C<-2)&&!x){l=e.scrollTop,gt.killTweensOf(this,{top:1,scrollTop:1}),this.top(-l),t.onKill&&t.onKill();return}S=-S,S<0?(s=S-.5|0,S=0):S>p?(s=S-p|0,S=p):s=0,(s||D)&&(this._skip||(n[Ap]=_+-o+"px,"+-s+b)),e.scrollTop=S|0,l=e.scrollTop},this.maxScrollTop=function(){return p},this.maxScrollLeft=function(){return f},this.disable=function(){for(a=i.firstChild;a;)y=a.nextSibling,e.appendChild(a),a=y;e===i.parentNode&&e.removeChild(i)},this.enable=function(){if(a=e.firstChild,a!==i){for(;a;)y=a.nextSibling,i.appendChild(a),a=y;e.appendChild(i),this.calibrate()}},this.calibrate=function(S){var x=e.clientWidth===v,C,D,I;l=e.scrollTop,u=e.scrollLeft,!(x&&e.clientHeight===g&&i.offsetHeight===m&&c===e.scrollWidth&&h===e.scrollHeight&&!S)&&((s||o)&&(D=this.left(),I=this.top(),this.left(-e.scrollLeft),this.top(-e.scrollTop)),C=sv(e),(!x||S)&&(n.display="block",n.width="auto",n.paddingRight="0px",d=Math.max(0,e.scrollWidth-e.clientWidth),d&&(d+=parseFloat(C.paddingLeft)+(bw?parseFloat(C.paddingRight):0))),n.display="inline-block",n.position="relative",n.overflow="visible",n.verticalAlign="top",n.boxSizing="content-box",n.width="100%",n.paddingRight=d+"px",bw&&(n.paddingBottom=C.paddingBottom),v=e.clientWidth,g=e.clientHeight,c=e.scrollWidth,h=e.scrollHeight,f=e.scrollWidth-v,p=e.scrollHeight-g,m=i.offsetHeight,n.display="block",(D||I)&&(this.left(D),this.top(I)))},this.content=i,this.element=e,this._skip=!1,this.enable()},qb=function(e){if(AG()&&document.body){var t=window&&window.navigator;Ft=window,un=document,va=un.documentElement,Es=un.body,Gb=Zg("div"),hy=!!window.PointerEvent,ws=Zg("div"),ws.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",ep=ws.style.cursor==="grab"?"grab":"move",Jd=t&&t.userAgent.toLowerCase().indexOf("android")!==-1,mw="ontouchstart"in va&&"orientation"in Ft||t&&(t.MaxTouchPoints>0||t.msMaxTouchPoints>0),bw=function(){var i=Zg("div"),n=Zg("div"),a=n.style,s=Es,o;return a.display="inline-block",a.position="relative",i.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",i.appendChild(n),s.appendChild(i),o=n.offsetHeight+18>i.scrollHeight,s.removeChild(i),o}(),av=function(i){for(var n=i.split(","),a=("onpointerdown"in Gb?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in Gb?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":i).split(","),s={},o=4;--o>-1;)s[n[o]]=a[o],s[a[o]]=n[o];try{va.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){wG=1}}))}catch{}return s}("touchstart,touchmove,touchend,touchcancel"),Pr(un,"touchcancel",fy),Pr(Ft,"touchmove",fy),Es&&Es.addEventListener("touchstart",fy),Pr(un,"contextmenu",function(){for(var i in Ph)Ph[i].isPressed&&Ph[i].endDrag()}),gt=gw=DG()}gt?(na=gt.plugins.inertia,CG=gt.core.context||function(){},Qd=gt.utils.checkPrefix,Ap=Qd(Ap),_w=Qd(_w),ko=gt.utils.toArray,yw=gt.core.getStyleSaver,PG=!!Qd("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")},Coe=function(){function r(t){this._listeners={},this.target=t||this}var e=r.prototype;return e.addEventListener=function(i,n){var a=this._listeners[i]||(this._listeners[i]=[]);~a.indexOf(n)||a.push(n)},e.removeEventListener=function(i,n){var a=this._listeners[i],s=a&&a.indexOf(n);s>=0&&a.splice(s,1)},e.dispatchEvent=function(i){var n=this,a;return(this._listeners[i]||[]).forEach(function(s){return s.call(n,{type:i,target:n.target})===!1&&(a=!1)}),a},r}(),Qu=function(r){foe(e,r);function e(t,i){var n;n=r.call(this)||this,gw||qb(1),t=ko(t)[0],n.styles=yw&&yw(t,"transform,left,top"),na||(na=gt.plugins.inertia),n.vars=i=EG(i||{}),n.target=t,n.x=n.y=n.rotation=0,n.dragResistance=parseFloat(i.dragResistance)||0,n.edgeResistance=isNaN(i.edgeResistance)?1:parseFloat(i.edgeResistance)||0,n.lockAxis=i.lockAxis,n.autoScroll=i.autoScroll||0,n.lockedAxis=null,n.allowEventDefault=!!i.allowEventDefault,gt.getProperty(t,"x");var a=(i.type||"x,y").toLowerCase(),s=~a.indexOf("x")||~a.indexOf("y"),o=a.indexOf("rotation")!==-1,l=o?"rotation":s?"x":"left",u=s?"y":"top",c=!!(~a.indexOf("x")||~a.indexOf("left")||a==="scroll"),h=!!(~a.indexOf("y")||~a.indexOf("top")||a==="scroll"),d=i.minimumMovement||2,f=iL(n),p=ko(i.trigger||i.handle||t),v={},g=0,m=!1,y=i.autoScrollMarginTop||40,_=i.autoScrollMarginRight||40,b=i.autoScrollMarginBottom||40,S=i.autoScrollMarginLeft||40,x=i.clickableTest||Soe,C=0,D=t._gsap||gt.core.getCache(t),I=xoe(t),M=function(X,fe){return parseFloat(D.get(t,X,fe))},L=t.ownerDocument||un,N,O,B,F,U,$,q,Z,te,Q,se,he,ue,Ie,Oe,Fe,me,ze,Pe,ye,Me,_t,Re,Ge,Pt,wt,At,rr,ht,Ji,br,ro,io,gc=function(X){return Cn(X),X.stopImmediatePropagation&&X.stopImmediatePropagation(),!1},Mi=function Ve(X){if(f.autoScroll&&f.isDragging&&(m||me)){var fe=t,re=f.autoScroll*15,ve,Te,Ae,nt,Ne,Tt,Ye,Dt;for(m=!1,_s.scrollTop=Ft.pageYOffset!=null?Ft.pageYOffset:L.documentElement.scrollTop!=null?L.documentElement.scrollTop:L.body.scrollTop,_s.scrollLeft=Ft.pageXOffset!=null?Ft.pageXOffset:L.documentElement.scrollLeft!=null?L.documentElement.scrollLeft:L.body.scrollLeft,nt=f.pointerX-_s.scrollLeft,Ne=f.pointerY-_s.scrollTop;fe&&!Te;)Te=af(fe.parentNode),ve=Te?_s:fe.parentNode,Ae=Te?{bottom:Math.max(va.clientHeight,Ft.innerHeight||0),right:Math.max(va.clientWidth,Ft.innerWidth||0),left:0,top:0}:ve.getBoundingClientRect(),Tt=Ye=0,h&&(Dt=ve._gsMaxScrollY-ve.scrollTop,Dt<0?Ye=Dt:Ne>Ae.bottom-b&&Dt?(m=!0,Ye=Math.min(Dt,re*(1-Math.max(0,Ae.bottom-Ne)/b)|0)):Ne<Ae.top+y&&ve.scrollTop&&(m=!0,Ye=-Math.min(ve.scrollTop,re*(1-Math.max(0,Ne-Ae.top)/y)|0)),Ye&&(ve.scrollTop+=Ye)),c&&(Dt=ve._gsMaxScrollX-ve.scrollLeft,Dt<0?Tt=Dt:nt>Ae.right-_&&Dt?(m=!0,Tt=Math.min(Dt,re*(1-Math.max(0,Ae.right-nt)/_)|0)):nt<Ae.left+S&&ve.scrollLeft&&(m=!0,Tt=-Math.min(ve.scrollLeft,re*(1-Math.max(0,nt-Ae.left)/S)|0)),Tt&&(ve.scrollLeft+=Tt)),Te&&(Tt||Ye)&&(Ft.scrollTo(ve.scrollLeft,ve.scrollTop),gl(f.pointerX+Tt,f.pointerY+Ye)),fe=ve}if(me){var Kt=f.x,ur=f.y;o?(f.deltaX=Kt-parseFloat(D.rotation),f.rotation=Kt,D.rotation=Kt+"deg",D.renderTransform(1,D)):O?(h&&(f.deltaY=ur-O.top(),O.top(ur)),c&&(f.deltaX=Kt-O.left(),O.left(Kt))):s?(h&&(f.deltaY=ur-parseFloat(D.y),D.y=ur+"px"),c&&(f.deltaX=Kt-parseFloat(D.x),D.x=Kt+"px"),D.renderTransform(1,D)):(h&&(f.deltaY=ur-parseFloat(t.style.top||0),t.style.top=ur+"px"),c&&(f.deltaX=Kt-parseFloat(t.style.left||0),t.style.left=Kt+"px")),Z&&!X&&!rr&&(rr=!0,fr(f,"drag","onDrag")===!1&&(c&&(f.x-=f.deltaX),h&&(f.y-=f.deltaY),Ve(!0)),rr=!1)}me=!1},Sn=function(X,fe){var re=f.x,ve=f.y,Te,Ae;t._gsap||(D=gt.core.getCache(t)),D.uncache&&gt.getProperty(t,"x"),s?(f.x=parseFloat(D.x),f.y=parseFloat(D.y)):o?f.x=f.rotation=parseFloat(D.rotation):O?(f.y=O.top(),f.x=O.left()):(f.y=parseFloat(t.style.top||(Ae=sv(t))&&Ae.top)||0,f.x=parseFloat(t.style.left||(Ae||{}).left)||0),(Pe||ye||Me)&&!fe&&(f.isDragging||f.isThrowing)&&(Me&&(kc.x=f.x,kc.y=f.y,Te=Me(kc),Te.x!==f.x&&(f.x=Te.x,me=!0),Te.y!==f.y&&(f.y=Te.y,me=!0)),Pe&&(Te=Pe(f.x),Te!==f.x&&(f.x=Te,o&&(f.rotation=Te),me=!0)),ye&&(Te=ye(f.y),Te!==f.y&&(f.y=Te),me=!0)),me&&Mi(!0),X||(f.deltaX=f.x-re,f.deltaY=f.y-ve,fr(f,"throwupdate","onThrowUpdate"))},fl=function(X,fe,re,ve){return fe==null&&(fe=-Cl),re==null&&(re=Cl),Do(X)?function(Te){var Ae=f.isPressed?1-f.edgeResistance:1;return X.call(f,(Te>re?re+(Te-re)*Ae:Te<fe?fe+(Te-fe)*Ae:Te)*ve)*ve}:fd(X)?function(Te){for(var Ae=X.length,nt=0,Ne=Cl,Tt,Ye;--Ae>-1;)Tt=X[Ae],Ye=Tt-Te,Ye<0&&(Ye=-Ye),Ye<Ne&&Tt>=fe&&Tt<=re&&(nt=Ae,Ne=Ye);return X[nt]}:isNaN(X)?function(Te){return Te}:function(){return X*ve}},mg=function(X,fe,re,ve,Te,Ae,nt){return Ae=Ae&&Ae<Cl?Ae*Ae:Cl,Do(X)?function(Ne){var Tt=f.isPressed?1-f.edgeResistance:1,Ye=Ne.x,Dt=Ne.y,Kt,ur,Dr;return Ne.x=Ye=Ye>re?re+(Ye-re)*Tt:Ye<fe?fe+(Ye-fe)*Tt:Ye,Ne.y=Dt=Dt>Te?Te+(Dt-Te)*Tt:Dt<ve?ve+(Dt-ve)*Tt:Dt,Kt=X.call(f,Ne),Kt!==Ne&&(Ne.x=Kt.x,Ne.y=Kt.y),nt!==1&&(Ne.x*=nt,Ne.y*=nt),Ae<Cl&&(ur=Ne.x-Ye,Dr=Ne.y-Dt,ur*ur+Dr*Dr>Ae&&(Ne.x=Ye,Ne.y=Dt)),Ne}:fd(X)?function(Ne){for(var Tt=X.length,Ye=0,Dt=Cl,Kt,ur,Dr,qr;--Tt>-1;)Dr=X[Tt],Kt=Dr.x-Ne.x,ur=Dr.y-Ne.y,qr=Kt*Kt+ur*ur,qr<Dt&&(Ye=Tt,Dt=qr);return Dt<=Ae?X[Ye]:Ne}:function(Ne){return Ne}},mc=function(){var X,fe,re,ve;q=!1,O?(O.calibrate(),f.minX=se=-O.maxScrollLeft(),f.minY=ue=-O.maxScrollTop(),f.maxX=Q=f.maxY=he=0,q=!0):i.bounds&&(X=dL(i.bounds,t.parentNode),o?(f.minX=se=X.left,f.maxX=Q=X.left+X.width,f.minY=ue=f.maxY=he=0):!ua(i.bounds.maxX)||!ua(i.bounds.maxY)?(X=i.bounds,f.minX=se=X.minX,f.minY=ue=X.minY,f.maxX=Q=X.maxX,f.maxY=he=X.maxY):(fe=dL(t,t.parentNode),f.minX=se=Math.round(M(l,"px")+X.left-fe.left),f.minY=ue=Math.round(M(u,"px")+X.top-fe.top),f.maxX=Q=Math.round(se+(X.width-fe.width)),f.maxY=he=Math.round(ue+(X.height-fe.height))),se>Q&&(f.minX=Q,f.maxX=Q=se,se=f.minX),ue>he&&(f.minY=he,f.maxY=he=ue,ue=f.minY),o&&(f.minRotation=se,f.maxRotation=Q),q=!0),i.liveSnap&&(re=i.liveSnap===!0?i.snap||{}:i.liveSnap,ve=fd(re)||Do(re),o?(Pe=fl(ve?re:re.rotation,se,Q,1),ye=null):re.points?Me=mg(ve?re:re.points,se,Q,ue,he,re.radius,O?-1:1):(c&&(Pe=fl(ve?re:re.x||re.left||re.scrollLeft,se,Q,O?-1:1)),h&&(ye=fl(ve?re:re.y||re.top||re.scrollTop,ue,he,O?-1:1))))},yg=function(){f.isThrowing=!1,fr(f,"throwcomplete","onThrowComplete")},Nt=function(){f.isThrowing=!1},$f=function(X,fe){var re,ve,Te,Ae;X&&na?(X===!0&&(re=i.snap||i.liveSnap||{},ve=fd(re)||Do(re),X={resistance:(i.throwResistance||i.resistance||1e3)/(o?10:1)},o?X.rotation=Wb(f,ve?re:re.rotation,Q,se,1,fe):(c&&(X[l]=Wb(f,ve?re:re.points||re.x||re.left,Q,se,O?-1:1,fe||f.lockedAxis==="x")),h&&(X[u]=Wb(f,ve?re:re.points||re.y||re.top,he,ue,O?-1:1,fe||f.lockedAxis==="y")),(re.points||fd(re)&&Cp(re[0]))&&(X.linkedProps=l+","+u,X.radius=re.radius))),f.isThrowing=!0,Ae=isNaN(i.overshootTolerance)?i.edgeResistance===1?0:1-f.edgeResistance+.2:i.overshootTolerance,X.duration||(X.duration={max:Math.max(i.minDuration||0,"maxDuration"in i?i.maxDuration:2),min:isNaN(i.minDuration)?Ae===0||Cp(X)&&X.resistance>1e3?0:.5:i.minDuration,overshoot:Ae}),f.tween=Te=gt.to(O||t,{inertia:X,data:"_draggable",inherit:!1,onComplete:yg,onInterrupt:Nt,onUpdate:i.fastMode?fr:Sn,onUpdateParams:i.fastMode?[f,"onthrowupdate","onThrowUpdate"]:re&&re.radius?[!1,!0]:[]}),i.fastMode||(O&&(O._skip=!0),Te.render(1e9,!0,!0),Sn(!0,!0),f.endX=f.x,f.endY=f.y,o&&(f.endRotation=f.x),Te.play(0),Sn(!0,!0),O&&(O._skip=!1))):q&&f.applyBounds()},dl=function(X){var fe=Ge,re;Ge=ou(t.parentNode,!0),X&&f.isPressed&&!Ge.equals(fe||new Zu)&&(re=fe.inverse().apply({x:B,y:F}),Ge.apply(re,re),B=re.x,F=re.y),Ge.equals(doe)&&(Ge=null)},yc=function(){var X=1-f.edgeResistance,fe=I?Lh(L):0,re=I?Mh(L):0,ve,Te,Ae;s&&(D.x=M(l,"px")+"px",D.y=M(u,"px")+"px",D.renderTransform()),dl(!1),An.x=f.pointerX-fe,An.y=f.pointerY-re,Ge&&Ge.apply(An,An),B=An.x,F=An.y,me&&(gl(f.pointerX,f.pointerY),Mi(!0)),ro=ou(t),O?(mc(),$=O.top(),U=O.left()):(pl()?(Sn(!0,!0),mc()):f.applyBounds(),o?(ve=t.ownerSVGElement?[D.xOrigin-t.getBBox().x,D.yOrigin-t.getBBox().y]:(sv(t)[_w]||"0 0").split(" "),Fe=f.rotationOrigin=ou(t).apply({x:parseFloat(ve[0])||0,y:parseFloat(ve[1])||0}),Sn(!0,!0),Te=f.pointerX-Fe.x-fe,Ae=Fe.y-f.pointerY+re,U=f.x,$=f.y=Math.atan2(Ae,Te)*nL):($=M(u,"px"),U=M(l,"px"))),q&&X&&(U>Q?U=Q+(U-Q)/X:U<se&&(U=se-(se-U)/X),o||($>he?$=he+($-he)/X:$<ue&&($=ue-(ue-$)/X))),f.startX=U=ho(U),f.startY=$=ho($)},pl=function(){return f.tween&&f.tween.isActive()},F1=function(){ws.parentNode&&!pl()&&!f.isDragging&&ws.parentNode.removeChild(ws)},vl=function(X,fe){var re;if(!N||f.isPressed||!X||(X.type==="mousedown"||X.type==="pointerdown")&&!fe&&fo()-C<30&&av[f.pointerEvent.type]){br&&X&&N&&Cn(X);return}if(Pt=pl(),io=!1,f.pointerEvent=X,av[X.type]?(Re=~X.type.indexOf("touch")?X.currentTarget||X.target:L,Pr(Re,"touchend",en),Pr(Re,"touchmove",ds),Pr(Re,"touchcancel",en),Pr(L,"touchstart",uL)):(Re=null,Pr(L,"mousemove",ds)),At=null,(!hy||!Re)&&(Pr(L,"mouseup",en),X&&X.target&&Pr(X.target,"mouseup",en)),_t=x.call(f,X.target)&&i.dragClickables===!1&&!fe,_t){Pr(X.target,"change",en),fr(f,"pressInit","onPressInit"),fr(f,"press","onPress"),Qg(p,!0),br=!1;return}if(wt=!Re||c===h||f.vars.allowNativeTouchScrolling===!1||f.vars.allowContextMenu&&X&&(X.ctrlKey||X.which>2)?!1:c?"y":"x",br=!wt&&!f.allowEventDefault,br&&(Cn(X),Pr(Ft,"touchforcechange",Cn)),X.changedTouches?(X=Ie=X.changedTouches[0],Oe=X.identifier):X.pointerId?Oe=X.pointerId:Ie=Oe=null,_0++,moe(Mi),F=f.pointerY=X.pageY,B=f.pointerX=X.pageX,fr(f,"pressInit","onPressInit"),(wt||f.autoScroll)&&Hb(t.parentNode),t.parentNode&&f.autoScroll&&!O&&!o&&t.parentNode._gsMaxScrollX&&!ws.parentNode&&!t.getBBox&&(ws.style.width=t.parentNode.scrollWidth+"px",t.parentNode.appendChild(ws)),yc(),f.tween&&f.tween.kill(),f.isThrowing=!1,gt.killTweensOf(O||t,v,!0),O&&gt.killTweensOf(t,{scrollTo:1},!0),f.tween=f.lockedAxis=null,(i.zIndexBoost||!o&&!O&&i.zIndexBoost!==!1)&&(t.style.zIndex=e.zIndex++),f.isPressed=!0,Z=!!(i.onDrag||f._listeners.drag),te=!!(i.onMove||f._listeners.move),i.cursor!==!1||i.activeCursor)for(re=p.length;--re>-1;)gt.set(p[re],{cursor:i.activeCursor||i.cursor||(ep==="grab"?"grabbing":ep)});fr(f,"press","onPress")},ds=function(X){var fe=X,re,ve,Te,Ae,nt,Ne;if(!N||VA||!f.isPressed||!X){br&&X&&N&&Cn(X);return}if(f.pointerEvent=X,re=X.changedTouches,re){if(X=re[0],X!==Ie&&X.identifier!==Oe){for(Ae=re.length;--Ae>-1&&(X=re[Ae]).identifier!==Oe&&X.target!==t;);if(Ae<0)return}}else if(X.pointerId&&Oe&&X.pointerId!==Oe)return;if(Re&&wt&&!At&&(An.x=X.pageX-(I?Lh(L):0),An.y=X.pageY-(I?Mh(L):0),Ge&&Ge.apply(An,An),ve=An.x,Te=An.y,nt=Math.abs(ve-B),Ne=Math.abs(Te-F),(nt!==Ne&&(nt>d||Ne>d)||Jd&&wt===At)&&(At=nt>Ne&&c?"x":"y",wt&&At!==wt&&Pr(Ft,"touchforcechange",Cn),f.vars.lockAxisOnTouchScroll!==!1&&c&&h&&(f.lockedAxis=At==="x"?"y":"x",Do(f.vars.onLockAxis)&&f.vars.onLockAxis.call(f,fe)),Jd&&wt===At))){en(fe);return}!f.allowEventDefault&&(!wt||At&&wt!==At)&&fe.cancelable!==!1?(Cn(fe),br=!0):br&&(br=!1),f.autoScroll&&(m=!0),gl(X.pageX,X.pageY,te)},gl=function(X,fe,re){var ve=1-f.dragResistance,Te=1-f.edgeResistance,Ae=f.pointerX,nt=f.pointerY,Ne=$,Tt=f.x,Ye=f.y,Dt=f.endX,Kt=f.endY,ur=f.endRotation,Dr=me,qr,ft,Er,zt,no,tn;f.pointerX=X,f.pointerY=fe,I&&(X-=Lh(L),fe-=Mh(L)),o?(zt=Math.atan2(Fe.y-fe,X-Fe.x)*nL,no=f.y-zt,no>180?($-=360,f.y=zt):no<-180&&($+=360,f.y=zt),f.x!==U||Math.abs($-zt)>d?(f.y=zt,Er=U+($-zt)*ve):Er=U):(Ge&&(tn=X*Ge.a+fe*Ge.c+Ge.e,fe=X*Ge.b+fe*Ge.d+Ge.f,X=tn),ft=fe-F,qr=X-B,ft<d&&ft>-d&&(ft=0),qr<d&&qr>-d&&(qr=0),(f.lockAxis||f.lockedAxis)&&(qr||ft)&&(tn=f.lockedAxis,tn||(f.lockedAxis=tn=c&&Math.abs(qr)>Math.abs(ft)?"y":h?"x":null,tn&&Do(f.vars.onLockAxis)&&f.vars.onLockAxis.call(f,f.pointerEvent)),tn==="y"?ft=0:tn==="x"&&(qr=0)),Er=ho(U+qr*ve),zt=ho($+ft*ve)),(Pe||ye||Me)&&(f.x!==Er||f.y!==zt&&!o)&&(Me&&(kc.x=Er,kc.y=zt,tn=Me(kc),Er=ho(tn.x),zt=ho(tn.y)),Pe&&(Er=ho(Pe(Er))),ye&&(zt=ho(ye(zt)))),q&&(Er>Q?Er=Q+Math.round((Er-Q)*Te):Er<se&&(Er=se+Math.round((Er-se)*Te)),o||(zt>he?zt=Math.round(he+(zt-he)*Te):zt<ue&&(zt=Math.round(ue+(zt-ue)*Te)))),(f.x!==Er||f.y!==zt&&!o)&&(o?(f.endRotation=f.x=f.endX=Er,me=!0):(h&&(f.y=f.endY=zt,me=!0),c&&(f.x=f.endX=Er,me=!0)),!re||fr(f,"move","onMove")!==!1?!f.isDragging&&f.isPressed&&(f.isDragging=io=!0,fr(f,"dragstart","onDragStart")):(f.pointerX=Ae,f.pointerY=nt,$=Ne,f.x=Tt,f.y=Ye,f.endX=Dt,f.endY=Kt,f.endRotation=ur,me=Dr))},en=function Ve(X,fe){if(!N||!f.isPressed||X&&Oe!=null&&!fe&&(X.pointerId&&X.pointerId!==Oe&&X.target!==t||X.changedTouches&&!_oe(X.changedTouches,Oe))){br&&X&&N&&Cn(X);return}f.isPressed=!1;var re=X,ve=f.isDragging,Te=f.vars.allowContextMenu&&X&&(X.ctrlKey||X.which>2),Ae=gt.delayedCall(.001,F1),nt,Ne,Tt,Ye,Dt;if(Re?(Tr(Re,"touchend",Ve),Tr(Re,"touchmove",ds),Tr(Re,"touchcancel",Ve),Tr(L,"touchstart",uL)):Tr(L,"mousemove",ds),Tr(Ft,"touchforcechange",Cn),(!hy||!Re)&&(Tr(L,"mouseup",Ve),X&&X.target&&Tr(X.target,"mouseup",Ve)),me=!1,ve&&(g=aL=fo(),f.isDragging=!1),lL(Mi),_t&&!Te){X&&(Tr(X.target,"change",Ve),f.pointerEvent=re),Qg(p,!1),fr(f,"release","onRelease"),fr(f,"click","onClick"),_t=!1;return}for(Ne=p.length;--Ne>-1;)$b(p[Ne],"cursor",i.cursor||(i.cursor!==!1?ep:null));if(_0--,X){if(nt=X.changedTouches,nt&&(X=nt[0],X!==Ie&&X.identifier!==Oe)){for(Ne=nt.length;--Ne>-1&&(X=nt[Ne]).identifier!==Oe&&X.target!==t;);if(Ne<0&&!fe)return}f.pointerEvent=re,f.pointerX=X.pageX,f.pointerY=X.pageY}return Te&&re?(Cn(re),br=!0,fr(f,"release","onRelease")):re&&!ve?(br=!1,Pt&&(i.snap||i.bounds)&&$f(i.inertia||i.throwProps),fr(f,"release","onRelease"),(!Jd||re.type!=="touchmove")&&re.type.indexOf("cancel")===-1&&(fr(f,"click","onClick"),fo()-C<300&&fr(f,"doubleclick","onDoubleClick"),Ye=re.target||t,C=fo(),Dt=function(){C!==ht&&f.enabled()&&!f.isPressed&&!re.defaultPrevented&&(Ye.click?Ye.click():L.createEvent&&(Tt=L.createEvent("MouseEvents"),Tt.initMouseEvent("click",!0,!0,Ft,1,f.pointerEvent.screenX,f.pointerEvent.screenY,f.pointerX,f.pointerY,!1,!1,!1,!1,0,null),Ye.dispatchEvent(Tt)))},!Jd&&!re.defaultPrevented&&gt.delayedCall(.05,Dt))):($f(i.inertia||i.throwProps),!f.allowEventDefault&&re&&(i.dragClickables!==!1||!x.call(f,re.target))&&ve&&(!wt||At&&wt===At)&&re.cancelable!==!1?(br=!0,Cn(re)):br=!1,fr(f,"release","onRelease")),pl()&&Ae.duration(f.tween.duration()),ve&&fr(f,"dragend","onDragEnd"),!0},_c=function(X){if(X&&f.isDragging&&!O){var fe=X.target||t.parentNode,re=fe.scrollLeft-fe._gsScrollX,ve=fe.scrollTop-fe._gsScrollY;(re||ve)&&(Ge?(B-=re*Ge.a+ve*Ge.c,F-=ve*Ge.d+re*Ge.b):(B-=re,F-=ve),fe._gsScrollX+=re,fe._gsScrollY+=ve,gl(f.pointerX,f.pointerY))}},_g=function(X){var fe=fo(),re=fe-C<100,ve=fe-g<50,Te=re&&ht===C,Ae=f.pointerEvent&&f.pointerEvent.defaultPrevented,nt=re&&Ji===C,Ne=X.isTrusted||X.isTrusted==null&&re&&Te;if((Te||ve&&f.vars.suppressClickOnDrag!==!1)&&X.stopImmediatePropagation&&X.stopImmediatePropagation(),re&&!(f.pointerEvent&&f.pointerEvent.defaultPrevented)&&(!Te||Ne&&!nt)){Ne&&Te&&(Ji=C),ht=C;return}(f.isPressed||ve||re)&&(!Ne||!X.detail||!re||Ae)&&Cn(X),!re&&!ve&&!io&&(X&&X.target&&(f.pointerEvent=X),fr(f,"click","onClick"))},bg=function(X){return Ge?{x:X.x*Ge.a+X.y*Ge.c+Ge.e,y:X.x*Ge.b+X.y*Ge.d+Ge.f}:{x:X.x,y:X.y}};return ze=e.get(t),ze&&ze.kill(),n.startDrag=function(Ve,X){var fe,re,ve,Te;vl(Ve||f.pointerEvent,!0),X&&!f.hitTest(Ve||f.pointerEvent)&&(fe=Rc(Ve||f.pointerEvent),re=Rc(t),ve=bg({x:fe.left+fe.width/2,y:fe.top+fe.height/2}),Te=bg({x:re.left+re.width/2,y:re.top+re.height/2}),B-=ve.x-Te.x,F-=ve.y-Te.y),f.isDragging||(f.isDragging=io=!0,fr(f,"dragstart","onDragStart"))},n.drag=ds,n.endDrag=function(Ve){return en(Ve||f.pointerEvent,!0)},n.timeSinceDrag=function(){return f.isDragging?0:(fo()-g)/1e3},n.timeSinceClick=function(){return(fo()-C)/1e3},n.hitTest=function(Ve,X){return e.hitTest(f.target,Ve,X)},n.getDirection=function(Ve,X){var fe=Ve==="velocity"&&na?Ve:Cp(Ve)&&!o?"element":"start",re,ve,Te,Ae,nt,Ne;return fe==="element"&&(nt=Rc(f.target),Ne=Rc(Ve)),re=fe==="start"?f.x-U:fe==="velocity"?na.getVelocity(t,l):nt.left+nt.width/2-(Ne.left+Ne.width/2),o?re<0?"counter-clockwise":"clockwise":(X=X||2,ve=fe==="start"?f.y-$:fe==="velocity"?na.getVelocity(t,u):nt.top+nt.height/2-(Ne.top+Ne.height/2),Te=Math.abs(re/ve),Ae=Te<1/X?"":re<0?"left":"right",Te<X&&(Ae!==""&&(Ae+="-"),Ae+=ve<0?"up":"down"),Ae)},n.applyBounds=function(Ve,X){var fe,re,ve,Te,Ae,nt;if(Ve&&i.bounds!==Ve)return i.bounds=Ve,f.update(!0,X);if(Sn(!0),mc(),q&&!pl()){if(fe=f.x,re=f.y,fe>Q?fe=Q:fe<se&&(fe=se),re>he?re=he:re<ue&&(re=ue),(f.x!==fe||f.y!==re)&&(ve=!0,f.x=f.endX=fe,o?f.endRotation=fe:f.y=f.endY=re,me=!0,Mi(!0),f.autoScroll&&!f.isDragging))for(Hb(t.parentNode),Te=t,_s.scrollTop=Ft.pageYOffset!=null?Ft.pageYOffset:L.documentElement.scrollTop!=null?L.documentElement.scrollTop:L.body.scrollTop,_s.scrollLeft=Ft.pageXOffset!=null?Ft.pageXOffset:L.documentElement.scrollLeft!=null?L.documentElement.scrollLeft:L.body.scrollLeft;Te&&!nt;)nt=af(Te.parentNode),Ae=nt?_s:Te.parentNode,h&&Ae.scrollTop>Ae._gsMaxScrollY&&(Ae.scrollTop=Ae._gsMaxScrollY),c&&Ae.scrollLeft>Ae._gsMaxScrollX&&(Ae.scrollLeft=Ae._gsMaxScrollX),Te=Ae;f.isThrowing&&(ve||f.endX>Q||f.endX<se||f.endY>he||f.endY<ue)&&$f(i.inertia||i.throwProps,ve)}return f},n.update=function(Ve,X,fe){if(X&&f.isPressed){var re=ou(t),ve=ro.apply({x:f.x-U,y:f.y-$}),Te=ou(t.parentNode,!0);Te.apply({x:re.e-ve.x,y:re.f-ve.y},ve),f.x-=ve.x-Te.e,f.y-=ve.y-Te.f,Mi(!0),yc()}var Ae=f.x,nt=f.y;return dl(!X),Ve?f.applyBounds():(me&&fe&&Mi(!0),Sn(!0)),X&&(gl(f.pointerX,f.pointerY),me&&Mi(!0)),f.isPressed&&!X&&(c&&Math.abs(Ae-f.x)>.01||h&&Math.abs(nt-f.y)>.01&&!o)&&yc(),f.autoScroll&&(Hb(t.parentNode,f.isDragging),m=f.isDragging,Mi(!0),hL(t,_c),cL(t,_c)),f},n.enable=function(Ve){var X={lazy:!0},fe,re,ve;if(i.cursor!==!1&&(X.cursor=i.cursor||ep),gt.utils.checkPrefix("touchCallout")&&(X.touchCallout="none"),Ve!=="soft"){for(sL(p,c===h?"none":i.allowNativeTouchScrolling&&t.scrollHeight===t.clientHeight==(t.scrollWidth===t.clientHeight)||i.allowEventDefault?"manipulation":c?"pan-y":"pan-x"),re=p.length;--re>-1;)ve=p[re],hy||Pr(ve,"mousedown",vl),Pr(ve,"touchstart",vl),Pr(ve,"click",_g,!0),gt.set(ve,X),ve.getBBox&&ve.ownerSVGElement&&c!==h&&gt.set(ve.ownerSVGElement,{touchAction:i.allowNativeTouchScrolling||i.allowEventDefault?"manipulation":c?"pan-y":"pan-x"}),i.allowContextMenu||Pr(ve,"contextmenu",gc);Qg(p,!1)}return cL(t,_c),N=!0,na&&Ve!=="soft"&&na.track(O||t,s?"x,y":o?"rotation":"top,left"),t._gsDragID=fe="d"+poe++,Ph[fe]=f,O&&(O.enable(),O.element._gsDragID=fe),(i.bounds||o)&&yc(),i.bounds&&f.applyBounds(),f},n.disable=function(Ve){for(var X=f.isDragging,fe=p.length,re;--fe>-1;)$b(p[fe],"cursor",null);if(Ve!=="soft"){for(sL(p,null),fe=p.length;--fe>-1;)re=p[fe],$b(re,"touchCallout",null),Tr(re,"mousedown",vl),Tr(re,"touchstart",vl),Tr(re,"click",_g,!0),Tr(re,"contextmenu",gc);Qg(p,!0),Re&&(Tr(Re,"touchcancel",en),Tr(Re,"touchend",en),Tr(Re,"touchmove",ds)),Tr(L,"mouseup",en),Tr(L,"mousemove",ds)}return hL(t,_c),N=!1,na&&Ve!=="soft"&&(na.untrack(O||t,s?"x,y":o?"rotation":"top,left"),f.tween&&f.tween.kill()),O&&O.disable(),lL(Mi),f.isDragging=f.isPressed=_t=!1,X&&fr(f,"dragend","onDragEnd"),f},n.enabled=function(Ve,X){return arguments.length?Ve?f.enable(X):f.disable(X):N},n.kill=function(){return f.isThrowing=!1,f.tween&&f.tween.kill(),f.disable(),gt.set(p,{clearProps:"userSelect"}),delete Ph[t._gsDragID],f},n.revert=function(){this.kill(),this.styles&&this.styles.revert()},~a.indexOf("scroll")&&(O=n.scrollProxy=new woe(t,goe({onKill:function(){f.isPressed&&en(null)}},i)),t.style.overflowY=h&&!mw?"auto":"hidden",t.style.overflowX=c&&!mw?"auto":"hidden",t=O.content),o?v.rotation=1:(c&&(v[l]=1),h&&(v[u]=1)),D.force3D="force3D"in i?i.force3D:!0,CG(iL(n)),n.enable(),n}return e.register=function(i){gt=i,qb()},e.create=function(i,n){return gw||qb(!0),ko(i).map(function(a){return new e(a,n)})},e.get=function(i){return Ph[(ko(i)[0]||{})._gsDragID]},e.timeSinceDrag=function(){return(fo()-aL)/1e3},e.hitTest=function(i,n,a){if(i===n)return!1;var s=Rc(i),o=Rc(n),l=s.top,u=s.left,c=s.right,h=s.bottom,d=s.width,f=s.height,p=o.left>c||o.right<u||o.top>h||o.bottom<l,v,g,m;return p||!a?!p:(m=(a+"").indexOf("%")!==-1,a=parseFloat(a)||0,v={left:Math.max(u,o.left),top:Math.max(l,o.top)},v.width=Math.min(c,o.right)-v.left,v.height=Math.min(h,o.bottom)-v.top,v.width<0||v.height<0?!1:m?(a*=.01,g=v.width*v.height,g>=d*f*a||g>=o.width*o.height*a):v.width>a&&v.height>a)},e}(Coe);yoe(Qu.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1});Qu.zIndex=1e3;Qu.version="3.12.5";DG()&&gt.registerPlugin(Qu);/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Tw=function(r,e){return Tw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},Tw(r,e)};function j(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Tw(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Aoe=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Doe=function(){function r(){this.browser=new Aoe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),et=new Doe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(et.wxa=!0,et.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?et.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(et.node=!0,et.svgSupported=!0):Eoe(navigator.userAgent,et);function Eoe(r,e){var t=e.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),s=/micromessenger/i.test(r);i&&(t.firefox=!0,t.version=i[1]),n&&(t.ie=!0,t.version=n[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),s&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var o=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in o||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in o)&&!("OTransition"in o),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var zA=12,MG="sans-serif",Jo=zA+"px "+MG,Ioe=20,Poe=100,Moe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Loe(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var i=String.fromCharCode(t+32),n=(r.charCodeAt(t)-Ioe)/Poe;e[i]=n}return e}var koe=Loe(Moe),el={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,i){if(!r){var n=el.createCanvas();r=n&&n.getContext("2d")}if(r)return e!==i&&(e=r.font=i||Jo),r.measureText(t);t=t||"",i=i||Jo;var a=/((?:\d+)?\.?\d*)px/.exec(i),s=a&&+a[1]||zA,o=0;if(i.indexOf("mono")>=0)o=s*t.length;else for(var l=0;l<t.length;l++){var u=koe[t[l]];o+=u==null?s:u*s}return{width:o}}}(),loadImage:function(r,e,t){var i=new Image;return i.onload=e,i.onerror=t,i.src=r,i}},LG=as(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),kG=as(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Df=Object.prototype.toString,K_=Array.prototype,Roe=K_.forEach,Ooe=K_.filter,GA=K_.slice,Noe=K_.map,pL=(function(){}).constructor,Jg=pL?pL.prototype:null,HA="__proto__",Boe=2311;function RG(){return Boe++}function $A(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function Ee(r){if(r==null||typeof r!="object")return r;var e=r,t=Df.call(r);if(t==="[object Array]"){if(!Dp(r)){e=[];for(var i=0,n=r.length;i<n;i++)e[i]=Ee(r[i])}}else if(kG[t]){if(!Dp(r)){var a=r.constructor;if(a.from)e=a.from(r);else{e=new a(r.length);for(var i=0,n=r.length;i<n;i++)e[i]=r[i]}}}else if(!LG[t]&&!Dp(r)&&!sf(r)){e={};for(var s in r)r.hasOwnProperty(s)&&s!==HA&&(e[s]=Ee(r[s]))}return e}function We(r,e,t){if(!De(e)||!De(r))return t?Ee(e):r;for(var i in e)if(e.hasOwnProperty(i)&&i!==HA){var n=r[i],a=e[i];De(a)&&De(n)&&!ie(a)&&!ie(n)&&!sf(a)&&!sf(n)&&!vL(a)&&!vL(n)&&!Dp(a)&&!Dp(n)?We(n,a,t):(t||!(i in r))&&(r[i]=Ee(e[i]))}return r}function WA(r,e){for(var t=r[0],i=1,n=r.length;i<n;i++)t=We(t,r[i],e);return t}function J(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==HA&&(r[t]=e[t]);return r}function Ce(r,e,t){for(var i=rt(e),n=0;n<i.length;n++){var a=i[n];(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}return r}function Xe(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;t<i;t++)if(r[t]===e)return t}return-1}function Foe(r,e){var t=r.prototype;function i(){}i.prototype=e.prototype,r.prototype=new i;for(var n in t)t.hasOwnProperty(n)&&(r.prototype[n]=t[n]);r.prototype.constructor=r,r.superClass=e}function _r(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}else Ce(r,e,t)}function li(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function R(r,e,t){if(r&&e)if(r.forEach&&r.forEach===Roe)r.forEach(e,t);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)e.call(t,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&e.call(t,r[a],a,r)}function oe(r,e,t){if(!r)return[];if(!e)return qA(r);if(r.map&&r.map===Noe)return r.map(e,t);for(var i=[],n=0,a=r.length;n<a;n++)i.push(e.call(t,r[n],n,r));return i}function as(r,e,t,i){if(r&&e){for(var n=0,a=r.length;n<a;n++)t=e.call(i,t,r[n],n,r);return t}}function St(r,e,t){if(!r)return[];if(!e)return qA(r);if(r.filter&&r.filter===Ooe)return r.filter(e,t);for(var i=[],n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r)&&i.push(r[n]);return i}function Uoe(r,e,t){if(r&&e){for(var i=0,n=r.length;i<n;i++)if(e.call(t,r[i],i,r))return r[i]}}function rt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function Voe(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return function(){return r.apply(e,t.concat(GA.call(arguments)))}}var ge=Jg&&we(Jg.bind)?Jg.call.bind(Jg.bind):Voe;function Ue(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(GA.call(arguments)))}}function ie(r){return Array.isArray?Array.isArray(r):Df.call(r)==="[object Array]"}function we(r){return typeof r=="function"}function pe(r){return typeof r=="string"}function Sw(r){return Df.call(r)==="[object String]"}function ut(r){return typeof r=="number"}function De(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function vL(r){return!!LG[Df.call(r)]}function Ki(r){return!!kG[Df.call(r)]}function sf(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Z_(r){return r.colorStops!=null}function zoe(r){return r.image!=null}function Goe(r){return Df.call(r)==="[object RegExp]"}function ov(r){return r!==r}function Gr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,i=r.length;t<i;t++)if(r[t]!=null)return r[t]}function Be(r,e){return r??e}function Qa(r,e,t){return r??e??t}function qA(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return GA.apply(r,e)}function jA(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function Ai(r,e){if(!r)throw new Error(e)}function ha(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var OG="__ec_primitive__";function b0(r){r[OG]=!0}function Dp(r){return r[OG]}var Hoe=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return rt(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},r}(),NG=typeof Map=="function";function $oe(){return NG?new Map:new Hoe}var Woe=function(){function r(e){var t=ie(e);this.data=$oe();var i=this;e instanceof r?e.each(n):e&&R(e,n);function n(a,s){t?i.set(a,s):i.set(s,a)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(i,n){e.call(t,i,n)})},r.prototype.keys=function(){var e=this.data.keys();return NG?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function be(r){return new Woe(r)}function T0(r,e){for(var t=new r.constructor(r.length+e.length),i=0;i<r.length;i++)t[i]=r[i];for(var n=r.length,i=0;i<e.length;i++)t[i+n]=e[i];return t}function Q_(r,e){var t;if(Object.create)t=Object.create(r);else{var i=function(){};i.prototype=r,t=new i}return e&&J(t,e),t}function BG(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function _e(r,e){return r.hasOwnProperty(e)}function lr(){}var dy=180/Math.PI;function lc(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function gi(r,e){return r[0]=e[0],r[1]=e[1],r}function ks(r){return[r[0],r[1]]}function qoe(r,e,t){return r[0]=e,r[1]=t,r}function gL(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function xw(r,e,t,i){return r[0]=e[0]+t[0]*i,r[1]=e[1]+t[1]*i,r}function gu(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function ww(r){return Math.sqrt(joe(r))}function joe(r){return r[0]*r[0]+r[1]*r[1]}function py(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function Ef(r,e){var t=ww(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Cw(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Ro=Cw;function Xoe(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Bu=Xoe;function vy(r,e,t,i){return r[0]=e[0]+i*(t[0]-e[0]),r[1]=e[1]+i*(t[1]-e[1]),r}function Zr(r,e,t){var i=e[0],n=e[1];return r[0]=t[0]*i+t[2]*n+t[4],r[1]=t[1]*i+t[3]*n+t[5],r}function Oo(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function No(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var Oc=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),Yoe=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Oc(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,a=i-this._x,s=n-this._y;this._x=i,this._y=n,t.drift(a,s,e),this.handler.dispatchToElement(new Oc(t,e),"drag",e.event);var o=this.handler.findHover(i,n,t).target,l=this._dropTarget;this._dropTarget=o,t!==o&&(l&&o!==l&&this.handler.dispatchToElement(new Oc(l,e),"dragleave",e.event),o&&o!==l&&this.handler.dispatchToElement(new Oc(o,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Oc(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Oc(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),Zn=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(n=i,i=t,t=null),!i||!e)return this;var s=this._$eventProcessor;t!=null&&s&&s.normalizeQuery&&(t=s.normalizeQuery(t)),a[e]||(a[e]=[]);for(var o=0;o<a[e].length;o++)if(a[e][o].h===i)return this;var l={h:i,query:t,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var i=this._$handlers;if(!i)return this;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var n=[],a=0,s=i[e].length;a<s;a++)i[e][a].h!==t&&n.push(i[e][a]);i[e]=n}i[e]&&i[e].length===0&&delete i[e]}else delete i[e];return this},r.prototype.trigger=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[e],a=this._$eventProcessor;if(n)for(var s=t.length,o=n.length,l=0;l<o;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(s){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[e],a=this._$eventProcessor;if(n)for(var s=t.length,o=t[s-1],l=n.length,u=0;u<l;u++){var c=n[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(s){case 0:c.h.call(o);break;case 1:c.h.call(o,t[0]);break;case 2:c.h.call(o,t[0],t[1]);break;default:c.h.apply(o,t.slice(1,s-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r}(),Koe=Math.log(2);function Aw(r,e,t,i,n,a){var s=i+"-"+n,o=r.length;if(a.hasOwnProperty(s))return a[s];if(e===1){var l=Math.round(Math.log((1<<o)-1&~n)/Koe);return r[t][l]}for(var u=i|1<<t,c=t+1;i&1<<c;)c++;for(var h=0,d=0,f=0;d<o;d++){var p=1<<d;p&n||(h+=(f%2?-1:1)*r[t][d]*Aw(r,e-1,c,u,n|p,a),f++)}return a[s]=h,h}function mL(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],i={},n=Aw(t,8,0,0,0,i);if(n!==0){for(var a=[],s=0;s<8;s++)for(var o=0;o<8;o++)a[o]==null&&(a[o]=0),a[o]+=((s+o)%2?-1:1)*Aw(t,7,s===0?1:0,1<<s,1<<o,i)/n*e[s];return function(l,u,c){var h=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/h,l[1]=(u*a[3]+c*a[4]+a[5])/h}}}var yL="___zrEVENTSAVED",jb=[];function Zoe(r,e,t,i,n){return Dw(jb,e,i,n,!0)&&Dw(r,t,jb[0],jb[1])}function Dw(r,e,t,i,n){if(e.getBoundingClientRect&&et.domSupported&&!FG(e)){var a=e[yL]||(e[yL]={}),s=Qoe(e,a),o=Joe(s,a,n);if(o)return o(r,t,i),!0}return!1}function Qoe(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var s=document.createElement("div"),o=s.style,l=a%2,u=(a>>1)%2;o.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(s),t.push(s)}return t}function Joe(r,e,t){for(var i=t?"invTrans":"trans",n=e[i],a=e.srcCoords,s=[],o=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;s.push(d,f),l=l&&a&&d===a[h]&&f===a[h+1],o.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=s,e[i]=t?mL(o,s):mL(s,o))}function FG(r){return r.nodeName.toUpperCase()==="CANVAS"}var ele=/([&<>"'])/g,tle={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Bi(r){return r==null?"":(r+"").replace(ele,function(e,t){return tle[t]})}var rle=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xb=[],ile=et.browser.firefox&&+et.browser.version.split(".")[0]<39;function Ew(r,e,t,i){return t=t||{},i?_L(r,e,t):ile&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):_L(r,e,t),t}function _L(r,e,t){if(et.domSupported&&r.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(FG(r)){var a=r.getBoundingClientRect();t.zrX=i-a.left,t.zrY=n-a.top;return}else if(Dw(Xb,r,i,n)){t.zrX=Xb[0],t.zrY=Xb[1];return}}t.zrX=t.zrY=0}function XA(r){return r||window.event}function kn(r,e,t){if(e=XA(e),e.zrX!=null)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var s=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];s&&Ew(r,s,e,t)}else{Ew(r,e,e,t);var a=nle(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var o=e.button;return e.which==null&&o!==void 0&&rle.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function nle(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,i=r.deltaY;if(t==null||i==null)return e;var n=Math.abs(i!==0?i:t),a=i>0?-1:i<0?1:t>0?-1:1;return 3*n*a}function Iw(r,e,t,i){r.addEventListener(e,t,i)}function ale(r,e,t,i){r.removeEventListener(e,t,i)}var $s=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function bL(r){return r.which===2||r.which===3}var sle=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},s=0,o=n.length;s<o;s++){var l=n[s],u=Ew(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(e){for(var t in Yb)if(Yb.hasOwnProperty(t)){var i=Yb[t](this._track,e);if(i)return i}},r}();function TL(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function ole(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Yb={pinch:function(r,e){var t=r.length;if(t){var i=(r[t-1]||{}).points,n=(r[t-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=TL(i)/TL(n);!isFinite(a)&&(a=1),e.pinchScale=a;var s=ole(i);return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:r[0].target,event:e}}}}};function vn(){return[1,0,0,1,0,0]}function J_(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function YA(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Rs(r,e,t){var i=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],s=e[1]*t[2]+e[3]*t[3],o=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=s,r[4]=o,r[5]=l,r}function ss(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function uc(r,e,t,i){i===void 0&&(i=[0,0]);var n=e[0],a=e[2],s=e[4],o=e[1],l=e[3],u=e[5],c=Math.sin(t),h=Math.cos(t);return r[0]=n*h+o*c,r[1]=-n*c+o*h,r[2]=a*h+l*c,r[3]=-a*c+h*l,r[4]=h*(s-i[0])+c*(u-i[1])+i[0],r[5]=h*(u-i[1])-c*(s-i[0])+i[1],r}function KA(r,e,t){var i=t[0],n=t[1];return r[0]=e[0]*i,r[1]=e[1]*n,r[2]=e[2]*i,r[3]=e[3]*n,r[4]=e[4]*i,r[5]=e[5]*n,r}function If(r,e){var t=e[0],i=e[2],n=e[4],a=e[1],s=e[3],o=e[5],l=t*s-a*i;return l?(l=1/l,r[0]=s*l,r[1]=-a*l,r[2]=-i*l,r[3]=t*l,r[4]=(i*o-s*n)*l,r[5]=(a*n-t*o)*l,r):null}function lle(r){var e=vn();return YA(e,r),e}var He=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,i){e.x=t,e.y=i},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},r.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},r.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},r.scaleAndAdd=function(e,t,i,n){e.x=t.x+i.x*n,e.y=t.y+i.y*n},r.lerp=function(e,t,i,n){var a=1-n;e.x=a*t.x+n*i.x,e.y=a*t.y+n*i.y},r}(),em=Math.min,tm=Math.max,Dl=new He,El=new He,Il=new He,Pl=new He,dd=new He,pd=new He,qe=function(){function r(e,t,i,n){i<0&&(e=e+i,i=-i),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}return r.prototype.union=function(e){var t=em(e.x,this.x),i=em(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=tm(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=tm(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,n=e.height/t.height,a=vn();return ss(a,a,[-t.x,-t.y]),KA(a,a,[i,n]),ss(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var i=this,n=i.x,a=i.x+i.width,s=i.y,o=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,d=!(a<l||u<n||o<c||h<s);if(t){var f=1/0,p=0,v=Math.abs(a-l),g=Math.abs(u-n),m=Math.abs(o-c),y=Math.abs(h-s),_=Math.min(v,g),b=Math.min(m,y);a<l||u<n?_>p&&(p=_,v<g?He.set(pd,-v,0):He.set(pd,g,0)):_<f&&(f=_,v<g?He.set(dd,v,0):He.set(dd,-g,0)),o<c||h<s?b>p&&(p=b,m<y?He.set(pd,0,-m):He.set(pd,0,y)):_<f&&(f=_,m<y?He.set(dd,0,m):He.set(dd,0,-y))}return t&&He.copy(t,d?dd:pd),d},r.prototype.contain=function(e,t){var i=this;return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,i){if(!i){e!==t&&r.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],s=i[4],o=i[5];e.x=t.x*n+s,e.y=t.y*a+o,e.width=t.width*n,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Dl.x=Il.x=t.x,Dl.y=Pl.y=t.y,El.x=Pl.x=t.x+t.width,El.y=Il.y=t.y+t.height,Dl.transform(i),Pl.transform(i),El.transform(i),Il.transform(i),e.x=em(Dl.x,El.x,Il.x,Pl.x),e.y=em(Dl.y,El.y,Il.y,Pl.y);var l=tm(Dl.x,El.x,Il.x,Pl.x),u=tm(Dl.y,El.y,Il.y,Pl.y);e.width=l-e.x,e.height=u-e.y},r}(),UG="silent";function ule(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:cle}}function cle(){$s(this.event)}var hle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Zn),vd=function(){function r(e,t){this.x=e,this.y=t}return r}(),fle=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Kb=new qe(0,0,0,0),VG=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this)||this;return o._hovered=new vd(0,0),o.storage=t,o.painter=i,o.painterRoot=a,o._pointerSize=s,n=n||new hle,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new Yoe(o),o}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(R(fle,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,n=t.zrY,a=zG(this,i,n),s=this._hovered,o=s.target;o&&!o.__zr&&(s=this.findHover(s.x,s.y),o=s.target);var l=this._hovered=a?new vd(i,n):this.findHover(i,n),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),o&&u!==o&&this.dispatchToElement(s,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==o&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new vd(0,0)},e.prototype.dispatch=function(t,i){var n=this[t];n&&n.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,n){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var s="on"+i,o=ule(i,t,n);a&&(a[s]&&(o.cancelBubble=!!a[s].call(a,o)),a.trigger(i,o),a=a.__hostTarget?a.__hostTarget:a.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(i,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[s]=="function"&&l[s].call(l,o),l.trigger&&l.trigger(i,o)}))}},e.prototype.findHover=function(t,i,n){var a=this.storage.getDisplayList(),s=new vd(t,i);if(SL(a,s,t,i,n),this._pointerSize&&!s.target){for(var o=[],l=this._pointerSize,u=l/2,c=new qe(t-u,i-u,l,l),h=a.length-1;h>=0;h--){var d=a[h];d!==n&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Kb.copy(d.getBoundingRect()),d.transform&&Kb.applyTransform(d.transform),Kb.intersect(c)&&o.push(d))}if(o.length)for(var f=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=f)for(var m=0;m<v;m+=p){var y=t+g*Math.cos(m),_=i+g*Math.sin(m);if(SL(o,s,y,_,n),s.target)return s}}return s},e.prototype.processGesture=function(t,i){this._gestureMgr||(this._gestureMgr=new sle);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var s=a.type;t.gestureEvent=s;var o=new vd;o.target=a.target,this.dispatchToElement(o,s,a.event)}},e}(Zn);R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){VG.prototype[r]=function(e){var t=e.zrX,i=e.zrY,n=zG(this,t,i),a,s;if((r!=="mouseup"||!n)&&(a=this.findHover(t,i),s=a.target),r==="mousedown")this._downEl=s,this._downPoint=[e.zrX,e.zrY],this._upEl=s;else if(r==="mouseup")this._upEl=s;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Ro(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function dle(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var s=i.getClipPath();if(s&&!s.contain(e,t))return!1}i.silent&&(n=!0);var o=i.__hostTarget;i=o||i.parent}return n?UG:!0}return!1}function SL(r,e,t,i,n){for(var a=r.length-1;a>=0;a--){var s=r[a],o=void 0;if(s!==n&&!s.ignore&&(o=dle(s,t,i))&&(!e.topTarget&&(e.topTarget=s),o!==UG)){e.target=s;break}}}function zG(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var GG=32,gd=7;function ple(r){for(var e=0;r>=GG;)e|=r&1,r>>=1;return r+e}function xL(r,e,t,i){var n=e+1;if(n===t)return 1;if(i(r[n++],r[e])<0){for(;n<t&&i(r[n],r[n-1])<0;)n++;vle(r,e,n)}else for(;n<t&&i(r[n],r[n-1])>=0;)n++;return n-e}function vle(r,e,t){for(t--;e<t;){var i=r[e];r[e++]=r[t],r[t--]=i}}function wL(r,e,t,i,n){for(i===e&&i++;i<t;i++){for(var a=r[i],s=e,o=i,l;s<o;)l=s+o>>>1,n(a,r[l])<0?o=l:s=l+1;var u=i-s;switch(u){case 3:r[s+3]=r[s+2];case 2:r[s+2]=r[s+1];case 1:r[s+1]=r[s];break;default:for(;u>0;)r[s+u]=r[s+u-1],u--}r[s]=a}}function Zb(r,e,t,i,n,a){var s=0,o=0,l=1;if(a(r,e[t+n])>0){for(o=i-n;l<o&&a(r,e[t+n+l])>0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o),s+=n,l+=n}else{for(o=n+1;l<o&&a(r,e[t+n-l])<=0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o);var u=s;s=n-l,l=n-u}for(s++;s<l;){var c=s+(l-s>>>1);a(r,e[t+c])>0?s=c+1:l=c}return l}function Qb(r,e,t,i,n,a){var s=0,o=0,l=1;if(a(r,e[t+n])<0){for(o=n+1;l<o&&a(r,e[t+n-l])<0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o);var u=s;s=n-l,l=n-u}else{for(o=i-n;l<o&&a(r,e[t+n+l])>=0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o),s+=n,l+=n}for(s++;s<l;){var c=s+(l-s>>>1);a(r,e[t+c])<0?l=c:s=c+1}return l}function gle(r,e){var t=gd,i,n,a=0,s=[];i=[],n=[];function o(f,p){i[a]=f,n[a]=p,a+=1}function l(){for(;a>1;){var f=a-2;if(f>=1&&n[f-1]<=n[f]+n[f+1]||f>=2&&n[f-2]<=n[f]+n[f-1])n[f-1]<n[f+1]&&f--;else if(n[f]>n[f+1])break;c(f)}}function u(){for(;a>1;){var f=a-2;f>0&&n[f-1]<n[f+1]&&f--,c(f)}}function c(f){var p=i[f],v=n[f],g=i[f+1],m=n[f+1];n[f]=v+m,f===a-3&&(i[f+1]=i[f+2],n[f+1]=n[f+2]),a--;var y=Qb(r[g],r,p,v,0,e);p+=y,v-=y,v!==0&&(m=Zb(r[p+v-1],r,g,m,m-1,e),m!==0&&(v<=m?h(p,v,g,m):d(p,v,g,m)))}function h(f,p,v,g){var m=0;for(m=0;m<p;m++)s[m]=r[f+m];var y=0,_=v,b=f;if(r[b++]=r[_++],--g===0){for(m=0;m<p;m++)r[b+m]=s[y+m];return}if(p===1){for(m=0;m<g;m++)r[b+m]=r[_+m];r[b+g]=s[y];return}for(var S=t,x,C,D;;){x=0,C=0,D=!1;do if(e(r[_],s[y])<0){if(r[b++]=r[_++],C++,x=0,--g===0){D=!0;break}}else if(r[b++]=s[y++],x++,C=0,--p===1){D=!0;break}while((x|C)<S);if(D)break;do{if(x=Qb(r[_],s,y,p,0,e),x!==0){for(m=0;m<x;m++)r[b+m]=s[y+m];if(b+=x,y+=x,p-=x,p<=1){D=!0;break}}if(r[b++]=r[_++],--g===0){D=!0;break}if(C=Zb(s[y],r,_,g,0,e),C!==0){for(m=0;m<C;m++)r[b+m]=r[_+m];if(b+=C,_+=C,g-=C,g===0){D=!0;break}}if(r[b++]=s[y++],--p===1){D=!0;break}S--}while(x>=gd||C>=gd);if(D)break;S<0&&(S=0),S+=2}if(t=S,t<1&&(t=1),p===1){for(m=0;m<g;m++)r[b+m]=r[_+m];r[b+g]=s[y]}else{if(p===0)throw new Error;for(m=0;m<p;m++)r[b+m]=s[y+m]}}function d(f,p,v,g){var m=0;for(m=0;m<g;m++)s[m]=r[v+m];var y=f+p-1,_=g-1,b=v+g-1,S=0,x=0;if(r[b--]=r[y--],--p===0){for(S=b-(g-1),m=0;m<g;m++)r[S+m]=s[m];return}if(g===1){for(b-=p,y-=p,x=b+1,S=y+1,m=p-1;m>=0;m--)r[x+m]=r[S+m];r[b]=s[_];return}for(var C=t;;){var D=0,I=0,M=!1;do if(e(s[_],r[y])<0){if(r[b--]=r[y--],D++,I=0,--p===0){M=!0;break}}else if(r[b--]=s[_--],I++,D=0,--g===1){M=!0;break}while((D|I)<C);if(M)break;do{if(D=p-Qb(s[_],r,f,p,p-1,e),D!==0){for(b-=D,y-=D,p-=D,x=b+1,S=y+1,m=D-1;m>=0;m--)r[x+m]=r[S+m];if(p===0){M=!0;break}}if(r[b--]=s[_--],--g===1){M=!0;break}if(I=g-Zb(r[y],s,0,g,g-1,e),I!==0){for(b-=I,_-=I,g-=I,x=b+1,S=_+1,m=0;m<I;m++)r[x+m]=s[S+m];if(g<=1){M=!0;break}}if(r[b--]=r[y--],--p===0){M=!0;break}C--}while(D>=gd||I>=gd);if(M)break;C<0&&(C=0),C+=2}if(t=C,t<1&&(t=1),g===1){for(b-=p,y-=p,x=b+1,S=y+1,m=p-1;m>=0;m--)r[x+m]=r[S+m];r[b]=s[_]}else{if(g===0)throw new Error;for(S=b-(g-1),m=0;m<g;m++)r[S+m]=s[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:o}}function gy(r,e,t,i){t||(t=0),i||(i=r.length);var n=i-t;if(!(n<2)){var a=0;if(n<GG){a=xL(r,t,i,e),wL(r,t,i,t+a,e);return}var s=gle(r,e),o=ple(n);do{if(a=xL(r,t,i,e),a<o){var l=n;l>o&&(l=o),wL(r,t,t+l,t+a,e),a=l}s.pushRun(t,a),s.mergeRuns(),n-=a,t+=a}while(n!==0);s.forceMergeRuns()}}var cn=1,tp=2,nh=4,CL=!1;function Jb(){CL||(CL=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function AL(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var mle=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=AL}return r.prototype.traverse=function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var i=this._displayList;return(e||!i.length)&&this.updateDisplayList(t),i},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,n=0,a=t.length;n<a;n++)this._updateAndAddDisplayable(t[n],null,e);i.length=this._displayListLen,gy(i,AL)},r.prototype._updateAndAddDisplayable=function(e,t,i){if(!(e.ignore&&!i)){e.beforeUpdate(),e.update(),e.afterUpdate();var n=e.getClipPath();if(e.ignoreClip)t=null;else if(n){t?t=t.slice():t=[];for(var a=n,s=e;a;)a.parent=s,a.updateTransform(),t.push(a),s=a,a=a.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),l=0;l<o.length;l++){var u=o[l];e.__dirty&&(u.__dirty|=cn),this._updateAndAddDisplayable(u,t,i)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(Jb(),c.z=0),isNaN(c.z2)&&(Jb(),c.z2=0),isNaN(c.zlevel)&&(Jb(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,i);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,i);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,i)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t<i;t++)this.delRoot(e[t]);return}var n=Xe(this._roots,e);n>=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),S0;S0=et.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Ep={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)))},elasticOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Ep.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Ep.bounceIn(r*2)*.5:Ep.bounceOut(r*2-1)*.5+.5}},rm=Math.pow,Wo=Math.sqrt,x0=1e-8,HG=1e-4,DL=Wo(3),im=1/3,Fa=lc(),Bn=lc(),kh=lc();function Bo(r){return r>-x0&&r<x0}function $G(r){return r>x0||r<-x0}function Mr(r,e,t,i,n){var a=1-n;return a*a*(a*r+3*n*e)+n*n*(n*i+3*a*t)}function EL(r,e,t,i,n){var a=1-n;return 3*(((e-r)*a+2*(t-e)*n)*a+(i-t)*n*n)}function w0(r,e,t,i,n,a){var s=i+3*(e-t)-r,o=3*(t-e*2+r),l=3*(e-r),u=r-n,c=o*o-3*s*l,h=o*l-9*s*u,d=l*l-3*o*u,f=0;if(Bo(c)&&Bo(h))if(Bo(o))a[0]=0;else{var p=-l/o;p>=0&&p<=1&&(a[f++]=p)}else{var v=h*h-4*c*d;if(Bo(v)){var g=h/c,p=-o/s+g,m=-g/2;p>=0&&p<=1&&(a[f++]=p),m>=0&&m<=1&&(a[f++]=m)}else if(v>0){var y=Wo(v),_=c*o+1.5*s*(-h+y),b=c*o+1.5*s*(-h-y);_<0?_=-rm(-_,im):_=rm(_,im),b<0?b=-rm(-b,im):b=rm(b,im);var p=(-o-(_+b))/(3*s);p>=0&&p<=1&&(a[f++]=p)}else{var S=(2*c*o-3*s*h)/(2*Wo(c*c*c)),x=Math.acos(S)/3,C=Wo(c),D=Math.cos(x),p=(-o-2*C*D)/(3*s),m=(-o+C*(D+DL*Math.sin(x)))/(3*s),I=(-o+C*(D-DL*Math.sin(x)))/(3*s);p>=0&&p<=1&&(a[f++]=p),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function WG(r,e,t,i,n){var a=6*t-12*e+6*r,s=9*e+3*i-3*r-9*t,o=3*e-3*r,l=0;if(Bo(s)){if($G(a)){var u=-o/a;u>=0&&u<=1&&(n[l++]=u)}}else{var c=a*a-4*s*o;if(Bo(c))n[0]=-a/(2*s);else if(c>0){var h=Wo(c),u=(-a+h)/(2*s),d=(-a-h)/(2*s);u>=0&&u<=1&&(n[l++]=u),d>=0&&d<=1&&(n[l++]=d)}}return l}function tl(r,e,t,i,n,a){var s=(e-r)*n+r,o=(t-e)*n+e,l=(i-t)*n+t,u=(o-s)*n+s,c=(l-o)*n+o,h=(c-u)*n+u;a[0]=r,a[1]=s,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=i}function qG(r,e,t,i,n,a,s,o,l,u,c){var h,d=.005,f=1/0,p,v,g,m;Fa[0]=l,Fa[1]=u;for(var y=0;y<1;y+=.05)Bn[0]=Mr(r,t,n,s,y),Bn[1]=Mr(e,i,a,o,y),g=Bu(Fa,Bn),g<f&&(h=y,f=g);f=1/0;for(var _=0;_<32&&!(d<HG);_++)p=h-d,v=h+d,Bn[0]=Mr(r,t,n,s,p),Bn[1]=Mr(e,i,a,o,p),g=Bu(Bn,Fa),p>=0&&g<f?(h=p,f=g):(kh[0]=Mr(r,t,n,s,v),kh[1]=Mr(e,i,a,o,v),m=Bu(kh,Fa),v<=1&&m<f?(h=v,f=m):d*=.5);return c&&(c[0]=Mr(r,t,n,s,h),c[1]=Mr(e,i,a,o,h)),Wo(f)}function yle(r,e,t,i,n,a,s,o,l){for(var u=r,c=e,h=0,d=1/l,f=1;f<=l;f++){var p=f*d,v=Mr(r,t,n,s,p),g=Mr(e,i,a,o,p),m=v-u,y=g-c;h+=Math.sqrt(m*m+y*y),u=v,c=g}return h}function Ur(r,e,t,i){var n=1-i;return n*(n*r+2*i*e)+i*i*t}function Pw(r,e,t,i){return 2*((1-i)*(e-r)+i*(t-e))}function _le(r,e,t,i,n){var a=r-2*e+t,s=2*(e-r),o=r-i,l=0;if(Bo(a)){if($G(s)){var u=-o/s;u>=0&&u<=1&&(n[l++]=u)}}else{var c=s*s-4*a*o;if(Bo(c)){var u=-s/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var h=Wo(c),u=(-s+h)/(2*a),d=(-s-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),d>=0&&d<=1&&(n[l++]=d)}}return l}function jG(r,e,t){var i=r+t-2*e;return i===0?.5:(r-e)/i}function lv(r,e,t,i,n){var a=(e-r)*i+r,s=(t-e)*i+e,o=(s-a)*i+a;n[0]=r,n[1]=a,n[2]=o,n[3]=o,n[4]=s,n[5]=t}function XG(r,e,t,i,n,a,s,o,l){var u,c=.005,h=1/0;Fa[0]=s,Fa[1]=o;for(var d=0;d<1;d+=.05){Bn[0]=Ur(r,t,n,d),Bn[1]=Ur(e,i,a,d);var f=Bu(Fa,Bn);f<h&&(u=d,h=f)}h=1/0;for(var p=0;p<32&&!(c<HG);p++){var v=u-c,g=u+c;Bn[0]=Ur(r,t,n,v),Bn[1]=Ur(e,i,a,v);var f=Bu(Bn,Fa);if(v>=0&&f<h)u=v,h=f;else{kh[0]=Ur(r,t,n,g),kh[1]=Ur(e,i,a,g);var m=Bu(kh,Fa);g<=1&&m<h?(u=g,h=m):c*=.5}}return l&&(l[0]=Ur(r,t,n,u),l[1]=Ur(e,i,a,u)),Wo(h)}function ble(r,e,t,i,n,a,s){for(var o=r,l=e,u=0,c=1/s,h=1;h<=s;h++){var d=h*c,f=Ur(r,t,n,d),p=Ur(e,i,a,d),v=f-o,g=p-l;u+=Math.sqrt(v*v+g*g),o=f,l=p}return u}var Tle=/cubic-bezier\(([0-9,\.e ]+)\)/;function ZA(r){var e=r&&Tle.exec(r);if(e){var t=e[1].split(","),i=+ha(t[0]),n=+ha(t[1]),a=+ha(t[2]),s=+ha(t[3]);if(isNaN(i+n+a+s))return;var o=[];return function(l){return l<=0?0:l>=1?1:w0(0,i,a,1,l,o)&&Mr(0,n,s,1,o[0])}}}var Sle=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||lr,this.ondestroy=e.ondestroy||lr,this.onrestart=e.onrestart||lr,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,n=e-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var s=this.easingFunc,o=s?s(a):a;if(this.onframe(o),a===1)if(this.loop){var l=n%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=we(e)?e:Ep[e]||ZA(e)},r}(),YG=function(){function r(e){this.value=e}return r}(),xle=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new YG(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Yv=function(){function r(e){this._list=new xle,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var i=this._list,n=this._map,a=null;if(n[e]==null){var s=i.len(),o=this._lastRemovedEntry;if(s>=this._maxSize&&s>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}o?o.value=t:o=new YG(t),o.key=e,i.insertEntry(o),n[e]=o}return a},r.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),IL={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ga(r){return r=Math.round(r),r<0?0:r>255?255:r}function wle(r){return r=Math.round(r),r<0?0:r>360?360:r}function uv(r){return r<0?0:r>1?1:r}function eT(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ga(parseFloat(e)/100*255):ga(parseInt(e,10))}function Fu(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?uv(parseFloat(e)/100):uv(parseFloat(e))}function tT(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Fo(r,e,t){return r+(e-r)*t}function Mn(r,e,t,i,n){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function Mw(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var KG=new Yv(20),nm=null;function Nc(r,e){nm&&Mw(nm,e),nm=KG.put(r,nm||e.slice())}function gn(r,e){if(r){e=e||[];var t=KG.get(r);if(t)return Mw(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in IL)return Mw(e,IL[i]),Nc(r,e),e;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){Mn(e,0,0,0,1);return}return Mn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Nc(r,e),e}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){Mn(e,0,0,0,1);return}return Mn(e,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Nc(r,e),e}return}var s=i.indexOf("("),o=i.indexOf(")");if(s!==-1&&o+1===n){var l=i.substr(0,s),u=i.substr(s+1,o-(s+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Mn(e,+u[0],+u[1],+u[2],1):Mn(e,0,0,0,1);c=Fu(u.pop());case"rgb":if(u.length>=3)return Mn(e,eT(u[0]),eT(u[1]),eT(u[2]),u.length===3?c:Fu(u[3])),Nc(r,e),e;Mn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Mn(e,0,0,0,1);return}return u[3]=Fu(u[3]),Lw(u,e),Nc(r,e),e;case"hsl":if(u.length!==3){Mn(e,0,0,0,1);return}return Lw(u,e),Nc(r,e),e;default:return}}Mn(e,0,0,0,1)}}function Lw(r,e){var t=(parseFloat(r[0])%360+360)%360/360,i=Fu(r[1]),n=Fu(r[2]),a=n<=.5?n*(i+1):n+i-n*i,s=n*2-a;return e=e||[],Mn(e,ga(tT(s,a,t+1/3)*255),ga(tT(s,a,t)*255),ga(tT(s,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Cle(r){if(r){var e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.min(e,t,i),a=Math.max(e,t,i),s=a-n,o=(a+n)/2,l,u;if(s===0)l=0,u=0;else{o<.5?u=s/(a+n):u=s/(2-a-n);var c=((a-e)/6+s/2)/s,h=((a-t)/6+s/2)/s,d=((a-i)/6+s/2)/s;e===a?l=d-h:t===a?l=1/3+c-d:i===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var f=[l*360,u,o];return r[3]!=null&&f.push(r[3]),f}}function kw(r,e){var t=gn(r);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return Os(t,t.length===4?"rgba":"rgb")}}function rT(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),s=e[n],o=e[a],l=i-n;return t[0]=ga(Fo(s[0],o[0],l)),t[1]=ga(Fo(s[1],o[1],l)),t[2]=ga(Fo(s[2],o[2],l)),t[3]=uv(Fo(s[3],o[3],l)),t}}function Ale(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),s=gn(e[n]),o=gn(e[a]),l=i-n,u=Os([ga(Fo(s[0],o[0],l)),ga(Fo(s[1],o[1],l)),ga(Fo(s[2],o[2],l)),uv(Fo(s[3],o[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function Ip(r,e,t,i){var n=gn(r);if(r)return n=Cle(n),e!=null&&(n[0]=wle(e)),t!=null&&(n[1]=Fu(t)),i!=null&&(n[2]=Fu(i)),Os(Lw(n),"rgba")}function C0(r,e){var t=gn(r);if(t&&e!=null)return t[3]=uv(e),Os(t,"rgba")}function Os(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function A0(r,e){var t=gn(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var PL=new Yv(100);function Rw(r){if(pe(r)){var e=PL.get(r);return e||(e=kw(r,-.1),PL.put(r,e)),e}else if(Z_(r)){var t=J({},r);return t.colorStops=oe(r.colorStops,function(i){return{offset:i.offset,color:kw(i.color,-.1)}}),t}return r}var D0=Math.round;function cv(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=gn(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var ML=1e-4;function Uo(r){return r<ML&&r>-ML}function am(r){return D0(r*1e3)/1e3}function Ow(r){return D0(r*1e4)/1e4}function Dle(r){return"matrix("+am(r[0])+","+am(r[1])+","+am(r[2])+","+am(r[3])+","+Ow(r[4])+","+Ow(r[5])+")"}var Ele={left:"start",right:"end",center:"middle",middle:"middle"};function Ile(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function Ple(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function Mle(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function ZG(r){return r&&!!r.image}function Lle(r){return r&&!!r.svgElement}function QA(r){return ZG(r)||Lle(r)}function QG(r){return r.type==="linear"}function JG(r){return r.type==="radial"}function e9(r){return r&&(r.type==="linear"||r.type==="radial")}function e1(r){return"url(#"+r+")"}function t9(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function r9(r){var e=r.x||0,t=r.y||0,i=(r.rotation||0)*dy,n=Be(r.scaleX,1),a=Be(r.scaleY,1),s=r.skewX||0,o=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(s||o)&&l.push("skew("+D0(s*dy)+"deg, "+D0(o*dy)+"deg)"),l.join(" ")}var kle=function(){return et.hasGlobalWindow&&we(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Nw=Array.prototype.slice;function Ts(r,e,t){return(e-r)*t+r}function iT(r,e,t,i){for(var n=e.length,a=0;a<n;a++)r[a]=Ts(e[a],t[a],i);return r}function Rle(r,e,t,i){for(var n=e.length,a=n&&e[0].length,s=0;s<n;s++){r[s]||(r[s]=[]);for(var o=0;o<a;o++)r[s][o]=Ts(e[s][o],t[s][o],i)}return r}function sm(r,e,t,i){for(var n=e.length,a=0;a<n;a++)r[a]=e[a]+t[a]*i;return r}function LL(r,e,t,i){for(var n=e.length,a=n&&e[0].length,s=0;s<n;s++){r[s]||(r[s]=[]);for(var o=0;o<a;o++)r[s][o]=e[s][o]+t[s][o]*i}return r}function Ole(r,e){for(var t=r.length,i=e.length,n=t>i?e:r,a=Math.min(t,i),s=n[a-1]||{color:[0,0,0,0],offset:0},o=a;o<Math.max(t,i);o++)n.push({offset:s.offset,color:s.color.slice()})}function Nle(r,e,t){var i=r,n=e;if(!(!i.push||!n.push)){var a=i.length,s=n.length;if(a!==s){var o=a>s;if(o)i.length=s;else for(var l=a;l<s;l++)i.push(t===1?n[l]:Nw.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(t===1)isNaN(i[l])&&(i[l]=n[l]);else for(var c=0;c<u;c++)isNaN(i[l][c])&&(i[l][c]=n[l][c])}}function Pp(r){if(li(r)){var e=r.length;if(li(r[0])){for(var t=[],i=0;i<e;i++)t.push(Nw.call(r[i]));return t}return Nw.call(r)}return r}function my(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function Ble(r){return li(r&&r[0])?2:1}var om=0,yy=1,i9=2,rp=3,Bw=4,Fw=5,kL=6;function RL(r){return r===Bw||r===Fw}function lm(r){return r===yy||r===i9}var md=[0,0,0,0],Fle=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var n=this.keyframes,a=n.length,s=!1,o=kL,l=t;if(li(t)){var u=Ble(t);o=u,(u===1&&!ut(t[0])||u===2&&!ut(t[0][0]))&&(s=!0)}else if(ut(t)&&!ov(t))o=om;else if(pe(t))if(!isNaN(+t))o=om;else{var c=gn(t);c&&(l=c,o=rp)}else if(Z_(t)){var h=J({},l);h.colorStops=oe(t.colorStops,function(f){return{offset:f.offset,color:gn(f.color)}}),QG(t)?o=Bw:JG(t)&&(o=Fw),l=h}a===0?this.valType=o:(o!==this.valType||o===kL)&&(s=!0),this.discrete=this.discrete||s;var d={time:e,value:l,rawValue:t,percent:0};return i&&(d.easing=i,d.easingFunc=we(i)?i:Ep[i]||ZA(i)),n.push(d),d},r.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(v,g){return v.time-g.time});for(var n=this.valType,a=i.length,s=i[a-1],o=this.discrete,l=lm(n),u=RL(n),c=0;c<a;c++){var h=i[c],d=h.value,f=s.value;h.percent=h.time/e,o||(l&&c!==a-1?Nle(d,f,n):u&&Ole(d.colorStops,f.colorStops))}if(!o&&n!==Fw&&t&&this.needsAnimate()&&t.needsAnimate()&&n===t.valType&&!t._finished){this._additiveTrack=t;for(var p=i[0].value,c=0;c<a;c++)n===om?i[c].additiveValue=i[c].value-p:n===rp?i[c].additiveValue=sm([],i[c].value,p,-1):lm(n)&&(i[c].additiveValue=n===yy?sm([],i[c].value,p,-1):LL([],i[c].value,p,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,s=this.keyframes,o=s.length,l=this.propName,u=a===rp,c,h=this._lastFr,d=Math.min,f,p;if(o===1)f=p=s[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=d(h+1,o-1);for(c=v;c>=0&&!(s[c].percent<=t);c--);c=d(c,o-2)}else{for(c=h;c<o&&!(s[c].percent>t);c++);c=d(c-1,o-2)}p=s[c+1],f=s[c]}if(f&&p){this._lastFr=c,this._lastFrP=t;var g=p.percent-f.percent,m=g===0?1:d((t-f.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var y=i?this._additiveValue:u?md:e[l];if((lm(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?f.rawValue:p.rawValue;else if(lm(a))a===yy?iT(y,f[n],p[n],m):Rle(y,f[n],p[n],m);else if(RL(a)){var _=f[n],b=p[n],S=a===Bw;e[l]={type:S?"linear":"radial",x:Ts(_.x,b.x,m),y:Ts(_.y,b.y,m),colorStops:oe(_.colorStops,function(C,D){var I=b.colorStops[D];return{offset:Ts(C.offset,I.offset,m),color:my(iT([],C.color,I.color,m))}}),global:b.global},S?(e[l].x2=Ts(_.x2,b.x2,m),e[l].y2=Ts(_.y2,b.y2,m)):e[l].r=Ts(_.r,b.r,m)}else if(u)iT(y,f[n],p[n],m),i||(e[l]=my(y));else{var x=Ts(f[n],p[n],m);i?this._additiveValue=x:e[l]=x}i&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,n=this._additiveValue;t===om?e[i]=e[i]+n:t===rp?(gn(e[i],md),sm(md,md,n,1),e[i]=my(md)):t===yy?sm(e[i],e[i],n,1):t===i9&&LL(e[i],e[i],n,1)},r}(),JA=function(){function r(e,t,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){$A("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,rt(t),i)},r.prototype.whenWithKeys=function(e,t,i,n){for(var a=this._tracks,s=0;s<i.length;s++){var o=i[s],l=a[o];if(!l){l=a[o]=new Fle(o);var u=void 0,c=this._getAdditiveTrack(o);if(c){var h=c.keyframes,d=h[h.length-1];u=d&&d.value,c.valType===rp&&u&&(u=my(u))}else u=this._target[o];if(u==null)continue;e>0&&l.addKeyframe(0,Pp(u),n),this._trackKeys.push(o)}l.addKeyframe(e,Pp(t[o]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i<t;i++)e[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var i=0;i<t.length;i++)t[i].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,i=0;i<t.length;i++)e[t[i]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(e);a&&(t=a)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var s=this._trackKeys[a],o=this._tracks[s],l=this._getAdditiveTrack(s),u=o.keyframes,c=u.length;if(o.prepare(n,l),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var h=u[c-1];h&&(t._target[o.propName]=h.rawValue),o.setFinished()}else i.push(o)}if(i.length||this._force){var d=new Sle({life:n,loop:this._loop,delay:this._delay||0,onframe:function(f){t._started=2;var p=t._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var g=0;g<i.length;g++)i[g].step(t._target,f);var m=t._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](t._target,f)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return oe(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<e.length;a++){var s=i[e[a]];s&&!s.isFinished()&&(t?s.step(this._target,1):this._started===1&&s.step(this._target,0),s.setFinished())}for(var o=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},r.prototype.saveTo=function(e,t,i){if(e){t=t||this._trackKeys;for(var n=0;n<t.length;n++){var a=t[n],s=this._tracks[a];if(!(!s||s.isFinished())){var o=s.keyframes,l=o[i?0:o.length-1];l&&(e[a]=Pp(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||rt(e);for(var i=0;i<t.length;i++){var n=t[i],a=this._tracks[n];if(a){var s=a.keyframes;if(s.length>1){var o=s.pop();a.addKeyframe(o.time,e[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function gh(){return new Date().getTime()}var Ule=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,n=t.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=gh()-this._pausedTime,n=i-this._time,a=this._head;a;){var s=a.next,o=a.step(i,n);o&&(a.ondestroy(),this.removeClip(a)),a=s}this._time=i,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(S0(i),!t._paused&&t.update())}S0(i)},e.prototype.start=function(){this._running||(this._time=gh(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=gh(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=gh()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var n=new JA(t,i.loop);return this.addAnimator(n),n},e}(Zn),Vle=300,nT=et.domSupported,aT=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=oe(r,function(n){var a=n.replace("mouse","pointer");return t.hasOwnProperty(a)?a:n});return{mouse:r,touch:e,pointer:i}}(),OL={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},NL=!1;function Uw(r){var e=r.pointerType;return e==="pen"||e==="touch"}function zle(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function sT(r){r&&(r.zrByTouch=!0)}function Gle(r,e){return kn(r.dom,new Hle(r,e),!0)}function n9(r,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return i}var Hle=function(){function r(e,t){this.stopPropagation=lr,this.stopImmediatePropagation=lr,this.preventDefault=lr,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),sa={mousedown:function(r){r=kn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=kn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=kn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=kn(this.dom,r);var e=r.toElement||r.relatedTarget;n9(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){NL=!0,r=kn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){NL||(r=kn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=kn(this.dom,r),sT(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),sa.mousemove.call(this,r),sa.mousedown.call(this,r)},touchmove:function(r){r=kn(this.dom,r),sT(r),this.handler.processGesture(r,"change"),sa.mousemove.call(this,r)},touchend:function(r){r=kn(this.dom,r),sT(r),this.handler.processGesture(r,"end"),sa.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Vle&&sa.click.call(this,r)},pointerdown:function(r){sa.mousedown.call(this,r)},pointermove:function(r){Uw(r)||sa.mousemove.call(this,r)},pointerup:function(r){sa.mouseup.call(this,r)},pointerout:function(r){Uw(r)||sa.mouseout.call(this,r)}};R(["click","dblclick","contextmenu"],function(r){sa[r]=function(e){e=kn(this.dom,e),this.trigger(r,e)}});var Vw={pointermove:function(r){Uw(r)||Vw.mousemove.call(this,r)},pointerup:function(r){Vw.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function $le(r,e){var t=e.domHandlers;et.pointerEventsSupported?R(aT.pointer,function(i){_y(e,i,function(n){t[i].call(r,n)})}):(et.touchEventsSupported&&R(aT.touch,function(i){_y(e,i,function(n){t[i].call(r,n),zle(e)})}),R(aT.mouse,function(i){_y(e,i,function(n){n=XA(n),e.touching||t[i].call(r,n)})}))}function Wle(r,e){et.pointerEventsSupported?R(OL.pointer,t):et.touchEventsSupported||R(OL.mouse,t);function t(i){function n(a){a=XA(a),n9(r,a.target)||(a=Gle(r,a),e.domHandlers[i].call(r,a))}_y(e,i,n,{capture:!0})}}function _y(r,e,t,i){r.mounted[e]=t,r.listenerOpts[e]=i,Iw(r.domTarget,e,t,i)}function oT(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&ale(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var BL=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),qle=function(r){j(e,r);function e(t,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=i,n._localHandlerScope=new BL(t,sa),nT&&(n._globalHandlerScope=new BL(document,Vw)),$le(n,n._localHandlerScope),n}return e.prototype.dispose=function(){oT(this._localHandlerScope),nT&&oT(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,nT&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var i=this._globalHandlerScope;t?Wle(this,i):oT(i)}},e}(Zn),a9=1;et.hasGlobalWindow&&(a9=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var E0=a9,zw=.4,Gw="#333",Hw="#ccc",jle="#eee",FL=J_,UL=5e-5;function Ml(r){return r>UL||r<-UL}var Ll=[],Bc=[],lT=vn(),uT=Math.abs,Is=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Ml(this.rotation)||Ml(this.x)||Ml(this.y)||Ml(this.scaleX-1)||Ml(this.scaleY-1)||Ml(this.skewX)||Ml(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(FL(i),this.invTransform=null);return}i=i||vn(),t?this.getLocalTransform(i):FL(i),e&&(t?Rs(i,e,i):YA(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ll);var i=Ll[0]<0?-1:1,n=Ll[1]<0?-1:1,a=((Ll[0]-i)*t+i)/Ll[0]||0,s=((Ll[1]-n)*t+n)/Ll[1]||0;e[0]*=a,e[1]*=a,e[2]*=s,e[3]*=s}this.invTransform=this.invTransform||vn(),If(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),a=Math.PI/2+n-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||vn(),Rs(Bc,e.invTransform,t),t=Bc);var i=this.originX,n=this.originY;(i||n)&&(lT[4]=i,lT[5]=n,Rs(Bc,t,lT),Bc[4]-=i,Bc[5]-=n,t=Bc),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&Zr(i,i,n),i},r.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&Zr(i,i,n),i},r.prototype.getLineScale=function(){var e=this.transform;return e&&uT(e[0]-1)>1e-10&&uT(e[3]-1)>1e-10?Math.sqrt(uT(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){s9(this,e)},r.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,n=e.originY||0,a=e.scaleX,s=e.scaleY,o=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(i||n||o||l){var p=i+o,v=n+l;t[4]=-p*a-d*v*s,t[5]=-v*s-f*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=s,t[1]=f*a,t[2]=d*s,u&&uc(t,t,u),t[4]+=i+c,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),os=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function s9(r,e){for(var t=0;t<os.length;t++){var i=os[t];r[i]=e[i]}}var VL={};function mn(r,e){e=e||Jo;var t=VL[e];t||(t=VL[e]=new Yv(500));var i=t.get(r);return i==null&&(i=el.measureText(r,e).width,t.put(r,i)),i}function zL(r,e,t,i){var n=mn(r,e),a=t1(e),s=ip(0,n,t),o=ah(0,a,i),l=new qe(s,o,n,a);return l}function Kv(r,e,t,i){var n=((r||"")+"").split(`
`),a=n.length;if(a===1)return zL(n[0],e,t,i);for(var s=new qe(0,0,0,0),o=0;o<n.length;o++){var l=zL(n[o],e,t,i);o===0?s.copy(l):s.union(l)}return s}function ip(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function ah(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function t1(r){return mn("国",r)}function ya(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function I0(r,e,t){var i=e.position||"inside",n=e.distance!=null?e.distance:5,a=t.height,s=t.width,o=a/2,l=t.x,u=t.y,c="left",h="top";if(i instanceof Array)l+=ya(i[0],t.width),u+=ya(i[1],t.height),c=null,h=null;else switch(i){case"left":l-=n,u+=o,c="right",h="middle";break;case"right":l+=n+s,u+=o,h="middle";break;case"top":l+=s/2,u-=n,c="center",h="bottom";break;case"bottom":l+=s/2,u+=a+n,c="center";break;case"inside":l+=s/2,u+=o,c="center",h="middle";break;case"insideLeft":l+=n,u+=o,h="middle";break;case"insideRight":l+=s-n,u+=o,c="right",h="middle";break;case"insideTop":l+=s/2,u+=n,c="center";break;case"insideBottom":l+=s/2,u+=a-n,c="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=s-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=s-n,u+=a-n,c="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=h,r}var cT="__zr_normal__",hT=os.concat(["ignore"]),Xle=as(os,function(r,e){return r[e]=!0,r},{ignore:!1}),Fc={},Yle=new qe(0,0,0,0),r1=function(){function r(e){this.id=RG(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=t.innerTransformable,s=void 0,o=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(t),i.position!=null){var c=Yle;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),n||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Fc,i,c):I0(Fc,i,c),a.x=Fc.x,a.y=Fc.y,s=Fc.align,o=Fc.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var d=void 0,f=void 0;h==="center"?(d=c.width*.5,f=c.height*.5):(d=ya(h[0],c.width),f=ya(h[1],c.height)),u=!0,a.originX=-a.x+d+(n?0:c.x),a.originY=-a.y+f+(n?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var p=i.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var v=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;v&&this.canBeInsideText()?(m=i.insideFill,y=i.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=i.outsideFill,y=i.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||s!==g.align||o!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=s,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=cn,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Hw:Gw},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&gn(t);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),s=0;s<3;s++)i[s]=i[s]*n+(a?0:255)*(1-n);return i[3]=1,Os(i,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},J(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(De(e))for(var i=e,n=rt(i),a=0;a<n.length;a++){var s=n[a];this.attrKV(s,e[s])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==cT)){var s=n.targetName,o=s?t[s]:t;n.saveTo(o)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,hT)},r.prototype._savePrimaryToNormal=function(e,t,i){for(var n=0;n<i.length;n++){var a=i[n];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(cT,!1,e)},r.prototype.useState=function(e,t,i,n){var a=e===cT,s=this.hasState();if(!(!s&&a)){var o=this.currentStates,l=this.stateTransition;if(!(Xe(o,e)>=0&&(t||o.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){$A("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,d=this._textGuide;return h&&h.useState(e,t,i,c),d&&d.useState(e,t,i,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~cn),u}}},r.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var n=[],a=this.currentStates,s=e.length,o=s===a.length;if(o){for(var l=0;l<s;l++)if(e[l]!==a[l]){o=!1;break}}if(o)return;for(var l=0;l<s;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&n.push(c)}var h=n[s-1],d=!!(h&&h.hoverLayer||i);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(n),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(","),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~cn)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=Xe(this.currentStates,e);if(t>=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},r.prototype.replaceState=function(e,t,i){var n=this.currentStates.slice(),a=Xe(n,e),s=Xe(n,t)>=0;a>=0?s?n.splice(a,1):n[a]=t:i&&!s&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},i,n=0;n<e.length;n++){var a=e[n];J(t,a),a.textConfig&&(i=i||{},J(i,a.textConfig))}return i&&(t.textConfig=i),t},r.prototype._applyStateObj=function(e,t,i,n,a,s){var o=!(t&&n);t&&t.textConfig?(this.textConfig=J({},n?this.textConfig:i.textConfig),J(this.textConfig,t.textConfig)):o&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<hT.length;c++){var h=hT[c],d=a&&Xle[h];t&&t[h]!=null?d?(u=!0,l[h]=t[h]):this[h]=t[h]:o&&i[h]!=null&&(d?(u=!0,l[h]=i[h]):this[h]=i[h])}if(!a)for(var c=0;c<this.animators.length;c++){var f=this.animators[c],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||i)[p]:t||i)}u&&this._transitionState(e,l,s)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Is,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),J(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=cn;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,i=this._textGuide;t&&(t.__inHover=e),i&&(i.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,i){var n=e?this[e]:this,a=new JA(n,t,i);return e&&(a.targetName=e),this.addAnimator(a,e),a},r.prototype.addAnimator=function(e,t){var i=this.__zr,n=this;e.during(function(){n.updateDuringAnimation(t)}).done(function(){var a=n.animators,s=Xe(a,e);s>=0&&a.splice(s,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var i=this.animators,n=i.length,a=[],s=0;s<n;s++){var o=i[s];!e||e===o.scope?o.stop(t):a.push(o)}return this.animators=a,this},r.prototype.animateTo=function(e,t,i){fT(this,e,t,i)},r.prototype.animateFrom=function(e,t,i){fT(this,e,t,i,!0)},r.prototype._transitionState=function(e,t,i,n){for(var a=fT(this,t,i,n),s=0;s<a.length;s++)a[s].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=cn;function t(i,n,a,s){Object.defineProperty(e,i,{get:function(){if(!this[n]){var l=this[n]=[];o(this,l)}return this[n]},set:function(l){this[a]=l[0],this[s]=l[1],this[n]=l,o(this,l)}});function o(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[s]},set:function(c){l[s]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),r}();_r(r1,Zn);_r(r1,Is);function fT(r,e,t,i,n){t=t||{};var a=[];o9(r,"",r,e,t,i,a,n);var s=a.length,o=!1,l=t.done,u=t.aborted,c=function(){o=!0,s--,s<=0&&(o?l&&l():u&&u())},h=function(){s--,s<=0&&(o?l&&l():u&&u())};s||l&&l(),a.length>0&&t.during&&a[0].during(function(p,v){t.during(v)});for(var d=0;d<a.length;d++){var f=a[d];c&&f.done(c),h&&f.aborted(h),t.force&&f.duration(t.duration),f.start(t.easing)}return a}function dT(r,e,t){for(var i=0;i<t;i++)r[i]=e[i]}function Kle(r){return li(r[0])}function Zle(r,e,t){if(li(e[t]))if(li(r[t])||(r[t]=[]),Ki(e[t])){var i=e[t].length;r[t].length!==i&&(r[t]=new e[t].constructor(i),dT(r[t],e[t],i))}else{var n=e[t],a=r[t],s=n.length;if(Kle(n))for(var o=n[0].length,l=0;l<s;l++)a[l]?dT(a[l],n[l],o):a[l]=Array.prototype.slice.call(n[l]);else dT(a,n,s);a.length=n.length}else r[t]=e[t]}function Qle(r,e){return r===e||li(r)&&li(e)&&Jle(r,e)}function Jle(r,e){var t=r.length;if(t!==e.length)return!1;for(var i=0;i<t;i++)if(r[i]!==e[i])return!1;return!0}function o9(r,e,t,i,n,a,s,o){for(var l=rt(i),u=n.duration,c=n.delay,h=n.additive,d=n.setToFinal,f=!De(a),p=r.animators,v=[],g=0;g<l.length;g++){var m=l[g],y=i[m];if(y!=null&&t[m]!=null&&(f||a[m]))if(De(y)&&!li(y)&&!Z_(y)){if(e){o||(t[m]=y,r.updateDuringAnimation(e));continue}o9(r,m,t[m],y,n,a&&a[m],s,o)}else v.push(m);else o||(t[m]=y,r.updateDuringAnimation(e),v.push(m))}var _=v.length;if(!h&&_)for(var b=0;b<p.length;b++){var S=p[b];if(S.targetName===e){var x=S.stopTracks(v);if(x){var C=Xe(p,S);p.splice(C,1)}}}if(n.force||(v=St(v,function(L){return!Qle(i[L],t[L])}),_=v.length),_>0||n.force&&!s.length){var D=void 0,I=void 0,M=void 0;if(o){I={},d&&(D={});for(var b=0;b<_;b++){var m=v[b];I[m]=t[m],d?D[m]=i[m]:t[m]=i[m]}}else if(d){M={};for(var b=0;b<_;b++){var m=v[b];M[m]=Pp(t[m]),Zle(t,i,m)}}var S=new JA(t,!1,!1,h?St(p,function(N){return N.targetName===e}):null);S.targetName=e,n.scope&&(S.scope=n.scope),d&&D&&S.whenWithKeys(0,D,v),M&&S.whenWithKeys(0,M,v),S.whenWithKeys(u??500,o?I:i,v).delay(c||0),r.addAnimator(S,e),s.push(S)}}var Le=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var i=this._children,n=0;n<i.length;n++)if(i[n].name===t)return i[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,i){if(t&&t!==this&&t.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var n=Xe(this._children,t);return n>=0&&this.replaceAt(i,n),this},e.prototype.replaceAt=function(t,i){var n=this._children,a=n[i];if(t&&t!==this&&t.parent!==this&&t!==a){n[i]=t,a.parent=null;var s=this.__zr;s&&a.removeSelfFromZr(s),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,n=this._children,a=Xe(n,t);return a<0?this:(n.splice(a,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,n=0;n<t.length;n++){var a=t[n];i&&a.removeSelfFromZr(i),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,i){for(var n=this._children,a=0;a<n.length;a++){var s=n[a];t.call(i,s,a)}return this},e.prototype.traverse=function(t,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],s=t.call(i,a);a.isGroup&&!s&&a.traverse(t,i)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var i=new qe(0,0,0,0),n=t||this._children,a=[],s=null,o=0;o<n.length;o++){var l=n[o];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(qe.applyTransform(i,u,c),s=s||i.clone(),s.union(i)):(s=s||u.clone(),s.union(u))}}return s||i},e}(r1);Le.prototype.type="group";/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var by={},l9={};function eue(r){delete l9[r]}function tue(r){if(!r)return!1;if(typeof r=="string")return A0(r,1)<zw;if(r.colorStops){for(var e=r.colorStops,t=0,i=e.length,n=0;n<i;n++)t+=A0(e[n].color,1);return t/=i,t<zw}return!1}var rue=function(){function r(e,t,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=t,this.id=e;var a=new mle,s=i.renderer||"canvas";by[s]||(s=rt(by)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var o=new by[s](t,a,i,e),l=i.ssr||o.ssrOnly;this.storage=a,this.painter=o;var u=!et.node&&!et.worker&&!l?new qle(o.getViewportRoot(),o.root):null,c=i.useCoarsePointer,h=c==null||c==="auto"?et.touchEventsSupported:!!c,d=44,f;h&&(f=Be(i.pointerSize,d)),this.handler=new VG(a,o,u,o.root,f),this.animation=new Ule({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=tue(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,i=gh();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var n=gh();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Le&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,eue(this.id))},r}();function GL(r,e){var t=new rue(RG(),r,e);return l9[t.id]=t,t}function iue(r,e){by[r]=e}var $w;function nue(r){if(typeof $w=="function")return $w(r)}function aue(r){$w=r}var HL=1e-4,u9=20;function sue(r){return r.replace(/^\s+|\s+$/g,"")}function bt(r,e,t,i){var n=e[0],a=e[1],s=t[0],o=t[1],l=a-n,u=o-s;if(l===0)return u===0?s:(s+o)/2;if(i)if(l>0){if(r<=n)return s;if(r>=a)return o}else{if(r>=n)return s;if(r<=a)return o}else{if(r===n)return s;if(r===a)return o}return(r-n)/l*u+s}function ce(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return pe(r)?sue(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function er(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),u9),r=(+r).toFixed(e),t?r:+r}function Hn(r){return r.sort(function(e,t){return e-t}),r}function Wa(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return oue(r)}function oue(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,n=t>0?t:e.length,a=e.indexOf("."),s=a<0?0:n-1-a;return Math.max(0,s-i)}function c9(r,e){var t=Math.log,i=Math.LN10,n=Math.floor(t(r[1]-r[0])/i),a=Math.round(t(Math.abs(e[1]-e[0]))/i),s=Math.min(Math.max(-n+a,0),20);return isFinite(s)?s:20}function lue(r,e){var t=as(r,function(f,p){return f+(isNaN(p)?0:p)},0);if(t===0)return[];for(var i=Math.pow(10,e),n=oe(r,function(f){return(isNaN(f)?0:f)/t*i*100}),a=i*100,s=oe(n,function(f){return Math.floor(f)}),o=as(s,function(f,p){return f+p},0),l=oe(n,function(f,p){return f-s[p]});o<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,d=l.length;h<d;++h)l[h]>u&&(u=l[h],c=h);++s[c],l[c]=0,++o}return oe(s,function(f){return f/i})}function uue(r,e){var t=Math.max(Wa(r),Wa(e)),i=r+e;return t>u9?i:er(i,t)}var $L=9007199254740991;function h9(r){var e=Math.PI*2;return(r%e+e)%e}function hv(r){return r>-HL&&r<HL}var cue=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function ls(r){if(r instanceof Date)return r;if(pe(r)){var e=cue.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function hue(r){return Math.pow(10,eD(r))}function eD(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function f9(r,e){var t=eD(r),i=Math.pow(10,t),n=r/i,a;return n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10,r=a*i,t>=-20?+r.toFixed(t<0?-t:0):r}function pT(r,e){var t=(r.length-1)*e+1,i=Math.floor(t),n=+r[i-1],a=t-i;return a?n+a*(r[i]-n):n}function WL(r){r.sort(function(l,u){return o(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,s=0;s<2;s++)n[s]<=e&&(n[s]=e,a[s]=s?1:1-t),e=n[s],t=a[s];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}return r;function o(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&o(l,u,1))}}function Ws(r){var e=parseFloat(r);return e==r&&(e!==0||!pe(r)||r.indexOf("x")<=0)?e:NaN}function d9(r){return!isNaN(Ws(r))}function p9(){return Math.round(Math.random()*9)}function v9(r,e){return e===0?r:v9(e,r%e)}function qL(r,e){return r==null?e:e==null?r:r*e/v9(r,e)}function vt(r){throw new Error(r)}function jL(r,e,t){return(e-r)*t+r}var g9="series\0",m9="\0_ec_\0";function xt(r){return r instanceof Array?r:r==null?[]:[r]}function Ju(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var i=0,n=t.length;i<n;i++){var a=t[i];!r.emphasis[e].hasOwnProperty(a)&&r[e].hasOwnProperty(a)&&(r.emphasis[e][a]=r[e][a])}}}var XL=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Pf(r){return De(r)&&!ie(r)&&!(r instanceof Date)?r.value:r}function fue(r){return De(r)&&!(r instanceof Array)}function y9(r,e,t){var i=t==="normalMerge",n=t==="replaceMerge",a=t==="replaceAll";r=r||[],e=(e||[]).slice();var s=be();R(e,function(l,u){if(!De(l)){e[u]=null;return}});var o=due(r,s,t);return(i||n)&&pue(o,r,s,e),i&&vue(o,e),i||n?gue(o,e,n):a&&mue(o,e),yue(o),o}function due(r,e,t){var i=[];if(t==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&e.set(a.id,n),i.push({existing:t==="replaceMerge"||fv(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function pue(r,e,t,i){R(i,function(n,a){if(!(!n||n.id==null)){var s=Mp(n.id),o=t.get(s);if(o!=null){var l=r[o];Ai(!l.newOption,'Duplicated option on id "'+s+'".'),l.newOption=n,l.existing=e[o],i[a]=null}}})}function vue(r,e){R(e,function(t,i){if(!(!t||t.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||t.id==null)&&!fv(t)&&!fv(a)&&_9("name",a,t)){r[n].newOption=t,e[i]=null;return}}})}function gue(r,e,t){R(e,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||fv(n.existing)||n.existing&&i.id!=null&&!_9("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=t):r.push({newOption:i,brandNew:t,existing:null,keyInfo:null}),a++}})}function mue(r,e){R(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function yue(r){var e=be();R(r,function(t){var i=t.existing;i&&e.set(i.id,t)}),R(r,function(t){var i=t.newOption;Ai(!i||i.id==null||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),R(r,function(t,i){var n=t.existing,a=t.newOption,s=t.keyInfo;if(De(a)){if(s.name=a.name!=null?Mp(a.name):n?n.name:g9+i,n)s.id=Mp(n.id);else if(a.id!=null)s.id=Mp(a.id);else{var o=0;do s.id="\0"+s.name+"\0"+o++;while(e.get(s.id))}e.set(s.id,t)}})}function _9(r,e,t){var i=wr(e[r],null),n=wr(t[r],null);return i!=null&&n!=null&&i===n}function Mp(r){return wr(r,"")}function wr(r,e){return r==null?e:pe(r)?r:ut(r)||Sw(r)?r+"":e}function tD(r){var e=r.name;return!!(e&&e.indexOf(g9))}function fv(r){return r&&r.id!=null&&Mp(r.id).indexOf(m9)===0}function _ue(r){return m9+r}function bue(r,e,t){R(r,function(i){var n=i.newOption;De(n)&&(i.keyInfo.mainType=e,i.keyInfo.subType=Tue(e,n,i.existing,t))})}function Tue(r,e,t,i){var n=e.type?e.type:t?t.subType:i.determineSubType(r,e);return n}function Sue(r,e){var t={},i={};return n(r||[],t),n(e||[],i,t),[a(t),a(i)];function n(s,o,l){for(var u=0,c=s.length;u<c;u++){var h=wr(s[u].seriesId,null);if(h==null)return;for(var d=xt(s[u].dataIndex),f=l&&l[h],p=0,v=d.length;p<v;p++){var g=d[p];f&&f[g]?f[g]=null:(o[h]||(o[h]={}))[g]=1}}}function a(s,o){var l=[];for(var u in s)if(s.hasOwnProperty(u)&&s[u]!=null)if(o)l.push(+u);else{var c=a(s[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function ec(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return ie(e.dataIndex)?oe(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return ie(e.name)?oe(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function ot(){var r="__ec_inner_"+xue++;return function(e){return e[r]||(e[r]={})}}var xue=p9();function Lp(r,e,t){var i=rD(e,t),n=i.mainTypeSpecified,a=i.queryOptionMap,s=i.others,o=s,l=t?t.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,c){var h=Zv(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});o[c+"Models"]=h.models,o[c+"Model"]=h.models[0]}),o}function rD(r,e){var t;if(pe(r)){var i={};i[r+"Index"]=0,t=i}else t=r;var n=be(),a={},s=!1;return R(t,function(o,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=o;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();if(!(!c||!h||e&&e.includeMainTypes&&Xe(e.includeMainTypes,c)<0)){s=s||!!c;var d=n.get(c)||n.set(c,{});d[h]=o}}),{mainTypeSpecified:s,queryOptionMap:n,others:a}}var mr={useDefault:!0,enableAll:!1,enableNone:!1},wue={useDefault:!1,enableAll:!0,enableNone:!0};function Zv(r,e,t,i){i=i||mr;var n=t.index,a=t.id,s=t.name,o={models:null,specified:n!=null||a!=null||s!=null};if(!o.specified){var l=void 0;return o.models=i.useDefault&&(l=r.getComponent(e))?[l]:[],o}return n==="none"||n===!1?(Ai(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),o.models=[],o):(n==="all"&&(Ai(i.enableAll,'`"all"` is not a valid value on index option.'),n=a=s=null),o.models=r.queryComponents({mainType:e,index:n,id:a,name:s}),o)}function b9(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function Cue(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function Aue(r){return r==="auto"?et.domSupported?"html":"richText":r||"html"}function Ww(r,e){var t=be(),i=[];return R(r,function(n){var a=e(n);(t.get(a)||(i.push(a),t.set(a,[]))).push(n)}),{keys:i,buckets:t}}function T9(r,e,t,i,n){var a=e==null||e==="auto";if(i==null)return i;if(ut(i)){var s=jL(t||0,i,n);return er(s,a?Math.max(Wa(t||0),Wa(i)):e)}else{if(pe(i))return n<1?t:i;for(var o=[],l=t,u=i,c=Math.max(l?l.length:0,u.length),h=0;h<c;++h){var d=r.getDimensionInfo(h);if(d&&d.type==="ordinal")o[h]=(n<1&&l?l:u)[h];else{var f=l&&l[h]?l[h]:0,p=u[h],s=jL(f,p,n);o[h]=er(s,a?Math.max(Wa(f),Wa(p)):e)}}return o}}var Due=".",kl="___EC__COMPONENT__CONTAINER___",S9="___EC__EXTENDED_CLASS___";function qa(r){var e={main:"",sub:""};if(r){var t=r.split(Due);e.main=t[0]||"",e.sub=t[1]||""}return e}function Eue(r){Ai(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function Iue(r){return!!(r&&r[S9])}function iD(r,e){r.$constructor=r,r.extend=function(t){var i=this,n;return Pue(i)?n=function(a){j(s,a);function s(){return a.apply(this,arguments)||this}return s}(i):(n=function(){(t.$constructor||i).apply(this,arguments)},Foe(n,this)),J(n.prototype,t),n[S9]=!0,n.extend=this.extend,n.superCall=kue,n.superApply=Rue,n.superClass=i,n}}function Pue(r){return we(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function x9(r,e){r.extend=e.extend}var Mue=Math.round(Math.random()*10);function Lue(r){var e=["__\0is_clz",Mue++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function kue(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return this.superClass.prototype[e].apply(r,t)}function Rue(r,e,t){return this.superClass.prototype[e].apply(r,t)}function i1(r){var e={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){Eue(n),i.prototype.type=n;var a=qa(n);if(!a.sub)e[a.main]=i;else if(a.sub!==kl){var s=t(a);s[a.sub]=i}}return i},r.getClass=function(i,n,a){var s=e[i];if(s&&s[kl]&&(s=n?s[n]:null),a&&!s)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return s},r.getClassesByMainType=function(i){var n=qa(i),a=[],s=e[n.main];return s&&s[kl]?R(s,function(o,l){l!==kl&&a.push(o)}):a.push(s),a},r.hasClass=function(i){var n=qa(i);return!!e[n.main]},r.getAllClassMainTypes=function(){var i=[];return R(e,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=qa(i),a=e[n.main];return a&&a[kl]};function t(i){var n=e[i.main];return(!n||!n[kl])&&(n=e[i.main]={},n[kl]=!0),n}}function tc(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(i,n,a){for(var s={},o=0;o<r.length;o++){var l=r[o][1];if(!(n&&Xe(n,l)>=0||a&&Xe(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(s[r[o][0]]=u)}}return s}}var Oue=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Nue=tc(Oue),Bue=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Nue(this,e,t)},r}(),qw=new Yv(50);function Fue(r){if(typeof r=="string"){var e=qw.get(r);return e&&e.image}else return r}function nD(r,e,t,i,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=qw.get(r),s={hostEl:t,cb:i,cbPayload:n};return a?(e=a.image,!n1(e)&&a.pending.push(s)):(e=el.loadImage(r,YL,YL),e.__zrImageSrc=r,qw.put(r,e.__cachedImgObj={image:e,pending:[s]})),e}else return r;else return e}function YL(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],i=t.cb;i&&i(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function n1(r){return r&&r.width&&r.height}var vT=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Uue(r,e,t,i,n){if(!e)return"";var a=(r+"").split(`
`);n=w9(e,t,i,n);for(var s=0,o=a.length;s<o;s++)a[s]=C9(a[s],n);return a.join(`
`)}function w9(r,e,t,i){i=i||{};var n=J({},i);n.font=e,t=Be(t,"..."),n.maxIterations=Be(i.maxIterations,2);var a=n.minChar=Be(i.minChar,0);n.cnCharWidth=mn("国",e);var s=n.ascCharWidth=mn("a",e);n.placeholder=Be(i.placeholder,"");for(var o=r=Math.max(0,r-1),l=0;l<a&&o>=s;l++)o-=s;var u=mn(t,e);return u>o&&(t="",u=0),o=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=o,n.containerWidth=r,n}function C9(r,e){var t=e.containerWidth,i=e.font,n=e.contentWidth;if(!t)return"";var a=mn(r,i);if(a<=t)return r;for(var s=0;;s++){if(a<=n||s>=e.maxIterations){r+=e.ellipsis;break}var o=s===0?Vue(r,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(r.length*n/a):0;r=r.substr(0,o),a=mn(r,i)}return r===""&&(r=e.placeholder),r}function Vue(r,e,t,i){for(var n=0,a=0,s=r.length;a<s&&n<e;a++){var o=r.charCodeAt(a);n+=0<=o&&o<=127?t:i}return a}function zue(r,e){r!=null&&(r+="");var t=e.overflow,i=e.padding,n=e.font,a=t==="truncate",s=t1(n),o=Be(e.lineHeight,s),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=e.width,h;c!=null&&(t==="break"||t==="breakAll")?h=r?A9(r,e.font,c,t==="breakAll",0).lines:[]:h=r?r.split(`
`):[];var d=h.length*o,f=Be(e.height,d);if(d>f&&u){var p=Math.floor(f/o);h=h.slice(0,p)}if(r&&a&&c!=null)for(var v=w9(c,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;g<h.length;g++)h[g]=C9(h[g],v);for(var m=f,y=0,g=0;g<h.length;g++)y=Math.max(mn(h[g],n),y);c==null&&(c=y);var _=y;return i&&(m+=i[0]+i[2],_+=i[1]+i[3],c+=i[1]+i[3]),l&&(_=c),{lines:h,height:f,outerWidth:_,outerHeight:m,lineHeight:o,calculatedLineHeight:s,contentWidth:y,contentHeight:d,width:c}}var Gue=function(){function r(){}return r}(),KL=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),Hue=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return r}();function $ue(r,e){var t=new Hue;if(r!=null&&(r+=""),!r)return t;for(var i=e.width,n=e.height,a=e.overflow,s=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,o=vT.lastIndex=0,l;(l=vT.exec(r))!=null;){var u=l.index;u>o&&gT(t,r.substring(o,u),e,s),gT(t,l[2],e,s,l[1]),o=vT.lastIndex}o<r.length&&gT(t,r.substring(o,r.length),e,s);var c=[],h=0,d=0,f=e.padding,p=a==="truncate",v=e.lineOverflow==="truncate";function g(q,Z,te){q.width=Z,q.lineHeight=te,h+=te,d=Math.max(d,Z)}e:for(var m=0;m<t.lines.length;m++){for(var y=t.lines[m],_=0,b=0,S=0;S<y.tokens.length;S++){var x=y.tokens[S],C=x.styleName&&e.rich[x.styleName]||{},D=x.textPadding=C.padding,I=D?D[1]+D[3]:0,M=x.font=C.font||e.font;x.contentHeight=t1(M);var L=Be(C.height,x.contentHeight);if(x.innerHeight=L,D&&(L+=D[0]+D[2]),x.height=L,x.lineHeight=Qa(C.lineHeight,e.lineHeight,L),x.align=C&&C.align||e.align,x.verticalAlign=C&&C.verticalAlign||"middle",v&&n!=null&&h+x.lineHeight>n){S>0?(y.tokens=y.tokens.slice(0,S),g(y,b,_),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m);break e}var N=C.width,O=N==null||N==="auto";if(typeof N=="string"&&N.charAt(N.length-1)==="%")x.percentWidth=N,c.push(x),x.contentWidth=mn(x.text,M);else{if(O){var B=C.backgroundColor,F=B&&B.image;F&&(F=Fue(F),n1(F)&&(x.width=Math.max(x.width,F.width*L/F.height)))}var U=p&&i!=null?i-b:null;U!=null&&U<x.width?!O||U<I?(x.text="",x.width=x.contentWidth=0):(x.text=Uue(x.text,U-I,M,e.ellipsis,{minChar:e.truncateMinChar}),x.width=x.contentWidth=mn(x.text,M)):x.contentWidth=mn(x.text,M)}x.width+=I,b+=x.width,C&&(_=Math.max(_,x.lineHeight))}g(y,b,_)}t.outerWidth=t.width=Be(i,d),t.outerHeight=t.height=Be(n,h),t.contentHeight=h,t.contentWidth=d,f&&(t.outerWidth+=f[1]+f[3],t.outerHeight+=f[0]+f[2]);for(var m=0;m<c.length;m++){var x=c[m],$=x.percentWidth;x.width=parseInt($,10)/100*t.width}return t}function gT(r,e,t,i,n){var a=e==="",s=n&&t.rich[n]||{},o=r.lines,l=s.font||t.font,u=!1,c,h;if(i){var d=s.padding,f=d?d[1]+d[3]:0;if(s.width!=null&&s.width!=="auto"){var p=ya(s.width,i.width)+f;o.length>0&&p+i.accumWidth>i.width&&(c=e.split(`
`),u=!0),i.accumWidth=p}else{var v=A9(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=v.accumWidth+f,h=v.linesWidths,c=v.lines}}else c=e.split(`
`);for(var g=0;g<c.length;g++){var m=c[g],y=new Gue;if(y.styleName=n,y.text=m,y.isLineHolder=!m&&!a,typeof s.width=="number"?y.width=s.width:y.width=h?h[g]:mn(m,l),!g&&!u){var _=(o[o.length-1]||(o[0]=new KL)).tokens,b=_.length;b===1&&_[0].isLineHolder?_[0]=y:(m||!b||a)&&_.push(y)}else o.push(new KL([y]))}}function Wue(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var que=as(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function jue(r){return Wue(r)?!!que[r]:!0}function A9(r,e,t,i,n){for(var a=[],s=[],o="",l="",u=0,c=0,h=0;h<r.length;h++){var d=r.charAt(h);if(d===`
`){l&&(o+=l,c+=u),a.push(o),s.push(c),o="",l="",u=0,c=0;continue}var f=mn(d,e),p=i?!1:!jue(d);if(a.length?c+f>t:n+c+f>t){c?(o||l)&&(p?(o||(o=l,l="",u=0,c=u),a.push(o),s.push(c-u),l+=d,u+=f,o="",c=u):(l&&(o+=l,l="",u=0),a.push(o),s.push(c),o=d,c=f)):p?(a.push(l),s.push(u),l=d,u=f):(a.push(d),s.push(f));continue}c+=f,p?(l+=d,u+=f):(l&&(o+=l,l="",u=0),o+=d)}return!a.length&&!o&&(o=r,l="",u=0),l&&(o+=l),o&&(a.push(o),s.push(c)),a.length===1&&(c+=n),{accumWidth:c,lines:a,linesWidths:s}}var jw="__zr_style_"+Math.round(Math.random()*10),Uu={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},a1={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Uu[jw]=!0;var ZL=["z","z2","invisible"],Xue=["invisible"],Yn=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var i=rt(t),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(t[a]):r.prototype.attrKV.call(this,a,t[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,i,n,a){var s=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Yue(this,t,i)||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths){for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,i){return this.rectContain(t,i)},e.prototype.traverse=function(t,i){t.call(i,this)},e.prototype.rectContain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,s=a.shadowBlur||0,o=a.shadowOffsetX||0,l=a.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new qe(0,0,0,0)),i?qe.applyTransform(t,n,i):t.copy(n),(s||o||l)&&(t.width+=s*2+Math.abs(o),t.height+=s*2+Math.abs(l),t.x=Math.min(t.x,t.x+o-s),t.y=Math.min(t.y,t.y+l-s));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new qe(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,i){t!=="style"?r.prototype.attrKV.call(this,t,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(t,i){return typeof t=="string"?this.style[t]=i:J(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=tp,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&tp)},e.prototype.styleUpdated=function(){this.__dirty&=~tp},e.prototype.createStyle=function(t){return Q_(Uu,t)},e.prototype.useStyle=function(t){t[jw]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[jw]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,i,ZL)},e.prototype._applyStateObj=function(t,i,n,a,s,o){r.prototype._applyStateObj.call(this,t,i,n,a,s,o);var l=!(i&&a),u;if(i&&i.style?s?a?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(s){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var h=rt(c),d=0;d<h.length;d++){var f=h[d];f in u&&(u[f]=u[f],this.style[f]=c[f])}for(var p=rt(u),d=0;d<p.length;d++){var f=p[d];this.style[f]=this.style[f]}this._transitionState(t,{style:u},o,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?Xue:ZL,d=0;d<v.length;d++){var f=v[d];i&&i[f]!=null?this[f]=i[f]:l&&n[f]!=null&&(this[f]=n[f])}},e.prototype._mergeStates=function(t){for(var i=r.prototype._mergeStates.call(this,t),n,a=0;a<t.length;a++){var s=t[a];s.style&&(n=n||{},this._mergeStyle(n,s.style))}return n&&(i.style=n),i},e.prototype._mergeStyle=function(t,i){return J(t,i),t},e.prototype.getAnimationStyleProps=function(){return a1},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=cn|tp}(),e}(r1),mT=new qe(0,0,0,0),yT=new qe(0,0,0,0);function Yue(r,e,t){return mT.copy(r.getBoundingRect()),r.transform&&mT.applyTransform(r.transform),yT.width=e,yT.height=t,!mT.intersect(yT)}var Fi=Math.min,Ui=Math.max,_T=Math.sin,bT=Math.cos,Rl=Math.PI*2,um=lc(),cm=lc(),hm=lc();function s1(r,e,t){if(r.length!==0){for(var i=r[0],n=i[0],a=i[0],s=i[1],o=i[1],l=1;l<r.length;l++)i=r[l],n=Fi(n,i[0]),a=Ui(a,i[0]),s=Fi(s,i[1]),o=Ui(o,i[1]);e[0]=n,e[1]=s,t[0]=a,t[1]=o}}function QL(r,e,t,i,n,a){n[0]=Fi(r,t),n[1]=Fi(e,i),a[0]=Ui(r,t),a[1]=Ui(e,i)}var JL=[],ek=[];function Kue(r,e,t,i,n,a,s,o,l,u){var c=WG,h=Mr,d=c(r,t,n,s,JL);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var f=0;f<d;f++){var p=h(r,t,n,s,JL[f]);l[0]=Fi(p,l[0]),u[0]=Ui(p,u[0])}d=c(e,i,a,o,ek);for(var f=0;f<d;f++){var v=h(e,i,a,o,ek[f]);l[1]=Fi(v,l[1]),u[1]=Ui(v,u[1])}l[0]=Fi(r,l[0]),u[0]=Ui(r,u[0]),l[0]=Fi(s,l[0]),u[0]=Ui(s,u[0]),l[1]=Fi(e,l[1]),u[1]=Ui(e,u[1]),l[1]=Fi(o,l[1]),u[1]=Ui(o,u[1])}function Zue(r,e,t,i,n,a,s,o){var l=jG,u=Ur,c=Ui(Fi(l(r,t,n),1),0),h=Ui(Fi(l(e,i,a),1),0),d=u(r,t,n,c),f=u(e,i,a,h);s[0]=Fi(r,n,d),s[1]=Fi(e,a,f),o[0]=Ui(r,n,d),o[1]=Ui(e,a,f)}function Que(r,e,t,i,n,a,s,o,l){var u=Oo,c=No,h=Math.abs(n-a);if(h%Rl<1e-4&&h>1e-4){o[0]=r-t,o[1]=e-i,l[0]=r+t,l[1]=e+i;return}if(um[0]=bT(n)*t+r,um[1]=_T(n)*i+e,cm[0]=bT(a)*t+r,cm[1]=_T(a)*i+e,u(o,um,cm),c(l,um,cm),n=n%Rl,n<0&&(n=n+Rl),a=a%Rl,a<0&&(a=a+Rl),n>a&&!s?a+=Rl:n<a&&s&&(n+=Rl),s){var d=a;a=n,n=d}for(var f=0;f<a;f+=Math.PI/2)f>n&&(hm[0]=bT(f)*t+r,hm[1]=_T(f)*i+e,u(o,hm,o),c(l,hm,l))}var Et={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ol=[],Nl=[],Aa=[],po=[],Da=[],Ea=[],TT=Math.min,ST=Math.max,Bl=Math.cos,Fl=Math.sin,gs=Math.abs,Xw=Math.PI,xo=Xw*2,xT=typeof Float32Array<"u",yd=[];function wT(r){var e=Math.round(r/Xw*1e8)/1e8;return e%2*Xw}function aD(r,e){var t=wT(r[0]);t<0&&(t+=xo);var i=t-r[0],n=r[1];n+=i,!e&&n-t>=xo?n=t+xo:e&&t-n>=xo?n=t-xo:!e&&t>n?n=t+(xo-wT(t-n)):e&&t<n&&(n=t-(xo-wT(n-t))),r[0]=t,r[1]=n}var us=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,i){i=i||0,i>0&&(this._ux=gs(i/E0/e)||0,this._uy=gs(i/E0/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Et.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var i=gs(e-this._xi),n=gs(t-this._yi),a=i>this._ux||n>this._uy;if(this.addData(Et.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var s=i*i+n*n;s>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=s)}return this},r.prototype.bezierCurveTo=function(e,t,i,n,a,s){return this._drawPendingPt(),this.addData(Et.C,e,t,i,n,a,s),this._ctx&&this._ctx.bezierCurveTo(e,t,i,n,a,s),this._xi=a,this._yi=s,this},r.prototype.quadraticCurveTo=function(e,t,i,n){return this._drawPendingPt(),this.addData(Et.Q,e,t,i,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(e,t,i,n,a,s){this._drawPendingPt(),yd[0]=n,yd[1]=a,aD(yd,s),n=yd[0],a=yd[1];var o=a-n;return this.addData(Et.A,e,t,i,i,n,o,0,s?0:1),this._ctx&&this._ctx.arc(e,t,i,n,a,s),this._xi=Bl(a)*i+e,this._yi=Fl(a)*i+t,this},r.prototype.arcTo=function(e,t,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,n,a),this},r.prototype.rect=function(e,t,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,n),this.addData(Et.R,e,t,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Et.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&xT&&(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,n=this._len,a=0;a<t;a++)i+=e[a].len();xT&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;a<t;a++)for(var s=e[a].data,o=0;o<s.length;o++)this.data[n++]=s[o];this._len=n},r.prototype.addData=function(e,t,i,n,a,s,o,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,xT&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Aa[0]=Aa[1]=Da[0]=Da[1]=Number.MAX_VALUE,po[0]=po[1]=Ea[0]=Ea[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,n=0,a=0,s;for(s=0;s<this._len;){var o=e[s++],l=s===1;switch(l&&(t=e[s],i=e[s+1],n=t,a=i),o){case Et.M:t=n=e[s++],i=a=e[s++],Da[0]=n,Da[1]=a,Ea[0]=n,Ea[1]=a;break;case Et.L:QL(t,i,e[s],e[s+1],Da,Ea),t=e[s++],i=e[s++];break;case Et.C:Kue(t,i,e[s++],e[s++],e[s++],e[s++],e[s],e[s+1],Da,Ea),t=e[s++],i=e[s++];break;case Et.Q:Zue(t,i,e[s++],e[s++],e[s],e[s+1],Da,Ea),t=e[s++],i=e[s++];break;case Et.A:var u=e[s++],c=e[s++],h=e[s++],d=e[s++],f=e[s++],p=e[s++]+f;s+=1;var v=!e[s++];l&&(n=Bl(f)*h+u,a=Fl(f)*d+c),Que(u,c,h,d,f,p,v,Da,Ea),t=Bl(p)*h+u,i=Fl(p)*d+c;break;case Et.R:n=t=e[s++],a=i=e[s++];var g=e[s++],m=e[s++];QL(n,a,n+g,a+m,Da,Ea);break;case Et.Z:t=n,i=a;break}Oo(Aa,Aa,Da),No(po,po,Ea)}return s===0&&(Aa[0]=Aa[1]=po[0]=po[1]=0),new qe(Aa[0],Aa[1],po[0]-Aa[0],po[1]-Aa[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,i=this._ux,n=this._uy,a=0,s=0,o=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(a=e[d],s=e[d+1],o=a,l=s);var v=-1;switch(f){case Et.M:a=o=e[d++],s=l=e[d++];break;case Et.L:{var g=e[d++],m=e[d++],y=g-a,_=m-s;(gs(y)>i||gs(_)>n||d===t-1)&&(v=Math.sqrt(y*y+_*_),a=g,s=m);break}case Et.C:{var b=e[d++],S=e[d++],g=e[d++],m=e[d++],x=e[d++],C=e[d++];v=yle(a,s,b,S,g,m,x,C,10),a=x,s=C;break}case Et.Q:{var b=e[d++],S=e[d++],g=e[d++],m=e[d++];v=ble(a,s,b,S,g,m,10),a=g,s=m;break}case Et.A:var D=e[d++],I=e[d++],M=e[d++],L=e[d++],N=e[d++],O=e[d++],B=O+N;d+=1,p&&(o=Bl(N)*M+D,l=Fl(N)*L+I),v=ST(M,L)*TT(xo,Math.abs(O)),a=Bl(B)*M+D,s=Fl(B)*L+I;break;case Et.R:{o=a=e[d++],l=s=e[d++];var F=e[d++],U=e[d++];v=F*2+U*2;break}case Et.Z:{var y=o-a,_=l-s;v=Math.sqrt(y*y+_*_),a=o,s=l;break}}v>=0&&(u[h++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var i=this.data,n=this._ux,a=this._uy,s=this._len,o,l,u,c,h,d,f=t<1,p,v,g=0,m=0,y,_=0,b,S;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,y=t*v,!y)))e:for(var x=0;x<s;){var C=i[x++],D=x===1;switch(D&&(u=i[x],c=i[x+1],o=u,l=c),C!==Et.L&&_>0&&(e.lineTo(b,S),_=0),C){case Et.M:o=u=i[x++],l=c=i[x++],e.moveTo(u,c);break;case Et.L:{h=i[x++],d=i[x++];var I=gs(h-u),M=gs(d-c);if(I>n||M>a){if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;e.lineTo(u*(1-N)+h*N,c*(1-N)+d*N);break e}g+=L}e.lineTo(h,d),u=h,c=d,_=0}else{var O=I*I+M*M;O>_&&(b=h,S=d,_=O)}break}case Et.C:{var B=i[x++],F=i[x++],U=i[x++],$=i[x++],q=i[x++],Z=i[x++];if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;tl(u,B,U,q,N,Ol),tl(c,F,$,Z,N,Nl),e.bezierCurveTo(Ol[1],Nl[1],Ol[2],Nl[2],Ol[3],Nl[3]);break e}g+=L}e.bezierCurveTo(B,F,U,$,q,Z),u=q,c=Z;break}case Et.Q:{var B=i[x++],F=i[x++],U=i[x++],$=i[x++];if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;lv(u,B,U,N,Ol),lv(c,F,$,N,Nl),e.quadraticCurveTo(Ol[1],Nl[1],Ol[2],Nl[2]);break e}g+=L}e.quadraticCurveTo(B,F,U,$),u=U,c=$;break}case Et.A:var te=i[x++],Q=i[x++],se=i[x++],he=i[x++],ue=i[x++],Ie=i[x++],Oe=i[x++],Fe=!i[x++],me=se>he?se:he,ze=gs(se-he)>.001,Pe=ue+Ie,ye=!1;if(f){var L=p[m++];g+L>y&&(Pe=ue+Ie*(y-g)/L,ye=!0),g+=L}if(ze&&e.ellipse?e.ellipse(te,Q,se,he,Oe,ue,Pe,Fe):e.arc(te,Q,me,ue,Pe,Fe),ye)break e;D&&(o=Bl(ue)*se+te,l=Fl(ue)*he+Q),u=Bl(Pe)*se+te,c=Fl(Pe)*he+Q;break;case Et.R:o=u=i[x],l=c=i[x+1],h=i[x++],d=i[x++];var Me=i[x++],_t=i[x++];if(f){var L=p[m++];if(g+L>y){var Re=y-g;e.moveTo(h,d),e.lineTo(h+TT(Re,Me),d),Re-=Me,Re>0&&e.lineTo(h+Me,d+TT(Re,_t)),Re-=_t,Re>0&&e.lineTo(h+ST(Me-Re,0),d+_t),Re-=Me,Re>0&&e.lineTo(h,d+ST(_t-Re,0));break e}g+=L}e.rect(h,d,Me,_t);break;case Et.Z:if(f){var L=p[m++];if(g+L>y){var N=(y-g)/L;e.lineTo(u*(1-N)+o*N,c*(1-N)+l*N);break e}g+=L}e.closePath(),u=o,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=Et,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Eo(r,e,t,i,n,a,s){if(n===0)return!1;var o=n,l=0,u=r;if(s>e+o&&s>i+o||s<e-o&&s<i-o||a>r+o&&a>t+o||a<r-o&&a<t-o)return!1;if(r!==t)l=(e-i)/(r-t),u=(r*i-t*e)/(r-t);else return Math.abs(a-r)<=o/2;var c=l*a-s+u,h=c*c/(l*l+1);return h<=o/2*o/2}function Jue(r,e,t,i,n,a,s,o,l,u,c){if(l===0)return!1;var h=l;if(c>e+h&&c>i+h&&c>a+h&&c>o+h||c<e-h&&c<i-h&&c<a-h&&c<o-h||u>r+h&&u>t+h&&u>n+h&&u>s+h||u<r-h&&u<t-h&&u<n-h&&u<s-h)return!1;var d=qG(r,e,t,i,n,a,s,o,u,c,null);return d<=h/2}function D9(r,e,t,i,n,a,s,o,l){if(s===0)return!1;var u=s;if(l>e+u&&l>i+u&&l>a+u||l<e-u&&l<i-u&&l<a-u||o>r+u&&o>t+u&&o>n+u||o<r-u&&o<t-u&&o<n-u)return!1;var c=XG(r,e,t,i,n,a,o,l,null);return c<=u/2}var tk=Math.PI*2;function fn(r){return r%=tk,r<0&&(r+=tk),r}var _d=Math.PI*2;function ece(r,e,t,i,n,a,s,o,l){if(s===0)return!1;var u=s;o-=r,l-=e;var c=Math.sqrt(o*o+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(i-n)%_d<1e-4)return!0;if(a){var h=i;i=fn(n),n=fn(h)}else i=fn(i),n=fn(n);i>n&&(n+=_d);var d=Math.atan2(l,o);return d<0&&(d+=_d),d>=i&&d<=n||d+_d>=i&&d+_d<=n}function Ss(r,e,t,i,n,a){if(a>e&&a>i||a<e&&a<i||i===e)return 0;var s=(a-e)/(i-e),o=i<e?1:-1;(s===1||s===0)&&(o=i<e?.5:-.5);var l=s*(t-r)+r;return l===n?1/0:l>n?o:0}var vo=us.CMD,Ul=Math.PI*2,tce=1e-4;function rce(r,e){return Math.abs(r-e)<tce}var mi=[-1,-1,-1],On=[-1,-1];function ice(){var r=On[0];On[0]=On[1],On[1]=r}function nce(r,e,t,i,n,a,s,o,l,u){if(u>e&&u>i&&u>a&&u>o||u<e&&u<i&&u<a&&u<o)return 0;var c=w0(e,i,a,o,u,mi);if(c===0)return 0;for(var h=0,d=-1,f=void 0,p=void 0,v=0;v<c;v++){var g=mi[v],m=g===0||g===1?.5:1,y=Mr(r,t,n,s,g);y<l||(d<0&&(d=WG(e,i,a,o,On),On[1]<On[0]&&d>1&&ice(),f=Mr(e,i,a,o,On[0]),d>1&&(p=Mr(e,i,a,o,On[1]))),d===2?g<On[0]?h+=f<e?m:-m:g<On[1]?h+=p<f?m:-m:h+=o<p?m:-m:g<On[0]?h+=f<e?m:-m:h+=o<f?m:-m)}return h}function ace(r,e,t,i,n,a,s,o){if(o>e&&o>i&&o>a||o<e&&o<i&&o<a)return 0;var l=_le(e,i,a,o,mi);if(l===0)return 0;var u=jG(e,i,a);if(u>=0&&u<=1){for(var c=0,h=Ur(e,i,a,u),d=0;d<l;d++){var f=mi[d]===0||mi[d]===1?.5:1,p=Ur(r,t,n,mi[d]);p<s||(mi[d]<u?c+=h<e?f:-f:c+=a<h?f:-f)}return c}else{var f=mi[0]===0||mi[0]===1?.5:1,p=Ur(r,t,n,mi[0]);return p<s?0:a<e?f:-f}}function sce(r,e,t,i,n,a,s,o){if(o-=e,o>t||o<-t)return 0;var l=Math.sqrt(t*t-o*o);mi[0]=-l,mi[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Ul-1e-4){i=0,n=Ul;var c=a?1:-1;return s>=mi[0]+r&&s<=mi[1]+r?c:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=Ul,n+=Ul);for(var d=0,f=0;f<2;f++){var p=mi[f];if(p+r>s){var v=Math.atan2(o,p),c=a?1:-1;v<0&&(v=Ul+v),(v>=i&&v<=n||v+Ul>=i&&v+Ul<=n)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),d+=c)}}return d}function E9(r,e,t,i,n){for(var a=r.data,s=r.len(),o=0,l=0,u=0,c=0,h=0,d,f,p=0;p<s;){var v=a[p++],g=p===1;switch(v===vo.M&&p>1&&(t||(o+=Ss(l,u,c,h,i,n))),g&&(l=a[p],u=a[p+1],c=l,h=u),v){case vo.M:c=a[p++],h=a[p++],l=c,u=h;break;case vo.L:if(t){if(Eo(l,u,a[p],a[p+1],e,i,n))return!0}else o+=Ss(l,u,a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case vo.C:if(t){if(Jue(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,i,n))return!0}else o+=nce(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case vo.Q:if(t){if(D9(l,u,a[p++],a[p++],a[p],a[p+1],e,i,n))return!0}else o+=ace(l,u,a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case vo.A:var m=a[p++],y=a[p++],_=a[p++],b=a[p++],S=a[p++],x=a[p++];p+=1;var C=!!(1-a[p++]);d=Math.cos(S)*_+m,f=Math.sin(S)*b+y,g?(c=d,h=f):o+=Ss(l,u,d,f,i,n);var D=(i-m)*b/_+m;if(t){if(ece(m,y,b,S,S+x,C,e,D,n))return!0}else o+=sce(m,y,b,S,S+x,C,D,n);l=Math.cos(S+x)*_+m,u=Math.sin(S+x)*b+y;break;case vo.R:c=l=a[p++],h=u=a[p++];var I=a[p++],M=a[p++];if(d=c+I,f=h+M,t){if(Eo(c,h,d,h,e,i,n)||Eo(d,h,d,f,e,i,n)||Eo(d,f,c,f,e,i,n)||Eo(c,f,c,h,e,i,n))return!0}else o+=Ss(d,h,d,f,i,n),o+=Ss(c,f,c,h,i,n);break;case vo.Z:if(t){if(Eo(l,u,c,h,e,i,n))return!0}else o+=Ss(l,u,c,h,i,n);l=c,u=h;break}}return!t&&!rce(u,h)&&(o+=Ss(l,u,c,h,i,n)||0),o!==0}function oce(r,e,t){return E9(r,0,!1,e,t)}function lce(r,e,t,i){return E9(r,e,!0,t,i)}var P0=Ce({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Uu),uce={style:Ce({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},a1.style)},CT=os.concat(["invisible","culling","z","z2","zlevel","parent"]),Qe=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var a=n.style;for(var s in i)a[s]!==i[s]&&(a[s]=i[s]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var o=0;o<CT.length;++o)n[CT[o]]=this[CT[o]];n.__dirty|=cn}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var i=rt(t);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var s=i[a],o=t[s];s==="style"?this.style?J(this.style,o):this.useStyle(o):s==="shape"?J(this.shape,o):r.prototype.attrKV.call(this,s,o)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(pe(t)){var i=A0(t,0);return i>.5?Gw:i>.2?jle:Hw}else if(t)return Hw}return Gw},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(pe(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),s=A0(t,0)<zw;if(a===s)return i}},e.prototype.buildPath=function(t,i,n){},e.prototype.pathUpdated=function(){this.__dirty&=~nh},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new us(!1)},e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return!(i==null||i==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,n=!t;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var s=this.path;(a||this.__dirty&nh)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),t=s.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(o.width+=u/l,o.height+=u/l,o.x-=u/l/2,o.y-=u/l/2)}return o}return t},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect(),s=this.style;if(t=n[0],i=n[1],a.contain(t,i)){var o=this.path;if(this.hasStroke()){var l=s.lineWidth,u=s.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),lce(o,l/u,t,i)))return!0}if(this.hasFill())return oce(o,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=nh,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):r.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=i:J(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&nh)},e.prototype.createStyle=function(t){return Q_(P0,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=J({},this.shape))},e.prototype._applyStateObj=function(t,i,n,a,s,o){r.prototype._applyStateObj.call(this,t,i,n,a,s,o);var l=!(i&&a),u;if(i&&i.shape?s?a?u=i.shape:(u=J({},n.shape),J(u,i.shape)):(u=J({},a?this.shape:n.shape),J(u,i.shape)):l&&(u=n.shape),u)if(s){this.shape=J({},this.shape);for(var c={},h=rt(u),d=0;d<h.length;d++){var f=h[d];typeof u[f]=="object"?this.shape[f]=u[f]:c[f]=u[f]}this._transitionState(t,{shape:c},o)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var i=r.prototype._mergeStates.call(this,t),n,a=0;a<t.length;a++){var s=t[a];s.shape&&(n=n||{},this._mergeStyle(n,s.shape))}return n&&(i.shape=n),i},e.prototype.getAnimationStyleProps=function(){return uce},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var i=function(a){j(s,a);function s(o){var l=a.call(this,o)||this;return t.init&&t.init.call(l,o),l}return s.prototype.getDefaultStyle=function(){return Ee(t.style)},s.prototype.getDefaultShape=function(){return Ee(t.shape)},s}(e);for(var n in t)typeof t[n]=="function"&&(i.prototype[n]=t[n]);return i},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=cn|tp|nh}(),e}(Yn),cce=Ce({strokeFirst:!0,font:Jo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},P0),of=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,i=t.stroke;return i!=null&&i!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return Q_(cce,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var n=Kv(i,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(Yn);of.prototype.type="tspan";var hce=Ce({x:0,y:0},Uu),fce={style:Ce({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},a1.style)};function dce(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Wr=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Q_(hce,t)},e.prototype._getSize=function(t){var i=this.style,n=i[t];if(n!=null)return n;var a=dce(i.image)?i.image:this.__image;if(!a)return 0;var s=t==="width"?"height":"width",o=i[s];return o==null?a[t]:a[t]/a[s]*o},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return fce},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new qe(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Yn);Wr.prototype.type="image";function pce(r,e){var t=e.x,i=e.y,n=e.width,a=e.height,s=e.r,o,l,u,c;n<0&&(t=t+n,n=-n),a<0&&(i=i+a,a=-a),typeof s=="number"?o=l=u=c=s:s instanceof Array?s.length===1?o=l=u=c=s[0]:s.length===2?(o=u=s[0],l=c=s[1]):s.length===3?(o=s[0],l=c=s[1],u=s[2]):(o=s[0],l=s[1],u=s[2],c=s[3]):o=l=u=c=0;var h;o+l>n&&(h=o+l,o*=n/h,l*=n/h),u+c>n&&(h=u+c,u*=n/h,c*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),o+c>a&&(h=o+c,o*=a/h,c*=a/h),r.moveTo(t+o,i),r.lineTo(t+n-l,i),l!==0&&r.arc(t+n-l,i+l,l,-Math.PI/2,0),r.lineTo(t+n,i+a-u),u!==0&&r.arc(t+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(t+c,i+a),c!==0&&r.arc(t+c,i+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,i+o),o!==0&&r.arc(t+o,i+o,o,Math.PI,Math.PI*1.5)}var mh=Math.round;function I9(r,e,t){if(e){var i=e.x1,n=e.x2,a=e.y1,s=e.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=s;var o=t&&t.lineWidth;return o&&(mh(i*2)===mh(n*2)&&(r.x1=r.x2=mu(i,o,!0)),mh(a*2)===mh(s*2)&&(r.y1=r.y2=mu(a,o,!0))),r}}function P9(r,e,t){if(e){var i=e.x,n=e.y,a=e.width,s=e.height;r.x=i,r.y=n,r.width=a,r.height=s;var o=t&&t.lineWidth;return o&&(r.x=mu(i,o,!0),r.y=mu(n,o,!0),r.width=Math.max(mu(i+a,o,!1)-r.x,a===0?0:1),r.height=Math.max(mu(n+s,o,!1)-r.y,s===0?0:1)),r}}function mu(r,e,t){if(!e)return r;var i=mh(r*2);return(i+mh(e))%2===0?i/2:(i+(t?1:-1))/2}var vce=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),gce={},st=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vce},e.prototype.buildPath=function(t,i){var n,a,s,o;if(this.subPixelOptimize){var l=P9(gce,i,this.style);n=l.x,a=l.y,s=l.width,o=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,s=i.width,o=i.height;i.r?pce(t,i):t.rect(n,a,s,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Qe);st.prototype.type="rect";var rk={fill:"#000"},ik=2,mce={style:Ce({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},a1.style)},lt=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=rk,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var i=this._children[t];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var i=this.innerTransformable;return i?i.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,bce(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new qe(0,0,0,0),i=this._children,n=[],a=null,s=0;s<i.length;s++){var o=i[s],l=o.getBoundingRect(),u=o.getLocalTransform(n);u?(t.copy(l),t.applyTransform(u),a=a||t.clone(),a.union(t)):(a=a||l.clone(),a.union(l))}this._rect=a||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||rk},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,i){if(!i)return t;var n=i.rich,a=t.rich||n&&{};return J(t,i),n&&a?(this._mergeRich(a,n),t.rich=a):a&&(t.rich=a),t},e.prototype._mergeRich=function(t,i){for(var n=rt(i),a=0;a<n.length;a++){var s=n[a];t[s]=t[s]||{},J(t[s],i[s])}},e.prototype.getAnimationStyleProps=function(){return mce},e.prototype._getOrCreateChild=function(t){var i=this._children[this._childCursor];return(!i||!(i instanceof t))&&(i=new t),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},e.prototype._updatePlainTexts=function(){var t=this.style,i=t.font||Jo,n=t.padding,a=ck(t),s=zue(a,t),o=AT(t),l=!!t.backgroundColor,u=s.outerHeight,c=s.outerWidth,h=s.contentWidth,d=s.lines,f=s.lineHeight,p=this._defaultStyle,v=t.x||0,g=t.y||0,m=t.align||p.align||"left",y=t.verticalAlign||p.verticalAlign||"top",_=v,b=ah(g,s.contentHeight,y);if(o||n){var S=ip(v,c,m),x=ah(g,u,y);o&&this._renderBackground(t,t,S,x,c,u)}b+=f/2,n&&(_=uk(v,m,n),y==="top"?b+=n[0]:y==="bottom"&&(b-=n[2]));for(var C=0,D=!1,I=lk("fill"in t?t.fill:(D=!0,p.fill)),M=ok("stroke"in t?t.stroke:!l&&(!p.autoStroke||D)?(C=ik,p.stroke):null),L=t.textShadowBlur>0,N=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),O=s.calculatedLineHeight,B=0;B<d.length;B++){var F=this._getOrCreateChild(of),U=F.createStyle();F.useStyle(U),U.text=d[B],U.x=_,U.y=b,m&&(U.textAlign=m),U.textBaseline="middle",U.opacity=t.opacity,U.strokeFirst=!0,L&&(U.shadowBlur=t.textShadowBlur||0,U.shadowColor=t.textShadowColor||"transparent",U.shadowOffsetX=t.textShadowOffsetX||0,U.shadowOffsetY=t.textShadowOffsetY||0),U.stroke=M,U.fill=I,M&&(U.lineWidth=t.lineWidth||C,U.lineDash=t.lineDash,U.lineDashOffset=t.lineDashOffset||0),U.font=i,ak(U,t),b+=f,N&&F.setBoundingRect(new qe(ip(U.x,t.width,U.textAlign),ah(U.y,O,U.textBaseline),h,O))}},e.prototype._updateRichTexts=function(){var t=this.style,i=ck(t),n=$ue(i,t),a=n.width,s=n.outerWidth,o=n.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,h=this._defaultStyle,d=t.align||h.align,f=t.verticalAlign||h.verticalAlign,p=ip(u,s,d),v=ah(c,o,f),g=p,m=v;l&&(g+=l[3],m+=l[0]);var y=g+a;AT(t)&&this._renderBackground(t,t,p,v,s,o);for(var _=!!t.backgroundColor,b=0;b<n.lines.length;b++){for(var S=n.lines[b],x=S.tokens,C=x.length,D=S.lineHeight,I=S.width,M=0,L=g,N=y,O=C-1,B=void 0;M<C&&(B=x[M],!B.align||B.align==="left");)this._placeToken(B,t,D,m,L,"left",_),I-=B.width,L+=B.width,M++;for(;O>=0&&(B=x[O],B.align==="right");)this._placeToken(B,t,D,m,N,"right",_),I-=B.width,N-=B.width,O--;for(L+=(a-(L-g)-(y-N)-I)/2;M<=O;)B=x[M],this._placeToken(B,t,D,m,L+B.width/2,"center",_),L+=B.width,M++;m+=D}},e.prototype._placeToken=function(t,i,n,a,s,o,l){var u=i.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,h=a+n/2;c==="top"?h=a+t.height/2:c==="bottom"&&(h=a+n-t.height/2);var d=!t.isLineHolder&&AT(u);d&&this._renderBackground(u,i,o==="right"?s-t.width:o==="center"?s-t.width/2:s,h-t.height/2,t.width,t.height);var f=!!u.backgroundColor,p=t.textPadding;p&&(s=uk(s,o,p),h-=t.height/2-p[0]-t.innerHeight/2);var v=this._getOrCreateChild(of),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,y=!1,_=0,b=lk("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,m.fill)),S=ok("stroke"in u?u.stroke:"stroke"in i?i.stroke:!f&&!l&&(!m.autoStroke||y)?(_=ik,m.stroke):null),x=u.textShadowBlur>0||i.textShadowBlur>0;g.text=t.text,g.x=s,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=o,g.textBaseline="middle",g.font=t.font||Jo,g.opacity=Qa(u.opacity,i.opacity,1),ak(g,u),S&&(g.lineWidth=Qa(u.lineWidth,i.lineWidth,_),g.lineDash=Be(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=S),b&&(g.fill=b);var C=t.contentWidth,D=t.contentHeight;v.setBoundingRect(new qe(ip(g.x,C,g.textAlign),ah(g.y,D,g.textBaseline),C,D))},e.prototype._renderBackground=function(t,i,n,a,s,o){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,h=l&&l.image,d=l&&!h,f=t.borderRadius,p=this,v,g;if(d||t.lineHeight||u&&c){v=this._getOrCreateChild(st),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=n,m.y=a,m.width=s,m.height=o,m.r=f,v.dirtyShape()}if(d){var y=v.style;y.fill=l||null,y.fillOpacity=Be(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(Wr),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=a,_.width=s,_.height=o}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Be(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var b=(v||g).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=Qa(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return L9(t)&&(i=[t.fontStyle,t.fontWeight,M9(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&ha(i)||t.textFont||t.font},e}(Yn),yce={left:!0,right:1,center:1},_ce={top:1,bottom:1,middle:1},nk=["fontStyle","fontWeight","fontSize","fontFamily"];function M9(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?zA+"px":r+"px"}function ak(r,e){for(var t=0;t<nk.length;t++){var i=nk[t],n=e[i];n!=null&&(r[i]=n)}}function L9(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function bce(r){return sk(r),R(r.rich,sk),r}function sk(r){if(r){r.font=lt.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||yce[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||_ce[t]?t:"top";var i=r.padding;i&&(r.padding=jA(r.padding))}}function ok(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function lk(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function uk(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function ck(r){var e=r.text;return e!=null&&(e+=""),e}function AT(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ke=ot(),Yw=function(r,e,t,i){if(i){var n=ke(i);n.dataIndex=t,n.dataType=e,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var s=ke(a);s.seriesIndex=r,s.dataIndex=t,s.dataType=e,s.ssrType="chart"})}},hk=1,fk={},k9=ot(),sD=ot(),oD=0,Qv=1,o1=2,Di=["emphasis","blur","select"],dv=["normal","emphasis","blur","select"],Mf=10,Tce=9,Vu="highlight",Ty="downplay",kp="select",Sy="unselect",Rp="toggleSelect";function Uc(r){return r!=null&&r!=="none"}function l1(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function R9(r){l1(r,"emphasis",o1)}function O9(r){r.hoverState===o1&&l1(r,"normal",oD)}function lD(r){l1(r,"blur",Qv)}function N9(r){r.hoverState===Qv&&l1(r,"normal",oD)}function Sce(r){r.selected=!0}function xce(r){r.selected=!1}function dk(r,e,t){e(r,t)}function Js(r,e,t){dk(r,e,t),r.isGroup&&r.traverse(function(i){dk(i,e,t)})}function M0(r,e){switch(e){case"emphasis":r.hoverState=o1;break;case"normal":r.hoverState=oD;break;case"blur":r.hoverState=Qv;break;case"select":r.selected=!0}}function wce(r,e,t,i){for(var n=r.style,a={},s=0;s<e.length;s++){var o=e[s],l=n[o];a[o]=l??(i&&i[o])}for(var s=0;s<r.animators.length;s++){var u=r.animators[s];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function Cce(r,e,t,i){var n=t&&Xe(t,"select")>=0,a=!1;if(r instanceof Qe){var s=k9(r),o=n&&s.selectFill||s.normalFill,l=n&&s.selectStroke||s.normalStroke;if(Uc(o)||Uc(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=J({},i),u=J({},u),u.fill=o):!Uc(u.fill)&&Uc(o)?(a=!0,i=J({},i),u=J({},u),u.fill=Rw(o)):!Uc(u.stroke)&&Uc(l)&&(a||(i=J({},i),u=J({},u)),u.stroke=Rw(l)),i.style=u}}if(i&&i.z2==null){a||(i=J({},i));var c=r.z2EmphasisLift;i.z2=r.z2+(c??Mf)}return i}function Ace(r,e,t){if(t&&t.z2==null){t=J({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??Tce)}return t}function Dce(r,e,t){var i=Xe(r.currentStates,e)>=0,n=r.style.opacity,a=i?null:wce(r,["opacity"],e,{opacity:1});t=t||{};var s=t.style||{};return s.opacity==null&&(t=J({},t),s=J({opacity:i?n:a.opacity*.1},s),t.style=s),t}function DT(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return Cce(this,r,e,t);if(r==="blur")return Dce(this,r,t);if(r==="select")return Ace(this,r,t)}return t}function rc(r){r.stateProxy=DT;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=DT),t&&(t.stateProxy=DT)}function pk(r,e){!V9(r,e)&&!r.__highByOuter&&Js(r,R9)}function vk(r,e){!V9(r,e)&&!r.__highByOuter&&Js(r,O9)}function qs(r,e){r.__highByOuter|=1<<(e||0),Js(r,R9)}function js(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Js(r,O9)}function B9(r){Js(r,lD)}function uD(r){Js(r,N9)}function F9(r){Js(r,Sce)}function U9(r){Js(r,xce)}function V9(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function z9(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(n,a){var s=sD(a),o=n==="series",l=o?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!o&&i.push(l),s.isBlured&&(l.group.traverse(function(u){N9(u)}),o&&t.push(a)),s.isBlured=!1}),R(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function Kw(r,e,t,i){var n=i.getModel();t=t||"coordinateSystem";function a(u,c){for(var h=0;h<c.length;h++){var d=u.getItemGraphicEl(c[h]);d&&uD(d)}}if(r!=null&&!(!e||e==="none")){var s=n.getSeriesByIndex(r),o=s.coordinateSystem;o&&o.master&&(o=o.master);var l=[];n.eachSeries(function(u){var c=s===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var d=h&&o?h===o:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!d||e==="series"&&c)){var f=i.getViewOfSeriesModel(u);if(f.group.traverse(function(g){g.__highByOuter&&c&&e==="self"||lD(g)}),li(e))a(u.getData(),e);else if(De(e))for(var p=rt(e),v=0;v<p.length;v++)a(u.getData(p[v]),e[p[v]]);l.push(u),sD(u).isBlured=!0}}),n.eachComponent(function(u,c){if(u!=="series"){var h=i.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,n)}})}}function Zw(r,e,t){if(!(r==null||e==null)){var i=t.getModel().getComponent(r,e);if(i){sD(i).isBlured=!0;var n=t.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){lD(a)})}}}function Ece(r,e,t){var i=r.seriesIndex,n=r.getData(e.dataType);if(n){var a=ec(n,e);a=(ie(a)?a[0]:a)||0;var s=n.getItemGraphicEl(a);if(!s)for(var o=n.count(),l=0;!s&&l<o;)s=n.getItemGraphicEl(l++);if(s){var u=ke(s);Kw(i,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);c!=null&&Kw(i,c,h,t)}}}function cD(r,e,t,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return n;var a=i.getModel().getComponent(r,e);if(!a)return n;var s=i.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return n;for(var o=s.findHighDownDispatchers(t),l,u=0;u<o.length;u++)if(ke(o[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:o}}function Ice(r,e,t){var i=ke(r),n=cD(i.componentMainType,i.componentIndex,i.componentHighDownName,t),a=n.dispatchers,s=n.focusSelf;a?(s&&Zw(i.componentMainType,i.componentIndex,t),R(a,function(o){return pk(o,e)})):(Kw(i.seriesIndex,i.focus,i.blurScope,t),i.focus==="self"&&Zw(i.componentMainType,i.componentIndex,t),pk(r,e))}function Pce(r,e,t){z9(t);var i=ke(r),n=cD(i.componentMainType,i.componentIndex,i.componentHighDownName,t).dispatchers;n?R(n,function(a){return vk(a,e)}):vk(r,e)}function Mce(r,e,t){if(Jw(e)){var i=e.dataType,n=r.getData(i),a=ec(n,e);ie(a)||(a=[a]),r[e.type===Rp?"toggleSelect":e.type===kp?"select":"unselect"](a,i)}}function gk(r){var e=r.getAllData();R(e,function(t){var i=t.data,n=t.type;i.eachItemGraphicEl(function(a,s){r.isSelected(s,n)?F9(a):U9(a)})})}function Lce(r){var e=[];return r.eachSeries(function(t){var i=t.getAllData();R(i,function(n){n.data;var a=n.type,s=t.getSelectedDataIndices();if(s.length>0){var o={dataIndex:s,seriesIndex:t.seriesIndex};a!=null&&(o.dataType=a),e.push(o)}})}),e}function zu(r,e,t){yu(r,!0),Js(r,rc),Qw(r,e,t)}function kce(r){yu(r,!1)}function Yt(r,e,t,i){i?kce(r):zu(r,e,t)}function Qw(r,e,t){var i=ke(r);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var mk=["emphasis","blur","select"],Rce={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Qr(r,e,t,i){t=t||"itemStyle";for(var n=0;n<mk.length;n++){var a=mk[n],s=e.getModel([a,t]),o=r.ensureState(a);o.style=i?i(s):s[Rce[t]]()}}function yu(r,e){var t=e===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!t)}function pv(r){return!!(r&&r.__highDownDispatcher)}function Oce(r,e,t){var i=ke(r);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=t}function Nce(r){var e=fk[r];return e==null&&hk<=32&&(e=fk[r]=hk++),e}function Jw(r){var e=r.type;return e===kp||e===Sy||e===Rp}function yk(r){var e=r.type;return e===Vu||e===Ty}function Bce(r){var e=k9(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var Vc=us.CMD,Fce=[[],[],[]],_k=Math.sqrt,Uce=Math.atan2;function G9(r,e){if(e){var t=r.data,i=r.len(),n,a,s,o,l,u,c=Vc.M,h=Vc.C,d=Vc.L,f=Vc.R,p=Vc.A,v=Vc.Q;for(s=0,o=0;s<i;){switch(n=t[s++],o=s,a=0,n){case c:a=1;break;case d:a=1;break;case h:a=3;break;case v:a=2;break;case p:var g=e[4],m=e[5],y=_k(e[0]*e[0]+e[1]*e[1]),_=_k(e[2]*e[2]+e[3]*e[3]),b=Uce(-e[1]/_,e[0]/y);t[s]*=y,t[s++]+=g,t[s]*=_,t[s++]+=m,t[s++]*=y,t[s++]*=_,t[s++]+=b,t[s++]+=b,s+=2,o=s;break;case f:u[0]=t[s++],u[1]=t[s++],Zr(u,u,e),t[o++]=u[0],t[o++]=u[1],u[0]+=t[s++],u[1]+=t[s++],Zr(u,u,e),t[o++]=u[0],t[o++]=u[1]}for(l=0;l<a;l++){var S=Fce[l];S[0]=t[s++],S[1]=t[s++],Zr(S,S,e),t[o++]=S[0],t[o++]=S[1]}}r.increaseVersion()}}var ET=Math.sqrt,fm=Math.sin,dm=Math.cos,bd=Math.PI;function bk(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function e2(r,e){return(r[0]*e[0]+r[1]*e[1])/(bk(r)*bk(e))}function Tk(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(e2(r,e))}function Sk(r,e,t,i,n,a,s,o,l,u,c){var h=l*(bd/180),d=dm(h)*(r-t)/2+fm(h)*(e-i)/2,f=-1*fm(h)*(r-t)/2+dm(h)*(e-i)/2,p=d*d/(s*s)+f*f/(o*o);p>1&&(s*=ET(p),o*=ET(p));var v=(n===a?-1:1)*ET((s*s*(o*o)-s*s*(f*f)-o*o*(d*d))/(s*s*(f*f)+o*o*(d*d)))||0,g=v*s*f/o,m=v*-o*d/s,y=(r+t)/2+dm(h)*g-fm(h)*m,_=(e+i)/2+fm(h)*g+dm(h)*m,b=Tk([1,0],[(d-g)/s,(f-m)/o]),S=[(d-g)/s,(f-m)/o],x=[(-1*d-g)/s,(-1*f-m)/o],C=Tk(S,x);if(e2(S,x)<=-1&&(C=bd),e2(S,x)>=1&&(C=0),C<0){var D=Math.round(C/bd*1e6)/1e6;C=bd*2+D%2*bd}c.addData(u,y,_,s,o,b,C,h,a)}var Vce=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,zce=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Gce(r){var e=new us;if(!r)return e;var t=0,i=0,n=t,a=i,s,o=us.CMD,l=r.match(Vce);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),d=void 0,f=c.match(zce)||[],p=f.length,v=0;v<p;v++)f[v]=parseFloat(f[v]);for(var g=0;g<p;){var m=void 0,y=void 0,_=void 0,b=void 0,S=void 0,x=void 0,C=void 0,D=t,I=i,M=void 0,L=void 0;switch(h){case"l":t+=f[g++],i+=f[g++],d=o.L,e.addData(d,t,i);break;case"L":t=f[g++],i=f[g++],d=o.L,e.addData(d,t,i);break;case"m":t+=f[g++],i+=f[g++],d=o.M,e.addData(d,t,i),n=t,a=i,h="l";break;case"M":t=f[g++],i=f[g++],d=o.M,e.addData(d,t,i),n=t,a=i,h="L";break;case"h":t+=f[g++],d=o.L,e.addData(d,t,i);break;case"H":t=f[g++],d=o.L,e.addData(d,t,i);break;case"v":i+=f[g++],d=o.L,e.addData(d,t,i);break;case"V":i=f[g++],d=o.L,e.addData(d,t,i);break;case"C":d=o.C,e.addData(d,f[g++],f[g++],f[g++],f[g++],f[g++],f[g++]),t=f[g-2],i=f[g-1];break;case"c":d=o.C,e.addData(d,f[g++]+t,f[g++]+i,f[g++]+t,f[g++]+i,f[g++]+t,f[g++]+i),t+=f[g-2],i+=f[g-1];break;case"S":m=t,y=i,M=e.len(),L=e.data,s===o.C&&(m+=t-L[M-4],y+=i-L[M-3]),d=o.C,D=f[g++],I=f[g++],t=f[g++],i=f[g++],e.addData(d,m,y,D,I,t,i);break;case"s":m=t,y=i,M=e.len(),L=e.data,s===o.C&&(m+=t-L[M-4],y+=i-L[M-3]),d=o.C,D=t+f[g++],I=i+f[g++],t+=f[g++],i+=f[g++],e.addData(d,m,y,D,I,t,i);break;case"Q":D=f[g++],I=f[g++],t=f[g++],i=f[g++],d=o.Q,e.addData(d,D,I,t,i);break;case"q":D=f[g++]+t,I=f[g++]+i,t+=f[g++],i+=f[g++],d=o.Q,e.addData(d,D,I,t,i);break;case"T":m=t,y=i,M=e.len(),L=e.data,s===o.Q&&(m+=t-L[M-4],y+=i-L[M-3]),t=f[g++],i=f[g++],d=o.Q,e.addData(d,m,y,t,i);break;case"t":m=t,y=i,M=e.len(),L=e.data,s===o.Q&&(m+=t-L[M-4],y+=i-L[M-3]),t+=f[g++],i+=f[g++],d=o.Q,e.addData(d,m,y,t,i);break;case"A":_=f[g++],b=f[g++],S=f[g++],x=f[g++],C=f[g++],D=t,I=i,t=f[g++],i=f[g++],d=o.A,Sk(D,I,t,i,x,C,_,b,S,d,e);break;case"a":_=f[g++],b=f[g++],S=f[g++],x=f[g++],C=f[g++],D=t,I=i,t+=f[g++],i+=f[g++],d=o.A,Sk(D,I,t,i,x,C,_,b,S,d,e);break}}(h==="z"||h==="Z")&&(d=o.Z,e.addData(d),t=n,i=a),s=d}return e.toStatic(),e}var H9=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(Qe);function $9(r){return r.setData!=null}function W9(r,e){var t=Gce(r),i=J({},e);return i.buildPath=function(n){if($9(n)){n.setData(t.data);var a=n.getContext();a&&n.rebuildPath(a,1)}else{var a=n;t.rebuildPath(a,1)}},i.applyTransform=function(n){G9(t,n),this.dirtyShape()},i}function q9(r,e){return new H9(W9(r,e))}function Hce(r,e){var t=W9(r,e),i=function(n){j(a,n);function a(s){var o=n.call(this,s)||this;return o.applyTransform=t.applyTransform,o.buildPath=t.buildPath,o}return a}(H9);return i}function $ce(r,e){for(var t=[],i=r.length,n=0;n<i;n++){var a=r[n];t.push(a.getUpdatedPathProxy(!0))}var s=new Qe(e);return s.createPathProxy(),s.buildPath=function(o){if($9(o)){o.appendPath(t);var l=o.getContext();l&&o.rebuildPath(l,1)}},s}function hD(r,e){e=e||{};var t=new Qe;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?G9(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var Wce=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),eo=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Wce},e.prototype.buildPath=function(t,i){t.moveTo(i.cx+i.r,i.cy),t.arc(i.cx,i.cy,i.r,0,Math.PI*2)},e}(Qe);eo.prototype.type="circle";var qce=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),u1=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new qce},e.prototype.buildPath=function(t,i){var n=.5522848,a=i.cx,s=i.cy,o=i.rx,l=i.ry,u=o*n,c=l*n;t.moveTo(a-o,s),t.bezierCurveTo(a-o,s-c,a-u,s-l,a,s-l),t.bezierCurveTo(a+u,s-l,a+o,s-c,a+o,s),t.bezierCurveTo(a+o,s+c,a+u,s+l,a,s+l),t.bezierCurveTo(a-u,s+l,a-o,s+c,a-o,s),t.closePath()},e}(Qe);u1.prototype.type="ellipse";var j9=Math.PI,IT=j9*2,Vl=Math.sin,zc=Math.cos,jce=Math.acos,ei=Math.atan2,xk=Math.abs,Op=Math.sqrt,np=Math.max,Ia=Math.min,aa=1e-4;function Xce(r,e,t,i,n,a,s,o){var l=t-r,u=i-e,c=s-n,h=o-a,d=h*l-c*u;if(!(d*d<aa))return d=(c*(e-a)-h*(r-n))/d,[r+d*l,e+d*u]}function pm(r,e,t,i,n,a,s){var o=r-t,l=e-i,u=(s?a:-a)/Op(o*o+l*l),c=u*l,h=-u*o,d=r+c,f=e+h,p=t+c,v=i+h,g=(d+p)/2,m=(f+v)/2,y=p-d,_=v-f,b=y*y+_*_,S=n-a,x=d*v-p*f,C=(_<0?-1:1)*Op(np(0,S*S*b-x*x)),D=(x*_-y*C)/b,I=(-x*y-_*C)/b,M=(x*_+y*C)/b,L=(-x*y+_*C)/b,N=D-g,O=I-m,B=M-g,F=L-m;return N*N+O*O>B*B+F*F&&(D=M,I=L),{cx:D,cy:I,x0:-c,y0:-h,x1:D*(n/S-1),y1:I*(n/S-1)}}function Yce(r){var e;if(ie(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function Kce(r,e){var t,i=np(e.r,0),n=np(e.r0||0,0),a=i>0,s=n>0;if(!(!a&&!s)){if(a||(i=n,n=0),n>i){var o=i;i=n,n=o}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,d=!!e.clockwise,f=xk(u-l),p=f>IT&&f%IT;if(p>aa&&(f=p),!(i>aa))r.moveTo(c,h);else if(f>IT-aa)r.moveTo(c+i*zc(l),h+i*Vl(l)),r.arc(c,h,i,l,u,!d),n>aa&&(r.moveTo(c+n*zc(u),h+n*Vl(u)),r.arc(c,h,n,u,l,d));else{var v=void 0,g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,S=void 0,x=void 0,C=void 0,D=void 0,I=void 0,M=void 0,L=void 0,N=void 0,O=void 0,B=void 0,F=i*zc(l),U=i*Vl(l),$=n*zc(u),q=n*Vl(u),Z=f>aa;if(Z){var te=e.cornerRadius;te&&(t=Yce(te),v=t[0],g=t[1],m=t[2],y=t[3]);var Q=xk(i-n)/2;if(_=Ia(Q,m),b=Ia(Q,y),S=Ia(Q,v),x=Ia(Q,g),I=C=np(_,b),M=D=np(S,x),(C>aa||D>aa)&&(L=i*zc(u),N=i*Vl(u),O=n*zc(l),B=n*Vl(l),f<j9)){var se=Xce(F,U,O,B,L,N,$,q);if(se){var he=F-se[0],ue=U-se[1],Ie=L-se[0],Oe=N-se[1],Fe=1/Vl(jce((he*Ie+ue*Oe)/(Op(he*he+ue*ue)*Op(Ie*Ie+Oe*Oe)))/2),me=Op(se[0]*se[0]+se[1]*se[1]);I=Ia(C,(i-me)/(Fe+1)),M=Ia(D,(n-me)/(Fe-1))}}}if(!Z)r.moveTo(c+F,h+U);else if(I>aa){var ze=Ia(m,I),Pe=Ia(y,I),ye=pm(O,B,F,U,i,ze,d),Me=pm(L,N,$,q,i,Pe,d);r.moveTo(c+ye.cx+ye.x0,h+ye.cy+ye.y0),I<C&&ze===Pe?r.arc(c+ye.cx,h+ye.cy,I,ei(ye.y0,ye.x0),ei(Me.y0,Me.x0),!d):(ze>0&&r.arc(c+ye.cx,h+ye.cy,ze,ei(ye.y0,ye.x0),ei(ye.y1,ye.x1),!d),r.arc(c,h,i,ei(ye.cy+ye.y1,ye.cx+ye.x1),ei(Me.cy+Me.y1,Me.cx+Me.x1),!d),Pe>0&&r.arc(c+Me.cx,h+Me.cy,Pe,ei(Me.y1,Me.x1),ei(Me.y0,Me.x0),!d))}else r.moveTo(c+F,h+U),r.arc(c,h,i,l,u,!d);if(!(n>aa)||!Z)r.lineTo(c+$,h+q);else if(M>aa){var ze=Ia(v,M),Pe=Ia(g,M),ye=pm($,q,L,N,n,-Pe,d),Me=pm(F,U,O,B,n,-ze,d);r.lineTo(c+ye.cx+ye.x0,h+ye.cy+ye.y0),M<D&&ze===Pe?r.arc(c+ye.cx,h+ye.cy,M,ei(ye.y0,ye.x0),ei(Me.y0,Me.x0),!d):(Pe>0&&r.arc(c+ye.cx,h+ye.cy,Pe,ei(ye.y0,ye.x0),ei(ye.y1,ye.x1),!d),r.arc(c,h,n,ei(ye.cy+ye.y1,ye.cx+ye.x1),ei(Me.cy+Me.y1,Me.cx+Me.x1),d),ze>0&&r.arc(c+Me.cx,h+Me.cy,ze,ei(Me.y1,Me.x1),ei(Me.y0,Me.x0),!d))}else r.lineTo(c+$,h+q),r.arc(c,h,n,u,l,d)}r.closePath()}}}var Zce=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Ei=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Zce},e.prototype.buildPath=function(t,i){Kce(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Qe);Ei.prototype.type="sector";var Qce=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),Jv=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Qce},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,s=Math.PI*2;t.moveTo(n+i.r,a),t.arc(n,a,i.r,0,s,!1),t.moveTo(n+i.r0,a),t.arc(n,a,i.r0,0,s,!0)},e}(Qe);Jv.prototype.type="ring";function Jce(r,e,t,i){var n=[],a=[],s=[],o=[],l,u,c,h;if(i){c=[1/0,1/0],h=[-1/0,-1/0];for(var d=0,f=r.length;d<f;d++)Oo(c,c,r[d]),No(h,h,r[d]);Oo(c,c,i[0]),No(h,h,i[1])}for(var d=0,f=r.length;d<f;d++){var p=r[d];if(t)l=r[d?d-1:f-1],u=r[(d+1)%f];else if(d===0||d===f-1){n.push(ks(r[d]));continue}else l=r[d-1],u=r[d+1];gu(a,u,l),py(a,a,e);var v=Cw(p,l),g=Cw(p,u),m=v+g;m!==0&&(v/=m,g/=m),py(s,a,-v),py(o,a,g);var y=gL([],p,s),_=gL([],p,o);i&&(No(y,y,c),Oo(y,y,h),No(_,_,c),Oo(_,_,h)),n.push(y),n.push(_)}return t&&n.push(n.shift()),n}function X9(r,e,t){var i=e.smooth,n=e.points;if(n&&n.length>=2){if(i){var a=Jce(n,i,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var s=n.length,o=0;o<(t?s:s-1);o++){var l=a[o*2],u=a[o*2+1],c=n[(o+1)%s];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var o=1,h=n.length;o<h;o++)r.lineTo(n[o][0],n[o][1])}t&&r.closePath()}}var ehe=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),Ii=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ehe},e.prototype.buildPath=function(t,i){X9(t,i,!0)},e}(Qe);Ii.prototype.type="polygon";var the=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),Pi=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new the},e.prototype.buildPath=function(t,i){X9(t,i,!1)},e}(Qe);Pi.prototype.type="polyline";var rhe={},ihe=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),kr=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ihe},e.prototype.buildPath=function(t,i){var n,a,s,o;if(this.subPixelOptimize){var l=I9(rhe,i,this.style);n=l.x1,a=l.y1,s=l.x2,o=l.y2}else n=i.x1,a=i.y1,s=i.x2,o=i.y2;var u=i.percent;u!==0&&(t.moveTo(n,a),u<1&&(s=n*(1-u)+s*u,o=a*(1-u)+o*u),t.lineTo(s,o))},e.prototype.pointAt=function(t){var i=this.shape;return[i.x1*(1-t)+i.x2*t,i.y1*(1-t)+i.y2*t]},e}(Qe);kr.prototype.type="line";var Li=[],nhe=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function wk(r,e,t){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(t?EL:Mr)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?EL:Mr)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Pw:Ur)(r.x1,r.cpx1,r.x2,e),(t?Pw:Ur)(r.y1,r.cpy1,r.y2,e)]}var eg=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new nhe},e.prototype.buildPath=function(t,i){var n=i.x1,a=i.y1,s=i.x2,o=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,h=i.cpy2,d=i.percent;d!==0&&(t.moveTo(n,a),c==null||h==null?(d<1&&(lv(n,l,s,d,Li),l=Li[1],s=Li[2],lv(a,u,o,d,Li),u=Li[1],o=Li[2]),t.quadraticCurveTo(l,u,s,o)):(d<1&&(tl(n,l,c,s,d,Li),l=Li[1],c=Li[2],s=Li[3],tl(a,u,h,o,d,Li),u=Li[1],h=Li[2],o=Li[3]),t.bezierCurveTo(l,u,c,h,s,o)))},e.prototype.pointAt=function(t){return wk(this.shape,t,!1)},e.prototype.tangentAt=function(t){var i=wk(this.shape,t,!0);return Ef(i,i)},e}(Qe);eg.prototype.type="bezier-curve";var ahe=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),c1=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ahe},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,s=Math.max(i.r,0),o=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(o),h=Math.sin(o);t.moveTo(c*s+n,h*s+a),t.arc(n,a,s,o,l,!u)},e}(Qe);c1.prototype.type="arc";var fD=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,i=this.shapeChanged(),n=0;n<t.length;n++)i=i||t[n].shapeChanged();i&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(i[0],i[1],t[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(t,n[a].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],i=0;i<t.length;i++)t[i].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Qe.prototype.getBoundingRect.call(this)},e}(Qe),Y9=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),tg=function(r){j(e,r);function e(t,i,n,a,s,o){var l=r.call(this,s)||this;return l.x=t??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=o||!1,l}return e}(Y9),K9=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,a)||this;return o.x=t??.5,o.y=i??.5,o.r=n??.5,o.type="radial",o.global=s||!1,o}return e}(Y9),zl=[0,0],Gl=[0,0],vm=new He,gm=new He,L0=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new He;for(var i=0;i<2;i++)this._axes[i]=new He;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var i=this._corners,n=this._axes,a=e.x,s=e.y,o=a+e.width,l=s+e.height;if(i[0].set(a,s),i[1].set(o,s),i[2].set(o,l),i[3].set(a,l),t)for(var u=0;u<4;u++)i[u].transform(t);He.sub(n[0],i[1],i[0]),He.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(e,t){var i=!0,n=!t;return vm.set(1/0,1/0),gm.set(0,0),!this._intersectCheckOneSide(this,e,vm,gm,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(e,this,vm,gm,n,-1)&&(i=!1,n)||n||He.copy(t,i?vm:gm),i},r.prototype._intersectCheckOneSide=function(e,t,i,n,a,s){for(var o=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,zl),this._getProjMinMaxOnAxis(l,t._corners,Gl),zl[1]<Gl[0]||zl[0]>Gl[1]){if(o=!1,a)return o;var c=Math.abs(Gl[0]-zl[1]),h=Math.abs(zl[0]-Gl[1]);Math.min(c,h)>n.len()&&(c<h?He.scale(n,u,-c*s):He.scale(n,u,h*s))}else if(i){var c=Math.abs(Gl[0]-zl[1]),h=Math.abs(zl[0]-Gl[1]);Math.min(c,h)<i.len()&&(c<h?He.scale(i,u,c*s):He.scale(i,u,-h*s))}}return o},r.prototype._getProjMinMaxOnAxis=function(e,t,i){for(var n=this._axes[e],a=this._origin,s=t[0].dot(n)+a[e],o=s,l=s,u=1;u<t.length;u++){var c=t[u].dot(n)+a[e];o=Math.min(c,o),l=Math.max(c,l)}i[0]=o,i[1]=l},r}(),she=[],ohe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,i){t.call(i,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,i){i?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,i){i=i||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],i)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var i=this._cursor;i<this._displayables.length;i++)t&&t(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)t&&t(this._temporaryDisplayables[i])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var i=this._displayables[t];i.parent=this,i.update(),i.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var i=this._temporaryDisplayables[t];i.parent=this,i.update(),i.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new qe(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(she)),t.union(a)}this._rect=t}return this._rect},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var s=0;s<this._displayables.length;s++){var o=this._displayables[s];if(o.contain(t,i))return!0}return!1},e}(Yn),Z9=ot();function Lf(r,e,t,i,n){var a;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();a=s&&s.animation}var o=e&&e.isAnimationEnabled(),l=r==="update";if(o){var u=void 0,c=void 0,h=void 0;i?(u=Be(i.duration,200),c=Be(i.easing,"cubicOut"),h=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),h=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(h=a.delay)),we(h)&&(h=h(t,n)),we(u)&&(u=u(t));var d={duration:u||0,delay:h,easing:c};return d}else return null}function dD(r,e,t,i,n,a,s){var o=!1,l;we(n)?(s=a,a=n,n=null):De(n)&&(a=n.cb,s=n.during,o=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=Lf(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,n):null);if(c&&c.duration>0){var h=c.duration,d=c.delay,f=c.easing,p={duration:h,delay:d||0,easing:f,done:a,force:!!a||!!s,setToFinal:!u,scope:r,during:s};o?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!o&&e.attr(t),s&&s(1),a&&a()}function ct(r,e,t,i,n,a){dD("update",r,e,t,i,n,a)}function Vt(r,e,t,i,n,a){dD("enter",r,e,t,i,n,a)}function Rh(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function rl(r,e,t,i,n,a){Rh(r)||dD("leave",r,e,t,i,n,a)}function Ck(r,e,t,i){r.removeTextContent(),r.removeTextGuideLine(),rl(r,{style:{opacity:0}},e,t,i)}function vv(r,e,t){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||Ck(n,e,t,i)}):Ck(r,e,t,i)}function _a(r){Z9(r).oldStyle=r.style}function lhe(r){return Z9(r).oldStyle}var k0=Math.max,R0=Math.min,t2={};function uhe(r){return Qe.extend(r)}var che=Hce;function hhe(r,e){return che(r,e)}function Sa(r,e){t2[r]=e}function pD(r){if(t2.hasOwnProperty(r))return t2[r]}function h1(r,e,t,i){var n=q9(r,e);return t&&(i==="center"&&(t=J9(t,n.getBoundingRect())),eH(n,t)),n}function Q9(r,e,t){var i=new Wr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(n){if(t==="center"){var a={width:n.width,height:n.height};i.setStyle(J9(e,a))}}});return i}function J9(r,e){var t=e.width/e.height,i=r.height*t,n;i<=r.width?n=r.height:(i=r.width,n=i/t);var a=r.x+r.width/2,s=r.y+r.height/2;return{x:a-i/2,y:s-n/2,width:i,height:n}}var Un=$ce;function eH(r,e){if(r.applyTransform){var t=r.getBoundingRect(),i=t.calculateTransform(e);r.applyTransform(i)}}function lf(r,e){return I9(r,r,{lineWidth:e}),r}function fhe(r){return P9(r.shape,r.shape,r.style),r}var xy=mu;function Gu(r,e){for(var t=J_([]);r&&r!==e;)Rs(t,r.getLocalTransform(),t),r=r.parent;return t}function ma(r,e,t){return e&&!li(e)&&(e=Is.getLocalTransform(e)),t&&(e=If([],e)),Zr([],r,e)}function f1(r,e,t){var i=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),n=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=ma(a,e,t),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ak(r){return!r.isGroup}function dhe(r){return r.shape!=null}function rg(r,e,t){if(!r||!e)return;function i(s){var o={};return s.traverse(function(l){Ak(l)&&l.anid&&(o[l.anid]=l)}),o}function n(s){var o={x:s.x,y:s.y,rotation:s.rotation};return dhe(s)&&(o.shape=J({},s.shape)),o}var a=i(r);e.traverse(function(s){if(Ak(s)&&s.anid){var o=a[s.anid];if(o){var l=n(s);s.attr(n(o)),ct(s,l,t,ke(s).dataIndex)}}})}function tH(r,e){return oe(r,function(t){var i=t[0];i=k0(i,e.x),i=R0(i,e.x+e.width);var n=t[1];return n=k0(n,e.y),n=R0(n,e.y+e.height),[i,n]})}function phe(r,e){var t=k0(r.x,e.x),i=R0(r.x+r.width,e.x+e.width),n=k0(r.y,e.y),a=R0(r.y+r.height,e.y+e.height);if(i>=t&&a>=n)return{x:t,y:n,width:i-t,height:a-n}}function ig(r,e,t){var i=J({rectHover:!0},e),n=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),Ce(n,t),new Wr(i)):h1(r.replace("path://",""),i,t,"center")}function ap(r,e,t,i,n){for(var a=0,s=n[n.length-1];a<n.length;a++){var o=n[a];if(rH(r,e,t,i,o[0],o[1],s[0],s[1]))return!0;s=o}}function rH(r,e,t,i,n,a,s,o){var l=t-r,u=i-e,c=s-n,h=o-a,d=PT(c,h,l,u);if(vhe(d))return!1;var f=r-n,p=e-a,v=PT(f,p,l,u)/d;if(v<0||v>1)return!1;var g=PT(f,p,c,h)/d;return!(g<0||g>1)}function PT(r,e,t,i){return r*i-t*e}function vhe(r){return r<=1e-6&&r>=-1e-6}function kf(r){var e=r.itemTooltipOption,t=r.componentModel,i=r.itemName,n=pe(e)?{formatter:e}:e,a=t.mainType,s=t.componentIndex,o={componentType:a,name:i,$vars:["name"]};o[a+"Index"]=s;var l=r.formatterParamsExtra;l&&R(rt(l),function(c){_e(o,c)||(o[c]=l[c],o.$vars.push(c))});var u=ke(r.el);u.componentMainType=a,u.componentIndex=s,u.tooltipConfig={name:i,option:Ce({content:i,encodeHTMLContent:!0,formatterParams:o},n)}}function Dk(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function cl(r,e){if(r)if(ie(r))for(var t=0;t<r.length;t++)Dk(r[t],e);else Dk(r,e)}Sa("circle",eo);Sa("ellipse",u1);Sa("sector",Ei);Sa("ring",Jv);Sa("polygon",Ii);Sa("polyline",Pi);Sa("rect",st);Sa("line",kr);Sa("bezierCurve",eg);Sa("arc",c1);const cc=Object.freeze(Object.defineProperty({__proto__:null,Arc:c1,BezierCurve:eg,BoundingRect:qe,Circle:eo,CompoundPath:fD,Ellipse:u1,Group:Le,Image:Wr,IncrementalDisplayable:ohe,Line:kr,LinearGradient:tg,OrientedBoundingRect:L0,Path:Qe,Point:He,Polygon:Ii,Polyline:Pi,RadialGradient:K9,Rect:st,Ring:Jv,Sector:Ei,Text:lt,applyTransform:ma,clipPointsByRect:tH,clipRectByRect:phe,createIcon:ig,extendPath:hhe,extendShape:uhe,getShapeClass:pD,getTransform:Gu,groupTransition:rg,initProps:Vt,isElementRemoved:Rh,lineLineIntersect:rH,linePolygonIntersect:ap,makeImage:Q9,makePath:h1,mergePath:Un,registerShape:Sa,removeElement:rl,removeElementWithFadeOut:vv,resizePath:eH,setTooltipConfig:kf,subPixelOptimize:xy,subPixelOptimizeLine:lf,subPixelOptimizeRect:fhe,transformDirection:f1,traverseElements:cl,updateProps:ct},Symbol.toStringTag,{value:"Module"}));var d1={};function iH(r,e){for(var t=0;t<Di.length;t++){var i=Di[t],n=e[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var s=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(s,!0)}function r2(r,e,t){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,s=e.normal,o;i&&(o=i.getFormattedLabel(n,"normal",null,a,s&&s.get("formatter"),t!=null?{interpolatedValue:t}:null)),o==null&&(o=we(r.defaultText)?r.defaultText(n,r,t):r.defaultText);for(var l={normal:o},u=0;u<Di.length;u++){var c=Di[u],h=e[c];l[c]=Be(i?i.getFormattedLabel(n,c,null,a,h&&h.get("formatter")):null,o)}return l}function Jr(r,e,t,i){t=t||d1;for(var n=r instanceof lt,a=!1,s=0;s<dv.length;s++){var o=e[dv[s]];if(o&&o.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new lt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=r2(t,e),c=e.normal,h=!!c.getShallow("show"),d=kt(c,i&&i.normal,t,!1,!n);d.text=u.normal,n||r.setTextConfig(O0(c,t,!1));for(var s=0;s<Di.length;s++){var f=Di[s],o=e[f];if(o){var p=l.ensureState(f),v=!!Be(o.getShallow("show"),h);if(v!==h&&(p.ignore=!v),p.style=kt(o,i&&i[f],t,!0,!n),p.style.text=u[f],!n){var g=r.ensureState(f);g.textConfig=O0(o,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(d.x=l.style.x),l.style.y!=null&&(d.y=l.style.y),l.ignore=!h,l.useStyle(d),l.dirty(),t.enableTextSetter&&(Rf(l).setLabelText=function(m){var y=r2(t,e,m);iH(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Nr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},i=0;i<Di.length;i++){var n=Di[i];t[n]=r.getModel([n,e])}return t}function kt(r,e,t,i,n){var a={};return ghe(a,r,t,i,n),e&&J(a,e),a}function O0(r,e,t){e=e||{};var i={},n,a=r.getShallow("rotate"),s=Be(r.getShallow("distance"),t?null:5),o=r.getShallow("offset");return n=r.getShallow("position")||(t?null:"inside"),n==="outside"&&(n=e.defaultOutsidePosition||"top"),n!=null&&(i.position=n),o!=null&&(i.offset=o),a!=null&&(a*=Math.PI/180,i.rotation=a),s!=null&&(i.distance=s),i.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",i}function ghe(r,e,t,i,n){t=t||d1;var a=e.ecModel,s=a&&a.option.textStyle,o=mhe(e),l;if(o){l={};for(var u in o)if(o.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Mk(l[u]={},c,s,t,i,n,!1,!0)}}l&&(r.rich=l);var h=e.get("overflow");h&&(r.overflow=h);var d=e.get("minMargin");d!=null&&(r.margin=d),Mk(r,e,s,t,i,n,!0,!1)}function mhe(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||d1).rich;if(t){e=e||{};for(var i=rt(t),n=0;n<i.length;n++){var a=i[n];e[a]=1}}r=r.parentModel}return e}var Ek=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ik=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Pk=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Mk(r,e,t,i,n,a,s,o){t=!n&&t||d1;var l=i&&i.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),h=Be(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(c==="inherit"||c==="auto")&&(l?c=l:c=null),a||(u=u||t.color,c=c||t.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var d=Be(e.getShallow("textBorderWidth"),t.textBorderWidth);d!=null&&(r.lineWidth=d);var f=Be(e.getShallow("textBorderType"),t.textBorderType);f!=null&&(r.lineDash=f);var p=Be(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!n&&h==null&&!o&&(h=i&&i.defaultOpacity),h!=null&&(r.opacity=h),!n&&!a&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var v=0;v<Ek.length;v++){var g=Ek[v],m=Be(e.getShallow(g),t[g]);m!=null&&(r[g]=m)}for(var v=0;v<Ik.length;v++){var g=Ik[v],m=e.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!s||!i.disableBox){for(var v=0;v<Pk.length;v++){var g=Pk[v],m=e.getShallow(g);m!=null&&(r[g]=m)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function vD(r,e){var t=e&&e.getModel("textStyle");return ha([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var Rf=ot();function nH(r,e,t,i){if(r){var n=Rf(r);n.prevValue=n.value,n.value=t;var a=e.normal;n.valueAnimation=a.get("valueAnimation"),n.valueAnimation&&(n.precision=a.get("precision"),n.defaultInterpolatedText=i,n.statesModels=e)}}function aH(r,e,t,i,n){var a=Rf(r);if(!a.valueAnimation||a.prevValue===a.value)return;var s=a.defaultInterpolatedText,o=Be(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var h=T9(t,a.precision,o,l,c);a.interpolatedValue=c===1?null:h;var d=r2({labelDataIndex:e,labelFetcher:n,defaultText:s?s(h):h+""},a.statesModels,h);iH(r,d)}r.percent=0,(a.prevValue==null?Vt:ct)(r,{percent:1},i,e,null,u)}var yhe=["textStyle","color"],MT=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],LT=new lt,_he=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(yhe):null)},r.prototype.getFont=function(){return vD({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<MT.length;i++)t[MT[i]]=this.getShallow(MT[i]);return LT.useStyle(t),LT.update(),LT.getBoundingRect()},r}(),sH=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],bhe=tc(sH),The=function(){function r(){}return r.prototype.getLineStyle=function(e){return bhe(this,e)},r}(),oH=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],She=tc(oH),xhe=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return She(this,e,t)},r}(),yt=function(){function r(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}return r.prototype.init=function(e,t,i){},r.prototype.mergeOption=function(e,t){We(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var i=this.option,n=i==null?i:i[e];if(n==null&&!t){var a=this.parentModel;a&&(n=a.getShallow(e))}return n},r.prototype.getModel=function(e,t){var i=e!=null,n=i?this.parsePath(e):null,a=i?this._doGet(n):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(Ee(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!et.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var i=this.option;if(!e)return i;for(var n=0;n<e.length&&!(e[n]&&(i=i&&typeof i=="object"?i[e[n]]:null,i==null));n++);return i==null&&t&&(i=t._doGet(this.resolveParentPath(e),t.parentModel)),i},r}();iD(yt);Lue(yt);_r(yt,The);_r(yt,xhe);_r(yt,Bue);_r(yt,_he);var whe=Math.round(Math.random()*10);function Of(r){return[r||"",whe++].join("_")}function Che(r){var e={};r.registerSubTypeDefaulter=function(t,i){var n=qa(t);e[n.main]=i},r.determineSubType=function(t,i){var n=i.type;if(!n){var a=qa(t).main;r.hasSubTypes(t)&&e[a]&&(n=e[a](i))}return n}}function Ahe(r,e){r.topologicalTravel=function(a,s,o,l){if(!a.length)return;var u=t(s),c=u.graph,h=u.noEntryList,d={};for(R(a,function(y){d[y]=!0});h.length;){var f=h.pop(),p=c[f],v=!!d[f];v&&(o.call(l,f,p.originalDeps.slice()),delete d[f]),R(p.successor,v?m:g)}R(d,function(){var y="";throw new Error(y)});function g(y){c[y].entryCount--,c[y].entryCount===0&&h.push(y)}function m(y){d[y]=!0,g(y)}};function t(a){var s={},o=[];return R(a,function(l){var u=i(s,l),c=u.originalDeps=e(l),h=n(c,a);u.entryCount=h.length,u.entryCount===0&&o.push(l),R(h,function(d){Xe(u.predecessor,d)<0&&u.predecessor.push(d);var f=i(s,d);Xe(f.successor,d)<0&&f.successor.push(l)})}),{graph:s,noEntryList:o}}function i(a,s){return a[s]||(a[s]={predecessor:[],successor:[]}),a[s]}function n(a,s){var o=[];return R(a,function(l){Xe(s,l)>=0&&o.push(l)}),o}}function hl(r,e){return We(We({},r,!0),e,!0)}const Dhe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},Ehe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}",withoutName:"第{seriesId}个系列是一个{seriesType}",separator:{middle:"",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"",end:""}}}};var N0="ZH",gD="EN",Oh=gD,wy={},mD={},lH=et.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Oh).toUpperCase();return r.indexOf(N0)>-1?N0:Oh}():Oh;function uH(r,e){r=r.toUpperCase(),mD[r]=new yt(e),wy[r]=e}function Ihe(r){if(pe(r)){var e=wy[r.toUpperCase()]||{};return r===N0||r===gD?Ee(e):We(Ee(e),Ee(wy[Oh]),!1)}else return We(Ee(r),Ee(wy[Oh]),!1)}function i2(r){return mD[r]}function Phe(){return mD[Oh]}uH(gD,Dhe);uH(N0,Ehe);var yD=1e3,_D=yD*60,Np=_D*60,Vn=Np*24,Lk=Vn*365,sp={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},mm="{yyyy}-{MM}-{dd}",kk={year:"{yyyy}",month:"{yyyy}-{MM}",day:mm,hour:mm+" "+sp.hour,minute:mm+" "+sp.minute,second:mm+" "+sp.second,millisecond:sp.none},kT=["year","month","day","hour","minute","second","millisecond"],cH=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function go(r,e){return r+="","0000".substr(0,e-r.length)+r}function Nh(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function Mhe(r){return r===Nh(r)}function Lhe(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function p1(r,e,t,i){var n=ls(r),a=n[bD(t)](),s=n[Bh(t)]()+1,o=Math.floor((s-1)/3)+1,l=n[v1(t)](),u=n["get"+(t?"UTC":"")+"Day"](),c=n[gv(t)](),h=(c-1)%12+1,d=n[g1(t)](),f=n[m1(t)](),p=n[y1(t)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=i instanceof yt?i:i2(i||lH)||Phe(),y=m.getModel("time"),_=y.get("month"),b=y.get("monthAbbr"),S=y.get("dayOfWeek"),x=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,go(a%100+"",2)).replace(/{Q}/g,o+"").replace(/{MMMM}/g,_[s-1]).replace(/{MMM}/g,b[s-1]).replace(/{MM}/g,go(s,2)).replace(/{M}/g,s+"").replace(/{dd}/g,go(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,go(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,go(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,go(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,go(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,go(p,3)).replace(/{S}/g,p+"")}function khe(r,e,t,i,n){var a=null;if(pe(t))a=t;else if(we(t))a=t(r.value,e,{level:r.level});else{var s=J({},sp);if(r.level>0)for(var o=0;o<kT.length;++o)s[kT[o]]="{primary|"+s[kT[o]]+"}";var l=t?t.inherit===!1?t:Ce(t,s):s,u=hH(r.value,n);if(l[u])a=l[u];else if(l.inherit){for(var c=cH.indexOf(u),o=c-1;o>=0;--o)if(l[u]){a=l[u];break}a=a||s.none}if(ie(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return p1(new Date(r.value),a,n,i)}function hH(r,e){var t=ls(r),i=t[Bh(e)]()+1,n=t[v1(e)](),a=t[gv(e)](),s=t[g1(e)](),o=t[m1(e)](),l=t[y1(e)](),u=l===0,c=u&&o===0,h=c&&s===0,d=h&&a===0,f=d&&n===1,p=f&&i===1;return p?"year":f?"month":d?"day":h?"hour":c?"minute":u?"second":"millisecond"}function Rk(r,e,t){var i=ut(r)?ls(r):r;switch(e=e||hH(r,t),e){case"year":return i[bD(t)]();case"half-year":return i[Bh(t)]()>=6?1:0;case"quarter":return Math.floor((i[Bh(t)]()+1)/4);case"month":return i[Bh(t)]();case"day":return i[v1(t)]();case"half-day":return i[gv(t)]()/24;case"hour":return i[gv(t)]();case"minute":return i[g1(t)]();case"second":return i[m1(t)]();case"millisecond":return i[y1(t)]()}}function bD(r){return r?"getUTCFullYear":"getFullYear"}function Bh(r){return r?"getUTCMonth":"getMonth"}function v1(r){return r?"getUTCDate":"getDate"}function gv(r){return r?"getUTCHours":"getHours"}function g1(r){return r?"getUTCMinutes":"getMinutes"}function m1(r){return r?"getUTCSeconds":"getSeconds"}function y1(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Rhe(r){return r?"setUTCFullYear":"setFullYear"}function fH(r){return r?"setUTCMonth":"setMonth"}function dH(r){return r?"setUTCDate":"setDate"}function pH(r){return r?"setUTCHours":"setHours"}function vH(r){return r?"setUTCMinutes":"setMinutes"}function gH(r){return r?"setUTCSeconds":"setSeconds"}function mH(r){return r?"setUTCMilliseconds":"setMilliseconds"}function yH(r){if(!d9(r))return pe(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function _H(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Nf=jA;function n2(r,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&ha(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var s=e==="time",o=r instanceof Date;if(s||o){var l=s?ls(r):r;if(isNaN(+l)){if(o)return"-"}else return p1(l,i,t)}if(e==="ordinal")return Sw(r)?n(r):ut(r)&&a(r)?r+"":"-";var u=Ws(r);return a(u)?yH(u):Sw(r)?n(r):typeof r=="boolean"?r+"":"-"}var Ok=["a","b","c","d","e","f","g"],RT=function(r,e){return"{"+r+(e??"")+"}"};function bH(r,e,t){ie(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars||[],a=0;a<n.length;a++){var s=Ok[a];r=r.replace(RT(s),RT(s,0))}for(var o=0;o<i;o++)for(var l=0;l<n.length;l++){var u=e[o][n[l]];r=r.replace(RT(Ok[l],o),t?Bi(u):u)}return r}function Ohe(r,e,t){return R(e,function(i,n){r=r.replace("{"+n+"}",i)}),r}function Nhe(r,e){var t=pe(r)?{color:r,extraCssText:e}:r||{},i=t.color,n=t.type;e=t.extraCssText;var a=t.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Bi(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Bi(i)+";"+(e||"")+'"></span>';var s=t.markerId||"markerX";return{renderMode:a,content:"{"+s+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function ic(r,e){return e=e||"transparent",pe(r)?r:De(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function B0(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Cy=R,TH=["left","right","top","bottom","width","height"],_u=[["width","left","right"],["height","top","bottom"]];function TD(r,e,t,i,n){var a=0,s=0;i==null&&(i=1/0),n==null&&(n=1/0);var o=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),d=h&&h.getBoundingRect(),f,p;if(r==="horizontal"){var v=c.width+(d?-d.x+c.x:0);f=a+v,f>i||l.newline?(a=0,f=v,s+=o+t,o=c.height):o=Math.max(o,c.height)}else{var g=c.height+(d?-d.y+c.y:0);p=s+g,p>n||l.newline?(a+=o+t,s=0,p=g,o=c.width):o=Math.max(o,c.width)}l.newline||(l.x=a,l.y=s,l.markRedraw(),r==="horizontal"?a=f+t:s=p+t)})}var Hu=TD;Ue(TD,"vertical");Ue(TD,"horizontal");function Bhe(r,e,t){var i=e.width,n=e.height,a=ce(r.left,i),s=ce(r.top,n),o=ce(r.right,i),l=ce(r.bottom,n);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(o)||isNaN(parseFloat(r.right)))&&(o=i),(isNaN(s)||isNaN(parseFloat(r.top)))&&(s=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=Nf(t||0),{width:Math.max(o-a-t[1]-t[3],0),height:Math.max(l-s-t[0]-t[2],0)}}function Ar(r,e,t){t=Nf(t||0);var i=e.width,n=e.height,a=ce(r.left,i),s=ce(r.top,n),o=ce(r.right,i),l=ce(r.bottom,n),u=ce(r.width,i),c=ce(r.height,n),h=t[2]+t[0],d=t[1]+t[3],f=r.aspect;switch(isNaN(u)&&(u=i-o-d-a),isNaN(c)&&(c=n-l-h-s),f!=null&&(isNaN(u)&&isNaN(c)&&(f>i/n?u=i*.8:c=n*.8),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(a)&&(a=i-o-u-d),isNaN(s)&&(s=n-l-c-h),r.left||r.right){case"center":a=i/2-u/2-t[3];break;case"right":a=i-u-d;break}switch(r.top||r.bottom){case"middle":case"center":s=n/2-c/2-t[0];break;case"bottom":s=n-c-h;break}a=a||0,s=s||0,isNaN(u)&&(u=i-d-a-(o||0)),isNaN(c)&&(c=n-h-s-(l||0));var p=new qe(a+t[3],s+t[0],u,c);return p.margin=t,p}function _1(r,e,t,i,n,a){var s=!n||!n.hv||n.hv[0],o=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!s&&!o)return!1;var u;if(l==="raw")u=r.type==="group"?new qe(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var h=Ar(Ce({width:u.width,height:u.height},e),t,i),d=s?h.x-u.x:0,f=o?h.y-u.y:0;return l==="raw"?(a.x=d,a.y=f):(a.x+=d,a.y+=f),a===r&&r.markRedraw(),!0}function Fhe(r,e){return r[_u[e][0]]!=null||r[_u[e][1]]!=null&&r[_u[e][2]]!=null}function mv(r){var e=r.layoutMode||r.constructor.layoutMode;return De(e)?e:e?{type:e}:null}function il(r,e,t){var i=t&&t.ignoreSize;!ie(i)&&(i=[i,i]);var n=s(_u[0],0),a=s(_u[1],1);u(_u[0],r,n),u(_u[1],r,a);function s(c,h){var d={},f=0,p={},v=0,g=2;if(Cy(c,function(_){p[_]=r[_]}),Cy(c,function(_){o(e,_)&&(d[_]=p[_]=e[_]),l(d,_)&&f++,l(p,_)&&v++}),i[h])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(v===g||!f)return p;if(f>=g)return d;for(var m=0;m<c.length;m++){var y=c[m];if(!o(d,y)&&o(r,y)){d[y]=r[y];break}}return d}function o(c,h){return c.hasOwnProperty(h)}function l(c,h){return c[h]!=null&&c[h]!=="auto"}function u(c,h,d){Cy(c,function(f){h[f]=d[f]})}}function Bf(r){return SH({},r)}function SH(r,e){return e&&r&&Cy(TH,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var Uhe=ot(),tt=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t,i,n)||this;return a.uid=Of("ec_cpt_model"),a}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=mv(this),a=n?Bf(t):{},s=i.getTheme();We(t,s.get(this.mainType)),We(t,this.getDefaultOption()),n&&il(t,a,n)},e.prototype.mergeOption=function(t,i){We(this.option,t,!0);var n=mv(this);n&&il(this.option,t,n)},e.prototype.optionUpdated=function(t,i){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!Iue(t))return t.defaultOption;var i=Uhe(this);if(!i.defaultOption){for(var n=[],a=t;a;){var s=a.prototype.defaultOption;s&&n.push(s),a=a.superClass}for(var o={},l=n.length-1;l>=0;l--)o=We(o,n[l],!0);i.defaultOption=o}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var n=t+"Index",a=t+"Id";return Zv(this.ecModel,t,{index:this.get(n,!0),id:this.get(a,!0)},i)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(yt);x9(tt,yt);i1(tt);Che(tt);Ahe(tt,Vhe);function Vhe(r){var e=[];return R(tt.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=oe(e,function(t){return qa(t).main}),r!=="dataset"&&Xe(e,"dataset")<=0&&e.unshift("dataset"),e}var xH="";typeof navigator<"u"&&(xH=navigator.platform||"");var Gc="rgba(0, 0, 0, 0.2)";const zhe={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Gc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Gc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Gc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Gc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Gc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Gc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:xH.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var wH=be(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Qn="original",ui="arrayRows",Jn="objectRows",cs="keyedColumns",qo="typedArray",CH="unknown",Ja="column",Ff="row",jr={Must:1,Might:2,Not:3},AH=ot();function Ghe(r){AH(r).datasetMap=be()}function DH(r,e,t){var i={},n=xD(e);if(!n||!r)return i;var a=[],s=[],o=e.ecModel,l=AH(o).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,c,h;r=r.slice(),R(r,function(v,g){var m=De(v)?v:r[g]={name:v};m.type==="ordinal"&&c==null&&(c=g,h=p(m)),i[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});R(r,function(v,g){var m=v.name,y=p(v);if(c==null){var _=d.valueWayDim;f(i[m],_,y),f(s,_,y),d.valueWayDim+=y}else if(c===g)f(i[m],0,y),f(a,0,y);else{var _=d.categoryWayDim;f(i[m],_,y),f(s,_,y),d.categoryWayDim+=y}});function f(v,g,m){for(var y=0;y<m;y++)v.push(g+y)}function p(v){var g=v.dimsDef;return g?g.length:1}return a.length&&(i.itemName=a),s.length&&(i.seriesName=s),i}function SD(r,e,t){var i={},n=xD(r);if(!n)return i;var a=e.sourceFormat,s=e.dimensionsDefine,o;(a===Jn||a===cs)&&R(s,function(c,h){(De(c)?c.name:c)==="name"&&(o=h)});var l=function(){for(var c={},h={},d=[],f=0,p=Math.min(5,t);f<p;f++){var v=IH(e.data,a,e.seriesLayoutBy,s,e.startIndex,f);d.push(v);var g=v===jr.Not;if(g&&c.v==null&&f!==o&&(c.v=f),(c.n==null||c.n===c.v||!g&&d[c.n]===jr.Not)&&(c.n=f),m(c)&&d[c.n]!==jr.Not)return c;g||(v===jr.Might&&h.v==null&&f!==o&&(h.v=f),(h.n==null||h.n===h.v)&&(h.n=f))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(h)?h:null}();if(l){i.value=[l.v];var u=o??l.n;i.itemName=[u],i.seriesName=[u]}return i}function xD(r){var e=r.get("data",!0);if(!e)return Zv(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},mr).models[0]}function Hhe(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Zv(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},mr).models}function EH(r,e){return IH(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function IH(r,e,t,i,n,a){var s,o=5;if(Ki(r))return jr.Not;var l,u;if(i){var c=i[a];De(c)?(l=c.name,u=c.type):pe(c)&&(l=c)}if(u!=null)return u==="ordinal"?jr.Must:jr.Not;if(e===ui){var h=r;if(t===Ff){for(var d=h[a],f=0;f<(d||[]).length&&f<o;f++)if((s=b(d[n+f]))!=null)return s}else for(var f=0;f<h.length&&f<o;f++){var p=h[n+f];if(p&&(s=b(p[a]))!=null)return s}}else if(e===Jn){var v=r;if(!l)return jr.Not;for(var f=0;f<v.length&&f<o;f++){var g=v[f];if(g&&(s=b(g[l]))!=null)return s}}else if(e===cs){var m=r;if(!l)return jr.Not;var d=m[l];if(!d||Ki(d))return jr.Not;for(var f=0;f<d.length&&f<o;f++)if((s=b(d[f]))!=null)return s}else if(e===Qn)for(var y=r,f=0;f<y.length&&f<o;f++){var g=y[f],_=Pf(g);if(!ie(_))return jr.Not;if((s=b(_[a]))!=null)return s}function b(S){var x=pe(S);if(S!=null&&Number.isFinite(Number(S))&&S!=="")return x?jr.Might:jr.Not;if(x&&S!=="-")return jr.Must}return jr.Not}var a2=be();function $he(r,e){Ai(a2.get(r)==null&&e),a2.set(r,e)}function Whe(r,e,t){var i=a2.get(e);if(!i)return t;var n=i(r);return n?t.concat(n):t}var Nk=ot(),qhe=ot(),wD=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,i){var n=xt(this.get("color",!0)),a=this.get("colorLayer",!0);return PH(this,Nk,n,a,e,t,i)},r.prototype.clearColorPalette=function(){Xhe(this,Nk)},r}();function s2(r,e,t,i){var n=xt(r.get(["aria","decal","decals"]));return PH(r,qhe,n,null,e,t,i)}function jhe(r,e){for(var t=r.length,i=0;i<t;i++)if(r[i].length>e)return r[i];return r[t-1]}function PH(r,e,t,i,n,a,s){a=a||r;var o=e(a),l=o.paletteIdx||0,u=o.paletteNameMap=o.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=s==null||!i?t:jhe(i,s);if(c=c||t,!(!c||!c.length)){var h=c[l];return n&&(u[n]=h),o.paletteIdx=(l+1)%c.length,h}}function Xhe(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var ym,Td,Bk,Fk="\0_ec_inner",Yhe=1,CD=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,i,n,a,s,o){a=a||{},this.option=null,this._theme=new yt(a),this._locale=new yt(s),this._optionManager=o},e.prototype.setOption=function(t,i,n){var a=zk(i);this._optionManager.setOption(t,n,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,zk(i))},e.prototype._resetOption=function(t,i){var n=!1,a=this._optionManager;if(!t||t==="recreate"){var s=a.mountOption(t==="recreate");!this.option||t==="recreate"?Bk(this,s):(this.restoreData(),this._mergeOption(s,i)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var o=a.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,i))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var n=this.option,a=this._componentsMap,s=this._componentsCount,o=[],l=be(),u=i&&i.replaceMergeMainTypeMap;Ghe(this),R(t,function(h,d){h!=null&&(tt.hasClass(d)?d&&(o.push(d),l.set(d,!0)):n[d]=n[d]==null?Ee(h):We(n[d],h,!0))}),u&&u.each(function(h,d){tt.hasClass(d)&&!l.get(d)&&(o.push(d),l.set(d,!0))}),tt.topologicalTravel(o,tt.getAllClassMainTypes(),c,this);function c(h){var d=Whe(this,h,xt(t[h])),f=a.get(h),p=f?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",v=y9(f,d,p);bue(v,h,tt),n[h]=null,a.set(h,null),s.set(h,0);var g=[],m=[],y=0,_;R(v,function(b,S){var x=b.existing,C=b.newOption;if(!C)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var D=h==="series",I=tt.getClass(h,b.keyInfo.subType,!D);if(!I)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===I)x.name=b.keyInfo.name,x.mergeOption(C,this),x.optionUpdated(C,!1);else{var M=J({componentIndex:S},b.keyInfo);x=new I(C,this,this,M),J(x,M),b.brandNew&&(x.__requireNewView=!0),x.init(C,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),n[h]=g,a.set(h,m),s.set(h,y),h==="series"&&ym(this)}this._seriesIndices||ym(this)},e.prototype.getOption=function(){var t=Ee(this.option);return R(t,function(i,n){if(tt.hasClass(n)){for(var a=xt(i),s=a.length,o=!1,l=s-1;l>=0;l--)a[l]&&!fv(a[l])?o=!0:(a[l]=null,!o&&s--);a.length=s,t[n]=a}}),delete t[Fk],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var n=this._componentsMap.get(t);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var s=0;s<n.length;s++)if(n[s])return n[s]}}},e.prototype.queryComponents=function(t){var i=t.mainType;if(!i)return[];var n=t.index,a=t.id,s=t.name,o=this._componentsMap.get(i);if(!o||!o.length)return[];var l;return n!=null?(l=[],R(xt(n),function(u){o[u]&&l.push(o[u])})):a!=null?l=Uk("id",a,o):s!=null?l=Uk("name",s,o):l=St(o,function(u){return!!u}),Vk(l,t)},e.prototype.findComponents=function(t){var i=t.query,n=t.mainType,a=o(i),s=a?this.queryComponents(a):St(this._componentsMap.get(n),function(u){return!!u});return l(Vk(s,t));function o(u){var c=n+"Index",h=n+"Id",d=n+"Name";return u&&(u[c]!=null||u[h]!=null||u[d]!=null)?{mainType:n,index:u[c],id:u[h],name:u[d]}:null}function l(u){return t.filter?St(u,t.filter):u}},e.prototype.eachComponent=function(t,i,n){var a=this._componentsMap;if(we(t)){var s=i,o=t;a.each(function(h,d){for(var f=0;h&&f<h.length;f++){var p=h[f];p&&o.call(s,d,p,p.componentIndex)}})}else for(var l=pe(t)?a.get(t):De(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(n,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var i=wr(t,null);return St(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return St(this._componentsMap.get("series"),function(i){return!!i&&i.subType===t})},e.prototype.getSeries=function(){return St(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,i){Td(this),R(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];t.call(i,a,n)},this)},e.prototype.eachRawSeries=function(t,i){R(this._componentsMap.get("series"),function(n){n&&t.call(i,n,n.componentIndex)})},e.prototype.eachSeriesByType=function(t,i,n){Td(this),R(this._seriesIndices,function(a){var s=this._componentsMap.get("series")[a];s.subType===t&&i.call(n,s,a)},this)},e.prototype.eachRawSeriesByType=function(t,i,n){return R(this.getSeriesByType(t),i,n)},e.prototype.isSeriesFiltered=function(t){return Td(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,i){Td(this);var n=[];R(this._seriesIndices,function(a){var s=this._componentsMap.get("series")[a];t.call(i,s,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=be(n)},e.prototype.restoreData=function(t){ym(this);var i=this._componentsMap,n=[];i.each(function(a,s){tt.hasClass(s)&&n.push(s)}),tt.topologicalTravel(n,tt.getAllClassMainTypes(),function(a){R(i.get(a),function(s){s&&(a!=="series"||!Khe(s,t))&&s.restoreData()})})},e.internalField=function(){ym=function(t){var i=t._seriesIndices=[];R(t._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),t._seriesIndicesMap=be(i)},Td=function(t){},Bk=function(t,i){t.option={},t.option[Fk]=Yhe,t._componentsMap=be({series:[]}),t._componentsCount=be();var n=i.aria;De(n)&&n.enabled==null&&(n.enabled=!0),Zhe(i,t._theme.option),We(i,zhe,!1),t._mergeOption(i,null)}}(),e}(yt);function Khe(r,e){if(e){var t=e.seriesIndex,i=e.seriesId,n=e.seriesName;return t!=null&&r.componentIndex!==t||i!=null&&r.id!==i||n!=null&&r.name!==n}}function Zhe(r,e){var t=r.color&&!r.colorLayer;R(e,function(i,n){n==="colorLayer"&&t||tt.hasClass(n)||(typeof i=="object"?r[n]=r[n]?We(r[n],i,!1):Ee(i):r[n]==null&&(r[n]=i))})}function Uk(r,e,t){if(ie(e)){var i=be();return R(e,function(a){if(a!=null){var s=wr(a,null);s!=null&&i.set(a,!0)}}),St(t,function(a){return a&&i.get(a[r])})}else{var n=wr(e,null);return St(t,function(a){return a&&n!=null&&a[r]===n})}}function Vk(r,e){return e.hasOwnProperty("subType")?St(r,function(t){return t&&t.subType===e.subType}):r}function zk(r){var e=be();return r&&R(xt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}_r(CD,wD);var Qhe=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],MH=function(){function r(e){R(Qhe,function(t){this[t]=ge(e[t],e)},this)}return r}(),OT={},ng=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var i=[];R(OT,function(n,a){var s=n.create(e,t);i=i.concat(s||[])}),this._coordinateSystems=i},r.prototype.update=function(e,t){R(this._coordinateSystems,function(i){i.update&&i.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){OT[e]=t},r.get=function(e){return OT[e]},r}(),Jhe=/^(min|max)?(.+)$/,efe=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,i){e&&(R(xt(e.series),function(s){s&&s.data&&Ki(s.data)&&b0(s.data)}),R(xt(e.dataset),function(s){s&&s.source&&Ki(s.source)&&b0(s.source)})),e=Ee(e);var n=this._optionBackup,a=tfe(e,t,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Ee(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,i=this._timelineOptions;if(i.length){var n=e.getComponent("timeline");n&&(t=Ee(i[n.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,s=[],o=[];if(!n.length&&!a)return o;for(var l=0,u=n.length;l<u;l++)rfe(n[l].query,t,i)&&s.push(l);return!s.length&&a&&(s=[-1]),s.length&&!nfe(s,this._currentMediaIndices)&&(o=oe(s,function(c){return Ee(c===-1?a.option:n[c].option)})),this._currentMediaIndices=s,o},r}();function tfe(r,e,t){var i=[],n,a,s=r.baseOption,o=r.timeline,l=r.options,u=r.media,c=!!r.media,h=!!(l||o||s&&s.timeline);s?(a=s,a.timeline||(a.timeline=o)):((h||c)&&(r.options=r.media=null),a=r),c&&ie(u)&&R(u,function(f){f&&f.option&&(f.query?i.push(f):n||(n=f))}),d(a),R(l,function(f){return d(f)}),R(i,function(f){return d(f.option)});function d(f){R(e,function(p){p(f,t)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function rfe(r,e,t){var i={width:e,height:t,aspectratio:e/t},n=!0;return R(r,function(a,s){var o=s.match(Jhe);if(!(!o||!o[1]||!o[2])){var l=o[1],u=o[2].toLowerCase();ife(i[u],a,l)||(n=!1)}}),n}function ife(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function nfe(r,e){return r.join(",")===e.join(",")}var ra=R,yv=De,Gk=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function NT(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=Gk.length;t<i;t++){var n=Gk[t],a=e.normal,s=e.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?We(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),s&&s[n]&&(r[n]=r[n]||{},r[n].emphasis?We(r[n].emphasis,s[n]):r[n].emphasis=s[n],s[n]=null)}}function ri(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var i=r[e].normal,n=r[e].emphasis;i&&(t?(r[e].normal=r[e].emphasis=null,Ce(r[e],i)):r[e]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[e]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function op(r){ri(r,"itemStyle"),ri(r,"lineStyle"),ri(r,"areaStyle"),ri(r,"label"),ri(r,"labelLine"),ri(r,"upperLabel"),ri(r,"edgeLabel")}function pr(r,e){var t=yv(r)&&r[e],i=yv(t)&&t.textStyle;if(i)for(var n=0,a=XL.length;n<a;n++){var s=XL[n];i.hasOwnProperty(s)&&(t[s]=i[s])}}function Rn(r){r&&(op(r),pr(r,"label"),r.emphasis&&pr(r.emphasis,"label"))}function afe(r){if(yv(r)){NT(r),op(r),pr(r,"label"),pr(r,"upperLabel"),pr(r,"edgeLabel"),r.emphasis&&(pr(r.emphasis,"label"),pr(r.emphasis,"upperLabel"),pr(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(NT(e),Rn(e));var t=r.markLine;t&&(NT(t),Rn(t));var i=r.markArea;i&&Rn(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!Ki(a))for(var s=0;s<a.length;s++)Rn(a[s]);R(r.categories,function(u){op(u)})}if(n&&!Ki(n))for(var s=0;s<n.length;s++)Rn(n[s]);if(e=r.markPoint,e&&e.data)for(var o=e.data,s=0;s<o.length;s++)Rn(o[s]);if(t=r.markLine,t&&t.data)for(var l=t.data,s=0;s<l.length;s++)ie(l[s])?(Rn(l[s][0]),Rn(l[s][1])):Rn(l[s]);r.type==="gauge"?(pr(r,"axisLabel"),pr(r,"title"),pr(r,"detail")):r.type==="treemap"?(ri(r.breadcrumb,"itemStyle"),R(r.levels,function(u){op(u)})):r.type==="tree"&&op(r.leaves)}}function ms(r){return ie(r)?r:r?[r]:[]}function Hk(r){return(ie(r)?r[0]:r)||{}}function sfe(r,e){ra(ms(r.series),function(i){yv(i)&&afe(i)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),ra(t,function(i){ra(ms(r[i]),function(n){n&&(pr(n,"axisLabel"),pr(n.axisPointer,"label"))})}),ra(ms(r.parallel),function(i){var n=i&&i.parallelAxisDefault;pr(n,"axisLabel"),pr(n&&n.axisPointer,"label")}),ra(ms(r.calendar),function(i){ri(i,"itemStyle"),pr(i,"dayLabel"),pr(i,"monthLabel"),pr(i,"yearLabel")}),ra(ms(r.radar),function(i){pr(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),ra(ms(r.geo),function(i){yv(i)&&(Rn(i),ra(ms(i.regions),function(n){Rn(n)}))}),ra(ms(r.timeline),function(i){Rn(i),ri(i,"label"),ri(i,"itemStyle"),ri(i,"controlStyle",!0);var n=i.data;ie(n)&&R(n,function(a){De(a)&&(ri(a,"label"),ri(a,"itemStyle"))})}),ra(ms(r.toolbox),function(i){ri(i,"iconStyle"),ra(i.feature,function(n){ri(n,"iconStyle")})}),pr(Hk(r.axisPointer),"label"),pr(Hk(r.tooltip).axisPointer,"label")}function ofe(r,e){for(var t=e.split(","),i=r,n=0;n<t.length&&(i=i&&i[t[n]],i!=null);n++);return i}function lfe(r,e,t,i){for(var n=e.split(","),a=r,s,o=0;o<n.length-1;o++)s=n[o],a[s]==null&&(a[s]={}),a=a[s];a[n[o]]==null&&(a[n[o]]=t)}function $k(r){r&&R(ufe,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var ufe=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],cfe=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],BT=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Sd(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<BT.length;t++){var i=BT[t][1],n=BT[t][0];e[i]!=null&&(e[n]=e[i])}}function Wk(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function qk(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function hfe(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function LH(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&LH(r[t].children,e)}function kH(r,e){sfe(r,e),r.series=xt(r.series),R(r.series,function(t){if(De(t)){var i=t.type;if(i==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(i==="pie"||i==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),Wk(t.label);var n=t.data;if(n&&!Ki(n))for(var a=0;a<n.length;a++)Wk(n[a]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(i==="gauge"){var s=ofe(t,"pointer.color");s!=null&&lfe(t,"itemStyle.color",s)}else if(i==="bar"){Sd(t),Sd(t.backgroundStyle),Sd(t.emphasis);var n=t.data;if(n&&!Ki(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&(Sd(n[a]),Sd(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),qk(t),LH(t.data,qk)}else i==="graph"||i==="sankey"?hfe(t):i==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&Ce(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),$k(t)}}),r.dataRange&&(r.visualMap=r.dataRange),R(cfe,function(t){var i=r[t];i&&(ie(i)||(i=[i]),R(i,function(n){$k(n)}))})}function ffe(r){var e=be();r.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getData(),s={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!s.stackedDimension||!(s.isStackedByIndex||s.stackedByDimension))return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(s)}}),e.each(dfe)}function dfe(r){R(r,function(e,t){var i=[],n=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],s=e.data,o=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";s.modify(a,function(u,c,h){var d=s.get(e.stackedDimension,h);if(isNaN(d))return n;var f,p;o?p=s.getRawIndex(h):f=s.get(e.stackedByDimension,h);for(var v=NaN,g=t-1;g>=0;g--){var m=r[g];if(o||(p=m.data.rawIndexOf(m.stackedByDimension,f)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=uue(d,y),v=y;break}}}return i[0]=d,i[1]=v,i})})}var b1=function(){function r(e){this.data=e.data||(e.sourceFormat===cs?{}:[]),this.sourceFormat=e.sourceFormat||CH,this.seriesLayoutBy=e.seriesLayoutBy||Ja,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;i<t.length;i++){var n=t[i];n.type==null&&EH(this,i)===jr.Must&&(n.type="ordinal")}}return r}();function AD(r){return r instanceof b1}function o2(r,e,t){t=t||RH(r);var i=e.seriesLayoutBy,n=vfe(r,t,i,e.sourceHeader,e.dimensions),a=new b1({data:r,sourceFormat:t,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:Ee(e)});return a}function DD(r){return new b1({data:r,sourceFormat:Ki(r)?qo:Qn})}function pfe(r){return new b1({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Ee(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function RH(r){var e=CH;if(Ki(r))e=qo;else if(ie(r)){r.length===0&&(e=ui);for(var t=0,i=r.length;t<i;t++){var n=r[t];if(n!=null){if(ie(n)||Ki(n)){e=ui;break}else if(De(n)){e=Jn;break}}}}else if(De(r)){for(var a in r)if(_e(r,a)&&li(r[a])){e=cs;break}}return e}function vfe(r,e,t,i,n){var a,s;if(!r)return{dimensionsDefine:jk(n),startIndex:s,dimensionsDetectedCount:a};if(e===ui){var o=r;i==="auto"||i==null?Xk(function(u){u!=null&&u!=="-"&&(pe(u)?s==null&&(s=1):s=0)},t,o,10):s=ut(i)?i:i?1:0,!n&&s===1&&(n=[],Xk(function(u,c){n[c]=u!=null?u+"":""},t,o,1/0)),a=n?n.length:t===Ff?o.length:o[0]?o[0].length:null}else if(e===Jn)n||(n=gfe(r));else if(e===cs)n||(n=[],R(r,function(u,c){n.push(c)}));else if(e===Qn){var l=Pf(r[0]);a=ie(l)&&l.length||1}return{startIndex:s,dimensionsDefine:jk(n),dimensionsDetectedCount:a}}function gfe(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return rt(t)}function jk(r){if(r){var e=be();return oe(r,function(t,i){t=De(t)?t:{name:t};var n={name:t.name,displayName:t.displayName,type:t.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=e.get(n.name);return a?n.name+="-"+a.count++:e.set(n.name,{count:1}),n})}}function Xk(r,e,t,i){if(e===Ff)for(var n=0;n<t.length&&n<i;n++)r(t[n]?t[n][0]:null,n);else for(var a=t[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function OH(r){var e=r.sourceFormat;return e===Jn||e===cs}var Hl,$l,Wl,Yk,Kk,NH=function(){function r(e,t){var i=AD(e)?e:DD(e);this._source=i;var n=this._data=i.data;i.sourceFormat===qo&&(this._offset=0,this._dimSize=t,this._data=n),Kk(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;Kk=function(s,o,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,d=l.dimensionsDefine,f=Yk[ED(u,c)];if(J(s,f),u===qo)s.getItem=t,s.count=n,s.fillStorage=i;else{var p=BH(u,c);s.getItem=ge(p,null,o,h,d);var v=FH(u,c);s.count=ge(v,null,o,h,d)}};var t=function(s,o){s=s-this._offset,o=o||[];for(var l=this._data,u=this._dimSize,c=u*s,h=0;h<u;h++)o[h]=l[c+h];return o},i=function(s,o,l,u){for(var c=this._data,h=this._dimSize,d=0;d<h;d++){for(var f=u[d],p=f[0]==null?1/0:f[0],v=f[1]==null?-1/0:f[1],g=o-s,m=l[d],y=0;y<g;y++){var _=c[y*h+d];m[s+y]=_,_<p&&(p=_),_>v&&(v=_)}f[0]=p,f[1]=v}},n=function(){return this._data?this._data.length/this._dimSize:0};Yk=(e={},e[ui+"_"+Ja]={pure:!0,appendData:a},e[ui+"_"+Ff]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Jn]={pure:!0,appendData:a},e[cs]={pure:!0,appendData:function(s){var o=this._data;R(s,function(l,u){for(var c=o[u]||(o[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[Qn]={appendData:a},e[qo]={persistent:!1,pure:!0,appendData:function(s){this._data=s},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(s){for(var o=0;o<s.length;o++)this._data.push(s[o])}}(),r}(),Zk=function(r,e,t,i){return r[i]},mfe=(Hl={},Hl[ui+"_"+Ja]=function(r,e,t,i){return r[i+e]},Hl[ui+"_"+Ff]=function(r,e,t,i,n){i+=e;for(var a=n||[],s=r,o=0;o<s.length;o++){var l=s[o];a[o]=l?l[i]:null}return a},Hl[Jn]=Zk,Hl[cs]=function(r,e,t,i,n){for(var a=n||[],s=0;s<t.length;s++){var o=t[s].name,l=r[o];a[s]=l?l[i]:null}return a},Hl[Qn]=Zk,Hl);function BH(r,e){var t=mfe[ED(r,e)];return t}var Qk=function(r,e,t){return r.length},yfe=($l={},$l[ui+"_"+Ja]=function(r,e,t){return Math.max(0,r.length-e)},$l[ui+"_"+Ff]=function(r,e,t){var i=r[0];return i?Math.max(0,i.length-e):0},$l[Jn]=Qk,$l[cs]=function(r,e,t){var i=t[0].name,n=r[i];return n?n.length:0},$l[Qn]=Qk,$l);function FH(r,e){var t=yfe[ED(r,e)];return t}var FT=function(r,e,t){return r[e]},_fe=(Wl={},Wl[ui]=FT,Wl[Jn]=function(r,e,t){return r[t]},Wl[cs]=FT,Wl[Qn]=function(r,e,t){var i=Pf(r);return i instanceof Array?i[e]:i},Wl[qo]=FT,Wl);function UH(r){var e=_fe[r];return e}function ED(r,e){return r===ui?r+"_"+e:r}function uf(r,e,t){if(r){var i=r.getRawDataItem(e);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(t!=null){var s=r.getDimensionIndex(t),o=n.getDimensionProperty(s);return UH(a)(i,s,o)}else{var l=i;return a===Qn&&(l=Pf(i)),l}}}}var bfe=/\{@(.+?)\}/g,T1=function(){function r(){}return r.prototype.getDataParams=function(e,t){var i=this.getData(t),n=this.getRawValue(e,t),a=i.getRawIndex(e),s=i.getName(e),o=i.getRawDataItem(e),l=i.getItemVisual(e,"style"),u=l&&l[i.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,d=h==="series",f=i.userOutput&&i.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:s,dataIndex:a,data:o,dataType:t,value:n,color:u,borderColor:c,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,i,n,a,s){t=t||"normal";var o=this.getData(i),l=this.getDataParams(e,i);if(s&&(l.value=s.interpolatedValue),n!=null&&ie(l.value)&&(l.value=l.value[n]),!a){var u=o.getItemModel(e);a=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(we(a))return l.status=t,l.dimensionIndex=n,a(l);if(pe(a)){var c=bH(a,l);return c.replace(bfe,function(h,d){var f=d.length,p=d;p.charAt(0)==="["&&p.charAt(f-1)==="]"&&(p=+p.slice(1,f-1));var v=uf(o,e,p);if(s&&ie(s.interpolatedValue)){var g=o.getDimensionIndex(p);g>=0&&(v=s.interpolatedValue[g])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(e,t){return uf(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,i){},r}();function Jk(r){var e,t;return De(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Bp(r){return new Tfe(r)}var Tfe=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var s=c(this._modBy),o=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(s!==l||o!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!i&&(h||f<p)){var v=this._progress;if(ie(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],f,p,l,u);else this._doProgress(v,f,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,i,n,a){eR.reset(t,i,n,a),this._callingProgress=e,this._callingProgress({start:t,end:i,count:i-t,next:eR.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,i;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(i=t.forceFirstProgress,t=t.progress),ie(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),eR=function(){var r,e,t,i,n,a={reset:function(l,u,c,h){e=l,r=u,t=c,i=h,n=Math.ceil(i/t),a.next=t>1&&i>0?o:s}};return a;function s(){return e<r?e++:null}function o(){var l=e%n*t+Math.ceil(e/n),u=e>=r?null:l<i?l:e;return e++,u}}();function jo(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!ut(r)&&r!=null&&r!=="-"&&(r=+ls(r)),r==null||r===""?NaN:Number(r))}var Sfe=be({number:function(r){return parseFloat(r)},time:function(r){return+ls(r)},trim:function(r){return pe(r)?ha(r):r}});function VH(r){return Sfe.get(r)}var zH={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},xfe=function(){function r(e,t){if(!ut(t)){var i="";vt(i)}this._opFn=zH[e],this._rvalFloat=Ws(t)}return r.prototype.evaluate=function(e){return ut(e)?this._opFn(e,this._rvalFloat):this._opFn(Ws(e),this._rvalFloat)},r}(),GH=function(){function r(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var i=ut(e)?e:Ws(e),n=ut(t)?t:Ws(t),a=isNaN(i),s=isNaN(n);if(a&&(i=this._incomparable),s&&(n=this._incomparable),a&&s){var o=pe(e),l=pe(t);o&&(i=l?e:0),l&&(n=o?t:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r}(),wfe=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ws(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=Ws(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function Cfe(r,e){return r==="eq"||r==="ne"?new wfe(r==="eq",e):_e(zH,r)?new xfe(r,e):null}var Afe=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return jo(e,t)},r}();function Dfe(r,e){var t=new Afe,i=r.data,n=t.sourceFormat=r.sourceFormat,a=r.startIndex,s="";r.seriesLayoutBy!==Ja&&vt(s);var o=[],l={},u=r.dimensionsDefine;if(u)R(u,function(v,g){var m=v.name,y={index:g,name:m,displayName:v.displayName};if(o.push(y),m!=null){var _="";_e(l,m)&&vt(_),l[m]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)o.push({index:c});var h=BH(n,Ja);e.__isBuiltIn&&(t.getRawDataItem=function(v){return h(i,a,o,v)},t.getRawData=ge(Efe,null,r)),t.cloneRawData=ge(Ife,null,r);var d=FH(n,Ja);t.count=ge(d,null,i,a,o);var f=UH(n);t.retrieveValue=function(v,g){var m=h(i,a,o,v);return p(m,g)};var p=t.retrieveValueFromItem=function(v,g){if(v!=null){var m=o[g];if(m)return f(v,g,m.name)}};return t.getDimensionInfo=ge(Pfe,null,o,l),t.cloneAllDimensionInfo=ge(Mfe,null,o),t}function Efe(r){var e=r.sourceFormat;if(!ID(e)){var t="";vt(t)}return r.data}function Ife(r){var e=r.sourceFormat,t=r.data;if(!ID(e)){var i="";vt(i)}if(e===ui){for(var n=[],a=0,s=t.length;a<s;a++)n.push(t[a].slice());return n}else if(e===Jn){for(var n=[],a=0,s=t.length;a<s;a++)n.push(J({},t[a]));return n}}function Pfe(r,e,t){if(t!=null){if(ut(t)||!isNaN(t)&&!_e(e,t))return r[t];if(_e(e,t))return e[t]}}function Mfe(r){return Ee(r)}var HH=be();function Lfe(r){r=Ee(r);var e=r.type,t="";e||vt(t);var i=e.split(":");i.length!==2&&vt(t);var n=!1;i[0]==="echarts"&&(e=i[1],n=!0),r.__isBuiltIn=n,HH.set(e,r)}function kfe(r,e,t){var i=xt(r),n=i.length,a="";n||vt(a);for(var s=0,o=n;s<o;s++){var l=i[s];e=Rfe(l,e),s!==o-1&&(e.length=Math.max(e.length,1))}return e}function Rfe(r,e,t,i){var n="";e.length||vt(n),De(r)||vt(n);var a=r.type,s=HH.get(a);s||vt(n);var o=oe(e,function(u){return Dfe(u,s)}),l=xt(s.transform({upstream:o[0],upstreamList:o,config:Ee(r.config)}));return oe(l,function(u,c){var h="";De(u)||vt(h),u.data||vt(h);var d=RH(u.data);ID(d)||vt(h);var f,p=e[0];if(p&&c===0&&!u.dimensions){var v=p.startIndex;v&&(u.data=p.data.slice(0,v).concat(u.data)),f={seriesLayoutBy:Ja,sourceHeader:v,dimensions:p.metaRawOption.dimensions}}else f={seriesLayoutBy:Ja,sourceHeader:0,dimensions:u.dimensions};return o2(u.data,f,null)})}function ID(r){return r===ui||r===Jn}var S1="undefined",Ofe=typeof Uint32Array===S1?Array:Uint32Array,Nfe=typeof Uint16Array===S1?Array:Uint16Array,$H=typeof Int32Array===S1?Array:Int32Array,tR=typeof Float64Array===S1?Array:Float64Array,WH={float:tR,int:$H,ordinal:Array,number:Array,time:tR},UT;function xd(r){return r>65535?Ofe:Nfe}function Hc(){return[1/0,-1/0]}function Bfe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function rR(r,e,t,i,n){var a=WH[t||"float"];if(n){var s=r[e],o=s&&s.length;if(o!==i){for(var l=new a(i),u=0;u<o;u++)l[u]=s[u];r[e]=l}}else r[e]=new a(i)}var l2=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=be()}return r.prototype.initData=function(e,t,i){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=e.getSource(),a=this.defaultDimValueGetter=UT[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[],OH(n),this._dimensions=oe(t,function(s){return{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(e);if(a!=null){if(n[a].type===t)return a}else a=n.length;return n[a]={type:t},i.set(e,a),this._chunks[a]=new WH[t||"float"](this._rawCount),this._rawExtent[a]=Hc(),a},r.prototype.collectOrdinalMeta=function(e,t){var i=this._chunks[e],n=this._dimensions[e],a=this._rawExtent,s=n.ordinalOffset||0,o=i.length;s===0&&(a[e]=Hc());for(var l=a[e],u=s;u<o;u++){var c=i[u]=t.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}n.ordinalMeta=t,n.ordinalOffset=o,n.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],i=t.ordinalMeta;return i},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,i=this.count();t.appendData(e);var n=t.count();return t.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(e,t){for(var i=this._chunks,n=this._dimensions,a=n.length,s=this._rawExtent,o=this.count(),l=o+Math.max(e.length,t||0),u=0;u<a;u++){var c=n[u];rR(i,u,c.type,l,!0)}for(var h=[],d=o;d<l;d++)for(var f=d-o,p=0;p<a;p++){var c=n[p],v=UT.arrayRows.call(this,e[f]||h,c.property,f,p);i[p][d]=v;var g=s[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:o,end:l}},r.prototype._initDataFromProvider=function(e,t,i){for(var n=this._provider,a=this._chunks,s=this._dimensions,o=s.length,l=this._rawExtent,u=oe(s,function(y){return y.property}),c=0;c<o;c++){var h=s[c];l[c]||(l[c]=Hc()),rR(a,c,h.type,t,i)}if(n.fillStorage)n.fillStorage(e,t,a,l);else for(var d=[],f=e;f<t;f++){d=n.getItem(f,d);for(var p=0;p<o;p++){var v=a[p],g=this._dimValueGetter(d,u[p],f,p);v[f]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._chunks[e];return i?i[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var i=[],n=[];if(t==null){t=e,e=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=e;for(var a=0,s=n.length;a<s;a++)i.push(this.get(n[a],t));return i},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._chunks[e];return i?i[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],i=0;if(t)for(var n=0,a=this.count();n<a;n++){var s=this.get(e,n);isNaN(s)||(i+=s)}return i},r.prototype.getMedian=function(e){var t=[];this.each([e],function(a){isNaN(a)||t.push(a)});var i=t.sort(function(a,s){return a-s}),n=this.count();return n===0?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&i<this._count&&i===e)return e;for(var n=0,a=this._count-1;n<=a;){var s=(n+a)/2|0;if(t[s]<e)n=s+1;else if(t[s]>e)a=s-1;else return s}return-1},r.prototype.indicesOfNearest=function(e,t,i){var n=this._chunks,a=n[e],s=[];if(!a)return s;i==null&&(i=1/0);for(var o=1/0,l=-1,u=0,c=0,h=this.count();c<h;c++){var d=this.getRawIndex(c),f=t-a[d],p=Math.abs(f);p<=i&&((p<o||p===o&&f>=0&&l<0)&&(o=p,l=f,u=0),f===l&&(s[u++]=c))}return s.length=u,s},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,n=this._count;if(i===Array){e=new i(n);for(var a=0;a<n;a++)e[a]=t[a]}else e=new i(t.buffer,0,n)}else{var i=xd(this._rawCount);e=new i(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=xd(i._rawCount),s=new a(n),o=[],l=e.length,u=0,c=e[0],h=i._chunks,d=0;d<n;d++){var f=void 0,p=i.getRawIndex(d);if(l===0)f=t(d);else if(l===1){var v=h[c][p];f=t(v,d)}else{for(var g=0;g<l;g++)o[g]=h[e[g]][p];o[g]=d,f=t.apply(null,o)}f&&(s[u++]=p)}return u<n&&(i._indices=s),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(e){var t=this.clone(),i=t._count;if(!i)return this;var n=rt(e),a=n.length;if(!a)return this;var s=t.count(),o=xd(t._rawCount),l=new o(s),u=0,c=n[0],h=e[c][0],d=e[c][1],f=t._chunks,p=!1;if(!t._indices){var v=0;if(a===1){for(var g=f[n[0]],m=0;m<i;m++){var y=g[m];(y>=h&&y<=d||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(a===2){for(var g=f[n[0]],_=f[n[1]],b=e[n[1]][0],S=e[n[1]][1],m=0;m<i;m++){var y=g[m],x=_[m];(y>=h&&y<=d||isNaN(y))&&(x>=b&&x<=S||isNaN(x))&&(l[u++]=v),v++}p=!0}}if(!p)if(a===1)for(var m=0;m<s;m++){var C=t.getRawIndex(m),y=f[n[0]][C];(y>=h&&y<=d||isNaN(y))&&(l[u++]=C)}else for(var m=0;m<s;m++){for(var D=!0,C=t.getRawIndex(m),I=0;I<a;I++){var M=n[I],y=f[M][C];(y<e[M][0]||y>e[M][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(m))}return u<s&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var i=this.clone(e);return this._updateDims(i,e,t),i},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,i){for(var n=e._chunks,a=[],s=t.length,o=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=Hc();for(var h=0;h<o;h++){for(var d=e.getRawIndex(h),f=0;f<s;f++)l[f]=n[t[f]][d];l[s]=h;var p=i&&i.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var v=t[c],g=p[c],m=u[v],y=n[v];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),n=i._chunks,a=n[e],s=this.count(),o=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,h,d,f=new(xd(this._rawCount))(Math.min((Math.ceil(s/l)+2)*2,s));f[o++]=u;for(var p=1;p<s-1;p+=l){for(var v=Math.min(p+l,s-1),g=Math.min(p+l*2,s),m=(g+v)/2,y=0,_=v;_<g;_++){var b=this.getRawIndex(_),S=a[b];isNaN(S)||(y+=S)}y/=g-v;var x=p,C=Math.min(p+l,s),D=p-1,I=a[u];c=-1,d=x;for(var M=-1,L=0,_=x;_<C;_++){var b=this.getRawIndex(_),S=a[b];if(isNaN(S)){L++,M<0&&(M=b);continue}h=Math.abs((D-m)*(S-I)-(D-_)*(y-I)),h>c&&(c=h,d=b)}L>0&&L<C-x&&(f[o++]=Math.min(M,d),d=Math.max(M,d)),f[o++]=d,u=d}return f[o++]=this.getRawIndex(s-1),i._count=o,i._indices=f,i.getRawIndex=this._getRawIdx,i},r.prototype.downSample=function(e,t,i,n){for(var a=this.clone([e],!0),s=a._chunks,o=[],l=Math.floor(1/t),u=s[e],c=this.count(),h=a._rawExtent[e]=Hc(),d=new(xd(this._rawCount))(Math.ceil(c/l)),f=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,o.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);o[v]=u[g]}var m=i(o),y=this.getRawIndex(Math.min(p+n(o,m)||0,c-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),d[f++]=y}return a._count=f,a._indices=d,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var i=e.length,n=this._chunks,a=0,s=this.count();a<s;a++){var o=this.getRawIndex(a);switch(i){case 0:t(a);break;case 1:t(n[e[0]][o],a);break;case 2:t(n[e[0]][o],n[e[1]][o],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[e[l]][o];u[l]=a,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],i=Hc();if(!t)return i;var n=this.count(),a=!this._indices,s;if(a)return this._rawExtent[e].slice();if(s=this._extent[e],s)return s.slice();s=i;for(var o=s[0],l=s[1],u=0;u<n;u++){var c=this.getRawIndex(u),h=t[c];h<o&&(o=h),h>l&&(l=h)}return s=[o,l],this._extent[e]=s,s},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][t]);return i},r.prototype.clone=function(e,t){var i=new r,n=this._chunks,a=e&&as(e,function(o,l){return o[l]=!0,o},{});if(a)for(var s=0;s<n.length;s++)i._chunks[s]=a[s]?Bfe(n[s]):n[s];else i._chunks=n;return this._copyCommonProps(i),t||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Ee(this._extent),e._rawExtent=Ee(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var i=this._indices.length;t=new e(i);for(var n=0;n<i;n++)t[n]=this._indices[n]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,i,n,a){return jo(t[a],this._dimensions[a])}UT={arrayRows:e,objectRows:function(t,i,n,a){return jo(t[i],this._dimensions[a])},keyedColumns:e,original:function(t,i,n,a){var s=t&&(t.value==null?t:t.value);return jo(s instanceof Array?s[a]:s,this._dimensions[a])},typedArray:function(t,i,n,a){return t[a]}}}(),r}(),qH=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,n,a;if(_m(e)){var s=e,o=void 0,l=void 0,u=void 0;if(i){var c=t[0];c.prepareSource(),u=c.getSource(),o=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else o=s.get("data",!0),l=Ki(o)?qo:Qn,a=[];var h=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},f=Be(h.seriesLayoutBy,d.seriesLayoutBy)||null,p=Be(h.sourceHeader,d.sourceHeader),v=Be(h.dimensions,d.dimensions),g=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||v;n=g?[o2(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:v},l)]:[]}else{var m=e;if(i){var y=this._applyTransform(t);n=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);n=[o2(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var a="";e.length!==1&&nR(a)}var s,o=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(n||0),h="";n!=null&&!c&&nR(h),o.push(c),l.push(u._getVersionSign())}),i?s=kfe(i,o,{datasetIndex:t.componentIndex}):n!=null&&(s=[pfe(o[0])]),{sourceList:s,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var i=e[t];if(i._isDirty()||this._upstreamSignList[t]!==i._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,i){var n=0,a=this._storeList,s=a[n];s||(s=a[n]={});var o=s[i];if(!o){var l=this._getUpstreamSourceManagers()[0];_m(this._sourceHost)&&l?o=l._innerGetDataStore(e,t,i):(o=new l2,o.initData(new NH(t,e.length),e)),s[i]=o}return o},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(_m(e)){var t=xD(e);return t?[t.getSourceManager()]:[]}else return oe(Hhe(e),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,i,n;if(_m(e))t=e.get("seriesLayoutBy",!0),i=e.get("sourceHeader",!0),n=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;t=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:i,dimensions:n}},r}();function iR(r){var e=r.option.transform;e&&b0(r.option.transform)}function _m(r){return r.mainType==="series"}function nR(r){throw new Error(r)}var jH="line-height:1";function XH(r,e){var t=r.color||"#6e7079",i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||"#464646",s=r.fontSize||14,o=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Bi(i+"")+"px;color:"+Bi(t)+";font-weight:"+Bi(n+""),valueStyle:"font-size:"+Bi(s+"")+"px;color:"+Bi(a)+";font-weight:"+Bi(o+"")}:{nameStyle:{fontSize:i,fill:t,fontWeight:n},valueStyle:{fontSize:s,fill:a,fontWeight:o}}}var Ffe=[0,10,20,30],Ufe=["",`
`,`
`,`
`];function Br(r,e){return e.type=r,e}function u2(r){return r.type==="section"}function YH(r){return u2(r)?Vfe:zfe}function KH(r){if(u2(r)){var e=0,t=r.blocks.length,i=t>1||t>0&&!r.noHeader;return R(r.blocks,function(n){var a=KH(n);a>=e&&(e=a+ +(i&&(!a||u2(n)&&!n.noHeader)))}),e}return 0}function Vfe(r,e,t,i){var n=e.noHeader,a=Gfe(KH(e)),s=[],o=e.blocks||[];Ai(!o||ie(o)),o=o||[];var l=r.orderMode;if(e.sortBlocks&&l){o=o.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(_e(u,l)){var c=new GH(u[l],null);o.sort(function(p,v){return c.evaluate(p.sortParam,v.sortParam)})}else l==="seriesDesc"&&o.reverse()}R(o,function(p,v){var g=e.valueFormatter,m=YH(p)(g?J(J({},r),{valueFormatter:g}):r,p,v>0?a.html:0,i);m!=null&&s.push(m)});var h=r.renderMode==="richText"?s.join(a.richText):c2(s.join(""),n?t:a.html);if(n)return h;var d=n2(e.header,"ordinal",r.useUTC),f=XH(i,r.renderMode).nameStyle;return r.renderMode==="richText"?ZH(r,d,f)+a.richText+h:c2('<div style="'+f+";"+jH+';">'+Bi(d)+"</div>"+h,t)}function zfe(r,e,t,i){var n=r.renderMode,a=e.noName,s=e.noValue,o=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(b){return b=ie(b)?b:[b],oe(b,function(S,x){return n2(S,ie(f)?f[x]:f,u)})};if(!(a&&s)){var h=o?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),d=a?"":n2(l,"ordinal",u),f=e.valueType,p=s?[]:c(e.value,e.dataIndex),v=!o||!a,g=!o&&a,m=XH(i,n),y=m.nameStyle,_=m.valueStyle;return n==="richText"?(o?"":h)+(a?"":ZH(r,d,y))+(s?"":Wfe(r,p,v,g,_)):c2((o?"":h)+(a?"":Hfe(d,!o,y))+(s?"":$fe(p,v,g,_)),t)}}function aR(r,e,t,i,n,a){if(r){var s=YH(r),o={useUTC:n,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return s(o,r,0,a)}}function Gfe(r){return{html:Ffe[r],richText:Ufe[r]}}function c2(r,e){var t='<div style="clear:both"></div>',i="margin: "+e+"px 0 0";return'<div style="'+i+";"+jH+';">'+r+t+"</div>"}function Hfe(r,e,t){var i=e?"margin-left:2px":"";return'<span style="'+t+";"+i+'">'+Bi(r)+"</span>"}function $fe(r,e,t,i){var n=t?"10px":"20px",a=e?"float:right;margin-left:"+n:"";return r=ie(r)?r:[r],'<span style="'+a+";"+i+'">'+oe(r,function(s){return Bi(s)}).join("&nbsp;&nbsp;")+"</span>"}function ZH(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function Wfe(r,e,t,i,n){var a=[n],s=i?10:20;return t&&a.push({padding:[0,0,0,s],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(ie(e)?e.join(" "):e,a)}function QH(r,e){var t=r.getData().getItemVisual(e,"style"),i=t[r.visualDrawType];return ic(i)}function JH(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var VT=function(){function r(){this.richTextStyles={},this._nextStyleNameId=p9()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,i){var n=i==="richText"?this._generateStyleName():null,a=Nhe({color:t,type:e,renderMode:i,markerId:n});return pe(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var i={};ie(t)?R(t,function(a){return J(i,a)}):J(i,t);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+e+"}"},r}();function e$(r){var e=r.series,t=r.dataIndex,i=r.multipleSeries,n=e.getData(),a=n.mapDimensionsAll("defaultedTooltip"),s=a.length,o=e.getRawValue(t),l=ie(o),u=QH(e,t),c,h,d,f;if(s>1||l&&!s){var p=qfe(o,e,t,a,u);c=p.inlineValues,h=p.inlineValueTypes,d=p.blocks,f=p.inlineValues[0]}else if(s){var v=n.getDimensionInfo(a[0]);f=c=uf(n,t,a[0]),h=v.type}else f=c=l?o[0]:o;var g=tD(e),m=g&&e.name||"",y=n.getName(t),_=i?m:y;return Br("section",{header:m,noHeader:i||!g,sortParam:f,blocks:[Br("nameValue",{markerType:"item",markerColor:u,name:_,noName:!ha(_),value:c,valueType:h,dataIndex:t})].concat(d||[])})}function qfe(r,e,t,i,n){var a=e.getData(),s=as(r,function(h,d,f){var p=a.getDimensionInfo(f);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),o=[],l=[],u=[];i.length?R(i,function(h){c(uf(a,t,h),h)}):R(r,c);function c(h,d){var f=a.getDimensionInfo(d);!f||f.otherDims.tooltip===!1||(s?u.push(Br("nameValue",{markerType:"subItem",markerColor:n,name:f.displayName,value:h,valueType:f.type})):(o.push(h),l.push(f.type)))}return{inlineValues:o,inlineValueTypes:l,blocks:u}}var mo=ot();function bm(r,e){return r.getName(e)||r.getId(e)}var Ay="__universalTransitionEnabled",Ot=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Bp({count:Xfe,reset:Yfe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var a=mo(this).sourceManager=new qH(this);a.prepareSource();var s=this.getInitialData(t,n);oR(s,this),this.dataTask.context.data=s,mo(this).dataBeforeProcessed=s,sR(this),this._initSelectedMapFromData(s)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=mv(this),a=n?Bf(t):{},s=this.subType;tt.hasClass(s)&&(s+="Series"),We(t,i.getTheme().get(this.subType)),We(t,this.getDefaultOption()),Ju(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&il(t,a,n)},e.prototype.mergeOption=function(t,i){t=We(this.option,t,!0),this.fillDataTextStyle(t.data);var n=mv(this);n&&il(this.option,t,n);var a=mo(this).sourceManager;a.dirty(),a.prepareSource();var s=this.getInitialData(t,i);oR(s,this),this.dataTask.dirty(),this.dataTask.context.data=s,mo(this).dataBeforeProcessed=s,sR(this),this._initSelectedMapFromData(s)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ki(t))for(var i=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Ju(t[n],"label",i)},e.prototype.getInitialData=function(t,i){},e.prototype.appendData=function(t){var i=this.getRawData();i.appendData(t.data)},e.prototype.getData=function(t){var i=h2(this);if(i){var n=i.context.data;return t==null||!n.getLinkedData?n:n.getLinkedData(t)}else return mo(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var i=h2(this);if(i){var n=i.context;n.outputData=t,i!==this.dataTask&&(n.data=t)}mo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return be(t)},e.prototype.getSourceManager=function(){return mo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return mo(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,i,n){return e$({series:this,dataIndex:t,multipleSeries:i})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(et.node&&!(t&&t.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,n){var a=this.ecModel,s=wD.prototype.getColorFromPalette.call(this,t,i,n);return s||(s=a.getColorFromPalette(t,i,n)),s},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,s=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<t.length;o++){var l=t[o],u=bm(s,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,i){for(var n=[],a=0;a<t.length;a++)n[0]=t[a],this.isSelected(t[a],i)?this.unselect(n,i):this.select(n,i)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,i=rt(t),n=[],a=0;a<i.length;a++){var s=t[i[a]];s>=0&&n.push(s)}return n},e.prototype.isSelected=function(t,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[bm(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Ay])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var n,a,s=this.option,o=s.selectedMode,l=i.length;if(!(!o||!l)){if(o==="series")s.selectedMap="all";else if(o==="multiple"){De(s.selectedMap)||(s.selectedMap={});for(var u=s.selectedMap,c=0;c<l;c++){var h=i[c],d=bm(t,h);u[d]=!0,this._selectedDataIndicesMap[d]=t.getRawIndex(h)}}else if(o==="single"||o===!0){var f=i[l-1],d=bm(t,f);s.selectedMap=(n={},n[d]=!0,n),this._selectedDataIndicesMap=(a={},a[d]=t.getRawIndex(f),a)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var i=[];t.hasItemOption&&t.each(function(n){var a=t.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(t,i)}},e.registerClass=function(t){return tt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(tt);_r(Ot,T1);_r(Ot,wD);x9(Ot,tt);function sR(r){var e=r.name;tD(r)||(r.name=jfe(r)||e)}function jfe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return R(t,function(n){var a=e.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function Xfe(r){return r.model.getRawData().count()}function Yfe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),Kfe}function Kfe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function oR(r,e){R(T0(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Ue(Zfe,e))})}function Zfe(r,e){var t=h2(r);return t&&t.setOutputEnd((e||this).count()),e}function h2(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var i=t.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var $t=function(){function r(){this.group=new Le,this.uid=Of("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){},r.prototype.updateLayout=function(e,t,i,n){},r.prototype.updateVisual=function(e,t,i,n){},r.prototype.toggleBlurSeries=function(e,t,i){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();iD($t);i1($t);function Uf(){var r=ot();return function(e){var t=r(e),i=e.pipelineContext,n=!!t.large,a=!!t.progressiveRender,s=t.large=!!(i&&i.large),o=t.progressiveRender=!!(i&&i.progressiveRender);return(n!==s||a!==o)&&"reset"}}var t$=ot(),Qfe=Uf(),Ct=function(){function r(){this.group=new Le,this.uid=Of("viewChart"),this.renderTask=Bp({plan:Jfe,reset:ede}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.highlight=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&uR(a,n,"emphasis")},r.prototype.downplay=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&uR(a,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateLayout=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.eachRendered=function(e){cl(this.group,e)},r.markUpdateMethod=function(e,t){t$(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function lR(r,e,t){r&&pv(r)&&(e==="emphasis"?qs:js)(r,t)}function uR(r,e,t){var i=ec(r,e),n=e&&e.highlightKey!=null?Nce(e.highlightKey):null;i!=null?R(xt(i),function(a){lR(r.getItemGraphicEl(a),t,n)}):r.eachItemGraphicEl(function(a){lR(a,t,n)})}iD(Ct);i1(Ct);function Jfe(r){return Qfe(r.model)}function ede(r){var e=r.model,t=r.ecModel,i=r.api,n=r.payload,a=e.pipelineContext.progressiveRender,s=r.view,o=n&&t$(n).updateMethod,l=a?"incrementalPrepareRender":o&&s[o]?o:"render";return l!=="render"&&s[l](e,t,i,n),tde[l]}var tde={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},F0="\0__throttleOriginMethod",cR="\0__throttleRate",hR="\0__throttleType";function PD(r,e,t){var i,n=0,a=0,s=null,o,l,u,c;e=e||0;function h(){a=new Date().getTime(),s=null,r.apply(l,u||[])}var d=function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];i=new Date().getTime(),l=this,u=f;var v=c||e,g=c||t;c=null,o=i-(g?n:a)-v,clearTimeout(s),g?s=setTimeout(h,v):o>=0?h():s=setTimeout(h,-o),n=i};return d.clear=function(){s&&(clearTimeout(s),s=null)},d.debounceNextCall=function(f){c=f},d}function Vf(r,e,t,i){var n=r[e];if(n){var a=n[F0]||n,s=n[hR],o=n[cR];if(o!==t||s!==i){if(t==null||!i)return r[e]=a;n=r[e]=PD(a,t,i==="debounce"),n[F0]=a,n[hR]=i,n[cR]=t}return n}}function _v(r,e){var t=r[e];t&&t[F0]&&(t.clear&&t.clear(),r[e]=t[F0])}var fR=ot(),dR={itemStyle:tc(oH,!0),lineStyle:tc(sH,!0)},rde={lineStyle:"stroke",itemStyle:"fill"};function r$(r,e){var t=r.visualStyleMapper||dR[e];return t||(console.warn("Unknown style type '"+e+"'."),dR.itemStyle)}function i$(r,e){var t=r.visualDrawType||rde[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var ide={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=r$(r,i),s=a(n),o=n.getShallow("decal");o&&(t.setVisual("decal",o),o.dirty=!0);var l=i$(r,i),u=s[l],c=we(u)?u:null,h=s.fill==="auto"||s.stroke==="auto";if(!s[l]||c||h){var d=r.getColorFromPalette(r.name,null,e.getSeriesCount());s[l]||(s[l]=d,t.setVisual("colorFromPalette",!0)),s.fill=s.fill==="auto"||we(s.fill)?d:s.fill,s.stroke=s.stroke==="auto"||we(s.stroke)?d:s.stroke}if(t.setVisual("style",s),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(f,p){var v=r.getDataParams(p),g=J({},s);g[l]=c(v),f.setItemVisual(p,"style",g)}}}},wd=new yt,nde={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r$(r,i),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(s,o){var l=s.getRawDataItem(o);if(l&&l[i]){wd.option=l[i];var u=n(wd),c=s.ensureUniqueItemVisual(o,"style");J(c,u),wd.option.decal&&(s.setItemVisual(o,"decal",wd.option.decal),wd.option.decal.dirty=!0),a in u&&s.setItemVisual(o,"colorFromPalette",!1)}}:null}}}},ade={performRawSeries:!0,overallReset:function(r){var e=be();r.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,a=e.get(n);a||(a={},e.set(n,a)),fR(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),n={},a=t.getData(),s=fR(t).scope,o=t.visualStyleAccessPath||"itemStyle",l=i$(t,o);a.each(function(u){var c=a.getRawIndex(u);n[c]=u}),i.each(function(u){var c=n[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var d=a.ensureUniqueItemVisual(c,"style"),f=i.getName(u)||u+"",p=i.count();d[l]=t.getColorFromPalette(f,s,p)}})}})}},Tm=Math.PI;function sde(r,e){e=e||{},Ce(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Le,i=new st({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var n=new lt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new st({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var s;return e.showSpinner&&(s=new c1({shape:{startAngle:-Tm/2,endAngle:-Tm/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),s.animateShape(!0).when(1e3,{endAngle:Tm*3/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:Tm*3/2}).delay(300).start("circularInOut"),t.add(s)),t.resize=function(){var o=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&o?10:0)-o)/2-(e.showSpinner&&o?0:5+o/2)+(e.showSpinner?0:o/2)+(o?0:l),c=r.getHeight()/2;e.showSpinner&&s.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var n$=function(){function r(e,t,i,n){this._stageTaskMap=be(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,a=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex,s=a?i.step:null,o=n&&n.modDataCount,l=o!=null?Math.ceil(o/s):null;return{step:s,modBy:l,modDataCount:o}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData(),a=n.count(),s=i.progressiveEnabled&&t.incrementalPrepareRender&&a>=i.threshold,o=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:s,modDataCount:l,large:o}},r.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=be();e.eachSeries(function(n){var a=n.getProgressive(),s=n.uid;i.set(s,{id:s,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;R(this._allHandlers,function(n){var a=e.get(n.uid)||e.set(n.uid,{}),s="";Ai(!(n.reset&&n.overallReset),s),n.reset&&this._createSeriesStageTask(n,a,t,i),n.overallReset&&this._createOverallStageTask(n,a,t,i)},this)},r.prototype.prepareView=function(e,t,i,n){var a=e.renderTask,s=a.context;s.model=t,s.ecModel=i,s.api=n,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},r.prototype._performStageTasks=function(e,t,i,n){n=n||{};var a=!1,s=this;R(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=s._stageTaskMap.get(l.uid),h=c.seriesTaskMap,d=c.overallTask;if(d){var f,p=d.agentStubMap;p.each(function(g){o(n,g)&&(g.dirty(),f=!0)}),f&&d.dirty(),s.updatePayload(d,i);var v=s.getPerformArgs(d,n.block);p.each(function(g){g.perform(v)}),d.perform(v)&&(a=!0)}else h&&h.each(function(g,m){o(n,g)&&g.dirty();var y=s.getPerformArgs(g,n.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),s.updatePayload(g,i),g.perform(y)&&(a=!0)})}});function o(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,i,n){var a=this,s=t.seriesTaskMap,o=t.seriesTaskMap=be(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,n).each(c);function c(h){var d=h.uid,f=o.set(d,s&&s.get(d)||Bp({plan:hde,reset:fde,count:pde}));f.context={model:h,ecModel:i,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,f)}},r.prototype._createOverallStageTask=function(e,t,i,n){var a=this,s=t.overallTask=t.overallTask||Bp({reset:ode});s.context={ecModel:i,api:n,overallReset:e.overallReset,scheduler:a};var o=s.agentStubMap,l=s.agentStubMap=be(),u=e.seriesType,c=e.getTargetSeries,h=!0,d=!1,f="";Ai(!e.createOnAllSeries,f),u?i.eachRawSeriesByType(u,p):c?c(i,n).each(p):(h=!1,R(i.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,o&&o.get(g)||(d=!0,Bp({reset:lde,onDirty:cde})));m.context={model:v,overallProgress:h},m.agent=s,m.__block=h,a._pipe(v,m)}d&&s.dirty()},r.prototype._pipe=function(e,t){var i=e.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return we(e)&&(e={overallReset:e,seriesType:vde(e)}),e.uid=Of("stageHandler"),t&&(e.visualType=t),e},r}();function ode(r){r.overallReset(r.ecModel,r.api,r.payload)}function lde(r){return r.overallProgress&&ude}function ude(){this.agent.dirty(),this.getDownstream().dirty()}function cde(){this.agent&&this.agent.dirty()}function hde(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function fde(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=xt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?oe(e,function(t,i){return a$(i)}):dde}var dde=a$(0);function a$(r){return function(e,t){var i=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var a=e.start;a<e.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(e,i)}}function pde(r){return r.data.count()}function vde(r){U0=null;try{r(bv,s$)}catch{}return U0}var bv={},s$={},U0;o$(bv,CD);o$(s$,MH);bv.eachSeriesByType=bv.eachRawSeriesByType=function(r){U0=r};bv.eachComponent=function(r){r.mainType==="series"&&r.subType&&(U0=r.subType)};function o$(r,e){for(var t in e.prototype)r[t]=lr}var pR=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const gde={color:pR,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],pR]};var vi="#B9B8CE",vR="#100C2A",Sm=function(){return{axisLine:{lineStyle:{color:vi}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},gR=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],l$={darkMode:!0,color:gR,backgroundColor:vR,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:vi}},textStyle:{color:vi},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:vi}},dataZoom:{borderColor:"#71708A",textStyle:{color:vi},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:vi}},timeline:{lineStyle:{color:vi},label:{color:vi},controlStyle:{color:vi,borderColor:vi}},calendar:{itemStyle:{color:vR},dayLabel:{color:vi},monthLabel:{color:vi},yearLabel:{color:vi}},timeAxis:Sm(),logAxis:Sm(),valueAxis:Sm(),categoryAxis:Sm(),line:{symbol:"circle"},graph:{color:gR},gauge:{title:{color:vi},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:vi},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};l$.categoryAxis.splitLine.show=!1;var mde=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},i={},n={};if(pe(e)){var a=qa(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var s=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};R(e,function(l,u){for(var c=!1,h=0;h<s.length;h++){var d=s[h],f=u.lastIndexOf(d);if(f>0&&f===u.length-d.length){var p=u.slice(0,f);p!=="data"&&(t.mainType=p,t[d.toLowerCase()]=l,c=!0)}}o.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:n}},r.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,s=i.model,o=i.view;if(!s||!o)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,s,"mainType")&&c(l,s,"subType")&&c(l,s,"index","componentIndex")&&c(l,s,"name")&&c(l,s,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,n,a));function c(h,d,f,p){return h[f]==null||d[p||f]===h[f]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),f2=["symbol","symbolSize","symbolRotate","symbolOffset"],mR=f2.concat(["symbolKeepAspect"]),yde={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,s=0;s<f2.length;s++){var o=f2[s],l=r.get(o);we(l)?(a=!0,n[o]=l):i[o]=l}if(i.symbol=i.symbol||r.defaultSymbol,t.setVisual(J({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),e.isSeriesFiltered(r))return;var u=rt(n);function c(h,d){for(var f=r.getRawValue(d),p=r.getDataParams(d),v=0;v<u.length;v++){var g=u[v];h.setItemVisual(d,g,n[g](f,p))}}return{dataEach:a?c:null}}},_de={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function i(n,a){for(var s=n.getItemModel(a),o=0;o<mR.length;o++){var l=mR[o],u=s.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:t.hasItemOption?i:null}}};function MD(r,e,t){switch(t){case"color":var i=r.getItemVisual(e,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function ag(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function u$(r,e,t,i){switch(t){case"color":var n=r.ensureUniqueItemVisual(e,"style");n[r.getVisual("drawType")]=i,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,i);break}}function c$(r,e){function t(i,n){var a=[];return i.eachComponent({mainType:"series",subType:r,query:n},function(s){a.push(s.seriesIndex)}),a}R([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(i){e(i[0],function(n,a,s){n=J({},n),s.dispatchAction(J(n,{type:i[1],seriesIndex:t(a,n)}))})})}function $c(r,e,t,i,n){var a=r+e;t.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(s){for(var o=s.seriesIndex,l=s.option.selectedMap,u=n.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===o){var h=s.getData(),d=ec(h,n.fromActionPayload);t.trigger(a,{type:a,seriesId:s.id,name:ie(d)?h.getName(d[0]):h.getName(d),selected:pe(l)?l:J({},l)})}})}function bde(r,e,t){r.on("selectchanged",function(i){var n=t.getModel();i.isFromClick?($c("map","selectchanged",e,n,i),$c("pie","selectchanged",e,n,i)):i.fromAction==="select"?($c("map","selected",e,n,i),$c("pie","selected",e,n,i)):i.fromAction==="unselect"&&($c("map","unselected",e,n,i),$c("pie","unselected",e,n,i))})}function bu(r,e,t){for(var i;r&&!(e(r)&&(i=r,t));)r=r.__hostTarget||r.parent;return i}var Tde=Math.round(Math.random()*9),Sde=typeof Object.defineProperty=="function",xde=function(){function r(){this._id="__ec_inner_"+Tde++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var i=this._guard(e);return Sde?Object.defineProperty(i,this._id,{value:t,enumerable:!1,configurable:!0}):i[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),wde=Qe.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,i=e.cy,n=e.width/2,a=e.height/2;r.moveTo(t,i-a),r.lineTo(t+n,i+a),r.lineTo(t-n,i+a),r.closePath()}}),Cde=Qe.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,i=e.cy,n=e.width/2,a=e.height/2;r.moveTo(t,i-a),r.lineTo(t+n,i),r.lineTo(t,i+a),r.lineTo(t-n,i),r.closePath()}}),Ade=Qe.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,i=e.y,n=e.width/5*3,a=Math.max(n,e.height),s=n/2,o=s*s/(a-s),l=i-a+s+o,u=Math.asin(o/s),c=Math.cos(u)*s,h=Math.sin(u),d=Math.cos(u),f=s*.6,p=s*.7;r.moveTo(t-c,l+o),r.arc(t,l,s,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-h*f,l+o+d*f,t,i-p,t,i),r.bezierCurveTo(t,i-p,t-c+h*f,l+o+d*f,t-c,l+o),r.closePath()}}),Dde=Qe.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,i=e.width,n=e.x,a=e.y,s=i/3*2;r.moveTo(n,a),r.lineTo(n+s,a+t),r.lineTo(n,a+t/4*3),r.lineTo(n-s,a+t),r.lineTo(n,a),r.closePath()}}),Ede={line:kr,rect:st,roundRect:st,square:st,circle:eo,diamond:Cde,pin:Ade,arrow:Dde,triangle:wde},Ide={line:function(r,e,t,i,n){n.x1=r,n.y1=e+i/2,n.x2=r+t,n.y2=e+i/2},rect:function(r,e,t,i,n){n.x=r,n.y=e,n.width=t,n.height=i},roundRect:function(r,e,t,i,n){n.x=r,n.y=e,n.width=t,n.height=i,n.r=Math.min(t,i)/4},square:function(r,e,t,i,n){var a=Math.min(t,i);n.x=r,n.y=e,n.width=a,n.height=a},circle:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.r=Math.min(t,i)/2},diamond:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.width=t,n.height=i},pin:function(r,e,t,i,n){n.x=r+t/2,n.y=e+i/2,n.width=t,n.height=i},arrow:function(r,e,t,i,n){n.x=r+t/2,n.y=e+i/2,n.width=t,n.height=i},triangle:function(r,e,t,i,n){n.cx=r+t/2,n.cy=e+i/2,n.width=t,n.height=i}},V0={};R(Ede,function(r,e){V0[e]=new r});var Pde=Qe.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var i=I0(r,e,t),n=this.shape;return n&&n.symbolType==="pin"&&e.position==="inside"&&(i.y=t.y+t.height*.4),i},buildPath:function(r,e,t){var i=e.symbolType;if(i!=="none"){var n=V0[i];n||(i="rect",n=V0[i]),Ide[i](e.x,e.y,e.width,e.height,n.shape),n.buildPath(r,n.shape,t)}}});function Mde(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function yr(r,e,t,i,n,a,s){var o=r.indexOf("empty")===0;o&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Q9(r.slice(8),new qe(e,t,i,n),s?"center":"cover"):r.indexOf("path://")===0?l=h1(r.slice(7),{},new qe(e,t,i,n),s?"center":"cover"):l=new Pde({shape:{symbolType:r,x:e,y:t,width:i,height:n}}),l.__isEmptyBrush=o,l.setColor=Mde,a&&l.setColor(a),l}function zf(r){return ie(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function hc(r,e){if(r!=null)return ie(r)||(r=[r,r]),[ce(r[0],e[0])||0,ce(Be(r[1],r[0]),e[1])||0]}function Tu(r){return isFinite(r)}function Lde(r,e,t){var i=e.x==null?0:e.x,n=e.x2==null?1:e.x2,a=e.y==null?0:e.y,s=e.y2==null?0:e.y2;e.global||(i=i*t.width+t.x,n=n*t.width+t.x,a=a*t.height+t.y,s=s*t.height+t.y),i=Tu(i)?i:0,n=Tu(n)?n:1,a=Tu(a)?a:0,s=Tu(s)?s:0;var o=r.createLinearGradient(i,a,n,s);return o}function kde(r,e,t){var i=t.width,n=t.height,a=Math.min(i,n),s=e.x==null?.5:e.x,o=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(s=s*i+t.x,o=o*n+t.y,l=l*a),s=Tu(s)?s:.5,o=Tu(o)?o:.5,l=l>=0&&Tu(l)?l:.5;var u=r.createRadialGradient(s,o,0,s,o,l);return u}function d2(r,e,t){for(var i=e.type==="radial"?kde(r,e,t):Lde(r,e,t),n=e.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function Rde(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function xm(r){return parseInt(r,10)}function yh(r,e,t){var i=["width","height"][e],n=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],s=["paddingRight","paddingBottom"][e];if(t[i]!=null&&t[i]!=="auto")return parseFloat(t[i]);var o=document.defaultView.getComputedStyle(r);return(r[n]||xm(o[i])||xm(r.style[i]))-(xm(o[a])||0)-(xm(o[s])||0)|0}function Ode(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:ut(r)?[r]:ie(r)?r:null}function LD(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&Ode(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=oe(t,function(a){return a/n}),i/=n)}return[t,i]}var Nde=new us(!0);function z0(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function yR(r){return typeof r=="string"&&r!=="none"}function G0(r){var e=r.fill;return e!=null&&e!=="none"}function _R(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function bR(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function p2(r,e,t){var i=nD(e.image,e.__image,t);if(n1(i)){var n=r.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*dy),a.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(a)}return n}}function Bde(r,e,t,i){var n,a=z0(t),s=G0(t),o=t.strokePercent,l=o<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||Nde,h=e.__dirty;if(!i){var d=t.fill,f=t.stroke,p=s&&!!d.colorStops,v=a&&!!f.colorStops,g=s&&!!d.image,m=a&&!!f.image,y=void 0,_=void 0,b=void 0,S=void 0,x=void 0;(p||v)&&(x=e.getBoundingRect()),p&&(y=h?d2(r,d,x):e.__canvasFillGradient,e.__canvasFillGradient=y),v&&(_=h?d2(r,f,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=h||!e.__canvasFillPattern?p2(r,d,e):e.__canvasFillPattern,e.__canvasFillPattern=b),m&&(S=h||!e.__canvasStrokePattern?p2(r,f,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),p?r.fillStyle=y:g&&(b?r.fillStyle=b:s=!1),v?r.strokeStyle=_:m&&(S?r.strokeStyle=S:a=!1)}var C=e.getGlobalScale();c.setScale(C[0],C[1],e.segmentIgnoreThreshold);var D,I;r.setLineDash&&t.lineDash&&(n=LD(e),D=n[0],I=n[1]);var M=!0;(u||h&nh)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?o:1),D&&(r.setLineDash(D),r.lineDashOffset=I),i||(t.strokeFirst?(a&&bR(r,t),s&&_R(r,t)):(s&&_R(r,t),a&&bR(r,t))),D&&r.setLineDash([])}function Fde(r,e,t){var i=e.__image=nD(t.image,e.__image,e,e.onload);if(!(!i||!n1(i))){var n=t.x||0,a=t.y||0,s=e.getWidth(),o=e.getHeight(),l=i.width/i.height;if(s==null&&o!=null?s=o*l:o==null&&s!=null?o=s/l:s==null&&o==null&&(s=i.width,o=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(i,u,c,t.sWidth,t.sHeight,n,a,s,o)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,h=s-u,d=o-c;r.drawImage(i,u,c,h,d,n,a,s,o)}else r.drawImage(i,n,a,s,o)}}function Ude(r,e,t){var i,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||Jo,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,s=void 0;r.setLineDash&&t.lineDash&&(i=LD(e),a=i[0],s=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=s),t.strokeFirst?(z0(t)&&r.strokeText(n,t.x,t.y),G0(t)&&r.fillText(n,t.x,t.y)):(G0(t)&&r.fillText(n,t.x,t.y),z0(t)&&r.strokeText(n,t.x,t.y)),a&&r.setLineDash([])}}var TR=["shadowBlur","shadowOffsetX","shadowOffsetY"],SR=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function h$(r,e,t,i,n){var a=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){zi(r,n),a=!0;var s=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(s)?Uu.opacity:s}(i||e.blend!==t.blend)&&(a||(zi(r,n),a=!0),r.globalCompositeOperation=e.blend||Uu.blend);for(var o=0;o<TR.length;o++){var l=TR[o];(i||e[l]!==t[l])&&(a||(zi(r,n),a=!0),r[l]=r.dpr*(e[l]||0))}return(i||e.shadowColor!==t.shadowColor)&&(a||(zi(r,n),a=!0),r.shadowColor=e.shadowColor||Uu.shadowColor),a}function xR(r,e,t,i,n){var a=Tv(e,n.inHover),s=i?null:t&&Tv(t,n.inHover)||{};if(a===s)return!1;var o=h$(r,a,s,i,n);if((i||a.fill!==s.fill)&&(o||(zi(r,n),o=!0),yR(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==s.stroke)&&(o||(zi(r,n),o=!0),yR(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==s.opacity)&&(o||(zi(r,n),o=!0),r.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(o||(zi(r,n),o=!0),r.lineWidth=u)}for(var c=0;c<SR.length;c++){var h=SR[c],d=h[0];(i||a[d]!==s[d])&&(o||(zi(r,n),o=!0),r[d]=a[d]||h[1])}return o}function Vde(r,e,t,i,n){return h$(r,Tv(e,n.inHover),t&&Tv(t,n.inHover),i,n)}function f$(r,e){var t=e.transform,i=r.dpr||1;t?r.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):r.setTransform(i,0,0,i,0,0)}function zde(r,e,t){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),f$(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}t.allClipped=i}function Gde(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var wR=1,CR=2,AR=3,DR=4;function Hde(r){var e=G0(r),t=z0(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function zi(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Tv(r,e){return e&&r.__hoverStyle||r.style}function d$(r,e){Su(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Su(r,e,t,i){var n=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~cn,e.__isRendered=!1;return}var a=e.__clipPaths,s=t.prevElClipPaths,o=!1,l=!1;if((!s||Rde(a,s))&&(s&&s.length&&(zi(r,t),r.restore(),l=o=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),a&&a.length&&(zi(r,t),r.save(),zde(a,r,t),o=!0),t.prevElClipPaths=a),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=o=!0);var c=e instanceof Qe&&e.autoBatch&&Hde(e.style);o||Gde(n,u.transform)?(zi(r,t),f$(r,e)):c||zi(r,t);var h=Tv(e,t.inHover);e instanceof Qe?(t.lastDrawType!==wR&&(l=!0,t.lastDrawType=wR),xR(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),Bde(r,e,h,c),c&&(t.batchFill=h.fill||"",t.batchStroke=h.stroke||"")):e instanceof of?(t.lastDrawType!==AR&&(l=!0,t.lastDrawType=AR),xR(r,e,u,l,t),Ude(r,e,h)):e instanceof Wr?(t.lastDrawType!==CR&&(l=!0,t.lastDrawType=CR),Vde(r,e,u,l,t),Fde(r,e,h)):e.getTemporalDisplayables&&(t.lastDrawType!==DR&&(l=!0,t.lastDrawType=DR),$de(r,e,t)),c&&i&&zi(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function $de(r,e,t){var i=e.getDisplayables(),n=e.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},s,o;for(s=e.getCursor(),o=i.length;s<o;s++){var l=i[s];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Su(r,l,a,s===o-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=n.length;u<c;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Su(r,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var zT=new xde,ER=new Yv(100),IR=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function cf(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),i=e.getZr(),n=i.painter.type==="svg";r.dirty&&zT.delete(r);var a=zT.get(r);if(a)return a;var s=Ce(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});s.backgroundColor==="none"&&(s.backgroundColor=null);var o={repeat:"repeat"};return l(o),o.rotation=s.rotation,o.scaleX=o.scaleY=n?1:1/t,zT.set(r,o),r.dirty=!1,o;function l(u){for(var c=[t],h=!0,d=0;d<IR.length;++d){var f=s[IR[d]];if(f!=null&&!ie(f)&&!pe(f)&&!ut(f)&&typeof f!="boolean"){h=!1;break}c.push(f)}var p;if(h){p=c.join(",")+(n?"-svg":"");var v=ER.get(p);v&&(n?u.svgElement=v:u.image=v)}var g=v$(s.dashArrayX),m=Wde(s.dashArrayY),y=p$(s.symbol),_=qde(g),b=g$(m),S=!n&&el.createCanvas(),x=n&&{tag:"g",attrs:{},key:"dcl",children:[]},C=I(),D;S&&(S.width=C.width*t,S.height=C.height*t,D=S.getContext("2d")),M(),h&&ER.put(p,S||x),u.image=S,u.svgElement=x,u.svgWidth=C.width,u.svgHeight=C.height;function I(){for(var L=1,N=0,O=_.length;N<O;++N)L=qL(L,_[N]);for(var B=1,N=0,O=y.length;N<O;++N)B=qL(B,y[N].length);L*=B;var F=b*_.length*y.length;return{width:Math.max(1,Math.min(L,s.maxTileWidth)),height:Math.max(1,Math.min(F,s.maxTileHeight))}}function M(){D&&(D.clearRect(0,0,S.width,S.height),s.backgroundColor&&(D.fillStyle=s.backgroundColor,D.fillRect(0,0,S.width,S.height)));for(var L=0,N=0;N<m.length;++N)L+=m[N];if(L<=0)return;for(var O=-b,B=0,F=0,U=0;O<C.height;){if(B%2===0){for(var $=F/2%y.length,q=0,Z=0,te=0;q<C.width*2;){for(var Q=0,N=0;N<g[U].length;++N)Q+=g[U][N];if(Q<=0)break;if(Z%2===0){var se=(1-s.symbolSize)*.5,he=q+g[U][Z]*se,ue=O+m[B]*se,Ie=g[U][Z]*s.symbolSize,Oe=m[B]*s.symbolSize,Fe=te/2%y[$].length;me(he,ue,Ie,Oe,y[$][Fe])}q+=g[U][Z],++te,++Z,Z===g[U].length&&(Z=0)}++U,U===g.length&&(U=0)}O+=m[B],++F,++B,B===m.length&&(B=0)}function me(ze,Pe,ye,Me,_t){var Re=n?1:t,Ge=yr(_t,ze*Re,Pe*Re,ye*Re,Me*Re,s.color,s.symbolKeepAspect);if(n){var Pt=i.painter.renderOneToVNode(Ge);Pt&&x.children.push(Pt)}else d$(D,Ge)}}}}function p$(r){if(!r||r.length===0)return[["rect"]];if(pe(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!pe(r[t])){e=!1;break}if(e)return p$([r]);for(var i=[],t=0;t<r.length;++t)pe(r[t])?i.push([r[t]]):i.push(r[t]);return i}function v$(r){if(!r||r.length===0)return[[0,0]];if(ut(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,i=0;i<r.length;++i)if(!ut(r[i])){t=!1;break}if(t)return v$([r]);for(var n=[],i=0;i<r.length;++i)if(ut(r[i])){var e=Math.ceil(r[i]);n.push([e,e])}else{var e=oe(r[i],function(o){return Math.ceil(o)});e.length%2===1?n.push(e.concat(e)):n.push(e)}return n}function Wde(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(ut(r)){var e=Math.ceil(r);return[e,e]}var t=oe(r,function(i){return Math.ceil(i)});return r.length%2?t.concat(t):t}function qde(r){return oe(r,function(e){return g$(e)})}function g$(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function jde(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var i=t.getData();i.hasItemVisual()&&i.each(function(s){var o=i.getItemVisual(s,"decal");if(o){var l=i.ensureUniqueItemVisual(s,"style");l.decal=cf(o,e)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=cf(n,e)}}})}var oa=new Zn,m$={};function Xde(r,e){m$[r]=e}function Yde(r){return m$[r]}var Kde=1,Zde=800,Qde=900,Jde=1e3,epe=2e3,tpe=5e3,y$=1e3,rpe=1100,kD=2e3,_$=3e3,ipe=4e3,x1=4500,npe=4600,ape=5e3,spe=6e3,b$=7e3,ope={PROCESSOR:{FILTER:Jde,SERIES_FILTER:Zde,STATISTIC:tpe},VISUAL:{LAYOUT:y$,PROGRESSIVE_LAYOUT:rpe,GLOBAL:kD,CHART:_$,POST_CHART_LAYOUT:npe,COMPONENT:ipe,BRUSH:ape,CHART_ITEM:x1,ARIA:spe,DECAL:b$}},ti="__flagInMainProcess",ki="__pendingUpdate",GT="__needsUpdateStatus",PR=/^[a-zA-Z0-9_]+$/,HT="__connectUpdateStatus",MR=0,lpe=1,upe=2;function T$(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return x$(this,r,e)}}function S$(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x$(this,r,e)}}function x$(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),Zn.prototype[e].apply(r,t)}var w$=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Zn),C$=w$.prototype;C$.on=S$("on");C$.off=S$("off");var Wc,$T,wm,yo,WT,qT,jT,Cd,Ad,LR,kR,XT,RR,Cm,OR,A$,Dn,NR,D$=function(r){j(e,r);function e(t,i,n){var a=r.call(this,new mde)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},pe(i)&&(i=E$[i]),a._dom=t;var s="canvas",o="auto",l=!1;n.ssr&&aue(function(d){var f=ke(d),p=f.dataIndex;if(p!=null){var v=be();return v.set("series_index",f.seriesIndex),v.set("data_index",p),f.ssrType&&v.set("ssr_type",f.ssrType),v}});var u=a._zr=GL(t,{renderer:n.renderer||s,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:Be(n.useDirtyRect,l),useCoarsePointer:Be(n.useCoarsePointer,o),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=PD(ge(u.flush,u),17),i=Ee(i),i&&kH(i,!0),a._theme=i,a._locale=Ihe(n.locale||lH),a._coordSysMgr=new ng;var c=a._api=OR(a);function h(d,f){return d.__prio-f.__prio}return gy($0,h),gy(v2,h),a._scheduler=new n$(a,c,v2,$0),a._messageCenter=new w$,a._initEvents(),a.resize=ge(a.resize,a),u.animation.on("frame",a._onframe,a),LR(u,a),kR(u,a),b0(a),a}return e.prototype._onframe=function(){if(!this._disposed){NR(this);var t=this._scheduler;if(this[ki]){var i=this[ki].silent;this[ti]=!0;try{Wc(this),yo.update.call(this,null,this[ki].updateParams)}catch(l){throw this[ti]=!1,this[ki]=null,l}this._zr.flush(),this[ti]=!1,this[ki]=null,Cd.call(this,i),Ad.call(this,i)}else if(t.unfinished){var n=Kde,a=this._model,s=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),qT(this,a),t.performVisualTasks(a),Cm(this,this._model,s,"remain",{}),n-=+new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,i,n){if(!this[ti]){if(this._disposed){this.id;return}var a,s,o;if(De(i)&&(n=i.lazyUpdate,a=i.silent,s=i.replaceMerge,o=i.transition,i=i.notMerge),this[ti]=!0,!this._model||i){var l=new efe(this._api),u=this._theme,c=this._model=new CD;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:s},g2);var h={seriesTransition:o,optionChanged:!0};if(n)this[ki]={silent:a,updateParams:h},this[ti]=!1,this.getZr().wakeUp();else{try{Wc(this),yo.update.call(this,null,h)}catch(d){throw this[ki]=null,this[ti]=!1,d}this._ssr||this._zr.flush(),this[ki]=null,this[ti]=!1,Cd.call(this,a),Ad.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||et.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(et.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return R(i,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,n=this._model,a=[],s=this;R(i,function(l){n.eachComponent({mainType:l},function(u){var c=s._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var o=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return R(a,function(l){l.group.ignore=!1}),o},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",n=this.group,a=Math.min,s=Math.max,o=1/0;if(BR[n]){var l=o,u=o,c=-o,h=-o,d=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();R(Up,function(_,b){if(_.group===n){var S=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Ee(t)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),c=s(x.right,c),h=s(x.bottom,h),d.push({dom:S,left:x.left,top:x.top})}}),l*=f,u*=f,c*=f,h*=f;var p=c-l,v=h-u,g=el.createCanvas(),m=GL(g,{renderer:i?"svg":"canvas"});if(m.resize({width:p,height:v}),i){var y="";return R(d,function(_){var b=_.left-l,S=_.top-u;y+='<g transform="translate('+b+","+S+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new st({shape:{x:0,y:0,width:p,height:v},style:{fill:t.connectedBackgroundColor}})),R(d,function(_){var b=new Wr({style:{x:_.left*f-l,y:_.top*f-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return WT(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return WT(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var n=this._model,a,s=Lp(n,t);return R(s,function(o,l){l.indexOf("Models")>=0&&R(o,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(t,i){var n=this._model,a=Lp(n,t,{defaultMainType:"series"}),s=a.seriesModel,o=s.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?o.indexOfRawIndex(a.dataIndex):null;return l!=null?MD(o,l,i):ag(o,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;R(cpe,function(i){var n=function(a){var s=t.getModel(),o=a.target,l,u=i==="globalout";if(u?l={}:o&&bu(o,function(p){var v=ke(p);if(v&&v.dataIndex!=null){var g=v.dataModel||s.getSeriesByIndex(v.seriesIndex);return l=g&&g.getDataParams(v.dataIndex,v.dataType,o)||{},!0}else if(v.eventData)return l=J({},v.eventData),!0},!0),l){var c=l.componentType,h=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",h=l.seriesIndex);var d=c&&h!=null&&s.getComponent(c,h),f=d&&t[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];l.event=a,l.type=i,t._$eventProcessor.eventInfo={targetEl:o,packedEvent:l,model:d,view:f},t.trigger(i,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)}),R(Fp,function(i,n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),R(["selectchanged"],function(i){t._messageCenter.on(i,function(n){this.trigger(i,n)},t)}),bde(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&b9(this.getDom(),OD,"");var i=this,n=i._api,a=i._model;R(i._componentsViews,function(s){s.dispose(a,n)}),R(i._chartsViews,function(s){s.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Up[i.id]},e.prototype.resize=function(t){if(!this[ti]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=t&&t.silent;this[ki]&&(a==null&&(a=this[ki].silent),n=!0,this[ki]=null),this[ti]=!0;try{n&&Wc(this),yo.update.call(this,{type:"resize",animation:J({duration:0},t&&t.animation)})}catch(s){throw this[ti]=!1,s}this[ti]=!1,Cd.call(this,a),Ad.call(this,a)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(De(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!m2[t]){var n=m2[t](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=J({},t);return i.type=Fp[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(De(i)||(i={silent:!!i}),!!H0[t.type]&&this._model){if(this[ti]){this._pendingActions.push(t);return}var n=i.silent;jT.call(this,t,n);var a=i.flush;a?this._zr.flush():a!==!1&&et.browser.weChat&&this._throttledZrFlush(),Cd.call(this,n),Ad.call(this,n)}},e.prototype.updateLabelLayout=function(){oa.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Wc=function(h){var d=h._scheduler;d.restorePipelines(h._model),d.prepareStageTasks(),$T(h,!0),$T(h,!1),d.plan()},$T=function(h,d){for(var f=h._model,p=h._scheduler,v=d?h._componentsViews:h._chartsViews,g=d?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<v.length;_++)v[_].__alive=!1;d?f.eachComponent(function(x,C){x!=="series"&&b(C)}):f.eachSeries(b);function b(x){var C=x.__requireNewView;x.__requireNewView=!1;var D="_ec_"+x.id+"_"+x.type,I=!C&&g[D];if(!I){var M=qa(x.type),L=d?$t.getClass(M.main,M.sub):Ct.getClass(M.sub);I=new L,I.init(f,y),g[D]=I,v.push(I),m.add(I.group)}x.__viewId=I.__id=D,I.__alive=!0,I.__model=x,I.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!d&&p.prepareView(I,x,f,y)}for(var _=0;_<v.length;){var S=v[_];S.__alive?_++:(!d&&S.renderTask.dispose(),m.remove(S.group),S.dispose(f,y),v.splice(_,1),g[S.__id]===S&&delete g[S.__id],S.__id=S.group.__ecComponentInfo=null)}},wm=function(h,d,f,p,v){var g=h._model;if(g.setUpdatePayload(f),!p){R([].concat(h._componentsViews).concat(h._chartsViews),S);return}var m={};m[p+"Id"]=f[p+"Id"],m[p+"Index"]=f[p+"Index"],m[p+"Name"]=f[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=f.excludeSeriesId,b;_!=null&&(b=be(),R(xt(_),function(x){var C=wr(x,null);C!=null&&b.set(C,!0)})),g&&g.eachComponent(y,function(x){var C=b&&b.get(x.id)!=null;if(!C)if(yk(f))if(x instanceof Ot)f.type===Vu&&!f.notBlur&&!x.get(["emphasis","disabled"])&&Ece(x,f,h._api);else{var D=cD(x.mainType,x.componentIndex,f.name,h._api),I=D.focusSelf,M=D.dispatchers;f.type===Vu&&I&&!f.notBlur&&Zw(x.mainType,x.componentIndex,h._api),M&&R(M,function(L){f.type===Vu?qs(L):js(L)})}else Jw(f)&&x instanceof Ot&&(Mce(x,f,h._api),gk(x),Dn(h))},h),g&&g.eachComponent(y,function(x){var C=b&&b.get(x.id)!=null;C||S(h[p==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},h);function S(x){x&&x.__alive&&x[d]&&x[d](x.__model,g,h._api,f)}},yo={prepareAndUpdate:function(h){Wc(this),yo.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,d){var f=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(f){f.setUpdatePayload(h),m.restoreData(f,h),m.performSeriesTasks(f),g.create(f,p),m.performDataProcessorTasks(f,h),qT(this,f),g.update(f,p),t(f),m.performVisualTasks(f,h),XT(this,f,p,h,d);var y=f.get("backgroundColor")||"transparent",_=f.get("darkMode");v.setBackgroundColor(y),_!=null&&_!=="auto"&&v.setDarkMode(_),oa.trigger("afterupdate",f,p)}},updateTransform:function(h){var d=this,f=this._model,p=this._api;if(f){f.setUpdatePayload(h);var v=[];f.eachComponent(function(m,y){if(m!=="series"){var _=d.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(y,f,p,h);b&&b.update&&v.push(_)}else v.push(_)}});var g=be();f.eachSeries(function(m){var y=d._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,f,p,h);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),t(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0,dirtyMap:g}),Cm(this,f,p,h,{},g),oa.trigger("afterupdate",f,p)}},updateView:function(h){var d=this._model;d&&(d.setUpdatePayload(h),Ct.markUpdateMethod(h,"updateView"),t(d),this._scheduler.performVisualTasks(d,h,{setDirty:!0}),XT(this,d,this._api,h,{}),oa.trigger("afterupdate",d,this._api))},updateVisual:function(h){var d=this,f=this._model;f&&(f.setUpdatePayload(h),f.eachSeries(function(p){p.getData().clearAllVisual()}),Ct.markUpdateMethod(h,"updateVisual"),t(f),this._scheduler.performVisualTasks(f,h,{visualType:"visual",setDirty:!0}),f.eachComponent(function(p,v){if(p!=="series"){var g=d.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,f,d._api,h)}}),f.eachSeries(function(p){var v=d._chartsMap[p.__viewId];v.updateVisual(p,f,d._api,h)}),oa.trigger("afterupdate",f,this._api))},updateLayout:function(h){yo.update.call(this,h)}},WT=function(h,d,f,p){if(h._disposed){h.id;return}for(var v=h._model,g=h._coordSysMgr.getCoordinateSystems(),m,y=Lp(v,f),_=0;_<g.length;_++){var b=g[_];if(b[d]&&(m=b[d](v,y,p))!=null)return m}},qT=function(h,d){var f=h._chartsMap,p=h._scheduler;d.eachSeries(function(v){p.updateStreamModes(v,f[v.__viewId])})},jT=function(h,d){var f=this,p=this.getModel(),v=h.type,g=h.escapeConnect,m=H0[v],y=m.actionInfo,_=(y.update||"update").split(":"),b=_.pop(),S=_[0]!=null&&qa(_[0]);this[ti]=!0;var x=[h],C=!1;h.batch&&(C=!0,x=oe(h.batch,function(B){return B=Ce(J({},B),h),B.batch=null,B}));var D=[],I,M=Jw(h),L=yk(h);if(L&&z9(this._api),R(x,function(B){if(I=m.action(B,f._model,f._api),I=I||J({},B),I.type=y.event||I.type,D.push(I),L){var F=rD(h),U=F.queryOptionMap,$=F.mainTypeSpecified,q=$?U.keys()[0]:"series";wm(f,b,B,q),Dn(f)}else M?(wm(f,b,B,"series"),Dn(f)):S&&wm(f,b,B,S.main,S.sub)}),b!=="none"&&!L&&!M&&!S)try{this[ki]?(Wc(this),yo.update.call(this,h),this[ki]=null):yo[b].call(this,h)}catch(B){throw this[ti]=!1,B}if(C?I={type:y.event||v,escapeConnect:g,batch:D}:I=D[0],this[ti]=!1,!d){var N=this._messageCenter;if(N.trigger(I.type,I),M){var O={type:"selectchanged",escapeConnect:g,selected:Lce(p),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};N.trigger(O.type,O)}}},Cd=function(h){for(var d=this._pendingActions;d.length;){var f=d.shift();jT.call(this,f,h)}},Ad=function(h){!h&&this.trigger("updated")},LR=function(h,d){h.on("rendered",function(f){d.trigger("rendered",f),h.animation.isFinished()&&!d[ki]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},kR=function(h,d){h.on("mouseover",function(f){var p=f.target,v=bu(p,pv);v&&(Ice(v,f,d._api),Dn(d))}).on("mouseout",function(f){var p=f.target,v=bu(p,pv);v&&(Pce(v,f,d._api),Dn(d))}).on("click",function(f){var p=f.target,v=bu(p,function(y){return ke(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=ke(v);d._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function t(h){h.clearColorPalette(),h.eachSeries(function(d){d.clearColorPalette()})}function i(h){var d=[],f=[],p=!1;if(h.eachComponent(function(y,_){var b=_.get("zlevel")||0,S=_.get("z")||0,x=_.getZLevelKey();p=p||!!x,(y==="series"?f:d).push({zlevel:b,z:S,idx:_.componentIndex,type:y,key:x})}),p){var v=d.concat(f),g,m;gy(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),R(v,function(y){var _=h.getComponent(y.type,y.idx),b=y.zlevel,S=y.key;g!=null&&(b=Math.max(g,b)),S?(b===g&&S!==m&&b++,m=S):m&&(b===g&&b++,m=""),g=b,_.setZLevel(b)})}}XT=function(h,d,f,p,v){i(d),RR(h,d,f,p,v),R(h._chartsViews,function(g){g.__alive=!1}),Cm(h,d,f,p,v),R(h._chartsViews,function(g){g.__alive||g.remove(d,f)})},RR=function(h,d,f,p,v,g){R(g||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,d,f,p),o(y,m),c(y,m)})},Cm=function(h,d,f,p,v,g){var m=h._scheduler;v=J(v||{},{updatedSeries:d.getSeries()}),oa.trigger("series:beforeupdate",d,f,v);var y=!1;d.eachSeries(function(_){var b=h._chartsMap[_.__viewId];b.__alive=!0;var S=b.renderTask;m.updatePayload(S,p),u(_,b),g&&g.get(_.uid)&&S.dirty(),S.perform(m.getPerformArgs(S))&&(y=!0),b.group.silent=!!_.get("silent"),s(_,b),gk(_)}),m.unfinished=y||m.unfinished,oa.trigger("series:layoutlabels",d,f,v),oa.trigger("series:transition",d,f,v),d.eachSeries(function(_){var b=h._chartsMap[_.__viewId];o(_,b),c(_,b)}),a(h,d),oa.trigger("series:afterupdate",d,f,v)},Dn=function(h){h[GT]=!0,h.getZr().wakeUp()},NR=function(h){h[GT]&&(h.getZr().storage.traverse(function(d){Rh(d)||n(d)}),h[GT]=!1)};function n(h){for(var d=[],f=h.currentStates,p=0;p<f.length;p++){var v=f[p];v==="emphasis"||v==="blur"||v==="select"||d.push(v)}h.selected&&h.states.select&&d.push("select"),h.hoverState===o1&&h.states.emphasis?d.push("emphasis"):h.hoverState===Qv&&h.states.blur&&d.push("blur"),h.useStates(d)}function a(h,d){var f=h._zr,p=f.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>d.get("hoverLayerThreshold")&&!et.node&&!et.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(h,d){var f=h.get("blendMode")||null;d.eachRendered(function(p){p.isGroup||(p.style.blend=f)})}function o(h,d){if(!h.preventAutoZ){var f=h.get("z")||0,p=h.get("zlevel")||0;d.eachRendered(function(v){return l(v,f,p,-1/0),!0})}}function l(h,d,f,p){var v=h.getTextContent(),g=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_<y.length;_++)p=Math.max(l(y[_],d,f,p),p);else h.z=d,h.zlevel=f,p=Math.max(h.z2,p);if(v&&(v.z=d,v.zlevel=f,isFinite(p)&&(v.z2=p+2)),g){var b=h.textGuideLineConfig;g.z=d,g.zlevel=f,isFinite(p)&&(g.z2=p+(b&&b.showAbove?1:-1))}return p}function u(h,d){d.eachRendered(function(f){if(!Rh(f)){var p=f.getTextContent(),v=f.getTextGuideLine();f.stateTransition&&(f.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),f.hasState()?(f.prevStates=f.currentStates,f.clearStates()):f.prevStates&&(f.prevStates=null)}})}function c(h,d){var f=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),v=f.get("duration"),g=v>0?{duration:v,delay:f.get("delay"),easing:f.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Rh(m))return;if(m instanceof Qe&&Bce(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&n(m)}})}OR=function(h){return new(function(d){j(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},f.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return h._model.getComponent(v.mainType,v.index);p=p.parent}},f.prototype.enterEmphasis=function(p,v){qs(p,v),Dn(h)},f.prototype.leaveEmphasis=function(p,v){js(p,v),Dn(h)},f.prototype.enterBlur=function(p){B9(p),Dn(h)},f.prototype.leaveBlur=function(p){uD(p),Dn(h)},f.prototype.enterSelect=function(p){F9(p),Dn(h)},f.prototype.leaveSelect=function(p){U9(p),Dn(h)},f.prototype.getModel=function(){return h.getModel()},f.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},f.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},f}(MH))(h)},A$=function(h){function d(f,p){for(var v=0;v<f.length;v++){var g=f[v];g[HT]=p}}R(Fp,function(f,p){h._messageCenter.on(p,function(v){if(BR[h.group]&&h[HT]!==MR){if(v&&v.escapeConnect)return;var g=h.makeActionFromEvent(v),m=[];R(Up,function(y){y!==h&&y.group===h.group&&m.push(y)}),d(m,MR),R(m,function(y){y[HT]!==lpe&&y.dispatchAction(g)}),d(m,upe)}})})}}(),e}(Zn),RD=D$.prototype;RD.on=T$("on");RD.off=T$("off");RD.one=function(r,e,t){var i=this;function n(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];e&&e.apply&&e.apply(this,a),i.off(r,n)}this.on.call(this,r,n,t)};var cpe=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var H0={},Fp={},v2=[],g2=[],$0=[],E$={},m2={},Up={},BR={},hpe=+new Date-0,OD="_echarts_instance_";function I$(r,e,t){{var i=fpe(r);if(i)return i}var n=new D$(r,e,t);return n.id="ec_"+hpe++,Up[n.id]=n,b9(r,OD,n.id),A$(n),oa.trigger("afterinit",n),n}function fpe(r){return Up[Cue(r,OD)]}function P$(r,e){E$[r]=e}function M$(r){Xe(g2,r)<0&&g2.push(r)}function L$(r,e){BD(v2,r,e,epe)}function dpe(r){ND("afterinit",r)}function ppe(r){ND("afterupdate",r)}function ND(r,e){oa.on(r,e)}function hs(r,e,t){we(e)&&(t=e,e="");var i=De(r)?r.type:[r,r={event:e}][0];r.event=(r.event||i).toLowerCase(),e=r.event,!Fp[e]&&(Ai(PR.test(i)&&PR.test(e)),H0[i]||(H0[i]={action:t,actionInfo:r}),Fp[e]=i)}function vpe(r,e){ng.register(r,e)}function gpe(r,e){BD($0,r,e,y$,"layout")}function fc(r,e){BD($0,r,e,_$,"visual")}var FR=[];function BD(r,e,t,i,n){if((we(e)||De(e))&&(t=e,e=i),!(Xe(FR,t)>=0)){FR.push(t);var a=n$.wrapStageHandler(t,n);a.__prio=e,a.__raw=t,r.push(a)}}function k$(r,e){m2[r]=e}function mpe(r,e,t){var i=Yde("registerMap");i&&i(r,e,t)}var ype=Lfe;fc(kD,ide);fc(x1,nde);fc(x1,ade);fc(kD,yde);fc(x1,_de);fc(b$,jde);M$(kH);L$(Qde,ffe);k$("default",sde);hs({type:Vu,event:Vu,update:Vu},lr);hs({type:Ty,event:Ty,update:Ty},lr);hs({type:kp,event:kp,update:kp},lr);hs({type:Sy,event:Sy,update:Sy},lr);hs({type:Rp,event:Rp,update:Rp},lr);P$("light",gde);P$("dark",l$);var UR=[],_pe={registerPreprocessor:M$,registerProcessor:L$,registerPostInit:dpe,registerPostUpdate:ppe,registerUpdateLifecycle:ND,registerAction:hs,registerCoordinateSystem:vpe,registerLayout:gpe,registerVisual:fc,registerTransform:ype,registerLoading:k$,registerMap:mpe,registerImpl:Xde,PRIORITY:ope,ComponentModel:tt,ComponentView:$t,SeriesModel:Ot,ChartView:Ct,registerComponentModel:function(r){tt.registerClass(r)},registerComponentView:function(r){$t.registerClass(r)},registerSeriesModel:function(r){Ot.registerClass(r)},registerChartView:function(r){Ct.registerClass(r)},registerSubTypeDefaulter:function(r,e){tt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){iue(r,e)}};function Ze(r){if(ie(r)){R(r,function(e){Ze(e)});return}Xe(UR,r)>=0||(UR.push(r),we(r)&&(r={install:r}),r.install(_pe))}function Dd(r){return r==null?0:r.length||1}function VR(r){return r}var Xs=function(){function r(e,t,i,n,a,s){this._old=e,this._new=t,this._oldKeyGetter=i||VR,this._newKeyGetter=n||VR,this.context=a,this._diffModeMultiple=s==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},n=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,i,a,"_newKeyGetter");for(var s=0;s<e.length;s++){var o=n[s],l=i[o],u=Dd(l);if(u>1){var c=l.shift();l.length===1&&(i[o]=l[0]),this._update&&this._update(c,s)}else u===1?(i[o]=null,this._update&&this._update(l,s)):this._remove&&this._remove(s)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},n={},a=[],s=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(t,n,s,"_newKeyGetter");for(var o=0;o<a.length;o++){var l=a[o],u=i[l],c=n[l],h=Dd(u),d=Dd(c);if(h>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(h===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(h===1&&d===1)this._update&&this._update(c,u),n[l]=null;else if(h>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(h>1)for(var f=0;f<h;f++)this._remove&&this._remove(u[f]);else this._remove&&this._remove(u)}this._performRestAdd(s,n)},r.prototype._performRestAdd=function(e,t){for(var i=0;i<e.length;i++){var n=e[i],a=t[n],s=Dd(a);if(s>1)for(var o=0;o<s;o++)this._add&&this._add(a[o]);else s===1&&this._add&&this._add(a);t[n]=null}},r.prototype._initIndexMap=function(e,t,i,n){for(var a=this._diffModeMultiple,s=0;s<e.length;s++){var o="_ec_"+this[n](e[s],s);if(a||(i[s]=o),!!t){var l=t[o],u=Dd(l);u===0?(t[o]=s,a&&i.push(o)):u===1?t[o]=[l,s]:l.push(s)}}},r}(),bpe=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function Tpe(r,e){var t={},i=t.encode={},n=be(),a=[],s=[],o={};R(r.dimensions,function(d){var f=r.getDimensionInfo(d),p=f.coordDim;if(p){var v=f.coordDimIndex;YT(i,p)[v]=d,f.isExtraCoord||(n.set(p,1),Spe(f.type)&&(a[0]=d),YT(o,p)[v]=r.getDimensionIndex(f.name)),f.defaultTooltip&&s.push(d)}wH.each(function(g,m){var y=YT(i,m),_=f.otherDims[m];_!=null&&_!==!1&&(y[_]=f.name)})});var l=[],u={};n.each(function(d,f){var p=i[f];u[f]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=oe(l,function(d){return r.getDimensionInfo(d).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(a=c.slice());var h=i.tooltip;return h&&h.length?s=h.slice():s.length||(s=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=s,t.userOutput=new bpe(o,e),t}function YT(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function W0(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function Spe(r){return!(r==="ordinal"||r==="time")}var Dy=function(){function r(e){this.otherDims={},e!=null&&J(this,e)}return r}(),xpe=ot(),wpe={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},R$=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=B$(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Be(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=OH(this.source),i=!F$(e),n="",a=[],s=0,o=0;s<e;s++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[o];if(h&&h.storeDimIndex===s)l=t?h.name:null,u=h.type,c=h.ordinalMeta,o++;else{var d=this.getSourceDimension(s);d&&(l=t?d.name:null,u=d.type)}a.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!h||!h.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=wpe[u]||"f",c&&(n+=c.uid),n+="$"}var f=this.source,p=[f.seriesLayoutBy,f.startIndex,n].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,i=0;t<this._fullDimCount;t++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===t)a.isCalculationCoord||(n=a.name),i++;else{var s=this.getSourceDimension(t);s&&(n=s.name)}e.push(n)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function O$(r){return r instanceof R$}function N$(r){for(var e=be(),t=0;t<(r||[]).length;t++){var i=r[t],n=De(i)?i.name:i;n!=null&&e.get(n)==null&&e.set(n,t)}return e}function B$(r){var e=xpe(r);return e.dimNameMap||(e.dimNameMap=N$(r.dimensionsDefine))}function F$(r){return r>30}var Ed=De,_o=oe,Cpe=typeof Int32Array>"u"?Array:Int32Array,Ape="e\0\0",zR=-1,Dpe=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Epe=["_approximateExtent"],GR,Am,Id,Pd,KT,Dm,ZT,wi=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i,n=!1;O$(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,i=e),i=i||["x","y"];for(var a={},s=[],o={},l=!1,u={},c=0;c<i.length;c++){var h=i[c],d=pe(h)?new Dy({name:h}):h instanceof Dy?h:new Dy(h),f=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};s.push(f),a[f]=d,u[f]!=null&&(l=!0),d.createInvertedIndices&&(o[f]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),n&&(d.storeDimIndex=c)}if(this.dimensions=s,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var v=this._dimIdxToName=be();R(s,function(g){v.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var i=this._dimIdxToName.get(t);if(i!=null)return i;var n=this._schema.getSourceDimension(t);if(n)return n.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var i=this._getDimInfo(e);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(ut(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(i){return t.hasOwnProperty(i)?t[i]:void 0}:function(i){return t[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var i=this._dimSummary;if(t==null)return i.encodeFirstDimNotExtra[e];var n=i.encode[e];return n?n[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,i=t.encode[e];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,i){var n=this,a;if(e instanceof l2&&(a=e),!a){var s=this.dimensions,o=AD(e)||li(e)?new NH(e,s.length):e;a=new l2;var l=_o(s,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(o,l,i)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Tpe(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var i=this._store.appendValues(e,t.length),n=i.start,a=i.end,s=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=n;o<a;o++){var l=o-n;this._nameList[o]=t[l],s&&ZT(this,o)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,i=0;i<t.length;i++){var n=this._dimInfos[t[i]];n.ordinalMeta&&e.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==qo&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,s=this._idList,o=n.getSource().sourceFormat,l=o===Qn;if(l&&!n.pure)for(var u=[],c=e;c<t;c++){var h=n.getItem(c,u);if(!this.hasItemOption&&fue(h)&&(this.hasItemOption=!0),h){var d=h.name;a[c]==null&&d!=null&&(a[c]=wr(d,null));var f=h.id;s[c]==null&&f!=null&&(s[c]=wr(f,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)ZT(this,c);GR(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Ed(e)?J(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),i=this._nameList[t];return i==null&&this._nameDimIdx!=null&&(i=Id(this,this._nameDimIdx,t)),i==null&&(i=""),i},r.prototype._getCategory=function(e,t){var i=this._store.get(e,t),n=this._store.getOrdinalMeta(e);return n?n.categories[i]:i},r.prototype.getId=function(e){return Am(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var i=this._store,n=this._dimInfos[e];if(n)return i.get(n.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var i=this._store,n=this._dimInfos[e];if(n)return i.getByRawIndex(n.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var i=this,n=this._store;return ie(e)?n.getValues(_o(e,function(a){return i._getStoreDimIndex(a)}),t):n.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,i=0,n=t.length;i<n;i++)if(isNaN(this._store.get(t[i],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,i=this._store.count();t<i;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var i=e&&this._invertedIndicesMap[e],n=i[t];return n==null||isNaN(n)?zR:n},r.prototype.indicesOfNearest=function(e,t,i){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,i)},r.prototype.each=function(e,t,i){we(e)&&(i=t,t=e,e=[]);var n=i||this,a=_o(Pd(e),this._getStoreDimIndex,this);this._store.each(a,n?ge(t,n):t)},r.prototype.filterSelf=function(e,t,i){we(e)&&(i=t,t=e,e=[]);var n=i||this,a=_o(Pd(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?ge(t,n):t),this},r.prototype.selectRange=function(e){var t=this,i={},n=rt(e);return R(n,function(a){var s=t._getStoreDimIndex(a);i[s]=e[a]}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(e,t,i){we(e)&&(i=t,t=e,e=[]),i=i||this;var n=[];return this.each(e,function(){n.push(t&&t.apply(this,arguments))},i),n},r.prototype.map=function(e,t,i,n){var a=i||n||this,s=_o(Pd(e),this._getStoreDimIndex,this),o=Dm(this);return o._store=this._store.map(s,a?ge(t,a):t),o},r.prototype.modify=function(e,t,i,n){var a=i||n||this,s=_o(Pd(e),this._getStoreDimIndex,this);this._store.modify(s,a?ge(t,a):t)},r.prototype.downSample=function(e,t,i,n){var a=Dm(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),t,i,n),a},r.prototype.lttbDownSample=function(e,t){var i=Dm(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),i},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,i=this.getRawDataItem(e);return new yt(i,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Xs(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Am(e,i)},function(i){return Am(t,i)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Ed(e)?J(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var i=this._itemVisuals[e],n=i&&i[t];return n??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,n=i[e];n||(n=i[e]={});var a=n[t];return a==null&&(a=this.getVisual(t),ie(a)?a=a.slice():Ed(a)&&(a=J({},a)),n[t]=a),a},r.prototype.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Ed(t)?J(n,t):n[t]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Ed(e)?J(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?J(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;Yw(i,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(i,n){i&&e&&e.call(t,i,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:_o(this.dimensions,this._getDimInfo,this),this.hostModel)),KT(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var i=this[e];we(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=i.apply(this,arguments);return t.apply(this,[n].concat(qA(arguments)))})},r.internalField=function(){GR=function(e){var t=e._invertedIndicesMap;R(t,function(i,n){var a=e._dimInfos[n],s=a.ordinalMeta,o=e._store;if(s){i=t[n]=new Cpe(s.categories.length);for(var l=0;l<i.length;l++)i[l]=zR;for(var l=0;l<o.count();l++)i[o.get(a.storeDimIndex,l)]=l}})},Id=function(e,t,i){return wr(e._getCategory(t,i),null)},Am=function(e,t){var i=e._idList[t];return i==null&&e._idDimIdx!=null&&(i=Id(e,e._idDimIdx,t)),i==null&&(i=Ape+t),i},Pd=function(e){return ie(e)||(e=e!=null?[e]:[]),e},Dm=function(e){var t=new r(e._schema?e._schema:_o(e.dimensions,e._getDimInfo,e),e.hostModel);return KT(t,e),t},KT=function(e,t){R(Dpe.concat(t.__wrappedMethods||[]),function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e.__wrappedMethods=t.__wrappedMethods,R(Epe,function(i){e[i]=Ee(t[i])}),e._calculationInfo=J({},t._calculationInfo)},ZT=function(e,t){var i=e._nameList,n=e._idList,a=e._nameDimIdx,s=e._idDimIdx,o=i[t],l=n[t];if(o==null&&a!=null&&(i[t]=o=Id(e,a,t)),l==null&&s!=null&&(n[t]=l=Id(e,s,t)),l==null&&o!=null){var u=e._nameRepeatCount,c=u[o]=(u[o]||0)+1;l=o,c>1&&(l+="__ec__"+c),n[t]=l}}}(),r}();function sg(r,e){AD(r)||(r=DD(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],n=be(),a=[],s=Ppe(r,t,i,e.dimensionsCount),o=e.canOmitUnusedDimensions&&F$(s),l=i===r.dimensionsDefine,u=l?B$(r):N$(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,s));for(var h=be(c),d=new $H(s),f=0;f<d.length;f++)d[f]=-1;function p(I){var M=d[I];if(M<0){var L=i[I],N=De(L)?L:{name:L},O=new Dy,B=N.name;B!=null&&u.get(B)!=null&&(O.name=O.displayName=B),N.type!=null&&(O.type=N.type),N.displayName!=null&&(O.displayName=N.displayName);var F=a.length;return d[I]=F,O.storeDimIndex=I,a.push(O),O}return a[M]}if(!o)for(var f=0;f<s;f++)p(f);h.each(function(I,M){var L=xt(I).slice();if(L.length===1&&!pe(L[0])&&L[0]<0){h.set(M,!1);return}var N=h.set(M,[]);R(L,function(O,B){var F=pe(O)?u.get(O):O;F!=null&&F<s&&(N[B]=F,g(p(F),M,B))})});var v=0;R(t,function(I){var M,L,N,O;if(pe(I))M=I,O={};else{O=I,M=O.name;var B=O.ordinalMeta;O.ordinalMeta=null,O=J({},O),O.ordinalMeta=B,L=O.dimsDef,N=O.otherDims,O.name=O.coordDim=O.coordDimIndex=O.dimsDef=O.otherDims=null}var F=h.get(M);if(F!==!1){if(F=xt(F),!F.length)for(var U=0;U<(L&&L.length||1);U++){for(;v<s&&p(v).coordDim!=null;)v++;v<s&&F.push(v++)}R(F,function($,q){var Z=p($);if(l&&O.type!=null&&(Z.type=O.type),g(Ce(Z,O),M,q),Z.name==null&&L){var te=L[q];!De(te)&&(te={name:te}),Z.name=Z.displayName=te.name,Z.defaultTooltip=te.defaultTooltip}N&&Ce(Z.otherDims,N)})}});function g(I,M,L){wH.get(M)!=null?I.otherDims[M]=L:(I.coordDim=M,I.coordDimIndex=L,n.set(M,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var b=m||"value";function S(I){I.name==null&&(I.name=I.coordDim)}if(o)R(a,function(I){S(I)}),a.sort(function(I,M){return I.storeDimIndex-M.storeDimIndex});else for(var x=0;x<s;x++){var C=p(x),D=C.coordDim;D==null&&(C.coordDim=Mpe(b,n,_),C.coordDimIndex=0,(!m||y<=0)&&(C.isExtraCoord=!0),y--),S(C),C.type==null&&(EH(r,x)===jr.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type="ordinal")}return Ipe(a),new R$({source:r,dimensions:a,fullDimensionCount:s,dimensionOmitted:o})}function Ipe(r){for(var e=be(),t=0;t<r.length;t++){var i=r[t],n=i.name,a=e.get(n)||0;a>0&&(i.name=n+(a-1)),a++,e.set(n,a)}}function Ppe(r,e,t,i){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,i||0);return R(e,function(a){var s;De(a)&&(s=a.dimsDef)&&(n=Math.max(n,s.length))}),n}function Mpe(r,e,t){if(t||e.hasKey(r)){for(var i=0;e.hasKey(r+i);)i++;r+=i}return e.set(r,!0),r}var Lpe=function(){function r(e){this.coordSysDims=[],this.axisMap=be(),this.categoryAxisMap=be(),this.coordSysName=e}return r}();function kpe(r){var e=r.get("coordinateSystem"),t=new Lpe(e),i=Rpe[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var Rpe={cartesian2d:function(r,e,t,i){var n=r.getReferringComponents("xAxis",mr).models[0],a=r.getReferringComponents("yAxis",mr).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",a),qc(n)&&(i.set("x",n),e.firstCategoryDimIndex=0),qc(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,i){var n=r.getReferringComponents("singleAxis",mr).models[0];e.coordSysDims=["single"],t.set("single",n),qc(n)&&(i.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,i){var n=r.getReferringComponents("polar",mr).models[0],a=n.findAxisModel("radiusAxis"),s=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",s),qc(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),qc(s)&&(i.set("angle",s),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(o,l){var u=n.getComponent("parallelAxis",o),c=s[l];t.set(c,u),qc(u)&&(i.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function qc(r){return r.get("type")==="category"}function Ope(r,e,t){t=t||{};var i=t.byIndex,n=t.stackedCoordDimension,a,s,o;Npe(e)?a=e:(s=e.schema,a=s.dimensions,o=e.store);var l=!!(r&&r.get("stack")),u,c,h,d;if(R(a,function(y,_){pe(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!i&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!n||n===y.coordDim)&&(c=y))}),c&&!i&&!u&&(i=!0),c){h="__\0ecstackresult_"+r.id,d="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var f=c.coordDim,p=c.type,v=0;R(a,function(y){y.coordDim===f&&v++});var g={name:h,coordDim:f,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};s?(o&&(g.storeDimIndex=o.ensureCalculationDimension(d,p),m.storeDimIndex=o.ensureCalculationDimension(h,p)),s.appendCalculationDimension(g),s.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:d,stackResultDimension:h}}function Npe(r){return!O$(r.schema)}function nl(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function U$(r,e){return nl(r,e)?r.getCalculationInfo("stackResultDimension"):e}function Bpe(r,e){var t=r.get("coordinateSystem"),i=ng.get(t),n;return e&&e.coordSysDims&&(n=oe(e.coordSysDims,function(a){var s={name:a},o=e.axisMap.get(a);if(o){var l=o.get("type");s.type=W0(l)}return s})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function Fpe(r,e,t){var i,n;return t&&R(r,function(a,s){var o=a.coordDim,l=t.categoryAxisMap.get(o);l&&(i==null&&(i=s),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function to(r,e,t){t=t||{};var i=e.getSourceManager(),n,a=!1;r?(a=!0,n=DD(r)):(n=i.getSource(),a=n.sourceFormat===Qn);var s=kpe(e),o=Bpe(e,s),l=t.useEncodeDefaulter,u=we(l)?l:l?Ue(DH,o,e):null,c={coordDimensions:o,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=sg(n,c),d=Fpe(h.dimensions,t.createInvertedIndices,s),f=a?null:i.getSharedDataStore(h),p=Ope(e,{schema:h,store:f}),v=new wi(h,e);v.setCalculationInfo(p);var g=d!=null&&Upe(n)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return v.hasItemOption=!1,v.initData(a?n:f,null,g),v}function Upe(r){if(r.sourceFormat===Qn){var e=Vpe(r.data||[]);return!ie(Pf(e))}}function Vpe(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var fs=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();i1(fs);var zpe=0,y2=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++zpe}return r.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&oe(i,Gpe);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!pe(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=be(this.categories))},r}();function Gpe(r){return De(r)&&r.value!=null?r.value:r+""}function _2(r){return r.type==="interval"||r.type==="log"}function Hpe(r,e,t,i){var n={},a=r[1]-r[0],s=n.interval=f9(a/e);t!=null&&s<t&&(s=n.interval=t),i!=null&&s>i&&(s=n.interval=i);var o=n.intervalPrecision=V$(s),l=n.niceTickExtent=[er(Math.ceil(r[0]/s)*s,o),er(Math.floor(r[1]/s)*s,o)];return $pe(l,r),n}function QT(r){var e=Math.pow(10,eD(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,er(t*e)}function V$(r){return Wa(r)+2}function HR(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function $pe(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),HR(r,0,e),HR(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function w1(r,e){return r>=e[0]&&r<=e[1]}function C1(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function A1(r,e){return r*(e[1]-e[0])+e[0]}var D1=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new y2({})),ie(n)&&(n=new y2({categories:oe(n,function(a){return De(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:pe(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),w1(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),C1(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(A1(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,n=i[0];n<=i[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],s=0,o=this._ordinalMeta.categories.length,l=Math.min(o,i.length);s<l;++s){var u=i[s];n[s]=u,a[u]=s}for(var c=0;s<o;++s){for(;a[c]!=null;)c++;n.push(c),a[c]=s}},e.prototype._getTickNumber=function(t){var i=this._ticksByOrdinalNumber;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getRawOrdinalNumber=function(t){var i=this._ordinalNumbersByTick;return i&&t>=0&&t<i.length?i[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var i=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(fs);fs.registerClass(D1);var ql=er,Ys=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return w1(t,this._extent)},e.prototype.normalize=function(t){return C1(t,this._extent)},e.prototype.scale=function(t){return A1(t,this._extent)},e.prototype.setExtent=function(t,i){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(i)||(n[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=V$(t)},e.prototype.getTicks=function(t){var i=this._interval,n=this._extent,a=this._niceExtent,s=this._intervalPrecision,o=[];if(!i)return o;var l=1e4;n[0]<a[0]&&(t?o.push({value:ql(a[0]-i,s)}):o.push({value:n[0]}));for(var u=a[0];u<=a[1]&&(o.push({value:u}),u=ql(u+i,s),u!==o[o.length-1].value);)if(o.length>l)return[];var c=o.length?o[o.length-1].value:a[1];return n[1]>c&&(t?o.push({value:ql(c+i,s)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),s=1;s<i.length;s++){for(var o=i[s],l=i[s-1],u=0,c=[],h=o.value-l.value,d=h/t;u<t-1;){var f=ql(l.value+(u+1)*d);f>a[0]&&f<a[1]&&c.push(f),u++}n.push(c)}return n},e.prototype.getLabel=function(t,i){if(t==null)return"";var n=i&&i.precision;n==null?n=Wa(t.value)||0:n==="auto"&&(n=this._intervalPrecision);var a=ql(t.value,n,!0);return yH(a)},e.prototype.calcNiceTicks=function(t,i,n){t=t||5;var a=this._extent,s=a[1]-a[0];if(isFinite(s)){s<0&&(s=-s,a.reverse());var o=Hpe(a,t,i,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var n=Math.abs(i[0]);t.fixMax||(i[1]+=n/2),i[0]-=n/2}else i[1]=1;var a=i[1]-i[0];isFinite(a)||(i[0]=0,i[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var s=this._interval;t.fixMin||(i[0]=ql(Math.floor(i[0]/s)*s)),t.fixMax||(i[1]=ql(Math.ceil(i[1]/s)*s))},e.prototype.setNiceExtent=function(t,i){this._niceExtent=[t,i]},e.type="interval",e}(fs);fs.registerClass(Ys);var z$=typeof Float32Array<"u",Wpe=z$?Float32Array:Array;function ja(r){return ie(r)?z$?new Float32Array(r):r:new Wpe(r)}var b2="__ec_stack_";function FD(r){return r.get("stack")||b2+r.seriesIndex}function UD(r){return r.dim+r.index}function qpe(r){var e=[],t=r.axis,i="axis0";if(t.type==="category"){for(var n=t.getBandWidth(),a=0;a<r.count;a++)e.push(Ce({bandWidth:n,axisKey:i,stackId:b2+a},r));for(var s=$$(e),o=[],a=0;a<r.count;a++){var l=s[i][b2+a];l.offsetCenter=l.offset+l.width/2,o.push(l)}return o}}function G$(r,e){var t=[];return e.eachSeriesByType(r,function(i){j$(i)&&t.push(i)}),t}function jpe(r){var e={};R(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),d=c.dim+"_"+c.index,f=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(f,v);e[d]?e[d].push(m):e[d]=[m]}});var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(n){n.sort(function(l,u){return l-u});for(var a=null,s=1;s<n.length;++s){var o=n[s]-n[s-1];o>0&&(a=a===null?o:Math.min(a,o))}t[i]=a}}return t}function H$(r){var e=jpe(r),t=[];return R(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),s=a.getExtent(),o;if(a.type==="category")o=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(s[1]-s[0]),h=a.scale.getExtent(),d=Math.abs(h[1]-h[0]);o=u?c/d*u:c}else{var f=i.getData();o=Math.abs(s[1]-s[0])/f.count()}var p=ce(i.get("barWidth"),o),v=ce(i.get("barMaxWidth"),o),g=ce(i.get("barMinWidth")||(X$(i)?.5:1),o),m=i.get("barGap"),y=i.get("barCategoryGap");t.push({bandWidth:o,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:UD(a),stackId:FD(i)})}),$$(t)}function $$(r){var e={};R(r,function(i,n){var a=i.axisKey,s=i.bandWidth,o=e[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=o.stacks;e[a]=o;var u=i.stackId;l[u]||o.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=i.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(o.remainedWidth,c),o.remainedWidth-=c);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var d=i.barMinWidth;d&&(l[u].minWidth=d);var f=i.barGap;f!=null&&(o.gap=f);var p=i.barCategoryGap;p!=null&&(o.categoryGap=p)});var t={};return R(e,function(i,n){t[n]={};var a=i.stacks,s=i.bandWidth,o=i.categoryGap;if(o==null){var l=rt(a).length;o=Math.max(35-l*4,15)+"%"}var u=ce(o,s),c=ce(i.gap,1),h=i.remainedWidth,d=i.autoWidthCount,f=(h-u)/(d+(d-1)*c);f=Math.max(f,0),R(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,h-=b+c*b,d--}else{var b=f;y&&y<b&&(b=Math.min(y,h)),_&&_>b&&(b=_),b!==f&&(m.width=b,h-=b+c*b,d--)}}),f=(h-u)/(d+(d-1)*c),f=Math.max(f,0);var p=0,v;R(a,function(m,y){m.width||(m.width=f),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;R(a,function(m,y){t[n][y]=t[n][y]||{bandWidth:s,offset:g,width:m.width},g+=m.width*(1+c)})}),t}function Xpe(r,e,t){if(r&&e){var i=r[UD(e)];return i!=null&&t!=null?i[FD(t)]:i}}function W$(r,e){var t=G$(r,e),i=H$(t);R(t,function(n){var a=n.getData(),s=n.coordinateSystem,o=s.getBaseAxis(),l=FD(n),u=i[UD(o)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function q$(r){return{seriesType:r,plan:Uf(),reset:function(e){if(j$(e)){var t=e.getData(),i=e.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),s=t.getDimensionIndex(t.mapDimension(a.dim)),o=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),h=nl(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),f=Ype(n,a),p=X$(e),v=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(_,b){for(var S=_.count,x=p&&ja(S*3),C=p&&l&&ja(S*3),D=p&&ja(S),I=i.master.getRect(),M=d?I.width:I.height,L,N=b.getStore(),O=0;(L=_.next())!=null;){var B=N.get(h?g:s,L),F=N.get(o,L),U=f,$=void 0;h&&($=+B-N.get(s,L));var q=void 0,Z=void 0,te=void 0,Q=void 0;if(d){var se=i.dataToPoint([B,F]);if(h){var he=i.dataToPoint([$,F]);U=he[0]}q=U,Z=se[1]+y,te=se[0]-U,Q=m,Math.abs(te)<v&&(te=(te<0?-1:1)*v)}else{var se=i.dataToPoint([F,B]);if(h){var he=i.dataToPoint([F,$]);U=he[1]}q=se[0]+y,Z=U,te=m,Q=se[1]-U,Math.abs(Q)<v&&(Q=(Q<=0?-1:1)*v)}p?(x[O]=q,x[O+1]=Z,x[O+2]=d?te:Q,C&&(C[O]=d?I.x:q,C[O+1]=d?Z:I.y,C[O+2]=M),D[L]=L):b.setItemLayout(L,{x:q,y:Z,width:te,height:Q}),O+=3}p&&b.setLayout({largePoints:x,largeDataIndices:D,largeBackgroundPoints:C,valueAxisHorizontal:d})}}}}}}function j$(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function X$(r){return r.pipelineContext&&r.pipelineContext.large}function Ype(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var Kpe=function(r,e,t,i){for(;t<i;){var n=t+i>>>1;r[n][1]<e?t=n+1:i=n}return t},VD=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="time",i}return e.prototype.getLabel=function(t){var i=this.getSetting("useUTC");return p1(t.value,kk[Lhe(Nh(this._minLevelUnit))]||kk.second,i,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,i,n){var a=this.getSetting("useUTC"),s=this.getSetting("locale");return khe(t,i,n,s,a)},e.prototype.getTicks=function(){var t=this._interval,i=this._extent,n=[];if(!t)return n;n.push({value:i[0],level:0});var a=this.getSetting("useUTC"),s=ive(this._minLevelUnit,this._approxInterval,a,i);return n=n.concat(s),n.push({value:i[1],level:0}),n},e.prototype.calcNiceExtent=function(t){var i=this._extent;if(i[0]===i[1]&&(i[0]-=Vn,i[1]+=Vn),i[1]===-1/0&&i[0]===1/0){var n=new Date;i[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),i[0]=i[1]-Vn}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,i,n){t=t||10;var a=this._extent,s=a[1]-a[0];this._approxInterval=s/t,i!=null&&this._approxInterval<i&&(this._approxInterval=i),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var o=Em.length,l=Math.min(Kpe(Em,this._approxInterval,0,o),o-1);this._interval=Em[l][1],this._minLevelUnit=Em[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return ut(t)?t:+ls(t)},e.prototype.contain=function(t){return w1(this.parse(t),this._extent)},e.prototype.normalize=function(t){return C1(this.parse(t),this._extent)},e.prototype.scale=function(t){return A1(t,this._extent)},e.type="time",e}(Ys),Em=[["second",yD],["minute",_D],["hour",Np],["quarter-day",Np*6],["half-day",Np*12],["day",Vn*1.2],["half-week",Vn*3.5],["week",Vn*7],["month",Vn*31],["quarter",Vn*95],["half-year",Lk/2],["year",Lk]];function Zpe(r,e,t,i){var n=ls(e),a=ls(t),s=function(p){return Rk(n,p,i)===Rk(a,p,i)},o=function(){return s("year")},l=function(){return o()&&s("month")},u=function(){return l()&&s("day")},c=function(){return u()&&s("hour")},h=function(){return c()&&s("minute")},d=function(){return h()&&s("second")},f=function(){return d()&&s("millisecond")};switch(r){case"year":return o();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return d();case"millisecond":return f()}}function Qpe(r,e){return r/=Vn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Jpe(r){var e=30*Vn;return r/=e,r>6?6:r>3?3:r>2?2:1}function eve(r){return r/=Np,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function $R(r,e){return r/=e?_D:yD,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function tve(r){return f9(r)}function rve(r,e,t){var i=new Date(r);switch(Nh(e)){case"year":case"month":i[fH(t)](0);case"day":i[dH(t)](1);case"hour":i[pH(t)](0);case"minute":i[vH(t)](0);case"second":i[gH(t)](0),i[mH(t)](0)}return i.getTime()}function ive(r,e,t,i){var n=1e4,a=cH,s=0;function o(M,L,N,O,B,F,U){for(var $=new Date(L),q=L,Z=$[O]();q<N&&q<=i[1];)U.push({value:q}),Z+=M,$[B](Z),q=$.getTime();U.push({value:q,notAdd:!0})}function l(M,L,N){var O=[],B=!L.length;if(!Zpe(Nh(M),i[0],i[1],t)){B&&(L=[{value:rve(new Date(i[0]),M,t)},{value:i[1]}]);for(var F=0;F<L.length-1;F++){var U=L[F].value,$=L[F+1].value;if(U!==$){var q=void 0,Z=void 0,te=void 0,Q=!1;switch(M){case"year":q=Math.max(1,Math.round(e/Vn/365)),Z=bD(t),te=Rhe(t);break;case"half-year":case"quarter":case"month":q=Jpe(e),Z=Bh(t),te=fH(t);break;case"week":case"half-week":case"day":q=Qpe(e),Z=v1(t),te=dH(t),Q=!0;break;case"half-day":case"quarter-day":case"hour":q=eve(e),Z=gv(t),te=pH(t);break;case"minute":q=$R(e,!0),Z=g1(t),te=vH(t);break;case"second":q=$R(e,!1),Z=m1(t),te=gH(t);break;case"millisecond":q=tve(e),Z=y1(t),te=mH(t);break}o(q,U,$,Z,te,Q,O),M==="year"&&N.length>1&&F===0&&N.unshift({value:N[0].value-q})}}for(var F=0;F<O.length;F++)N.push(O[F]);return O}}for(var u=[],c=[],h=0,d=0,f=0;f<a.length&&s++<n;++f){var p=Nh(a[f]);if(Mhe(a[f])){l(a[f],u[u.length-1]||[],c);var v=a[f+1]?Nh(a[f+1]):null;if(p!==v){if(c.length){d=h,c.sort(function(M,L){return M.value-L.value});for(var g=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(g.push(c[m]),y>=i[0]&&y<=i[1]&&h++)}var _=(i[1]-i[0])/e;if(h>_*1.5&&d>_/1.5||(u.push(g),h>_||r===a[f]))break}c=[]}}}for(var b=St(oe(u,function(M){return St(M,function(L){return L.value>=i[0]&&L.value<=i[1]&&!L.notAdd})}),function(M){return M.length>0}),S=[],x=b.length-1,f=0;f<b.length;++f)for(var C=b[f],D=0;D<C.length;++D)S.push({value:C[D].value,level:x-f});S.sort(function(M,L){return M.value-L.value});for(var I=[],f=0;f<S.length;++f)(f===0||S[f].value!==S[f-1].value)&&I.push(S[f]);return I}fs.registerClass(VD);var WR=fs.prototype,Vp=Ys.prototype,nve=er,ave=Math.floor,sve=Math.ceil,Im=Math.pow,ia=Math.log,zD=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Ys,t._interval=0,t}return e.prototype.getTicks=function(t){var i=this._originalScale,n=this._extent,a=i.getExtent(),s=Vp.getTicks.call(this,t);return oe(s,function(o){var l=o.value,u=er(Im(this.base,l));return u=l===n[0]&&this._fixMin?Pm(u,a[0]):u,u=l===n[1]&&this._fixMax?Pm(u,a[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,i){var n=ia(this.base);t=ia(Math.max(0,t))/n,i=ia(Math.max(0,i))/n,Vp.setExtent.call(this,t,i)},e.prototype.getExtent=function(){var t=this.base,i=WR.getExtent.call(this);i[0]=Im(t,i[0]),i[1]=Im(t,i[1]);var n=this._originalScale,a=n.getExtent();return this._fixMin&&(i[0]=Pm(i[0],a[0])),this._fixMax&&(i[1]=Pm(i[1],a[1])),i},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var i=this.base;t[0]=ia(t[0])/ia(i),t[1]=ia(t[1])/ia(i),WR.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,i){this.unionExtent(t.getApproximateExtent(i))},e.prototype.calcNiceTicks=function(t){t=t||10;var i=this._extent,n=i[1]-i[0];if(!(n===1/0||n<=0)){var a=hue(n),s=t/n*a;for(s<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var o=[er(sve(i[0]/a)*a),er(ave(i[1]/a)*a)];this._interval=a,this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){Vp.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=ia(t)/ia(this.base),w1(t,this._extent)},e.prototype.normalize=function(t){return t=ia(t)/ia(this.base),C1(t,this._extent)},e.prototype.scale=function(t){return t=A1(t,this._extent),Im(this.base,t)},e.type="log",e}(fs),Y$=zD.prototype;Y$.getMinorTicks=Vp.getMinorTicks;Y$.getLabel=Vp.getLabel;function Pm(r,e){return nve(r,Wa(e))}fs.registerClass(zD);var ove=function(){function r(e,t,i){this._prepareParams(e,t,i)}return r.prototype._prepareParams=function(e,t,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var a=t.get("min",!0);a==null&&(a=t.get("startValue",!0));var s=this._modelMinRaw=a;we(s)?this._modelMinNum=Mm(e,s({min:i[0],max:i[1]})):s!=="dataMin"&&(this._modelMinNum=Mm(e,s));var o=this._modelMaxRaw=t.get("max",!0);if(we(o)?this._modelMaxNum=Mm(e,o({min:i[0],max:i[1]})):o!=="dataMax"&&(this._modelMaxNum=Mm(e,o)),n)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=ie(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ya(u[0],1),ya(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,i=this._dataMax,n=this._axisDataLen,a=this._boundaryGapInner,s=e?null:i-t||Math.abs(t),o=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=o!=null,c=l!=null;o==null&&(o=e?n?0:NaN:t-a[0]*s),l==null&&(l=e?n?n-1:NaN:i+a[1]*s),(o==null||!isFinite(o))&&(o=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=ov(o)||ov(l)||e&&!n;this._needCrossZero&&(o>0&&l>0&&!u&&(o=0),o<0&&l<0&&!c&&(l=0));var d=this._determinedMin,f=this._determinedMax;return d!=null&&(o=d,u=!0),f!=null&&(l=f,c=!0),{min:o,max:l,minFixed:u,maxFixed:c,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[uve[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=lve[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),lve={min:"_determinedMin",max:"_determinedMax"},uve={min:"_dataMin",max:"_dataMax"};function K$(r,e,t){var i=r.rawExtentInfo;return i||(i=new ove(r,e,t),r.rawExtentInfo=i,i)}function Mm(r,e){return e==null?null:ov(e)?NaN:r.parse(e)}function Z$(r,e){var t=r.type,i=K$(r,e,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,s=e.ecModel;if(s&&t==="time"){var o=G$("bar",s),l=!1;if(R(o,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=H$(o),c=cve(n,a,e,u);n=c.min,a=c.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function cve(r,e,t,i){var n=t.axis.getExtent(),a=n[1]-n[0],s=Xpe(i,t.axis);if(s===void 0)return{min:r,max:e};var o=1/0;R(s,function(f){o=Math.min(f.offset,o)});var l=-1/0;R(s,function(f){l=Math.max(f.offset+f.width,l)}),o=Math.abs(o),l=Math.abs(l);var u=o+l,c=e-r,h=1-(o+l)/a,d=c/h-c;return e+=d*(l/u),r-=d*(o/u),{min:r,max:e}}function hf(r,e){var t=e,i=Z$(r,t),n=i.extent,a=t.get("splitNumber");r instanceof zD&&(r.base=t.get("logBase"));var s=r.type,o=t.get("interval"),l=s==="interval"||s==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),o!=null&&r.setInterval&&r.setInterval(o)}function E1(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new D1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new VD({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(fs.getClass(e)||Ys)}}function hve(r){var e=r.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function Gf(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(e):pe(e)?function(i){return function(n){var a=r.scale.getLabel(n),s=i.replace("{value}",a??"");return s}}(e):we(e)?function(i){return function(n,a){return t!=null&&(a=n.value-t),i(GD(r,n),a,n.level!=null?{level:n.level}:null)}}(e):function(i){return r.scale.getLabel(i)}}function GD(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function fve(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,n,a=t.getExtent();t instanceof D1?n=t.count():(i=t.getTicks(),n=i.length);var s=r.getLabelModel(),o=Gf(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;c<n;c+=u){var h=i?i[c]:{value:a[0]+c},d=o(h,c),f=s.getTextRect(d),p=dve(f,s.get("rotate")||0);l?l.union(p):l=p}return l}}function dve(r,e){var t=e*Math.PI/180,i=r.width,n=r.height,a=i*Math.abs(Math.cos(t))+Math.abs(n*Math.sin(t)),s=i*Math.abs(Math.sin(t))+Math.abs(n*Math.cos(t)),o=new qe(r.x,r.y,a,s);return o}function HD(r){var e=r.get("interval");return e??"auto"}function Q$(r){return r.type==="category"&&HD(r.getLabelModel())===0}function q0(r,e){var t={};return R(r.mapDimensionsAll(e),function(i){t[U$(r,i)]=!0}),rt(t)}function pve(r,e,t){e&&R(q0(e,t),function(i){var n=e.getApproximateExtent(i);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}var og=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),vve=1e-8;function qR(r,e){return Math.abs(r-e)<vve}function lu(r,e,t){var i=0,n=r[0];if(!n)return!1;for(var a=1;a<r.length;a++){var s=r[a];i+=Ss(n[0],n[1],s[0],s[1],e,t),n=s}var o=r[0];return(!qR(n[0],o[0])||!qR(n[1],o[1]))&&(i+=Ss(n[0],n[1],o[0],o[1],e,t)),i!==0}var gve=[];function JT(r,e){for(var t=0;t<r.length;t++)Zr(r[t],r[t],e)}function jR(r,e,t,i){for(var n=0;n<r.length;n++){var a=r[n];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Oo(e,e,a),No(t,t,a))}}function mve(r){for(var e=0,t=0,i=0,n=r.length,a=r[n-1][0],s=r[n-1][1],o=0;o<n;o++){var l=r[o][0],u=r[o][1],c=a*u-l*s;e+=c,t+=(a+l)*c,i+=(s+u)*c,a=l,s=u}return e?[t/e/3,i/e/3,e]:[r[0][0]||0,r[0][1]||0]}var J$=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),XR=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),YR=function(){function r(e){this.type="linestring",this.points=e}return r}(),eW=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t)||this;return a.type="geoJSON",a.geometries=i,a._center=n&&[n[0],n[1]],a}return e.prototype.calcCenter=function(){for(var t=this.geometries,i,n=0,a=0;a<t.length;a++){var s=t[a],o=s.exterior,l=o&&o.length;l>n&&(i=s,n=l)}if(i)return mve(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var n=[1/0,1/0],a=[-1/0,-1/0],s=this.geometries;return R(s,function(o){o.type==="polygon"?jR(o.exterior,n,a,t):R(o.points,function(l){jR(l,n,a,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new qe(n[0],n[1],a[0]-n[0],a[1]-n[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(t[0],t[1]))return!1;e:for(var a=0,s=n.length;a<s;a++){var o=n[a];if(o.type==="polygon"){var l=o.exterior,u=o.interiors;if(lu(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(lu(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,i,n,a){var s=this.getBoundingRect(),o=s.width/s.height;n?a||(a=n/o):n=o*a;for(var l=new qe(t,i,n,a),u=s.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var d=c[h];d.type==="polygon"?(JT(d.exterior,u),R(d.interiors,function(f){JT(f,u)})):R(d.points,function(f){JT(f,u)})}s=this._rect,s.copy(l),this._center=[s.x+s.width/2,s.y+s.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var i=new e(t,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},e}(J$),yve=function(r){j(e,r);function e(t,i){var n=r.call(this,t)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,i=t.getBoundingRect(),n=[i.x+i.width/2,i.y+i.height/2],a=J_(gve),s=t;s&&!s.isGeoSVGGraphicRoot;)Rs(a,s.getLocalTransform(),a),s=s.parent;return If(a,a),Zr(n,n,a),n},e}(J$);function _ve(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var i=e.features;return R(i,function(n){var a=n.geometry,s=a.encodeOffsets,o=a.coordinates;if(s)switch(a.type){case"LineString":a.coordinates=tW(o,s,t);break;case"Polygon":eS(o,s,t);break;case"MultiLineString":eS(o,s,t);break;case"MultiPolygon":R(o,function(l,u){return eS(l,s[u],t)})}}),e.UTF8Encoding=!1,e}function eS(r,e,t){for(var i=0;i<r.length;i++)r[i]=tW(r[i],e[i],t)}function tW(r,e,t){for(var i=[],n=e[0],a=e[1],s=0;s<r.length;s+=2){var o=r.charCodeAt(s)-64,l=r.charCodeAt(s+1)-64;o=o>>1^-(o&1),l=l>>1^-(l&1),o+=n,l+=a,n=o,a=l,i.push([o/t,l/t])}return i}function bve(r,e){return r=_ve(r),oe(St(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,n=t.geometry,a=[];switch(n.type){case"Polygon":var s=n.coordinates;a.push(new XR(s[0],s.slice(1)));break;case"MultiPolygon":R(n.coordinates,function(l){l[0]&&a.push(new XR(l[0],l.slice(1)))});break;case"LineString":a.push(new YR([n.coordinates]));break;case"MultiLineString":a.push(new YR(n.coordinates))}var o=new eW(i[e||"name"],a,i.cp);return o.properties=i,o})}var Sv=ot();function rW(r,e){var t=oe(e,function(i){return r.scale.parse(i)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function Tve(r){var e=r.getLabelModel().get("customValues");if(e){var t=Gf(r);return{labels:rW(r,e).map(function(i){var n={value:i};return{formattedLabel:t(n),rawLabel:r.scale.getLabel(n),tickValue:i}})}}return r.type==="category"?xve(r):Cve(r)}function Sve(r,e){var t=r.getTickModel().get("customValues");return t?{ticks:rW(r,t)}:r.type==="category"?wve(r,e):{ticks:oe(r.scale.getTicks(),function(i){return i.value})}}function xve(r){var e=r.getLabelModel(),t=iW(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function iW(r,e){var t=nW(r,"labels"),i=HD(e),n=aW(t,i);if(n)return n;var a,s;return we(i)?a=lW(r,i):(s=i==="auto"?Ave(r):i,a=oW(r,s)),sW(t,i,{labels:a,labelCategoryInterval:s})}function wve(r,e){var t=nW(r,"ticks"),i=HD(e),n=aW(t,i);if(n)return n;var a,s;if((!e.get("show")||r.scale.isBlank())&&(a=[]),we(i))a=lW(r,i,!0);else if(i==="auto"){var o=iW(r,r.getLabelModel());s=o.labelCategoryInterval,a=oe(o.labels,function(l){return l.tickValue})}else s=i,a=oW(r,s,!0);return sW(t,i,{ticks:a,tickCategoryInterval:s})}function Cve(r){var e=r.scale.getTicks(),t=Gf(r);return{labels:oe(e,function(i,n){return{level:i.level,formattedLabel:t(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function nW(r,e){return Sv(r)[e]||(Sv(r)[e]=[])}function aW(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function sW(r,e,t){return r.push({key:e,value:t}),t}function Ave(r){var e=Sv(r).autoInterval;return e??(Sv(r).autoInterval=r.calculateCategoryInterval())}function Dve(r){var e=Eve(r),t=Gf(r),i=(e.axisRotate-e.labelRotate)/180*Math.PI,n=r.scale,a=n.getExtent(),s=n.count();if(a[1]-a[0]<1)return 0;var o=1;s>40&&(o=Math.max(1,Math.floor(s/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=o){var p=0,v=0,g=Kv(t({value:l}),e.font,"center","top");p=g.width*1.3,v=g.height*1.3,d=Math.max(d,p,7),f=Math.max(f,v,7)}var m=d/c,y=f/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),b=Sv(r.model),S=r.getExtent(),x=b.lastAutoInterval,C=b.lastTickCount;return x!=null&&C!=null&&Math.abs(x-_)<=1&&Math.abs(C-s)<=1&&x>_&&b.axisExtent0===S[0]&&b.axisExtent1===S[1]?_=x:(b.lastTickCount=s,b.lastAutoInterval=_,b.axisExtent0=S[0],b.axisExtent1=S[1]),_}function Eve(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function oW(r,e,t){var i=Gf(r),n=r.scale,a=n.getExtent(),s=r.getLabelModel(),o=[],l=Math.max((e||0)+1,1),u=a[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Q$(r),d=s.get("showMinLabel")||h,f=s.get("showMaxLabel")||h;d&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);f&&p-l!==a[1]&&v(a[1]);function v(g){var m={value:g};o.push(t?g:{formattedLabel:i(m),rawLabel:n.getLabel(m),tickValue:g})}return o}function lW(r,e,t){var i=r.scale,n=Gf(r),a=[];return R(i.getTicks(),function(s){var o=i.getLabel(s),l=s.value;e(s.value,o)&&a.push(t?l:{formattedLabel:n(s),rawLabel:o,tickValue:l})}),a}var KR=[0,1],xa=function(){function r(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return r.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=i&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return c9(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},r.prototype.dataToCoord=function(e,t){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(i=i.slice(),ZR(i,n.count())),bt(e,KR,i,t)},r.prototype.coordToData=function(e,t){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),ZR(i,n.count()));var a=bt(e,i,KR,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=Sve(this,t),n=i.ticks,a=oe(n,function(o){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(o):o),tickValue:o}},this),s=t.get("alignWithLabel");return Ive(this,a,s,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var i=this.scale.getMinorTicks(t),n=oe(i,function(a){return oe(a,function(s){return{coord:this.dataToCoord(s),tickValue:s}},this)},this);return n},r.prototype.getViewLabels=function(){return Tve(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return Dve(this)},r}();function ZR(r,e){var t=r[1]-r[0],i=e,n=t/i/2;r[0]+=n,r[1]-=n}function Ive(r,e,t,i){var n=e.length;if(!r.onBand||t||!n)return;var a=r.getExtent(),s,o;if(n===1)e[0].coord=a[0],s=e[1]={coord:a[1]};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;R(e,function(f){f.coord-=u/2});var c=r.scale.getExtent();o=1+c[1]-e[n-1].tickValue,s={coord:e[n-1].coord+u*o},e.push(s)}var h=a[0]>a[1];d(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&d(a[0],e[0].coord)&&e.unshift({coord:a[0]}),d(a[1],s.coord)&&(i?s.coord=a[1]:e.pop()),i&&d(s.coord,a[1])&&e.push({coord:a[1]});function d(f,p){return f=er(f),p=er(p),h?f>p:f<p}}var Md=Math.PI*2,jl=us.CMD,Pve=["top","right","bottom","left"];function Mve(r,e,t,i,n){var a=t.width,s=t.height;switch(r){case"top":i.set(t.x+a/2,t.y-e),n.set(0,-1);break;case"bottom":i.set(t.x+a/2,t.y+s+e),n.set(0,1);break;case"left":i.set(t.x-e,t.y+s/2),n.set(-1,0);break;case"right":i.set(t.x+a+e,t.y+s/2),n.set(1,0);break}}function Lve(r,e,t,i,n,a,s,o,l){s-=r,o-=e;var u=Math.sqrt(s*s+o*o);s/=u,o/=u;var c=s*t+r,h=o*t+e;if(Math.abs(i-n)%Md<1e-4)return l[0]=c,l[1]=h,u-t;if(a){var d=i;i=fn(n),n=fn(d)}else i=fn(i),n=fn(n);i>n&&(n+=Md);var f=Math.atan2(o,s);if(f<0&&(f+=Md),f>=i&&f<=n||f+Md>=i&&f+Md<=n)return l[0]=c,l[1]=h,u-t;var p=t*Math.cos(i)+r,v=t*Math.sin(i)+e,g=t*Math.cos(n)+r,m=t*Math.sin(n)+e,y=(p-s)*(p-s)+(v-o)*(v-o),_=(g-s)*(g-s)+(m-o)*(m-o);return y<_?(l[0]=p,l[1]=v,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function j0(r,e,t,i,n,a,s,o){var l=n-r,u=a-e,c=t-r,h=i-e,d=Math.sqrt(c*c+h*h);c/=d,h/=d;var f=l*c+u*h,p=f/d;o&&(p=Math.min(Math.max(p,0),1)),p*=d;var v=s[0]=r+p*c,g=s[1]=e+p*h;return Math.sqrt((v-n)*(v-n)+(g-a)*(g-a))}function uW(r,e,t,i,n,a,s){t<0&&(r=r+t,t=-t),i<0&&(e=e+i,i=-i);var o=r+t,l=e+i,u=s[0]=Math.min(Math.max(n,r),o),c=s[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-n)*(u-n)+(c-a)*(c-a))}var la=[];function kve(r,e,t){var i=uW(e.x,e.y,e.width,e.height,r.x,r.y,la);return t.set(la[0],la[1]),i}function Rve(r,e,t){for(var i=0,n=0,a=0,s=0,o,l,u=1/0,c=e.data,h=r.x,d=r.y,f=0;f<c.length;){var p=c[f++];f===1&&(i=c[f],n=c[f+1],a=i,s=n);var v=u;switch(p){case jl.M:a=c[f++],s=c[f++],i=a,n=s;break;case jl.L:v=j0(i,n,c[f],c[f+1],h,d,la,!0),i=c[f++],n=c[f++];break;case jl.C:v=qG(i,n,c[f++],c[f++],c[f++],c[f++],c[f],c[f+1],h,d,la),i=c[f++],n=c[f++];break;case jl.Q:v=XG(i,n,c[f++],c[f++],c[f],c[f+1],h,d,la),i=c[f++],n=c[f++];break;case jl.A:var g=c[f++],m=c[f++],y=c[f++],_=c[f++],b=c[f++],S=c[f++];f+=1;var x=!!(1-c[f++]);o=Math.cos(b)*y+g,l=Math.sin(b)*_+m,f<=1&&(a=o,s=l);var C=(h-g)*_/y+g;v=Lve(g,m,_,b,b+S,x,C,d,la),i=Math.cos(b+S)*y+g,n=Math.sin(b+S)*_+m;break;case jl.R:a=i=c[f++],s=n=c[f++];var D=c[f++],I=c[f++];v=uW(a,s,D,I,h,d,la);break;case jl.Z:v=j0(i,n,a,s,h,d,la,!0),i=a,n=s;break}v<u&&(u=v,t.set(la[0],la[1]))}return u}var fa=new He,Lt=new He,ir=new He,Xa=new He,Ua=new He;function QR(r,e){if(r){var t=r.getTextGuideLine(),i=r.getTextContent();if(i&&t){var n=r.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],s=n.candidates||Pve,o=i.getBoundingRect().clone();o.applyTransform(i.getComputedTransform());var l=1/0,u=n.anchor,c=r.getComputedTransform(),h=c&&If([],c),d=e.get("length2")||0;u&&ir.copy(u);for(var f=0;f<s.length;f++){var p=s[f];Mve(p,0,o,fa,Xa),He.scaleAndAdd(Lt,fa,Xa,d),Lt.transform(h);var v=r.getBoundingRect(),g=u?u.distance(Lt):r instanceof Qe?Rve(Lt,r.path,ir):kve(Lt,v,ir);g<l&&(l=g,Lt.transform(c),ir.transform(c),ir.toArray(a[0]),Lt.toArray(a[1]),fa.toArray(a[2]))}cW(a,e.get("minTurnAngle")),t.setShape({points:a})}}}var X0=[],yi=new He;function cW(r,e){if(e<=180&&e>0){e=e/180*Math.PI,fa.fromArray(r[0]),Lt.fromArray(r[1]),ir.fromArray(r[2]),He.sub(Xa,fa,Lt),He.sub(Ua,ir,Lt);var t=Xa.len(),i=Ua.len();if(!(t<.001||i<.001)){Xa.scale(1/t),Ua.scale(1/i);var n=Xa.dot(Ua),a=Math.cos(e);if(a<n){var s=j0(Lt.x,Lt.y,ir.x,ir.y,fa.x,fa.y,X0,!1);yi.fromArray(X0),yi.scaleAndAdd(Ua,s/Math.tan(Math.PI-e));var o=ir.x!==Lt.x?(yi.x-Lt.x)/(ir.x-Lt.x):(yi.y-Lt.y)/(ir.y-Lt.y);if(isNaN(o))return;o<0?He.copy(yi,Lt):o>1&&He.copy(yi,ir),yi.toArray(r[1])}}}}function Ove(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,fa.fromArray(r[0]),Lt.fromArray(r[1]),ir.fromArray(r[2]),He.sub(Xa,Lt,fa),He.sub(Ua,ir,Lt);var i=Xa.len(),n=Ua.len();if(!(i<.001||n<.001)){Xa.scale(1/i),Ua.scale(1/n);var a=Xa.dot(e),s=Math.cos(t);if(a<s){var o=j0(Lt.x,Lt.y,ir.x,ir.y,fa.x,fa.y,X0,!1);yi.fromArray(X0);var l=Math.PI/2,u=Math.acos(Ua.dot(e)),c=l+u-t;if(c>=l)He.copy(yi,ir);else{yi.scaleAndAdd(Ua,o/Math.tan(Math.PI/2-c));var h=ir.x!==Lt.x?(yi.x-Lt.x)/(ir.x-Lt.x):(yi.y-Lt.y)/(ir.y-Lt.y);if(isNaN(h))return;h<0?He.copy(yi,Lt):h>1&&He.copy(yi,ir)}yi.toArray(r[1])}}}}function tS(r,e,t,i){var n=t==="normal",a=n?r:r.ensureState(t);a.ignore=e;var s=i.get("smooth");s&&s===!0&&(s=.3),a.shape=a.shape||{},s>0&&(a.shape.smooth=s);var o=i.getModel("lineStyle").getLineStyle();n?r.useStyle(o):a.style=o}function Nve(r,e){var t=e.smooth,i=e.points;if(i)if(r.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var n=Ro(i[0],i[1]),a=Ro(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var s=Math.min(n,a)*t,o=vy([],i[1],i[0],s/n),l=vy([],i[1],i[2],s/a),u=vy([],o,l,.5);r.bezierCurveTo(o[0],o[1],o[0],o[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c<i.length;c++)r.lineTo(i[c][0],i[c][1])}function $D(r,e,t){var i=r.getTextGuideLine(),n=r.getTextContent();if(!n){i&&r.removeTextGuideLine();return}for(var a=e.normal,s=a.get("show"),o=n.ignore,l=0;l<dv.length;l++){var u=dv[l],c=e[u],h=u==="normal";if(c){var d=c.get("show"),f=h?o:Be(n.states[u]&&n.states[u].ignore,o);if(f||!Be(d,s)){var p=h?i:i&&i.states[u];p&&(p.ignore=!0),i&&tS(i,!0,u,c);continue}i||(i=new Pi,r.setTextGuideLine(i),!h&&(o||!s)&&tS(i,!0,"normal",e.normal),r.stateProxy&&(i.stateProxy=r.stateProxy)),tS(i,!1,u,c)}}if(i){Ce(i.style,t),i.style.fill=null;var v=a.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=v||!1,i.buildPath=Nve}}function WD(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},i=0;i<Di.length;i++){var n=Di[i];t[n]=r.getModel([n,e])}return t}function hW(r){for(var e=[],t=0;t<r.length;t++){var i=r[t];if(!i.defaultAttr.ignore){var n=i.label,a=n.getComputedTransform(),s=n.getBoundingRect(),o=!a||a[1]<1e-5&&a[2]<1e-5,l=n.style.margin||0,u=s.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=o?new L0(s,a):null;e.push({label:n,labelLine:i.labelLine,rect:u,localRect:s,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:o,transform:a})}}return e}function fW(r,e,t,i,n,a){var s=r.length;if(s<2)return;r.sort(function(D,I){return D.rect[e]-I.rect[e]});for(var o=0,l,u=!1,c=0,h=0;h<s;h++){var d=r[h],f=d.rect;l=f[e]-o,l<0&&(f[e]-=l,d.label[e]-=l,u=!0);var p=Math.max(-l,0);c+=p,o=f[e]+f[t]}c>0&&a&&S(-c/s,0,s);var v=r[0],g=r[s-1],m,y;_(),m<0&&x(-m,.8),y<0&&x(y,.8),_(),b(m,y,1),b(y,m,-1),_(),m<0&&C(-m),y<0&&C(y);function _(){m=v.rect[e]-i,y=n-g.rect[e]-g.rect[t]}function b(D,I,M){if(D<0){var L=Math.min(I,-D);if(L>0){S(L*M,0,s);var N=L+D;N<0&&x(-N*M,1)}else x(-D*M,1)}}function S(D,I,M){D!==0&&(u=!0);for(var L=I;L<M;L++){var N=r[L],O=N.rect;O[e]+=D,N.label[e]+=D}}function x(D,I){for(var M=[],L=0,N=1;N<s;N++){var O=r[N-1].rect,B=Math.max(r[N].rect[e]-O[e]-O[t],0);M.push(B),L+=B}if(L){var F=Math.min(Math.abs(D)/L,I);if(D>0)for(var N=0;N<s-1;N++){var U=M[N]*F;S(U,0,N+1)}else for(var N=s-1;N>0;N--){var U=M[N-1]*F;S(-U,N,s)}}}function C(D){var I=D<0?-1:1;D=Math.abs(D);for(var M=Math.ceil(D/(s-1)),L=0;L<s-1;L++)if(I>0?S(M,0,L+1):S(-M,s-L-1,s),D-=M,D<=0)return}return u}function Bve(r,e,t,i){return fW(r,"x","width",e,t,i)}function dW(r,e,t,i){return fW(r,"y","height",e,t,i)}function pW(r){var e=[];r.sort(function(v,g){return g.priority-v.priority});var t=new qe(0,0,0,0);function i(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.ignore=!0}for(var n=0;n<r.length;n++){var a=r[n],s=a.axisAligned,o=a.localRect,l=a.transform,u=a.label,c=a.labelLine;t.copy(a.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var h=a.obb,d=!1,f=0;f<e.length;f++){var p=e[f];if(t.intersect(p.rect)){if(s&&p.axisAligned){d=!0;break}if(p.obb||(p.obb=new L0(p.localRect,p.transform)),h||(h=new L0(o,l)),h.intersect(p.obb)){d=!0;break}}}d?(i(u),c&&i(c)):(u.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function Fve(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function Uve(r,e){var t=r.label,i=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:Fve(i&&i.shape.points)}}var JR=["align","verticalAlign","width","height","fontSize"],pi=new Is,rS=ot(),Vve=ot();function Lm(r,e,t){for(var i=0;i<t.length;i++){var n=t[i];e[n]!=null&&(r[n]=e[n])}}var km=["x","y","rotation"],zve=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,i,n,a){var s=n.style,o=n.__hostTarget,l=o.textConfig||{},u=n.getComputedTransform(),c=n.getBoundingRect().plain();qe.applyTransform(c,c,u),u?pi.setLocalTransform(u):(pi.x=pi.y=pi.rotation=pi.originX=pi.originY=0,pi.scaleX=pi.scaleY=1),pi.rotation=fn(pi.rotation);var h=n.__hostTarget,d;if(h){d=h.getBoundingRect().plain();var f=h.getComputedTransform();qe.applyTransform(d,d,f)}var p=d&&h.getTextGuideLine();this._labelList.push({label:n,labelLine:p,seriesModel:i,dataIndex:e,dataType:t,layoutOption:a,computedLayoutOption:null,rect:c,hostRect:d,priority:d?d.width*d.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:p&&p.ignore,x:pi.x,y:pi.y,scaleX:pi.scaleX,scaleY:pi.scaleY,rotation:pi.rotation,style:{x:s.x,y:s.y,align:s.align,verticalAlign:s.verticalAlign,width:s.width,height:s.height,fontSize:s.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var i=e.__model,n=i.get("labelLayout");(we(n)||rt(n).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var s=a.getTextContent(),o=ke(a);s&&!s.disableLabelLayout&&t._addLabel(o.dataIndex,o.dataType,i,s,n)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),i=e.getHeight();function n(_,b){return function(){QR(_,b)}}for(var a=0;a<this._labelList.length;a++){var s=this._labelList[a],o=s.label,l=o.__hostTarget,u=s.defaultAttr,c=void 0;we(s.layoutOption)?c=s.layoutOption(Uve(s,l)):c=s.layoutOption,c=c||{},s.computedLayoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var d=!1;if(c.x!=null?(o.x=ce(c.x,t),o.setStyle("x",0),d=!0):(o.x=u.x,o.setStyle("x",u.style.x)),c.y!=null?(o.y=ce(c.y,i),o.setStyle("y",0),d=!0):(o.y=u.y,o.setStyle("y",u.style.y)),c.labelLinePoints){var f=l.getTextGuideLine();f&&(f.setShape({points:c.labelLinePoints}),d=!1)}var p=rS(o);p.needsUpdateLabelLine=d,o.rotation=c.rotate!=null?c.rotate*h:u.rotation,o.scaleX=u.scaleX,o.scaleY=u.scaleY;for(var v=0;v<JR.length;v++){var g=JR[v];o.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(o.draggable=!0,o.cursor="move",l){var m=s.seriesModel;if(s.dataIndex!=null){var y=s.seriesModel.getData(s.dataType);m=y.getItemModel(s.dataIndex)}o.on("drag",n(l,m.getModel("labelLine")))}}else o.off("drag"),o.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),i=e.getHeight(),n=hW(this._labelList),a=St(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),s=St(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});Bve(a,0,t),dW(s,0,i);var o=St(n,function(l){return l.layoutOption.hideOverlap});pW(o)},r.prototype.processLabelsOverall=function(){var e=this;R(this._chartViewList,function(t){var i=t.__model,n=t.ignoreLabelLineUpdate,a=i.isAnimationEnabled();t.group.traverse(function(s){if(s.ignore&&!s.forceLabelAnimation)return!0;var o=!n,l=s.getTextContent();!o&&l&&(o=rS(l).needsUpdateLabelLine),o&&e._updateLabelLine(s,i),a&&e._animateLabels(s,i)})})},r.prototype._updateLabelLine=function(e,t){var i=e.getTextContent(),n=ke(e),a=n.dataIndex;if(i&&a!=null){var s=t.getData(n.dataType),o=s.getItemModel(a),l={},u=s.getItemVisual(a,"style");if(u){var c=s.getVisual("drawType");l.stroke=u[c]}var h=o.getModel("labelLine");$D(e,WD(o),l),QR(e,h)}},r.prototype._animateLabels=function(e,t){var i=e.getTextContent(),n=e.getTextGuideLine();if(i&&(e.forceLabelAnimation||!i.ignore&&!i.invisible&&!e.disableLabelAnimation&&!Rh(e))){var a=rS(i),s=a.oldLayout,o=ke(e),l=o.dataIndex,u={x:i.x,y:i.y,rotation:i.rotation},c=t.getData(o.dataType);if(s){i.attr(s);var d=e.prevStates;d&&(Xe(d,"select")>=0&&i.attr(a.oldLayoutSelect),Xe(d,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),ct(i,u,t,l)}else if(i.attr(u),!Rf(i).valueAnimation){var h=Be(i.style.opacity,1);i.style.opacity=0,Vt(i,{style:{opacity:h}},t,l)}if(a.oldLayout=u,i.states.select){var f=a.oldLayoutSelect={};Lm(f,u,km),Lm(f,i.states.select,km)}if(i.states.emphasis){var p=a.oldLayoutEmphasis={};Lm(p,u,km),Lm(p,i.states.emphasis,km)}aH(i,l,c,t,t)}if(n&&!n.ignore&&!n.invisible){var a=Vve(n),s=a.oldLayout,v={points:n.shape.points};s?(n.attr({shape:s}),ct(n,{shape:v},t)):(n.setShape(v),n.style.strokePercent=0,Vt(n,{style:{strokePercent:1}},t)),a.oldLayout=v}},r}(),iS=ot();function Gve(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var n=iS(t).labelManager;n||(n=iS(t).labelManager=new zve),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var n=iS(t).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var nS=Math.sin,aS=Math.cos,vW=Math.PI,Xl=Math.PI*2,Hve=180/vW,gW=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,i,n,a,s){this._add("C",e,t,i,n,a,s)},r.prototype.quadraticCurveTo=function(e,t,i,n){this._add("Q",e,t,i,n)},r.prototype.arc=function(e,t,i,n,a,s){this.ellipse(e,t,i,i,0,n,a,s)},r.prototype.ellipse=function(e,t,i,n,a,s,o,l){var u=o-s,c=!l,h=Math.abs(u),d=Uo(h-Xl)||(c?u>=Xl:-u>=Xl),f=u>0?u%Xl:u%Xl+Xl,p=!1;d?p=!0:Uo(h)?p=!1:p=f>=vW==!!c;var v=e+i*aS(s),g=t+n*nS(s);this._start&&this._add("M",v,g);var m=Math.round(a*Hve);if(d){var y=1/this._p,_=(c?1:-1)*(Xl-y);this._add("A",i,n,m,1,+c,e+i*aS(s+_),t+n*nS(s+_)),y>.01&&this._add("A",i,n,m,0,+c,v,g)}else{var b=e+i*aS(o),S=t+n*nS(o);this._add("A",i,n,m,+p,+c,b,S)}},r.prototype.rect=function(e,t,i,n){this._add("M",e,t),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,i,n,a,s,o,l,u){for(var c=[],h=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}c.push(Math.round(f*h)/h)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),qD="none",$ve=Math.round;function Wve(r){var e=r.fill;return e!=null&&e!==qD}function qve(r){var e=r.stroke;return e!=null&&e!==qD}var T2=["lineCap","miterLimit","lineJoin"],jve=oe(T2,function(r){return"stroke-"+r.toLowerCase()});function Xve(r,e,t,i){var n=e.opacity==null?1:e.opacity;if(t instanceof Wr){r("opacity",n);return}if(Wve(e)){var a=cv(e.fill);r("fill",a.color);var s=e.fillOpacity!=null?e.fillOpacity*a.opacity*n:a.opacity*n;s<1&&r("fill-opacity",s)}else r("fill",qD);if(qve(e)){var o=cv(e.stroke);r("stroke",o.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*o.opacity*n:o.opacity*n,h=e.strokeFirst;if(u!==1&&r("stroke-width",u),h&&r("paint-order",h?"stroke":"fill"),c<1&&r("stroke-opacity",c),e.lineDash){var d=LD(t),f=d[0],p=d[1];f&&(p=$ve(p||0),r("stroke-dasharray",f.join(",")),(p||i)&&r("stroke-dashoffset",p))}for(var v=0;v<T2.length;v++){var g=T2[v];if(e[g]!==P0[g]){var m=e[g]||P0[g];m&&r(jve[v],m)}}}}var mW="http://www.w3.org/2000/svg",yW="http://www.w3.org/1999/xlink",Yve="http://www.w3.org/2000/xmlns/",Kve="http://www.w3.org/XML/1998/namespace",eO="ecmeta_";function _W(r){return document.createElementNS(mW,r)}function Rr(r,e,t,i,n){return{tag:r,attrs:t||{},children:i,text:n,key:e}}function Zve(r,e){var t=[];if(e)for(var i in e){var n=e[i],a=i;n!==!1&&(n!==!0&&n!=null&&(a+='="'+n+'"'),t.push(a))}return"<"+r+" "+t.join(" ")+">"}function Qve(r){return"</"+r+">"}function jD(r,e){e=e||{};var t=e.newline?`
`:"";function i(n){var a=n.children,s=n.tag,o=n.attrs,l=n.text;return Zve(s,o)+(s!=="style"?Bi(l):l||"")+(a?""+t+oe(a,function(u){return i(u)}).join(t)+t:"")+Qve(s)}return i(r)}function Jve(r,e,t){t=t||{};var i=t.newline?`
`:"",n=" {"+i,a=i+"}",s=oe(rt(r),function(l){return l+n+oe(rt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+a}).join(i),o=oe(rt(e),function(l){return"@keyframes "+l+n+oe(rt(e[l]),function(u){return u+n+oe(rt(e[l][u]),function(c){var h=e[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(i)+a}).join(i)+a}).join(i);return!s&&!o?"":["<![CDATA[",s,o,"]]>"].join(i)}function S2(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function tO(r,e,t,i){return Rr("svg","root",{width:r,height:e,xmlns:mW,"xmlns:xlink":yW,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+e:!1},t)}var ege=0;function bW(){return ege++}var rO={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Jl="transform-origin";function tge(r,e,t){var i=J({},r.shape);J(i,e),r.buildPath(t,i);var n=new gW;return n.reset(t9(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function rge(r,e){var t=e.originX,i=e.originY;(t||i)&&(r[Jl]=t+"px "+i+"px")}var ige={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function TW(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function nge(r,e,t){var i=r.shape.paths,n={},a,s;if(R(i,function(l){var u=S2(t.zrId);u.animation=!0,I1(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,d=rt(c),f=d.length;if(f){s=d[f-1];var p=c[s];for(var v in p){var g=p[v];n[v]=n[v]||{d:""},n[v].d+=g.d||""}for(var m in h){var y=h[m].animation;y.indexOf(s)>=0&&(a=y)}}}),!!a){e.d=!1;var o=TW(n,t);return a.replace(s,o)}}function iO(r){return pe(r)?rO[r]?"cubic-bezier("+rO[r]+")":ZA(r)?r:"":""}function I1(r,e,t,i){var n=r.animators,a=n.length,s=[];if(r instanceof fD){var o=nge(r,e,t);if(o)s.push(o);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=n[u],h=[c.getMaxTime()/1e3+"s"],d=iO(c.getClip().easing),f=c.getDelay();d?h.push(d):h.push("linear"),f&&h.push(f/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],b=_.length,S={},x={},C={},D="animation-timing-function";function I(me,ze,Pe){for(var ye=me.getTracks(),Me=me.getMaxTime(),_t=0;_t<ye.length;_t++){var Re=ye[_t];if(Re.needsAnimate()){var Ge=Re.keyframes,Pt=Re.propName;if(Pe&&(Pt=Pe(Pt)),Pt)for(var wt=0;wt<Ge.length;wt++){var At=Ge[wt],rr=Math.round(At.time/Me*100)+"%",ht=iO(At.easing),Ji=At.rawValue;(pe(Ji)||ut(Ji))&&(ze[rr]=ze[rr]||{},ze[rr][Pt]=At.rawValue,ht&&(ze[rr][D]=ht))}}}}for(var M=0;M<b;M++){var L=_[M],N=L.targetName;N?N==="shape"&&I(L,x):!i&&I(L,S)}for(var O in S){var B={};s9(B,r),J(B,S[O]);var F=r9(B),U=S[O][D];C[O]=F?{transform:F}:{},rge(C[O],B),U&&(C[O][D]=U)}var $,q=!0;for(var O in x){C[O]=C[O]||{};var Z=!$,U=x[O][D];Z&&($=new us);var te=$.len();$.reset(),C[O].d=tge(r,x[O],$);var Q=$.len();if(!Z&&te!==Q){q=!1;break}U&&(C[O][D]=U)}if(!q)for(var O in C)delete C[O].d;if(!i)for(var M=0;M<b;M++){var L=_[M],N=L.targetName;N==="style"&&I(L,C,function(ye){return ige[ye]})}for(var se=rt(C),he=!0,ue,M=1;M<se.length;M++){var Ie=se[M-1],Oe=se[M];if(C[Ie][Jl]!==C[Oe][Jl]){he=!1;break}ue=C[Ie][Jl]}if(he&&ue){for(var O in C)C[O][Jl]&&delete C[O][Jl];e[Jl]=ue}if(St(se,function(me){return rt(C[me]).length>0}).length){var Fe=TW(C,t);return Fe+" "+y[0]+" both"}}for(var g in l){var o=v(l[g]);o&&s.push(o)}if(s.length){var m=t.zrId+"-cls-"+bW();t.cssNodes["."+m]={animation:s.join(",")},e.class=m}}function age(r,e,t){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};nO(i,e,t)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=n.fill;if(!a){var s=r.style&&r.style.fill,o=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&o||s;l&&(a=Rw(l))}var u=n.lineWidth;if(u){var c=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),nO(i,e,t)}}function nO(r,e,t,i){var n=JSON.stringify(r),a=t.cssStyleCache[n];a||(a=t.zrId+"-cls-"+bW(),t.cssStyleCache[n]=a,t.cssNodes["."+a+":hover"]=r),e.class=e.class?e.class+" "+a:a}var xv=Math.round;function SW(r){return r&&pe(r.src)}function xW(r){return r&&we(r.toDataURL)}function XD(r,e,t,i){Xve(function(n,a){var s=n==="fill"||n==="stroke";s&&e9(a)?CW(e,r,n,i):s&&QA(a)?AW(t,r,n,i):s&&a==="none"?r[n]="transparent":r[n]=a},e,t,!1),fge(t,r,i)}function YD(r,e){var t=nue(e);t&&(t.each(function(i,n){i!=null&&(r[(eO+n).toLowerCase()]=i+"")}),e.isSilent()&&(r[eO+"silent"]="true"))}function aO(r){return Uo(r[0]-1)&&Uo(r[1])&&Uo(r[2])&&Uo(r[3]-1)}function sge(r){return Uo(r[4])&&Uo(r[5])}function KD(r,e,t){if(e&&!(sge(e)&&aO(e))){var i=1e4;r.transform=aO(e)?"translate("+xv(e[4]*i)/i+" "+xv(e[5]*i)/i+")":Dle(e)}}function sO(r,e,t){for(var i=r.points,n=[],a=0;a<i.length;a++)n.push(xv(i[a][0]*t)/t),n.push(xv(i[a][1]*t)/t);e.points=n.join(" ")}function oO(r){return!r.smooth}function oge(r){var e=oe(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,i,n){for(var a=0;a<e.length;a++){var s=e[a],o=t[s[0]];o!=null&&(i[s[1]]=xv(o*n)/n)}}}var lge={circle:[oge(["cx","cy","r"])],polyline:[sO,oO],polygon:[sO,oO]};function uge(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function wW(r,e){var t=r.style,i=r.shape,n=lge[r.type],a={},s=e.animation,o="path",l=r.style.strokePercent,u=e.compress&&t9(r)||4;if(n&&!e.willUpdate&&!(n[1]&&!n[1](i))&&!(s&&uge(r))&&!(l<1)){o=r.type;var c=Math.pow(10,u);n[0](i,a,c)}else{var h=!r.path||r.shapeChanged();r.path||r.createPathProxy();var d=r.path;h&&(d.beginPath(),r.buildPath(d,r.shape),r.pathUpdated());var f=d.getVersion(),p=r,v=p.__svgPathBuilder;(p.__svgPathVersion!==f||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new gW),v.reset(u),d.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=f,p.__svgPathStrokePercent=l),a.d=v.getStr()}return KD(a,r.transform),XD(a,t,r,e),YD(a,r),e.animation&&I1(r,a,e),e.emphasis&&age(r,a,e),Rr(o,r.id+"",a)}function cge(r,e){var t=r.style,i=t.image;if(i&&!pe(i)&&(SW(i)?i=i.src:xW(i)&&(i=i.toDataURL())),!!i){var n=t.x||0,a=t.y||0,s=t.width,o=t.height,l={href:i,width:s,height:o};return n&&(l.x=n),a&&(l.y=a),KD(l,r.transform),XD(l,t,r,e),YD(l,r),e.animation&&I1(r,l,e),Rr("image",r.id+"",l)}}function hge(r,e){var t=r.style,i=t.text;if(i!=null&&(i+=""),!(!i||isNaN(t.x)||isNaN(t.y))){var n=t.font||Jo,a=t.x||0,s=Ile(t.y||0,t1(n),t.textBaseline),o=Ele[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":o};if(L9(t)){var u="",c=t.fontStyle,h=M9(t.fontSize);if(!parseFloat(h))return;var d=t.fontFamily||MG,f=t.fontWeight;u+="font-size:"+h+";font-family:"+d+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),f&&f!=="normal"&&(u+="font-weight:"+f+";"),l.style=u}else l.style="font: "+n;return i.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),s&&(l.y=s),KD(l,r.transform),XD(l,t,r,e),YD(l,r),e.animation&&I1(r,l,e),Rr("text",r.id+"",l,void 0,i)}}function lO(r,e){if(r instanceof Qe)return wW(r,e);if(r instanceof Wr)return cge(r,e);if(r instanceof of)return hge(r,e)}function fge(r,e,t){var i=r.style;if(Ple(i)){var n=Mle(r),a=t.shadowCache,s=a[n];if(!s){var o=r.getGlobalScale(),l=o[0],u=o[1];if(!l||!u)return;var c=i.shadowOffsetX||0,h=i.shadowOffsetY||0,d=i.shadowBlur,f=cv(i.shadowColor),p=f.opacity,v=f.color,g=d/2/l,m=d/2/u,y=g+" "+m;s=t.zrId+"-s"+t.shadowIdx++,t.defs[s]=Rr("filter",s,{id:s,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Rr("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),a[n]=s}e.filter=e1(s)}}function CW(r,e,t,i){var n=r[t],a,s={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(QG(n))a="linearGradient",s.x1=n.x,s.y1=n.y,s.x2=n.x2,s.y2=n.y2;else if(JG(n))a="radialGradient",s.cx=Be(n.x,.5),s.cy=Be(n.y,.5),s.r=Be(n.r,.5);else return;for(var o=n.colorStops,l=[],u=0,c=o.length;u<c;++u){var h=Ow(o[u].offset)*100+"%",d=o[u].color,f=cv(d),p=f.color,v=f.opacity,g={offset:h};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(Rr("stop",u+"",g))}var m=Rr(a,"",s,l),y=jD(m),_=i.gradientCache,b=_[y];b||(b=i.zrId+"-g"+i.gradientIdx++,_[y]=b,s.id=b,i.defs[b]=Rr(a,b,s,l)),e[t]=e1(b)}function AW(r,e,t,i){var n=r.style[t],a=r.getBoundingRect(),s={},o=n.repeat,l=o==="no-repeat",u=o==="repeat-x",c=o==="repeat-y",h;if(ZG(n)){var d=n.imageWidth,f=n.imageHeight,p=void 0,v=n.image;if(pe(v)?p=v:SW(v)?p=v.src:xW(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ai(d,g),Ai(f,g)}else if(d==null||f==null){var m=function(M,L){if(M){var N=M.elm,O=d||L.width,B=f||L.height;M.tag==="pattern"&&(u?(B=1,O/=a.width):c&&(O=1,B/=a.height)),M.attrs.width=O,M.attrs.height=B,N&&(N.setAttribute("width",O),N.setAttribute("height",B))}},y=nD(p,null,r,function(M){l||m(x,M),m(h,M)});y&&y.width&&y.height&&(d=d||y.width,f=f||y.height)}h=Rr("image","img",{href:p,width:d,height:f}),s.width=d,s.height=f}else n.svgElement&&(h=Ee(n.svgElement),s.width=n.svgWidth,s.height=n.svgHeight);if(h){var _,b;l?_=b=1:u?(b=1,_=s.width/a.width):c?(_=1,b=s.height/a.height):s.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(s.width=_),b!=null&&!isNaN(b)&&(s.height=b);var S=r9(n);S&&(s.patternTransform=S);var x=Rr("pattern","",s,[h]),C=jD(x),D=i.patternCache,I=D[C];I||(I=i.zrId+"-p"+i.patternIdx++,D[C]=I,s.id=I,x=i.defs[I]=Rr("pattern",I,s,[h])),e[t]=e1(I)}}function dge(r,e,t){var i=t.clipPathCache,n=t.defs,a=i[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var s={id:a};i[r.id]=a,n[a]=Rr("clipPath",a,s,[wW(r,t)])}e["clip-path"]=e1(a)}function uO(r){return document.createTextNode(r)}function uu(r,e,t){r.insertBefore(e,t)}function cO(r,e){r.removeChild(e)}function hO(r,e){r.appendChild(e)}function DW(r){return r.parentNode}function EW(r){return r.nextSibling}function sS(r,e){r.textContent=e}var fO=58,pge=120,vge=Rr("","");function x2(r){return r===void 0}function Oa(r){return r!==void 0}function gge(r,e,t){for(var i={},n=e;n<=t;++n){var a=r[n].key;a!==void 0&&(i[a]=n)}return i}function lp(r,e){var t=r.key===e.key,i=r.tag===e.tag;return i&&t}function wv(r){var e,t=r.children,i=r.tag;if(Oa(i)){var n=r.elm=_W(i);if(ZD(vge,r),ie(t))for(e=0;e<t.length;++e){var a=t[e];a!=null&&hO(n,wv(a))}else Oa(r.text)&&!De(r.text)&&hO(n,uO(r.text))}else r.elm=uO(r.text);return r.elm}function IW(r,e,t,i,n){for(;i<=n;++i){var a=t[i];a!=null&&uu(r,wv(a),e)}}function Y0(r,e,t,i){for(;t<=i;++t){var n=e[t];if(n!=null)if(Oa(n.tag)){var a=DW(n.elm);cO(a,n.elm)}else cO(r,n.elm)}}function ZD(r,e){var t,i=e.elm,n=r&&r.attrs||{},a=e.attrs||{};if(n!==a){for(t in a){var s=a[t],o=n[t];o!==s&&(s===!0?i.setAttribute(t,""):s===!1?i.removeAttribute(t):t==="style"?i.style.cssText=s:t.charCodeAt(0)!==pge?i.setAttribute(t,s):t==="xmlns:xlink"||t==="xmlns"?i.setAttributeNS(Yve,t,s):t.charCodeAt(3)===fO?i.setAttributeNS(Kve,t,s):t.charCodeAt(5)===fO?i.setAttributeNS(yW,t,s):i.setAttribute(t,s))}for(t in n)t in a||i.removeAttribute(t)}}function mge(r,e,t){for(var i=0,n=0,a=e.length-1,s=e[0],o=e[a],l=t.length-1,u=t[0],c=t[l],h,d,f,p;i<=a&&n<=l;)s==null?s=e[++i]:o==null?o=e[--a]:u==null?u=t[++n]:c==null?c=t[--l]:lp(s,u)?(sh(s,u),s=e[++i],u=t[++n]):lp(o,c)?(sh(o,c),o=e[--a],c=t[--l]):lp(s,c)?(sh(s,c),uu(r,s.elm,EW(o.elm)),s=e[++i],c=t[--l]):lp(o,u)?(sh(o,u),uu(r,o.elm,s.elm),o=e[--a],u=t[++n]):(x2(h)&&(h=gge(e,i,a)),d=h[u.key],x2(d)?uu(r,wv(u),s.elm):(f=e[d],f.tag!==u.tag?uu(r,wv(u),s.elm):(sh(f,u),e[d]=void 0,uu(r,f.elm,s.elm))),u=t[++n]);(i<=a||n<=l)&&(i>a?(p=t[l+1]==null?null:t[l+1].elm,IW(r,p,t,n,l)):Y0(r,e,i,a))}function sh(r,e){var t=e.elm=r.elm,i=r.children,n=e.children;r!==e&&(ZD(r,e),x2(e.text)?Oa(i)&&Oa(n)?i!==n&&mge(t,i,n):Oa(n)?(Oa(r.text)&&sS(t,""),IW(t,null,n,0,n.length-1)):Oa(i)?Y0(t,i,0,i.length-1):Oa(r.text)&&sS(t,""):r.text!==e.text&&(Oa(i)&&Y0(t,i,0,i.length-1),sS(t,e.text)))}function yge(r,e){if(lp(r,e))sh(r,e);else{var t=r.elm,i=DW(t);wv(e),i!==null&&(uu(i,e.elm,EW(t)),Y0(i,[r],0,0))}return e}var _ge=0,bge=function(){function r(e,t,i){if(this.type="svg",this.refreshHover=dO(),this.configLayer=dO(),this.storage=t,this._opts=i=J({},i),this.root=e,this._id="zr"+_ge++,this._oldVNode=tO(i.width,i.height),e&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=_W("svg");ZD(null,this._oldVNode),n.appendChild(a),e.appendChild(n)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",yge(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return lO(e,S2(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=S2(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var s=[],o=this._bgVNode=Tge(i,n,this._backgroundColor,a);o&&s.push(o);var l=e.compress?null:this._mainVNode=Rr("g","main",{},[]);this._paintList(t,a,l?l.children:s),l&&s.push(l);var u=oe(rt(a.defs),function(d){return a.defs[d]});if(u.length&&s.push(Rr("defs","defs",{},u)),e.animation){var c=Jve(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=Rr("style","stl",{},[],c);s.push(h)}}return tO(i,n,s,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},jD(this.renderToVNode({animation:Be(e.cssAnimation,!0),emphasis:Be(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Be(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,i){for(var n=e.length,a=[],s=0,o,l,u=0,c=0;c<n;c++){var h=e[c];if(!h.invisible){var d=h.__clipPaths,f=d&&d.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(f-1,p-1);v>=0&&!(d&&l&&d[v]===l[v]);v--);for(var g=p-1;g>v;g--)s--,o=a[s-1];for(var m=v+1;m<f;m++){var y={};dge(d[m],y,t);var _=Rr("g","clip-g-"+u++,y,[]);(o?o.children:i).push(_),a[s++]=_,o=_}l=d;var b=lO(h,t);b&&(o?o.children:i).push(b)}}},r.prototype.resize=function(e,t){var i=this._opts,n=this.root,a=this._viewport;if(e!=null&&(i.width=e),t!=null&&(i.height=t),n&&a&&(a.style.display="none",e=yh(n,0,i),t=yh(n,1,i),a.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,a){var s=a.style;s.width=e+"px",s.height=t+"px"}if(QA(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute("width",e),o.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),i="data:image/svg+xml;";return e?(t=kle(t),t&&i+"base64,"+t):i+"charset=UTF-8,"+encodeURIComponent(t)},r}();function dO(r){return function(){}}function Tge(r,e,t,i){var n;if(t&&t!=="none")if(n=Rr("rect","bg",{width:r,height:e,x:"0",y:"0"}),e9(t))CW({fill:t},n.attrs,"fill",i);else if(QA(t))AW({style:{fill:t},dirty:lr,getBoundingRect:function(){return{width:r,height:e}}},n.attrs,"fill",i);else{var a=cv(t),s=a.color,o=a.opacity;n.attrs.fill=s,o<1&&(n.attrs["fill-opacity"]=o)}return n}function Sge(r){r.registerPainter("svg",bge)}function pO(r,e,t){var i=el.createCanvas(),n=e.getWidth(),a=e.getHeight(),s=i.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=n+"px",s.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*t,i.height=a*t,i}var oS=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var s;n=n||E0,typeof t=="string"?s=pO(t,i,n):De(t)&&(s=t,t=s.id),a.id=t,a.dom=s;var o=s.style;return o&&(BG(s),s.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=i,a.dpr=n,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=pO("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],o=this.maxRepaintRectCount,l=!1,u=new qe(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(s.length===0){var _=new qe(0,0,0,0);_.copy(y),s.push(_)}else{for(var b=!1,S=1/0,x=0,C=0;C<s.length;++C){var D=s[C];if(D.intersect(y)){var I=new qe(0,0,0,0);I.copy(D),I.union(y),s[C]=I,b=!0;break}else if(l){u.copy(y),u.union(D);var M=y.width*y.height,L=D.width*D.height,N=u.width*u.height,O=N-M-L;O<S&&(S=O,x=C)}}if(l&&(s[x].union(y),b=!0),!b){var _=new qe(0,0,0,0);_.copy(y),s.push(_)}l||(l=s.length>=o)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var d=t[h];if(d){var f=d.shouldBePainted(n,a,!0,!0),p=d.__isRendered&&(d.__dirty&cn||!f)?d.getPrevPaintRect():null;p&&c(p);var v=f&&(d.__dirty&cn||!d.__isRendered)?d.getPaintRect():null;v&&c(v)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var d=i[h],f=d&&d.shouldBePainted(n,a,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var h=0;h<s.length;){if(s[h].isZero()){s.splice(h,1);continue}for(var m=h+1;m<s.length;)s[h].intersect(s[m])?(g=!0,s[h].union(s[m]),s.splice(m,1)):m++;h++}}while(g);return this._paintRects=s,s},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,i){var n=this.dpr,a=this.dom,s=a.style,o=this.domBack;s&&(s.width=t+"px",s.height=i+"px"),a.width=t*n,a.height=i*n,o&&(o.width=t*n,o.height=i*n,n!==1&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,i,n){var a=this.dom,s=this.ctx,o=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,h=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,o/h,l/h));var f=this.domBack;function p(v,g,m,y){if(s.clearRect(v,g,m,y),i&&i!=="transparent"){var _=void 0;if(Z_(i)){var b=i.global||i.__width===m&&i.__height===y;_=b&&i.__canvasGradient||d2(s,i,{x:0,y:0,width:m,height:y}),i.__canvasGradient=_,i.__width=m,i.__height=y}else zoe(i)&&(i.scaleX=i.scaleX||h,i.scaleY=i.scaleY||h,_=p2(s,i,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));s.save(),s.fillStyle=_||i,s.fillRect(v,g,m,y),s.restore()}u&&(s.save(),s.globalAlpha=c,s.drawImage(f,v,g,m,y),s.restore())}!n||u?p(0,0,o,l):n.length&&R(n,function(v){p(v.x*h,v.y*h,v.width*h,v.height*h)})},e}(Zn),vO=1e5,Yl=314159,Rm=.01,xge=.001;function wge(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function Cge(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var Age=function(){function r(e,t,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=i=J({},i||{}),this.dpr=i.devicePixelRatio||E0,this._singleCanvas=a,this.root=e;var s=e.style;s&&(BG(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,h=c.width,d=c.height;i.width!=null&&(h=i.width),i.height!=null&&(d=i.height),this.dpr=i.devicePixelRatio||1,c.width=h*this.dpr,c.height=d*this.dpr,this._width=h,this._height=d;var f=new oS(c,this,this.dpr);f.__builtin__=!0,f.initContext(),l[Yl]=f,f.zlevel=Yl,o.push(Yl),this._domRoot=e}else{this._width=yh(e,0,i),this._height=yh(e,1,i);var u=this._domRoot=Cge(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,i,e,this._redrawId);for(var a=0;a<n.length;a++){var s=n[a],o=this._layers[s];if(!o.__builtin__&&o.refresh){var l=a===0?this._backgroundColor:null;o.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,i=this._hoverlayer;if(i&&i.clear(),!!t){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,s=0;s<t;s++){var o=e[s];o.__inHover&&(i||(i=this._hoverlayer=this.getLayer(vO)),a||(a=i.ctx,a.save()),Su(a,o,n,s===t-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(vO)},r.prototype.paintOne=function(e,t){d$(e,t)},r.prototype._paintList=function(e,t,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,t,i),s=a.finished,o=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(e),s)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;S0(function(){l._paintList(e,t,i,n)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Yl).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer(function(n){n.virtual&&e.drawImage(n.dom,0,0,t,i)})},r.prototype._doPaintList=function(e,t,i){for(var n=this,a=[],s=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var l=this._zlevelList[o],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||i)&&a.push(u)}for(var c=!0,h=!1,d=function(v){var g=a[v],m=g.ctx,y=s&&g.createRepaintRects(e,t,f._width,f._height),_=i?g.__startIndex:g.__drawIndex,b=!i&&g.incremental&&Date.now,S=b&&Date.now(),x=g.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,x,y);else if(_===g.__startIndex){var C=e[_];(!C.incremental||!C.notClear||i)&&g.clear(!1,x,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var D,I=function(O){var B={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(D=_;D<g.__endIndex;D++){var F=e[D];if(F.__inHover&&(h=!0),n._doPaintEl(F,g,s,O,B,D===g.__endIndex-1),b){var U=Date.now()-S;if(U>15)break}}B.prevElClipPaths&&m.restore()};if(y)if(y.length===0)D=g.__endIndex;else for(var M=f.dpr,L=0;L<y.length;++L){var N=y[L];m.save(),m.beginPath(),m.rect(N.x*M,N.y*M,N.width*M,N.height*M),m.clip(),I(N),m.restore()}else m.save(),I(),m.restore();g.__drawIndex=D,g.__drawIndex<g.__endIndex&&(c=!1)},f=this,p=0;p<a.length;p++)d(p);return et.wxa&&R(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:h}},r.prototype._doPaintEl=function(e,t,i,n,a,s){var o=t.ctx;if(i){var l=e.getPaintRect();(!n||l&&l.intersect(n))&&(Su(o,e,a,s),e.setPrevPaintRect(l))}else Su(o,e,a,s)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Yl);var i=this._layers[e];return i||(i=new oS("zr_"+e,this,this.dpr),i.zlevel=e,i.__builtin__=!0,this._layerConfig[e]?We(i,this._layerConfig[e],!0):this._layerConfig[e-Rm]&&We(i,this._layerConfig[e-Rm],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},r.prototype.insertLayer=function(e,t){var i=this._layers,n=this._zlevelList,a=n.length,s=this._domRoot,o=null,l=-1;if(!i[e]&&wge(t)){if(a>0&&e>n[0]){for(l=0;l<a-1&&!(n[l]<e&&n[l+1]>e);l++);o=i[n[l]]}if(n.splice(l+1,0,e),i[e]=t,!t.virtual)if(o){var u=o.dom;u.nextSibling?s.insertBefore(t.dom,u.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n];e.call(t,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],s=this._layers[a];s.__builtin__&&e.call(t,s,a)}},r.prototype.eachOtherLayer=function(e,t){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],s=this._layers[a];s.__builtin__||e.call(t,s,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(h,d){h.__dirty=h.__used=!1});function t(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var i=1;i<e.length;i++){var n=e[i];if(n.zlevel!==e[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0,o,l;for(l=0;l<e.length;l++){var n=e[l],u=n.zlevel,c=void 0;o!==u&&(o=u,s=0),n.incremental?(c=this.getLayer(u+xge,this._needsManuallyCompositing),c.incremental=!0,s=1):c=this.getLayer(u+(s>0?Rm:0),this._needsManuallyCompositing),c.__builtin__||$A("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),n.__dirty&cn&&!n.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,d){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?We(i[e],t,!0):i[e]=t;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===e||a===e+Rm){var s=this._layers[a];We(s,i[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,i=this._zlevelList,n=t[e];n&&(n.dom.parentNode.removeChild(n.dom),delete t[e],i.splice(Xe(i,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;if(e!=null&&(n.width=e),t!=null&&(n.height=t),e=yh(a,0,n),t=yh(a,1,n),i.style.display="",this._width!==e||t!==this._height){i.style.width=e+"px",i.style.height=t+"px";for(var s in this._layers)this._layers.hasOwnProperty(s)&&this._layers[s].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Yl).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Yl].dom;var t=new oS("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var i=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,a=t.dom.height;this.eachLayer(function(h){h.__builtin__?i.drawImage(h.dom,0,0,n,a):h.renderToCanvas&&(i.save(),h.renderToCanvas(i),i.restore())})}else for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),l=0,u=o.length;l<u;l++){var c=o[l];Su(i,c,s,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function Dge(r){r.registerPainter("canvas",Age)}var Ege=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var i=new Le,n=yr("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);i.add(n),n.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),s=this.getData().getVisual("symbolRotate"),o=a==="none"?"circle":a,l=t.itemHeight*.8,u=yr(o,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);i.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?s:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ot);function ff(r,e){var t=r.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var n=uf(r,e,t[0]);return n!=null?n+"":null}else if(i){for(var a=[],s=0;s<t.length;s++)a.push(uf(r,e,t[s]));return a.join(" ")}}function PW(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!ie(e))return e+"";for(var i=[],n=0;n<t.length;n++){var a=r.getDimensionIndex(t[n]);a>=0&&i.push(e[a])}return i.join(" ")}var lg=function(r){j(e,r);function e(t,i,n,a){var s=r.call(this)||this;return s.updateData(t,i,n,a),s}return e.prototype._createSymbol=function(t,i,n,a,s){this.removeAll();var o=yr(t,-1,-1,2,2,null,s);o.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),o.drift=Ige,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){qs(this.childAt(0))},e.prototype.downplay=function(){js(this.childAt(0))},e.prototype.setZ=function(t,i){var n=this.childAt(0);n.zlevel=t,n.z=i},e.prototype.setDraggable=function(t,i){var n=this.childAt(0);n.draggable=t,n.cursor=!i&&t?"move":n.cursor},e.prototype.updateData=function(t,i,n,a){this.silent=!1;var s=t.getItemVisual(i,"symbol")||"circle",o=t.hostModel,l=e.getSymbolSize(t,i),u=s!==this._symbolType,c=a&&a.disableAnimation;if(u){var h=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(s,t,i,l,h)}else{var d=this.childAt(0);d.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};c?d.attr(f):ct(d,f,o,i),_a(d)}if(this._updateCommon(t,i,l,n,a),u){var d=this.childAt(0);if(!c){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Vt(d,f,o,i)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,n,a,s){var o=this.childAt(0),l=t.hostModel,u,c,h,d,f,p,v,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,d=a.focus,f=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var y=a&&a.itemModel?a.itemModel:t.getItemModel(i),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),d=_.get("focus"),f=_.get("blurScope"),p=_.get("disabled"),v=Nr(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var b=t.getItemVisual(i,"symbolRotate");o.attr("rotation",(b||0)*Math.PI/180||0);var S=hc(t.getItemVisual(i,"symbolOffset"),n);S&&(o.x=S[0],o.y=S[1]),m&&o.attr("cursor",m);var x=t.getItemVisual(i,"style"),C=x.fill;if(o instanceof Wr){var D=o.style;o.useStyle(J({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},x))}else o.__isEmptyBrush?o.useStyle(J({},x)):o.useStyle(x),o.style.decal=null,o.setColor(C,s&&s.symbolInnerColor),o.style.strokeNoScale=!0;var I=t.getItemVisual(i,"liftZ"),M=this._z2;I!=null?M==null&&(this._z2=o.z2,o.z2+=I):M!=null&&(o.z2=M,this._z2=null);var L=s&&s.useNameLabel;Jr(o,v,{labelFetcher:l,labelDataIndex:i,defaultText:N,inheritColor:C,defaultOpacity:x.opacity});function N(F){return L?t.getName(F):ff(t,F)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var O=o.ensureState("emphasis");O.style=u,o.ensureState("select").style=h,o.ensureState("blur").style=c;var B=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;O.scaleX=this._sizeX*B,O.scaleY=this._sizeY*B,this.setSymbolScale(1),Yt(this,d,f,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,n){var a=this.childAt(0),s=ke(this).dataIndex,o=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&rl(l,{style:{opacity:0}},i,{dataIndex:s,removeOpt:o,cb:function(){a.removeTextContent()}})}else a.removeTextContent();rl(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:s,cb:t,removeOpt:o})},e.getSymbolSize=function(t,i){return zf(t.getItemVisual(i,"symbolSize"))},e}(Le);function Ige(r,e){this.parent.drift(r,e)}function lS(r,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function gO(r){return r!=null&&!De(r)&&(r={isIgnore:r}),r||{}}function mO(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Nr(e),cursorStyle:e.get("cursor")}}var ug=function(){function r(e){this.group=new Le,this._SymbolCtor=e||lg}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=gO(t);var i=this.group,n=e.hostModel,a=this._data,s=this._SymbolCtor,o=t.disableAnimation,l=mO(e),u={disableAnimation:o},c=t.getSymbolPoint||function(h){return e.getItemLayout(h)};a||i.removeAll(),e.diff(a).add(function(h){var d=c(h);if(lS(e,d,h,t)){var f=new s(e,h,l,u);f.setPosition(d),e.setItemGraphicEl(h,f),i.add(f)}}).update(function(h,d){var f=a.getItemGraphicEl(d),p=c(h);if(!lS(e,p,h,t)){i.remove(f);return}var v=e.getItemVisual(h,"symbol")||"circle",g=f&&f.getSymbolType&&f.getSymbolType();if(!f||g&&g!==v)i.remove(f),f=new s(e,h,l,u),f.setPosition(p);else{f.updateData(e,h,l,u);var m={x:p[0],y:p[1]};o?f.attr(m):ct(f,m,n)}i.add(f),e.setItemGraphicEl(h,f)}).remove(function(h){var d=a.getItemGraphicEl(h);d&&d.fadeOut(function(){i.remove(d)},n)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,n){var a=e._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=mO(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=gO(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var s=t.getItemLayout(a);if(lS(t,s,a,i)){var o=new this._SymbolCtor(t,a,this._seriesScope);o.traverse(n),o.setPosition(s),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.eachRendered=function(e){cl(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl(function(n){n.fadeOut(function(){t.remove(n)},i.hostModel)}):t.removeAll()},r}();function MW(r,e,t){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=Pge(n,t),s=i.dim,o=n.dim,l=e.mapDimension(o),u=e.mapDimension(s),c=o==="x"||o==="radius"?1:0,h=oe(r.dimensions,function(p){return e.mapDimension(p)}),d=!1,f=e.getCalculationInfo("stackResultDimension");return nl(e,h[0])&&(d=!0,h[0]=f),nl(e,h[1])&&(d=!0,h[1]=f),{dataDimsForPoint:h,valueStart:a,valueAxisDim:o,baseAxisDim:s,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Pge(r,e){var t=0,i=r.scale.getExtent();return e==="start"?t=i[0]:e==="end"?t=i[1]:ut(e)&&!isNaN(e)?t=e:i[0]>0?t=i[0]:i[1]<0&&(t=i[1]),t}function LW(r,e,t,i){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,s=[];return s[a]=t.get(r.baseDim,i),s[1-a]=n,e.dataToPoint(s)}function Mge(r,e){var t=[];return e.diff(r).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,n){t.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function Lge(r,e,t,i,n,a,s,o){for(var l=Mge(r,e),u=[],c=[],h=[],d=[],f=[],p=[],v=[],g=MW(n,e,s),m=r.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],S=!0,x=void 0,C=void 0;switch(b.cmd){case"=":x=b.idx*2,C=b.idx1*2;var D=m[x],I=m[x+1],M=y[C],L=y[C+1];(isNaN(D)||isNaN(I))&&(D=M,I=L),u.push(D,I),c.push(M,L),h.push(t[x],t[x+1]),d.push(i[C],i[C+1]),v.push(e.getRawIndex(b.idx1));break;case"+":var N=b.idx,O=g.dataDimsForPoint,B=n.dataToPoint([e.get(O[0],N),e.get(O[1],N)]);C=N*2,u.push(B[0],B[1]),c.push(y[C],y[C+1]);var F=LW(g,n,e,N);h.push(F[0],F[1]),d.push(i[C],i[C+1]),v.push(e.getRawIndex(N));break;case"-":S=!1}S&&(f.push(b),p.push(p.length))}p.sort(function(Ie,Oe){return v[Ie]-v[Oe]});for(var U=u.length,$=ja(U),q=ja(U),Z=ja(U),te=ja(U),Q=[],_=0;_<p.length;_++){var se=p[_],he=_*2,ue=se*2;$[he]=u[ue],$[he+1]=u[ue+1],q[he]=c[ue],q[he+1]=c[ue+1],Z[he]=h[ue],Z[he+1]=h[ue+1],te[he]=d[ue],te[he+1]=d[ue+1],Q[_]=f[se]}return{current:$,next:q,stackedOnCurrent:Z,stackedOnNext:te,status:Q}}var bo=Math.min,To=Math.max;function $u(r,e){return isNaN(r)||isNaN(e)}function w2(r,e,t,i,n,a,s,o,l){for(var u,c,h,d,f,p,v=t,g=0;g<i;g++){var m=e[v*2],y=e[v*2+1];if(v>=n||v<0)break;if($u(m,y)){if(l){v+=a;continue}break}if(v===t)r[a>0?"moveTo":"lineTo"](m,y),h=m,d=y;else{var _=m-u,b=y-c;if(_*_+b*b<.5){v+=a;continue}if(s>0){for(var S=v+a,x=e[S*2],C=e[S*2+1];x===m&&C===y&&g<i;)g++,S+=a,v+=a,x=e[S*2],C=e[S*2+1],m=e[v*2],y=e[v*2+1],_=m-u,b=y-c;var D=g+1;if(l)for(;$u(x,C)&&D<i;)D++,S+=a,x=e[S*2],C=e[S*2+1];var I=.5,M=0,L=0,N=void 0,O=void 0;if(D>=i||$u(x,C))f=m,p=y;else{M=x-u,L=C-c;var B=m-u,F=x-m,U=y-c,$=C-y,q=void 0,Z=void 0;if(o==="x"){q=Math.abs(B),Z=Math.abs(F);var te=M>0?1:-1;f=m-te*q*s,p=y,N=m+te*Z*s,O=y}else if(o==="y"){q=Math.abs(U),Z=Math.abs($);var Q=L>0?1:-1;f=m,p=y-Q*q*s,N=m,O=y+Q*Z*s}else q=Math.sqrt(B*B+U*U),Z=Math.sqrt(F*F+$*$),I=Z/(Z+q),f=m-M*s*(1-I),p=y-L*s*(1-I),N=m+M*s*I,O=y+L*s*I,N=bo(N,To(x,m)),O=bo(O,To(C,y)),N=To(N,bo(x,m)),O=To(O,bo(C,y)),M=N-m,L=O-y,f=m-M*q/Z,p=y-L*q/Z,f=bo(f,To(u,m)),p=bo(p,To(c,y)),f=To(f,bo(u,m)),p=To(p,bo(c,y)),M=m-f,L=y-p,N=m+M*Z/q,O=y+L*Z/q}r.bezierCurveTo(h,d,f,p,m,y),h=N,d=O}else r.lineTo(m,y)}u=m,c=y,v+=a}return g}var kW=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),kge=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new kW},e.prototype.buildPath=function(t,i){var n=i.points,a=0,s=n.length/2;if(i.connectNulls){for(;s>0&&$u(n[s*2-2],n[s*2-1]);s--);for(;a<s&&$u(n[a*2],n[a*2+1]);a++);}for(;a<s;)a+=w2(t,n,a,s,s,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},e.prototype.getPointOn=function(t,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,s=us.CMD,o,l,u=i==="x",c=[],h=0;h<a.length;){var d=a[h++],f=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(d){case s.M:o=a[h++],l=a[h++];break;case s.L:if(f=a[h++],p=a[h++],_=u?(t-o)/(f-o):(t-l)/(p-l),_<=1&&_>=0){var b=u?(p-l)*_+l:(f-o)*_+o;return u?[t,b]:[b,t]}o=f,l=p;break;case s.C:f=a[h++],p=a[h++],v=a[h++],g=a[h++],m=a[h++],y=a[h++];var S=u?w0(o,f,v,m,t,c):w0(l,p,g,y,t,c);if(S>0)for(var x=0;x<S;x++){var C=c[x];if(C<=1&&C>=0){var b=u?Mr(l,p,g,y,C):Mr(o,f,v,m,C);return u?[t,b]:[b,t]}}o=m,l=y;break}}},e}(Qe),Rge=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(kW),RW=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new Rge},e.prototype.buildPath=function(t,i){var n=i.points,a=i.stackedOnPoints,s=0,o=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;o>0&&$u(n[o*2-2],n[o*2-1]);o--);for(;s<o&&$u(n[s*2],n[s*2+1]);s++);}for(;s<o;){var u=w2(t,n,s,o,o,1,i.smooth,l,i.connectNulls);w2(t,a,s+u-1,u,o,-1,i.stackedOnSmooth,l,i.connectNulls),s+=u+1,t.closePath()}},e}(Qe);function OW(r,e,t,i,n){var a=r.getArea(),s=a.x,o=a.y,l=a.width,u=a.height,c=t.get(["lineStyle","width"])||2;s-=c/2,o-=c/2,l+=c,u+=c,l=Math.ceil(l),s!==Math.floor(s)&&(s=Math.floor(s),l++);var h=new st({shape:{x:s,y:o,width:l,height:u}});if(e){var d=r.getBaseAxis(),f=d.isHorizontal(),p=d.inverse;f?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var v=we(n)?function(g){n(g,h)}:null;Vt(h,{shape:{width:l,height:u,x:s,y:o}},t,null,i,v)}return h}function NW(r,e,t){var i=r.getArea(),n=er(i.r0,1),a=er(i.r,1),s=new Ei({shape:{cx:er(r.cx,1),cy:er(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(e){var o=r.getBaseAxis().dim==="angle";o?s.shape.endAngle=i.startAngle:s.shape.r=n,Vt(s,{shape:{endAngle:i.endAngle,r:a}},t)}return s}function cg(r,e,t,i,n){if(r){if(r.type==="polar")return NW(r,e,t);if(r.type==="cartesian2d")return OW(r,e,t,i,n)}else return null;return null}function dc(r,e){return r.type===e}function yO(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function _O(r){for(var e=1/0,t=1/0,i=-1/0,n=-1/0,a=0;a<r.length;){var s=r[a++],o=r[a++];isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i)),isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n))}return[[e,t],[i,n]]}function bO(r,e){var t=_O(r),i=t[0],n=t[1],a=_O(e),s=a[0],o=a[1];return Math.max(Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]),Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]))}function TO(r){return ut(r)?r:r?.5:0}function Oge(r,e,t){if(!t.valueDim)return[];for(var i=e.count(),n=ja(i*2),a=0;a<i;a++){var s=LW(t,r,e,a);n[a*2]=s[0],n[a*2+1]=s[1]}return n}function So(r,e,t,i){var n=e.getBaseAxis(),a=n.dim==="x"||n.dim==="radius"?0:1,s=[],o=0,l=[],u=[],c=[],h=[];if(i){for(o=0;o<r.length;o+=2)!isNaN(r[o])&&!isNaN(r[o+1])&&h.push(r[o],r[o+1]);r=h}for(o=0;o<r.length-2;o+=2)switch(c[0]=r[o+2],c[1]=r[o+3],u[0]=r[o],u[1]=r[o+1],s.push(u[0],u[1]),t){case"end":l[a]=c[a],l[1-a]=u[1-a],s.push(l[0],l[1]);break;case"middle":var d=(u[a]+c[a])/2,f=[];l[a]=f[a]=d,l[1-a]=u[1-a],f[1-a]=c[1-a],s.push(l[0],l[1]),s.push(f[0],f[1]);break;default:l[a]=u[a],l[1-a]=c[1-a],s.push(l[0],l[1])}return s.push(r[o++],r[o++]),s}function Nge(r,e){var t=[],i=r.length,n,a;function s(c,h,d){var f=c.coord,p=(d-f)/(h.coord-f),v=Ale(p,[c.color,h.color]);return{coord:d,color:v}}for(var o=0;o<i;o++){var l=r[o],u=l.coord;if(u<0)n=l;else if(u>e){a?t.push(s(a,l,e)):n&&t.push(s(n,l,0),s(n,l,e));break}else n&&(t.push(s(n,l,0)),n=null),t.push(l),a=l}return t}function Bge(r,e,t){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&e.type==="cartesian2d"){for(var n,a,s=i.length-1;s>=0;s--){var o=r.getDimensionInfo(i[s].dimension);if(n=o&&o.coordDim,n==="x"||n==="y"){a=i[s];break}}if(a){var l=e.getAxis(n),u=oe(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=Nge(u,n==="x"?t.getWidth():t.getHeight()),f=d.length;if(!f&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,v=d[0].coord-p,g=d[f-1].coord+p,m=g-v;if(m<.001)return"transparent";R(d,function(_){_.offset=(_.coord-v)/m}),d.push({offset:f?d[f-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:h[0]||"transparent"});var y=new tg(0,0,0,0,d,!0);return y[n]=v,y[n+"2"]=g,y}}}function Fge(r,e,t){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(n&&Uge(a,e))){var s=e.mapDimension(a.dim),o={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);o[u]=1}),function(l){return!o.hasOwnProperty(e.get(s,l))}}}}function Uge(r,e){var t=r.getExtent(),i=Math.abs(t[1]-t[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=e.count(),a=Math.max(1,Math.round(n/5)),s=0;s<n;s+=a)if(lg.getSymbolSize(e,s)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function Vge(r,e){return isNaN(r)||isNaN(e)}function zge(r){for(var e=r.length/2;e>0&&Vge(r[e*2-2],r[e*2-1]);e--);return e-1}function SO(r,e){return[r[e*2],r[e*2+1]]}function Gge(r,e,t){for(var i=r.length/2,n=t==="x"?0:1,a,s,o=0,l=-1,u=0;u<i;u++)if(s=r[u*2+n],!(isNaN(s)||isNaN(r[u*2+1-n]))){if(u===0){a=s;continue}if(a<=e&&s>=e||a>=e&&s<=e){l=u;break}o=u,a=s}return{range:[o,l],t:(e-a)/(s-a)}}function BW(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<Di.length;e++)if(r.get([Di[e],"endLabel","show"]))return!0;return!1}function uS(r,e,t,i){if(dc(e,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),s=i.getData(),o={lastFrameIndex:0},l=BW(i)?function(f,p){r._endLabelOnDuring(f,p,s,o,a,n,e)}:null,u=e.getBaseAxis().isHorizontal(),c=OW(e,t,i,function(){var f=r._endLabel;f&&t&&o.originalX!=null&&f.attr({x:o.originalX,y:o.originalY})},l);if(!i.get("clip",!0)){var h=c.shape,d=Math.max(h.width,h.height);u?(h.y-=d,h.height+=d*2):(h.x-=d,h.width+=d*2)}return l&&l(1,c),c}else return NW(e,t,i)}function Hge(r,e){var t=e.getBaseAxis(),i=t.isHorizontal(),n=t.inverse,a=i?n?"right":"left":"center",s=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||s}}}var $ge=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Le,i=new ug;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=t},e.prototype.render=function(t,i,n){var a=this,s=t.coordinateSystem,o=this.group,l=t.getData(),u=t.getModel("lineStyle"),c=t.getModel("areaStyle"),h=l.getLayout("points")||[],d=s.type==="polar",f=this._coordSys,p=this._symbolDraw,v=this._polyline,g=this._polygon,m=this._lineGroup,y=!i.ssr&&t.get("animation"),_=!c.isEmpty(),b=c.get("origin"),S=MW(s,l,b),x=_&&Oge(s,l,S),C=t.get("showSymbol"),D=t.get("connectNulls"),I=C&&!d&&Fge(t,l,s),M=this._data;M&&M.eachItemGraphicEl(function(Oe,Fe){Oe.__temp&&(o.remove(Oe),M.setItemGraphicEl(Fe,null))}),C||p.remove(),o.add(m);var L=d?!1:t.get("step"),N;s&&s.getArea&&t.get("clip",!0)&&(N=s.getArea(),N.width!=null?(N.x-=.1,N.y-=.1,N.width+=.2,N.height+=.2):N.r0&&(N.r0-=.5,N.r+=.5)),this._clipShapeForSymbol=N;var O=Bge(l,s,n)||l.getVisual("style")[l.getVisual("drawType")];if(!(v&&f.type===s.type&&L===this._step))C&&p.updateData(l,{isIgnore:I,clipShape:N,disableAnimation:!0,getSymbolPoint:function(Oe){return[h[Oe*2],h[Oe*2+1]]}}),y&&this._initSymbolLabelAnimation(l,s,N),L&&(h=So(h,s,L,D),x&&(x=So(x,s,L,D))),v=this._newPolyline(h),_?g=this._newPolygon(h,x):g&&(m.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(t,s,ic(O)),m.setClipPath(uS(this,s,!0,t));else{_&&!g?g=this._newPolygon(h,x):g&&!_&&(m.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(t,s,ic(O));var B=m.getClipPath();if(B){var F=uS(this,s,!1,t);Vt(B,{shape:F.shape},t)}else m.setClipPath(uS(this,s,!0,t));C&&p.updateData(l,{isIgnore:I,clipShape:N,disableAnimation:!0,getSymbolPoint:function(Oe){return[h[Oe*2],h[Oe*2+1]]}}),(!yO(this._stackedOnPoints,x)||!yO(this._points,h))&&(y?this._doUpdateAnimation(l,x,s,n,L,b,D):(L&&(h=So(h,s,L,D),x&&(x=So(x,s,L,D))),v.setShape({points:h}),g&&g.setShape({points:h,stackedOnPoints:x})))}var U=t.getModel("emphasis"),$=U.get("focus"),q=U.get("blurScope"),Z=U.get("disabled");if(v.useStyle(Ce(u.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"})),Qr(v,t,"lineStyle"),v.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var te=v.getState("emphasis").style;te.lineWidth=+v.style.lineWidth+1}ke(v).seriesIndex=t.seriesIndex,Yt(v,$,q,Z);var Q=TO(t.get("smooth")),se=t.get("smoothMonotone");if(v.setShape({smooth:Q,smoothMonotone:se,connectNulls:D}),g){var he=l.getCalculationInfo("stackedOnSeries"),ue=0;g.useStyle(Ce(c.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),he&&(ue=TO(he.get("smooth"))),g.setShape({smooth:Q,stackedOnSmooth:ue,smoothMonotone:se,connectNulls:D}),Qr(g,t,"areaStyle"),ke(g).seriesIndex=t.seriesIndex,Yt(g,$,q,Z)}var Ie=function(Oe){a._changePolyState(Oe)};l.eachItemGraphicEl(function(Oe){Oe&&(Oe.onHoverStateChange=Ie)}),this._polyline.onHoverStateChange=Ie,this._data=l,this._coordSys=s,this._stackedOnPoints=x,this._points=h,this._step=L,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,v),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,i){ke(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,n,a){var s=t.getData(),o=ec(s,a);if(this._changePolyState("emphasis"),!(o instanceof Array)&&o!=null&&o>=0){var l=s.getLayout("points"),u=s.getItemGraphicEl(o);if(!u){var c=l[o*2],h=l[o*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var d=t.get("zlevel")||0,f=t.get("z")||0;u=new lg(s,o),u.x=c,u.y=h,u.setZ(d,f);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=d,p.z=f,p.z2=this._polyline.z2+1),u.__temp=!0,s.setItemGraphicEl(o,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ct.prototype.highlight.call(this,t,i,n,a)},e.prototype.downplay=function(t,i,n,a){var s=t.getData(),o=ec(s,a);if(this._changePolyState("normal"),o!=null&&o>=0){var l=s.getItemGraphicEl(o);l&&(l.__temp?(s.setItemGraphicEl(o,null),this.group.remove(l)):l.downplay())}else Ct.prototype.downplay.call(this,t,i,n,a)},e.prototype._changePolyState=function(t){var i=this._polygon;M0(this._polyline,t),i&&M0(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new kge({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new RW({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,i,n){var a,s,o=i.getBaseAxis(),l=o.inverse;i.type==="cartesian2d"?(a=o.isHorizontal(),s=!1):i.type==="polar"&&(a=o.dim==="angle",s=!0);var u=t.hostModel,c=u.get("animationDuration");we(c)&&(c=c(null));var h=u.get("animationDelay")||0,d=we(h)?h(null):h;t.eachItemGraphicEl(function(f,p){var v=f;if(v){var g=[f.x,f.y],m=void 0,y=void 0,_=void 0;if(n)if(s){var b=n,S=i.pointToCoord(g);a?(m=b.startAngle,y=b.endAngle,_=-S[1]/180*Math.PI):(m=b.r0,y=b.r,_=S[0])}else{var x=n;a?(m=x.x,y=x.x+x.width,_=f.x):(m=x.y+x.height,y=x.y,_=f.y)}var C=y===m?0:(_-m)/(y-m);l&&(C=1-C);var D=we(h)?h(p):c*C+d,I=v.getSymbolPath(),M=I.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:D}),I.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,n){var a=t.getModel("endLabel");if(BW(t)){var s=t.getData(),o=this._polyline,l=s.getLayout("points");if(!l){o.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new lt({z2:200}),u.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var c=zge(l);c>=0&&(Jr(o,Nr(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:c,defaultText:function(h,d,f){return f!=null?PW(s,f):ff(s,h)},enableTextSetter:!0},Hge(a,i)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,n,a,s,o,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),d=n.hostModel,f=d.get("connectNulls"),p=o.get("precision"),v=o.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=i.shape,b=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,S=(m?v:0)*(y?-1:1),x=(m?0:-v)*(y?-1:1),C=m?"x":"y",D=Gge(h,b,C),I=D.range,M=I[1]-I[0],L=void 0;if(M>=1){if(M>1&&!f){var N=SO(h,I[0]);u.attr({x:N[0]+S,y:N[1]+x}),s&&(L=d.getRawValue(I[0]))}else{var N=c.getPointOn(b,C);N&&u.attr({x:N[0]+S,y:N[1]+x});var O=d.getRawValue(I[0]),B=d.getRawValue(I[1]);s&&(L=T9(n,p,O,B,D.t))}a.lastFrameIndex=I[0]}else{var F=t===1||a.lastFrameIndex>0?I[0]:0,N=SO(h,F);s&&(L=d.getRawValue(F)),u.attr({x:N[0]+S,y:N[1]+x})}if(s){var U=Rf(u);typeof U.setLabelText=="function"&&U.setLabelText(L)}}},e.prototype._doUpdateAnimation=function(t,i,n,a,s,o,l){var u=this._polyline,c=this._polygon,h=t.hostModel,d=Lge(this._data,t,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),f=d.current,p=d.stackedOnCurrent,v=d.next,g=d.stackedOnNext;if(s&&(f=So(d.current,n,s,l),p=So(d.stackedOnCurrent,n,s,l),v=So(d.next,n,s,l),g=So(d.stackedOnNext,n,s,l)),bO(f,v)>3e3||c&&bO(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=f;var m={shape:{points:v}};d.current!==f&&(m.shape.__points=d.next),u.stopAnimation(),ct(u,m,h),c&&(c.setShape({points:f,stackedOnPoints:p}),c.stopAnimation(),ct(c,{shape:{stackedOnPoints:g}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=d.status,b=0;b<_.length;b++){var S=_[b].cmd;if(S==="="){var x=t.getItemGraphicEl(_[b].idx1);x&&y.push({el:x,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var C=u.shape.__points,D=0;D<y.length;D++){var I=y[D].el,M=y[D].ptIdx*2;I.x=C[M],I.y=C[M+1],I.markRedraw()}})},e.prototype.remove=function(t){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,s){a.__temp&&(i.remove(a),n.setItemGraphicEl(s,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Ct);function hg(r,e){return{seriesType:r,plan:Uf(),reset:function(t){var i=t.getData(),n=t.coordinateSystem,a=t.pipelineContext,s=e||a.large;if(n){var o=oe(n.dimensions,function(f){return i.mapDimension(f)}).slice(0,2),l=o.length,u=i.getCalculationInfo("stackResultDimension");nl(i,o[0])&&(o[0]=u),nl(i,o[1])&&(o[1]=u);var c=i.getStore(),h=i.getDimensionIndex(o[0]),d=i.getDimensionIndex(o[1]);return l&&{progress:function(f,p){for(var v=f.end-f.start,g=s&&ja(v*l),m=[],y=[],_=f.start,b=0;_<f.end;_++){var S=void 0;if(l===1){var x=c.get(h,_);S=n.dataToPoint(x,null,y)}else m[0]=c.get(h,_),m[1]=c.get(d,_),S=n.dataToPoint(m,null,y);s?(g[b++]=S[0],g[b++]=S[1]):p.setItemLayout(_,S.slice())}s&&p.setLayout("points",g)}}}}}}var Wge={average:function(r){for(var e=0,t=0,i=0;i<r.length;i++)isNaN(r[i])||(e+=r[i],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},minmax:function(r){for(var e=-1/0,t=-1/0,i=0;i<r.length;i++){var n=r[i],a=Math.abs(n);a>e&&(e=a,t=n)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},qge=function(r){return Math.round(r.length/2)};function FW(r){return{seriesType:r,reset:function(e,t,i){var n=e.getData(),a=e.get("sampling"),s=e.coordinateSystem,o=n.count();if(o>10&&s.type==="cartesian2d"&&a){var l=s.getBaseAxis(),u=s.getOtherAxis(l),c=l.getExtent(),h=i.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(h||1),f=Math.round(o/d);if(isFinite(f)&&f>1){a==="lttb"&&e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/f));var p=void 0;pe(a)?p=Wge[a]:we(a)&&(p=a),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/f,p,qge))}}}}}function jge(r){r.registerChartView($ge),r.registerSeriesModel(Ege),r.registerLayout(hg("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FW("line"))}var Cv=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var s=a.clampData(t),o=a.dataToPoint(s);if(n)R(a.getAxes(),function(d,f){if(d.type==="category"&&i!=null){var p=d.getTicksCoords(),v=d.getTickModel().get("alignWithLabel"),g=s[f],m=i[f]==="x1"||i[f]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){o[f]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,b=1,S=0;S<p.length;S++){var x=p[S].coord,C=S===p.length-1?p[S-1].tickValue+b:p[S].tickValue;if(C===g){_=x;break}else if(C<g)y=x;else if(y!=null&&C>g){_=(x+y)/2;break}S===1&&(b=C-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),o[f]=d.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;o[h]+=u+c/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ot);Ot.registerClass(Cv);var Xge=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return to(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,n){return n.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=hl(Cv.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Cv),Yge=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),K0=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new Yge},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,s=Math.max(i.r0||0,0),o=Math.max(i.r,0),l=(o-s)*.5,u=s+l,c=i.startAngle,h=i.endAngle,d=i.clockwise,f=Math.PI*2,p=d?h-c<f:c-h<f;p||(c=h-(d?f:-f));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(h),y=Math.sin(h);p?(t.moveTo(v*s+n,g*s+a),t.arc(v*u+n,g*u+a,l,-Math.PI+c,c,!d)):t.moveTo(v*o+n,g*o+a),t.arc(n,a,o,c,h,!d),t.arc(m*u+n,y*u+a,l,h-Math.PI*2,h-Math.PI,!d),s!==0&&t.arc(n,a,s,h,c,d)},e}(Qe);function Kge(r,e){e=e||{};var t=e.isRoundCap;return function(i,n,a){var s=n.position;if(!s||s instanceof Array)return I0(i,n,a);var o=r(s),l=n.distance!=null?n.distance:5,u=this.shape,c=u.cx,h=u.cy,d=u.r,f=u.r0,p=(d+f)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=t?Math.abs(d-f)/2:0,_=Math.cos,b=Math.sin,S=c+d*_(v),x=h+d*b(v),C="left",D="top";switch(o){case"startArc":S=c+(f-l)*_(m),x=h+(f-l)*b(m),C="center",D="top";break;case"insideStartArc":S=c+(f+l)*_(m),x=h+(f+l)*b(m),C="center",D="bottom";break;case"startAngle":S=c+p*_(v)+Om(v,l+y,!1),x=h+p*b(v)+Nm(v,l+y,!1),C="right",D="middle";break;case"insideStartAngle":S=c+p*_(v)+Om(v,-l+y,!1),x=h+p*b(v)+Nm(v,-l+y,!1),C="left",D="middle";break;case"middle":S=c+p*_(m),x=h+p*b(m),C="center",D="middle";break;case"endArc":S=c+(d+l)*_(m),x=h+(d+l)*b(m),C="center",D="bottom";break;case"insideEndArc":S=c+(d-l)*_(m),x=h+(d-l)*b(m),C="center",D="top";break;case"endAngle":S=c+p*_(g)+Om(g,l+y,!0),x=h+p*b(g)+Nm(g,l+y,!0),C="left",D="middle";break;case"insideEndAngle":S=c+p*_(g)+Om(g,-l+y,!0),x=h+p*b(g)+Nm(g,-l+y,!0),C="right",D="middle";break;default:return I0(i,n,a)}return i=i||{},i.x=S,i.y=x,i.align=C,i.verticalAlign=D,i}}function Zge(r,e,t,i){if(ut(i)){r.setTextConfig({rotation:i});return}else if(ie(e)){r.setTextConfig({rotation:0});return}var n=r.shape,a=n.clockwise?n.startAngle:n.endAngle,s=n.clockwise?n.endAngle:n.startAngle,o=(a+s)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=o;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=s;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function Om(r,e,t){return e*Math.sin(r)*(t?-1:1)}function Nm(r,e,t){return e*Math.cos(r)*(t?1:-1)}function xu(r,e,t){var i=r.get("borderRadius");if(i==null)return t?{cornerRadius:0}:null;ie(i)||(i=[i,i,i,i]);var n=Math.abs(e.r||0-e.r0||0);return{cornerRadius:oe(i,function(a){return ya(a,n)})}}var cS=Math.max,hS=Math.min;function Qge(r,e){var t=r.getArea&&r.getArea();if(dc(r,"cartesian2d")){var i=r.getBaseAxis();if(i.type!=="category"||!i.onBand){var n=e.getLayout("bandWidth");i.isHorizontal()?(t.x-=n,t.width+=n*2):(t.y-=n,t.height+=n*2)}}return t}var Jge=function(r){j(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,i,n,a){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var s=t.get("coordinateSystem");(s==="cartesian2d"||s==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,i,n):this._renderNormal(t,i,n,a))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,i){this._progressiveEls=[],this._incrementalRenderLarge(t,i)},e.prototype.eachRendered=function(t){cl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t,i,n,a){var s=this.group,o=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var d=t.isAnimationEnabled()?t:null,f=eme(t,u);f&&this._enableRealtimeSort(f,o,n);var p=t.get("clip",!0)||f,v=Qge(u,o);s.removeClipPath();var g=t.get("roundCap",!0),m=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),_=y.get("borderRadius")||0,b=[],S=this._backgroundEls,x=a&&a.isInitSort,C=a&&a.type==="changeAxisOrder";function D(L){var N=Bm[u.type](o,L),O=ome(u,h,N);return O.useStyle(y.getItemStyle()),u.type==="cartesian2d"?O.setShape("r",_):O.setShape("cornerRadius",_),b[L]=O,O}o.diff(l).add(function(L){var N=o.getItemModel(L),O=Bm[u.type](o,L,N);if(m&&D(L),!(!o.hasValue(L)||!DO[u.type](O))){var B=!1;p&&(B=xO[u.type](v,O));var F=wO[u.type](t,o,L,O,h,d,c.model,!1,g);f&&(F.forceLabelAnimation=!0),EO(F,o,L,N,O,t,h,u.type==="polar"),x?F.attr({shape:O}):f?CO(f,d,F,O,L,h,!1,!1):Vt(F,{shape:O},t,L),o.setItemGraphicEl(L,F),s.add(F),F.ignore=B}}).update(function(L,N){var O=o.getItemModel(L),B=Bm[u.type](o,L,O);if(m){var F=void 0;S.length===0?F=D(N):(F=S[N],F.useStyle(y.getItemStyle()),u.type==="cartesian2d"?F.setShape("r",_):F.setShape("cornerRadius",_),b[L]=F);var U=Bm[u.type](o,L),$=VW(h,U,u);ct(F,{shape:$},d,L)}var q=l.getItemGraphicEl(N);if(!o.hasValue(L)||!DO[u.type](B)){s.remove(q);return}var Z=!1;if(p&&(Z=xO[u.type](v,B),Z&&s.remove(q)),q?_a(q):q=wO[u.type](t,o,L,B,h,d,c.model,!!q,g),f&&(q.forceLabelAnimation=!0),C){var te=q.getTextContent();if(te){var Q=Rf(te);Q.prevValue!=null&&(Q.prevValue=Q.value)}}else EO(q,o,L,O,B,t,h,u.type==="polar");x?q.attr({shape:B}):f?CO(f,d,q,B,L,h,!0,C):ct(q,{shape:B},t,L,null),o.setItemGraphicEl(L,q),q.ignore=Z,s.add(q)}).remove(function(L){var N=l.getItemGraphicEl(L);N&&vv(N,t,L)}).execute();var I=this._backgroundGroup||(this._backgroundGroup=new Le);I.removeAll();for(var M=0;M<b.length;++M)I.add(b[M]);s.add(I),this._backgroundEls=b,this._data=o},e.prototype._renderLarge=function(t,i,n){this._clear(),PO(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,i){this._removeBackground(),PO(i,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var i=t.get("clip",!0)&&cg(t.coordinateSystem,!1,t),n=this.group;i?n.setClipPath(i):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,i,n){var a=this;if(i.count()){var s=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,t,n),this._isFirstFrame=!1;else{var o=function(l){var u=i.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(s.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,o,s,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,i,n){var a=[];return t.each(t.mapDimension(i.dim),function(s,o){var l=n(o);l=l??NaN,a.push({dataIndex:o,mappedValue:l,ordinalNumber:s})}),a.sort(function(s,o){return o.mappedValue-s.mappedValue}),{ordinalNumbers:oe(a,function(s){return s.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,i,n){for(var a=n.scale,s=t.mapDimension(n.dim),o=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(s,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:i(t.indexOfRawIndex(c));if(h>o)return!0;o=h}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var n=i.scale,a=n.getExtent(),s=Math.max(0,a[0]),o=Math.min(a[1],n.getOrdinalMeta().categories.length-1);s<=o;++s)if(t.ordinalNumbers[s]!==n.getRawOrdinalNumber(s))return!0},e.prototype._updateSortWithinSameData=function(t,i,n,a){if(this._isOrderChangedWithinSameData(t,i,n)){var s=this._dataSort(t,n,i);this._isOrderDifferentInView(s,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:s}))}},e.prototype._dispatchInitSort=function(t,i,n){var a=i.baseAxis,s=this._dataSort(t,a,function(o){return t.get(t.mapDimension(i.otherAxis.dim),o)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:s})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){vv(a,t,ke(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Ct),xO={cartesian2d:function(r,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,a=r.y+r.height,s=cS(e.x,r.x),o=hS(e.x+e.width,n),l=cS(e.y,r.y),u=hS(e.y+e.height,a),c=o<s,h=u<l;return e.x=c&&s>n?o:s,e.y=h&&l>a?u:l,e.width=c?0:o-s,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var n=hS(e.r,r.r),a=cS(e.r0,r.r0);e.r=n,e.r0=a;var s=n-a<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return s}},wO={cartesian2d:function(r,e,t,i,n,a,s,o,l){var u=new st({shape:J({},i),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,h=n?"height":"width";c[h]=0}return u},polar:function(r,e,t,i,n,a,s,o,l){var u=!n&&l?K0:Ei,c=new u({shape:i,z2:1});c.name="item";var h=UW(n);if(c.calculateTextPosition=Kge(h,{isRoundCap:u===K0}),a){var d=c.shape,f=n?"r":"endAngle",p={};d[f]=n?i.r0:i.startAngle,p[f]=i[f],(o?ct:Vt)(c,{shape:p},a)}return c}};function eme(r,e){var t=r.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function CO(r,e,t,i,n,a,s,o){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),o||(s?ct:Vt)(t,{shape:l},e,n,null);var c=e?r.baseAxis.model:null;(s?ct:Vt)(t,{shape:u},c,n)}function AO(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var tme=["x","y","width","height"],rme=["cx","cy","r","startAngle","endAngle"],DO={cartesian2d:function(r){return!AO(r,tme)},polar:function(r){return!AO(r,rme)}},Bm={cartesian2d:function(r,e,t){var i=r.getItemLayout(e),n=t?nme(t,i):0,a=i.width>0?1:-1,s=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+s*n/2,width:i.width-a*n,height:i.height-s*n}},polar:function(r,e,t){var i=r.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function ime(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function UW(r){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(r)}function EO(r,e,t,i,n,a,s,o){var l=e.getItemVisual(t,"style");if(o){if(!a.get("roundCap")){var c=r.shape,h=xu(i.getModel("itemStyle"),c,!0);J(c,h),r.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var d=i.getShallow("cursor");d&&r.attr("cursor",d);var f=o?s?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":s?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=Nr(i);Jr(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:ff(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var v=r.getTextContent();if(o&&v){var g=i.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,Zge(r,g==="outside"?f:g,UW(s),i.get(["label","rotate"]))}nH(v,p,a.getRawValue(t),function(y){return PW(e,y)});var m=i.getModel(["emphasis"]);Yt(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),Qr(r,i),ime(n)&&(r.style.fill="none",r.style.stroke="none",R(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function nme(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,a)}var ame=function(){function r(){}return r}(),IO=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new ame},e.prototype.buildPath=function(t,i){for(var n=i.points,a=this.baseDimIdx,s=1-this.baseDimIdx,o=[],l=[],u=this.barWidth,c=0;c<n.length;c+=3)l[a]=u,l[s]=n[c+2],o[a]=n[c+a],o[s]=n[c+s],t.rect(o[0],o[1],l[0],l[1])},e}(Qe);function PO(r,e,t,i){var n=r.getData(),a=n.getLayout("valueAxisHorizontal")?1:0,s=n.getLayout("largeDataIndices"),o=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var c=new IO({shape:{points:u},incremental:!!i,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=s,c.barWidth=o,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var h=new IO({shape:{points:n.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=s,h.barWidth=o,e.add(h),h.useStyle(n.getVisual("style")),ke(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",MO),h.on("mousemove",MO)),t&&t.push(h)}var MO=PD(function(r){var e=this,t=sme(e,r.offsetX,r.offsetY);ke(e).dataIndex=t>=0?t:null},30,!1);function sme(r,e,t){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,s=r.largeDataIndices,o=[],l=[],u=r.barWidth,c=0,h=a.length/3;c<h;c++){var d=c*3;if(l[i]=u,l[n]=a[d+2],o[i]=a[d+i],o[n]=a[d+n],l[n]<0&&(o[n]+=l[n],l[n]=-l[n]),e>=o[0]&&e<=o[0]+l[0]&&t>=o[1]&&t<=o[1]+l[1])return s[c]}return-1}function VW(r,e,t){if(dc(t,"cartesian2d")){var i=e,n=t.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=t.getArea(),a=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function ome(r,e,t){var i=r.type==="polar"?Ei:st;return new i({shape:VW(e,t,r),silent:!0,z2:0})}function lme(r){r.registerChartView(Jge),r.registerSeriesModel(Xge),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Ue(W$,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,q$("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FW("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var LO=Math.PI*2,Fm=Math.PI/180;function zW(r,e){return Ar(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function GW(r,e){var t=zW(r,e),i=r.get("center"),n=r.get("radius");ie(n)||(n=[0,n]);var a=ce(t.width,e.getWidth()),s=ce(t.height,e.getHeight()),o=Math.min(a,s),l=ce(n[0],o/2),u=ce(n[1],o/2),c,h,d=r.coordinateSystem;if(d){var f=d.dataToPoint(i);c=f[0]||0,h=f[1]||0}else ie(i)||(i=[i,i]),c=ce(i[0],a)+t.x,h=ce(i[1],s)+t.y;return{cx:c,cy:h,r0:l,r:u}}function ume(r,e,t){e.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),s=zW(i,t),o=GW(i,t),l=o.cx,u=o.cy,c=o.r,h=o.r0,d=-i.get("startAngle")*Fm,f=i.get("endAngle"),p=i.get("padAngle")*Fm;f=f==="auto"?d-LO:-f*Fm;var v=i.get("minAngle")*Fm,g=v+p,m=0;n.each(a,function($){!isNaN($)&&m++});var y=n.getSum(a),_=Math.PI/(y||m)*2,b=i.get("clockwise"),S=i.get("roseType"),x=i.get("stillShowZeroSum"),C=n.getDataExtent(a);C[0]=0;var D=b?1:-1,I=[d,f],M=D*p/2;aD(I,!b),d=I[0],f=I[1];var L=HW(i);L.startAngle=d,L.endAngle=f,L.clockwise=b;var N=Math.abs(f-d),O=N,B=0,F=d;if(n.setLayout({viewRect:s,r:c}),n.each(a,function($,q){var Z;if(isNaN($)){n.setItemLayout(q,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:l,cy:u,r0:h,r:S?NaN:c});return}S!=="area"?Z=y===0&&x?_:$*_:Z=N/m,Z<g?(Z=g,O-=g):B+=$;var te=F+D*Z,Q=0,se=0;p>Z?(Q=F+D*Z/2,se=Q):(Q=F+M,se=te-M),n.setItemLayout(q,{angle:Z,startAngle:Q,endAngle:se,clockwise:b,cx:l,cy:u,r0:h,r:S?bt($,C,[h,c]):c}),F=te}),O<LO&&m)if(O<=.001){var U=N/m;n.each(a,function($,q){if(!isNaN($)){var Z=n.getItemLayout(q);Z.angle=U;var te=0,Q=0;U<p?(te=d+D*(q+1/2)*U,Q=te):(te=d+D*q*U+M,Q=d+D*(q+1)*U-M),Z.startAngle=te,Z.endAngle=Q}})}else _=O/B,F=d,n.each(a,function($,q){if(!isNaN($)){var Z=n.getItemLayout(q),te=Z.angle===g?g:$*_,Q=0,se=0;te<p?(Q=F+D*te/2,se=Q):(Q=F+M,se=F+D*te-M),Z.startAngle=Q,Z.endAngle=se,F+=D*te}})})}var HW=ot();function fg(r){return{seriesType:r,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(!(!i||!i.length)){var n=e.getData();n.filterSelf(function(a){for(var s=n.getName(a),o=0;o<i.length;o++)if(!i[o].isSelected(s))return!1;return!0})}}}}var cme=Math.PI/180;function kO(r,e,t,i,n,a,s,o,l,u){if(r.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],b=Math.abs(_.label.y-t),S=i+_.len,x=S*S,C=Math.sqrt((1-Math.abs(b*b/m))*x),D=e+(C+_.len2)*n,I=D-_.label.x,M=_.targetTextWidth-I*n;$W(_,M,!0),_.label.x=D}}function h(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],b=_.label.y>t?m:g,S=Math.abs(_.label.y-t);if(S>=b.maxY){var x=_.label.x-e-_.len2*n,C=i+_.len,D=Math.abs(x)<C?Math.sqrt(S*S/(1-x*x/C/C)):C;b.rB=D,b.maxY=S}b.list.push(_)}c(g),c(m)}for(var d=r.length,f=0;f<d;f++)if(r[f].position==="outer"&&r[f].labelAlignTo==="labelLine"){var p=r[f].label.x-u;r[f].linePoints[1][0]+=p,r[f].label.x=u}dW(r,l,l+s)&&h(r)}function hme(r,e,t,i,n,a,s,o){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<r.length;d++){var f=r[d].label;fS(r[d])||(f.x<e?(c=Math.min(c,f.x),l.push(r[d])):(h=Math.max(h,f.x),u.push(r[d])))}for(var d=0;d<r.length;d++){var p=r[d];if(!fS(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var f=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?f.x<e?g=v[2][0]-p.labelDistance-s-p.edgeDistance:g=s+n-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?f.x<e?g=c-s-p.bleedMargin:g=s+n-h-p.bleedMargin:f.x<e?g=f.x-s-p.bleedMargin:g=s+n-f.x-p.bleedMargin,p.targetTextWidth=g,$W(p,g)}}kO(u,e,t,i,1,n,a,s,o,h),kO(l,e,t,i,-1,n,a,s,o,c);for(var d=0;d<r.length;d++){var p=r[d];if(!fS(p)&&p.linePoints){var f=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=f.style.padding,_=y?y[1]+y[3]:0,b=f.style.backgroundColor?0:_,S=p.rect.width+b,x=v[1][0]-v[2][0];m?f.x<e?v[2][0]=s+p.edgeDistance+S+p.labelDistance:v[2][0]=s+n-p.edgeDistance-S-p.labelDistance:(f.x<e?v[2][0]=f.x+p.labelDistance:v[2][0]=f.x-p.labelDistance,v[1][0]=v[2][0]+x),v[1][1]=v[2][1]=f.y}}}function $W(r,e,t){if(t===void 0&&(t=!1),r.labelStyleWidth==null){var i=r.label,n=i.style,a=r.rect,s=n.backgroundColor,o=n.padding,l=o?o[1]+o[3]:0,u=n.overflow,c=a.width+(s?0:l);if(e<c||t){var h=a.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",e-l);var d=i.getBoundingRect();i.setStyle("width",Math.ceil(d.width)),i.setStyle("backgroundColor",s)}else{var f=e-l,p=e<c?f:t?f>r.unconstrainedWidth?null:f:null;i.setStyle("width",p)}var v=i.getBoundingRect();a.width=v.width;var g=(i.style.margin||0)+2.1;a.height=v.height+g,a.y-=(a.height-h)/2}}}function fS(r){return r.position==="center"}function fme(r){var e=r.getData(),t=[],i,n,a=!1,s=(r.get("minShowLabelAngle")||0)*cme,o=e.getLayout("viewRect"),l=e.getLayout("r"),u=o.width,c=o.x,h=o.y,d=o.height;function f(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var C in x.states)if(x.states[C].ignore===!1)return!0;return!1}e.each(function(x){var C=e.getItemGraphicEl(x),D=C.shape,I=C.getTextContent(),M=C.getTextGuideLine(),L=e.getItemModel(x),N=L.getModel("label"),O=N.get("position")||L.get(["emphasis","label","position"]),B=N.get("distanceToLabelLine"),F=N.get("alignTo"),U=ce(N.get("edgeDistance"),u),$=N.get("bleedMargin"),q=L.getModel("labelLine"),Z=q.get("length");Z=ce(Z,u);var te=q.get("length2");if(te=ce(te,u),Math.abs(D.endAngle-D.startAngle)<s){R(I.states,f),I.ignore=!0,M&&(R(M.states,f),M.ignore=!0);return}if(p(I)){var Q=(D.startAngle+D.endAngle)/2,se=Math.cos(Q),he=Math.sin(Q),ue,Ie,Oe,Fe;i=D.cx,n=D.cy;var me=O==="inside"||O==="inner";if(O==="center")ue=D.cx,Ie=D.cy,Fe="center";else{var ze=(me?(D.r+D.r0)/2*se:D.r*se)+i,Pe=(me?(D.r+D.r0)/2*he:D.r*he)+n;if(ue=ze+se*3,Ie=Pe+he*3,!me){var ye=ze+se*(Z+l-D.r),Me=Pe+he*(Z+l-D.r),_t=ye+(se<0?-1:1)*te,Re=Me;F==="edge"?ue=se<0?c+U:c+u-U:ue=_t+(se<0?-B:B),Ie=Re,Oe=[[ze,Pe],[ye,Me],[_t,Re]]}Fe=me?"center":F==="edge"?se>0?"right":"left":se>0?"left":"right"}var Ge=Math.PI,Pt=0,wt=N.get("rotate");if(ut(wt))Pt=wt*(Ge/180);else if(O==="center")Pt=0;else if(wt==="radial"||wt===!0){var At=se<0?-Q+Ge:-Q;Pt=At}else if(wt==="tangential"&&O!=="outside"&&O!=="outer"){var rr=Math.atan2(se,he);rr<0&&(rr=Ge*2+rr);var ht=he>0;ht&&(rr=Ge+rr),Pt=rr-Ge}if(a=!!Pt,I.x=ue,I.y=Ie,I.rotation=Pt,I.setStyle({verticalAlign:"middle"}),me){I.setStyle({align:Fe});var ro=I.states.select;ro&&(ro.x+=I.x,ro.y+=I.y)}else{var Ji=I.getBoundingRect().clone();Ji.applyTransform(I.getComputedTransform());var br=(I.style.margin||0)+2.1;Ji.y-=br/2,Ji.height+=br,t.push({label:I,labelLine:M,position:O,len:Z,len2:te,minTurnAngle:q.get("minTurnAngle"),maxSurfaceAngle:q.get("maxSurfaceAngle"),surfaceNormal:new He(se,he),linePoints:Oe,textAlign:Fe,labelDistance:B,labelAlignTo:F,edgeDistance:U,bleedMargin:$,rect:Ji,unconstrainedWidth:Ji.width,labelStyleWidth:I.style.width})}C.setTextConfig({inside:me})}}),!a&&r.get("avoidLabelOverlap")&&hme(t,i,n,l,u,d,c,h);for(var v=0;v<t.length;v++){var g=t[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(R(m.states,f),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var S=g.linePoints;_||!S?(R(y.states,f),y.ignore=!0):(cW(S,g.minTurnAngle),Ove(S,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:S}),m.__hostTarget.textGuideLineConfig={anchor:new He(S[0][0],S[0][1])})}}}var dme=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;a.z2=2;var s=new lt;return a.setTextContent(s),a.updateData(t,i,n,!0),a}return e.prototype.updateData=function(t,i,n,a){var s=this,o=t.hostModel,l=t.getItemModel(i),u=l.getModel("emphasis"),c=t.getItemLayout(i),h=J(xu(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){s.setShape(h);return}if(a){s.setShape(h);var d=o.getShallow("animationType");o.ecModel.ssr?(Vt(s,{scaleX:0,scaleY:0},o,{dataIndex:i,isFrom:!0}),s.originX=h.cx,s.originY=h.cy):d==="scale"?(s.shape.r=c.r0,Vt(s,{shape:{r:c.r}},o,i)):n!=null?(s.setShape({startAngle:n,endAngle:n}),Vt(s,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},o,i)):(s.shape.endAngle=c.startAngle,ct(s,{shape:{endAngle:c.endAngle}},o,i))}else _a(s),ct(s,{shape:h},o,i);s.useStyle(t.getItemVisual(i,"style")),Qr(s,l);var f=(c.startAngle+c.endAngle)/2,p=o.get("selectedOffset"),v=Math.cos(f)*p,g=Math.sin(f)*p,m=l.getShallow("cursor");m&&s.attr("cursor",m),this._updateLabel(o,t,i),s.ensureState("emphasis").shape=J({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},xu(u.getModel("itemStyle"),c)),J(s.ensureState("select"),{x:v,y:g,shape:xu(l.getModel(["select","itemStyle"]),c)}),J(s.ensureState("blur"),{shape:xu(l.getModel(["blur","itemStyle"]),c)});var y=s.getTextGuideLine(),_=s.getTextContent();y&&J(y.ensureState("select"),{x:v,y:g}),J(_.ensureState("select"),{x:v,y:g}),Yt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i,n){var a=this,s=i.getItemModel(n),o=s.getModel("labelLine"),l=i.getItemVisual(n,"style"),u=l&&l.fill,c=l&&l.opacity;Jr(a,Nr(s),{labelFetcher:i.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(n,"normal")||i.getName(n)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var d=t.get(["label","position"]);if(d!=="outside"&&d!=="outer")a.removeTextGuideLine();else{var f=this.getTextGuideLine();f||(f=new Pi,this.setTextGuideLine(f)),$D(this,WD(s),{stroke:u,opacity:Qa(o.get(["lineStyle","opacity"]),c,1)})}},e}(Ei),pme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,n,a){var s=t.getData(),o=this._data,l=this.group,u;if(!o&&s.count()>0){for(var c=s.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<s.count();++h)c=s.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),s.count()===0&&t.get("showEmptyCircle")){var d=HW(t),f=new Ei({shape:J(GW(t,n),d)});f.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=f,l.add(f)}s.diff(o).add(function(p){var v=new dme(s,p,u);s.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=o.getItemGraphicEl(v);g.updateData(s,p,u),g.off("click"),l.add(g),s.setItemGraphicEl(p,g)}).remove(function(p){var v=o.getItemGraphicEl(p);vv(v,t,p)}).execute(),fme(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=s)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var s=t[0]-a.cx,o=t[1]-a.cy,l=Math.sqrt(s*s+o*o);return l<=a.r&&l>=a.r0}},e.type="pie",e}(Ct);function Hf(r,e,t){e=ie(e)&&{coordDimensions:e}||J({encodeDefine:r.getEncode()},e);var i=r.getSource(),n=sg(i,e).dimensions,a=new wi(n,r);return a.initData(i,t),a}var dg=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},r}(),vme=ot(),gme=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new dg(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Hf(this,{coordDimensions:["value"],encodeDefaulter:Ue(SD,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),n=vme(i),a=n.seats;if(!a){var s=[];i.each(i.mapDimension("value"),function(l){s.push(l)}),a=n.seats=lue(s,i.hostModel.get("percentPrecision"))}var o=r.prototype.getDataParams.call(this,t);return o.percent=a[t]||0,o.$vars.push("percent"),o},e.prototype._defaultLabelLine=function(t){Ju(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ot);function mme(r){return{seriesType:r,reset:function(e,t){var i=e.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),s=i.get(a,n);return!(ut(s)&&!isNaN(s)&&s<0)})}}}function yme(r){r.registerChartView(pme),r.registerSeriesModel(gme),c$("pie",r.registerAction),r.registerLayout(Ue(ume,"pie")),r.registerProcessor(fg("pie")),r.registerProcessor(mme("pie"))}var _me=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,i,n){return n.point(i.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ot),WW=4,bme=function(){function r(){}return r}(),Tme=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new bme},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var n=i.points,a=i.size,s=this.symbolProxy,o=s.shape,l=t.getContext?t.getContext():t,u=l&&a[0]<WW,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<n.length;){var d=n[h++],f=n[h++];isNaN(d)||isNaN(f)||c&&!c.contain(d,f)||(o.x=d-a[0]/2,o.y=f-a[1]/2,o.width=a[0],o.height=a[1],s.buildPath(t,o,!0))}this.incremental&&(this._off=h,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,i=t.points,n=t.size,a=this._ctx,s=this.softClipShape,o;if(a){for(o=this._off;o<i.length;){var l=i[o++],u=i[o++];isNaN(l)||isNaN(u)||s&&!s.contain(l,u)||a.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=o,this.notClear=!0)}},e.prototype.findDataIndex=function(t,i){for(var n=this.shape,a=n.points,s=n.size,o=Math.max(s[0],4),l=Math.max(s[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,h=a[c]-o/2,d=a[c+1]-l/2;if(t>=h&&i>=d&&t<=h+o&&i<=d+l)return u}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var s=this.hoverDataIdx=this.findDataIndex(t,i);return s>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.points,a=i.size,s=a[0],o=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,d=0;d<n.length;){var f=n[d++],p=n[d++];l=Math.min(f,l),c=Math.max(f,c),u=Math.min(p,u),h=Math.max(p,h)}t=this._rect=new qe(l-s/2,u-o/2,c-l+s,h-u+o)}return t},e}(Qe),Sme=function(){function r(){this.group=new Le}return r.prototype.updateData=function(e,t){this._clear();var i=this._create();i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(i){if(i.startIndex!=null){var n=(i.endIndex-i.startIndex)*2,a=i.startIndex*4*2;t=new Float32Array(t.buffer,a,n)}i.setShape("points",t),i.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,i){var n=this._newAdded[0],a=t.getLayout("points"),s=n&&n.shape.points;if(s&&s.length<2e4){var o=s.length,l=new Float32Array(o+a.length);l.set(s),l.set(a,o),n.endIndex=e.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,t,i)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Tme({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,i){var n=t.hostModel;i=i||{};var a=t.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=i.clipShape||null,e.symbolProxy=yr(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var s=e.shape.size[0]<WW;e.useStyle(n.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var o=t.getVisual("style"),l=o&&o.fill;l&&e.setColor(l);var u=ke(e);u.seriesIndex=n.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var h=e.hoverDataIdx;h>=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),xme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this._updateSymbolDraw(a,t);s.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),s=this._updateSymbolDraw(a,t);s.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,n){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var s=hg("").reset(t,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var n=this._symbolDraw,a=i.pipelineContext,s=a.large;return(!n||s!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=s?new Sme:new ug,this._isLargeDraw=s,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Ct),wme=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(tt),C2=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",mr).models[0]},e.type="cartesian2dAxis",e}(tt);_r(C2,og);var qW={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Cme=We({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qW),QD=We({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},qW),Ame=We({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},QD),Dme=Ce({logBase:10},QD);const jW={category:Cme,value:QD,time:Ame,log:Dme};var Eme={value:1,category:1,time:1,log:1};function df(r,e,t,i){R(Eme,function(n,a){var s=We(We({},jW[a],!0),i,!0),o=function(l){j(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var d=mv(this),f=d?Bf(c):{},p=h.getTheme();We(c,p.get(a+"Axis")),We(c,this.getDefaultOption()),c.type=RO(c),d&&il(c,f,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=y2.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=s,u}(t);r.registerComponentModel(o)}),r.registerSubTypeDefaulter(e+"Axis",RO)}function RO(r){return r.type||(r.data?"category":"value")}var Ime=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return oe(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),St(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),A2=["x","y"];function OO(r){return r.type==="interval"||r.type==="time"}var Pme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=A2,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!OO(t)||!OO(i))){var n=t.getExtent(),a=i.getExtent(),s=this.dataToPoint([n[0],a[0]]),o=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var c=(o[0]-s[0])/l,h=(o[1]-s[1])/u,d=s[0]-n[0]*c,f=s[1]-a[0]*h,p=this._transform=[c,0,0,h,d,f];this._invTransform=If([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,i){var n=this.dataToPoint(t),a=this.dataToPoint(i),s=this.getArea(),o=new qe(n[0],n[1],a[0]-n[0],a[1]-n[1]);return s.intersect(o)},e.prototype.dataToPoint=function(t,i,n){n=n||[];var a=t[0],s=t[1];if(this._transform&&a!=null&&isFinite(a)&&s!=null&&isFinite(s))return Zr(n,t,this._transform);var o=this.getAxis("x"),l=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(s,i)),n},e.prototype.clampData=function(t,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,s=n.getExtent(),o=a.getExtent(),l=n.parse(t[0]),u=a.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),i[1]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),i},e.prototype.pointToData=function(t,i){var n=[];if(this._invTransform)return Zr(n,t,this._invTransform);var a=this.getAxis("x"),s=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(t[0]),i),n[1]=s.coordToData(s.toLocalCoord(t[1]),i),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-t,s=Math.min(n[0],n[1])-t,o=Math.max(i[0],i[1])-a+t,l=Math.max(n[0],n[1])-s+t;return new qe(a,s,o,l)},e}(Ime),Mme=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,t,i,n)||this;return o.index=0,o.type=a||"value",o.position=s||"bottom",o}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(xa);function D2(r,e,t){t=t||{};var i=r.coordinateSystem,n=e.axis,a={},s=n.getAxesOnZeroOf()[0],o=n.position,l=s?"onZero":o,u=n.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=u==="x"?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(s){var v=s.toGlobalCoord(s.dataToCoord(0));p[d.onZero]=Math.max(Math.min(v,p[1]),p[0])}a.position=[u==="y"?p[d[l]]:h[0],u==="x"?p[d[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[o],a.labelOffset=s?p[d[o]]-p[d.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Gr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function NO(r){return r.get("coordinateSystem")==="cartesian2d"}function BO(r){var e={xAxisModel:null,yAxisModel:null};return R(e,function(t,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,mr).models[0];e[i]=a}),e}var dS=Math.log;function XW(r,e,t){var i=Ys.prototype,n=i.getTicks.call(t),a=i.getTicks.call(t,!0),s=n.length-1,o=i.getInterval.call(t),l=Z$(r,e),u=l.extent,c=l.fixMin,h=l.fixMax;if(r.type==="log"){var d=dS(r.base);u=[dS(u[0])/d,dS(u[1])/d]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:s,fixMin:c,fixMax:h});var f=i.getExtent.call(r);c&&(u[0]=f[0]),h&&(u[1]=f[1]);var p=i.getInterval.call(r),v=u[0],g=u[1];if(c&&h)p=(g-v)/s;else if(c)for(g=u[0]+p*s;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=QT(p),g=u[0]+p*s;else if(h)for(v=u[1]-p*s;v>u[0]&&isFinite(v)&&isFinite(u[0]);)p=QT(p),v=u[1]-p*s;else{var m=r.getTicks().length-1;m>s&&(p=QT(p));var y=p*s;g=Math.ceil(u[1]/p)*p,v=er(g-y),v<0&&u[0]>=0?(v=0,g=er(y)):g>0&&u[1]<=0&&(g=0,v=-er(y))}var _=(n[0].value-a[0].value)/o,b=(n[s].value-a[s].value)/o;i.setExtent.call(r,v+p*_,g+p*b),i.setInterval.call(r,p),(_||b)&&i.setNiceExtent.call(r,v+p,g-p)}var Lme=function(){function r(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=A2,this._initCartesian(e,t,i),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function n(s){var o,l=rt(s),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var d=+l[h],f=s[d],p=f.model,v=f.scale;_2(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(f):(hf(v,p),_2(v)&&(o=f))}c.length&&(o||(o=c.pop(),hf(o.scale,o.model)),R(c,function(g){XW(g.scale,g.model,o.scale)}))}}n(i.x),n(i.y);var a={};R(i.x,function(s){FO(i,"y",s,a)}),R(i.y,function(s){FO(i,"x",s,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,i){var n=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),s=Ar(n,{width:t.getWidth(),height:t.getHeight()});this._rect=s;var o=this._axesList;l(),a&&(R(o,function(u){if(!u.model.get(["axisLabel","inside"])){var c=fve(u);if(c){var h=u.isHorizontal()?"height":"width",d=u.model.get(["axisLabel","margin"]);s[h]-=c[h]+d,u.position==="top"?s.y+=c.height+d:u.position==="left"&&(s.x+=c.width+d)}}}),l()),R(this._coordsList,function(u){u.calcAffineTransform()});function l(){R(o,function(u){var c=u.isHorizontal(),h=c?[0,s.width]:[0,s.height],d=u.inverse?1:0;u.setExtent(h[d],h[1-d]),kme(u,c?s.x:s.y)})}},r.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}De(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===e||a[n].getAxis("y").index===t)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,i){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(e,t,i){var n=this._findConvertTarget(t);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,i=e.xAxisModel||t&&t.getReferringComponents("xAxis",mr).models[0],n=e.yAxisModel||t&&t.getReferringComponents("yAxis",mr).models[0],a=e.gridModel,s=this._coordsList,o,l;if(t)o=t.coordinateSystem,Xe(s,o)<0&&(o=null);else if(i&&n)o=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(o=this._coordsList[0])}return{cartesian:o,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,i){var n=this,a=this,s={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,R(o.x,function(c,h){R(o.y,function(d,f){var p="x"+h+"y"+f,v=new Pme(p);v.master=n,v.model=e,n._coordsMap[p]=v,n._coordsList.push(v),v.addAxis(c),v.addAxis(d)})});function u(c){return function(h,d){if(pS(h,e)){var f=h.get("position");c==="x"?f!=="top"&&f!=="bottom"&&(f=s.bottom?"top":"bottom"):f!=="left"&&f!=="right"&&(f=s.left?"right":"left"),s[f]=!0;var p=new Mme(c,E1(h),[0,0],h.get("type"),f),v=p.type==="category";p.onBand=v&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=d,a._axesList.push(p),o[c][d]=p,l[c]++}}}},r.prototype._updateScale=function(e,t){R(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var a=n.model.get("categorySortInfo");n.scale.setSortInfo(a)}}),e.eachSeries(function(n){if(NO(n)){var a=BO(n),s=a.xAxisModel,o=a.yAxisModel;if(!pS(s,t)||!pS(o,t))return;var l=this.getCartesian(s.componentIndex,o.componentIndex),u=n.getData(),c=l.getAxis("x"),h=l.getAxis("y");i(u,c),i(u,h)}},this);function i(n,a){R(q0(n,a.dim),function(s){a.scale.unionExtentFromData(n,s)})}},r.prototype.getTooltipAxes=function(e){var t=[],i=[];return R(this.getCartesians(),function(n){var a=e!=null&&e!=="auto"?n.getAxis(e):n.getBaseAxis(),s=n.getOtherAxis(a);Xe(t,a)<0&&t.push(a),Xe(i,s)<0&&i.push(s)}),{baseAxes:t,otherAxes:i}},r.create=function(e,t){var i=[];return e.eachComponent("grid",function(n,a){var s=new r(n,e,t);s.name="grid_"+a,s.resize(n,t,!0),n.coordinateSystem=s,i.push(s)}),e.eachSeries(function(n){if(NO(n)){var a=BO(n),s=a.xAxisModel,o=a.yAxisModel,l=s.getCoordSysModel(),u=l.coordinateSystem;n.coordinateSystem=u.getCartesian(s.componentIndex,o.componentIndex)}}),i},r.dimensions=A2,r}();function pS(r,e){return r.getCoordSysModel()===e}function FO(r,e,t,i){t.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[e],a,s=t.model,o=s.get(["axisLine","onZero"]),l=s.get(["axisLine","onZeroAxisIndex"]);if(!o)return;if(l!=null)UO(n[l])&&(a=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&UO(n[u])&&!i[c(n[u])]){a=n[u];break}a&&(i[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function UO(r){return r&&r.type!=="category"&&r.type!=="time"&&hve(r)}function kme(r,e){var t=r.getExtent(),i=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+e}:function(n){return i-n+e},r.toLocalCoord=r.dim==="x"?function(n){return n-e}:function(n){return i-n+e}}var Vo=Math.PI,Ci=function(){function r(e,t){this.group=new Le,this.opt=t,this.axisModel=e,Ce(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new Le({x:t.position[0],y:t.position[1],rotation:t.rotation});i.updateTransform(),this._transformGroup=i}return r.prototype.hasBuilder=function(e){return!!VO[e]},r.prototype.add=function(e){VO[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,i){var n=h9(t-e),a,s;return hv(n)?(s=i>0?"top":"bottom",a="center"):hv(n-Vo)?(s=i>0?"bottom":"top",a="center"):(s="middle",n>0&&n<Vo?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:s}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),VO={axisLine:function(r,e,t,i){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=e.axis.getExtent(),s=i.transform,o=[a[0],0],l=[a[1],0],u=o[0]>l[0];s&&(Zr(o,o,s),Zr(l,l,s));var c=J({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new kr({shape:{x1:o[0],y1:o[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});lf(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var d=e.get(["axisLine","symbol"]);if(d!=null){var f=e.get(["axisLine","symbolSize"]);pe(d)&&(d=[d,d]),(pe(f)||ut(f))&&(f=[f,f]);var p=hc(e.get(["axisLine","symbolOffset"])||0,f),v=f[0],g=f[1];R([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((o[0]-l[0])*(o[0]-l[0])+(o[1]-l[1])*(o[1]-l[1]))}],function(m,y){if(d[y]!=="none"&&d[y]!=null){var _=yr(d[y],-v/2,-g/2,v,g,c.stroke,!0),b=m.r+m.offset,S=u?l:o;_.attr({rotation:m.rotate,x:S[0]+b*Math.cos(r.rotation),y:S[1]-b*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,i){var n=Nme(t,i,e,r),a=Fme(t,i,e,r);if(Ome(e,a,n),Bme(t,i,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var s=hW(oe(a,function(o){return{label:o,priority:o.z2,defaultAttr:{ignore:o.ignore}}}));pW(s)}},axisName:function(r,e,t,i){var n=Gr(r.axisName,e.get("name"));if(n){var a=e.get("nameLocation"),s=r.nameDirection,o=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,GO(a)?r.labelOffset+s*l:0],d,f=e.get("nameRotate");f!=null&&(f=f*Vo/180);var p;GO(a)?d=Ci.innerTextLayout(r.rotation,f??r.rotation,s):(d=Rme(r.rotation,a,f||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(d.rotation)),!isFinite(p)&&(p=null)));var v=o.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,y=Gr(r.nameTruncateMaxWidth,g.maxWidth,p),_=new lt({x:h[0],y:h[1],rotation:d.rotation,silent:Ci.isLabelSilent(e),style:kt(o,{text:n,font:v,overflow:"truncate",width:y,ellipsis:m,fill:o.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:o.get("align")||d.textAlign,verticalAlign:o.get("verticalAlign")||d.textVerticalAlign}),z2:1});if(kf({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var b=Ci.makeAxisEventDataBase(e);b.targetType="axisName",b.name=n,ke(_).eventData=b}i.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function Rme(r,e,t,i){var n=h9(t-r),a,s,o=i[0]>i[1],l=e==="start"&&!o||e!=="start"&&o;return hv(n-Vo/2)?(s=l?"bottom":"top",a="center"):hv(n-Vo*1.5)?(s=l?"top":"bottom",a="center"):(s="middle",n<Vo*1.5&&n>Vo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:s}}function Ome(r,e,t){if(!Q$(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],s=e[1],o=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],h=t[t.length-1],d=t[t.length-2];i===!1?(En(a),En(u)):zO(a,s)&&(i?(En(s),En(c)):(En(a),En(u))),n===!1?(En(o),En(h)):zO(l,o)&&(n?(En(l),En(d)):(En(o),En(h)))}}function En(r){r&&(r.ignore=!0)}function zO(r,e){var t=r&&r.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var n=J_([]);return uc(n,n,-r.rotation),t.applyTransform(Rs([],n,r.getLocalTransform())),i.applyTransform(Rs([],n,e.getLocalTransform())),t.intersect(i)}}function GO(r){return r==="middle"||r==="center"}function YW(r,e,t,i,n){for(var a=[],s=[],o=[],l=0;l<r.length;l++){var u=r[l].coord;s[0]=u,s[1]=0,o[0]=u,o[1]=t,e&&(Zr(s,s,e),Zr(o,o,e));var c=new kr({shape:{x1:s[0],y1:s[1],x2:o[0],y2:o[1]},style:i,z2:2,autoBatch:!0,silent:!0});lf(c.shape,c.style.lineWidth),c.anid=n+"_"+r[l].tickValue,a.push(c)}return a}function Nme(r,e,t,i){var n=t.axis,a=t.getModel("axisTick"),s=a.get("show");if(s==="auto"&&i.handleAutoShown&&(s=i.handleAutoShown("axisTick")),!(!s||n.scale.isBlank())){for(var o=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=n.getTicksCoords(),c=YW(u,e.transform,l,Ce(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)r.add(c[h]);return c}}function Bme(r,e,t,i){var n=t.axis,a=t.getModel("minorTick");if(!(!a.get("show")||n.scale.isBlank())){var s=n.getMinorTicksCoords();if(s.length)for(var o=a.getModel("lineStyle"),l=i*a.get("length"),u=Ce(o.getLineStyle(),Ce(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<s.length;c++)for(var h=YW(s[c],e.transform,l,u,"minorticks_"+c),d=0;d<h.length;d++)r.add(h[d])}}function Fme(r,e,t,i){var n=t.axis,a=Gr(i.axisLabelShow,t.get(["axisLabel","show"]));if(!(!a||n.scale.isBlank())){var s=t.getModel("axisLabel"),o=s.get("margin"),l=n.getViewLabels(),u=(Gr(i.labelRotate,s.get("rotate"))||0)*Vo/180,c=Ci.innerTextLayout(i.rotation,u,i.labelDirection),h=t.getCategories&&t.getCategories(!0),d=[],f=Ci.isLabelSilent(t),p=t.get("triggerEvent");return R(l,function(v,g){var m=n.scale.type==="ordinal"?n.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,y=v.formattedLabel,_=v.rawLabel,b=s;if(h&&h[m]){var S=h[m];De(S)&&S.textStyle&&(b=new yt(S.textStyle,s,t.ecModel))}var x=b.getTextColor()||t.get(["axisLine","lineStyle","color"]),C=n.dataToCoord(m),D=b.getShallow("align",!0)||c.textAlign,I=Be(b.getShallow("alignMinLabel",!0),D),M=Be(b.getShallow("alignMaxLabel",!0),D),L=b.getShallow("verticalAlign",!0)||b.getShallow("baseline",!0)||c.textVerticalAlign,N=Be(b.getShallow("verticalAlignMinLabel",!0),L),O=Be(b.getShallow("verticalAlignMaxLabel",!0),L),B=new lt({x:C,y:i.labelOffset+i.labelDirection*o,rotation:c.rotation,silent:f,z2:10+(v.level||0),style:kt(b,{text:y,align:g===0?I:g===l.length-1?M:D,verticalAlign:g===0?N:g===l.length-1?O:L,fill:we(x)?x(n.type==="category"?_:n.type==="value"?m+"":m,g):x})});if(B.anid="label_"+m,p){var F=Ci.makeAxisEventDataBase(t);F.targetType="axisLabel",F.value=_,F.tickIndex=g,n.type==="category"&&(F.dataIndex=m),ke(B).eventData=F}e.add(B),B.updateTransform(),d.push(B),r.add(B),B.decomposeTransform()}),d}}function Ume(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Vme(t,r,e),t.seriesInvolved&&Gme(t,r),t}function Vme(r,e,t){var i=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),a=n.get("link",!0)||[],s=[];R(t.getCoordinateSystems(),function(o){if(!o.axisPointerEnabled)return;var l=Av(o.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=o;var c=o.model,h=c.getModel("tooltip",i);if(R(o.getAxes(),Ue(v,!1,null)),o.getTooltipAxes&&i&&h.get("show")){var d=h.get("trigger")==="axis",f=h.get(["axisPointer","type"])==="cross",p=o.getTooltipAxes(h.get(["axisPointer","axis"]));(d||f)&&R(p.baseAxes,Ue(v,f?"cross":!0,d)),f&&R(p.otherAxes,Ue(v,"cross",!1))}function v(g,m,y){var _=y.model.getModel("axisPointer",n),b=_.get("show");if(!(!b||b==="auto"&&!g&&!E2(_))){m==null&&(m=_.get("triggerTooltip")),_=g?zme(y,h,n,e,g,m):_;var S=_.get("snap"),x=_.get("triggerEmphasis"),C=Av(y.model),D=m||S||y.type==="category",I=r.axesInfo[C]={key:C,axis:y,coordSys:o,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:x,involveSeries:D,snap:S,useHandle:E2(_),seriesModels:[],linkGroup:null};u[C]=I,r.seriesInvolved=r.seriesInvolved||D;var M=Hme(a,y);if(M!=null){var L=s[M]||(s[M]={axesInfo:{}});L.axesInfo[C]=I,L.mapper=a[M].mapper,I.linkGroup=L}}}})}function zme(r,e,t,i,n,a){var s=e.getModel("axisPointer"),o=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(o,function(d){l[d]=Ee(s.get(d))}),l.snap=r.type!=="category"&&!!a,s.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=s.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=s.get("crossStyle");h&&Ce(u,h.textStyle)}}return r.model.getModel("axisPointer",new yt(l,t,i))}function Gme(r,e){e.eachSeries(function(t){var i=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),a=t.get(["tooltip","show"],!0);!i||n==="none"||n===!1||n==="item"||a===!1||t.get(["axisPointer","show"],!0)===!1||R(r.coordSysAxesInfo[Av(i.model)],function(s){var o=s.axis;i.getAxis(o.dim)===o&&(s.seriesModels.push(t),s.seriesDataCount==null&&(s.seriesDataCount=0),s.seriesDataCount+=t.getData().count())})})}function Hme(r,e){for(var t=e.model,i=e.dim,n=0;n<r.length;n++){var a=r[n]||{};if(vS(a[i+"AxisId"],t.id)||vS(a[i+"AxisIndex"],t.componentIndex)||vS(a[i+"AxisName"],t.name))return n}}function vS(r,e){return r==="all"||ie(r)&&Xe(r,e)>=0||r===e}function $me(r){var e=JD(r);if(e){var t=e.axisPointerModel,i=e.axis.scale,n=t.option,a=t.get("status"),s=t.get("value");s!=null&&(s=i.parse(s));var o=E2(t);a==null&&(n.status=o?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(s==null||s>l[1])&&(s=l[1]),s<l[0]&&(s=l[0]),n.value=s,o&&(n.status=e.axis.scale.isBlank()?"hide":"show")}}function JD(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Av(r)]}function Wme(r){var e=JD(r);return e&&e.axisPointerModel}function E2(r){return!!r.get(["handle","show"])}function Av(r){return r.type+"||"+r.id}var HO={},pc=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){this.axisPointerClass&&$me(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},e.prototype.updateAxisPointer=function(t,i,n,a){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,i){var n=this._axisPointer;n&&n.remove(i)},e.prototype.dispose=function(t,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,i,n){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var s=Wme(t);s?(this._axisPointer||(this._axisPointer=new a)).render(t,s,i,n):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,i){HO[t]=i},e.getAxisPointerClass=function(t){return t&&HO[t]},e.type="axis",e}($t),I2=ot();function KW(r,e,t,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitArea"),s=a.getModel("areaStyle"),o=s.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=o.length,h=I2(r).splitAreaColors,d=be(),f=0;if(h)for(var p=0;p<u.length;p++){var v=h.get(u[p].tickValue);if(v!=null){f=(v+(c-1)*p)%c;break}}var g=n.toGlobalCoord(u[0].coord),m=s.getAreaStyle();o=ie(o)?o:[o];for(var p=1;p<u.length;p++){var y=n.toGlobalCoord(u[p].coord),_=void 0,b=void 0,S=void 0,x=void 0;n.isHorizontal()?(_=g,b=l.y,S=y-_,x=l.height,g=_+S):(_=l.x,b=g,S=l.width,x=y-b,g=b+x);var C=u[p-1].tickValue;C!=null&&d.set(C,f),e.add(new st({anid:C!=null?"area_"+C:null,shape:{x:_,y:b,width:S,height:x},style:Ce({fill:o[f]},m),autoBatch:!0,silent:!0})),f=(f+1)%c}I2(r).splitAreaColors=d}}}function ZW(r){I2(r).splitAreaColors=null}var qme=["axisLine","axisTickLabel","axisName"],jme=["splitArea","splitLine","minorSplitLine"],QW=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,i,n,a){this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new Le,this.group.add(this._axisGroup),!!t.get("show")){var o=t.getCoordSysModel(),l=D2(o,t),u=new Ci(t,J({handleAutoShown:function(h){for(var d=o.coordinateSystem.getCartesians(),f=0;f<d.length;f++)if(_2(d[f].getOtherAxis(t.axis).scale))return!0;return!1}},l));R(qme,u.add,u),this._axisGroup.add(u.getGroup()),R(jme,function(h){t.get([h,"show"])&&Xme[h](this,this._axisGroup,t,o)},this);var c=a&&a.type==="changeAxisOrder"&&a.isInitSort;c||rg(s,this._axisGroup,t),r.prototype.render.call(this,t,i,n,a)}},e.prototype.remove=function(){ZW(this)},e.type="cartesianAxis",e}(pc),Xme={splitLine:function(r,e,t,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitLine"),s=a.getModel("lineStyle"),o=s.get("color");o=ie(o)?o:[o];for(var l=i.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,h=n.getTicksCoords({tickModel:a}),d=[],f=[],p=s.getLineStyle(),v=0;v<h.length;v++){var g=n.toGlobalCoord(h[v].coord);u?(d[0]=g,d[1]=l.y,f[0]=g,f[1]=l.y+l.height):(d[0]=l.x,d[1]=g,f[0]=l.x+l.width,f[1]=g);var m=c++%o.length,y=h[v].tickValue,_=new kr({anid:y!=null?"line_"+h[v].tickValue:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},style:Ce({stroke:o[m]},p),silent:!0});lf(_.shape,p.lineWidth),e.add(_)}}},minorSplitLine:function(r,e,t,i){var n=t.axis,a=t.getModel("minorSplitLine"),s=a.getModel("lineStyle"),o=i.coordinateSystem.getRect(),l=n.isHorizontal(),u=n.getMinorTicksCoords();if(u.length)for(var c=[],h=[],d=s.getLineStyle(),f=0;f<u.length;f++)for(var p=0;p<u[f].length;p++){var v=n.toGlobalCoord(u[f][p].coord);l?(c[0]=v,c[1]=o.y,h[0]=v,h[1]=o.y+o.height):(c[0]=o.x,c[1]=v,h[0]=o.x+o.width,h[1]=v);var g=new kr({anid:"minor_line_"+u[f][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:d,silent:!0});lf(g.shape,d.lineWidth),e.add(g)}},splitArea:function(r,e,t,i){KW(r,e,t,i)}},JW=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(QW),Yme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=JW.type,t}return e.type="yAxis",e}(QW),Kme=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,i){this.group.removeAll(),t.get("show")&&this.group.add(new st({shape:t.coordinateSystem.getRect(),style:Ce({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}($t),$O={offset:0};function eq(r){r.registerComponentView(Kme),r.registerComponentModel(wme),r.registerCoordinateSystem("cartesian2d",Lme),df(r,"x",C2,$O),df(r,"y",C2,$O),r.registerComponentView(JW),r.registerComponentView(Yme),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function Zme(r){Ze(eq),r.registerSeriesModel(_me),r.registerChartView(xme),r.registerLayout(hg("scatter"))}function Qme(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),i=[],n=e.coordinateSystem;if(n){var a=n.getIndicatorAxes();R(a,function(s,o){t.each(t.mapDimension(a[o].dim),function(l,u){i[u]=i[u]||[];var c=n.dataToPoint(l,o);i[u][o]=WO(c)?c:qO(n)})}),t.each(function(s){var o=Uoe(i[s],function(l){return WO(l)})||qO(n);i[s].push(o.slice()),t.setItemLayout(s,i[s])})}})}function WO(r){return!isNaN(r[0])&&!isNaN(r[1])}function qO(r){return[r.cx,r.cy]}function Jme(r){var e=r.polar;if(e){ie(e)||(e=[e]);var t=[];R(e,function(i,n){i.indicator?(i.type&&!i.shape&&(i.shape=i.type),r.radar=r.radar||[],ie(r.radar)||(r.radar=[r.radar]),r.radar.push(i)):t.push(i)}),r.polar=t}R(r.series,function(i){i&&i.type==="radar"&&i.polarIndex&&(i.radarIndex=i.polarIndex)})}var eye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.coordinateSystem,s=this.group,o=t.getData(),l=this._data;function u(d,f){var p=d.getItemVisual(f,"symbol")||"circle";if(p!=="none"){var v=zf(d.getItemVisual(f,"symbolSize")),g=yr(p,-1,-1,2,2),m=d.getItemVisual(f,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(d,f,p,v,g,m){p.removeAll();for(var y=0;y<f.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,d[y]?(_.setPosition(d[y]),cc[m?"initProps":"updateProps"](_,{x:f[y][0],y:f[y][1]},t,g)):_.setPosition(f[y]),p.add(_))}}function h(d){return oe(d,function(f){return[a.cx,a.cy]})}o.diff(l).add(function(d){var f=o.getItemLayout(d);if(f){var p=new Ii,v=new Pi,g={shape:{points:f}};p.shape.points=h(f),v.shape.points=h(f),Vt(p,g,t,d),Vt(v,g,t,d);var m=new Le,y=new Le;m.add(v),m.add(p),m.add(y),c(v.shape.points,f,y,o,d,!0),o.setItemGraphicEl(d,m)}}).update(function(d,f){var p=l.getItemGraphicEl(f),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:o.getItemLayout(d)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,o,d,!1),_a(g),_a(v),ct(v,y,t),ct(g,y,t),o.setItemGraphicEl(d,p))}).remove(function(d){s.remove(l.getItemGraphicEl(d))}).execute(),o.eachItemGraphicEl(function(d,f){var p=o.getItemModel(f),v=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y=o.getItemVisual(f,"style"),_=y.fill;s.add(d),v.useStyle(Ce(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Qr(v,p,"lineStyle"),Qr(g,p,"areaStyle");var b=p.getModel("areaStyle"),S=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=S,R(["emphasis","select","blur"],function(D){var I=p.getModel([D,"areaStyle"]),M=I.isEmpty()&&I.parentModel.isEmpty();g.ensureState(D).ignore=M&&S}),g.useStyle(Ce(b.getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var x=p.getModel("emphasis"),C=x.getModel("itemStyle").getItemStyle();m.eachChild(function(D){if(D instanceof Wr){var I=D.style;D.useStyle(J({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},y))}else D.useStyle(y),D.setColor(_),D.style.strokeNoScale=!0;var M=D.ensureState("emphasis");M.style=Ee(C);var L=o.getStore().get(o.getDimensionIndex(D.__dimIdx),f);(L==null||isNaN(L))&&(L=""),Jr(D,Nr(p),{labelFetcher:o.hostModel,labelDataIndex:f,labelDimIndex:D.__dimIdx,defaultText:L,inheritColor:_,defaultOpacity:y.opacity})}),Yt(d,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=o},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(Ct),tye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new dg(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.getInitialData=function(t,i){return Hf(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=this.coordinateSystem,o=s.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=QH(this,t);return Br("section",{header:u,sortBlocks:!0,blocks:oe(o,function(h){var d=a.get(a.mapDimension(h.dim),t);return Br("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var i=this.getData(),n=this.coordinateSystem,a=i.getValues(oe(n.dimensions,function(u){return i.mapDimension(u)}),t),s=0,o=a.length;s<o;s++)if(!isNaN(a[s])){var l=n.getIndicatorAxes();return n.coordToPoint(l[s].dataToCoord(a[s]),s)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(Ot),Ld=jW.value;function Um(r,e){return Ce({show:e},r)}var rye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),i=this.get("splitNumber"),n=this.get("scale"),a=this.get("axisLine"),s=this.get("axisTick"),o=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),d=this.get("triggerEvent"),f=oe(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=Ce({color:p.color},l));var g=We(Ee(p),{boundaryGap:t,splitNumber:i,scale:n,axisLine:a,axisTick:s,axisLabel:o,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:v,triggerEvent:d},!1);if(pe(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else we(c)&&(g.name=c(g.name,g));var y=new yt(g,null,this.ecModel);return _r(y,og.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:We({lineStyle:{color:"#bbb"}},Ld.axisLine),axisLabel:Um(Ld.axisLabel,!1),axisTick:Um(Ld.axisTick,!1),splitLine:Um(Ld.splitLine,!0),splitArea:Um(Ld.splitArea,!0),indicator:[]},e}(tt),iye=["axisLine","axisTickLabel","axisName"],nye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes(),a=oe(n,function(s){var o=s.model.get("showName")?s.name:"",l=new Ci(s.model,{axisName:o,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});R(a,function(s){R(iye,s.add,s),this.group.add(s.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=t.get("shape"),s=t.getModel("splitLine"),o=t.getModel("splitArea"),l=s.getModel("lineStyle"),u=o.getModel("areaStyle"),c=s.get("show"),h=o.get("show"),d=l.get("color"),f=u.get("color"),p=ie(d)?d:[d],v=ie(f)?f:[f],g=[],m=[];function y(F,U,$){var q=$%U.length;return F[q]=F[q]||[],q}if(a==="circle")for(var _=n[0].getTicksCoords(),b=i.cx,S=i.cy,x=0;x<_.length;x++){if(c){var C=y(g,p,x);g[C].push(new eo({shape:{cx:b,cy:S,r:_[x].coord}}))}if(h&&x<_.length-1){var C=y(m,v,x);m[C].push(new Jv({shape:{cx:b,cy:S,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var D,I=oe(n,function(F,U){var $=F.getTicksCoords();return D=D==null?$.length-1:Math.min($.length-1,D),oe($,function(q){return i.coordToPoint(q.coord,U)})}),M=[],x=0;x<=D;x++){for(var L=[],N=0;N<n.length;N++)L.push(I[N][x]);if(L[0]&&L.push(L[0].slice()),c){var C=y(g,p,x);g[C].push(new Pi({shape:{points:L}}))}if(h&&M){var C=y(m,v,x-1);m[C].push(new Ii({shape:{points:L.concat(M)}}))}M=L.slice().reverse()}var O=l.getLineStyle(),B=u.getAreaStyle();R(m,function(F,U){this.group.add(Un(F,{style:Ce({stroke:"none",fill:v[U%v.length]},B),silent:!0}))},this),R(g,function(F,U){this.group.add(Un(F,{style:Ce({fill:"none",stroke:p[U%p.length]},O),silent:!0}))},this)},e.type="radar",e}($t),aye=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t,i,n)||this;return a.type="value",a.angle=0,a.name="",a}return e}(xa),sye=function(){function r(e,t,i){this.dimensions=[],this._model=e,this._indicatorAxes=oe(e.getIndicatorModels(),function(n,a){var s="indicator_"+a,o=new aye(s,new Ys);return o.name=n.get("name"),o.model=n,n.axis=o,this.dimensions.push(s),o},this),this.resize(e,i)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t],n=i.angle,a=this.cx+e*Math.cos(n),s=this.cy-e*Math.sin(n);return[a,s]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=Math.sqrt(t*t+i*i);t/=n,i/=n;for(var a=Math.atan2(-i,t),s=1/0,o,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<s&&(o=c,l=u,s=h)}return[l,+(o&&o.coordToData(n))]},r.prototype.resize=function(e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight(),s=Math.min(n,a)/2;this.cx=ce(i[0],n),this.cy=ce(i[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(pe(o)||ut(o))&&(o=[0,o]),this.r0=ce(o[0],s),this.r=ce(o[1],s),R(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(e,t){var i=this._indicatorAxes,n=this._model;R(i,function(o){o.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(o,l){if(!(o.get("coordinateSystem")!=="radar"||e.getComponent("radar",o.get("radarIndex"))!==n)){var u=o.getData();R(i,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=n.get("splitNumber"),s=new Ys;s.setExtent(0,a),s.setInterval(1),R(i,function(o,l){XW(o.scale,o.model,s)})},r.prototype.convertToPixel=function(e,t,i){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,i){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var i=[];return e.eachComponent("radar",function(n){var a=new r(n,e,t);i.push(a),n.coordinateSystem=a}),e.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=i[n.get("radarIndex")||0])}),i},r.dimensions=[],r}();function oye(r){r.registerCoordinateSystem("radar",sye),r.registerComponentModel(rye),r.registerComponentView(nye),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(i){t.setItemVisual(i,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function lye(r){Ze(oye),r.registerChartView(eye),r.registerSeriesModel(tye),r.registerLayout(Qme),r.registerProcessor(fg("radar")),r.registerPreprocessor(Jme)}var jO="\0_ec_interaction_mutex";function uye(r,e,t){var i=eE(r);i[e]=t}function cye(r,e,t){var i=eE(r),n=i[e];n===t&&(i[e]=null)}function XO(r,e){return!!eE(r)[e]}function eE(r){return r[jO]||(r[jO]={})}hs({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},lr);var pg=function(r){j(e,r);function e(t){var i=r.call(this)||this;i._zr=t;var n=ge(i._mousedownHandler,i),a=ge(i._mousemoveHandler,i),s=ge(i._mouseupHandler,i),o=ge(i._mousewheelHandler,i),l=ge(i._pinchHandler,i);return i.enable=function(u,c){this.disable(),this._opt=Ce(Ee(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",n),t.on("mousemove",a),t.on("mouseup",s)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",o),t.on("pinch",l))},i.disable=function(){t.off("mousedown",n),t.off("mousemove",a),t.off("mouseup",s),t.off("mousewheel",o),t.off("pinch",l)},i}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!bL(t)){for(var i=t.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var n=t.offsetX,a=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,a)&&(this._x=n,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!Ey("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||XO(this._zr,"globalPan"))){var i=t.offsetX,n=t.offsetY,a=this._x,s=this._y,o=i-a,l=n-s;this._x=i,this._y=n,this._opt.preventDefaultMouseMove&&$s(t.event),tq(this,"pan","moveOnMouseMove",t,{dx:o,dy:l,oldX:a,oldY:s,newX:i,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){bL(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var i=Ey("zoomOnMouseWheel",t,this._opt),n=Ey("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,s=Math.abs(a),o=t.offsetX,l=t.offsetY;if(!(a===0||!i&&!n)){if(i){var u=s>3?1.4:s>1?1.2:1.1,c=a>0?u:1/u;gS(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:o,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(a),d=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);gS(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:d,originX:o,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!XO(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;gS(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Zn);function gS(r,e,t,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&($s(i.event),tq(r,e,t,i,n))}function tq(r,e,t,i,n){n.isAvailableBehavior=ge(Ey,null,t,i),r.trigger(e,n)}function Ey(r,e,t){var i=t[r];return!r||i&&(!pe(i)||e.event[i+"Key"])}function tE(r,e,t){var i=r.target;i.x+=e,i.y+=t,i.dirty()}function rE(r,e,t,i){var n=r.target,a=r.zoomLimit,s=r.zoom=r.zoom||1;if(s*=e,a){var o=a.min||0,l=a.max||1/0;s=Math.max(Math.min(l,s),o)}var u=s/r.zoom;r.zoom=s,n.x-=(t-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var hye={axisPointer:1,tooltip:1,brush:1};function P1(r,e,t){var i=e.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==t&&!hye.hasOwnProperty(i.mainType)&&n&&n.model!==t}function rq(r){if(pe(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var mS,Z0={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},YO=rt(Z0),Q0={"alignment-baseline":"textBaseline","stop-color":"stopColor"},KO=rt(Q0),fye=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var i=rq(e);this._defsUsePending=[];var n=new Le;this._root=n;var a=[],s=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),an(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;vye(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(s){var d=M1(s);d.length>=4&&(c={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(c&&o!=null&&l!=null&&(h=nq(c,{x:0,y:0,width:o,height:l}),!t.ignoreViewBox)){var f=n;n=new Le,n.add(f),f.scaleX=f.scaleY=h.scale,f.x=h.x,f.y=h.y}return!t.ignoreRootClip&&o!=null&&l!=null&&n.setClipPath(new st({shape:{x:0,y:0,width:o,height:l}})),{root:n,width:o,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},r.prototype._parseNode=function(e,t,i,n,a,s){var o=e.nodeName.toLowerCase(),l,u=n;if(o==="defs"&&(a=!0),o==="text"&&(s=!0),o==="defs"||o==="switch")l=t;else{if(!a){var c=mS[o];if(c&&_e(mS,o)){l=c.call(this,e,t);var h=e.getAttribute("name");if(h){var d={name:h,namedFrom:null,svgNodeTagLower:o,el:l};i.push(d),o==="g"&&(u=d)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:o,el:l});t.add(l)}}var f=ZO[o];if(f&&_e(ZO,o)){var p=f.call(this,e),v=e.getAttribute("id");v&&(this._defs[v]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,i,u,a,s):g.nodeType===3&&s&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var i=new of({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});In(t,i),an(e,i,this._defsUsePending,!1,!1),dye(i,t);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var s=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=s;var o=i.getBoundingRect();return this._textX+=o.width,t.add(i),i},r.internalField=function(){mS={g:function(e,t){var i=new Le;return In(t,i),an(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new st;return In(t,i),an(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,t){var i=new eo;return In(t,i),an(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new kr;return In(t,i),an(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,t){var i=new u1;return In(t,i),an(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),n;i&&(n=eN(i));var a=new Ii({shape:{points:n||[]},silent:!0});return In(t,a),an(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var i=e.getAttribute("points"),n;i&&(n=eN(i));var a=new Pi({shape:{points:n||[]},silent:!0});return In(t,a),an(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var i=new Wr;return In(t,i),an(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",s=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(s);var o=new Le;return In(t,o),an(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||"0",s=e.getAttribute("dy")||"0",o=new Le;return In(t,o),an(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(s),o},path:function(e,t){var i=e.getAttribute("d")||"",n=q9(i);return In(t,n),an(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),ZO={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),a=new tg(e,t,i,n);return QO(r,a),JO(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),n=new K9(e,t,i);return QO(r,n),JO(r,n),n}};function QO(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function JO(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};iq(t,a,a);var s=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:s})}t=t.nextSibling}}function In(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Ce(e.__inheritedStyle,r.__inheritedStyle))}function eN(r){for(var e=M1(r),t=[],i=0;i<e.length;i+=2){var n=parseFloat(e[i]),a=parseFloat(e[i+1]);t.push([n,a])}return t}function an(r,e,t,i,n){var a=e,s=a.__inheritedStyle=a.__inheritedStyle||{},o={};r.nodeType===1&&(yye(r,e),iq(r,s,o),i||_ye(r,s,o)),a.style=a.style||{},s.fill!=null&&(a.style.fill=tN(a,"fill",s.fill,t)),s.stroke!=null&&(a.style.stroke=tN(a,"stroke",s.stroke,t)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){s[l]!=null&&(a.style[l]=parseFloat(s[l]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){s[l]!=null&&(a.style[l]=s[l])}),n&&(a.__selfStyle=o),s.lineDash&&(a.style.lineDash=oe(M1(s.lineDash),function(l){return parseFloat(l)})),(s.visibility==="hidden"||s.visibility==="collapse")&&(a.invisible=!0),s.display==="none"&&(a.ignore=!0)}function dye(r,e){var t=e.__selfStyle;if(t){var i=t.textBaseline,n=i;!i||i==="auto"||i==="baseline"?n="alphabetic":i==="before-edge"||i==="text-before-edge"?n="top":i==="after-edge"||i==="text-after-edge"?n="bottom":(i==="central"||i==="mathematical")&&(n="middle"),r.style.textBaseline=n}var a=e.__inheritedStyle;if(a){var s=a.textAlign,o=s;s&&(s==="middle"&&(o="center"),r.style.textAlign=o)}}var pye=/^url\(\s*#(.*?)\)/;function tN(r,e,t,i){var n=t&&t.match(pye);if(n){var a=ha(n[1]);i.push([r,e,a]);return}return t==="none"&&(t=null),t}function vye(r,e){for(var t=0;t<e.length;t++){var i=e[t];i[0].style[i[1]]=r[i[2]]}}var gye=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function M1(r){return r.match(gye)||[]}var mye=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,yS=Math.PI/180;function yye(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var i=[],n=null;t.replace(mye,function(h,d,f){return i.push(d,f),""});for(var a=i.length-1;a>0;a-=2){var s=i[a],o=i[a-1],l=M1(s);switch(n=n||vn(),o){case"translate":ss(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":KA(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":uc(n,n,-parseFloat(l[0])*yS,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*yS);Rs(n,[1,0,u,1,0,0],n);break;case"skewY":var c=Math.tan(parseFloat(l[0])*yS);Rs(n,[1,c,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var rN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function iq(r,e,t){var i=r.getAttribute("style");if(i){rN.lastIndex=0;for(var n;(n=rN.exec(i))!=null;){var a=n[1],s=_e(Z0,a)?Z0[a]:null;s&&(e[s]=n[2]);var o=_e(Q0,a)?Q0[a]:null;o&&(t[o]=n[2])}}}function _ye(r,e,t){for(var i=0;i<YO.length;i++){var n=YO[i],a=r.getAttribute(n);a!=null&&(e[Z0[n]]=a)}for(var i=0;i<KO.length;i++){var n=KO[i],a=r.getAttribute(n);a!=null&&(t[Q0[n]]=a)}}function nq(r,e){var t=e.width/r.width,i=e.height/r.height,n=Math.min(t,i);return{scale:n,x:-(r.x+r.width/2)*n+(e.x+e.width/2),y:-(r.y+r.height/2)*n+(e.y+e.height/2)}}function bye(r,e){var t=new fye;return t.parse(r,e)}var Tye=be(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Sye=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=be(),this._freedGraphics=[],this._mapName=e,this._parsedXML=rq(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=wye(e.named),i=t.regions,n=t.regionsMap;this._regions=i,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,i;try{t=e&&bye(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=t.root,Ai(i!=null)}catch(g){throw new Error(`Invalid svg format
`+g.message)}var n=new Le;n.add(i),n.isGeoSVGGraphicRoot=!0;var a=t.width,s=t.height,o=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,d=void 0;if(a!=null?(u=0,h=a):o&&(u=o.x,h=o.width),s!=null?(c=0,d=s):o&&(c=o.y,d=o.height),u==null||c==null){var f=i.getBoundingRect();u==null&&(u=f.x,h=f.width),c==null&&(c=f.y,d=f.height)}l=this._boundingRect=new qe(u,c,h,d)}if(o){var p=nq(o,l);i.scaleX=i.scaleY=p.scale,i.x=p.x,i.y=p.y}n.setClipPath(new st({shape:l.plain()}));var v=[];return R(t.named,function(g){Tye.get(g.svgNodeTagLower)!=null&&(v.push(g),xye(g.el))}),{root:n,boundingRect:l,named:v}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,i=t.get(e);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,i),i)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,i=t.get(e);i&&(t.removeKey(e),this._freedGraphics.push(i))},r}();function xye(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function wye(r){var e=[],t=be();return R(r,function(i){if(i.namedFrom==null){var n=new yve(i.name,i.el);e.push(n),t.set(i.name,n)}}),{regions:e,regionsMap:t}}var P2=[126,25],iN="南海诸岛",eu=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Kl=0;Kl<eu.length;Kl++)for(var jc=0;jc<eu[Kl].length;jc++)eu[Kl][jc][0]/=10.5,eu[Kl][jc][1]/=-10.5/.75,eu[Kl][jc][0]+=P2[0],eu[Kl][jc][1]+=P2[1];function Cye(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===iN)return;e.push(new eW(iN,oe(eu,function(i){return{type:"polygon",exterior:i}}),P2))}}var Aye={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Dye(r,e){if(r==="china"){var t=Aye[e.name];if(t){var i=e.getCenter();i[0]+=t[0]/10.5,i[1]+=-t[1]/(10.5/.75),e.setCenter(i)}}}var Eye=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Iye(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:Eye[0]})}var Pye="name",Mye=function(){function r(e,t,i){this.type="geoJSON",this._parsedMap=be(),this._mapName=e,this._specialAreas=i,this._geoJSON=kye(t)}return r.prototype.load=function(e,t){t=t||Pye;var i=this._parsedMap.get(t);if(!i){var n=this._parseToRegions(t);i=this._parsedMap.set(t,{regions:n,boundingRect:Lye(n)})}var a=be(),s=[];return R(i.regions,function(o){var l=o.name;e&&_e(e,l)&&(o=o.cloneShallow(l=e[l])),s.push(o),a.set(l,o)}),{regions:s,boundingRect:i.boundingRect||new qe(0,0,0,0),regionsMap:a}},r.prototype._parseToRegions=function(e){var t=this._mapName,i=this._geoJSON,n;try{n=i?bve(i,e):[]}catch(a){throw new Error(`Invalid geoJson format
`+a.message)}return Cye(t,n),R(n,function(a){var s=a.name;Dye(t,a),Iye(t,a);var o=this._specialAreas&&this._specialAreas[s];o&&a.transformTo(o.left,o.top,o.width,o.height)},this),n},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function Lye(r){for(var e,t=0;t<r.length;t++){var i=r[t].getBoundingRect();e=e||i.clone(),e.union(i)}return e}function kye(r){return pe(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var kd=be();const Ks={registerMap:function(r,e,t){if(e.svg){var i=new Sye(r,e.svg);kd.set(r,i)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?t=e.specialAreas:n=e;var i=new Mye(r,n,t);kd.set(r,i)}},getGeoResource:function(r){return kd.get(r)},getMapForUser:function(r){var e=kd.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var i=kd.get(r);if(i)return i.load(e,t)}};var iE=["rect","circle","line","ellipse","polygon","polyline","path"],Rye=be(iE),Oye=be(iE.concat(["g"])),Nye=be(iE.concat(["g"])),aq=ot();function Vm(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function nN(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var sq=function(){function r(e){var t=new Le;this.uid=Of("ec_map_draw"),this._controller=new pg(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Le),t.add(this._svgGroup=new Le)}return r.prototype.draw=function(e,t,i,n,a){var s=e.mainType==="geo",o=e.getData&&e.getData();s&&t.eachComponent({mainType:"series",subType:"map"},function(m){!o&&m.getHostGeoModel()===e&&(o=m.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,h=l.getTransformInfo(),d=h.raw,f=h.roam,p=!u.childAt(0)||a;p?(c.x=f.x,c.y=f.y,c.scaleX=f.scaleX,c.scaleY=f.scaleY,c.dirty()):ct(c,f,e);var v=o&&o.getVisual("visualMeta")&&o.getVisual("visualMeta").length>0,g={api:i,geo:l,mapOrGeoModel:e,data:o,isVisualEncodedByVisualMap:v,isGeo:s,transformInfoRaw:d};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=be(),i=be(),n=this._regionsGroup,a=e.transformInfoRaw,s=e.mapOrGeoModel,o=e.data,l=e.geo.projection,u=l&&l.stream;function c(f,p){return p&&(f=p(f)),f&&[f[0]*a.scaleX+a.x,f[1]*a.scaleY+a.y]}function h(f){for(var p=[],v=!u&&l&&l.project,g=0;g<f.length;++g){var m=c(f[g],v);m&&p.push(m)}return p}function d(f){return{shape:{points:h(f)}}}n.removeAll(),R(e.geo.regions,function(f){var p=f.name,v=t.get(p),g=i.get(p)||{},m=g.dataIdx,y=g.regionModel;v||(v=t.set(p,new Le),n.add(v),m=o?o.indexOfName(p):null,y=e.isGeo?s.getRegionModel(p):o?o.getItemModel(m):null,i.set(p,{dataIdx:m,regionModel:y}));var _=[],b=[];R(f.geometries,function(C){if(C.type==="polygon"){var D=[C.exterior].concat(C.interiors||[]);u&&(D=cN(D,u)),R(D,function(M){_.push(new Ii(d(M)))})}else{var I=C.points;u&&(I=cN(I,u,!0)),R(I,function(M){b.push(new Pi(d(M)))})}});var S=c(f.getCenter(),l&&l.project);function x(C,D){if(C.length){var I=new fD({culling:!0,segmentIgnoreThreshold:1,shape:{paths:C}});v.add(I),aN(e,I,m,y),sN(e,I,p,y,s,m,S),D&&(nN(I),R(I.states,nN))}}x(_),x(b,!0)}),t.each(function(f,p){var v=i.get(p),g=v.dataIdx,m=v.regionModel;oN(e,f,p,m,s,g),lN(e,f,p,m,s),uN(e,f,p,m,s)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,i=e.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var n=this._svgDispatcherMap=be(),a=!1;R(this._svgGraphicRecord.named,function(s){var o=s.name,l=e.mapOrGeoModel,u=e.data,c=s.svgNodeTagLower,h=s.el,d=u?u.indexOfName(o):null,f=l.getRegionModel(o);if(Rye.get(c)!=null&&h instanceof Yn&&aN(e,h,d,f),h instanceof Yn&&(h.culling=!0),h.z2EmphasisLift=0,!s.namedFrom&&(Nye.get(c)!=null&&sN(e,h,o,f,l,d,null),oN(e,h,o,f,l,d),lN(e,h,o,f,l),Oye.get(c)!=null)){var p=uN(e,h,o,f,l);p==="self"&&(a=!0);var v=n.get(o)||n.set(o,[]);v.push(h)}},this),this._enableBlurEntireSVG(a,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var i=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=i.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){rc(a);var s=a.ensureState("blur").style||{};s.opacity==null&&n!=null&&(s.opacity=n),a.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var i=t.coordinateSystem;if(i.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var a=n.get(e);return a?[a]:[]}}else if(i.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=Ks.getGeoResource(e);if(t&&t.type==="geoSVG"){var i=t.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Ks.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,i){var n=e.coordinateSystem,a=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=n.getZoom(),a.enable(e.get("roam")||!1);var o=e.mainType;function l(){var u={type:"geoRoam",componentType:o};return u[o+"Id"]=e.id,u}a.off("pan").on("pan",function(u){this._mouseDownFlag=!1,tE(s,u.dx,u.dy),i.dispatchAction(J(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,rE(s,u.scale,u.originX,u.originY),i.dispatchAction(J(l(),{totalZoom:s.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,c,h){return n.containPoint([c,h])&&!P1(u,i,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=aq(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,i,n){var a=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){a._mouseDownFlag=!0}),t.on("click",function(s){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},r}();function aN(r,e,t,i){var n=i.getModel("itemStyle"),a=i.getModel(["emphasis","itemStyle"]),s=i.getModel(["blur","itemStyle"]),o=i.getModel(["select","itemStyle"]),l=Vm(n),u=Vm(a),c=Vm(o),h=Vm(s),d=r.data;if(d){var f=d.getItemVisual(t,"style"),p=d.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=cf(p,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=h,rc(e)}function sN(r,e,t,i,n,a,s){var o=r.data,l=r.isGeo,u=o&&isNaN(o.get(o.mapDimension("value"),a)),c=o&&o.getItemLayout(a);if(l||u||c&&c.showLabel){var h=l?t:a,d=void 0;(!o||a>=0)&&(d=n);var f=s?{normal:{align:"center",verticalAlign:"middle"}}:null;Jr(e,Nr(i),{labelFetcher:d,labelDataIndex:h,defaultText:t},f);var p=e.getTextContent();if(p&&(aq(p).ignore=p.ignore,e.textConfig&&s)){var v=e.getBoundingRect().clone();e.textConfig.layoutRect=v,e.textConfig.position=[(s[0]-v.x)/v.width*100+"%",(s[1]-v.y)/v.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function oN(r,e,t,i,n,a){r.data?r.data.setItemGraphicEl(a,e):ke(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:i&&i.option||{}}}function lN(r,e,t,i,n){r.data||kf({el:e,componentModel:n,itemName:t,itemTooltipOption:i.get("tooltip")})}function uN(r,e,t,i,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),s=a.get("focus");return Yt(e,s,a.get("blurScope"),a.get("disabled")),r.isGeo&&Oce(e,n,t),s}function cN(r,e,t){var i=[],n;function a(){n=[]}function s(){n.length&&(i.push(n),n=[])}var o=e({polygonStart:a,polygonEnd:s,lineStart:a,lineEnd:s,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&o.polygonStart(),R(r,function(l){o.lineStart();for(var u=0;u<l.length;u++)o.point(l[u][0],l[u][1]);o.lineEnd()}),!t&&o.polygonEnd(),i}var Bye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var s=this.group;if(s.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var o=this._mapDraw;o&&s.add(o.group)}else if(t.needsDrawMap){var o=this._mapDraw||new sq(n);s.add(o.group),o.draw(t,i,n,this,a),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&i.getComponent("legend")&&this._renderSymbols(t,i,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,i,n){var a=t.originalData,s=this.group;a.each(a.mapDimension("value"),function(o,l){if(!isNaN(o)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,d=new eo({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:Mf+1)});if(!h){var f=t.mainSeries.getData(),p=a.getName(l),v=f.indexOfName(p),g=a.getItemModel(l),m=g.getModel("label"),y=f.getItemGraphicEl(v);Jr(d,Nr(g),{labelFetcher:{getFormattedLabel:function(_,b){return t.getFormattedLabel(v,b)}},defaultText:p}),d.disableLabelAnimation=!0,m.get("position")||d.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){M0(d,_)}}s.add(d)}}})},e.type="map",e}(Ct),Fye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(i){if(i!=null){var n=this.getData().getName(i),a=this.coordinateSystem,s=a.getRegion(n);return s&&a.dataToPoint(s.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var i=Hf(this,{coordDimensions:["value"],encodeDefaulter:Ue(SD,this)}),n=be(),a=[],s=0,o=i.count();s<o;s++){var l=i.getName(s);n.set(l,!0)}var u=Ks.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return R(u.regions,function(c){var h=c.name;n.get(h)||a.push(h)}),i.appendValues([],a),i},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var i=this.getData();return i.get(i.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var i=this.getData();return i.getItemModel(i.indexOfName(t))},e.prototype.formatTooltip=function(t,i,n){for(var a=this.getData(),s=this.getRawValue(t),o=a.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(o),d=a.mapDimension("value");isNaN(l[c].originalData.get(d,h))||u.push(l[c].name)}return Br("section",{header:u.join(", "),noHeader:!u.length,blocks:[Br("nameValue",{name:o,value:s})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var i=t.icon||"roundRect",n=yr(i,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",i.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ot);function Uye(r,e){var t={};return R(r,function(i){i.each(i.mapDimension("value"),function(n,a){var s="ec-"+i.getName(a);t[s]=t[s]||[],isNaN(n)||t[s].push(n)})}),r[0].map(r[0].mapDimension("value"),function(i,n){for(var a="ec-"+r[0].getName(n),s=0,o=1/0,l=-1/0,u=t[a].length,c=0;c<u;c++)o=Math.min(o,t[a][c]),l=Math.max(l,t[a][c]),s+=t[a][c];var h;return e==="min"?h=o:e==="max"?h=l:e==="average"?h=s/u:h=s,u===0?NaN:h})}function Vye(r){var e={};r.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),R(e,function(t,i){for(var n=Uye(oe(t,function(s){return s.getData()}),t[0].get("mapValueCalculation")),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(var a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=a===0&&!t[a].getHostGeoModel(),t[a].setData(n.cloneShallow()),t[a].mainSeries=t[0]})}function zye(r){var e={};r.eachSeriesByType("map",function(t){var i=t.getMapType();if(!(t.getHostGeoModel()||e[i])){var n={};R(t.seriesGroup,function(s){var o=s.coordinateSystem,l=s.originalData;s.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),d=o.getRegion(h);if(!(!d||isNaN(u))){var f=n[h]||0,p=o.dataToPoint(d.getCenter());n[h]=f+1,l.setItemLayout(c,{point:p,offset:f})}})});var a=t.getData();a.each(function(s){var o=a.getName(s),l=a.getItemLayout(s)||{};l.showLabel=!n[o],a.setItemLayout(s,l)}),e[i]=!0}})}var hN=Zr,vg=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Is,i._rawTransformable=new Is,i.name=t,i}return e.prototype.setBoundingRect=function(t,i,n,a){return this._rect=new qe(t,i,n,a),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,i,n,a){this._transformTo(t,i,n,a),this._viewRect=new qe(t,i,n,a)},e.prototype._transformTo=function(t,i,n,a){var s=this.getBoundingRect(),o=this._rawTransformable;o.transform=s.calculateTransform(new qe(t,i,n,a));var l=o.parent;o.parent=null,o.decomposeTransform(),o.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,i){t&&(this._center=[ce(t[0],i.getWidth()),ce(t[1],i.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var i=this.zoomLimit;i&&(i.max!=null&&(t=Math.min(i.max,t)),i.min!=null&&(t=Math.max(i.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),i=t.x+t.width/2,n=t.y+t.height/2;return[i,n]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,n=this.getDefaultCenter(),a=this.getCenter(),s=this.getZoom();a=Zr([],a,t),n=Zr([],n,t),i.originX=a[0],i.originY=a[1],i.x=n[0]-a[0],i.y=n[1]-a[1],i.scaleX=i.scaleY=s,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,i=this._rawTransformable;i.parent=t,t.updateTransform(),i.updateTransform(),YA(this.transform||(this.transform=[]),i.transform||vn()),this._rawTransform=i.getLocalTransform(),this.invTransform=this.invTransform||[],If(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,i=this._roamTransformable,n=new Is;return n.transform=i.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,i,n){var a=i?this._rawTransform:this.transform;return n=n||[],a?hN(n,t,a):gi(n,t)},e.prototype.pointToData=function(t){var i=this.invTransform;return i?hN([],t,i):[t[0],t[1]]},e.prototype.convertToPixel=function(t,i,n){var a=fN(i);return a===this?a.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,i,n){var a=fN(i);return a===this?a.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Is);function fN(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Gye={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},oq=["lng","lat"],M2=function(r){j(e,r);function e(t,i,n){var a=r.call(this,t)||this;a.dimensions=oq,a.type="geo",a._nameCoordMap=be(),a.map=i;var s=n.projection,o=Ks.load(i,n.nameMap,n.nameProperty),l=Ks.getGeoResource(i);a.resourceType=l?l.type:null;var u=a.regions=o.regions,c=Gye[l.type];a._regionsMap=o.regionsMap,a.regions=o.regions,a.projection=s;var h;if(s)for(var d=0;d<u.length;d++){var f=u[d].getBoundingRect(s);h=h||f.clone(),h.union(f)}else h=o.boundingRect;return a.setBoundingRect(h.x,h.y,h.width,h.height),a.aspectScale=s?1:Be(n.aspectScale,c.aspectScale),a._invertLongitute=s?!1:c.invertLongitute,a}return e.prototype._transformTo=function(t,i,n,a){var s=this.getBoundingRect(),o=this._invertLongitute;s=s.clone(),o&&(s.y=-s.y-s.height);var l=this._rawTransformable;l.transform=s.calculateTransform(new qe(t,i,n,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,o&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var i=this.regions,n=0;n<i.length;n++){var a=i[n];if(a.type==="geoJSON"&&a.contain(t))return i[n]}},e.prototype.addGeoCoord=function(t,i){this._nameCoordMap.set(t,i)},e.prototype.getGeoCoord=function(t){var i=this._regionsMap.get(t);return this._nameCoordMap.get(t)||i&&i.getCenter()},e.prototype.dataToPoint=function(t,i,n){if(pe(t)&&(t=this.getGeoCoord(t)),t){var a=this.projection;return a&&(t=a.project(t)),t&&this.projectedToPoint(t,i,n)}},e.prototype.pointToData=function(t){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,i,n){return r.prototype.dataToPoint.call(this,t,i,n)},e.prototype.convertToPixel=function(t,i,n){var a=dN(i);return a===this?a.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,i,n){var a=dN(i);return a===this?a.pointToData(n):null},e}(vg);_r(M2,vg);function dN(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",mr).models[0]||{}).coordinateSystem:null}function pN(r,e){var t=r.get("boundingCoords");if(t!=null){var i=t[0],n=t[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])){var a=this.projection;if(a){var s=i[0],o=i[1],l=n[0],u=n[1];i=[1/0,1/0],n=[-1/0,-1/0];var c=function(x,C,D,I){for(var M=D-x,L=I-C,N=0;N<=100;N++){var O=N/100,B=a.project([x+M*O,C+L*O]);Oo(i,i,B),No(n,n,B)}};c(s,o,l,o),c(l,o,l,u),c(l,u,s,u),c(s,u,l,o)}this.setBoundingRect(i[0],i[1],n[0]-i[0],n[1]-i[1])}}var h=this.getBoundingRect(),d=r.get("layoutCenter"),f=r.get("layoutSize"),p=e.getWidth(),v=e.getHeight(),g=h.width/h.height*this.aspectScale,m=!1,y,_;d&&f&&(y=[ce(d[0],p),ce(d[1],v)],_=ce(f,Math.min(p,v)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)&&(m=!0));var b;if(m)b={},g>1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=y[1]-b.height/2,b.x=y[0]-b.width/2;else{var S=r.getBoxLayoutParams();S.aspect=g,b=Ar(S,{width:p,height:v})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function Hye(r,e){R(e.get("geoCoord"),function(t,i){r.addGeoCoord(i,t)})}var $ye=function(){function r(){this.dimensions=oq}return r.prototype.create=function(e,t){var i=[];function n(s){return{nameProperty:s.get("nameProperty"),aspectScale:s.get("aspectScale"),projection:s.get("projection")}}e.eachComponent("geo",function(s,o){var l=s.get("map"),u=new M2(l+o,l,J({nameMap:s.get("nameMap")},n(s)));u.zoomLimit=s.get("scaleLimit"),i.push(u),s.coordinateSystem=u,u.model=s,u.resize=pN,u.resize(s,t)}),e.eachSeries(function(s){var o=s.get("coordinateSystem");if(o==="geo"){var l=s.get("geoIndex")||0;s.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(s){if(!s.getHostGeoModel()){var o=s.getMapType();a[o]=a[o]||[],a[o].push(s)}}),R(a,function(s,o){var l=oe(s,function(c){return c.get("nameMap")}),u=new M2(o,o,J({nameMap:WA(l)},n(s[0])));u.zoomLimit=Gr.apply(null,oe(s,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=pN,u.resize(s[0],t),R(s,function(c){c.coordinateSystem=u,Hye(u,c)})}),i},r.prototype.getFilledRegions=function(e,t,i,n){for(var a=(e||[]).slice(),s=be(),o=0;o<a.length;o++)s.set(a[o].name,a[o]);var l=Ks.load(t,i,n);return R(l.regions,function(u){var c=u.name;!s.get(c)&&a.push({name:c})}),a},r}(),lq=new $ye,Wye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,n){var a=Ks.getGeoResource(t.map);if(a&&a.type==="geoJSON"){var s=t.itemStyle=t.itemStyle||{};"color"in s||(s.color="#eee")}this.mergeDefaultAndTheme(t,n),Ju(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,i=this.option;i.regions=lq.getFilledRegions(i.regions,i.map,i.nameMap,i.nameProperty);var n={};this._optionModelMap=as(i.regions||[],function(a,s){var o=s.name;return o&&(a.set(o,new yt(s,t,t.ecModel)),s.selected&&(n[o]=!0)),a},be()),i.selectedMap||(i.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new yt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,i){var n=this.getRegionModel(t),a=i==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),s={name:t};if(we(a))return s.status=i,a(s);if(pe(a))return a.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var i=this.option,n=i.selectedMode;if(n){n!=="multiple"&&(i.selectedMap=null);var a=i.selectedMap||(i.selectedMap={});a[t]=!0}},e.prototype.unSelect=function(t){var i=this.option.selectedMap;i&&(i[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var i=this.option.selectedMap;return!!(i&&i[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(tt);function vN(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function nE(r,e,t,i){var n=r.getZoom(),a=r.getCenter(),s=e.zoom,o=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);if(e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter(vN(r,o),i)),s!=null){if(t){var l=t.min||0,u=t.max||1/0;s=Math.max(Math.min(n*s,u),l)/n}r.scaleX*=s,r.scaleY*=s;var c=(e.originX-r.x)*(s-1),h=(e.originY-r.y)*(s-1);r.x-=c,r.y-=h,r.updateTransform(),r.setCenter(vN(r,o),i),r.setZoom(s*n)}return{center:r.getCenter(),zoom:r.getZoom()}}var qye=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,i){this._api=i},e.prototype.render=function(t,i,n,a){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new sq(n));var s=this._mapDraw;s.draw(t,i,n,this,a),s.group.on("click",this._handleRegionClick,this),s.group.silent=t.get("silent"),this.group.add(s.group),this.updateSelectStatus(t,i,n)},e.prototype._handleRegionClick=function(t){var i;bu(t.target,function(n){return(i=ke(n).eventData)!=null},!0),i&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:i.name})},e.prototype.updateSelectStatus=function(t,i,n){var a=this;this._mapDraw.group.traverse(function(s){var o=ke(s).eventData;if(o)return a._model.isSelected(o.name)?n.enterSelect(s):n.leaveSelect(s),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}($t);function jye(r,e,t){Ks.registerMap(r,e,t)}function uq(r){r.registerCoordinateSystem("geo",lq),r.registerComponentModel(Wye),r.registerComponentView(qye),r.registerImpl("registerMap",jye),r.registerImpl("getMap",function(t){return Ks.getMapForUser(t)});function e(t,i){i.update="geo:updateSelectStatus",r.registerAction(i,function(n,a){var s={},o=[];return a.eachComponent({mainType:"geo",query:n},function(l){l[t](n.name);var u=l.coordinateSystem;R(u.regions,function(h){s[h.name]=l.isSelected(h.name)||!1});var c=[];R(s,function(h,d){s[d]&&c.push(d)}),o.push({geoIndex:l.componentIndex,name:c})}),{selected:s,allSelected:o,name:n.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,i,n){var a=t.componentType||"series";i.eachComponent({mainType:a,query:t},function(s){var o=s.coordinateSystem;if(o.type==="geo"){var l=nE(o,t,s.get("scaleLimit"),n);s.setCenter&&s.setCenter(l.center),s.setZoom&&s.setZoom(l.zoom),a==="series"&&R(s.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Xye(r){Ze(uq),r.registerChartView(Bye),r.registerSeriesModel(Fye),r.registerLayout(zye),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Vye),c$("map",r.registerAction)}function Yye(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],i,n;i=t.pop();)if(n=i.children,i.isExpand&&n.length)for(var a=n.length,s=a-1;s>=0;s--){var o=n[s];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:s,thread:null},t.push(o)}}function Kye(r,e){var t=r.isExpand?r.children:[],i=r.parentNode.children,n=r.hierNode.i?i[r.hierNode.i-1]:null;if(t.length){Jye(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=e0e(r,n,r.parentNode.hierNode.defaultAncestor||i[0],e)}function Zye(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function gN(r){return arguments.length?r:i0e}function up(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function Qye(r,e){return Ar(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Jye(r){for(var e=r.children,t=e.length,i=0,n=0;--t>=0;){var a=e[t];a.hierNode.prelim+=i,a.hierNode.modifier+=i,n+=a.hierNode.change,i+=a.hierNode.shift+n}}function e0e(r,e,t,i){if(e){for(var n=r,a=r,s=a.parentNode.children[0],o=e,l=n.hierNode.modifier,u=a.hierNode.modifier,c=s.hierNode.modifier,h=o.hierNode.modifier;o=_S(o),a=bS(a),o&&a;){n=_S(n),s=bS(s),n.hierNode.ancestor=r;var d=o.hierNode.prelim+h-a.hierNode.prelim-u+i(o,a);d>0&&(r0e(t0e(o,r,t),r,d),u+=d,l+=d),h+=o.hierNode.modifier,u+=a.hierNode.modifier,l+=n.hierNode.modifier,c+=s.hierNode.modifier}o&&!_S(n)&&(n.hierNode.thread=o,n.hierNode.modifier+=h-l),a&&!bS(s)&&(s.hierNode.thread=a,s.hierNode.modifier+=u-c,t=r)}return t}function _S(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function bS(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function t0e(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function r0e(r,e,t){var i=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=i}function i0e(r,e){return r.parentNode===e.parentNode?1:2}var n0e=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),a0e=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new n0e},e.prototype.buildPath=function(t,i){var n=i.childPoints,a=n.length,s=i.parentPoint,o=n[0],l=n[a-1];if(a===1){t.moveTo(s[0],s[1]),t.lineTo(o[0],o[1]);return}var u=i.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,d=ce(i.forkPosition,1),f=[];f[c]=s[c],f[h]=s[h]+(l[h]-s[h])*d,t.moveTo(s[0],s[1]),t.lineTo(f[0],f[1]),t.moveTo(o[0],o[1]),f[c]=o[c],t.lineTo(f[0],f[1]),f[c]=l[c],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var v=n[p];t.moveTo(v[0],v[1]),f[c]=v[c],t.lineTo(f[0],f[1])}},e}(Qe),s0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Le,t}return e.prototype.init=function(t,i){this._controller=new pg(i.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,i,n){var a=t.getData(),s=t.layoutInfo,o=this._mainGroup,l=t.get("layout");l==="radial"?(o.x=s.x+s.width/2,o.y=s.y+s.height/2):(o.x=s.x,o.y=s.y),this._updateViewCoordSys(t,n),this._updateController(t,i,n);var u=this._data;a.diff(u).add(function(c){mN(a,c)&&yN(a,c,null,o,t)}).update(function(c,h){var d=u.getItemGraphicEl(h);if(!mN(a,c)){d&&bN(u,h,d,o,t);return}yN(a,c,d,o,t)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&bN(u,c,h,o,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:h})})}),this._data=a},e.prototype._updateViewCoordSys=function(t,i){var n=t.getData(),a=[];n.each(function(h){var d=n.getItemLayout(h);d&&!isNaN(d.x)&&!isNaN(d.y)&&a.push([+d.x,+d.y])});var s=[],o=[];s1(a,s,o);var l=this._min,u=this._max;o[0]-s[0]===0&&(s[0]=l?l[0]:s[0]-1,o[0]=u?u[0]:o[0]+1),o[1]-s[1]===0&&(s[1]=l?l[1]:s[1]-1,o[1]=u?u[1]:o[1]+1);var c=t.coordinateSystem=new vg;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(s[0],s[1],o[0]-s[0],o[1]-s[1]),c.setCenter(t.get("center"),i),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=s,this._max=o},e.prototype._updateController=function(t,i,n){var a=this,s=this._controller,o=this._controllerHost,l=this.group;s.setPointerChecker(function(u,c,h){var d=l.getBoundingRect();return d.applyTransform(l.transform),d.contain(c,h)&&!P1(u,n,t)}),s.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),s.off("pan").off("zoom").on("pan",function(u){tE(o,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){rE(o,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var i=t.getData(),n=this._getNodeGlobalScale(t);i.eachItemGraphicEl(function(a,s){a.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var i=t.coordinateSystem;if(i.type!=="view")return 1;var n=this._nodeScaleRatio,a=i.scaleX||1,s=i.getZoom(),o=(s-1)*n+1;return o/a},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(Ct);function mN(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function yN(r,e,t,i,n){var a=!t,s=r.tree.getNodeByDataIndex(e),o=s.getModel(),l=s.getVisual("style").fill,u=s.isExpand===!1&&s.children.length!==0?l:"#fff",c=r.tree.root,h=s.parentNode===c?s:s.parentNode||s,d=r.getItemGraphicEl(h.dataIndex),f=h.getLayout(),p=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:f,v=s.getLayout();a?(t=new lg(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=v.rawX,t.__radialRawY=v.rawY,i.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ct(t,{x:v.x,y:v.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,b=void 0,S=void 0;if(v.x===y.x&&s.isExpand===!0&&m.children.length){var x={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};b=Math.atan2(x.y-y.y,x.x-y.x),b<0&&(b=Math.PI*2+b),S=x.x<y.x,S&&(b=b-Math.PI)}else b=Math.atan2(v.y-y.y,v.x-y.x),b<0&&(b=Math.PI*2+b),s.children.length===0||s.children.length!==0&&s.isExpand===!1?(S=v.x<y.x,S&&(b=b-Math.PI)):(S=v.x>y.x,S||(b=b-Math.PI));var C=S?"left":"right",D=o.getModel("label"),I=D.get("rotate"),M=I*(Math.PI/180),L=g.getTextContent();L&&(g.setTextConfig({position:D.get("position")||C,rotation:I==null?-b:M,origin:"center"}),L.setStyle("verticalAlign","middle"))}var N=o.get(["emphasis","focus"]),O=N==="relative"?T0(s.getAncestorsIndices(),s.getDescendantIndices()):N==="ancestor"?s.getAncestorsIndices():N==="descendant"?s.getDescendantIndices():null;O&&(ke(t).focus=O),o0e(n,s,c,t,p,f,v,i),t.__edge&&(t.onHoverStateChange=function(B){if(B!=="blur"){var F=s.parentNode&&r.getItemGraphicEl(s.parentNode.dataIndex);F&&F.hoverState===Qv||M0(t.__edge,B)}})}function o0e(r,e,t,i,n,a,s,o){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),h=r.getOrient(),d=r.get(["lineStyle","curveness"]),f=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(v||(v=i.__edge=new eg({shape:L2(c,h,d,n,n)})),ct(v,{shape:L2(c,h,d,a,s)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],y=0;y<g.length;y++){var _=g[y].getLayout();m.push([_.x,_.y])}v||(v=i.__edge=new a0e({shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]],orient:h,forkPosition:f}})),ct(v,{shape:{parentPoint:[s.x,s.y],childPoints:m}},r)}v&&!(u==="polyline"&&!e.isExpand)&&(v.useStyle(Ce({strokeNoScale:!0,fill:null},p)),Qr(v,l,"lineStyle"),rc(v),o.add(v))}function _N(r,e,t,i,n){var a=e.tree.root,s=cq(a,r),o=s.source,l=s.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(o.dataIndex),h=c.__edge,d=u.__edge||(o.isExpand===!1||o.children.length===1?h:void 0),f=i.get("edgeShape"),p=i.get("layout"),v=i.get("orient"),g=i.get(["lineStyle","curveness"]);d&&(f==="curve"?rl(d,{shape:L2(p,v,g,l,l),style:{opacity:0}},i,{cb:function(){t.remove(d)},removeOpt:n}):f==="polyline"&&i.get("layout")==="orthogonal"&&rl(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},i,{cb:function(){t.remove(d)},removeOpt:n}))}}function cq(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,i;i=t.getLayout(),i==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:i}}function bN(r,e,t,i,n){var a=r.tree.getNodeByDataIndex(e),s=r.tree.root,o=cq(s,a).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};rl(t,{x:o.x+1,y:o.y+1},n,{cb:function(){i.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){_N(u,r,i,n,l)}),_N(a,r,i,n,l)}function L2(r,e,t,i,n){var a,s,o,l,u,c,h,d;if(r==="radial"){u=i.rawX,h=i.rawY,c=n.rawX,d=n.rawY;var f=up(u,h),p=up(u,h+(d-h)*t),v=up(c,d+(h-d)*t),g=up(c,d);return{x1:f.x||0,y1:f.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=i.x,h=i.y,c=n.x,d=n.y,(e==="LR"||e==="RL")&&(a=u+(c-u)*t,s=h,o=c+(u-c)*t,l=d),(e==="TB"||e==="BT")&&(a=u,s=h+(d-h)*t,o=c,l=d+(h-d)*t);return{x1:u,y1:h,x2:c,y2:d,cpx1:a,cpy1:s,cpx2:o,cpy2:l}}var Wn=ot();function hq(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,fq(e,t,r),R(t,function(i){R(e.TRANSFERABLE_METHODS,function(n){i.wrapMethod(n,Ue(l0e,r))})}),e.wrapMethod("cloneShallow",Ue(c0e,r)),R(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,Ue(u0e,r))}),Ai(t[e.dataType]===e)}function l0e(r,e){if(d0e(this)){var t=J({},Wn(this).datas);t[this.dataType]=e,fq(e,t,r)}else aE(e,this.dataType,Wn(this).mainData,r);return e}function u0e(r,e){return r.struct&&r.struct.update(),e}function c0e(r,e){return R(Wn(e).datas,function(t,i){t!==e&&aE(t.cloneShallow(),i,e,r)}),e}function h0e(r){var e=Wn(this).mainData;return r==null||e==null?e:Wn(e).datas[r]}function f0e(){var r=Wn(this).mainData;return r==null?[{data:r}]:oe(rt(Wn(r).datas),function(e){return{type:e,data:Wn(r).datas[e]}})}function d0e(r){return Wn(r).mainData===r}function fq(r,e,t){Wn(r).datas={},R(e,function(i,n){aE(i,n,r,t)})}function aE(r,e,t,i){Wn(t).datas[e]=r,Wn(r).mainData=t,r.dataType=e,i.struct&&(r[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=r),r.getLinkedData=h0e,r.getLinkedDataAll=f0e}var p0e=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,i){we(e)&&(i=t,t=e,e=null),e=e||{},pe(e)&&(e={order:e});var n=e.order||"preorder",a=this[e.attr||"children"],s;n==="preorder"&&(s=t.call(i,this));for(var o=0;!s&&o<a.length;o++)a[o].eachNode(e,t,i);n==="postorder"&&t.call(i,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,n=i.length;t<n;t++){var a=i[t].getNodeById(e);if(a)return a}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,i=this.children,n=i.length;t<n;t++){var a=i[t].contains(e);if(a)return a}},r.prototype.getAncestors=function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),sE=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,i){this.root.eachNode(e,t,i)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,i=0,n=t.length;i<n;i++)t[i].dataIndex=-1;for(var i=0,n=e.count();i<n;i++)t[e.getRawIndex(i)].dataIndex=i},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,i){var n=new r(t),a=[],s=1;o(e);function o(c,h){var d=c.value;s=Math.max(s,ie(d)?d.length:1),a.push(c);var f=new p0e(wr(c.name,""),n);h?v0e(f,h):n.root=f,n._nodes.push(f);var p=c.children;if(p)for(var v=0;v<p.length;v++)o(p[v],f)}n.root.updateDepthAndHeight(0);var l=sg(a,{coordDimensions:["value"],dimensionsCount:s}).dimensions,u=new wi(l,t);return u.initData(a),i&&i(u),hq({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r}();function v0e(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function Dv(r,e,t){if(r&&Xe(e,r.type)>=0){var i=t.getData().tree.root,n=r.targetNode;if(pe(n)&&(n=i.getNodeById(n)),n&&i.contains(n))return{node:n};var a=r.targetNodeId;if(a!=null&&(n=i.getNodeById(a)))return{node:n}}}function dq(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function oE(r,e){var t=dq(r);return Xe(t,e)>=0}function L1(r,e){for(var t=[];r;){var i=r.dataIndex;t.push({name:r.name,dataIndex:i,value:e.getRawValue(i)}),r=r.parentNode}return t.reverse(),t}var g0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var i={name:t.name,children:t.data},n=t.leaves||{},a=new yt(n,this,this.ecModel),s=sE.createTree(i,this,o);function o(h){h.wrapMethod("getItemModel",function(d,f){var p=s.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(d.parentModel=a),d})}var l=0;s.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return s.root.eachNode("preorder",function(h){var d=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=d&&d.collapsed!=null?!d.collapsed:h.depth<=c}),s.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,i,n){for(var a=this.getData().tree,s=a.root.children[0],o=a.getNodeByDataIndex(t),l=o.getValue(),u=o.name;o&&o!==s;)u=o.parentNode.name+"."+u,o=o.parentNode;return Br("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=L1(n,this),i.collapsed=!n.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Ot);function m0e(r,e,t){for(var i=[r],n=[],a;a=i.pop();)if(n.push(a),a.isExpand){var s=a.children;if(s.length)for(var o=0;o<s.length;o++)i.push(s[o])}for(;a=n.pop();)e(a,t)}function Rd(r,e){for(var t=[r],i;i=t.pop();)if(e(i),i.isExpand){var n=i.children;if(n.length)for(var a=n.length-1;a>=0;a--)t.push(n[a])}}function y0e(r,e){r.eachSeriesByType("tree",function(t){_0e(t,e)})}function _0e(r,e){var t=Qye(r,e);r.layoutInfo=t;var i=r.get("layout"),n=0,a=0,s=null;i==="radial"?(n=2*Math.PI,a=Math.min(t.height,t.width)/2,s=gN(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(n=t.width,a=t.height,s=gN());var o=r.getData().tree.root,l=o.children[0];if(l){Yye(o),m0e(l,Kye,s),o.hierNode.modifier=-l.hierNode.prelim,Rd(l,Zye);var u=l,c=l,h=l;Rd(l,function(_){var b=_.getLayout().x;b<u.getLayout().x&&(u=_),b>c.getLayout().x&&(c=_),_.depth>h.depth&&(h=_)});var d=u===c?1:s(u,c)/2,f=d-u.getLayout().x,p=0,v=0,g=0,m=0;if(i==="radial")p=n/(c.getLayout().x+d+f),v=a/(h.depth-1||1),Rd(l,function(_){g=(_.getLayout().x+f)*p,m=(_.depth-1)*v;var b=up(g,m);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(v=a/(c.getLayout().x+d+f),p=n/(h.depth-1||1),Rd(l,function(_){m=(_.getLayout().x+f)*v,g=y==="LR"?(_.depth-1)*p:n-(_.depth-1)*p,_.setLayout({x:g,y:m},!0)})):(y==="TB"||y==="BT")&&(p=n/(c.getLayout().x+d+f),v=a/(h.depth-1||1),Rd(l,function(_){g=(_.getLayout().x+f)*p,m=y==="TB"?(_.depth-1)*v:a-(_.depth-1)*v,_.setLayout({x:g,y:m},!0)}))}}}function b0e(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),i=t.tree;i.eachNode(function(n){var a=n.getModel(),s=a.getModel("itemStyle").getItemStyle(),o=t.ensureUniqueItemVisual(n.dataIndex,"style");J(o,s)})})}function T0e(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=e.dataIndex,a=i.getData().tree,s=a.getNodeByDataIndex(n);s.isExpand=!s.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,i){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=n.coordinateSystem,s=nE(a,e,void 0,i);n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}function S0e(r){r.registerChartView(s0e),r.registerSeriesModel(g0e),r.registerLayout(y0e),r.registerVisual(b0e),T0e(r)}var TN=["treemapZoomToNode","treemapRender","treemapMove"];function x0e(r){for(var e=0;e<TN.length;e++)r.registerAction({type:TN[e],update:"updateView"},lr);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,i){i.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(a,s){var o=["treemapZoomToNode","treemapRootToNode"],l=Dv(t,o,a);if(l){var u=a.getViewRoot();u&&(t.direction=oE(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function pq(r){var e=r.getData(),t=e.tree,i={};t.eachNode(function(n){for(var a=n;a&&a.depth>1;)a=a.parentNode;var s=s2(r.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",s)})}var w0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,i){var n={name:t.name,children:t.data};vq(n);var a=t.levels||[],s=this.designatedVisualItemStyle={},o=new yt({itemStyle:s},this,i);a=t.levels=C0e(a,i);var l=oe(a||[],function(h){return new yt(h,o,i)},this),u=sE.createTree(n,this,c);function c(h){h.wrapMethod("getItemModel",function(d,f){var p=u.getNodeByDataIndex(f),v=p?l[p.depth]:null;return d.parentModel=v||o,d})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=this.getRawValue(t),o=a.getName(t);return Br("nameValue",{name:o,value:s})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=L1(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var i=this._idIndexMap;i||(i=this._idIndexMap=be(),this._idIndexMapCount=0);var n=i.get(t);return n==null&&i.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){pq(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ot);function vq(r){var e=0;R(r.children,function(i){vq(i);var n=i.value;ie(n)&&(n=n[0]),e+=n});var t=r.value;ie(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),ie(r.value)?r.value[0]=t:r.value=t}function C0e(r,e){var t=xt(e.get("color")),i=xt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,a;R(r,function(o){var l=new yt(o),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var s=r[0]||(r[0]={});return n||(s.color=t.slice()),!a&&i&&(s.decal=i.slice()),r}}var A0e=8,SN=8,TS=5,D0e=function(){function r(e){this.group=new Le,e.add(this.group)}return r.prototype.render=function(e,t,i,n){var a=e.getModel("breadcrumb"),s=this.group;if(s.removeAll(),!(!a.get("show")||!i)){var o=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=o.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,h,u),this._renderContent(e,h,o,l,u,c,n),_1(s,h.pos,h.box)}},r.prototype._prepare=function(e,t,i){for(var n=e;n;n=n.parentNode){var a=wr(n.getModel().get("name"),""),s=i.getTextRect(a),o=Math.max(s.width+A0e*2,t.emptyItemWidth);t.totalWidth+=o+SN,t.renderList.push({node:n,text:a,width:o})}},r.prototype._renderContent=function(e,t,i,n,a,s,o){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),h=Bhe(t.pos,t.box),d=t.totalWidth,f=t.renderList,p=n.getModel("itemStyle").getItemStyle(),v=f.length-1;v>=0;v--){var g=f[v],m=g.node,y=g.width,_=g.text;d>h.width&&(d-=y-u,y=u,_=null);var b=new Ii({shape:{points:E0e(l,0,y,c,v===f.length-1,v===0)},style:Ce(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new lt({style:kt(a,{text:_})}),textConfig:{position:"inside"},z2:Mf*1e4,onclick:Ue(o,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=kt(s,{text:_}),b.ensureState("emphasis").style=p,Yt(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),I0e(b,e,m),l+=y+SN}},r.prototype.remove=function(){this.group.removeAll()},r}();function E0e(r,e,t,i,n,a){var s=[[n?r:r-TS,e],[r+t,e],[r+t,e+i],[n?r:r-TS,e+i]];return!a&&s.splice(2,0,[r+t+TS,e+i/2]),!n&&s.push([r,e+i/2]),s}function I0e(r,e,t){ke(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&L1(t,e)}}var P0e=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,i,n,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:i,delay:n,easing:a}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,i=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,a=this._storage.length;n<a;n++){var s=this._storage[n];s.el.animateTo(s.target,{duration:s.duration,delay:s.delay,easing:s.easing,setToFinal:!0,done:i,aborted:i})}return this},r}();function M0e(){return new P0e}var k2=Le,xN=st,wN=3,CN="label",AN="upperLabel",L0e=Mf*10,k0e=Mf*2,R0e=Mf*3,tu=tc([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),DN=function(r){var e=tu(r);return e.stroke=e.fill=e.lineWidth=null,e},J0=ot(),O0e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Od(),t}return e.prototype.render=function(t,i,n,a){var s=i.findComponents({mainType:"series",subType:"treemap",query:a});if(!(Xe(s,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=i;var o=["treemapZoomToNode","treemapRootToNode"],l=Dv(a,o,t),u=a&&a.type,c=t.layoutInfo,h=!this._oldTree,d=this._storage,f=u==="treemapRootToNode"&&l&&d?{rootNodeGroup:d.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),v=t.get("animation"),g=this._doRender(p,t,f);v&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,f):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var i=this._containerGroup;return i||(i=this._containerGroup=new k2,this._initEvents(i),this.group.add(i)),i.x=t.x,i.y=t.y,i},e.prototype._doRender=function(t,i,n){var a=i.getData().tree,s=this._oldTree,o=Od(),l=Od(),u=this._storage,c=[];function h(y,_,b,S){return N0e(i,l,u,n,o,c,y,_,b,S)}v(a.root?[a.root]:[],s&&s.root?[s.root]:[],t,a===s||!s,0);var d=g(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var f=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===f.width&&p.height===f.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:o,willDeleteEls:d,renderFinally:m};function v(y,_,b,S,x){S?(_=y,R(y,function(I,M){!I.isRemoved()&&D(M,M)})):new Xs(_,y,C,C).add(D).update(D).remove(Ue(D,null)).execute();function C(I){return I.getId()}function D(I,M){var L=I!=null?y[I]:null,N=M!=null?_[M]:null,O=h(L,N,b,x);O&&v(L&&L.viewChildren||[],N&&N.viewChildren||[],O,S,x+1)}}function g(y){var _=Od();return y&&R(y,function(b,S){var x=_[S];R(b,function(C){C&&(x.push(C),J0(C).willDelete=!0)})}),_}function m(){R(d,function(y){R(y,function(_){_.parent&&_.parent.remove(_)})}),R(c,function(y){y.invisible=!0,y.dirty()})}},e.prototype._doAnimation=function(t,i,n,a){var s=n.get("animationDurationUpdate"),o=n.get("animationEasing"),l=(we(s)?0:s)||0,u=(we(o)?null:o)||"cubicOut",c=M0e();R(i.willDeleteEls,function(h,d){R(h,function(f,p){if(!f.invisible){var v=f.parent,g,m=J0(v);if(a&&a.direction==="drillDown")g=v===a.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),g=d==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(f,g,l,0,u)}})}),R(this._storage,function(h,d){R(h,function(f,p){var v=i.lastsForAnimation[d][p],g={};v&&(f instanceof Le?v.oldX!=null&&(g.x=f.x,g.y=f.y,f.x=v.oldX,f.y=v.oldY):(v.oldShape&&(g.shape=J({},f.shape),f.setShape(v.oldShape)),v.fadein?(f.setStyle("opacity",0),g.style={opacity:1}):f.style.opacity!==1&&(g.style={opacity:1})),c.add(f,g,l,0,u))})},this),this._state="animating",c.finished(ge(function(){this._state="ready",i.renderFinally()},this)).start()},e.prototype._resetController=function(t){var i=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),i||(i=this._controller=new pg(t.getZr()),i.enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),i.on("pan",ge(this._onPan,this)),i.on("zoom",ge(this._onZoom,this)));var a=new qe(0,0,t.getWidth(),t.getHeight());i.setPointerChecker(function(s,o,l){return a.contain(o,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>wN||Math.abs(t.dy)>wN)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var i=t.originX,n=t.originY,a=t.scale;if(this._state!=="animating"){var s=this.seriesModel.getData().tree.root;if(!s)return;var o=s.getLayout();if(!o)return;var l=new qe(o.x,o.y,o.width,o.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var d=u.min||0,f=u.max||1/0;h=Math.max(Math.min(f,h),d)}var p=h/c.zoom;c.zoom=h;var v=this.seriesModel.layoutInfo;i-=v.x,n-=v.y;var g=vn();ss(g,g,[-i,-n]),KA(g,g,[p,p]),ss(g,g,[i,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var i=this;t.on("click",function(n){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var s=i.findTarget(n.offsetX,n.offsetY);if(s){var o=s.node;if(o.getLayout().isLeafRoot)i._rootToNode(s);else if(a==="zoomToNode")i._zoomToNode(s);else if(a==="link"){var l=o.hostTree.data.getItemModel(o.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&B0(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,i,n){var a=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new D0e(this.group))).render(t,i,n.node,function(s){a._state!=="animating"&&(oE(t.getViewRoot(),s)?a._rootToNode({node:s}):a._zoomToNode({node:s}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Od(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,i){var n,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(s){var o=this._storage.background[s.getRawIndex()];if(o){var l=o.transformCoordToLocal(t,i),u=o.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:s,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Ct);function Od(){return{nodeGroup:[],background:[],content:[]}}function N0e(r,e,t,i,n,a,s,o,l,u){if(!s)return;var c=s.getLayout(),h=r.getData(),d=s.getModel();if(h.setItemGraphicEl(s.dataIndex,null),!c||!c.isInView)return;var f=c.width,p=c.height,v=c.borderWidth,g=c.invisible,m=s.getRawIndex(),y=o&&o.getRawIndex(),_=s.viewChildren,b=c.upperHeight,S=_&&_.length,x=d.getModel("itemStyle"),C=d.getModel(["emphasis","itemStyle"]),D=d.getModel(["blur","itemStyle"]),I=d.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,L=ue("nodeGroup",k2);if(!L)return;if(l.add(L),L.x=c.x||0,L.y=c.y||0,L.markRedraw(),J0(L).nodeWidth=f,J0(L).nodeHeight=p,c.isAboveViewRoot)return L;var N=ue("background",xN,u,k0e);N&&Z(L,N,S&&c.upperLabelHeight);var O=d.getModel("emphasis"),B=O.get("focus"),F=O.get("blurScope"),U=O.get("disabled"),$=B==="ancestor"?s.getAncestorsIndices():B==="descendant"?s.getDescendantIndices():B;if(S)pv(L)&&yu(L,!1),N&&(yu(N,!U),h.setItemGraphicEl(s.dataIndex,N),Qw(N,$,F));else{var q=ue("content",xN,u,R0e);q&&te(L,q),N.disableMorphing=!0,N&&pv(N)&&yu(N,!1),yu(L,!U),h.setItemGraphicEl(s.dataIndex,L),Qw(L,$,F)}return L;function Z(Fe,me,ze){var Pe=ke(me);if(Pe.dataIndex=s.dataIndex,Pe.seriesIndex=r.seriesIndex,me.setShape({x:0,y:0,width:f,height:p,r:M}),g)Q(me);else{me.invisible=!1;var ye=s.getVisual("style"),Me=ye.stroke,_t=DN(x);_t.fill=Me;var Re=tu(C);Re.fill=C.get("borderColor");var Ge=tu(D);Ge.fill=D.get("borderColor");var Pt=tu(I);if(Pt.fill=I.get("borderColor"),ze){var wt=f-2*v;se(me,Me,ye.opacity,{x:v,y:0,width:wt,height:b})}else me.removeTextContent();me.setStyle(_t),me.ensureState("emphasis").style=Re,me.ensureState("blur").style=Ge,me.ensureState("select").style=Pt,rc(me)}Fe.add(me)}function te(Fe,me){var ze=ke(me);ze.dataIndex=s.dataIndex,ze.seriesIndex=r.seriesIndex;var Pe=Math.max(f-2*v,0),ye=Math.max(p-2*v,0);if(me.culling=!0,me.setShape({x:v,y:v,width:Pe,height:ye,r:M}),g)Q(me);else{me.invisible=!1;var Me=s.getVisual("style"),_t=Me.fill,Re=DN(x);Re.fill=_t,Re.decal=Me.decal;var Ge=tu(C),Pt=tu(D),wt=tu(I);se(me,_t,Me.opacity,null),me.setStyle(Re),me.ensureState("emphasis").style=Ge,me.ensureState("blur").style=Pt,me.ensureState("select").style=wt,rc(me)}Fe.add(me)}function Q(Fe){!Fe.invisible&&a.push(Fe)}function se(Fe,me,ze,Pe){var ye=d.getModel(Pe?AN:CN),Me=wr(d.get("name"),null),_t=ye.getShallow("show");Jr(Fe,Nr(d,Pe?AN:CN),{defaultText:_t?Me:null,inheritColor:me,defaultOpacity:ze,labelFetcher:r,labelDataIndex:s.dataIndex});var Re=Fe.getTextContent();if(Re){var Ge=Re.style,Pt=jA(Ge.padding||0);Pe&&(Fe.setTextConfig({layoutRect:Pe}),Re.disableLabelLayout=!0),Re.beforeUpdate=function(){var At=Math.max((Pe?Pe.width:Fe.shape.width)-Pt[1]-Pt[3],0),rr=Math.max((Pe?Pe.height:Fe.shape.height)-Pt[0]-Pt[2],0);(Ge.width!==At||Ge.height!==rr)&&Re.setStyle({width:At,height:rr})},Ge.truncateMinChar=2,Ge.lineOverflow="truncate",he(Ge,Pe,c);var wt=Re.getState("emphasis");he(wt?wt.style:null,Pe,c)}}function he(Fe,me,ze){var Pe=Fe?Fe.text:null;if(!me&&ze.isLeafRoot&&Pe!=null){var ye=r.get("drillDownIcon",!0);Fe.text=ye?ye+" "+Pe:Pe}}function ue(Fe,me,ze,Pe){var ye=y!=null&&t[Fe][y],Me=n[Fe];return ye?(t[Fe][y]=null,Ie(Me,ye)):g||(ye=new me,ye instanceof Yn&&(ye.z2=B0e(ze,Pe)),Oe(Me,ye)),e[Fe][m]=ye}function Ie(Fe,me){var ze=Fe[m]={};me instanceof k2?(ze.oldX=me.x,ze.oldY=me.y):ze.oldShape=J({},me.shape)}function Oe(Fe,me){var ze=Fe[m]={},Pe=s.parentNode,ye=me instanceof Le;if(Pe&&(!i||i.direction==="drillDown")){var Me=0,_t=0,Re=n.background[Pe.getRawIndex()];!i&&Re&&Re.oldShape&&(Me=Re.oldShape.width,_t=Re.oldShape.height),ye?(ze.oldX=0,ze.oldY=_t):ze.oldShape={x:Me,y:_t,width:0,height:0}}ze.fadein=!ye}}function B0e(r,e){return r*L0e+e}var Ev=R,F0e=De,e_=-1,Or=function(){function r(e){var t=e.mappingMethod,i=e.type,n=this.option=Ee(e);this.type=i,this.mappingMethod=t,this._normalizeData=z0e[t];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(SS(n),U0e(n)):t==="category"?n.categories?V0e(n):SS(n,!0):(Ai(t!=="linear"||n.dataExtent),SS(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ge(this._normalizeData,this)},r.listVisualTypes=function(){return rt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,i){De(e)?R(e,t,i):t.call(i,e)},r.mapVisual=function(e,t,i){var n,a=ie(e)?[]:De(e)?{}:(n=!0,null);return r.eachVisual(e,function(s,o){var l=t.call(i,s,o);n?a=l:a[o]=l}),a},r.retrieveVisuals=function(e){var t={},i;return e&&Ev(r.visualHandlers,function(n,a){e.hasOwnProperty(a)&&(t[a]=e[a],i=!0)}),i?t:null},r.prepareVisualTypes=function(e){if(ie(e))e=e.slice();else if(F0e(e)){var t=[];Ev(e,function(i,n){t.push(n)}),e=t}else return[];return e.sort(function(i,n){return n==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,i){for(var n,a=1/0,s=0,o=t.length;s<o;s++){var l=t[s].value;if(l!=null){if(l===e||pe(l)&&l===e+"")return s;i&&d(l,s)}}for(var s=0,o=t.length;s<o;s++){var u=t[s],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(Gm(h[1],e,c[1]))return s}else if(c[1]===1/0){if(Gm(h[0],c[0],e))return s}else if(Gm(h[0],c[0],e)&&Gm(h[1],e,c[1]))return s;i&&d(c[0],s),i&&d(c[1],s)}}if(i)return e===1/0?t.length-1:e===-1/0?0:n;function d(f,p){var v=Math.abs(f-e);v<a&&(a=v,n=p)}},r.visualHandlers={color:{applyVisual:Nd("color"),getColorMapper:function(){var e=this.option;return ge(e.mappingMethod==="category"?function(t,i){return!i&&(t=this._normalizeData(t)),cp.call(this,t)}:function(t,i,n){var a=!!n;return!i&&(t=this._normalizeData(t)),n=rT(t,e.parsedVisual,n),a?n:Os(n,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Os(rT(e,this.option.parsedVisual),"rgba")},category:cp,piecewise:function(e,t){var i=O2.call(this,t);return i==null&&(i=Os(rT(e,this.option.parsedVisual),"rgba")),i},fixed:ru}},colorHue:zm(function(e,t){return Ip(e,t)}),colorSaturation:zm(function(e,t){return Ip(e,null,t)}),colorLightness:zm(function(e,t){return Ip(e,null,null,t)}),colorAlpha:zm(function(e,t){return C0(e,t)}),decal:{applyVisual:Nd("decal"),_normalizedToVisual:{linear:null,category:cp,piecewise:null,fixed:null}},opacity:{applyVisual:Nd("opacity"),_normalizedToVisual:R2([0,1])},liftZ:{applyVisual:Nd("liftZ"),_normalizedToVisual:{linear:ru,category:ru,piecewise:ru,fixed:ru}},symbol:{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("symbol",n)},_normalizedToVisual:{linear:EN,category:cp,piecewise:function(e,t){var i=O2.call(this,t);return i==null&&(i=EN.call(this,e)),i},fixed:ru}},symbolSize:{applyVisual:Nd("symbolSize"),_normalizedToVisual:R2([0,1])}},r}();function U0e(r){var e=r.pieceList;r.hasSpecialVisual=!1,R(e,function(t,i){t.originIndex=i,t.visual!=null&&(r.hasSpecialVisual=!0)})}function V0e(r){var e=r.categories,t=r.categoryMap={},i=r.visual;if(Ev(e,function(s,o){t[s]=o}),!ie(i)){var n=[];De(i)?Ev(i,function(s,o){var l=t[o];n[l??e_]=s}):n[e_]=i,i=gq(r,n)}for(var a=e.length-1;a>=0;a--)i[a]==null&&(delete t[e[a]],e.pop())}function SS(r,e){var t=r.visual,i=[];De(t)?Ev(t,function(a){i.push(a)}):t!=null&&i.push(t);var n={color:1,symbol:1};!e&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),gq(r,i)}function zm(r){return{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("color",r(t("color"),n))},_normalizedToVisual:R2([0,1])}}function EN(r){var e=this.option.visual;return e[Math.round(bt(r,[0,1],[0,e.length-1],!0))]||{}}function Nd(r){return function(e,t,i){i(r,this.mapValueToVisual(e))}}function cp(r){var e=this.option.visual;return e[this.option.loop&&r!==e_?r%e.length:r]}function ru(){return this.option.visual[0]}function R2(r){return{linear:function(e){return bt(e,r,this.option.visual,!0)},category:cp,piecewise:function(e,t){var i=O2.call(this,t);return i==null&&(i=bt(e,r,this.option.visual,!0)),i},fixed:ru}}function O2(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=Or.findPieceIndex(r,t),n=t[i];if(n&&n.visual)return n.visual[this.type]}}function gq(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=oe(e,function(t){var i=gn(t);return i||[0,0,0,1]})),e}var z0e={linear:function(r){return bt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Or.findPieceIndex(r,e,!0);if(t!=null)return bt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??e_},fixed:lr};function Gm(r,e,t){return r?e<=t:e<t}var G0e="itemStyle",mq=ot();const H0e={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||yq(t,{},r.getViewRoot().getAncestors(),r)}};function yq(r,e,t,i){var n=r.getModel(),a=r.getLayout(),s=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var o=n.getModel(G0e),l=$0e(o,e,i),u=s.ensureUniqueItemVisual(r.dataIndex,"style"),c=o.get("borderColor"),h=o.get("borderColorSaturation"),d;h!=null&&(d=IN(l),c=W0e(h,d)),u.stroke=c;var f=r.viewChildren;if(!f||!f.length)d=IN(l),u.fill=d;else{var p=q0e(r,n,a,o,l,f);R(f,function(v,g){if(v.depth>=t.length||v===t[v.depth]){var m=j0e(n,l,v,g,p,i);yq(v,m,t,i)}})}}}function $0e(r,e,t){var i=J({},e),n=t.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){n[a]=e[a];var s=r.get(a);n[a]=null,s!=null&&(i[a]=s)}),i}function IN(r){var e=xS(r,"color");if(e){var t=xS(r,"colorAlpha"),i=xS(r,"colorSaturation");return i&&(e=Ip(e,null,null,i)),t&&(e=C0(e,t)),e}}function W0e(r,e){return e!=null?Ip(e,null,null,r):null}function xS(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function q0e(r,e,t,i,n,a){if(!(!a||!a.length)){var s=wS(e,"color")||n.color!=null&&n.color!=="none"&&(wS(e,"colorAlpha")||wS(e,"colorSaturation"));if(s){var o=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();o!=null&&o<u[0]&&(u[0]=o),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:s.name,dataExtent:u,visual:s.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var d=new Or(h);return mq(d).drColorMappingBy=c,d}}}function wS(r,e){var t=r.get(e);return ie(t)&&t.length?{name:e,range:t}:null}function j0e(r,e,t,i,n,a){var s=J({},e);if(n){var o=n.type,l=o==="color"&&mq(n).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));s[o]=n.mapValueToVisual(u)}return s}var Iv=Math.max,t_=Math.min,PN=Gr,lE=R,_q=["itemStyle","borderWidth"],X0e=["itemStyle","gapWidth"],Y0e=["upperLabel","show"],K0e=["upperLabel","height"];const Z0e={seriesType:"treemap",reset:function(r,e,t,i){var n=t.getWidth(),a=t.getHeight(),s=r.option,o=Ar(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=s.size||[],u=ce(PN(o.width,l[0]),n),c=ce(PN(o.height,l[1]),a),h=i&&i.type,d=["treemapZoomToNode","treemapRootToNode"],f=Dv(i,d,r),p=h==="treemapRender"||h==="treemapMove"?i.rootRect:null,v=r.getViewRoot(),g=dq(v);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?i_e(r,f,v,u,c):p?[p.width,p.height]:[u,c],y=s.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:s.squareRatio,sort:y,leafDepth:s.leafDepth};v.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(b),bq(v,_,!1,0),b=v.getLayout(),lE(g,function(x,C){var D=(g[C+1]||v).getValue();x.setLayout(J({dataExtent:[D,D],borderWidth:0,upperHeight:0},b))})}var S=r.getData().tree.root;S.setLayout(n_e(o,p,f),!0),r.setLayoutInfo(o),Tq(S,new qe(-o.x,-o.y,n,a),g,v,0)}};function bq(r,e,t,i){var n,a;if(!r.isRemoved()){var s=r.getLayout();n=s.width,a=s.height;var o=r.getModel(),l=o.get(_q),u=o.get(X0e)/2,c=Sq(o),h=Math.max(l,c),d=l-u,f=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),n=Iv(n-2*d,0),a=Iv(a-d-f,0);var p=n*a,v=Q0e(r,o,p,e,t,i);if(v.length){var g={x:d,y:f,width:n,height:a},m=t_(n,a),y=1/0,_=[];_.area=0;for(var b=0,S=v.length;b<S;){var x=v[b];_.push(x),_.area+=x.getLayout().area;var C=r_e(_,m,e.squareRatio);C<=y?(b++,y=C):(_.area-=_.pop().getLayout().area,MN(_,m,g,u,!1),m=t_(g.width,g.height),_.length=_.area=0,y=1/0)}if(_.length&&MN(_,m,g,u,!0),!t){var D=o.get("childrenVisibleMin");D!=null&&p<D&&(t=!0)}for(var b=0,S=v.length;b<S;b++)bq(v[b],e,t,i+1)}}}function Q0e(r,e,t,i,n,a){var s=r.children||[],o=i.sort;o!=="asc"&&o!=="desc"&&(o=null);var l=i.leafDepth!=null&&i.leafDepth<=a;if(n&&!l)return r.viewChildren=[];s=St(s,function(f){return!f.isRemoved()}),e_e(s,o);var u=t_e(e,s,o);if(u.sum===0)return r.viewChildren=[];if(u.sum=J0e(e,t,u.sum,o,s),u.sum===0)return r.viewChildren=[];for(var c=0,h=s.length;c<h;c++){var d=s[c].getValue()/u.sum*t;s[c].setLayout({area:d})}return l&&(s.length&&r.setLayout({isLeafRoot:!0},!0),s.length=0),r.viewChildren=s,r.setLayout({dataExtent:u.dataExtent},!0),s}function J0e(r,e,t,i,n){if(!i)return t;for(var a=r.get("visibleMin"),s=n.length,o=s,l=s-1;l>=0;l--){var u=n[i==="asc"?s-l-1:l].getValue();u/t*e<a&&(o=l,t-=u)}return i==="asc"?n.splice(0,s-o):n.splice(o,s-o),t}function e_e(r,e){return e&&r.sort(function(t,i){var n=e==="asc"?t.getValue()-i.getValue():i.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),r}function t_e(r,e,t){for(var i=0,n=0,a=e.length;n<a;n++)i+=e[n].getValue();var s=r.get("visualDimension"),o;return!e||!e.length?o=[NaN,NaN]:s==="value"&&t?(o=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&o.reverse()):(o=[1/0,-1/0],lE(e,function(l){var u=l.getValue(s);u<o[0]&&(o[0]=u),u>o[1]&&(o[1]=u)})),{sum:i,dataExtent:o}}function r_e(r,e,t){for(var i=0,n=1/0,a=0,s=void 0,o=r.length;a<o;a++)s=r[a].getLayout().area,s&&(s<n&&(n=s),s>i&&(i=s));var l=r.area*r.area,u=e*e*t;return l?Iv(u*i/l,l/(u*n)):1/0}function MN(r,e,t,i,n){var a=e===t.width?0:1,s=1-a,o=["x","y"],l=["width","height"],u=t[o[a]],c=e?r.area/e:0;(n||c>t[l[s]])&&(c=t[l[s]]);for(var h=0,d=r.length;h<d;h++){var f=r[h],p={},v=c?f.getLayout().area/c:0,g=p[l[s]]=Iv(c-2*i,0),m=t[o[a]]+t[l[a]]-u,y=h===d-1||m<v?m:v,_=p[l[a]]=Iv(y-2*i,0);p[o[s]]=t[o[s]]+t_(i,g/2),p[o[a]]=u+t_(i,_/2),u+=y,f.setLayout(p,!0)}t[o[s]]+=c,t[l[s]]-=c}function i_e(r,e,t,i,n){var a=(e||{}).node,s=[i,n];if(!a||a===t)return s;for(var o,l=i*n,u=l*r.option.zoomToNodeRatio;o=a.parentNode;){for(var c=0,h=o.children,d=0,f=h.length;d<f;d++)c+=h[d].getValue();var p=a.getValue();if(p===0)return s;u*=c/p;var v=o.getModel(),g=v.get(_q),m=Math.max(g,Sq(v));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>$L&&(u=$L),a=o}u<l&&(u=l);var y=Math.pow(u/l,.5);return[i*y,n*y]}function n_e(r,e,t){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!t)return i;var n=t.node,a=n.getLayout();if(!a)return i;for(var s=[a.width/2,a.height/2],o=n;o;){var l=o.getLayout();s[0]+=l.x,s[1]+=l.y,o=o.parentNode}return{x:r.width/2-s[0],y:r.height/2-s[1]}}function Tq(r,e,t,i,n){var a=r.getLayout(),s=t[n],o=s&&s===r;if(!(s&&!o||n===t.length&&r!==i)){r.setLayout({isInView:!0,invisible:!o&&!e.intersect(a),isAboveViewRoot:o},!0);var l=new qe(e.x-a.x,e.y-a.y,e.width,e.height);lE(r.viewChildren||[],function(u){Tq(u,l,t,i,n+1)})}}function Sq(r){return r.get(Y0e)?r.get(K0e):0}function a_e(r){r.registerSeriesModel(w0e),r.registerChartView(O0e),r.registerVisual(H0e),r.registerLayout(Z0e),x0e(r)}function s_e(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph(),a=n.data,s=i.mapArray(i.getName);a.filterSelf(function(o){var l=a.getItemModel(o),u=l.getShallow("category");if(u!=null){ut(u)&&(u=s[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function o_e(r){var e={};r.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getData(),a={};i.each(function(s){var o=i.getName(s);a["ec-"+o]=s;var l=i.getItemModel(s),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(o,e)),i.setItemVisual(s,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var d=l.getShallow(c[h],!0);d!=null&&i.setItemVisual(s,c[h],d)}}),i.count()&&n.each(function(s){var o=n.getItemModel(s),l=o.getShallow("category");if(l!=null){pe(l)&&(l=a["ec-"+l]);var u=i.getItemVisual(l,"style"),c=n.ensureUniqueItemVisual(s,"style");J(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],d=0;d<h.length;d++)n.setItemVisual(s,h[d],i.getItemVisual(l,h[d]))}})})}function Hm(r){return r instanceof Array||(r=[r,r]),r}function l_e(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),i=e.getEdgeData(),n=Hm(e.get("edgeSymbol")),a=Hm(e.get("edgeSymbolSize"));i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("style",e.getModel("lineStyle").getLineStyle()),i.each(function(s){var o=i.getItemModel(s),l=t.getEdgeByIndex(s),u=Hm(o.getShallow("symbol",!0)),c=Hm(o.getShallow("symbolSize",!0)),h=o.getModel("lineStyle").getLineStyle(),d=i.ensureUniqueItemVisual(s,"style");switch(J(d,h),d.stroke){case"source":{var f=l.node1.getVisual("style");d.stroke=f&&f.fill;break}case"target":{var f=l.node2.getVisual("style");d.stroke=f&&f.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var N2="-->",k1=function(r){return r.get("autoCurveness")||null},xq=function(r,e){var t=k1(r),i=20,n=[];if(ut(t))i=t;else if(ie(t)){r.__curvenessList=t;return}e>i&&(i=e);var a=i%2?i+2:i+3;n=[];for(var s=0;s<a;s++)n.push((s%2?s+1:s)/10*(s%2?-1:1));r.__curvenessList=n},Pv=function(r,e,t){var i=[r.id,r.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,i,n].join(N2)},wq=function(r){var e=r.split(N2);return[e[0],e[2],e[1]].join(N2)},u_e=function(r,e){var t=Pv(r.node1,r.node2,e);return e.__edgeMap[t]},c_e=function(r,e){var t=B2(Pv(r.node1,r.node2,e),e),i=B2(Pv(r.node2,r.node1,e),e);return t+i},B2=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function h_e(r){k1(r)&&(r.__curvenessList=[],r.__edgeMap={},xq(r))}function f_e(r,e,t,i){if(k1(t)){var n=Pv(r,e,t),a=t.__edgeMap,s=a[wq(n)];a[n]&&!s?a[n].isForward=!0:s&&a[n]&&(s.isForward=!0,a[n].isForward=!1),a[n]=a[n]||[],a[n].push(i)}}function uE(r,e,t,i){var n=k1(e),a=ie(n);if(!n)return null;var s=u_e(r,e);if(!s)return null;for(var o=-1,l=0;l<s.length;l++)if(s[l]===t){o=l;break}var u=c_e(r,e);xq(e,u),r.lineStyle=r.lineStyle||{};var c=Pv(r.node1,r.node2,e),h=e.__curvenessList,d=a||u%2?0:1;if(s.isForward)return h[d+o];var f=wq(c),p=B2(f,e),v=h[o+p+d];return i?a?n&&n[0]===0?(p+d)%2?v:-v:((p%2?0:1)+d)%2?v:-v:(p+d)%2?v:-v:h[o+p+d]}function Cq(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(i){var n=i.getModel();i.setLayout([+n.get("x"),+n.get("y")])}),cE(t,r)}}function cE(r,e){r.eachEdge(function(t,i){var n=Qa(t.getModel().get(["lineStyle","curveness"]),-uE(t,e,i,!0),0),a=ks(t.node1.getLayout()),s=ks(t.node2.getLayout()),o=[a,s];+n&&o.push([(a[0]+s[0])/2-(a[1]-s[1])*n,(a[1]+s[1])/2-(s[0]-a[0])*n]),t.setLayout(o)})}function d_e(r,e){r.eachSeriesByType("graph",function(t){var i=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var a=t.getData(),s=[];R(n.dimensions,function(d){s=s.concat(a.mapDimensionsAll(d))});for(var o=0;o<a.count();o++){for(var l=[],u=!1,c=0;c<s.length;c++){var h=a.get(s[c],o);isNaN(h)||(u=!0),l.push(h)}u?a.setItemLayout(o,n.dataToPoint(l)):a.setItemLayout(o,[NaN,NaN])}cE(a.graph,t)}else(!i||i==="none")&&Cq(t)})}function hp(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,i=e.scaleX,n=e.getZoom(),a=(n-1)*t+1;return a/i}function fp(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var LN=Math.PI,CS=[];function hE(r,e,t,i){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var a=n.getBoundingRect(),s=r.getData(),o=s.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,h=s.count();if(s.setLayout({cx:l,cy:u}),!!h){if(t){var d=n.pointToData(i),f=d[0],p=d[1],v=[f-l,p-u];Ef(v,v),py(v,v,c),t.setLayout([l+v[0],u+v[1]],!0);var g=r.get(["circular","rotateLabel"]);Aq(t,g,l,u)}p_e[e](r,o,s,c,l,u,h),o.eachEdge(function(m,y){var _=Qa(m.getModel().get(["lineStyle","curveness"]),uE(m,r,y),0),b=ks(m.node1.getLayout()),S=ks(m.node2.getLayout()),x,C=(b[0]+S[0])/2,D=(b[1]+S[1])/2;+_&&(_*=3,x=[l*_+C*(1-_),u*_+D*(1-_)]),m.setLayout([b,S,x])})}}}var p_e={value:function(r,e,t,i,n,a,s){var o=0,l=t.getSum("value"),u=Math.PI*2/(l||s);e.eachNode(function(c){var h=c.getValue("value"),d=u*(l?h:1)/2;o+=d,c.setLayout([i*Math.cos(o)+n,i*Math.sin(o)+a]),o+=d})},symbolSize:function(r,e,t,i,n,a,s){var o=0;CS.length=s;var l=hp(r);e.eachNode(function(h){var d=fp(h);isNaN(d)&&(d=2),d<0&&(d=0),d*=l;var f=Math.asin(d/2/i);isNaN(f)&&(f=LN/2),CS[h.dataIndex]=f,o+=f*2});var u=(2*LN-o)/s/2,c=0;e.eachNode(function(h){var d=u+CS[h.dataIndex];c+=d,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([i*Math.cos(c)+n,i*Math.sin(c)+a]),c+=d})}};function Aq(r,e,t,i){var n=r.getGraphicEl();if(n){var a=r.getModel(),s=a.get(["label","rotate"])||0,o=n.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-i,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var h=c?"left":"right";o.setTextConfig({rotation:-u,position:h,origin:"center"});var d=o.ensureState("emphasis");J(d.textConfig||(d.textConfig={}),{position:h})}else o.setTextConfig({rotation:s*=Math.PI/180})}}function v_e(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&hE(e,"symbolSize")})}var Xc=xw;function g_e(r,e,t){for(var i=r,n=e,a=t.rect,s=a.width,o=a.height,l=[a.x+s/2,a.y+o/2],u=t.gravity==null?.1:t.gravity,c=0;c<i.length;c++){var h=i[c];h.p||(h.p=lc(s*(Math.random()-.5)+l[0],o*(Math.random()-.5)+l[1])),h.pp=ks(h.p),h.edges=null}var d=t.friction==null?.6:t.friction,f=d,p,v;return{warmUp:function(){f=d*.8},setFixed:function(g){i[g].fixed=!0},setUnfixed:function(g){i[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){v=g},step:function(g){p&&p(i,n);for(var m=[],y=i.length,_=0;_<n.length;_++){var b=n[_];if(!b.ignoreForceLayout){var S=b.n1,x=b.n2;gu(m,x.p,S.p);var C=ww(m)-b.d,D=x.w/(S.w+x.w);isNaN(D)&&(D=0),Ef(m,m),!S.fixed&&Xc(S.p,S.p,m,D*C*f),!x.fixed&&Xc(x.p,x.p,m,-(1-D)*C*f)}}for(var _=0;_<y;_++){var I=i[_];I.fixed||(gu(m,l,I.p),Xc(I.p,I.p,m,u*f))}for(var _=0;_<y;_++)for(var S=i[_],M=_+1;M<y;M++){var x=i[M];gu(m,x.p,S.p);var C=ww(m);C===0&&(qoe(m,Math.random()-.5,Math.random()-.5),C=1);var L=(S.rep+x.rep)/C/C;!S.fixed&&Xc(S.pp,S.pp,m,L),!x.fixed&&Xc(x.pp,x.pp,m,-L)}for(var N=[],_=0;_<y;_++){var I=i[_];I.fixed||(gu(N,I.p,I.pp),Xc(I.p,I.p,N,f),gi(I.pp,I.p))}f=f*.992;var O=f<.01;v&&v(i,n,O),g&&g(O)}}}function m_e(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var i=e.preservedPoints||{},n=e.getGraph(),a=n.data,s=n.edgeData,o=e.getModel("force"),l=o.get("initLayout");e.preservedPoints?a.each(function(_){var b=a.getId(_);a.setItemLayout(_,i[b]||[NaN,NaN])}):!l||l==="none"?Cq(e):l==="circular"&&hE(e,"value");var u=a.getDataExtent("value"),c=s.getDataExtent("value"),h=o.get("repulsion"),d=o.get("edgeLength"),f=ie(h)?h:[h,h],p=ie(d)?d:[d,d];p=[p[1],p[0]];var v=a.mapArray("value",function(_,b){var S=a.getItemLayout(b),x=bt(_,u,f);return isNaN(x)&&(x=(f[0]+f[1])/2),{w:x,rep:x,fixed:a.getItemModel(b).get("fixed"),p:!S||isNaN(S[0])||isNaN(S[1])?null:S}}),g=s.mapArray("value",function(_,b){var S=n.getEdgeByIndex(b),x=bt(_,c,p);isNaN(x)&&(x=(p[0]+p[1])/2);var C=S.getModel(),D=Qa(S.getModel().get(["lineStyle","curveness"]),-uE(S,e,b,!0),0);return{n1:v[S.node1.dataIndex],n2:v[S.node2.dataIndex],d:x,curveness:D,ignoreForceLayout:C.get("ignoreForceLayout")}}),m=t.getBoundingRect(),y=g_e(v,g,{rect:m,gravity:o.get("gravity"),friction:o.get("friction")});y.beforeStep(function(_,b){for(var S=0,x=_.length;S<x;S++)_[S].fixed&&gi(_[S].p,n.getNodeByIndex(S).getLayout())}),y.afterStep(function(_,b,S){for(var x=0,C=_.length;x<C;x++)_[x].fixed||n.getNodeByIndex(x).setLayout(_[x].p),i[a.getId(x)]=_[x].p;for(var x=0,C=b.length;x<C;x++){var D=b[x],I=n.getEdgeByIndex(x),M=D.n1.p,L=D.n2.p,N=I.getLayout();N=N?N.slice():[],N[0]=N[0]||[],N[1]=N[1]||[],gi(N[0],M),gi(N[1],L),+D.curveness&&(N[2]=[(M[0]+L[0])/2-(M[1]-L[1])*D.curveness,(M[1]+L[1])/2-(L[0]-M[0])*D.curveness]),I.setLayout(N)}}),e.forceLayout=y,e.preservedPoints=i,y.step()}else e.forceLayout=null})}function y_e(r,e,t){var i=J(r.getBoxLayoutParams(),{aspect:t});return Ar(i,{width:e.getWidth(),height:e.getHeight()})}function __e(r,e){var t=[];return r.eachSeriesByType("graph",function(i){var n=i.get("coordinateSystem");if(!n||n==="view"){var a=i.getData(),s=a.mapArray(function(g){var m=a.getItemModel(g);return[+m.get("x"),+m.get("y")]}),o=[],l=[];s1(s,o,l),l[0]-o[0]===0&&(l[0]+=1,o[0]-=1),l[1]-o[1]===0&&(l[1]+=1,o[1]-=1);var u=(l[0]-o[0])/(l[1]-o[1]),c=y_e(i,e,u);isNaN(u)&&(o=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-o[0],d=l[1]-o[1],f=c.width,p=c.height,v=i.coordinateSystem=new vg;v.zoomLimit=i.get("scaleLimit"),v.setBoundingRect(o[0],o[1],h,d),v.setViewRect(c.x,c.y,f,p),v.setCenter(i.get("center"),e),v.setZoom(i.get("zoom")),t.push(v)}}),t}var kN=kr.prototype,AS=eg.prototype,Dq=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(Dq);function DS(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var b_e=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-line",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Dq},e.prototype.buildPath=function(t,i){DS(i)?kN.buildPath.call(this,t,i):AS.buildPath.call(this,t,i)},e.prototype.pointAt=function(t){return DS(this.shape)?kN.pointAt.call(this,t):AS.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var i=this.shape,n=DS(i)?[i.x2-i.x1,i.y2-i.y1]:AS.tangentAt.call(this,t);return Ef(n,n)},e}(Qe),ES=["fromSymbol","toSymbol"];function RN(r){return"_"+r+"Type"}function ON(r,e,t){var i=e.getItemVisual(t,r);if(!i||i==="none")return i;var n=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),s=e.getItemVisual(t,r+"Offset"),o=e.getItemVisual(t,r+"KeepAspect"),l=zf(n),u=hc(s||0,l);return i+l+u+(a||"")+(o||"")}function NN(r,e,t){var i=e.getItemVisual(t,r);if(!(!i||i==="none")){var n=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),s=e.getItemVisual(t,r+"Offset"),o=e.getItemVisual(t,r+"KeepAspect"),l=zf(n),u=hc(s||0,l),c=yr(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,o);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=r,c}}function T_e(r){var e=new b_e({name:"line",subPixelOptimize:!0});return F2(e.shape,r),e}function F2(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var fE=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;return a._createLine(t,i,n),a}return e.prototype._createLine=function(t,i,n){var a=t.hostModel,s=t.getItemLayout(i),o=T_e(s);o.shape.percent=0,Vt(o,{shape:{percent:1}},a,i),this.add(o),R(ES,function(l){var u=NN(l,t,i);this.add(u),this[RN(l)]=ON(l,t,i)},this),this._updateCommonStl(t,i,n)},e.prototype.updateData=function(t,i,n){var a=t.hostModel,s=this.childOfName("line"),o=t.getItemLayout(i),l={shape:{}};F2(l.shape,o),ct(s,l,a,i),R(ES,function(u){var c=ON(u,t,i),h=RN(u);if(this[h]!==c){this.remove(this.childOfName(u));var d=NN(u,t,i);this.add(d)}this[h]=c},this),this._updateCommonStl(t,i,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,i,n){var a=t.hostModel,s=this.childOfName("line"),o=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,c=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,d=n&&n.focus,f=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(i),v=p.getModel("emphasis");o=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=v.get("disabled"),d=v.get("focus"),f=v.get("blurScope"),c=Nr(p)}var g=t.getItemVisual(i,"style"),m=g.stroke;s.useStyle(g),s.style.fill=null,s.style.strokeNoScale=!0,s.ensureState("emphasis").style=o,s.ensureState("blur").style=l,s.ensureState("select").style=u,R(ES,function(x){var C=this.childOfName(x);if(C){C.setColor(m),C.style.opacity=g.opacity;for(var D=0;D<Di.length;D++){var I=Di[D],M=s.getState(I);if(M){var L=M.style||{},N=C.ensureState(I),O=N.style||(N.style={});L.stroke!=null&&(O[C.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(O.opacity=L.opacity)}}C.markRedraw()}},this);var y=a.getRawValue(i);Jr(this,c,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(x,C){return a.getFormattedLabel(x,C,t.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(y==null?t.getName(i):isFinite(y)?er(y):y)+""});var _=this.getTextContent();if(_){var b=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=b.get("position")||"middle";var S=b.get("distance");ie(S)||(S=[S,S]),_.__labelDistance=S}this.setTextConfig({position:null,local:!0,inside:!1}),Yt(this,d,f,h)},e.prototype.highlight=function(){qs(this)},e.prototype.downplay=function(){js(this)},e.prototype.updateLayout=function(t,i){this.setLinePoints(t.getItemLayout(i))},e.prototype.setLinePoints=function(t){var i=this.childOfName("line");F2(i.shape,t),i.dirty()},e.prototype.beforeUpdate=function(){var t=this,i=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),a=t.getTextContent();if(!i&&!n&&(!a||a.ignore))return;for(var s=1,o=this.parent;o;)o.scaleX&&(s/=o.scaleX),o=o.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),d=gu([],h,c);Ef(d,d);function f(M,L){var N=M.__specifiedRotation;if(N==null){var O=l.tangentAt(L);M.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(O[1],O[0]))}else M.attr("rotation",N)}if(i&&(i.setPosition(c),f(i,0),i.scaleX=i.scaleY=s*u,i.markRedraw()),n&&(n.setPosition(h),f(n,1),n.scaleX=n.scaleY=s*u,n.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,v=void 0,g=a.__labelDistance,m=g[0]*s,y=g[1]*s,_=u/2,b=l.tangentAt(_),S=[b[1],-b[0]],x=l.pointAt(_);S[1]>0&&(S[0]=-S[0],S[1]=-S[1]);var C=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);h[0]<c[0]&&(D=Math.PI+D),a.rotation=D}var I=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":I=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":I=y,v="top";break;default:I=0,v="middle"}switch(a.__position){case"end":a.x=d[0]*m+h[0],a.y=d[1]*y+h[1],p=d[0]>.8?"left":d[0]<-.8?"right":"center",v=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":a.x=-d[0]*m+c[0],a.y=-d[1]*y+c[1],p=d[0]>.8?"right":d[0]<-.8?"left":"center",v=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*C+c[0],a.y=c[1]+I,p=b[0]<0?"right":"left",a.originX=-m*C,a.originY=-I;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=x[0],a.y=x[1]+I,p="center",a.originY=-I;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*C+h[0],a.y=h[1]+I,p=b[0]>=0?"right":"left",a.originX=m*C,a.originY=-I;break}a.scaleX=a.scaleY=s,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||p})}},e}(Le),dE=function(){function r(e){this.group=new Le,this._LineCtor=e||fE}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=e,a||n.removeAll();var s=BN(e);e.diff(a).add(function(o){t._doAdd(e,o,s)}).update(function(o,l){t._doUpdate(a,e,l,o,s)}).remove(function(o){n.remove(a.getItemGraphicEl(o))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,i){t.updateLayout(e,i)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=BN(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(o){!o.isGroup&&!S_e(o)&&(o.incremental=!0,o.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var a=t.getItemLayout(n);if(IS(a)){var s=new this._LineCtor(t,n,this._seriesScope);s.traverse(i),this.group.add(s),t.setItemGraphicEl(n,s),this._progressiveEls.push(s)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){cl(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,i){var n=e.getItemLayout(t);if(IS(n)){var a=new this._LineCtor(e,t,i);e.setItemGraphicEl(t,a),this.group.add(a)}},r.prototype._doUpdate=function(e,t,i,n,a){var s=e.getItemGraphicEl(i);if(!IS(t.getItemLayout(n))){this.group.remove(s);return}s?s.updateData(t,n,a):s=new this._LineCtor(t,n,a),t.setItemGraphicEl(n,s),this.group.add(s)},r}();function S_e(r){return r.animators&&r.animators.length>0}function BN(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Nr(e)}}function FN(r){return isNaN(r[0])||isNaN(r[1])}function IS(r){return r&&!FN(r[0])&&!FN(r[1])}var PS=[],MS=[],LS=[],Yc=Ur,kS=Bu,UN=Math.abs;function VN(r,e,t){for(var i=r[0],n=r[1],a=r[2],s=1/0,o,l=t*t,u=.1,c=.1;c<=.9;c+=.1){PS[0]=Yc(i[0],n[0],a[0],c),PS[1]=Yc(i[1],n[1],a[1],c);var h=UN(kS(PS,e)-l);h<s&&(s=h,o=c)}for(var d=0;d<32;d++){var f=o+u;MS[0]=Yc(i[0],n[0],a[0],o),MS[1]=Yc(i[1],n[1],a[1],o),LS[0]=Yc(i[0],n[0],a[0],f),LS[1]=Yc(i[1],n[1],a[1],f);var h=kS(MS,e)-l;if(UN(h)<.01)break;var p=kS(LS,e)-l;u/=2,h<0?p>=0?o=o+u:o=o-u:p>=0?o=o-u:o=o+u}return o}function RS(r,e){var t=[],i=lv,n=[[],[],[]],a=[[],[]],s=[];e/=2,r.eachEdge(function(o,l){var u=o.getLayout(),c=o.getVisual("fromSymbol"),h=o.getVisual("toSymbol");u.__original||(u.__original=[ks(u[0]),ks(u[1])],u[2]&&u.__original.push(ks(u[2])));var d=u.__original;if(u[2]!=null){if(gi(n[0],d[0]),gi(n[1],d[2]),gi(n[2],d[1]),c&&c!=="none"){var f=fp(o.node1),p=VN(n,d[0],f*e);i(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],i(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(h&&h!=="none"){var f=fp(o.node2),p=VN(n,d[1],f*e);i(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],i(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}gi(u[0],n[0]),gi(u[1],n[2]),gi(u[2],n[1])}else{if(gi(a[0],d[0]),gi(a[1],d[1]),gu(s,a[1],a[0]),Ef(s,s),c&&c!=="none"){var f=fp(o.node1);xw(a[0],a[0],s,f*e)}if(h&&h!=="none"){var f=fp(o.node2);xw(a[1],a[1],s,-f*e)}gi(u[0],a[0]),gi(u[1],a[1])}})}function zN(r){return r.type==="view"}var x_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){var n=new ug,a=new dE,s=this.group;this._controller=new pg(i.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(a.group),this._symbolDraw=n,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,i,n){var a=this,s=t.coordinateSystem;this._model=t;var o=this._symbolDraw,l=this._lineDraw,u=this.group;if(zN(s)){var c={x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY};this._firstRender?u.attr(c):ct(u,c,t)}RS(t.getGraph(),hp(t));var h=t.getData();o.updateData(h);var d=t.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),this._updateController(t,i,n),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p);var v=t.get("layout");h.graph.eachNode(function(_){var b=_.dataIndex,S=_.getGraphicEl(),x=_.getModel();if(S){S.off("drag").off("dragend");var C=x.get("draggable");C&&S.on("drag",function(I){switch(v){case"force":f.warmUp(),!a._layouting&&a._startForceLayoutIteration(f,p),f.setFixed(b),h.setItemLayout(b,[S.x,S.y]);break;case"circular":h.setItemLayout(b,[S.x,S.y]),_.setLayout({fixed:!0},!0),hE(t,"symbolSize",_,[I.offsetX,I.offsetY]),a.updateLayout(t);break;case"none":default:h.setItemLayout(b,[S.x,S.y]),cE(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(b)}),S.setDraggable(C,!!x.get("cursor"));var D=x.get(["emphasis","focus"]);D==="adjacency"&&(ke(S).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var b=_.getGraphicEl(),S=_.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(ke(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=h.getLayout("cx"),y=h.getLayout("cy");h.graph.eachNode(function(_){Aq(_,g,m,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,i){var n=this;(function a(){t.step(function(s){n.updateLayout(n._model),(n._layouting=!s)&&(i?n._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,i,n){var a=this,s=this._controller,o=this._controllerHost,l=this.group;if(s.setPointerChecker(function(u,c,h){var d=l.getBoundingRect();return d.applyTransform(l.transform),d.contain(c,h)&&!P1(u,n,t)}),!zN(t.coordinateSystem)){s.disable();return}s.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),s.off("pan").off("zoom").on("pan",function(u){tE(o,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){rE(o,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),RS(t.getGraph(),hp(t)),a._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,i=t.getData(),n=hp(t);i.eachItemGraphicEl(function(a,s){a&&a.setSymbolScale(n)})},e.prototype.updateLayout=function(t){RS(t.getGraph(),hp(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Ct);function Kc(r){return"_EC_"+r}var w_e=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var i=this._nodesMap;if(!i[Kc(e)]){var n=new iu(e,t);return n.hostGraph=this,this.nodes.push(n),i[Kc(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Kc(e)]},r.prototype.addEdge=function(e,t,i){var n=this._nodesMap,a=this._edgesMap;if(ut(e)&&(e=this.nodes[e]),ut(t)&&(t=this.nodes[t]),e instanceof iu||(e=n[Kc(e)]),t instanceof iu||(t=n[Kc(t)]),!(!e||!t)){var s=e.id+"-"+t.id,o=new Eq(e,t,i);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),a[s]=o,o}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof iu&&(e=e.id),t instanceof iu&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var i=this.nodes,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&e.call(t,i[a],a)},r.prototype.eachEdge=function(e,t){for(var i=this.edges,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(t,i[a],a)},r.prototype.breadthFirstTraverse=function(e,t,i,n){if(t instanceof iu||(t=this._nodesMap[Kc(t)]),!!t){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",s=0;s<this.nodes.length;s++)this.nodes[s].__visited=!1;if(!e.call(n,t,null))for(var o=[t];o.length;)for(var l=o.shift(),u=l[a],s=0;s<u.length;s++){var c=u[s],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(e.call(n,h,l))return;o.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,n=this.edges,a=0,s=i.length;a<s;a++)i[a].dataIndex=-1;for(var a=0,s=e.count();a<s;a++)i[e.getRawIndex(a)].dataIndex=a;t.filterSelf(function(o){var l=n[t.getRawIndex(o)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,s=n.length;a<s;a++)n[a].dataIndex=-1;for(var a=0,s=t.count();a<s;a++)n[t.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,i=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<i.length;n++){var a=i[n];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},r}(),iu=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var i=this.edges[t];i.dataIndex<0||(e.edge.push(i.dataIndex),e.node.push(i.node1.dataIndex,i.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=be(),t=be(),i=0;i<this.edges.length;i++){var n=this.edges[i];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var a=[n.node1],s=[n.node2],o=0;o<a.length;){var l=a[o];o++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),a.push(l.inEdges[u].node1)}for(o=0;o<s.length;){var c=s[o];o++,t.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)e.set(c.outEdges[u].dataIndex,!0),s.push(c.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),Eq=function(){function r(e,t,i){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=i??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,i=t.edgeData.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=be(),t=be();e.set(this.dataIndex,!0);for(var i=[this.node1],n=[this.node2],a=0;a<i.length;){var s=i[a];a++,t.set(s.dataIndex,!0);for(var o=0;o<s.inEdges.length;o++)e.set(s.inEdges[o].dataIndex,!0),i.push(s.inEdges[o].node1)}for(a=0;a<n.length;){var l=n[a];a++,t.set(l.dataIndex,!0);for(var o=0;o<l.outEdges.length;o++)e.set(l.outEdges[o].dataIndex,!0),n.push(l.outEdges[o].node2)}return{edge:e.keys(),node:t.keys()}},r}();function Iq(r,e){return{getValue:function(t){var i=this[r][e];return i.getStore().get(i.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,i){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,i)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,i){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,i)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}_r(iu,Iq("hostGraph","data"));_r(Eq,Iq("hostGraph","edgeData"));function Pq(r,e,t,i,n){for(var a=new w_e(i),s=0;s<r.length;s++)a.addNode(Gr(r[s].id,r[s].name,s),s);for(var o=[],l=[],u=0,s=0;s<e.length;s++){var c=e[s],h=c.source,d=c.target;a.addEdge(h,d,u)&&(l.push(c),o.push(Gr(wr(c.id,null),h+" > "+d)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=to(r,t);else{var v=ng.get(f),g=v?v.dimensions||[]:[];Xe(g,"value")<0&&g.concat(["value"]);var m=sg(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new wi(m,t),p.initData(r)}var y=new wi(["value"],t);return y.initData(l,o),n&&n(p,y),hq({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var C_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new dg(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ju(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,i){var n=t.edges||t.links||[],a=t.data||t.nodes||[],s=this;if(a&&n){h_e(this);var o=Pq(a,n,this,!0,l);return R(o.edges,function(u){f_e(u.node1,u.node2,this,u.dataIndex)},this),o.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=s._categoriesModels,g=p.getShallow("category"),m=v[g];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var h=yt.prototype.getModel;function d(p,v){var g=h.call(this,p,v);return g.resolveParentPath=f,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=d,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,i,n){if(n==="edge"){var a=this.getData(),s=this.getDataParams(t,n),o=a.graph.getEdgeByIndex(t),l=a.getName(o.node1.dataIndex),u=a.getName(o.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Br("nameValue",{name:c.join(" > "),value:s.value,noValue:s.value==null})}var h=e$({series:this,dataIndex:t,multipleSeries:i});return h},e.prototype._updateCategoriesData=function(){var t=oe(this.option.categories||[],function(n){return n.value!=null?n:J({value:0},n)}),i=new wi(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray(function(n){return i.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ot),A_e={type:"graphRoam",event:"graphRoam",update:"none"};function D_e(r){r.registerChartView(x_e),r.registerSeriesModel(C_e),r.registerProcessor(s_e),r.registerVisual(o_e),r.registerVisual(l_e),r.registerLayout(d_e),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,v_e),r.registerLayout(m_e),r.registerCoordinateSystem("graphView",{dimensions:vg.dimensions,create:__e}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},lr),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},lr),r.registerAction(A_e,function(e,t,i){t.eachComponent({mainType:"series",query:e},function(n){var a=n.coordinateSystem,s=nE(a,e,void 0,i);n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var E_e=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),I_e=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new E_e},e.prototype.buildPath=function(t,i){var n=Math.cos,a=Math.sin,s=i.r,o=i.width,l=i.angle,u=i.x-n(l)*o*(o>=s/3?1:2),c=i.y-a(l)*o*(o>=s/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(i.x+n(l)*o,i.y+a(l)*o),t.lineTo(i.x+n(i.angle)*s,i.y+a(i.angle)*s),t.lineTo(i.x-n(l)*o,i.y-a(l)*o),t.lineTo(u,c)},e}(Qe);function P_e(r,e){var t=r.get("center"),i=e.getWidth(),n=e.getHeight(),a=Math.min(i,n),s=ce(t[0],e.getWidth()),o=ce(t[1],e.getHeight()),l=ce(r.get("radius"),a/2);return{cx:s,cy:o,r:l}}function $m(r,e){var t=r==null?"":r+"";return e&&(pe(e)?t=e.replace("{value}",t):we(e)&&(t=e(r))),t}var M_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),s=P_e(t,n);this._renderMain(t,i,n,a,s),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,n,a,s){var o=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),d=h.get("roundCap"),f=d?K0:Ei,p=h.get("show"),v=h.getModel("lineStyle"),g=v.get("width"),m=[u,c];aD(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,b=[],S=0;p&&S<a.length;S++){var x=Math.min(Math.max(a[S][0],0),1);c=u+y*x;var C=new f({shape:{startAngle:_,endAngle:c,cx:s.cx,cy:s.cy,clockwise:l,r0:s.r-g,r:s.r},silent:!0});C.setStyle({fill:a[S][1]}),C.setStyle(v.getLineStyle(["color","width"])),b.push(C),_=c}b.reverse(),R(b,function(I){return o.add(I)});var D=function(I){if(I<=0)return a[0][1];var M;for(M=0;M<a.length;M++)if(a[M][0]>=I&&(M===0?0:a[M-1][0])<I)return a[M][1];return a[M-1][1]};this._renderTicks(t,i,n,D,s,u,c,l,g),this._renderTitleAndDetail(t,i,n,D,s),this._renderAnchor(t,s),this._renderPointer(t,i,n,D,s,u,c,l,g)},e.prototype._renderTicks=function(t,i,n,a,s,o,l,u,c){for(var h=this.group,d=s.cx,f=s.cy,p=s.r,v=+t.get("min"),g=+t.get("max"),m=t.getModel("splitLine"),y=t.getModel("axisTick"),_=t.getModel("axisLabel"),b=t.get("splitNumber"),S=y.get("splitNumber"),x=ce(m.get("length"),p),C=ce(y.get("length"),p),D=o,I=(l-o)/b,M=I/S,L=m.getModel("lineStyle").getLineStyle(),N=y.getModel("lineStyle").getLineStyle(),O=m.get("distance"),B,F,U=0;U<=b;U++){if(B=Math.cos(D),F=Math.sin(D),m.get("show")){var $=O?O+c:c,q=new kr({shape:{x1:B*(p-$)+d,y1:F*(p-$)+f,x2:B*(p-x-$)+d,y2:F*(p-x-$)+f},style:L,silent:!0});L.stroke==="auto"&&q.setStyle({stroke:a(U/b)}),h.add(q)}if(_.get("show")){var $=_.get("distance")+O,Z=$m(er(U/b*(g-v)+v),_.get("formatter")),te=a(U/b),Q=B*(p-x-$)+d,se=F*(p-x-$)+f,he=_.get("rotate"),ue=0;he==="radial"?(ue=-D+2*Math.PI,ue>Math.PI/2&&(ue+=Math.PI)):he==="tangential"?ue=-D-Math.PI/2:ut(he)&&(ue=he*Math.PI/180),ue===0?h.add(new lt({style:kt(_,{text:Z,x:Q,y:se,verticalAlign:F<-.8?"top":F>.8?"bottom":"middle",align:B<-.4?"left":B>.4?"right":"center"},{inheritColor:te}),silent:!0})):h.add(new lt({style:kt(_,{text:Z,x:Q,y:se,verticalAlign:"middle",align:"center"},{inheritColor:te}),silent:!0,originX:Q,originY:se,rotation:ue}))}if(y.get("show")&&U!==b){var $=y.get("distance");$=$?$+c:c;for(var Ie=0;Ie<=S;Ie++){B=Math.cos(D),F=Math.sin(D);var Oe=new kr({shape:{x1:B*(p-$)+d,y1:F*(p-$)+f,x2:B*(p-C-$)+d,y2:F*(p-C-$)+f},silent:!0,style:N});N.stroke==="auto"&&Oe.setStyle({stroke:a((U+Ie/S)/b)}),h.add(Oe),D+=M}D-=M}else D+=I}},e.prototype._renderPointer=function(t,i,n,a,s,o,l,u,c){var h=this.group,d=this._data,f=this._progressEls,p=[],v=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),y=t.getData(),_=y.mapDimension("value"),b=+t.get("min"),S=+t.get("max"),x=[b,S],C=[o,l];function D(M,L){var N=y.getItemModel(M),O=N.getModel("pointer"),B=ce(O.get("width"),s.r),F=ce(O.get("length"),s.r),U=t.get(["pointer","icon"]),$=O.get("offsetCenter"),q=ce($[0],s.r),Z=ce($[1],s.r),te=O.get("keepAspect"),Q;return U?Q=yr(U,q-B/2,Z-F,B,F,null,te):Q=new I_e({shape:{angle:-Math.PI/2,width:B,r:F,x:q,y:Z}}),Q.rotation=-(L+Math.PI/2),Q.x=s.cx,Q.y=s.cy,Q}function I(M,L){var N=g.get("roundCap"),O=N?K0:Ei,B=g.get("overlap"),F=B?g.get("width"):c/y.count(),U=B?s.r-F:s.r-(M+1)*F,$=B?s.r:s.r-M*F,q=new O({shape:{startAngle:o,endAngle:L,cx:s.cx,cy:s.cy,clockwise:u,r0:U,r:$}});return B&&(q.z2=S-y.get(_,M)%S),q}(m||v)&&(y.diff(d).add(function(M){var L=y.get(_,M);if(v){var N=D(M,o);Vt(N,{rotation:-((isNaN(+L)?C[0]:bt(L,x,C,!0))+Math.PI/2)},t),h.add(N),y.setItemGraphicEl(M,N)}if(m){var O=I(M,o),B=g.get("clip");Vt(O,{shape:{endAngle:bt(L,x,C,B)}},t),h.add(O),Yw(t.seriesIndex,y.dataType,M,O),p[M]=O}}).update(function(M,L){var N=y.get(_,M);if(v){var O=d.getItemGraphicEl(L),B=O?O.rotation:o,F=D(M,B);F.rotation=B,ct(F,{rotation:-((isNaN(+N)?C[0]:bt(N,x,C,!0))+Math.PI/2)},t),h.add(F),y.setItemGraphicEl(M,F)}if(m){var U=f[L],$=U?U.shape.endAngle:o,q=I(M,$),Z=g.get("clip");ct(q,{shape:{endAngle:bt(N,x,C,Z)}},t),h.add(q),Yw(t.seriesIndex,y.dataType,M,q),p[M]=q}}).execute(),y.each(function(M){var L=y.getItemModel(M),N=L.getModel("emphasis"),O=N.get("focus"),B=N.get("blurScope"),F=N.get("disabled");if(v){var U=y.getItemGraphicEl(M),$=y.getItemVisual(M,"style"),q=$.fill;if(U instanceof Wr){var Z=U.style;U.useStyle(J({image:Z.image,x:Z.x,y:Z.y,width:Z.width,height:Z.height},$))}else U.useStyle($),U.type!=="pointer"&&U.setColor(q);U.setStyle(L.getModel(["pointer","itemStyle"]).getItemStyle()),U.style.fill==="auto"&&U.setStyle("fill",a(bt(y.get(_,M),x,[0,1],!0))),U.z2EmphasisLift=0,Qr(U,L),Yt(U,O,B,F)}if(m){var te=p[M];te.useStyle(y.getItemVisual(M,"style")),te.setStyle(L.getModel(["progress","itemStyle"]).getItemStyle()),te.z2EmphasisLift=0,Qr(te,L),Yt(te,O,B,F)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,i){var n=t.getModel("anchor"),a=n.get("show");if(a){var s=n.get("size"),o=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),c=yr(o,i.cx-s/2+ce(l[0],i.r),i.cy-s/2+ce(l[1],i.r),s,s,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,i,n,a,s){var o=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),h=+t.get("max"),d=new Le,f=[],p=[],v=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){f[m]=new lt({silent:!0}),p[m]=new lt({silent:!0})}).update(function(m,y){f[m]=o._titleEls[y],p[m]=o._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),b=new Le,S=a(bt(_,[c,h],[0,1],!0)),x=y.getModel("title");if(x.get("show")){var C=x.get("offsetCenter"),D=s.cx+ce(C[0],s.r),I=s.cy+ce(C[1],s.r),M=f[m];M.attr({z2:g?0:2,style:kt(x,{x:D,y:I,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:S})}),b.add(M)}var L=y.getModel("detail");if(L.get("show")){var N=L.get("offsetCenter"),O=s.cx+ce(N[0],s.r),B=s.cy+ce(N[1],s.r),F=ce(L.get("width"),s.r),U=ce(L.get("height"),s.r),$=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:S,M=p[m],q=L.get("formatter");M.attr({z2:g?0:2,style:kt(L,{x:O,y:B,text:$m(_,q),width:isNaN(F)?null:F,height:isNaN(U)?null:U,align:"center",verticalAlign:"middle"},{inheritColor:$})}),nH(M,{normal:L},_,function(te){return $m(te,q)}),v&&aH(M,m,l,t,{getFormattedLabel:function(te,Q,se,he,ue,Ie){return $m(Ie?Ie.interpolatedValue:_,q)}}),b.add(M)}d.add(b)}),this.group.add(d),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(Ct),L_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return Hf(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Ot);function k_e(r){r.registerChartView(M_e),r.registerSeriesModel(L_e)}var R_e=["itemStyle","opacity"],O_e=function(r){j(e,r);function e(t,i){var n=r.call(this)||this,a=n,s=new Pi,o=new lt;return a.setTextContent(o),n.setTextGuideLine(s),n.updateData(t,i,!0),n}return e.prototype.updateData=function(t,i,n){var a=this,s=t.hostModel,o=t.getItemModel(i),l=t.getItemLayout(i),u=o.getModel("emphasis"),c=o.get(R_e);c=c??1,n||_a(a),a.useStyle(t.getItemVisual(i,"style")),a.style.lineJoin="round",n?(a.setShape({points:l.points}),a.style.opacity=0,Vt(a,{style:{opacity:c}},s,i)):ct(a,{style:{opacity:c},shape:{points:l.points}},s,i),Qr(a,o),this._updateLabel(t,i),Yt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i){var n=this,a=this.getTextGuideLine(),s=n.getTextContent(),o=t.hostModel,l=t.getItemModel(i),u=t.getItemLayout(i),c=u.label,h=t.getItemVisual(i,"style"),d=h.fill;Jr(s,Nr(l),{labelFetcher:t.hostModel,labelDataIndex:i,defaultOpacity:h.opacity,defaultText:t.getName(i)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:d,outsideFill:d});var f=c.linePoints;a.setShape({points:f}),n.textGuideLineConfig={anchor:f?new He(f[0][0],f[0][1]):null},ct(s,{style:{x:c.x,y:c.y}},o,i),s.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),$D(n,WD(l),{stroke:d})},e}(Ii),N_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this._data,o=this.group;a.diff(s).add(function(l){var u=new O_e(a,l);a.setItemGraphicEl(l,u),o.add(u)}).update(function(l,u){var c=s.getItemGraphicEl(u);c.updateData(a,l),o.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=s.getItemGraphicEl(l);vv(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Ct),B_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new dg(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,i){return Hf(this,{coordDimensions:["value"],encodeDefaulter:Ue(SD,this)})},e.prototype._defaultLabelLine=function(t){Ju(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var i=this.getData(),n=r.prototype.getDataParams.call(this,t),a=i.mapDimension("value"),s=i.getSum(a);return n.percent=s?+(i.get(a,t)/s*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ot);function F_e(r,e){return Ar(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function U_e(r,e){for(var t=r.mapDimension("value"),i=r.mapArray(t,function(l){return l}),n=[],a=e==="ascending",s=0,o=r.count();s<o;s++)n[s]=s;return we(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return a?i[l]-i[u]:i[u]-i[l]}),n}function V_e(r){var e=r.hostModel,t=e.get("orient");r.each(function(i){var n=r.getItemModel(i),a=n.getModel("label"),s=a.get("position"),o=n.getModel("labelLine"),l=r.getItemLayout(i),u=l.points,c=s==="inner"||s==="inside"||s==="center"||s==="insideLeft"||s==="insideRight",h,d,f,p;if(c)s==="insideLeft"?(d=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,h="left"):s==="insideRight"?(d=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,h="right"):(d=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[d,f],[d,f]];else{var v=void 0,g=void 0,m=void 0,y=void 0,_=o.get("length");s==="left"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=v-_,d=m-5,h="right"):s==="right"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=v+_,d=m+5,h="left"):s==="top"?(v=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=g-_,f=y-5,h="center"):s==="bottom"?(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=g+_,f=y+5,h="center"):s==="rightTop"?(v=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(y=g-_,f=y-5,h="center"):(m=v+_,d=m+5,h="top")):s==="rightBottom"?(v=u[2][0],g=u[2][1],t==="horizontal"?(y=g+_,f=y+5,h="center"):(m=v+_,d=m+5,h="bottom")):s==="leftTop"?(v=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(y=g-_,f=y-5,h="center"):(m=v-_,d=m-5,h="right")):s==="leftBottom"?(v=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(y=g+_,f=y+5,h="center"):(m=v-_,d=m-5,h="right")):(v=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(y=g+_,f=y+5,h="center"):(m=v+_,d=m+5,h="left")),t==="horizontal"?(m=v,d=m):(y=g,f=y),p=[[v,g],[m,y]]}l.label={linePoints:p,x:d,y:f,verticalAlign:"middle",textAlign:h,inside:c}})}function z_e(r,e){r.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),a=t.get("sort"),s=F_e(t,e),o=t.get("orient"),l=s.width,u=s.height,c=U_e(i,a),h=s.x,d=s.y,f=o==="horizontal"?[ce(t.get("minSize"),u),ce(t.get("maxSize"),u)]:[ce(t.get("minSize"),l),ce(t.get("maxSize"),l)],p=i.getDataExtent(n),v=t.get("min"),g=t.get("max");v==null&&(v=Math.min(p[0],0)),g==null&&(g=p[1]);var m=t.get("funnelAlign"),y=t.get("gap"),_=o==="horizontal"?l:u,b=(_-y*(i.count()-1))/i.count(),S=function(B,F){if(o==="horizontal"){var U=i.get(n,B)||0,$=bt(U,[v,g],f,!0),q=void 0;switch(m){case"top":q=d;break;case"center":q=d+(u-$)/2;break;case"bottom":q=d+(u-$);break}return[[F,q],[F,q+$]]}var Z=i.get(n,B)||0,te=bt(Z,[v,g],f,!0),Q;switch(m){case"left":Q=h;break;case"center":Q=h+(l-te)/2;break;case"right":Q=h+l-te;break}return[[Q,F],[Q+te,F]]};a==="ascending"&&(b=-b,y=-y,o==="horizontal"?h+=l:d+=u,c=c.reverse());for(var x=0;x<c.length;x++){var C=c[x],D=c[x+1],I=i.getItemModel(C);if(o==="horizontal"){var M=I.get(["itemStyle","width"]);M==null?M=b:(M=ce(M,l),a==="ascending"&&(M=-M));var L=S(C,h),N=S(D,h+M);h+=M+y,i.setItemLayout(C,{points:L.concat(N.slice().reverse())})}else{var O=I.get(["itemStyle","height"]);O==null?O=b:(O=ce(O,u),a==="ascending"&&(O=-O));var L=S(C,d),N=S(D,d+O);d+=O+y,i.setItemLayout(C,{points:L.concat(N.slice().reverse())})}}V_e(i)})}function G_e(r){r.registerChartView(N_e),r.registerSeriesModel(B_e),r.registerLayout(z_e),r.registerProcessor(fg("funnel"))}var H_e=.3,$_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Le,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,i,n,a){this._progressiveEls=null;var s=this._dataGroup,o=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,h=HN(t);o.diff(l).add(d).update(f).remove(p).execute();function d(g){var m=GN(o,s,g,c,u);OS(m,o,g,h)}function f(g,m){var y=l.getItemGraphicEl(m),_=Mq(o,g,c,u);o.setItemGraphicEl(g,y),ct(y,{shape:{points:_}},t,g),_a(y),OS(y,o,g,h)}function p(g){var m=l.getItemGraphicEl(g);s.remove(m)}if(!this._initialized){this._initialized=!0;var v=W_e(u,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(v)}this._data=o},e.prototype.incrementalPrepareRender=function(t,i,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,i,n){for(var a=i.getData(),s=i.coordinateSystem,o=s.dimensions,l=HN(i),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var h=GN(a,this._dataGroup,c,o,s);h.incremental=!0,OS(h,a,c,l),u.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(Ct);function W_e(r,e,t){var i=r.model,n=r.getRect(),a=new st({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),s=i.get("layout")==="horizontal"?"width":"height";return a.setShape(s,0),Vt(a,{shape:{width:n.width,height:n.height}},e,t),a}function Mq(r,e,t,i){for(var n=[],a=0;a<t.length;a++){var s=t[a],o=r.get(r.mapDimension(s),e);q_e(o,i.getAxis(s).type)||n.push(i.dataToPoint(o,s))}return n}function GN(r,e,t,i,n){var a=Mq(r,t,i,n),s=new Pi({shape:{points:a},z2:10});return e.add(s),r.setItemGraphicEl(t,s),s}function HN(r){var e=r.get("smooth",!0);return e===!0&&(e=H_e),e=Ws(e),ov(e)&&(e=0),{smooth:e}}function OS(r,e,t,i){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",i.smooth);var n=e.getItemModel(t),a=n.getModel("emphasis");Qr(r,n,"lineStyle"),Yt(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function q_e(r,e){return e==="category"?r==null:r==null||isNaN(r)}var j_e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,i){return to(null,this,{useEncodeDefaulter:ge(X_e,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var i=this.coordinateSystem,n=this.getData(),a=[];return i.eachActiveState(n,function(s,o){t===s&&a.push(n.getRawIndex(o))}),a},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(Ot);function X_e(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return R(e.dimensions,function(i){var n=Y_e(i);t[i]=n}),t}}function Y_e(r){return+r.replace("dim","")}var K_e=["lineStyle","opacity"],Z_e={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,i={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,a){t.eachActiveState(a,function(s,o){var l=i[s];if(s==="normal"&&a.hasItemOption){var u=a.getItemModel(o).get(K_e,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(o,"style");c.opacity=l},n.start,n.end)}}}};function Q_e(r){J_e(r),e1e(r)}function J_e(r){if(!r.parallel){var e=!1;R(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function e1e(r){var e=xt(r.parallelAxis);R(e,function(t){if(De(t)){var i=t.parallelIndex||0,n=xt(r.parallel)[i];n&&n.parallelAxisDefault&&We(t,n.parallelAxisDefault,!1)}})}var t1e=5,r1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this._model=t,this._api=n,this._handlers||(this._handlers={},R(i1e,function(a,s){n.getZr().on(s,this._handlers[s]=ge(a,this))},this)),Vf(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,i){_v(this,"_throttledDispatchExpand"),R(this._handlers,function(n,a){i.getZr().off(a,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(J({type:"parallelAxisExpand"},t))},e.type="parallel",e}($t),i1e={mousedown:function(r){NS(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(NS(this,"click")&&e){var t=[r.offsetX,r.offsetY],i=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(i>t1e)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!NS(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function NS(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var n1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&&We(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var n=t.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],n=St(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(n,function(a){t.push("dim"+a.get("dim")),i.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(tt),a1e=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,t,i,n)||this;return o.type=a||"value",o.axisIndex=s,o}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(xa);function vc(r,e,t,i,n,a){r=r||0;var s=t[1]-t[0];if(n!=null&&(n=Zc(n,[0,s])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var o=Math.abs(e[1]-e[0]);o=Zc(o,[0,s]),n=a=Zc(o,[n,a]),i=0}e[0]=Zc(e[0],t),e[1]=Zc(e[1],t);var l=BS(e,i);e[i]+=r;var u=n||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[i]=Zc(e[i],c);var h;return h=BS(e,i),n!=null&&(h.sign!==l.sign||h.span<n)&&(e[1-i]=e[i]+l.sign*n),h=BS(e,i),a!=null&&h.span>a&&(e[1-i]=e[i]+h.sign*a),e}function BS(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Zc(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var FS=R,Lq=Math.min,kq=Math.max,$N=Math.floor,s1e=Math.ceil,WN=er,o1e=Math.PI,l1e=function(){function r(e,t,i){this.type="parallel",this._axesMap=be(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var n=e.dimensions,a=e.parallelAxisIndex;FS(n,function(s,o){var l=a[o],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(s,new a1e(s,E1(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,n=t.layoutBase,a=t.pixelDimIndex,s=e[1-a],o=e[a];return s>=i&&s<=i+t.axisLength&&o>=n&&o<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var n=i.getData();FS(this.dimensions,function(a){var s=this._axesMap.get(a);s.scale.unionExtentFromData(n,n.mapDimension(a)),hf(s.scale,s.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Ar(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],n=["width","height"],a=e.get("layout"),s=a==="horizontal"?0:1,o=t[n[s]],l=[0,o],u=this.dimensions.length,c=Wm(e.get("axisExpandWidth"),l),h=Wm(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&o>0,f=e.get("axisExpandWindow"),p;if(f)p=Wm(f[1]-f[0],l),f[1]=f[0]+p;else{p=Wm(c*(h-1),l);var v=e.get("axisExpandCenter")||$N(u/2);f=[c*v-p/2],f[1]=f[0]+p}var g=(o-p)/(u-h);g<3&&(g=0);var m=[$N(WN(f[0]/c,1))+1,s1e(WN(f[1]/c,1))-1],y=g/c*f[0];return{layout:a,pixelDimIndex:s,layoutBase:t[i[s]],layoutLength:o,axisBase:t[i[1-s]],axisLength:t[n[1-s]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;t.each(function(s){var o=[0,n.axisLength],l=s.inverse?1:0;s.setExtent(o[l],o[1-l])}),FS(i,function(s,o){var l=(n.axisExpandable?c1e:u1e)(o,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:o1e/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],d=c[a],f=vn();uc(f,f,d),ss(f,f,h),this._axesLayout[s]={position:h,rotation:d,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,i,n){i==null&&(i=0),n==null&&(n=e.count());var a=this._axesMap,s=this.dimensions,o=[],l=[];R(s,function(g){o.push(e.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),c=i;c<n;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var d=e.getValues(o,c),f=0,p=s.length;f<p;f++){var v=l[f].getActiveState(d[f]);if(v==="inactive"){h="inactive";break}}}t(h,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,i=!1,n=0,a=e.length;n<a;n++)t.get(e[n]).model.getActiveState()!=="normal"&&(i=!0);return i},r.prototype.axisCoordToPoint=function(e,t){var i=this._axesLayout[t];return ma([e,0],i.transform)},r.prototype.getAxisLayout=function(e){return Ee(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,n=t.axisExpandWindow.slice(),a=n[1]-n[0],s=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var o=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),d=h[0]!=null;if(c)d&&c&&o<a*h[0]?(u="jump",l=o-a*h[2]):d&&c&&o>a*(1-h[0])?(u="jump",l=o-a*(1-h[2])):(l=o-a*h[1])>=0&&(l=o-a*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?vc(l,n,s,"all"):u="none";else{var f=n[1]-n[0],p=s[1]*o/f;n=[kq(0,p-f/2)],n[1]=Lq(s[1],n[0]+f),n[0]=n[1]-f}return{axisExpandWindow:n,behavior:u}},r}();function Wm(r,e){return Lq(kq(r,e[0]),e[1])}function u1e(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function c1e(r,e){var t=e.layoutLength,i=e.axisExpandWidth,n=e.axisCount,a=e.axisCollapseWidth,s=e.winInnerIndices,o,l=a,u=!1,c;return r<s[0]?(o=r*a,c=a):r<=s[1]?(o=e.axisExpandWindow0Pos+r*i-e.axisExpandWindow[0],l=i,u=!0):(o=t-(n-1-r)*a,c=a),{position:o,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function h1e(r,e){var t=[];return r.eachComponent("parallel",function(i,n){var a=new l1e(i,r,e);a.name="parallel_"+n,a.resize(i,e),i.coordinateSystem=a,a.model=i,t.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="parallel"){var n=i.getReferringComponents("parallel",mr).models[0];i.coordinateSystem=n.coordinateSystem}}),t}var f1e={create:h1e},U2=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return tc([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var i=this.activeIntervals=Ee(t);if(i)for(var n=i.length-1;n>=0;n--)Hn(i[n])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var a=0,s=i.length;a<s;a++)if(i[a][0]<=t&&t<=i[a][1])return"active";return"inactive"},e}(tt);_r(U2,og);var nc=!0,Mv=Math.min,pf=Math.max,d1e=Math.pow,p1e=1e4,v1e=6,g1e=6,qN="globalPan",m1e={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},y1e={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},jN={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},_1e=0,pE=function(r){j(e,r);function e(t){var i=r.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=t,i.group=new Le,i._uid="brushController_"+_1e++,R(A1e,function(n,a){this._handlers[a]=ge(n,this)},i),i}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var i=this._zr;this._enableGlobalPan||uye(i,qN,this._uid),R(this._handlers,function(n,a){i.on(a,n)}),this._brushType=t.brushType,this._brushOption=We(Ee(jN),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;cye(t,qN,this._uid),R(this._handlers,function(i,n){t.off(n,i)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var i=this._panels={};R(t,function(n){i[n.panelId]=Ee(n)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var i=this.group;return this._zr.add(i),i.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=i.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=oe(t,function(d){return We(Ee(jN),d,!0)});var i="\0-brush-index-",n=this._covers,a=this._covers=[],s=this,o=this._creatingCover;return new Xs(n,t,u,l).add(c).update(c).remove(h).execute(),this;function l(d,f){return(d.id!=null?d.id:i+f)+"-"+d.brushType}function u(d,f){return l(d.__brushOption,f)}function c(d,f){var p=t[d];if(f!=null&&n[f]===o)a[d]=n[f];else{var v=a[d]=f!=null?(n[f].__brushOption=p,n[f]):Oq(s,Rq(s,p));vE(s,v)}}function h(d){n[d]!==o&&s.group.remove(n[d])}},e.prototype.unmount=function(){return this.enableBrush(!1),V2(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(Zn);function Rq(r,e){var t=R1[e.brushType].createCover(r,e);return t.__brushOption=e,Bq(t,e),r.group.add(t),t}function Oq(r,e){var t=gE(e);return t.endCreating&&(t.endCreating(r,e),Bq(e,e.__brushOption)),e}function Nq(r,e){var t=e.__brushOption;gE(e).updateCoverShape(r,e,t.range,t)}function Bq(r,e){var t=e.z;t==null&&(t=p1e),r.traverse(function(i){i.z=t,i.z2=t})}function vE(r,e){gE(e).updateCommon(r,e),Nq(r,e)}function gE(r){return R1[r.__brushOption.brushType]}function mE(r,e,t){var i=r._panels;if(!i)return nc;var n,a=r._transform;return R(i,function(s){s.isTargetByCursor(e,t,a)&&(n=s)}),n}function Fq(r,e){var t=r._panels;if(!t)return nc;var i=e.__brushOption.panelId;return i!=null?t[i]:nc}function V2(r){var e=r._covers,t=e.length;return R(e,function(i){r.group.remove(i)},r),e.length=0,!!t}function ac(r,e){var t=oe(r._covers,function(i){var n=i.__brushOption,a=Ee(n.range);return{brushType:n.brushType,panelId:n.panelId,range:a}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function b1e(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],i=e[0],n=t[0]-i[0],a=t[1]-i[1],s=d1e(n*n+a*a,.5);return s>v1e}function Uq(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function Vq(r,e,t,i){var n=new Le;return n.add(new st({name:"main",style:yE(t),silent:!0,draggable:!0,cursor:"move",drift:Ue(XN,r,e,n,["n","s","w","e"]),ondragend:Ue(ac,e,{isEnd:!0})})),R(i,function(a){n.add(new st({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ue(XN,r,e,n,a),ondragend:Ue(ac,e,{isEnd:!0})}))}),n}function zq(r,e,t,i){var n=i.brushStyle.lineWidth||0,a=pf(n,g1e),s=t[0][0],o=t[1][0],l=s-n/2,u=o-n/2,c=t[0][1],h=t[1][1],d=c-a+n/2,f=h-a+n/2,p=c-s,v=h-o,g=p+n,m=v+n;ys(r,e,"main",s,o,p,v),i.transformable&&(ys(r,e,"w",l,u,a,m),ys(r,e,"e",d,u,a,m),ys(r,e,"n",l,u,g,a),ys(r,e,"s",l,f,g,a),ys(r,e,"nw",l,u,a,a),ys(r,e,"ne",d,u,a,a),ys(r,e,"sw",l,f,a,a),ys(r,e,"se",d,f,a,a))}function z2(r,e){var t=e.__brushOption,i=t.transformable,n=e.childAt(0);n.useStyle(yE(t)),n.attr({silent:!i,cursor:i?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var s=e.childOfName(a.join("")),o=a.length===1?G2(r,a[0]):S1e(r,a);s&&s.attr({silent:!i,invisible:!i,cursor:i?y1e[o]+"-resize":null})})}function ys(r,e,t,i,n,a,s){var o=e.childOfName(t);o&&o.setShape(w1e(_E(r,e,[[i,n],[i+a,n+s]])))}function yE(r){return Ce({strokeNoScale:!0},r.brushStyle)}function Gq(r,e,t,i){var n=[Mv(r,t),Mv(e,i)],a=[pf(r,t),pf(e,i)];return[[n[0],a[0]],[n[1],a[1]]]}function T1e(r){return Gu(r.group)}function G2(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=f1(t[e],T1e(r));return i[n]}function S1e(r,e){var t=[G2(r,e[0]),G2(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function XN(r,e,t,i,n,a){var s=t.__brushOption,o=r.toRectRange(s.range),l=Hq(e,n,a);R(i,function(u){var c=m1e[u];o[c[0]][c[1]]+=l[c[0]]}),s.range=r.fromRectRange(Gq(o[0][0],o[1][0],o[0][1],o[1][1])),vE(e,t),ac(e,{isEnd:!1})}function x1e(r,e,t,i){var n=e.__brushOption.range,a=Hq(r,t,i);R(n,function(s){s[0]+=a[0],s[1]+=a[1]}),vE(r,e),ac(r,{isEnd:!1})}function Hq(r,e,t){var i=r.group,n=i.transformCoordToLocal(e,t),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function _E(r,e,t){var i=Fq(r,e);return i&&i!==nc?i.clipPath(t,r._transform):Ee(t)}function w1e(r){var e=Mv(r[0][0],r[1][0]),t=Mv(r[0][1],r[1][1]),i=pf(r[0][0],r[1][0]),n=pf(r[0][1],r[1][1]);return{x:e,y:t,width:i-e,height:n-t}}function C1e(r,e,t){if(!(!r._brushType||D1e(r,e.offsetX,e.offsetY))){var i=r._zr,n=r._covers,a=mE(r,e,t);if(!r._dragging)for(var s=0;s<n.length;s++){var o=n[s].__brushOption;if(a&&(a===nc||o.panelId===a.panelId)&&R1[o.brushType].contain(n[s],t[0],t[1]))return}a&&i.setCursorStyle("crosshair")}}function H2(r){var e=r.event;e.preventDefault&&e.preventDefault()}function $2(r,e,t){return r.childOfName("main").contain(e,t)}function $q(r,e,t,i){var n=r._creatingCover,a=r._creatingPanel,s=r._brushOption,o;if(r._track.push(t.slice()),b1e(r)||n){if(a&&!n){s.brushMode==="single"&&V2(r);var l=Ee(s);l.brushType=YN(l.brushType,a),l.panelId=a===nc?null:a.panelId,n=r._creatingCover=Rq(r,l),r._covers.push(n)}if(n){var u=R1[YN(r._brushType,a)],c=n.__brushOption;c.range=u.getCreatingRange(_E(r,n,r._track)),i&&(Oq(r,n),u.updateCommon(r,n)),Nq(r,n),o={isEnd:i}}}else i&&s.brushMode==="single"&&s.removeOnClick&&mE(r,e,t)&&V2(r)&&(o={isEnd:i,removeOnClick:!0});return o}function YN(r,e){return r==="auto"?e.defaultBrushType:r}var A1e={mousedown:function(r){if(this._dragging)KN(this,r);else if(!r.target||!r.target.draggable){H2(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=mE(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,i=this.group.transformCoordToLocal(e,t);if(C1e(this,r,i),this._dragging){H2(r);var n=$q(this,r,i,!1);n&&ac(this,n)}},mouseup:function(r){KN(this,r)}};function KN(r,e){if(r._dragging){H2(e);var t=e.offsetX,i=e.offsetY,n=r.group.transformCoordToLocal(t,i),a=$q(r,e,n,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&ac(r,a)}}function D1e(r,e,t){var i=r._zr;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var R1={lineX:ZN(0),lineY:ZN(1),rect:{createCover:function(r,e){function t(i){return i}return Vq({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=Uq(r);return Gq(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,i){zq(r,e,t,i)},updateCommon:z2,contain:$2},polygon:{createCover:function(r,e){var t=new Le;return t.add(new Pi({name:"main",style:yE(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Ii({name:"main",draggable:!0,drift:Ue(x1e,r,e),ondragend:Ue(ac,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,i){e.childAt(0).setShape({points:_E(r,e,t)})},updateCommon:z2,contain:$2}};function ZN(r){return{createCover:function(e,t){return Vq({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=Uq(e),i=Mv(t[0][r],t[1][r]),n=pf(t[0][r],t[1][r]);return[i,n]},updateCoverShape:function(e,t,i,n){var a,s=Fq(e,t);if(s!==nc&&s.getLinearBrushOtherExtent)a=s.getLinearBrushOtherExtent(r);else{var o=e._zr;a=[0,[o.getWidth(),o.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),zq(e,t,l,n)},updateCommon:z2,contain:$2}}function Wq(r){return r=bE(r),function(e){return tH(e,r)}}function qq(r,e){return r=bE(r),function(t){var i=e??t,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function jq(r,e,t){var i=bE(r);return function(n,a){return i.contain(a[0],a[1])&&!P1(n,e,t)}}function bE(r){return qe.create(r)}var E1e=["axisLine","axisTickLabel","axisName"],I1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){r.prototype.init.apply(this,arguments),(this._brushController=new pE(i.getZr())).on("brush",ge(this._onBrush,this))},e.prototype.render=function(t,i,n,a){if(!P1e(t,i,a)){this.axisModel=t,this.api=n,this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new Le,this.group.add(this._axisGroup),!!t.get("show")){var o=L1e(t,i),l=o.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,h=t.axis.dim,d=l.getAxisLayout(h),f=J({strokeContainThreshold:c},d),p=new Ci(t,f);R(E1e,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,o,c,n),rg(s,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,n,a,s,o){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=qe.create({x:l[0],y:-s/2,width:u,height:s});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Wq(h),isTargetByCursor:jq(h,o,a),getLinearBrushOtherExtent:qq(h,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(M1e(n))},e.prototype._onBrush=function(t){var i=t.areas,n=this.axisModel,a=n.axis,s=oe(i,function(o){return[a.coordToData(o.range[0],!0),a.coordToData(o.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:s})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}($t);function P1e(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function M1e(r){var e=r.axis;return oe(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function L1e(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var k1e={type:"axisAreaSelect",event:"axisAreaSelected"};function R1e(r){r.registerAction(k1e,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var O1e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Xq(r){r.registerComponentView(r1e),r.registerComponentModel(n1e),r.registerCoordinateSystem("parallel",f1e),r.registerPreprocessor(Q_e),r.registerComponentModel(U2),r.registerComponentView(I1e),df(r,"parallel",U2,O1e),R1e(r)}function N1e(r){Ze(Xq),r.registerChartView($_e),r.registerSeriesModel(j_e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Z_e)}var B1e=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),F1e=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new B1e},e.prototype.buildPath=function(t,i){var n=i.extent;t.moveTo(i.x1,i.y1),t.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(t.lineTo(i.x2+n,i.y2),t.bezierCurveTo(i.cpx2+n,i.cpy2,i.cpx1+n,i.cpy1,i.x1+n,i.y1)):(t.lineTo(i.x2,i.y2+n),t.bezierCurveTo(i.cpx2,i.cpy2+n,i.cpx1,i.cpy1+n,i.x1,i.y1+n)),t.closePath()},e.prototype.highlight=function(){qs(this)},e.prototype.downplay=function(){js(this)},e}(Qe),U1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,i,n){var a=this,s=t.getGraph(),o=this.group,l=t.layoutInfo,u=l.width,c=l.height,h=t.getData(),d=t.getData("edge"),f=t.get("orient");this._model=t,o.removeAll(),o.x=l.x,o.y=l.y,s.eachEdge(function(p){var v=new F1e,g=ke(v);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),b=p.node1.getLayout(),S=p.node1.getModel(),x=S.get("localX"),C=S.get("localY"),D=p.node2.getLayout(),I=p.node2.getModel(),M=I.get("localX"),L=I.get("localY"),N=p.getLayout(),O,B,F,U,$,q,Z,te;v.shape.extent=Math.max(1,N.dy),v.shape.orient=f,f==="vertical"?(O=(x!=null?x*u:b.x)+N.sy,B=(C!=null?C*c:b.y)+b.dy,F=(M!=null?M*u:D.x)+N.ty,U=L!=null?L*c:D.y,$=O,q=B*(1-_)+U*_,Z=F,te=B*_+U*(1-_)):(O=(x!=null?x*u:b.x)+b.dx,B=(C!=null?C*c:b.y)+N.sy,F=M!=null?M*u:D.x,U=(L!=null?L*c:D.y)+N.ty,$=O*(1-_)+F*_,q=B,Z=O*_+F*(1-_),te=U),v.setShape({x1:O,y1:B,x2:F,y2:U,cpx1:$,cpy1:q,cpx2:Z,cpy2:te}),v.useStyle(y.getItemStyle()),QN(v.style,f,p);var Q=""+m.get("value"),se=Nr(m,"edgeLabel");Jr(v,se,{labelFetcher:{getFormattedLabel:function(Ie,Oe,Fe,me,ze,Pe){return t.getFormattedLabel(Ie,Oe,"edge",me,Qa(ze,se.normal&&se.normal.get("formatter"),Q),Pe)}},labelDataIndex:p.dataIndex,defaultText:Q}),v.setTextConfig({position:"inside"});var he=m.getModel("emphasis");Qr(v,m,"lineStyle",function(Ie){var Oe=Ie.getItemStyle();return QN(Oe,f,p),Oe}),o.add(v),d.setItemGraphicEl(p.dataIndex,v);var ue=he.get("focus");Yt(v,ue==="adjacency"?p.getAdjacentDataIndices():ue==="trajectory"?p.getTrajectoryDataIndices():ue,he.get("blurScope"),he.get("disabled"))}),s.eachNode(function(p){var v=p.getLayout(),g=p.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),b=g.get(["itemStyle","borderRadius"])||0,S=new st({shape:{x:m!=null?m*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:b},style:g.getModel("itemStyle").getItemStyle(),z2:10});Jr(S,Nr(g),{labelFetcher:{getFormattedLabel:function(C,D){return t.getFormattedLabel(C,D,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),S.disableLabelAnimation=!0,S.setStyle("fill",p.getVisual("color")),S.setStyle("decal",p.getVisual("style").decal),Qr(S,g),o.add(S),h.setItemGraphicEl(p.dataIndex,S),ke(S).dataType="node";var x=_.get("focus");Yt(S,x==="adjacency"?p.getAdjacentDataIndices():x==="trajectory"?p.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,v){var g=h.getItemModel(v);g.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&o.setClipPath(V1e(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Ct);function QN(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var i=t.node1.getVisual("color"),n=t.node2.getVisual("color");pe(i)&&pe(n)&&(r.fill=new tg(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:n,offset:1}]))}}function V1e(r,e,t){var i=new st({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Vt(i,{shape:{width:r.width+20}},e,t),i}var z1e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){var n=t.edges||t.links,a=t.data||t.nodes,s=t.levels;this.levelModels=[];for(var o=this.levelModels,l=0;l<s.length;l++)s[l].depth!=null&&s[l].depth>=0&&(o[s[l].depth]=new yt(s[l],this,i));if(a&&n){var u=Pq(a,n,this,!0,c);return u.data}function c(h,d){h.wrapMethod("getItemModel",function(f,p){var v=f.parentModel,g=v.getData().getItemLayout(p);if(g){var m=g.depth,y=v.levelModels[m];y&&(f.parentModel=y)}return f}),d.wrapMethod("getItemModel",function(f,p){var v=f.parentModel,g=v.getGraph().getEdgeByIndex(p),m=g.node1.getLayout();if(m){var y=m.depth,_=v.levelModels[y];_&&(f.parentModel=_)}return f})}},e.prototype.setNodePosition=function(t,i){var n=this.option.data||this.option.nodes,a=n[t];a.localX=i[0],a.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,i,n){function a(f){return isNaN(f)||f==null}if(n==="edge"){var s=this.getDataParams(t,n),o=s.data,l=s.value,u=o.source+" -- "+o.target;return Br("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),h=c.getLayout().value,d=this.getDataParams(t,n).data.name;return Br("nameValue",{name:d!=null?d+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,i){var n=r.prototype.getDataParams.call(this,t,i);if(n.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(t),s=a.getLayout().value;n.value=s}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ot);function G1e(r,e){r.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=H1e(t,e);t.layoutInfo=a;var s=a.width,o=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;W1e(u);var h=St(u,function(v){return v.getLayout().value===0}),d=h.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");$1e(u,c,i,n,s,o,d,f,p)})}function H1e(r,e){return Ar(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function $1e(r,e,t,i,n,a,s,o,l){q1e(r,e,t,n,a,o,l),K1e(r,e,a,n,i,s,o),abe(r,o)}function W1e(r){R(r,function(e){var t=Xo(e.outEdges,r_),i=Xo(e.inEdges,r_),n=e.getValue()||0,a=Math.max(t,i,n);e.setLayout({value:a},!0)})}function q1e(r,e,t,i,n,a,s){for(var o=[],l=[],u=[],c=[],h=0,d=0;d<e.length;d++)o[d]=1;for(var d=0;d<r.length;d++)l[d]=r[d].inEdges.length,l[d]===0&&u.push(r[d]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],g=v.hostGraph.data.getRawDataItem(v.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>f&&(f=g.depth),v.setLayout({depth:m?g.depth:h},!0),a==="vertical"?v.setLayout({dy:t},!0):v.setLayout({dx:t},!0);for(var y=0;y<v.outEdges.length;y++){var _=v.outEdges[y],b=e.indexOf(_);o[b]=0;var S=_.node2,x=r.indexOf(S);--l[x]===0&&c.indexOf(S)<0&&c.push(S)}}++h,u=c,c=[]}for(var d=0;d<o.length;d++)if(o[d]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var C=f>h-1?f:h-1;s&&s!=="left"&&j1e(r,s,a,C);var D=a==="vertical"?(n-t)/C:(i-t)/C;Y1e(r,D,a)}function Yq(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function j1e(r,e,t,i){if(e==="right"){for(var n=[],a=r,s=0;a.length;){for(var o=0;o<a.length;o++){var l=a[o];l.setLayout({skNodeHeight:s},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];n.indexOf(c.node1)<0&&n.push(c.node1)}}a=n,n=[],++s}R(r,function(h){Yq(h)||h.setLayout({depth:Math.max(0,i-h.getLayout().skNodeHeight)},!0)})}else e==="justify"&&X1e(r,i)}function X1e(r,e){R(r,function(t){!Yq(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function Y1e(r,e,t){R(r,function(i){var n=i.getLayout().depth*e;t==="vertical"?i.setLayout({y:n},!0):i.setLayout({x:n},!0)})}function K1e(r,e,t,i,n,a,s){var o=Z1e(r,s);Q1e(o,e,t,i,n,s),US(o,n,t,i,s);for(var l=1;a>0;a--)l*=.99,J1e(o,l,s),US(o,n,t,i,s),nbe(o,l,s),US(o,n,t,i,s)}function Z1e(r,e){var t=[],i=e==="vertical"?"y":"x",n=Ww(r,function(a){return a.getLayout()[i]});return n.keys.sort(function(a,s){return a-s}),R(n.keys,function(a){t.push(n.buckets.get(a))}),t}function Q1e(r,e,t,i,n,a){var s=1/0;R(r,function(o){var l=o.length,u=0;R(o,function(h){u+=h.getLayout().value});var c=a==="vertical"?(i-(l-1)*n)/u:(t-(l-1)*n)/u;c<s&&(s=c)}),R(r,function(o){R(o,function(l,u){var c=l.getLayout().value*s;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),R(e,function(o){var l=+o.getValue()*s;o.setLayout({dy:l},!0)})}function US(r,e,t,i,n){var a=n==="vertical"?"x":"y";R(r,function(s){s.sort(function(v,g){return v.getLayout()[a]-g.getLayout()[a]});for(var o,l,u,c=0,h=s.length,d=n==="vertical"?"dx":"dy",f=0;f<h;f++)l=s[f],u=c-l.getLayout()[a],u>0&&(o=l.getLayout()[a]+u,n==="vertical"?l.setLayout({x:o},!0):l.setLayout({y:o},!0)),c=l.getLayout()[a]+l.getLayout()[d]+e;var p=n==="vertical"?i:t;if(u=c-e-p,u>0){o=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:o},!0):l.setLayout({y:o},!0),c=o;for(var f=h-2;f>=0;--f)l=s[f],u=l.getLayout()[a]+l.getLayout()[d]+e-c,u>0&&(o=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:o},!0):l.setLayout({y:o},!0)),c=l.getLayout()[a]}})}function J1e(r,e,t){R(r.slice().reverse(),function(i){R(i,function(n){if(n.outEdges.length){var a=Xo(n.outEdges,ebe,t)/Xo(n.outEdges,r_);if(isNaN(a)){var s=n.outEdges.length;a=s?Xo(n.outEdges,tbe,t)/s:0}if(t==="vertical"){var o=n.getLayout().x+(a-al(n,t))*e;n.setLayout({x:o},!0)}else{var l=n.getLayout().y+(a-al(n,t))*e;n.setLayout({y:l},!0)}}})})}function ebe(r,e){return al(r.node2,e)*r.getValue()}function tbe(r,e){return al(r.node2,e)}function rbe(r,e){return al(r.node1,e)*r.getValue()}function ibe(r,e){return al(r.node1,e)}function al(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function r_(r){return r.getValue()}function Xo(r,e,t){for(var i=0,n=r.length,a=-1;++a<n;){var s=+e(r[a],t);isNaN(s)||(i+=s)}return i}function nbe(r,e,t){R(r,function(i){R(i,function(n){if(n.inEdges.length){var a=Xo(n.inEdges,rbe,t)/Xo(n.inEdges,r_);if(isNaN(a)){var s=n.inEdges.length;a=s?Xo(n.inEdges,ibe,t)/s:0}if(t==="vertical"){var o=n.getLayout().x+(a-al(n,t))*e;n.setLayout({x:o},!0)}else{var l=n.getLayout().y+(a-al(n,t))*e;n.setLayout({y:l},!0)}}})})}function abe(r,e){var t=e==="vertical"?"x":"y";R(r,function(i){i.outEdges.sort(function(n,a){return n.node2.getLayout()[t]-a.node2.getLayout()[t]}),i.inEdges.sort(function(n,a){return n.node1.getLayout()[t]-a.node1.getLayout()[t]})}),R(r,function(i){var n=0,a=0;R(i.outEdges,function(s){s.setLayout({sy:n},!0),n+=s.getLayout().dy}),R(i.inEdges,function(s){s.setLayout({ty:a},!0),a+=s.getLayout().dy})})}function sbe(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),i=t.nodes,n=t.edges;if(i.length){var a=1/0,s=-1/0;R(i,function(o){var l=o.getLayout().value;l<a&&(a=l),l>s&&(s=l)}),R(i,function(o){var l=new Or({type:"color",mappingMethod:"linear",dataExtent:[a,s],visual:e.get("color")}),u=l.mapValueToVisual(o.getLayout().value),c=o.getModel().get(["itemStyle","color"]);c!=null?(o.setVisual("color",c),o.setVisual("style",{fill:c})):(o.setVisual("color",u),o.setVisual("style",{fill:u}))})}n.length&&R(n,function(o){var l=o.getModel().get("lineStyle");o.setVisual("style",l)})})}function obe(r){r.registerChartView(U1e),r.registerSeriesModel(z1e),r.registerLayout(G1e),r.registerVisual(sbe),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Kq=function(){function r(){}return r.prototype.getInitialData=function(e,t){var i,n=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),s=n.get("type"),o=a.get("type"),l;s==="category"?(e.layout="horizontal",i=n.getOrdinalMeta(),l=!0):o==="category"?(e.layout="vertical",i=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],d=u[1-c],f=[n,a],p=f[c].get("type"),v=f[1-c].get("type"),g=e.data;if(g&&l){var m=[];R(g,function(b,S){var x;ie(b)?(x=b.slice(),b.unshift(S)):ie(b.value)?(x=J({},b),x.value=x.value.slice(),b.value.unshift(S)):x=b,m.push(x)}),e.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:W0(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:W0(v),dimsDef:y.slice()}];return Hf(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:Ue(DH,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),Zq=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Ot);_r(Zq,Kq,!0);var lbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this.group,o=this._data;this._data||s.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(o).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=JN(c,a,u,l,!0);a.setItemGraphicEl(u,h),s.add(h)}}).update(function(u,c){var h=o.getItemGraphicEl(c);if(!a.hasValue(u)){s.remove(h);return}var d=a.getItemLayout(u);h?(_a(h),Qq(d,h,a,u)):h=JN(d,a,u,l),s.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=o.getItemGraphicEl(u);c&&s.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var i=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(a){a&&i.remove(a)})},e.type="boxplot",e}(Ct),ube=function(){function r(){}return r}(),cbe=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new ube},e.prototype.buildPath=function(t,i){var n=i.points,a=0;for(t.moveTo(n[a][0],n[a][1]),a++;a<4;a++)t.lineTo(n[a][0],n[a][1]);for(t.closePath();a<n.length;a++)t.moveTo(n[a][0],n[a][1]),a++,t.lineTo(n[a][0],n[a][1])},e}(Qe);function JN(r,e,t,i,n){var a=r.ends,s=new cbe({shape:{points:n?hbe(a,i,r):a}});return Qq(r,s,e,t,n),s}function Qq(r,e,t,i,n){var a=t.hostModel,s=cc[n?"initProps":"updateProps"];s(e,{shape:{points:r.ends}},a,i),e.useStyle(t.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;var o=t.getItemModel(i),l=o.getModel("emphasis");Qr(e,o),Yt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function hbe(r,e,t){return oe(r,function(i){return i=i.slice(),i[e]=t.initBaseline,i})}var zp=R;function fbe(r){var e=dbe(r);zp(e,function(t){var i=t.seriesModels;i.length&&(pbe(t),zp(i,function(n,a){vbe(n,t.boxOffsetList[a],t.boxWidthList[a])}))})}function dbe(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(i){var n=i.getBaseAxis(),a=Xe(t,n);a<0&&(a=t.length,t[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(i)}),e}function pbe(r){var e=r.axis,t=r.seriesModels,i=t.length,n=r.boxWidthList=[],a=r.boxOffsetList=[],s=[],o;if(e.type==="category")o=e.getBandWidth();else{var l=0;zp(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();o=Math.abs(u[1]-u[0])/l}zp(t,function(p){var v=p.get("boxWidth");ie(v)||(v=[v,v]),s.push([ce(v[0],o)||0,ce(v[1],o)||0])});var c=o*.8-2,h=c/i*.3,d=(c-h*(i-1))/i,f=d/2-c/2;zp(t,function(p,v){a.push(f),f+=h+d,n.push(Math.min(Math.max(d,s[v][0]),s[v][1]))})}function vbe(r,e,t){var i=r.coordinateSystem,n=r.getData(),a=t/2,s=r.get("layout")==="horizontal"?0:1,o=1-s,l=["x","y"],u=n.mapDimension(l[s]),c=n.mapDimensionsAll(l[o]);if(u==null||c.length<5)return;for(var h=0;h<n.count();h++){var d=n.get(u,h),f=_(d,c[2],h),p=_(d,c[0],h),v=_(d,c[1],h),g=_(d,c[3],h),m=_(d,c[4],h),y=[];b(y,v,!1),b(y,g,!0),y.push(p,v,m,g),S(y,p),S(y,m),S(y,f),n.setItemLayout(h,{initBaseline:f[o],ends:y})}function _(x,C,D){var I=n.get(C,D),M=[];M[s]=x,M[o]=I;var L;return isNaN(x)||isNaN(I)?L=[NaN,NaN]:(L=i.dataToPoint(M),L[s]+=e),L}function b(x,C,D){var I=C.slice(),M=C.slice();I[s]+=a,M[s]-=a,D?x.push(I,M):x.push(M,I)}function S(x,C){var D=C.slice(),I=C.slice();D[s]-=a,I[s]+=a,x.push(D,I)}}function gbe(r,e){e=e||{};for(var t=[],i=[],n=e.boundIQR,a=n==="none"||n===0,s=0;s<r.length;s++){var o=Hn(r[s].slice()),l=pT(o,.25),u=pT(o,.5),c=pT(o,.75),h=o[0],d=o[o.length-1],f=(n??1.5)*(c-l),p=a?h:Math.max(h,l-f),v=a?d:Math.min(d,c+f),g=e.itemNameFormatter,m=we(g)?g({value:s}):pe(g)?g.replace("{value}",s+""):s+"";t.push([m,p,l,u,c,v]);for(var y=0;y<o.length;y++){var _=o[y];if(_<p||_>v){var b=[m,_];i.push(b)}}}return{boxData:t,outliers:i}}var mbe={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==ui){var i="";vt(i)}var n=gbe(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function ybe(r){r.registerSeriesModel(Zq),r.registerChartView(lbe),r.registerLayout(fbe),r.registerTransform(mbe)}var _be=["color","borderColor"],bbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,i,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,i,n,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,i):this._incrementalRenderNormal(t,i)},e.prototype.eachRendered=function(t){cl(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t){var i=t.getData(),n=this._data,a=this.group,s=i.getLayout("isSimpleBox"),o=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(n).add(function(c){if(i.hasValue(c)){var h=i.getItemLayout(c);if(o&&e3(u,h))return;var d=VS(h,c,!0);Vt(d,{shape:{points:h.ends}},t,c),zS(d,i,c,s),a.add(d),i.setItemGraphicEl(c,d)}}).update(function(c,h){var d=n.getItemGraphicEl(h);if(!i.hasValue(c)){a.remove(d);return}var f=i.getItemLayout(c);if(o&&e3(u,f)){a.remove(d);return}d?(ct(d,{shape:{points:f.ends}},t,c),_a(d)):d=VS(f),zS(d,i,c,s),a.add(d),i.setItemGraphicEl(c,d)}).remove(function(c){var h=n.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=i},e.prototype._renderLarge=function(t){this._clear(),t3(t,this.group);var i=t.get("clip",!0)?cg(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,i){for(var n=i.getData(),a=n.getLayout("isSimpleBox"),s;(s=t.next())!=null;){var o=n.getItemLayout(s),l=VS(o);zS(l,n,s,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){t3(i,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Ct),Tbe=function(){function r(){}return r}(),Sbe=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new Tbe},e.prototype.buildPath=function(t,i){var n=i.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Qe);function VS(r,e,t){var i=r.ends;return new Sbe({shape:{points:t?xbe(i,r):i},z2:100})}function e3(r,e){for(var t=!0,i=0;i<e.ends.length;i++)if(r.contain(e.ends[i][0],e.ends[i][1])){t=!1;break}return t}function zS(r,e,t,i){var n=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=i,Qr(r,n)}function xbe(r,e){return oe(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var wbe=function(){function r(){}return r}(),GS=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new wbe},e.prototype.buildPath=function(t,i){for(var n=i.points,a=0;a<n.length;)if(this.__sign===n[a++]){var s=n[a++];t.moveTo(s,n[a++]),t.lineTo(s,n[a++])}else a+=3},e}(Qe);function t3(r,e,t,i){var n=r.getData(),a=n.getLayout("largePoints"),s=new GS({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});e.add(s);var o=new GS({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});e.add(o);var l=new GS({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});e.add(l),HS(1,s,r),HS(-1,o,r),HS(0,l,r),i&&(s.incremental=!0,o.incremental=!0),t&&t.push(s,o)}function HS(r,e,t,i){var n=t.get(["itemStyle",r>0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(n=t.get(["itemStyle","borderColorDoji"]));var a=t.getModel("itemStyle").getItemStyle(_be);e.useStyle(a),e.style.fill=null,e.style.stroke=n}var Jq=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,i,n){var a=i.getItemLayout(t);return a&&n.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ot);_r(Jq,Kq,!0);function Cbe(r){!r||!ie(r.series)||R(r.series,function(e){De(e)&&e.type==="k"&&(e.type="candlestick")})}var Abe=["itemStyle","borderColor"],Dbe=["itemStyle","borderColor0"],Ebe=["itemStyle","borderColorDoji"],Ibe=["itemStyle","color"],Pbe=["itemStyle","color0"],Mbe={seriesType:"candlestick",plan:Uf(),performRawSeries:!0,reset:function(r,e){function t(a,s){return s.get(a>0?Ibe:Pbe)}function i(a,s){return s.get(a===0?Ebe:a>0?Abe:Dbe)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(a,s){for(var o;(o=a.next())!=null;){var l=s.getItemModel(o),u=s.getItemLayout(o).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=i(u,l)||c.fill;var h=s.ensureUniqueItemVisual(o,"style");J(h,c)}}}}}},Lbe={seriesType:"candlestick",plan:Uf(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),i=kbe(r,t),n=0,a=1,s=["x","y"],o=t.getDimensionIndex(t.mapDimension(s[n])),l=oe(t.mapDimensionsAll(s[a]),t.getDimensionIndex,t),u=l[0],c=l[1],h=l[2],d=l[3];if(t.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),o<0||l.length<4)return;return{progress:r.pipelineContext.large?p:f};function f(v,g){for(var m,y=g.getStore();(m=v.next())!=null;){var _=y.get(o,m),b=y.get(u,m),S=y.get(c,m),x=y.get(h,m),C=y.get(d,m),D=Math.min(b,S),I=Math.max(b,S),M=$(D,_),L=$(I,_),N=$(x,_),O=$(C,_),B=[];q(B,L,0),q(B,M,1),B.push(te(O),te(L),te(N),te(M));var F=g.getItemModel(m),U=!!F.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:r3(y,m,b,S,c,U),initBaseline:b>S?L[a]:M[a],ends:B,brushRect:Z(x,C,_)})}function $(Q,se){var he=[];return he[n]=se,he[a]=Q,isNaN(se)||isNaN(Q)?[NaN,NaN]:e.dataToPoint(he)}function q(Q,se,he){var ue=se.slice(),Ie=se.slice();ue[n]=xy(ue[n]+i/2,1,!1),Ie[n]=xy(Ie[n]-i/2,1,!0),he?Q.push(ue,Ie):Q.push(Ie,ue)}function Z(Q,se,he){var ue=$(Q,he),Ie=$(se,he);return ue[n]-=i/2,Ie[n]-=i/2,{x:ue[0],y:ue[1],width:i,height:Ie[1]-ue[1]}}function te(Q){return Q[n]=xy(Q[n],1),Q}}function p(v,g){for(var m=ja(v.count*4),y=0,_,b=[],S=[],x,C=g.getStore(),D=!!r.get(["itemStyle","borderColorDoji"]);(x=v.next())!=null;){var I=C.get(o,x),M=C.get(u,x),L=C.get(c,x),N=C.get(h,x),O=C.get(d,x);if(isNaN(I)||isNaN(N)||isNaN(O)){m[y++]=NaN,y+=3;continue}m[y++]=r3(C,x,M,L,c,D),b[n]=I,b[a]=N,_=e.dataToPoint(b,null,S),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,b[a]=O,_=e.dataToPoint(b,null,S),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function r3(r,e,t,i,n,a){var s;return t>i?s=-1:t<i?s=1:s=a?0:e>0?r.get(n,e-1)<=i?1:-1:1,s}function kbe(r,e){var t=r.getBaseAxis(),i,n=t.type==="category"?t.getBandWidth():(i=t.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=ce(Be(r.get("barMaxWidth"),n),n),s=ce(Be(r.get("barMinWidth"),1),n),o=r.get("barWidth");return o!=null?ce(o,n):Math.max(Math.min(n/2,a),s)}function Rbe(r){r.registerChartView(bbe),r.registerSeriesModel(Jq),r.registerPreprocessor(Cbe),r.registerVisual(Mbe),r.registerLayout(Lbe)}function i3(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var Obe=function(r){j(e,r);function e(t,i){var n=r.call(this)||this,a=new lg(t,i),s=new Le;return n.add(a),n.add(s),n.updateData(t,i),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var i=t.symbolType,n=t.color,a=t.rippleNumber,s=this.childAt(1),o=0;o<a;o++){var l=yr(i,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-o/a*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),s.add(l)}i3(s,t)},e.prototype.updateEffectAnimation=function(t){for(var i=this._effectCfg,n=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],s=0;s<a.length;s++){var o=a[s];if(i[o]!==t[o]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}i3(n,t)},e.prototype.highlight=function(){qs(this)},e.prototype.downplay=function(){js(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,i){var n=this,a=t.hostModel;this.childAt(0).updateData(t,i);var s=this.childAt(1),o=t.getItemModel(i),l=t.getItemVisual(i,"symbol"),u=zf(t.getItemVisual(i,"symbolSize")),c=t.getItemVisual(i,"style"),h=c&&c.fill,d=o.getModel("emphasis");s.setScale(u),s.traverse(function(g){g.setStyle("fill",h)});var f=hc(t.getItemVisual(i,"symbolOffset"),u);f&&(s.x=f[0],s.y=f[1]);var p=t.getItemVisual(i,"symbolRotate");s.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=a.get("showEffectOn"),v.rippleScale=o.get(["rippleEffect","scale"]),v.brushType=o.get(["rippleEffect","brushType"]),v.period=o.get(["rippleEffect","period"])*1e3,v.effectOffset=i/t.count(),v.z=a.getShallow("z")||0,v.zlevel=a.getShallow("zlevel")||0,v.symbolType=l,v.color=h,v.rippleEffectColor=o.get(["rippleEffect","color"]),v.rippleNumber=o.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?v.showEffectOn!=="render"&&n.startEffectAnimation(v):g==="normal"&&v.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=v,Yt(this,d.get("focus"),d.get("blurScope"),d.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Le),Nbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new ug(Obe)},e.prototype.render=function(t,i,n){var a=t.getData(),s=this._symbolDraw;s.updateData(a,{clipShape:this._getClipShape(t)}),this.group.add(s.group)},e.prototype._getClipShape=function(t){var i=t.coordinateSystem,n=i&&i.getArea&&i.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,i,n){var a=t.getData();this.group.dirty();var s=hg("").reset(t,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var i=t.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=lle(i.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(Ct),Bbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return to(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,i,n){return n.point(i.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(Ot);function Fbe(r){r.registerChartView(Nbe),r.registerSeriesModel(Bbe),r.registerLayout(hg("effectScatter"))}var ej=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;return a.add(a.createLine(t,i,n)),a._updateEffectSymbol(t,i),a}return e.prototype.createLine=function(t,i,n){return new fE(t,i,n)},e.prototype._updateEffectSymbol=function(t,i){var n=t.getItemModel(i),a=n.getModel("effect"),s=a.get("symbolSize"),o=a.get("symbol");ie(s)||(s=[s,s]);var l=t.getItemVisual(i,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==o&&(this.remove(c),c=yr(o,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=s[0],c.scaleY=s[1],c.setColor(u),this._symbolType=o,this._symbolScale=s,this._updateEffectAnimation(t,a,i))},e.prototype._updateEffectAnimation=function(t,i,n){var a=this.childAt(1);if(a){var s=t.getItemLayout(n),o=i.get("period")*1e3,l=i.get("loop"),u=i.get("roundTrip"),c=i.get("constantSpeed"),h=Gr(i.get("delay"),function(f){return f/t.count()*o/3});if(a.ignore=!0,this._updateAnimationPoints(a,s),c>0&&(o=this._getLineLength(a)/c*1e3),o!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var d=void 0;we(h)?d=h(n):d=h,a.__t>0&&(d=-o*a.__t),this._animateSymbol(a,o,d,l,u)}this._period=o,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,i,n,a,s){if(i>0){t.__t=0;var o=this,l=t.animate("",a).when(s?i*2:i,{__t:s?2:1}).delay(n).during(function(){o._updateSymbolPosition(t)});a||l.done(function(){o.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Ro(t.__p1,t.__cp1)+Ro(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,i){t.__p1=i[0],t.__p2=i[1],t.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(t,i,n){this.childAt(0).updateData(t,i,n),this._updateEffectSymbol(t,i)},e.prototype._updateSymbolPosition=function(t){var i=t.__p1,n=t.__p2,a=t.__cp1,s=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],l=o.slice(),u=Ur,c=Pw;o[0]=u(i[0],a[0],n[0],s),o[1]=u(i[1],a[1],n[1],s);var h=t.__t<1?c(i[0],a[0],n[0],s):c(n[0],a[0],i[0],1-s),d=t.__t<1?c(i[1],a[1],n[1],s):c(n[1],a[1],i[1],1-s);t.rotation=-Math.atan2(d,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Ro(l,o)*1.05,s===1&&(o[0]=l[0]+(o[0]-l[0])/2,o[1]=l[1]+(o[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Ro(i,o):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=o[0],t.y=o[1]},e.prototype.updateLayout=function(t,i){this.childAt(0).updateLayout(t,i);var n=t.getItemModel(i).getModel("effect");this._updateEffectAnimation(t,n,i)},e}(Le),tj=function(r){j(e,r);function e(t,i,n){var a=r.call(this)||this;return a._createPolyline(t,i,n),a}return e.prototype._createPolyline=function(t,i,n){var a=t.getItemLayout(i),s=new Pi({shape:{points:a}});this.add(s),this._updateCommonStl(t,i,n)},e.prototype.updateData=function(t,i,n){var a=t.hostModel,s=this.childAt(0),o={shape:{points:t.getItemLayout(i)}};ct(s,o,a,i),this._updateCommonStl(t,i,n)},e.prototype._updateCommonStl=function(t,i,n){var a=this.childAt(0),s=t.getItemModel(i),o=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,c=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var h=s.getModel("emphasis");o=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}a.useStyle(t.getItemVisual(i,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var d=a.ensureState("emphasis");d.style=o,Yt(this,l,u,c)},e.prototype.updateLayout=function(t,i){var n=this.childAt(0);n.setShape("points",t.getItemLayout(i))},e}(Le),Ube=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,i,n){return new tj(t,i,n)},e.prototype._updateAnimationPoints=function(t,i){this._points=i;for(var n=[0],a=0,s=1;s<i.length;s++){var o=i[s-1],l=i[s];a+=Ro(o,l),n.push(a)}if(a===0){this._length=0;return}for(var s=0;s<n.length;s++)n[s]/=a;this._offsets=n,this._length=a},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var i=t.__t<1?t.__t:2-t.__t,n=this._points,a=this._offsets,s=n.length;if(a){var o=this._lastFrame,l;if(i<this._lastFramePercent){var u=Math.min(o+1,s-1);for(l=u;l>=0&&!(a[l]<=i);l--);l=Math.min(l,s-2)}else{for(l=o;l<s&&!(a[l]>i);l++);l=Math.min(l-1,s-2)}var c=(i-a[l])/(a[l+1]-a[l]),h=n[l],d=n[l+1];t.x=h[0]*(1-c)+c*d[0],t.y=h[1]*(1-c)+c*d[1];var f=t.__t<1?d[0]-h[0]:h[0]-d[0],p=t.__t<1?d[1]-h[1]:h[1]-d[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,t.ignore=!1}},e}(ej),Vbe=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),zbe=function(r){j(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Vbe},e.prototype.buildPath=function(t,i){var n=i.segs,a=i.curveness,s;if(i.polyline)for(s=this._off;s<n.length;){var o=n[s++];if(o>0){t.moveTo(n[s++],n[s++]);for(var l=1;l<o;l++)t.lineTo(n[s++],n[s++])}}else for(s=this._off;s<n.length;){var u=n[s++],c=n[s++],h=n[s++],d=n[s++];if(t.moveTo(u,c),a>0){var f=(u+h)/2-(c-d)*a,p=(c+d)/2-(h-u)*a;t.quadraticCurveTo(f,p,h,d)}else t.lineTo(h,d)}this.incremental&&(this._off=s,this.notClear=!0)},e.prototype.findDataIndex=function(t,i){var n=this.shape,a=n.segs,s=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var h=a[u++],d=a[u++],f=1;f<c;f++){var p=a[u++],v=a[u++];if(Eo(h,d,p,v,o,t,i))return l}l++}else for(var l=0,u=0;u<a.length;){var h=a[u++],d=a[u++],p=a[u++],v=a[u++];if(s>0){var g=(h+p)/2-(d-v)*s,m=(d+v)/2-(p-h)*s;if(D9(h,d,g,m,p,v,o,t,i))return l}else if(Eo(h,d,p,v,o,t,i))return l;l++}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var s=this.hoverDataIdx=this.findDataIndex(t,i);return s>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.segs,a=1/0,s=1/0,o=-1/0,l=-1/0,u=0;u<n.length;){var c=n[u++],h=n[u++];a=Math.min(c,a),o=Math.max(c,o),s=Math.min(h,s),l=Math.max(h,l)}t=this._rect=new qe(a,s,o,l)}return t},e}(Qe),Gbe=function(){function r(){this.group=new Le}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var i=this._newAdded[0],n=t.getLayout("linesPoints"),a=i&&i.shape.segs;if(a&&a.length<2e4){var s=a.length,o=new Float32Array(s+n.length);o.set(a),o.set(n,s),i.setShape({segs:o})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new zbe({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,i){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("style");a&&a.stroke&&e.setStyle("stroke",a.stroke),e.setStyle("fill",null);var s=ke(e);s.seriesIndex=n.seriesIndex,e.on("mousemove",function(o){s.dataIndex=null;var l=e.hoverDataIdx;l>0&&(s.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),rj={seriesType:"lines",plan:Uf(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),i=r.pipelineContext.large;return{progress:function(n,a){var s=[];if(i){var o=void 0,l=n.end-n.start;if(t){for(var u=0,c=n.start;c<n.end;c++)u+=r.getLineCoordsCount(c);o=new Float32Array(l+u*2)}else o=new Float32Array(l*4);for(var h=0,d=[],c=n.start;c<n.end;c++){var f=r.getLineCoords(c,s);t&&(o[h++]=f);for(var p=0;p<f;p++)d=e.dataToPoint(s[p],!1,d),o[h++]=d[0],o[h++]=d[1]}a.setLayout("linesPoints",o)}else for(var c=n.start;c<n.end;c++){var v=a.getItemModel(c),f=r.getLineCoords(c,s),g=[];if(t)for(var m=0;m<f;m++)g.push(e.dataToPoint(s[m]));else{g[0]=e.dataToPoint(s[0]),g[1]=e.dataToPoint(s[1]);var y=v.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}a.setItemLayout(c,g)}}}}}},Hbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this._updateLineDraw(a,t),o=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=n.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(o).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),s.updateData(a);var h=t.get("clip",!0)&&cg(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),s=this._updateLineDraw(a,t);s.incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._lineDraw.incrementalUpdate(t,i.getData()),this._finished=t.end===i.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,i,n){var a=t.getData(),s=t.pipelineContext;if(!this._finished||s.large||s.progressiveRender)return{update:!0};var o=rj.reset(t,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,i){var n=this._lineDraw,a=this._showEffect(i),s=!!i.get("polyline"),o=i.pipelineContext,l=o.large;return(!n||a!==this._hasEffet||s!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new Gbe:new dE(s?a?Ube:tj:a?ej:fE),this._hasEffet=a,this._isPolyline=s,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var i=t.getZr(),n=i.painter.getType()==="svg";!n&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.type="lines",e}(Ct),$be=typeof Uint32Array>"u"?Array:Uint32Array,Wbe=typeof Float64Array>"u"?Array:Float64Array;function n3(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=oe(e,function(t){var i=[t[0].coord,t[1].coord],n={coords:i};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),WA([n,t[0],t[1]])}))}var qbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],n3(t);var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(n3(t),t.data){var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var i=this._processFlatCoordsArray(t.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=T0(this._flatCoords,i.flatCoords),this._flatCoordsOffset=T0(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),t.data=new Float32Array(i.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var i=this.getData().getItemModel(t),n=i.option instanceof Array?i.option:i.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,i){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],s=0;s<a;s++)i[s]=i[s]||[],i[s][0]=this._flatCoords[n+s*2],i[s][1]=this._flatCoords[n+s*2+1];return a}else{for(var o=this._getCoordsFromItemModel(t),s=0;s<o.length;s++)i[s]=i[s]||[],i[s][0]=o[s][0],i[s][1]=o[s][1];return o.length}},e.prototype._processFlatCoordsArray=function(t){var i=0;if(this._flatCoords&&(i=this._flatCoords.length),ut(t[0])){for(var n=t.length,a=new $be(n),s=new Wbe(n),o=0,l=0,u=0,c=0;c<n;){u++;var h=t[c++];a[l++]=o+i,a[l++]=h;for(var d=0;d<h;d++){var f=t[c++],p=t[c++];s[o++]=f,s[o++]=p}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:s,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,i){var n=new wi(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(a,s,o,l){if(a instanceof Array)return NaN;n.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=a.getItemModel(t),o=s.get("name");if(o)return o;var l=s.get("fromName"),u=s.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Br("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),i=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&i>0?i+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Ot);function qm(r){return r instanceof Array||(r=[r,r]),r}var jbe={seriesType:"lines",reset:function(r){var e=qm(r.get("symbol")),t=qm(r.get("symbolSize")),i=r.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",t&&t[0]),i.setVisual("toSymbolSize",t&&t[1]);function n(a,s){var o=a.getItemModel(s),l=qm(o.getShallow("symbol",!0)),u=qm(o.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(s,"fromSymbol",l[0]),l[1]&&a.setItemVisual(s,"toSymbol",l[1]),u[0]&&a.setItemVisual(s,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(s,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?n:null}}};function Xbe(r){r.registerChartView(Hbe),r.registerSeriesModel(qbe),r.registerLayout(rj),r.registerVisual(jbe)}var Ybe=256,Kbe=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=el.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,i,n,a,s){var o=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,d=h.getContext("2d"),f=e.length;h.width=t,h.height=i;for(var p=0;p<f;++p){var v=e[p],g=v[0],m=v[1],y=v[2],_=n(y);d.globalAlpha=_,d.drawImage(o,g-c,m-c)}if(!h.width||!h.height)return h;for(var b=d.getImageData(0,0,h.width,h.height),S=b.data,x=0,C=S.length,D=this.minOpacity,I=this.maxOpacity,M=I-D;x<C;){var _=S[x+3]/256,L=Math.floor(_*(Ybe-1))*4;if(_>0){var N=s(_)?l:u;_>0&&(_=_*M+D),S[x++]=N[L],S[x++]=N[L+1],S[x++]=N[L+2],S[x++]=N[L+3]*_*256}else x+=4}return d.putImageData(b,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=el.createCanvas()),t=this.pointSize+this.blurSize,i=t*2;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var i=this._gradientPixels,n=i[t]||(i[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],s=0,o=0;o<256;o++)e[t](o/255,!0,a),n[s++]=a[0],n[s++]=a[1],n[s++]=a[2],n[s++]=a[3];return n},r}();function Zbe(r,e,t){var i=r[1]-r[0];e=oe(e,function(s){return{interval:[(s.interval[0]-r[0])/i,(s.interval[1]-r[0])/i]}});var n=e.length,a=0;return function(s){var o;for(o=a;o<n;o++){var l=e[o].interval;if(l[0]<=s&&s<=l[1]){a=o;break}}if(o===n)for(o=a-1;o>=0;o--){var l=e[o].interval;if(l[0]<=s&&s<=l[1]){a=o;break}}return o>=0&&o<n&&t[o]}}function Qbe(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(i){return i>=e[0]&&i<=e[1]}}function a3(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Jbe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a;i.eachComponent("visualMap",function(o){o.eachTargetSeries(function(l){l===t&&(a=o)})}),this._progressiveEls=null,this.group.removeAll();var s=t.coordinateSystem;s.type==="cartesian2d"||s.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):a3(s)&&this._renderOnGeo(s,t,a,n)},e.prototype.incrementalPrepareRender=function(t,i,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,i,n,a){var s=i.coordinateSystem;s&&(a3(s)?this.render(i,n,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){cl(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,i,n,a,s){var o=t.coordinateSystem,l=dc(o,"cartesian2d"),u,c,h,d;if(l){var f=o.getAxis("x"),p=o.getAxis("y");u=f.getBandWidth()+.5,c=p.getBandWidth()+.5,h=f.scale.getExtent(),d=p.scale.getExtent()}for(var v=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),S=Nr(t),x=t.getModel("emphasis"),C=x.get("focus"),D=x.get("blurScope"),I=x.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],L=n;L<a;L++){var N=void 0,O=g.getItemVisual(L,"style");if(l){var B=g.get(M[0],L),F=g.get(M[1],L);if(isNaN(g.get(M[2],L))||isNaN(B)||isNaN(F)||B<h[0]||B>h[1]||F<d[0]||F>d[1])continue;var U=o.dataToPoint([B,F]);N=new st({shape:{x:U[0]-u/2,y:U[1]-c/2,width:u,height:c},style:O})}else{if(isNaN(g.get(M[1],L)))continue;N=new st({z2:1,shape:o.dataToRect([g.get(M[0],L)]).contentShape,style:O})}if(g.hasItemOption){var $=g.getItemModel(L),q=$.getModel("emphasis");m=q.getModel("itemStyle").getItemStyle(),y=$.getModel(["blur","itemStyle"]).getItemStyle(),_=$.getModel(["select","itemStyle"]).getItemStyle(),b=$.get(["itemStyle","borderRadius"]),C=q.get("focus"),D=q.get("blurScope"),I=q.get("disabled"),S=Nr($)}N.shape.r=b;var Z=t.getRawValue(L),te="-";Z&&Z[2]!=null&&(te=Z[2]+""),Jr(N,S,{labelFetcher:t,labelDataIndex:L,defaultOpacity:O.opacity,defaultText:te}),N.ensureState("emphasis").style=m,N.ensureState("blur").style=y,N.ensureState("select").style=_,Yt(N,C,D,I),N.incremental=s,s&&(N.states.emphasis.hoverLayer=!0),v.add(N),g.setItemGraphicEl(L,N),this._progressiveEls&&this._progressiveEls.push(N)}},e.prototype._renderOnGeo=function(t,i,n,a){var s=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new Kbe;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var c=t.getViewRect().clone(),h=t.getRoamTransform();c.applyTransform(h);var d=Math.max(c.x,0),f=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),v=Math.min(c.height+c.y,a.getHeight()),g=p-d,m=v-f,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(C,D,I){var M=t.dataToPoint([C,D]);return M[0]-=d,M[1]-=f,M.push(I),M}),b=n.getExtent(),S=n.type==="visualMap.continuous"?Qbe(b,n.option.range):Zbe(b,n.getPieceList(),n.option.selected);u.update(_,g,m,s.color.getNormalizer(),{inRange:s.color.getColorMapper(),outOfRange:o.color.getColorMapper()},S);var x=new Wr({style:{width:g,height:m,x:d,y:f,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Ct),eTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return to(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ng.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Ot);function tTe(r){r.registerChartView(Jbe),r.registerSeriesModel(eTe)}var rTe=["itemStyle","borderWidth"],s3=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],$S=new eo,iTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group,s=t.getData(),o=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),d={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:s3[+c],categoryDim:s3[1-+c]};s.diff(o).add(function(p){if(s.hasValue(p)){var v=l3(s,p),g=o3(s,p,v,d),m=u3(s,d,g);s.setItemGraphicEl(p,m),a.add(m),h3(m,d,g)}}).update(function(p,v){var g=o.getItemGraphicEl(v);if(!s.hasValue(p)){a.remove(g);return}var m=l3(s,p),y=o3(s,p,m,d),_=lj(s,y);g&&_!==g.__pictorialShapeStr&&(a.remove(g),s.setItemGraphicEl(p,null),g=null),g?cTe(g,d,y):g=u3(s,d,y,!0),s.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=y,a.add(g),h3(g,d,y)}).remove(function(p){var v=o.getItemGraphicEl(p);v&&c3(o,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var f=t.get("clip",!0)?cg(t.coordinateSystem,!1,t):null;return f?a.setClipPath(f):a.removeClipPath(),this._data=s,this.group},e.prototype.remove=function(t,i){var n=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(s){c3(a,ke(s).dataIndex,t,s)}):n.removeAll()},e.type="pictorialBar",e}(Ct);function o3(r,e,t,i){var n=r.getItemLayout(e),a=t.get("symbolRepeat"),s=t.get("symbolClip"),o=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),d={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:s,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};nTe(t,a,n,i,d),aTe(r,e,n,a,s,d.boundingLength,d.pxSign,c,i,d),sTe(t,d.symbolScale,u,i,d);var f=d.symbolSize,p=hc(t.get("symbolOffset"),f);return oTe(t,f,n,a,s,p,o,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function nTe(r,e,t,i,n){var a=i.valueDim,s=r.get("symbolBoundingData"),o=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=o.toGlobalCoord(o.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(ie(s)){var h=[WS(o,s[0])-l,WS(o,s[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else s!=null?c=WS(o,s)-l:e?c=i.coordSysExtent[a.index][u]-l:c=t[a.wh];n.boundingLength=c,e&&(n.repeatCutLength=t[a.wh]),n.pxSign=c>0?1:-1}function WS(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function aTe(r,e,t,i,n,a,s,o,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(t[h.wh]),f=r.getItemVisual(e,"symbolSize"),p;ie(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[h.index]=ce(p[h.index],d),p[c.index]=ce(p[c.index],i?d:Math.abs(a)),u.symbolSize=p;var v=u.symbolScale=[p[0]/o,p[1]/o];v[c.index]*=(l.isHorizontal?-1:1)*s}function sTe(r,e,t,i,n){var a=r.get(rTe)||0;a&&($S.attr({scaleX:e[0],scaleY:e[1],rotation:t}),$S.updateTransform(),a/=$S.getLineScale(),a*=e[i.valueDim.index]),n.valueLineWidth=a||0}function oTe(r,e,t,i,n,a,s,o,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,v=Math.max(e[f.index]+o,0),g=v;if(i){var m=Math.abs(l),y=Gr(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var b=ce(y,e[f.index]),S=Math.max(v+b*2,0),x=_?0:b*2,C=d9(i),D=C?i:f3((m+x)/S),I=m-D*v;b=I/2/(_?D:Math.max(D-1,1)),S=v+b*2,x=_?0:b*2,!C&&i!=="fixed"&&(D=u?f3((Math.abs(u)+x)/S):0),g=D*S-x,h.repeatTimes=D,h.symbolMargin=b}var M=p*(g/2),L=h.pathPosition=[];L[d.index]=t[d.wh]/2,L[f.index]=s==="start"?M:s==="end"?l-M:l/2,a&&(L[0]+=a[0],L[1]+=a[1]);var N=h.bundlePosition=[];N[d.index]=t[d.xy],N[f.index]=t[f.xy];var O=h.barRectShape=J({},t);O[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(L[f.index]+M)),O[d.wh]=t[d.wh];var B=h.clipShape={};B[d.xy]=-t[d.xy],B[d.wh]=c.ecSize[d.wh],B[f.xy]=0,B[f.wh]=t[f.wh]}function ij(r){var e=r.symbolPatternSize,t=yr(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function nj(r,e,t,i){var n=r.__pictorialBundle,a=t.symbolSize,s=t.valueLineWidth,o=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,h=a[e.valueDim.index]+s+t.symbolMargin*2;for(TE(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?Fh(v,null,p(c),t,i):Fh(v,null,{scaleX:0,scaleY:0},t,i,function(){n.remove(v)}),c++});c<u;c++){var d=ij(t);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,n.add(d);var f=p(c);Fh(d,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},t,i)}function p(v){var g=o.slice(),m=t.pxSign,y=v;return(t.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-v),g[l.index]=h*(y-u/2+.5)+o[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function aj(r,e,t,i){var n=r.__pictorialBundle,a=r.__pictorialMainPath;a?Fh(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(a=r.__pictorialMainPath=ij(t),n.add(a),Fh(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,i))}function sj(r,e,t){var i=J({},e.barRectShape),n=r.__pictorialBarRect;n?Fh(n,null,{shape:i},e,t):(n=r.__pictorialBarRect=new st({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function oj(r,e,t,i){if(t.symbolClip){var n=r.__pictorialClipPath,a=J({},t.clipShape),s=e.valueDim,o=t.animationModel,l=t.dataIndex;if(n)ct(n,{shape:a},o,l);else{a[s.wh]=0,n=new st({shape:a}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[s.wh]=t.clipShape[s.wh],cc[i?"updateProps":"initProps"](n,{shape:u},o,l)}}}function l3(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=lTe,t.isAnimationEnabled=uTe,t}function lTe(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function uTe(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function u3(r,e,t,i){var n=new Le,a=new Le;return n.add(a),n.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?nj(n,e,t):aj(n,e,t),sj(n,t,i),oj(n,e,t,i),n.__pictorialShapeStr=lj(r,t),n.__pictorialSymbolMeta=t,n}function cTe(r,e,t){var i=t.animationModel,n=t.dataIndex,a=r.__pictorialBundle;ct(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,n),t.symbolRepeat?nj(r,e,t,!0):aj(r,e,t,!0),sj(r,t,!0),oj(r,e,t,!0)}function c3(r,e,t,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];TE(i,function(s){a.push(s)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),R(a,function(s){rl(s,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(e,null)}function lj(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function TE(r,e,t){R(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&e.call(t,i)})}function Fh(r,e,t,i,n,a){e&&r.attr(e),i.symbolClip&&!n?t&&r.attr(t):t&&cc[n?"updateProps":"initProps"](r,t,i.animationModel,i.dataIndex,a)}function h3(r,e,t){var i=t.dataIndex,n=t.itemModel,a=n.getModel("emphasis"),s=a.getModel("itemStyle").getItemStyle(),o=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),d=a.get("scale");TE(r,function(v){if(v instanceof Wr){var g=v.style;v.useStyle(J({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else v.useStyle(t.style);var m=v.ensureState("emphasis");m.style=s,d&&(m.scaleX=v.scaleX*1.1,m.scaleY=v.scaleY*1.1),v.ensureState("blur").style=o,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Jr(p,Nr(n),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:ff(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),Yt(r,c,h,a.get("disabled"))}function f3(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var hTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=hl(Cv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Cv);function fTe(r){r.registerChartView(iTe),r.registerSeriesModel(hTe),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Ue(W$,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,q$("pictorialBar"))}var dTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,i,n){var a=t.getData(),s=this,o=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;o.x=0,o.y=c.y+h[0];function d(g){return g.name}var f=new Xs(this._layersSeries||[],l,d,d),p=[];f.add(ge(v,this,"add")).update(ge(v,this,"update")).remove(ge(v,this,"remove")).execute();function v(g,m,y){var _=s._layers;if(g==="remove"){o.remove(_[m]);return}for(var b=[],S=[],x,C=l[m].indices,D=0;D<C.length;D++){var I=a.getItemLayout(C[D]),M=I.x,L=I.y0,N=I.y;b.push(M,L),S.push(M,L+N),x=a.getItemVisual(C[D],"style")}var O,B=a.getItemLayout(C[0]),F=t.getModel("label"),U=F.get("margin"),$=t.getModel("emphasis");if(g==="add"){var q=p[m]=new Le;O=new RW({shape:{points:b,stackedOnPoints:S,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),q.add(O),o.add(q),t.isAnimationEnabled()&&O.setClipPath(pTe(O.getBoundingRect(),t,function(){O.removeClipPath()}))}else{var q=_[y];O=q.childAt(0),o.add(q),p[m]=q,ct(O,{shape:{points:b,stackedOnPoints:S}},t),_a(O)}Jr(O,Nr(t),{labelDataIndex:C[D-1],defaultText:a.getName(C[D-1]),inheritColor:x.fill},{normal:{verticalAlign:"middle"}}),O.setTextConfig({position:null,local:!0});var Z=O.getTextContent();Z&&(Z.x=B.x-U,Z.y=B.y0+B.y/2),O.useStyle(x),a.setItemGraphicEl(m,O),Qr(O,t),Yt(O,$.get("focus"),$.get("blurScope"),$.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(Ct);function pTe(r,e,t){var i=new st({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Vt(i,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),i}var qS=2,vTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new dg(ge(this.getData,this),ge(this.getRawData,this))},e.prototype.fixData=function(t){var i=t.length,n={},a=Ww(t,function(d){return n.hasOwnProperty(d[0]+"")||(n[d[0]+""]=-1),d[2]}),s=[];a.buckets.each(function(d,f){s.push({name:f,dataList:d})});for(var o=s.length,l=0;l<o;++l){for(var u=s[l].name,c=0;c<s[l].dataList.length;++c){var h=s[l].dataList[c][0]+"";n[h]=l}for(var h in n)n.hasOwnProperty(h)&&n[h]!==l&&(n[h]=l,t[i]=[h,0,u],i++)}return t},e.prototype.getInitialData=function(t,i){for(var n=this.getReferringComponents("singleAxis",mr).models[0],a=n.get("type"),s=St(t.data,function(p){return p[2]!==void 0}),o=this.fixData(s||[]),l=[],u=this.nameMap=be(),c=0,h=0;h<o.length;++h)l.push(o[h][qS]),u.get(o[h][qS])||(u.set(o[h][qS],c),c++);var d=sg(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:W0(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new wi(d,this);return f.initData(o),f},e.prototype.getLayerSeries=function(){for(var t=this.getData(),i=t.count(),n=[],a=0;a<i;++a)n[a]=a;var s=t.mapDimension("single"),o=Ww(n,function(u){return t.get("name",u)}),l=[];return o.buckets.each(function(u,c){u.sort(function(h,d){return t.get(s,h)-t.get(s,d)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,i,n){ie(t)||(t=t?[t]:[]);for(var a=this.getData(),s=this.getLayerSeries(),o=[],l=s.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,d=-1,f=s[c].indices.length,p=0;p<f;++p){var v=a.get(t[0],s[c].indices[p]),g=Math.abs(v-i);g<=h&&(u=v,h=g,d=s[c].indices[p])}o.push(d)}return{dataIndices:o,nestestValue:u}},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=a.getName(t),o=a.get(a.mapDimension("value"),t);return Br("nameValue",{name:s,value:o})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(Ot);function gTe(r,e){r.eachSeriesByType("themeRiver",function(t){var i=t.getData(),n=t.coordinateSystem,a={},s=n.getRect();a.rect=s;var o=t.get("boundaryGap"),l=n.getAxis();if(a.boundaryGap=o,l.orient==="horizontal"){o[0]=ce(o[0],s.height),o[1]=ce(o[1],s.height);var u=s.height-o[0]-o[1];d3(i,t,u)}else{o[0]=ce(o[0],s.width),o[1]=ce(o[1],s.width);var c=s.width-o[0]-o[1];d3(i,t,c)}i.setLayout("layoutInfo",a)})}function d3(r,e,t){if(r.count())for(var i=e.coordinateSystem,n=e.getLayerSeries(),a=r.mapDimension("single"),s=r.mapDimension("value"),o=oe(n,function(g){return oe(g.indices,function(m){var y=i.dataToPoint(r.get(a,m));return y[1]=r.get(s,m),y})}),l=mTe(o),u=l.y0,c=t/l.max,h=n.length,d=n[0].indices.length,f,p=0;p<d;++p){f=u[p]*c,r.setItemLayout(n[0].indices[p],{layerIndex:0,x:o[0][p][0],y0:f,y:o[0][p][1]*c});for(var v=1;v<h;++v)f+=o[v-1][p][1]*c,r.setItemLayout(n[v].indices[p],{layerIndex:v,x:o[v][p][0],y0:f,y:o[v][p][1]*c})}}function mTe(r){for(var e=r.length,t=r[0].length,i=[],n=[],a=0,s=0;s<t;++s){for(var o=0,l=0;l<e;++l)o+=r[l][s][1];o>a&&(a=o),i.push(o)}for(var u=0;u<t;++u)n[u]=(a-i[u])/2;a=0;for(var c=0;c<t;++c){var h=i[c]+n[c];h>a&&(a=h)}return{y0:n,max:a}}function yTe(r){r.registerChartView(dTe),r.registerSeriesModel(vTe),r.registerLayout(gTe),r.registerProcessor(fg("themeRiver"))}var _Te=2,bTe=4,p3=function(r){j(e,r);function e(t,i,n,a){var s=r.call(this)||this;s.z2=_Te,s.textConfig={inside:!0},ke(s).seriesIndex=i.seriesIndex;var o=new lt({z2:bTe,silent:t.getModel().get(["label","silent"])});return s.setTextContent(o),s.updateData(!0,t,i,n,a),s}return e.prototype.updateData=function(t,i,n,a,s){this.node=i,i.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var o=this;ke(o).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),c=i.getLayout(),h=J({},c);h.label=null;var d=i.getVisual("style");d.lineJoin="bevel";var f=i.getVisual("decal");f&&(d.decal=cf(f,s));var p=xu(l.getModel("itemStyle"),h,!0);J(h,p),R(Di,function(y){var _=o.ensureState(y),b=l.getModel([y,"itemStyle"]);_.style=b.getItemStyle();var S=xu(b,h);S&&(_.shape=S)}),t?(o.setShape(h),o.shape.r=c.r0,Vt(o,{shape:{r:c.r}},n,i.dataIndex)):(ct(o,{shape:h},n),_a(o)),o.useStyle(d),this._updateLabel(n);var v=l.getShallow("cursor");v&&o.attr("cursor",v),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?i.getAncestorsIndices():g==="descendant"?i.getDescendantIndices():g;Yt(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var i=this,n=this.node.getModel(),a=n.getModel("label"),s=this.node.getLayout(),o=s.endAngle-s.startAngle,l=(s.startAngle+s.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,d=h.getTextContent(),f=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,v=a.get("show")&&!(p!=null&&Math.abs(o)<p);d.ignore=!v,R(dv,function(m){var y=m==="normal"?n.getModel("label"):n.getModel([m,"label"]),_=m==="normal",b=_?d:d.ensureState(m),S=t.getFormattedLabel(f,m);_&&(S=S||i.node.name),b.style=kt(y,{},null,m!=="normal",!0),S&&(b.style.text=S);var x=y.get("show");x!=null&&!_&&(b.ignore=!x);var C=g(y,"position"),D=_?h:h.states[m],I=D.style.fill;D.textConfig={outsideFill:y.get("color")==="inherit"?I:null,inside:C!=="outside"};var M,L=g(y,"distance")||0,N=g(y,"align"),O=g(y,"rotate"),B=Math.PI*.5,F=Math.PI*1.5,U=fn(O==="tangential"?Math.PI/2-l:l),$=U>B&&!hv(U-B)&&U<F;C==="outside"?(M=s.r+L,N=$?"right":"left"):!N||N==="center"?(o===2*Math.PI&&s.r0===0?M=0:M=(s.r+s.r0)/2,N="center"):N==="left"?(M=s.r0+L,N=$?"right":"left"):N==="right"&&(M=s.r-L,N=$?"left":"right"),b.style.align=N,b.style.verticalAlign=g(y,"verticalAlign")||"middle",b.x=M*u+s.cx,b.y=M*c+s.cy;var q=0;O==="radial"?q=fn(-l)+($?Math.PI:0):O==="tangential"?q=fn(Math.PI/2-l)+($?Math.PI:0):ut(O)&&(q=O*Math.PI/180),b.rotation=fn(q)});function g(m,y){var _=m.get(y);return _??a.get(y)}d.dirtyStyle()},e}(Ei),W2="sunburstRootToNode",v3="sunburstHighlight",TTe="sunburstUnhighlight";function STe(r){r.registerAction({type:W2,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n,a){var s=Dv(e,[W2],n);if(s){var o=n.getViewRoot();o&&(e.direction=oE(o,s.node)?"rollUp":"drillDown"),n.resetViewRoot(s.node)}}}),r.registerAction({type:v3,update:"none"},function(e,t,i){e=J({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a){var s=Dv(e,[v3],a);s&&(e.dataIndex=s.node.dataIndex)}i.dispatchAction(J(e,{type:"highlight"}))}),r.registerAction({type:TTe,update:"updateView"},function(e,t,i){e=J({},e),i.dispatchAction(J(e,{type:"downplay"}))})}var xTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){var s=this;this.seriesModel=t,this.api=n,this.ecModel=i;var o=t.getData(),l=o.tree.root,u=t.getViewRoot(),c=this.group,h=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(y){d.push(y)});var f=this._oldChildren||[];p(d,f),m(l,u),this._initEvents(),this._oldChildren=d;function p(y,_){if(y.length===0&&_.length===0)return;new Xs(_,y,b,b).add(S).update(S).remove(Ue(S,null)).execute();function b(x){return x.getId()}function S(x,C){var D=x==null?null:y[x],I=C==null?null:_[C];v(D,I)}}function v(y,_){if(!h&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,t,i,n),o.setItemGraphicEl(y.dataIndex,_.piece)):g(_);else if(y){var b=new p3(y,t,i,n);c.add(b),o.setItemGraphicEl(y.dataIndex,b)}}}function g(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(s.virtualPiece?s.virtualPiece.updateData(!1,y,t,i,n):(s.virtualPiece=new p3(y,t,i,n),c.add(s.virtualPiece)),_.piece.off("click"),s.virtualPiece.on("click",function(b){s._rootToNode(_.parentNode)})):s.virtualPiece&&(c.remove(s.virtualPiece),s.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(i){var n=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(s){if(!n&&s.piece&&s.piece===i.target){var o=s.getModel().get("nodeClick");if(o==="rootToNode")t._rootToNode(s);else if(o==="link"){var l=s.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";B0(u,c)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:W2,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var s=t[0]-a.cx,o=t[1]-a.cy,l=Math.sqrt(s*s+o*o);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(Ct),wTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,i){var n={name:t.name,children:t.data};uj(n);var a=this._levelModels=oe(t.levels||[],function(l){return new yt(l,this,i)},this),s=sE.createTree(n,this,o);function o(l){l.wrapMethod("getItemModel",function(u,c){var h=s.getNodeByDataIndex(c),d=a[h.depth];return d&&(u.parentModel=d),u})}return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treePathInfo=L1(n,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){pq(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Ot);function uj(r){var e=0;R(r.children,function(i){uj(i);var n=i.value;ie(n)&&(n=n[0]),e+=n});var t=r.value;ie(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),ie(r.value)?r.value[0]=t:r.value=t}var g3=Math.PI/180;function CTe(r,e,t){e.eachSeriesByType(r,function(i){var n=i.get("center"),a=i.get("radius");ie(a)||(a=[0,a]),ie(n)||(n=[n,n]);var s=t.getWidth(),o=t.getHeight(),l=Math.min(s,o),u=ce(n[0],s),c=ce(n[1],o),h=ce(a[0],l/2),d=ce(a[1],l/2),f=-i.get("startAngle")*g3,p=i.get("minAngle")*g3,v=i.getData().tree.root,g=i.getViewRoot(),m=g.depth,y=i.get("sort");y!=null&&cj(g,y);var _=0;R(g.children,function(U){!isNaN(U.getValue())&&_++});var b=g.getValue(),S=Math.PI/(b||_)*2,x=g.depth>0,C=g.height-(x?-1:1),D=(d-h)/(C||1),I=i.get("clockwise"),M=i.get("stillShowZeroSum"),L=I?1:-1,N=function(U,$){if(U){var q=$;if(U!==v){var Z=U.getValue(),te=b===0&&M?S:Z*S;te<p&&(te=p),q=$+L*te;var Q=U.depth-m-(x?-1:1),se=h+D*Q,he=h+D*(Q+1),ue=i.getLevelModel(U);if(ue){var Ie=ue.get("r0",!0),Oe=ue.get("r",!0),Fe=ue.get("radius",!0);Fe!=null&&(Ie=Fe[0],Oe=Fe[1]),Ie!=null&&(se=ce(Ie,l/2)),Oe!=null&&(he=ce(Oe,l/2))}U.setLayout({angle:te,startAngle:$,endAngle:q,clockwise:I,cx:u,cy:c,r0:se,r:he})}if(U.children&&U.children.length){var me=0;R(U.children,function(ze){me+=N(ze,$+me)})}return q-$}};if(x){var O=h,B=h+D,F=Math.PI*2;v.setLayout({angle:F,startAngle:f,endAngle:f+F,clockwise:I,cx:u,cy:c,r0:O,r:B})}N(g,f)})}function cj(r,e){var t=r.children||[];r.children=ATe(t,e),t.length&&R(r.children,function(i){cj(i,e)})}function ATe(r,e){if(we(e)){var t=oe(r,function(n,a){var s=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return s}},index:a}});return t.sort(function(n,a){return e(n.params,a.params)}),oe(t,function(n){return r[n.index]})}else{var i=e==="asc";return r.sort(function(n,a){var s=(n.getValue()-a.getValue())*(i?1:-1);return s===0?(n.dataIndex-a.dataIndex)*(i?-1:1):s})}}function DTe(r){var e={};function t(i,n,a){for(var s=i;s&&s.depth>1;)s=s.parentNode;var o=n.getColorFromPalette(s.name||s.dataIndex+"",e);return i.depth>1&&pe(o)&&(o=kw(o,(i.depth-1)/(a-1)*.5)),o}r.eachSeriesByType("sunburst",function(i){var n=i.getData(),a=n.tree;a.eachNode(function(s){var o=s.getModel(),l=o.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(s,i,a.root.height));var u=n.ensureUniqueItemVisual(s.dataIndex,"style");J(u,l)})})}function ETe(r){r.registerChartView(xTe),r.registerSeriesModel(wTe),r.registerLayout(Ue(CTe,"sunburst")),r.registerProcessor(Ue(fg,"sunburst")),r.registerVisual(DTe),STe(r)}var m3={color:"fill",borderColor:"stroke"},ITe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ns=ot(),PTe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,i){return to(null,this)},e.prototype.getDataParams=function(t,i,n){var a=r.prototype.getDataParams.call(this,t,i);return n&&(a.info=Ns(n).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ot);function MTe(r,e){return e=e||[0,0],oe(["x","y"],function(t,i){var n=this.getAxis(t),a=e[i],s=r[i]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(a-s)-n.dataToCoord(a+s))},this)}function LTe(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ge(MTe,r)}}}function kTe(r,e){return e=e||[0,0],oe([0,1],function(t){var i=e[t],n=r[t]/2,a=[],s=[];return a[t]=i-n,s[t]=i+n,a[1-t]=s[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(s)[t])},this)}function RTe(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:ge(kTe,r)}}}function OTe(r,e){var t=this.getAxis(),i=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(i-n)-t.dataToCoord(i+n))}function NTe(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ge(OTe,r)}}}function BTe(r,e){return e=e||[0,0],oe(["Radius","Angle"],function(t,i){var n="get"+t+"Axis",a=this[n](),s=e[i],o=r[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(s-o)-a.dataToCoord(s+o));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function FTe(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:i[1],r0:i[0]},api:{coord:function(n){var a=e.dataToRadius(n[0]),s=t.dataToAngle(n[1]),o=r.coordToPoint([a,s]);return o.push(a,s*Math.PI/180),o},size:ge(BTe,r)}}}function UTe(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(i,n){return r.dataToPoint(i,n)}}}}function hj(r,e,t,i){return r&&(r.legacy||r.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||_e(r,"text")))}function fj(r,e,t){var i=r,n,a,s;if(e==="text")s=i;else{s={},_e(i,"text")&&(s.text=i.text),_e(i,"rich")&&(s.rich=i.rich),_e(i,"textFill")&&(s.fill=i.textFill),_e(i,"textStroke")&&(s.stroke=i.textStroke),_e(i,"fontFamily")&&(s.fontFamily=i.fontFamily),_e(i,"fontSize")&&(s.fontSize=i.fontSize),_e(i,"fontStyle")&&(s.fontStyle=i.fontStyle),_e(i,"fontWeight")&&(s.fontWeight=i.fontWeight),a={type:"text",style:s,silent:!0},n={};var o=_e(i,"textPosition");t?n.position=o?i.textPosition:"inside":o&&(n.position=i.textPosition),_e(i,"textPosition")&&(n.position=i.textPosition),_e(i,"textOffset")&&(n.offset=i.textOffset),_e(i,"textRotation")&&(n.rotation=i.textRotation),_e(i,"textDistance")&&(n.distance=i.textDistance)}return y3(s,r),R(s.rich,function(l){y3(l,l)}),{textConfig:n,textContent:a}}function y3(r,e){e&&(e.font=e.textFont||e.font,_e(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),_e(e,"textAlign")&&(r.align=e.textAlign),_e(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),_e(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),_e(e,"textWidth")&&(r.width=e.textWidth),_e(e,"textHeight")&&(r.height=e.textHeight),_e(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),_e(e,"textPadding")&&(r.padding=e.textPadding),_e(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),_e(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),_e(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),_e(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),_e(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),_e(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),_e(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function _3(r,e,t){var i=r;i.textPosition=i.textPosition||t.position||"inside",t.offset!=null&&(i.textOffset=t.offset),t.rotation!=null&&(i.textRotation=t.rotation),t.distance!=null&&(i.textDistance=t.distance);var n=i.textPosition.indexOf("inside")>=0,a=r.fill||"#000";b3(i,e);var s=i.textFill==null;return n?s&&(i.textFill=t.insideFill||"#fff",!i.textStroke&&t.insideStroke&&(i.textStroke=t.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(s&&(i.textFill=r.fill||t.outsideFill||"#000"),!i.textStroke&&t.outsideStroke&&(i.textStroke=t.outsideStroke)),i.text=e.text,i.rich=e.rich,R(e.rich,function(o){b3(o,o)}),i}function b3(r,e){e&&(_e(e,"fill")&&(r.textFill=e.fill),_e(e,"stroke")&&(r.textStroke=e.fill),_e(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),_e(e,"font")&&(r.font=e.font),_e(e,"fontStyle")&&(r.fontStyle=e.fontStyle),_e(e,"fontWeight")&&(r.fontWeight=e.fontWeight),_e(e,"fontSize")&&(r.fontSize=e.fontSize),_e(e,"fontFamily")&&(r.fontFamily=e.fontFamily),_e(e,"align")&&(r.textAlign=e.align),_e(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),_e(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),_e(e,"width")&&(r.textWidth=e.width),_e(e,"height")&&(r.textHeight=e.height),_e(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),_e(e,"padding")&&(r.textPadding=e.padding),_e(e,"borderColor")&&(r.textBorderColor=e.borderColor),_e(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),_e(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),_e(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),_e(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),_e(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),_e(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),_e(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),_e(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),_e(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),_e(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var dj={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},T3=rt(dj);as(os,function(r,e){return r[e]=1,r},{});os.join(", ");var i_=["","style","shape","extra"],vf=ot();function SE(r,e,t,i,n){var a=r+"Animation",s=Lf(r,i,n)||{},o=vf(e).userDuring;return s.duration>0&&(s.during=o?ge($Te,{el:e,userDuring:o}):null,s.setToFinal=!0,s.scope=r),J(s,t[a]),s}function Iy(r,e,t,i){i=i||{};var n=i.dataIndex,a=i.isInit,s=i.clearStyle,o=t.isAnimationEnabled(),l=vf(r),u=e.style;l.userDuring=e.during;var c={},h={};if(qTe(r,e,h),x3("shape",e,h),x3("extra",e,h),!a&&o&&(WTe(r,e,c),S3("shape",r,e,c),S3("extra",r,e,c),jTe(r,e,u,c)),h.style=u,VTe(r,h,s),GTe(r,e),o)if(a){var d={};R(i_,function(p){var v=p?e[p]:e;v&&v.enterFrom&&(p&&(d[p]=d[p]||{}),J(p?d[p]:d,v.enterFrom))});var f=SE("enter",r,e,t,n);f.duration>0&&r.animateFrom(d,f)}else zTe(r,e,n||0,t,c);pj(r,e),u?r.dirty():r.markRedraw()}function pj(r,e){for(var t=vf(r).leaveToProps,i=0;i<i_.length;i++){var n=i_[i],a=n?e[n]:e;a&&a.leaveTo&&(t||(t=vf(r).leaveToProps={}),n&&(t[n]=t[n]||{}),J(n?t[n]:t,a.leaveTo))}}function O1(r,e,t,i){if(r){var n=r.parent,a=vf(r).leaveToProps;if(a){var s=SE("update",r,e,t,0);s.done=function(){n.remove(r)},r.animateTo(a,s)}else n.remove(r)}}function Wu(r){return r==="all"}function VTe(r,e,t){var i=e.style;if(!r.isGroup&&i){if(t){r.useStyle({});for(var n=r.animators,a=0;a<n.length;a++){var s=n[a];s.targetName==="style"&&s.changeTarget(r.style)}}r.setStyle(i)}e&&(e.style=null,e&&r.attr(e),e.style=i)}function zTe(r,e,t,i,n){if(n){var a=SE("update",r,e,i,t);a.duration>0&&r.animateFrom(n,a)}}function GTe(r,e){_e(e,"silent")&&(r.silent=e.silent),_e(e,"ignore")&&(r.ignore=e.ignore),r instanceof Yn&&_e(e,"invisible")&&(r.invisible=e.invisible),r instanceof Qe&&_e(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Ma={},HTe={setTransform:function(r,e){return Ma.el[r]=e,this},getTransform:function(r){return Ma.el[r]},setShape:function(r,e){var t=Ma.el,i=t.shape||(t.shape={});return i[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Ma.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Ma.el,i=t.style;return i&&(i[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Ma.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Ma.el.extra||(Ma.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Ma.el.extra;if(e)return e[r]}};function $Te(){var r=this,e=r.el;if(e){var t=vf(e).userDuring,i=r.userDuring;if(t!==i){r.el=r.userDuring=null;return}Ma.el=e,i(HTe)}}function S3(r,e,t,i){var n=t[r];if(n){var a=e[r],s;if(a){var o=t.transition,l=n.transition;if(l)if(!s&&(s=i[r]={}),Wu(l))J(s,a);else for(var u=xt(l),c=0;c<u.length;c++){var h=u[c],d=a[h];s[h]=d}else if(Wu(o)||Xe(o,r)>=0){!s&&(s=i[r]={});for(var f=rt(a),c=0;c<f.length;c++){var h=f[c],d=a[h];XTe(n[h],d)&&(s[h]=d)}}}}}function x3(r,e,t){var i=e[r];if(i)for(var n=t[r]={},a=rt(i),s=0;s<a.length;s++){var o=a[s];n[o]=Pp(i[o])}}function WTe(r,e,t){for(var i=e.transition,n=Wu(i)?os:xt(i||[]),a=0;a<n.length;a++){var s=n[a];if(!(s==="style"||s==="shape"||s==="extra")){var o=r[s];t[s]=o}}}function qTe(r,e,t){for(var i=0;i<T3.length;i++){var n=T3[i],a=dj[n],s=e[n];s&&(t[a[0]]=s[0],t[a[1]]=s[1])}for(var i=0;i<os.length;i++){var o=os[i];e[o]!=null&&(t[o]=e[o])}}function jTe(r,e,t,i){if(t){var n=r.style,a;if(n){var s=t.transition,o=e.transition;if(s&&!Wu(s)){var l=xt(s);!a&&(a=i.style={});for(var u=0;u<l.length;u++){var c=l[u],h=n[c];a[c]=h}}else if(r.getAnimationStyleProps&&(Wu(o)||Wu(s)||Xe(o,"style")>=0)){var d=r.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=i.style={});for(var p=rt(t),u=0;u<p.length;u++){var c=p[u];if(f[c]){var h=n[c];a[c]=h}}}}}}}function XTe(r,e){return li(r)?r!==e:r!=null&&isFinite(r)}var vj=ot(),YTe=["percent","easing","shape","style","extra"];function gj(r){r.stopAnimation("keyframe"),r.attr(vj(r))}function n_(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(ie(e)){R(e,function(o){n_(r,o,t)});return}var i=e.keyframes,n=e.duration;if(t&&n==null){var a=Lf("enter",t,0);n=a&&a.duration}if(!(!i||!n)){var s=vj(r);R(i_,function(o){if(!(o&&!r[o])){var l;i.sort(function(u,c){return u.percent-c.percent}),R(i,function(u){var c=r.animators,h=o?u[o]:u;if(h){var d=rt(h);if(o||(d=St(d,function(v){return Xe(YTe,v)<0})),!!d.length){l||(l=r.animate(o,e.loop,!0),l.scope="keyframe");for(var f=0;f<c.length;f++)c[f]!==l&&c[f].targetName===l.targetName&&c[f].stopTracks(d);o&&(s[o]=s[o]||{});var p=o?s[o]:s;R(d,function(v){p[v]=((o?r[o]:r)||{})[v]}),l.whenWithKeys(n*u.percent,h,d,u.easing)}}}),l&&l.delay(e.delay||0).duration(n).start(e.easing)}})}}}var Bs="emphasis",zo="normal",xE="blur",wE="select",sl=[zo,Bs,xE,wE],jS={normal:["itemStyle"],emphasis:[Bs,"itemStyle"],blur:[xE,"itemStyle"],select:[wE,"itemStyle"]},XS={normal:["label"],emphasis:[Bs,"label"],blur:[xE,"label"],select:[wE,"label"]},KTe=["x","y"],ZTe="e\0\0",Pn={normal:{},emphasis:{},blur:{},select:{}},QTe={cartesian2d:LTe,geo:RTe,single:NTe,polar:FTe,calendar:UTe};function q2(r){return r instanceof Qe}function j2(r){return r instanceof Yn}function JTe(r,e){e.copyTransform(r),j2(e)&&j2(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,q2(e)&&q2(r)&&e.setShape(r.shape))}var eSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){this._progressiveEls=null;var s=this._data,o=t.getData(),l=this.group,u=w3(t,o,i,n);s||l.removeAll(),o.diff(s).add(function(h){YS(n,null,h,u(h,a),t,l,o)}).remove(function(h){var d=s.getItemGraphicEl(h);d&&O1(d,Ns(d).option,t)}).update(function(h,d){var f=s.getItemGraphicEl(d);YS(n,f,h,u(h,a),t,l,o)}).execute();var c=t.get("clip",!0)?cg(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,i,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,i,n,a,s){var o=i.getData(),l=w3(i,o,n,a),u=this._progressiveEls=[];function c(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h<t.end;h++){var d=YS(null,null,h,l(h,s),i,this.group,o);d&&(d.traverse(c),u.push(d))}},e.prototype.eachRendered=function(t){cl(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,i,n,a){var s=i.element;if(s==null||n.name===s)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===s)return!0;return!1},e.type="custom",e}(Ct);function CE(r){var e=r.type,t;if(e==="path"){var i=r.shape,n=i.width!=null&&i.height!=null?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,a=_j(i);t=h1(a,null,n,i.layout||"center"),Ns(t).customPathData=a}else if(e==="image")t=new Wr({}),Ns(t).customImagePath=r.style.image;else if(e==="text")t=new lt({});else if(e==="group")t=new Le;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var s=pD(e);if(!s){var o="";vt(o)}t=new s}return Ns(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function AE(r,e,t,i,n,a,s){gj(e);var o=n&&n.normal.cfg;o&&e.setTextConfig(o),i&&i.transition==null&&(i.transition=KTe);var l=i&&i.style;if(l){if(e.type==="text"){var u=l;_e(u,"textFill")&&(u.fill=u.textFill),_e(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=q2(e)?l.decal:null;r&&h&&(h.dirty=!0,c=cf(h,r)),l.__decalPattern=c}if(j2(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Iy(e,i,a,{dataIndex:t,isInit:s,clearStyle:!0}),n_(e,i.keyframeAnimation,a)}function mj(r,e,t,i,n){var a=e.isGroup?null:e,s=n&&n[r].cfg;if(a){var o=a.ensureState(r);if(i===!1){var l=a.getState(r);l&&(l.style=null)}else o.style=i||null;s&&(o.textConfig=s),rc(a)}}function tSe(r,e,t){if(!r.isGroup){var i=r,n=t.currentZ,a=t.currentZLevel;i.z=n,i.zlevel=a;var s=e.z2;s!=null&&(i.z2=s||0);for(var o=0;o<sl.length;o++)rSe(i,e,sl[o])}}function rSe(r,e,t){var i=t===zo,n=i?e:a_(e,t),a=n?n.z2:null,s;a!=null&&(s=i?r:r.ensureState(t),s.z2=a||0)}function w3(r,e,t,i){var n=r.get("renderItem"),a=r.coordinateSystem,s={};a&&(s=a.prepareCustoms?a.prepareCustoms(a):QTe[a.type](a));for(var o=Ce({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:b,style:x,ordinalRawValue:S,styleEmphasis:C,visual:M,barLayout:L,currentSeriesIndices:N,font:O},s.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:iSe(r.getData())},u,c,h={},d={},f={},p={},v=0;v<sl.length;v++){var g=sl[v];f[g]=r.getModel(jS[g]),p[g]=r.getModel(XS[g])}function m(B){return B===u?c||(c=e.getItemModel(B)):e.getItemModel(B)}function y(B,F){return e.hasItemOption?B===u?h[F]||(h[F]=m(B).getModel(jS[F])):m(B).getModel(jS[F]):f[F]}function _(B,F){return e.hasItemOption?B===u?d[F]||(d[F]=m(B).getModel(XS[F])):m(B).getModel(XS[F]):p[F]}return function(B,F){return u=B,c=null,h={},d={},n&&n(Ce({dataIndexInside:B,dataIndex:e.getRawIndex(B),actionType:F?F.type:null},l),o)};function b(B,F){return F==null&&(F=u),e.getStore().get(e.getDimensionIndex(B||0),F)}function S(B,F){F==null&&(F=u),B=B||0;var U=e.getDimensionInfo(B);if(!U){var $=e.getDimensionIndex(B);return $>=0?e.getStore().get($,F):void 0}var q=e.get(U.name,F),Z=U&&U.ordinalMeta;return Z?Z.categories[q]:q}function x(B,F){F==null&&(F=u);var U=e.getItemVisual(F,"style"),$=U&&U.fill,q=U&&U.opacity,Z=y(F,zo).getItemStyle();$!=null&&(Z.fill=$),q!=null&&(Z.opacity=q);var te={inheritColor:pe($)?$:"#000"},Q=_(F,zo),se=kt(Q,null,te,!1,!0);se.text=Q.getShallow("show")?Be(r.getFormattedLabel(F,zo),ff(e,F)):null;var he=O0(Q,te,!1);return I(B,Z),Z=_3(Z,se,he),B&&D(Z,B),Z.legacy=!0,Z}function C(B,F){F==null&&(F=u);var U=y(F,Bs).getItemStyle(),$=_(F,Bs),q=kt($,null,null,!0,!0);q.text=$.getShallow("show")?Qa(r.getFormattedLabel(F,Bs),r.getFormattedLabel(F,zo),ff(e,F)):null;var Z=O0($,null,!0);return I(B,U),U=_3(U,q,Z),B&&D(U,B),U.legacy=!0,U}function D(B,F){for(var U in F)_e(F,U)&&(B[U]=F[U])}function I(B,F){B&&(B.textFill&&(F.textFill=B.textFill),B.textPosition&&(F.textPosition=B.textPosition))}function M(B,F){if(F==null&&(F=u),_e(m3,B)){var U=e.getItemVisual(F,"style");return U?U[m3[B]]:null}if(_e(ITe,B))return e.getItemVisual(F,B)}function L(B){if(a.type==="cartesian2d"){var F=a.getBaseAxis();return qpe(Ce({axis:F},B))}}function N(){return t.getCurrentSeriesIndices()}function O(B){return vD(B,t)}}function iSe(r){var e={};return R(r.dimensions,function(t){var i=r.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim,a=e[n]=e[n]||[];a[i.coordDimIndex]=r.getDimensionIndex(t)}}),e}function YS(r,e,t,i,n,a,s){if(!i){a.remove(e);return}var o=DE(r,e,t,i,n,a);return o&&s.setItemGraphicEl(t,o),o&&Yt(o,i.focus,i.blurScope,i.emphasisDisabled),o}function DE(r,e,t,i,n,a){var s=-1,o=e;e&&yj(e,i,n)&&(s=Xe(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=CE(i),o&&JTe(o,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Pn.normal.cfg=Pn.normal.conOpt=Pn.emphasis.cfg=Pn.emphasis.conOpt=Pn.blur.cfg=Pn.blur.conOpt=Pn.select.cfg=Pn.select.conOpt=null,Pn.isLegacy=!1,aSe(u,t,i,n,l,Pn),nSe(u,t,i,n,l),AE(r,u,t,i,Pn,n,l),_e(i,"info")&&(Ns(u).info=i.info);for(var c=0;c<sl.length;c++){var h=sl[c];if(h!==zo){var d=a_(i,h),f=EE(i,d,h);mj(h,u,d,f,Pn)}}return tSe(u,i,n),i.type==="group"&&sSe(r,u,t,i,n),s>=0?a.replaceAt(u,s):a.add(u),u}function yj(r,e,t){var i=Ns(r),n=e.type,a=e.shape,s=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==i.customGraphicType||n==="path"&&cSe(a)&&_j(a)!==i.customPathData||n==="image"&&_e(s,"image")&&s.image!==i.customImagePath}function nSe(r,e,t,i,n){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var s=r.getClipPath();s&&yj(s,a,i)&&(s=null),s||(s=CE(a),r.setClipPath(s)),AE(null,s,e,a,null,i,n)}}function aSe(r,e,t,i,n,a){if(!r.isGroup){C3(t,null,a),C3(t,Bs,a);var s=a.normal.conOpt,o=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(s!=null||o!=null||u!=null||l!=null){var c=r.getTextContent();if(s===!1)c&&r.removeTextContent();else{s=a.normal.conOpt=s||{type:"text"},c?c.clearStates():(c=CE(s),r.setTextContent(c)),AE(null,c,e,s,null,i,n);for(var h=s&&s.style,d=0;d<sl.length;d++){var f=sl[d];if(f!==zo){var p=a[f].conOpt;mj(f,c,p,EE(s,p,f),null)}}h?c.dirty():c.markRedraw()}}}}function C3(r,e,t){var i=e?a_(r,e):r,n=e?EE(r,i,Bs):r.style,a=r.type,s=i?i.textConfig:null,o=r.textContent,l=o?e?a_(o,e):o:null;if(n&&(t.isLegacy||hj(n,a,!!s,!!l))){t.isLegacy=!0;var u=fj(n,a,!e);!s&&u.textConfig&&(s=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var h=e?t[e]:t.normal;h.cfg=s,h.conOpt=l}function a_(r,e){return e?r?r[e]:null:r}function EE(r,e,t){var i=e&&e.style;return i==null&&t===Bs&&r&&(i=r.styleEmphasis),i}function sSe(r,e,t,i,n){var a=i.children,s=a?a.length:0,o=i.$mergeChildren,l=o==="byName"||i.diffChildrenByName,u=o===!1;if(!(!s&&!l&&!u)){if(l){lSe({api:r,oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var c=0;c<s;c++){var h=a[c],d=e.childAt(c);h?(h.ignore==null&&(h.ignore=!1),DE(r,d,t,h,n,e)):d.ignore=!0}for(var f=e.childCount()-1;f>=c;f--){var p=e.childAt(f);oSe(e,p,n)}}}function oSe(r,e,t){e&&O1(e,Ns(r).option,t)}function lSe(r){new Xs(r.oldChildren,r.newChildren,A3,A3,r).add(D3).update(D3).remove(uSe).execute()}function A3(r,e){var t=r&&r.name;return t??ZTe+e}function D3(r,e){var t=this.context,i=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;DE(t.api,n,t.dataIndex,i,t.seriesModel,t.group)}function uSe(r){var e=this.context,t=e.oldChildren[r];t&&O1(t,Ns(t).option,e.seriesModel)}function _j(r){return r&&(r.pathData||r.d)}function cSe(r){return r&&(_e(r,"pathData")||_e(r,"d"))}function hSe(r){r.registerChartView(eSe),r.registerSeriesModel(PTe)}var cu=ot(),E3=Ee,KS=ge,IE=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,i,n){var a=t.get("value"),s=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===s)){this._lastValue=a,this._lastStatus=s;var o=this._group,l=this._handle;if(!s||s==="hide"){o&&o.hide(),l&&l.hide();return}o&&o.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Le,this.createPointerEl(o,u,e,t),this.createLabelEl(o,u,e,t),i.getZr().add(o);else{var d=Ue(I3,t,h);this.updatePointerEl(o,u,d),this.updateLabelEl(o,u,d,t)}M3(o,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var i=t.get("animation"),n=e.axis,a=n.type==="category",s=t.get("snap");if(!s&&!a)return!1;if(i==="auto"||i==null){var o=this.animationThreshold;if(a&&n.getBandWidth()>o)return!0;if(s){var l=JD(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>o}return!1}return i===!0},r.prototype.makeElOption=function(e,t,i,n,a){},r.prototype.createPointerEl=function(e,t,i,n){var a=t.pointer;if(a){var s=cu(e).pointerEl=new cc[a.type](E3(t.pointer));e.add(s)}},r.prototype.createLabelEl=function(e,t,i,n){if(t.label){var a=cu(e).labelEl=new lt(E3(t.label));e.add(a),P3(a,n)}},r.prototype.updatePointerEl=function(e,t,i){var n=cu(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,i,n){var a=cu(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{x:t.label.x,y:t.label.y}),P3(a,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=t.getModel("handle"),s=t.get("status");if(!a.get("show")||!s||s==="hide"){n&&i.remove(n),this._handle=null;return}var o;this._handle||(o=!0,n=this._handle=ig(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){$s(u.event)},onmousedown:KS(this._onHandleDragMove,this,0,0),drift:KS(this._onHandleDragMove,this),ondragend:KS(this._onHandleDragEnd,this)}),i.add(n)),M3(n,t,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ie(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Vf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,o)}},r.prototype._moveHandleToValue=function(e,t){I3(this._axisPointerModel,!t&&this._moveAnimation,this._handle,ZS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(ZS(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(ZS(n)),cu(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),_v(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},r}();function I3(r,e,t,i){bj(cu(t).lastProp,i)||(cu(t).lastProp=i,e?ct(t,i,r):(t.stopAnimation(),t.attr(i)))}function bj(r,e){if(De(r)&&De(e)){var t=!0;return R(e,function(i,n){t=t&&bj(r[n],i)}),!!t}else return r===e}function P3(r,e){r[e.get(["label","show"])?"show":"hide"]()}function ZS(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function M3(r,e,t){var i=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=t)})}function PE(r){var e=r.get("type"),t=r.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function Tj(r,e,t,i,n){var a=t.get("value"),s=Sj(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),o=t.getModel("label"),l=Nf(o.get("padding")||0),u=o.getFont(),c=Kv(s,u),h=n.position,d=c.width+l[1]+l[3],f=c.height+l[0]+l[2],p=n.align;p==="right"&&(h[0]-=d),p==="center"&&(h[0]-=d/2);var v=n.verticalAlign;v==="bottom"&&(h[1]-=f),v==="middle"&&(h[1]-=f/2),fSe(h,d,f,i);var g=o.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:kt(o,{text:s,font:u,fill:o.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function fSe(r,e,t,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Sj(r,e,t,i,n){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:n.precision}),s=n.formatter;if(s){var o={value:GD(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&o.seriesData.push(h)}),pe(s)?a=s.replace("{value}",a):we(s)&&(a=s(o))}return a}function ME(r,e,t){var i=vn();return uc(i,i,t.rotation),ss(i,i,t.position),ma([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function xj(r,e,t,i,n,a){var s=Ci.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),Tj(e,i,n,a,{position:ME(i.axis,r,t),align:s.textAlign,verticalAlign:s.textVerticalAlign})}function LE(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function wj(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function L3(r,e,t,i,n,a){return{cx:r,cy:e,r0:t,r:i,startAngle:n,endAngle:a,clockwise:!0}}var dSe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,s){var o=n.axis,l=o.grid,u=a.get("type"),c=k3(l,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(i,!0));if(u&&u!=="none"){var d=PE(a),f=pSe[u](o,h,c);f.style=d,t.graphicKey=f.type,t.pointer=f}var p=D2(l.model,n);xj(i,t,p,n,a,s)},e.prototype.getHandleTransform=function(t,i,n){var a=D2(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var s=ME(i.axis,t,a);return{x:s[0],y:s[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var s=n.axis,o=s.grid,l=s.getGlobalExtent(!0),u=k3(o,s).getOtherAxis(s).getGlobalExtent(),c=s.dim==="x"?0:1,h=[t.x,t.y];h[c]+=i[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var d=(u[1]+u[0])/2,f=[d,d];f[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:f,tooltipOption:p[c]}},e}(IE);function k3(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var pSe={line:function(r,e,t){var i=LE([e,t[0]],[e,t[1]],R3(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:wj([e-i/2,t[0]],[i,n],R3(r))}}};function R3(r){return r.dim==="x"?0:1}var vSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(tt),Ps=ot(),gSe=R;function Cj(r,e,t){if(!et.node){var i=e.getZr();Ps(i).records||(Ps(i).records={}),mSe(i,e);var n=Ps(i).records[r]||(Ps(i).records[r]={});n.handler=t}}function mSe(r,e){if(Ps(r).initialized)return;Ps(r).initialized=!0,t("click",Ue(O3,"click")),t("mousemove",Ue(O3,"mousemove")),t("globalout",_Se);function t(i,n){r.on(i,function(a){var s=bSe(e);gSe(Ps(r).records,function(o){o&&n(o,a,s.dispatchAction)}),ySe(s.pendings,e)})}}function ySe(r,e){var t=r.showTip.length,i=r.hideTip.length,n;t?n=r.showTip[t-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function _Se(r,e,t){r.handler("leave",null,t)}function O3(r,e,t,i){e.handler(r,t,i)}function bSe(r){var e={showTip:[],hideTip:[]},t=function(i){var n=e[i.type];n?n.push(i):(i.dispatchAction=t,r.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function X2(r,e){if(!et.node){var t=e.getZr(),i=(Ps(t).records||{})[r];i&&(Ps(t).records[r]=null)}}var TSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=i.getComponent("tooltip"),s=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Cj("axisPointer",n,function(o,l,u){s!=="none"&&(o==="leave"||s.indexOf(o)>=0)&&u({type:"updateAxisPointer",currTrigger:o,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){X2("axisPointer",i)},e.prototype.dispose=function(t,i){X2("axisPointer",i)},e.type="axisPointer",e}($t);function Aj(r,e){var t=[],i=r.seriesIndex,n;if(i==null||!(n=e.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),s=ec(a,r);if(s==null||s<0||ie(s))return{point:[]};var o=a.getItemGraphicEl(s),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(s)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,d=u.dim,f=h==="x"||h==="radius"?1:0,p=a.mapDimension(d),v=[];v[f]=a.get(p,s),v[1-f]=a.get(a.getCalculationInfo("stackResultDimension"),s),t=l.dataToPoint(v)||[]}else t=l.dataToPoint(a.getValues(oe(l.dimensions,function(m){return a.mapDimension(m)}),s))||[];else if(o){var g=o.getBoundingRect().clone();g.applyTransform(o.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:o}}var N3=ot();function SSe(r,e,t){var i=r.currTrigger,n=[r.x,r.y],a=r,s=r.dispatchAction||ge(t.dispatchAction,t),o=e.getComponent("axisPointer").coordSysAxesInfo;if(o){Py(n)&&(n=Aj({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Py(n),u=a.axesInfo,c=o.axesInfo,h=i==="leave"||Py(n),d={},f={},p={list:[],map:{}},v={showPointer:Ue(wSe,f),showTooltip:Ue(CSe,p)};R(o.coordSysMap,function(m,y){var _=l||m.containPoint(n);R(o.coordSysAxesInfo[y],function(b,S){var x=b.axis,C=ISe(u,b);if(!h&&_&&(!u||C)){var D=C&&C.value;D==null&&!l&&(D=x.pointToData(n)),D!=null&&B3(b,D,v,!1,d)}})});var g={};return R(c,function(m,y){var _=m.linkGroup;_&&!f[y]&&R(_.axesInfo,function(b,S){var x=f[S];if(b!==m&&x){var C=x.value;_.mapper&&(C=m.axis.scale.parse(_.mapper(C,F3(b),F3(m)))),g[m.key]=C}})}),R(g,function(m,y){B3(c[y],m,v,!0,d)}),ASe(f,c,d),DSe(p,n,r,s),ESe(c,s,t),d}}function B3(r,e,t,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var s=xSe(e,r),o=s.payloadBatch,l=s.snapToValue;o[0]&&n.seriesIndex==null&&J(n,o[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,o),t.showTooltip(r,s,l)}}function xSe(r,e){var t=e.axis,i=t.dim,n=r,a=[],s=Number.MAX_VALUE,o=-1;return R(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),h,d;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(c,r,t);d=f.dataIndices,h=f.nestestValue}else{if(d=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!d.length)return;h=l.getData().get(c[0],d[0])}if(!(h==null||!isFinite(h))){var p=r-h,v=Math.abs(p);v<=s&&((v<s||p>=0&&o<0)&&(s=v,o=p,n=h,a.length=0),R(d,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function wSe(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function CSe(r,e,t,i){var n=t.payloadBatch,a=e.axis,s=a.model,o=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=Av(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:o.get(["label","precision"]),formatter:o.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function ASe(r,e,t){var i=t.axesInfo=[];R(e,function(n,a){var s=n.axisPointerModel.option,o=r[a];o?(!n.useHandle&&(s.status="show"),s.value=o.value,s.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(s.status="hide"),s.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:s.value})})}function DSe(r,e,t,i){if(Py(e)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function ESe(r,e,t){var i=t.getZr(),n="axisPointerLastHighlights",a=N3(i)[n]||{},s=N3(i)[n]={};R(r,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(d){var f=d.seriesIndex+" | "+d.dataIndex;s[f]=d})});var o=[],l=[];R(a,function(u,c){!s[c]&&l.push(u)}),R(s,function(u,c){!a[c]&&o.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),o.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:o})}function ISe(r,e){for(var t=0;t<(r||[]).length;t++){var i=r[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function F3(r){var e=r.axis.model,t={},i=t.axisDim=r.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function Py(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function gg(r){pc.registerAxisPointerClass("CartesianAxisPointer",dSe),r.registerComponentModel(vSe),r.registerComponentView(TSe),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ie(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Ume(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},SSe)}function PSe(r){Ze(eq),Ze(gg)}var MSe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,s){var o=n.axis;o.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=o.polar,u=l.getOtherAxis(o),c=u.getExtent(),h=o.dataToCoord(i),d=a.get("type");if(d&&d!=="none"){var f=PE(a),p=kSe[d](o,l,h,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var v=a.get(["label","margin"]),g=LSe(i,n,a,l,v);Tj(t,n,a,s,g)},e}(IE);function LSe(r,e,t,i,n){var a=e.axis,s=a.dataToCoord(r),o=i.getAngleAxis().getExtent()[0];o=o/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var d=vn();uc(d,d,o),ss(d,d,[i.cx,i.cy]),u=ma([s,-n],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Ci.innerTextLayout(o,f*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var v=l[1];u=i.coordToPoint([v+n,s]);var g=i.cx,m=i.cy;c=Math.abs(u[0]-g)/v<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-m)/v<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var kSe={line:function(r,e,t,i){return r.dim==="angle"?{type:"Line",shape:LE(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,i){var n=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:L3(e.cx,e.cy,i[0],i[1],(-t-n/2)*a,(-t+n/2)*a)}:{type:"Sector",shape:L3(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},RSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,n=this.ecModel;return n.eachComponent(t,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(tt),kE=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",mr).models[0]},e.type="polarAxis",e}(tt);_r(kE,og);var OSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(kE),NSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(kE),RE=function(r){j(e,r);function e(t,i){return r.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(xa);RE.prototype.dataToRadius=xa.prototype.dataToCoord;RE.prototype.radiusToData=xa.prototype.coordToData;var BSe=ot(),OE=function(r){j(e,r);function e(t,i){return r.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),n=t.scale,a=n.getExtent(),s=n.count();if(a[1]-a[0]<1)return 0;var o=a[0],l=t.dataToCoord(o+1)-t.dataToCoord(o),u=Math.abs(l),c=Kv(o==null?"":o+"",i.getFont(),"center","top"),h=Math.max(c.height,7),d=h/u;isNaN(d)&&(d=1/0);var f=Math.max(0,Math.floor(d)),p=BSe(t.model),v=p.lastAutoInterval,g=p.lastTickCount;return v!=null&&g!=null&&Math.abs(v-f)<=1&&Math.abs(g-s)<=1&&v>f?f=v:(p.lastTickCount=s,p.lastAutoInterval=f),f},e}(xa);OE.prototype.dataToAngle=xa.prototype.dataToCoord;OE.prototype.angleToData=xa.prototype.coordToData;var Dj=["radius","angle"],FSe=function(){function r(e){this.dimensions=Dj,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new RE,this._angleAxis=new OE,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&t.push(i),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),s=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);n.inverse?s=o-360:o=s+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,c=u<s?1:-1;u<s||u>o;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,n=Math.cos(i)*t+this.cx,a=-Math.sin(i)*t+this.cy;return[n,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var n=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:e.inverse,contain:function(s,o){var l=s-this.cx,u=o-this.cy,c=l*l+u*u-1e-4,h=this.r,d=this.r0;return c<=h*h&&c>=d*d}}},r.prototype.convertToPixel=function(e,t,i){var n=U3(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=U3(t);return n===this?this.pointToData(i):null},r}();function U3(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function USe(r,e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight();r.cx=ce(i[0],n),r.cy=ce(i[1],a);var s=r.getRadiusAxis(),o=Math.min(n,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:ie(l)||(l=[0,l]);var u=[ce(l[0],o),ce(l[1],o)];s.inverse?s.setExtent(u[1],u[0]):s.setExtent(u[0],u[1])}function VSe(r,e){var t=this,i=t.getAngleAxis(),n=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(o){if(o.coordinateSystem===t){var l=o.getData();R(q0(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),R(q0(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),hf(i.scale,i.model),hf(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),s=360/i.scale.count();i.inverse?a[1]+=s:a[1]-=s,i.setExtent(a[0],a[1])}}function zSe(r){return r.mainType==="angleAxis"}function V3(r,e){var t;if(r.type=e.get("type"),r.scale=E1(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),zSe(e)){r.inverse=r.inverse!==e.get("clockwise");var i=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(r.inverse?-360:360);r.setExtent(i,n)}e.axis=r,r.model=e}var GSe={dimensions:Dj,create:function(r,e){var t=[];return r.eachComponent("polar",function(i,n){var a=new FSe(n+"");a.update=VSe;var s=a.getRadiusAxis(),o=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");V3(s,l),V3(o,u),USe(a,i,e),t.push(a),i.coordinateSystem=a,a.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",mr).models[0];i.coordinateSystem=n.coordinateSystem}}),t}},HSe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function jm(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function Xm(r){var e=r.getRadiusAxis();return e.inverse?0:1}function z3(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var $Se=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,a=n.polar,s=a.getRadiusAxis().getExtent(),o=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=oe(n.getViewLabels(),function(c){c=Ee(c);var h=n.scale,d=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(d),c});z3(u),z3(o),R(HSe,function(c){t.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&WSe[c](this.group,t,a,o,l,s,u)},this)}},e.type="angleAxis",e}(pc),WSe={axisLine:function(r,e,t,i,n,a){var s=e.getModel(["axisLine","lineStyle"]),o=t.getAngleAxis(),l=Math.PI/180,u=o.getExtent(),c=Xm(t),h=c?0:1,d,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?d=new cc[f]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:o.inverse},style:s.getLineStyle(),z2:1,silent:!0}):d=new Jv({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[h]},style:s.getLineStyle(),z2:1,silent:!0}),d.style.fill=null,r.add(d)},axisTick:function(r,e,t,i,n,a){var s=e.getModel("axisTick"),o=(s.get("inside")?-1:1)*s.get("length"),l=a[Xm(t)],u=oe(i,function(c){return new kr({shape:jm(t,[l,l+o],c.coord)})});r.add(Un(u,{style:Ce(s.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,i,n,a){if(n.length){for(var s=e.getModel("axisTick"),o=e.getModel("minorTick"),l=(s.get("inside")?-1:1)*o.get("length"),u=a[Xm(t)],c=[],h=0;h<n.length;h++)for(var d=0;d<n[h].length;d++)c.push(new kr({shape:jm(t,[u,u+l],n[h][d].coord)}));r.add(Un(c,{style:Ce(o.getModel("lineStyle").getLineStyle(),Ce(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,i,n,a,s){var o=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");R(s,function(h,d){var f=l,p=h.tickValue,v=a[Xm(t)],g=t.coordToPoint([v+u,h.coord]),m=t.cx,y=t.cy,_=Math.abs(g[0]-m)/v<.3?"center":g[0]>m?"left":"right",b=Math.abs(g[1]-y)/v<.3?"middle":g[1]>y?"top":"bottom";if(o&&o[p]){var S=o[p];De(S)&&S.textStyle&&(f=new yt(S.textStyle,l,l.ecModel))}var x=new lt({silent:Ci.isLabelSilent(e),style:kt(f,{x:g[0],y:g[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:b})});if(r.add(x),c){var C=Ci.makeAxisEventDataBase(e);C.targetType="axisLabel",C.value=h.rawLabel,ke(x).eventData=C}},this)},splitLine:function(r,e,t,i,n,a){var s=e.getModel("splitLine"),o=s.getModel("lineStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<i.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new kr({shape:jm(t,a,i[h].coord)}))}for(var h=0;h<c.length;h++)r.add(Un(c[h],{style:Ce({stroke:l[h%l.length]},o.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,i,n,a){if(n.length){for(var s=e.getModel("minorSplitLine"),o=s.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var c=0;c<n[u].length;c++)l.push(new kr({shape:jm(t,a,n[u][c].coord)}));r.add(Un(l,{style:o.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,i,n,a){if(i.length){var s=e.getModel("splitArea"),o=s.getModel("areaStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,d=-i[0].coord*h,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),v=e.get("clockwise"),g=1,m=i.length;g<=m;g++){var y=g===m?i[0].coord:i[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Ei({shape:{cx:t.cx,cy:t.cy,r0:f,r:p,startAngle:d,endAngle:-y*h,clockwise:v},silent:!0})),d=-y*h}for(var g=0;g<c.length;g++)r.add(Un(c[g],{style:Ce({fill:l[g%l.length]},o.getAreaStyle()),silent:!0}))}}},qSe=["axisLine","axisTickLabel","axisName"],jSe=["splitLine","splitArea","minorSplitLine"],XSe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var n=this._axisGroup,a=this._axisGroup=new Le;this.group.add(a);var s=t.axis,o=s.polar,l=o.getAngleAxis(),u=s.getTicksCoords(),c=s.getMinorTicksCoords(),h=l.getExtent()[0],d=s.getExtent(),f=KSe(o,t,h),p=new Ci(t,f);R(qSe,p.add,p),a.add(p.getGroup()),rg(n,a,t),R(jSe,function(v){t.get([v,"show"])&&!s.scale.isBlank()&&YSe[v](this.group,t,o,h,d,u,c)},this)}},e.type="radiusAxis",e}(pc),YSe={splitLine:function(r,e,t,i,n,a){var s=e.getModel("splitLine"),o=s.getModel("lineStyle"),l=o.get("color"),u=0,c=t.getAngleAxis(),h=Math.PI/180,d=c.getExtent(),f=Math.abs(d[1]-d[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<a.length;v++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new cc[f]({shape:{cx:t.cx,cy:t.cy,r:Math.max(a[v].coord,0),startAngle:-d[0]*h,endAngle:-d[1]*h,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)r.add(Un(p[v],{style:Ce({stroke:l[v%l.length],fill:null},o.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,i,n,a,s){if(s.length){for(var o=e.getModel("minorSplitLine"),l=o.getModel("lineStyle"),u=[],c=0;c<s.length;c++)for(var h=0;h<s[c].length;h++)u.push(new eo({shape:{cx:t.cx,cy:t.cy,r:s[c][h].coord}}));r.add(Un(u,{style:Ce({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,i,n,a){if(a.length){var s=e.getModel("splitArea"),o=s.getModel("areaStyle"),l=o.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=a[0].coord,d=1;d<a.length;d++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new Ei({shape:{cx:t.cx,cy:t.cy,r0:h,r:a[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=a[d].coord}for(var d=0;d<c.length;d++)r.add(Un(c[d],{style:Ce({fill:l[d%l.length]},o.getAreaStyle()),silent:!0}))}}};function KSe(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Ej(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function Ij(r,e){return e.dim+r.model.componentIndex}function ZSe(r,e,t){var i={},n=QSe(St(e.getSeriesByType(r),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(a){if(a.coordinateSystem.type==="polar"){var s=a.getData(),o=a.coordinateSystem,l=o.getBaseAxis(),u=Ij(o,l),c=Ej(a),h=n[u][c],d=h.offset,f=h.width,p=o.getOtherAxis(l),v=a.coordinateSystem.cx,g=a.coordinateSystem.cy,m=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;i[c]=i[c]||[];for(var _=s.mapDimension(p.dim),b=s.mapDimension(l.dim),S=nl(s,_),x=l.dim!=="radius"||!a.get("roundCap",!0),C=p.model,D=C.get("startValue"),I=p.dataToCoord(D||0),M=0,L=s.count();M<L;M++){var N=s.get(_,M),O=s.get(b,M),B=N>=0?"p":"n",F=I;S&&(i[c][O]||(i[c][O]={p:I,n:I}),F=i[c][O][B]);var U=void 0,$=void 0,q=void 0,Z=void 0;if(p.dim==="radius"){var te=p.dataToCoord(N)-I,Q=l.dataToCoord(O);Math.abs(te)<m&&(te=(te<0?-1:1)*m),U=F,$=F+te,q=Q-d,Z=q-f,S&&(i[c][O][B]=$)}else{var se=p.dataToCoord(N,x)-I,he=l.dataToCoord(O);Math.abs(se)<y&&(se=(se<0?-1:1)*y),U=he+d,$=U+f,q=F,Z=F+se,S&&(i[c][O][B]=Z)}s.setItemLayout(M,{cx:v,cy:g,r0:U,r:$,startAngle:-q*Math.PI/180,endAngle:-Z*Math.PI/180,clockwise:q>=Z})}}})}function QSe(r){var e={};R(r,function(i,n){var a=i.getData(),s=i.coordinateSystem,o=s.getBaseAxis(),l=Ij(s,o),u=o.getExtent(),c=o.type==="category"?o.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},d=h.stacks;e[l]=h;var f=Ej(i);d[f]||h.autoWidthCount++,d[f]=d[f]||{width:0,maxWidth:0};var p=ce(i.get("barWidth"),c),v=ce(i.get("barMaxWidth"),c),g=i.get("barGap"),m=i.get("barCategoryGap");p&&!d[f].width&&(p=Math.min(h.remainedWidth,p),d[f].width=p,h.remainedWidth-=p),v&&(d[f].maxWidth=v),g!=null&&(h.gap=g),m!=null&&(h.categoryGap=m)});var t={};return R(e,function(i,n){t[n]={};var a=i.stacks,s=i.bandWidth,o=ce(i.categoryGap,s),l=ce(i.gap,1),u=i.remainedWidth,c=i.autoWidthCount,h=(u-o)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(v,g){var m=v.maxWidth;m&&m<h&&(m=Math.min(m,u),v.width&&(m=Math.min(m,v.width)),u-=m,v.width=m,c--)}),h=(u-o)/(c+(c-1)*l),h=Math.max(h,0);var d=0,f;R(a,function(v,g){v.width||(v.width=h),f=v,d+=v.width*(1+l)}),f&&(d-=f.width*l);var p=-d/2;R(a,function(v,g){t[n][g]=t[n][g]||{offset:p,width:v.width},p+=v.width*(1+l)})}),t}var JSe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},exe={splitNumber:5},txe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}($t);function rxe(r){Ze(gg),pc.registerAxisPointerClass("PolarAxisPointer",MSe),r.registerCoordinateSystem("polar",GSe),r.registerComponentModel(RSe),r.registerComponentView(txe),df(r,"angle",OSe,JSe),df(r,"radius",NSe,exe),r.registerComponentView($Se),r.registerComponentView(XSe),r.registerLayout(Ue(ZSe,"bar"))}function Y2(r,e){e=e||{};var t=r.coordinateSystem,i=r.axis,n={},a=i.position,s=i.orient,o=t.getRect(),l=[o.x,o.x+o.width,o.y,o.y+o.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[s==="vertical"?u.vertical[a]:l[0],s==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};n.rotation=Math.PI/2*c[s];var h={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=h[a],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Gr(e.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var d=e.rotate;return d==null&&(d=r.get(["axisLabel","rotate"])),n.labelRotation=a==="top"?-d:d,n.z2=1,n}var ixe=["axisLine","axisTickLabel","axisName"],nxe=["splitArea","splitLine"],axe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,i,n,a){var s=this.group;s.removeAll();var o=this._axisGroup;this._axisGroup=new Le;var l=Y2(t),u=new Ci(t,l);R(ixe,u.add,u),s.add(this._axisGroup),s.add(u.getGroup()),R(nxe,function(c){t.get([c,"show"])&&sxe[c](this,this.group,this._axisGroup,t)},this),rg(o,this._axisGroup,t),r.prototype.render.call(this,t,i,n,a)},e.prototype.remove=function(){ZW(this)},e.type="singleAxis",e}(pc),sxe={splitLine:function(r,e,t,i){var n=i.axis;if(!n.scale.isBlank()){var a=i.getModel("splitLine"),s=a.getModel("lineStyle"),o=s.get("color");o=o instanceof Array?o:[o];for(var l=s.get("width"),u=i.coordinateSystem.getRect(),c=n.isHorizontal(),h=[],d=0,f=n.getTicksCoords({tickModel:a}),p=[],v=[],g=0;g<f.length;++g){var m=n.toGlobalCoord(f[g].coord);c?(p[0]=m,p[1]=u.y,v[0]=m,v[1]=u.y+u.height):(p[0]=u.x,p[1]=m,v[0]=u.x+u.width,v[1]=m);var y=new kr({shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},silent:!0});lf(y.shape,l);var _=d++%o.length;h[_]=h[_]||[],h[_].push(y)}for(var b=s.getLineStyle(["color"]),g=0;g<h.length;++g)e.add(Un(h[g],{style:Ce({stroke:o[g%o.length]},b),silent:!0}))}},splitArea:function(r,e,t,i){KW(r,t,i,i)}},My=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(tt);_r(My,og.prototype);var oxe=function(r){j(e,r);function e(t,i,n,a,s){var o=r.call(this,t,i,n)||this;return o.type=a||"value",o.position=s||"bottom",o}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,i){return this.coordinateSystem.pointToData(t)[0]},e}(xa),Pj=["single"],lxe=function(){function r(e,t,i){this.type="single",this.dimension="single",this.dimensions=Pj,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var n=this.dimension,a=new oxe(n,E1(e),[0,0],e.get("type"),e.get("position")),s=a.type==="category";a.onBand=s&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},r.prototype.update=function(e,t){e.eachSeries(function(i){if(i.coordinateSystem===this){var n=i.getData();R(n.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(n,a)},this),hf(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=Ar({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,i=t.isHorizontal(),n=i?[0,e.width]:[0,e.height],a=t.inverse?1:0;t.setExtent(n[a],n[1-a]),this._updateAxisTransform(t,i?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var i=e.getExtent(),n=i[0]+i[1],a=e.isHorizontal();e.toGlobalCoord=a?function(s){return s+t}:function(s){return n-s+t},e.toLocalCoord=a?function(s){return s-t}:function(s){return n-s+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),i=this.getAxis(),n=i.orient;return n==="horizontal"?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),i=this.getRect(),n=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[a]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,i){var n=G3(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=G3(t);return n===this?this.pointToData(i):null},r}();function G3(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function uxe(r,e){var t=[];return r.eachComponent("singleAxis",function(i,n){var a=new lxe(i,r,e);a.name="single_"+n,a.resize(i,e),i.coordinateSystem=a,t.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var n=i.getReferringComponents("singleAxis",mr).models[0];i.coordinateSystem=n&&n.coordinateSystem}}),t}var cxe={create:uxe,dimensions:Pj},H3=["x","y"],hxe=["width","height"],fxe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,s){var o=n.axis,l=o.coordinateSystem,u=QS(l,1-s_(o)),c=l.dataToPoint(i)[0],h=a.get("type");if(h&&h!=="none"){var d=PE(a),f=dxe[h](o,c,u);f.style=d,t.graphicKey=f.type,t.pointer=f}var p=Y2(n);xj(i,t,p,n,a,s)},e.prototype.getHandleTransform=function(t,i,n){var a=Y2(i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var s=ME(i.axis,t,a);return{x:s[0],y:s[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var s=n.axis,o=s.coordinateSystem,l=s_(s),u=QS(o,l),c=[t.x,t.y];c[l]+=i[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=QS(o,1-l),d=(h[1]+h[0])/2,f=[d,d];return f[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(IE),dxe={line:function(r,e,t){var i=LE([e,t[0]],[e,t[1]],s_(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:wj([e-i/2,t[0]],[i,n],s_(r))}}};function s_(r){return r.isHorizontal()?0:1}function QS(r,e){var t=r.getRect();return[t[H3[e]],t[H3[e]]+t[hxe[e]]]}var pxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}($t);function vxe(r){Ze(gg),pc.registerAxisPointerClass("SingleAxisPointer",fxe),r.registerComponentView(pxe),r.registerComponentView(axe),r.registerComponentModel(My),df(r,"single",My,My.defaultOption),r.registerCoordinateSystem("single",cxe)}var gxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,n){var a=Bf(t);r.prototype.init.apply(this,arguments),$3(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),$3(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(tt);function $3(r,e){var t=r.cellSize,i;ie(t)?i=t:i=r.cellSize=[t,t],i.length===1&&(i[1]=i[0]);var n=oe([0,1],function(a){return Fhe(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});il(r,e,{type:"box",ignoreSize:n})}var mxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll();var s=t.coordinateSystem,o=s.getRangeInfo(),l=s.getOrient(),u=i.getLocaleModel();this._renderDayRect(t,o,a),this._renderLines(t,o,l,a),this._renderYearText(t,o,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,o,l,a)},e.prototype._renderDayRect=function(t,i,n){for(var a=t.coordinateSystem,s=t.getModel("itemStyle").getItemStyle(),o=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,h=new st({shape:{x:c[0],y:c[1],width:o,height:l},cursor:"default",style:s});n.add(h)}},e.prototype._renderLines=function(t,i,n,a){var s=this,o=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=i.start,d=0;h.time<=i.end.time;d++){p(h.formatedDate),d===0&&(h=o.getDateInfo(i.start.y+"-"+i.start.m));var f=h.date;f.setMonth(f.getMonth()+1),h=o.getDateInfo(f)}p(o.getNextNDay(i.end.time,1).formatedDate);function p(v){s._firstDayOfMonth.push(o.getDateInfo(v)),s._firstDayPoints.push(o.dataToRect([v],!1).tl);var g=s._getLinePointsOfOneWeek(t,v,n);s._tlpoints.push(g[0]),s._blpoints.push(g[g.length-1]),u&&s._drawSplitline(g,l,a)}u&&this._drawSplitline(s._getEdgesPoints(s._tlpoints,c,n),l,a),u&&this._drawSplitline(s._getEdgesPoints(s._blpoints,c,n),l,a)},e.prototype._getEdgesPoints=function(t,i,n){var a=[t[0].slice(),t[t.length-1].slice()],s=n==="horizontal"?0:1;return a[0][s]=a[0][s]-i/2,a[1][s]=a[1][s]+i/2,a},e.prototype._drawSplitline=function(t,i,n){var a=new Pi({z2:20,shape:{points:t},style:i});n.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,i,n){for(var a=t.coordinateSystem,s=a.getDateInfo(i),o=[],l=0;l<7;l++){var u=a.getNextNDay(s.time,l),c=a.dataToRect([u.time],!1);o[2*u.day]=c.tl,o[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,i){return pe(t)&&t?Ohe(t,i):we(t)?t(i):i.nameMap},e.prototype._yearTextPositionControl=function(t,i,n,a,s){var o=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=s,u=["center","top"]):a==="left"?o-=s:a==="right"?(o+=s,u=["center","top"]):l-=s;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:o,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,i,n,a){var s=t.getModel("yearLabel");if(s.get("show")){var o=s.get("margin"),l=s.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,d=n==="horizontal"?0:1,f={top:[c,u[d][1]],bottom:[c,u[1-d][1]],left:[u[1-d][0],h],right:[u[d][0],h]},p=i.start.y;+i.end.y>+i.start.y&&(p=p+"-"+i.end.y);var v=s.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:p},m=this._formatterLabel(v,g),y=new lt({z2:30,style:kt(s,{text:m})});y.attr(this._yearTextPositionControl(y,f[l],n,l,o)),a.add(y)}},e.prototype._monthTextPositionControl=function(t,i,n,a,s){var o="left",l="top",u=t[0],c=t[1];return n==="horizontal"?(c=c+s,i&&(o="center"),a==="start"&&(l="bottom")):(u=u+s,i&&(l="middle"),a==="start"&&(o="right")),{x:u,y:c,align:o,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,n,a){var s=t.getModel("monthLabel");if(s.get("show")){var o=s.get("nameMap"),l=s.get("margin"),u=s.get("position"),c=s.get("align"),h=[this._tlpoints,this._blpoints];(!o||pe(o))&&(o&&(i=i2(o)||i),o=i.get(["time","monthAbbr"])||[]);var d=u==="start"?0:1,f=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=0;v<h[d].length-1;v++){var g=h[d][v].slice(),m=this._firstDayOfMonth[v];if(p){var y=this._firstDayPoints[v];g[f]=(y[f]+h[0][v+1][f])/2}var _=s.get("formatter"),b=o[+m.m-1],S={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:b},x=this._formatterLabel(_,S),C=new lt({z2:30,style:J(kt(s,{text:x}),this._monthTextPositionControl(g,p,n,u,l))});a.add(C)}}},e.prototype._weekTextPositionControl=function(t,i,n,a,s){var o="center",l="middle",u=t[0],c=t[1],h=n==="start";return i==="horizontal"?(u=u+a+(h?1:-1)*s[0]/2,o=h?"right":"left"):(c=c+a+(h?1:-1)*s[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:o,verticalAlign:l}},e.prototype._renderWeekText=function(t,i,n,a,s){var o=t.getModel("dayLabel");if(o.get("show")){var l=t.coordinateSystem,u=o.get("position"),c=o.get("nameMap"),h=o.get("margin"),d=l.getFirstDayOfWeek();if(!c||pe(c)){c&&(i=i2(c)||i);var f=i.get(["time","dayOfWeekShort"]);c=f||oe(i.get(["time","dayOfWeekAbbr"]),function(S){return S[0]})}var p=l.getNextNDay(n.end.time,7-n.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];h=ce(h,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(n.start.time,-(7+n.fweek)).time,h=-h);for(var g=0;g<7;g++){var m=l.getNextNDay(p,g),y=l.dataToRect([m.time],!1).center,_=g;_=Math.abs((g+d)%7);var b=new lt({z2:30,style:J(kt(o,{text:c[_]}),this._weekTextPositionControl(y,a,u,h,v))});s.add(b)}}},e.type="calendar",e}($t),JS=864e5,yxe=function(){function r(e,t,i){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=ls(e);var t=e.getFullYear(),i=e.getMonth()+1,n=i<10?"0"+i:""+i,a=e.getDate(),s=a<10?"0"+a:""+a,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+"",m:n,d:s,day:o,time:e.getTime(),formatedDate:t+"-"+n+"-"+s,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.getCellSize().slice(),s=this._model.getBoxLayoutParams(),o=this._orient==="horizontal"?[i,7]:[7,i];R([0,1],function(h){c(a,h)&&(s[n[h]]=a[h]*o[h])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Ar(s,l);R([0,1],function(h){c(a,h)||(a[h]=u[n[h]]/o[h])});function c(h,d){return h[d]!=null&&h[d]!=="auto"}this._sw=a[0],this._sh=a[1]},r.prototype.dataToPoint=function(e,t){ie(e)&&(e=e[0]),t==null&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,a=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+JS))return[NaN,NaN];var s=i.day,o=this._getRangeInfo([n.start.time,a]).nthWeek;return this._orient==="vertical"?[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(i,t-1,n):this._getDateByWeeksAndDay(t,i-1,n)},r.prototype.convertToPixel=function(e,t,i){var n=W3(t);return n===this?n.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=W3(t);return n===this?n.pointToData(i):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(ie(e)&&e.length===1&&(e=e[0]),ie(e))t=e;else{var i=e.toString();if(/^\d{4}$/.test(i)&&(t=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var n=this.getDateInfo(i),a=n.date;a.setMonth(a.getMonth()+1);var s=this.getNextNDay(a,-1);t=[n.formatedDate,s.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(t=[i,i])}if(!t)return e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var n=Math.floor(t[1].time/JS)-Math.floor(t[0].time/JS)+1,a=new Date(t[0].time),s=a.getDate(),o=t[1].date.getDate();a.setDate(s+n-1);var l=a.getDate();if(l!==o)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==o&&(a.getTime()-t[1].time)*u>0;)n-=u,a.setDate(l-u);var c=Math.floor((n+t[0].day+6)/7),h=i?-c+1:c-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:c,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,i){var n=this._getRangeInfo(i);if(e>n.weeks||e===0&&t<n.fweek||e===n.weeks&&t>n.lweek)return null;var a=(e-1)*7-n.fweek+t,s=new Date(n.start.time);return s.setDate(+n.start.d+a),this.getDateInfo(s)},r.create=function(e,t){var i=[];return e.eachComponent("calendar",function(n){var a=new r(n);i.push(a),n.coordinateSystem=a}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function W3(r){var e=r.calendarModel,t=r.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}function _xe(r){r.registerComponentModel(gxe),r.registerComponentView(mxe),r.registerCoordinateSystem("calendar",yxe)}function bxe(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function q3(r,e){var t;return R(e,function(i){r[i]!=null&&r[i]!=="auto"&&(t=!0)}),t}function Txe(r,e,t){var i=J({},t),n=r[e],a=t.$action||"merge";a==="merge"?n?(We(n,i,!0),il(n,i,{ignoreSize:!0}),SH(t,n),Ym(t,n),Ym(t,n,"shape"),Ym(t,n,"style"),Ym(t,n,"extra"),t.clipPath=n.clipPath):r[e]=i:a==="replace"?r[e]=i:a==="remove"&&n&&(r[e]=null)}var Mj=["transition","enterFrom","leaveTo"],Sxe=Mj.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Ym(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var i=t?Mj:Sxe,n=0;n<i.length;n++){var a=i[n];r[a]==null&&e[a]!=null&&(r[a]=e[a])}}function xxe(r,e){if(r&&(r.hv=e.hv=[q3(e,["left","right"]),q3(e,["top","bottom"])],r.type==="group")){var t=r,i=e;t.width==null&&(t.width=i.width=0),t.height==null&&(t.height=i.height=0)}}var wxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,i){var n=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,i),this.option.elements=n},e.prototype.optionUpdated=function(t,i){var n=this.option,a=(i?n:t).elements,s=n.elements=i?[]:n.elements,o=[];this._flatten(a,o,null);var l=y9(s,o,"normalMerge"),u=this._elOptionsToUpdate=[];R(l,function(c,h){var d=c.newOption;d&&(u.push(d),bxe(c,d),Txe(s,h,d),xxe(s[h],d))},this),n.elements=St(s,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,i,n){R(t,function(a){if(a){n&&(a.parentOption=n),i.push(a);var s=a.children;s&&s.length&&this._flatten(s,i,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(tt),j3={path:null,compoundPath:null,group:Le,image:Wr,text:lt},Nn=ot(),Cxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=be()},e.prototype.render=function(t,i,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,a=this.group,s=t.get("z"),o=t.get("zlevel");R(i,function(l){var u=wr(l.id,null),c=u!=null?n.get(u):null,h=wr(l.parentId,null),d=h!=null?n.get(h):a,f=l.type,p=l.style;f==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,g=l.textConfig;if(p&&hj(p,f,!!g,!!v)){var m=fj(p,f,!0);!g&&m.textConfig&&(g=l.textConfig=m.textConfig),!v&&m.textContent&&(v=m.textContent)}var y=Axe(l),_=l.$action||"merge",b=_==="merge",S=_==="replace";if(b){var x=!c,C=c;x?C=X3(u,d,l.type,n):(C&&(Nn(C).isNew=!1),gj(C)),C&&(Iy(C,y,t,{isInit:x}),Y3(C,l,s,o))}else if(S){Ly(c,l,n,t);var D=X3(u,d,l.type,n);D&&(Iy(D,y,t,{isInit:!0}),Y3(D,l,s,o))}else _==="remove"&&(pj(c,l),Ly(c,l,n,t));var I=n.get(u);if(I&&v)if(b){var M=I.getTextContent();M?M.attr(v):I.setTextContent(new lt(v))}else S&&I.setTextContent(new lt(v));if(I){var L=l.clipPath;if(L){var N=L.type,O=void 0,x=!1;if(b){var B=I.getClipPath();x=!B||Nn(B).type!==N,O=x?K2(N):B}else S&&(x=!0,O=K2(N));I.setClipPath(O),Iy(O,L,t,{isInit:x}),n_(O,L.keyframeAnimation,t)}var F=Nn(I);I.setTextConfig(g),F.option=l,Dxe(I,t,l),kf({el:I,componentModel:t,itemName:I.name,itemTooltipOption:l.tooltip}),n_(I,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,i){for(var n=t.option.elements,a=this.group,s=this._elMap,o=i.getWidth(),l=i.getHeight(),u=["x","y"],c=0;c<n.length;c++){var h=n[c],d=wr(h.id,null),f=d!=null?s.get(d):null;if(!(!f||!f.isGroup)){var p=f.parent,v=p===a,g=Nn(f),m=Nn(p);g.width=ce(g.option.width,v?o:m.width)||0,g.height=ce(g.option.height,v?l:m.height)||0}}for(var c=n.length-1;c>=0;c--){var h=n[c],d=wr(h.id,null),f=d!=null?s.get(d):null;if(f){var p=f.parent,m=Nn(p),y=p===a?{width:o,height:l}:{width:m.width,height:m.height},_={},b=_1(f,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!Nn(f).isNew&&b){for(var S=h.transition,x={},C=0;C<u.length;C++){var D=u[C],I=_[D];S&&(Wu(S)||Xe(S,D)>=0)?x[D]=I:f[D]=I}ct(f,x,t,0)}else f.attr(_)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(n){Ly(n,Nn(n).option,i,t._lastGraphicModel)}),this._elMap=be()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}($t);function K2(r){var e=_e(j3,r)?j3[r]:pD(r),t=new e({});return Nn(t).type=r,t}function X3(r,e,t,i){var n=K2(t);return e.add(n),i.set(r,n),Nn(n).id=r,Nn(n).isNew=!0,n}function Ly(r,e,t,i){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(a){Ly(a,e,t,i)}),O1(r,e,i),t.removeKey(Nn(r).id))}function Y3(r,e,t,i){r.isGroup||R([["cursor",Yn.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(n){var a=n[0];_e(e,a)?r[a]=Be(e[a],n[1]):r[a]==null&&(r[a]=n[1])}),R(rt(e),function(n){if(n.indexOf("on")===0){var a=e[n];r[n]=we(a)?a:null}}),_e(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function Axe(r){return r=J({},r),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(TH),function(e){delete r[e]}),r}function Dxe(r,e,t){var i=ke(r).eventData;!r.silent&&!r.ignore&&!i&&(i=ke(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),i&&(i.info=t.info)}function Exe(r){r.registerComponentModel(wxe),r.registerComponentView(Cxe),r.registerPreprocessor(function(e){var t=e.graphic;ie(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var K3=["x","y","radius","angle","single"],Ixe=["cartesian2d","polar","singleAxis"];function Pxe(r){var e=r.get("coordinateSystem");return Xe(Ixe,e)>=0}function Go(r){return r+"Axis"}function Mxe(r,e){var t=be(),i=[],n=be();r.eachComponent({mainType:"dataZoom",query:e},function(c){n.get(c.uid)||o(c)});var a;do a=!1,r.eachComponent("dataZoom",s);while(a);function s(c){!n.get(c.uid)&&l(c)&&(o(c),a=!0)}function o(c){n.set(c.uid,!0),i.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(d,f){var p=t.get(d);p&&p[f]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,d){(t.get(h)||t.set(h,[]))[d]=!0})}return i}function Lj(r){var e=r.ecModel,t={infoList:[],infoMap:be()};return r.eachTargetAxis(function(i,n){var a=e.getComponent(Go(i),n);if(a){var s=a.getCoordSysModel();if(s){var o=s.uid,l=t.infoMap.get(o);l||(l={model:s,axisModels:[]},t.infoList.push(l),t.infoMap.set(o,l)),l.axisModels.push(a)}}}),t}var ex=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),Lv=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,i,n){var a=Z3(t);this.settledOption=a,this.mergeDefaultAndTheme(t,n),this._doInit(a)},e.prototype.mergeOption=function(t){var i=Z3(t);We(this.option,t,!0),We(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,s){this._rangePropMode[s]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=be(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return R(K3,function(n){var a=this.getReferringComponents(Go(n),wue);if(a.specified){i=!0;var s=new ex;R(a.models,function(o){s.add(o.componentIndex)}),t.set(n,s)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var n=this.ecModel,a=!0;if(a){var s=i==="vertical"?"y":"x",o=n.findComponents({mainType:s+"Axis"});l(o,s)}if(a){var o=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(o,"single")}function l(u,c){var h=u[0];if(h){var d=new ex;if(d.add(h.componentIndex),t.set(c,d),a=!1,c==="x"||c==="y"){var f=h.getReferringComponents("grid",mr).models[0];f&&R(u,function(p){h.componentIndex!==p.componentIndex&&f===p.getReferringComponents("grid",mr).models[0]&&d.add(p.componentIndex)})}}}a&&R(K3,function(u){if(a){var c=n.findComponents({mainType:Go(u),filter:function(d){return d.get("type",!0)==="category"}});if(c[0]){var h=new ex;h.add(c[0].componentIndex),t.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,n=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,s){var o=t[a[0]]!=null,l=t[a[1]]!=null;o&&!l?i[s]="percent":!o&&l?i[s]="value":n?i[s]=n[s]:o&&(i[s]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,n){t==null&&(t=this.ecModel.getComponent(Go(i),n))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(n,a){R(n.indexList,function(s){t.call(i,a,s)})})},e.prototype.getAxisProxy=function(t,i){var n=this.getAxisModel(t,i);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[i])return this.ecModel.getComponent(Go(t),i)},e.prototype.setRawRange=function(t){var i=this.option,n=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(i[a[0]]=n[a[0]]=t[a[0]],i[a[1]]=n[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;R(["start","startValue","end","endValue"],function(n){i[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var s=n[a],o=this._targetAxisInfoMap.get(s),l=0;l<o.indexList.length;l++){var u=this.getAxisProxy(s,o.indexList[l]);if(u.hostedBy(this))return u;i||(i=u)}return i},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(tt);function Z3(r){var e={};return R(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var Lxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(Lv),NE=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n,a){this.dataZoomModel=t,this.ecModel=i,this.api=n},e.type="dataZoom",e}($t),kxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(NE),oh=R,Q3=Hn,Rxe=function(){function r(e,t,i,n){this._dimName=e,this._axisIndex=t,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Pxe(t)){var i=Go(this._dimName),n=t.getReferringComponents(i,mr).models[0];n&&this._axisIndex===n.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Ee(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,a=this._dataZoomModel.getRangePropMode(),s=[0,100],o=[],l=[],u;oh(["start","end"],function(d,f){var p=e[d],v=e[d+"Value"];a[f]==="percent"?(p==null&&(p=s[f]),v=n.parse(bt(p,s,t))):(u=!0,v=v==null?t[f]:n.parse(v),p=bt(v,t,s)),l[f]=v==null||isNaN(v)?t[f]:v,o[f]=p==null||isNaN(p)?s[f]:p}),Q3(l),Q3(o);var c=this._minMaxSpan;u?h(l,o,t,s,!1):h(o,l,s,t,!0);function h(d,f,p,v,g){var m=g?"Span":"ValueSpan";vc(0,d,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)f[y]=bt(d[y],p,v,!0),g&&(f[y]=n.parse(f[y]))}return{valueWindow:l,percentWindow:o}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=Oxe(this,this._dimName,t),this._updateMinMaxSpan();var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var i=this._dimName,n=this.getTargetSeriesModels(),a=e.get("filterMode"),s=this._valueWindow;if(a==="none")return;oh(n,function(l){var u=l.getData(),c=u.mapDimensionsAll(i);if(c.length){if(a==="weakFilter"){var h=u.getStore(),d=oe(c,function(f){return u.getDimensionIndex(f)},u);u.filterSelf(function(f){for(var p,v,g,m=0;m<c.length;m++){var y=h.get(d[m],f),_=!isNaN(y),b=y<s[0],S=y>s[1];if(_&&!b&&!S)return!0;_&&(g=!0),b&&(p=!0),S&&(v=!0)}return g&&p&&v})}else oh(c,function(f){if(a==="empty")l.setData(u=u.map(f,function(v){return o(v)?v:NaN}));else{var p={};p[f]=s,u.selectRange(p)}});oh(c,function(f){u.setApproximateExtent(s,f)})}});function o(l){return l>=s[0]&&l<=s[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;oh(["min","max"],function(n){var a=t.get(n+"Span"),s=t.get(n+"ValueSpan");s!=null&&(s=this.getAxisModel().axis.scale.parse(s)),s!=null?a=bt(i[0]+s,i,[0,100],!0):a!=null&&(s=bt(a,[0,100],i,!0)-i[0]),e[n+"Span"]=a,e[n+"ValueSpan"]=s},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var n=c9(i,[0,500]);n=Math.min(n,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),t[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function Oxe(r,e,t){var i=[1/0,-1/0];oh(t,function(s){pve(i,s.getData(),e)});var n=r.getAxisModel(),a=K$(n.axis.scale,n,i).calculate();return[a.min,a.max]}var Nxe={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(s,o){var l=r.getComponent(Go(s),o);n(s,o,l,a)})})}e(function(n,a,s,o){s.__dzAxisProxy=null});var t=[];e(function(n,a,s,o){s.__dzAxisProxy||(s.__dzAxisProxy=new Rxe(n,a,o,r),t.push(s.__dzAxisProxy))});var i=be();return R(t,function(n){R(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).reset(t)}),t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function Bxe(r){r.registerAction("dataZoom",function(e,t){var i=Mxe(t,e);R(i,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var J3=!1;function BE(r){J3||(J3=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Nxe),Bxe(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Fxe(r){r.registerComponentModel(Lxe),r.registerComponentView(kxe),BE(r)}var Fn=function(){function r(){}return r}(),kj={};function lh(r,e){kj[r]=e}function Rj(r){return kj[r]}var Uxe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;R(this.option.feature,function(i,n){var a=Rj(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),We(i,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(tt);function Vxe(r,e,t){var i=e.getBoxLayoutParams(),n=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},s=Ar(i,a,n);Hu(e.get("orient"),r,e.get("itemGap"),s.width,s.height),_1(r,i,a,n)}function Oj(r,e){var t=Nf(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),r=new st({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var zxe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){var s=this.group;if(s.removeAll(),!t.get("show"))return;var o=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(p,v){h.push(v)}),new Xs(this._featureNames||[],h).add(d).update(d).remove(Ue(d,null)).execute(),this._featureNames=h;function d(p,v){var g=h[p],m=h[v],y=u[g],_=new yt(y,t,t.ecModel),b;if(a&&a.newTitle!=null&&a.featureName===g&&(y.title=a.newTitle),g&&!m){if(Gxe(g))b={onclick:_.option.onclick,featureName:g};else{var S=Rj(g);if(!S)return;b=new S}c[g]=b}else if(b=c[m],!b)return;b.uid=Of("toolbox-feature"),b.model=_,b.ecModel=i,b.api=n;var x=b instanceof Fn;if(!g&&m){x&&b.dispose&&b.dispose(i,n);return}if(!_.get("show")||x&&b.unusable){x&&b.remove&&b.remove(i,n);return}f(_,b,g),_.setIconStatus=function(C,D){var I=this.option,M=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[C]=D,M[C]&&(D==="emphasis"?qs:js)(M[C])},b instanceof Fn&&b.render&&b.render(_,i,n,a)}function f(p,v,g){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),_=v instanceof Fn&&v.getIcons?v.getIcons():p.get("icon"),b=p.get("title")||{},S,x;pe(_)?(S={},S[g]=_):S=_,pe(b)?(x={},x[g]=b):x=b;var C=p.iconPaths={};R(S,function(D,I){var M=ig(D,{},{x:-o/2,y:-o/2,width:o,height:o});M.setStyle(m.getItemStyle());var L=M.ensureState("emphasis");L.style=y.getItemStyle();var N=new lt({style:{text:x[I],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:vD({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},i)},ignore:!0});M.setTextContent(N),kf({el:M,componentModel:t,itemName:I,formatterParamsExtra:{title:x[I]}}),M.__title=x[I],M.on("mouseover",function(){var O=y.getItemStyle(),B=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";N.setStyle({fill:y.get("textFill")||O.fill||O.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),M.setTextConfig({position:y.get("textPosition")||B}),N.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",I])!=="emphasis"&&n.leaveEmphasis(this),N.hide()}),(p.get(["iconStatus",I])==="emphasis"?qs:js)(M),s.add(M),M.on("click",ge(v.onclick,v,i,n,I)),C[I]=M})}Vxe(s,t,n),s.add(Oj(s.getBoundingRect(),t)),l||s.eachChild(function(p){var v=p.__title,g=p.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=p.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!we(_)&&v){var b=_.style||(_.style={}),S=Kv(v,lt.makeFont(b)),x=p.x+s.x,C=p.y+s.y+o,D=!1;C+S.height>n.getHeight()&&(m.position="top",D=!0);var I=D?-5-S.height:o+10;x+S.width/2>n.getWidth()?(m.position=["100%",I],b.align="right"):x-S.width/2<0&&(m.position=[0,I],b.align="left")}})},e.prototype.updateView=function(t,i,n,a){R(this._features,function(s){s instanceof Fn&&s.updateView&&s.updateView(s.model,i,n,a)})},e.prototype.remove=function(t,i){R(this._features,function(n){n instanceof Fn&&n.remove&&n.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){R(this._features,function(n){n instanceof Fn&&n.dispose&&n.dispose(t,i)})},e.type="toolbox",e}($t);function Gxe(r){return r.indexOf("my")===0}var Hxe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var n=this.model,a=n.get("name")||t.get("title.0.text")||"echarts",s=i.getZr().painter.getType()==="svg",o=s?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=et.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+o,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||s){var d=l.split(","),f=d[0].indexOf("base64")>-1,p=s?decodeURIComponent(d[1]):d[1];f&&(p=window.atob(p));var v=a+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,v)}else{var _=document.createElement("iframe");document.body.appendChild(_);var b=_.contentWindow,S=b.document;S.open("image/svg+xml","replace"),S.write(p),S.close(),b.focus(),S.execCommand("SaveAs",!0,v),document.body.removeChild(_)}}else{var x=n.get("lang"),C='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',D=window.open();D.document.write(C),D.document.title=a}},e.getDefaultOption=function(t){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}(Fn),eB="__ec_magicType_stack__",$xe=[["line","bar"],["stack"]],Wxe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),n={};return R(t.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},e.getDefaultOption=function(t){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(t,i,n){var a=this.model,s=a.get(["seriesIndex",n]);if(tB[n]){var o={series:[]},l=function(h){var d=h.subType,f=h.id,p=tB[n](d,f,h,a);p&&(Ce(p,h.option),o.series.push(p));var v=h.coordinateSystem;if(v&&v.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=h.getReferringComponents(y,mr).models[0],b=_.componentIndex;o[y]=o[y]||[];for(var S=0;S<=b;S++)o[y][b]=o[y][b]||{};o[y][b].boundaryGap=n==="bar"}}};R($xe,function(h){Xe(h,n)>=0&&R(h,function(d){a.setIconStatus(d,"normal")})}),a.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:s==null?null:{seriesIndex:s}},l);var u,c=n;n==="stack"&&(u=We({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),i.dispatchAction({type:"changeMagicType",currentType:c,newOption:o,newTitle:u,featureName:"magicType"})}},e}(Fn),tB={line:function(r,e,t,i){if(r==="bar")return We({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,e,t,i){if(r==="line")return We({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,e,t,i){var n=t.get("stack")===eB;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),We({id:e,stack:n?"":eB},i.get(["option","stack"])||{},!0)}};hs({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var N1=new Array(60).join("-"),gf=" ";function qxe(r){var e={},t=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var s=a.getBaseAxis();if(s.type==="category"){var o=s.dim+"_"+s.index;e[o]||(e[o]={categoryAxis:s,valueAxis:a.getOtherAxis(s),series:[]},i.push({axisDim:s.dim,axisIndex:s.index})),e[o].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function jxe(r){var e=[];return R(r,function(t,i){var n=t.categoryAxis,a=t.valueAxis,s=a.dim,o=[" "].concat(oe(t.series,function(f){return f.name})),l=[n.model.getCategories()];R(t.series,function(f){var p=f.getRawData();l.push(f.getRawData().mapArray(p.mapDimension(s),function(v){return v}))});for(var u=[o.join(gf)],c=0;c<l[0].length;c++){for(var h=[],d=0;d<l.length;d++)h.push(l[d][c]);u.push(h.join(gf))}e.push(u.join(`
`))}),e.join(`
`+N1+`
`)}function Xxe(r){return oe(r,function(e){var t=e.getRawData(),i=[e.name],n=[];return t.each(t.dimensions,function(){for(var a=arguments.length,s=arguments[a-1],o=t.getName(s),l=0;l<a-1;l++)n[l]=arguments[l];i.push((o?o+gf:"")+n.join(gf))}),i.join(`
`)}).join(`
`+N1+`
`)}function Yxe(r){var e=qxe(r);return{value:St([jxe(e.seriesGroupByCategoryAxis),Xxe(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
`+N1+`
`),meta:e.meta}}function o_(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Kxe(r){var e=r.slice(0,r.indexOf(`
`));if(e.indexOf(gf)>=0)return!0}var Z2=new RegExp("["+gf+"]+","g");function Zxe(r){for(var e=r.split(/\n+/g),t=o_(e.shift()).split(Z2),i=[],n=oe(t,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var s=o_(e[a]).split(Z2);i.push(s.shift());for(var o=0;o<s.length;o++)n[o]&&(n[o].data[a]=s[o])}return{series:n,categories:i}}function Qxe(r){for(var e=r.split(/\n+/g),t=o_(e.shift()),i=[],n=0;n<e.length;n++){var a=o_(e[n]);if(a){var s=a.split(Z2),o="",l=void 0,u=!1;isNaN(s[0])?(u=!0,o=s[0],s=s.slice(1),i[n]={name:o,value:[]},l=i[n].value):l=i[n]=[];for(var c=0;c<s.length;c++)l.push(+s[c]);l.length===1&&(u?i[n].value=l[0]:i[n]=l[0])}}return{name:t,data:i}}function Jxe(r,e){var t=r.split(new RegExp(`
*`+N1+`
*`,"g")),i={series:[]};return R(t,function(n,a){if(Kxe(n)){var s=Zxe(n),o=e[a],l=o.axisDim+"Axis";o&&(i[l]=i[l]||[],i[l][o.axisIndex]={data:s.categories},i.series=i.series.concat(s.series))}else{var s=Qxe(n);i.series.push(s)}}),i}var ewe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var n=i.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var s=document.createElement("div");s.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",s.style.backgroundColor=a.get("backgroundColor")||"#fff";var o=document.createElement("h4"),l=a.get("lang")||[];o.innerHTML=l[0]||a.get("title"),o.style.cssText="margin:10px 20px",o.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),d=a.get("contentToOption"),f=Yxe(t);if(we(h)){var p=h(i.getOption());pe(p)?u.innerHTML=p:sf(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var v=c.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=a.get("textColor"),v.borderColor=a.get("textareaBorderColor"),v.backgroundColor=a.get("textareaColor"),c.value=f.value,u.appendChild(c)}var g=f.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),b=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var S=this;function x(){n.removeChild(s),S._dom=null}Iw(_,"click",x),Iw(b,"click",function(){if(d==null&&h!=null||d!=null&&h==null){x();return}var C;try{we(d)?C=d(u,i.getOption()):C=Jxe(c.value,g)}catch(D){throw x(),new Error("Data view format error "+D)}C&&i.dispatchAction({type:"changeDataView",newOption:C}),x()}),_.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=_.style.cssText=y,!a.get("readOnly")&&m.appendChild(b),m.appendChild(_),s.appendChild(o),s.appendChild(u),s.appendChild(m),u.style.height=n.clientHeight-80+"px",n.appendChild(s),this._dom=s},e.prototype.remove=function(t,i){this._dom&&i.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.getDefaultOption=function(t){var i={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return i},e}(Fn);function twe(r,e){return oe(r,function(t,i){var n=e&&e[i];if(De(n)&&!ie(n)){var a=De(t)&&!ie(t);a||(t={value:t});var s=n.name!=null&&t.name==null;return t=Ce(t,n),s&&delete t.name,t}else return t})}hs({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];R(r.newOption.series,function(i){var n=e.getSeriesByName(i.name)[0];if(!n)t.push(J({type:"scatter"},i));else{var a=n.get("data");t.push({name:i.name,data:twe(i.data,a)})}}),e.mergeOption(Ce({series:t},r.newOption))});var Nj=R,Bj=ot();function rwe(r,e){var t=FE(r);Nj(e,function(i,n){for(var a=t.length-1;a>=0;a--){var s=t[a];if(s[n])break}if(a<0){var o=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var l=o.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function iwe(r){var e=FE(r),t=e[e.length-1];e.length>1&&e.pop();var i={};return Nj(t,function(n,a){for(var s=e.length-1;s>=0;s--)if(n=e[s][a],n){i[a]=n;break}}),i}function nwe(r){Bj(r).snapshots=null}function awe(r){return FE(r).length}function FE(r){var e=Bj(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var swe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){nwe(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return i},e}(Fn);hs({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var owe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],UE=function(){function r(e,t,i){var n=this;this._targetInfoList=[];var a=rB(t,e);R(lwe,function(s,o){(!i||!i.include||Xe(i.include,o)>=0)&&s(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var s=tx[i.brushType](0,a,n);i.__rangeOffset={offset:sB[i.brushType](s.values,i.range,[1,1]),xyMinMax:s.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,i){R(e,function(n){var a=this.findTargetInfo(n,t);a&&a!==!0&&R(a.coordSyses,function(s){var o=tx[n.brushType](1,s,n.range,!0);i(n,o.values,s,t)})},this)},r.prototype.setInputRanges=function(e,t){R(e,function(i){var n=this.findTargetInfo(i,t);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=tx[i.brushType](0,n.coordSys,i.coordRange),s=i.__rangeOffset;i.range=s?sB[i.brushType](a.values,s.offset,uwe(a.xyMinMax,s.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return oe(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:Wq(n),isTargetByCursor:jq(n,e,i.coordSysModel),getLinearBrushOtherExtent:qq(n)}})},r.prototype.controlSeries=function(e,t,i){var n=this.findTargetInfo(e,i);return n===!0||n&&Xe(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,n=rB(t,e),a=0;a<i.length;a++){var s=i[a],o=e.panelId;if(o){if(s.panelId===o)return s}else for(var l=0;l<iB.length;l++)if(iB[l](n,s))return s}return!0},r}();function Q2(r){return r[0]>r[1]&&r.reverse(),r}function rB(r,e){return Lp(r,e,{includeMainTypes:owe})}var lwe={grid:function(r,e){var t=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=be(),s={},o={};!t&&!i&&!n||(R(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){a.set(l.id,l),s[l.id]=!0,o[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,d){(Xe(t,h.getAxis("x").model)>=0||Xe(i,h.getAxis("y").model)>=0)&&c.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:nB.grid,xAxisDeclared:s[l.id],yAxisDeclared:o[l.id]})}))},geo:function(r,e){R(r.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:nB.geo})})}},iB=[function(r,e){var t=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],nB={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Gu(r)),e}},tx={lineX:Ue(aB,0),lineY:Ue(aB,1),rect:function(r,e,t,i){var n=r?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),a=r?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),s=[Q2([n[0],a[0]]),Q2([n[1],a[1]])];return{values:s,xyMinMax:s}},polygon:function(r,e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=oe(t,function(s){var o=r?e.pointToData(s,i):e.dataToPoint(s,i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o});return{values:a,xyMinMax:n}}};function aB(r,e,t,i){var n=t.getAxis(["x","y"][r]),a=Q2(oe([0,1],function(o){return e?n.coordToData(n.toLocalCoord(i[o]),!0):n.toGlobalCoord(n.dataToCoord(i[o]))})),s=[];return s[r]=a,s[1-r]=[NaN,NaN],{values:a,xyMinMax:s}}var sB={lineX:Ue(oB,0),lineY:Ue(oB,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return oe(r,function(i,n){return[i[0]-t[0]*e[n][0],i[1]-t[1]*e[n][1]]})}};function oB(r,e,t,i){return[e[0]-i[r]*t[0],e[1]-i[r]*t[1]]}function uwe(r,e){var t=lB(r),i=lB(e),n=[t[0]/i[0],t[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function lB(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var J2=R,cwe=_ue("toolbox-dataZoom_"),hwe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){this._brushController||(this._brushController=new pE(n.getZr()),this._brushController.on("brush",ge(this._onBrush,this)).mount()),pwe(t,i,this,a,n),dwe(t,i)},e.prototype.onclick=function(t,i,n){fwe[n].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var s=new UE(VE(this.model),a,{include:["grid"]});s.matchOutputRanges(i,a,function(u,c,h){if(h.type==="cartesian2d"){var d=u.brushType;d==="rect"?(o("x",h,c[0]),o("y",h,c[1])):o({lineX:"x",lineY:"y"}[d],h,c)}}),rwe(a,n),this._dispatchZoomAction(n);function o(u,c,h){var d=c.getAxis(u),f=d.model,p=l(u,f,a),v=p.findRepresentativeAxisProxy(f).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(h=vc(0,h.slice(),d.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var d;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var p=f.getAxisModel(u,c.componentIndex);p&&(d=f)}),d}},e.prototype._dispatchZoomAction=function(t){var i=[];J2(t,function(n,a){i.push(Ee(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}(Fn),fwe={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(iwe(this.ecModel))}};function VE(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function dwe(r,e){r.setIconStatus("back",awe(e)>1?"emphasis":"normal")}function pwe(r,e,t,i,n){var a=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var s=new UE(VE(r),e,{include:["grid"]}),o=s.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}$he("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),n=[],a=VE(i),s=Lp(r,a);J2(s.xAxisModels,function(l){return o(l,"xAxis","xAxisIndex")}),J2(s.yAxisModels,function(l){return o(l,"yAxis","yAxisIndex")});function o(l,u,c){var h=l.componentIndex,d={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:cwe+u+h};d[c]=h,n.push(d)}return n});function vwe(r){r.registerComponentModel(Uxe),r.registerComponentView(zxe),lh("saveAsImage",Hxe),lh("magicType",Wxe),lh("dataView",ewe),lh("dataZoom",hwe),lh("restore",swe),Ze(Fxe)}var gwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(tt);function Fj(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function Uj(r){if(et.domSupported){for(var e=document.documentElement.style,t=0,i=r.length;t<i;t++)if(r[t]in e)return r[t]}}var Vj=Uj(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),mwe=Uj(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function zj(r,e){if(!r)return e;e=_H(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function ywe(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var _we=zj(mwe,"transition"),zE=zj(Vj,"transform"),bwe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(et.transform3dSupported?"will-change:transform;":"");function Twe(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function Swe(r,e,t){if(!pe(t)||t==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");e=ic(e);var a=Twe(t),s=Math.max(Math.round(n)*1.5,6),o="",l=zE+":",u;Xe(["left","right"],a)>-1?(o+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(o+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=s+n,d=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),f=Math.round(((d-Math.SQRT2*n)/2+Math.SQRT2*n-(d-h)/2)*100)/100;o+=";"+a+":-"+f+"px";var p=e+" solid "+n+"px;",v=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",o+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+i+";"];return'<div style="'+v.join("")+'"></div>'}function xwe(r,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+t,n="opacity"+i+",visibility"+i;return e||(i=" "+r+"s "+t,n+=et.transformSupported?","+zE+i:",left"+i+",top"+i),_we+":"+n}function uB(r,e,t){var i=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!et.transformSupported)return t?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=et.transform3dSupported,s="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return t?"top:0;left:0;"+zE+":"+s+";":[["top",0],["left",0],[Vj,s]]}function wwe(r){var e=[],t=r.get("fontSize"),i=r.getTextColor();i&&e.push("color:"+i),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var n=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,o=r.get("textShadowOffsetY")||0;return n&&a&&e.push("text-shadow:"+s+"px "+o+"px "+a+"px "+n),R(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function Cwe(r,e,t){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),s=r.get("shadowBlur"),o=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),h=JH(r,"html"),d=l+"px "+u+"px "+s+"px "+o;return i.push("box-shadow:"+d),e&&n&&i.push(xwe(n,t)),a&&i.push("background-color:"+a),R(["width","color","radius"],function(f){var p="border-"+f,v=_H(p),g=r.get(v);g!=null&&i.push(p+":"+g+(f==="color"?"":"px"))}),i.push(wwe(c)),h!=null&&i.push("padding:"+Nf(h).join("px ")+"px"),i.join(";")+";"}function cB(r,e,t,i,n){var a=e&&e.painter;if(t){var s=a&&a.getViewportRoot();s&&Zoe(r,s,t,i,n)}else{r[0]=i,r[1]=n;var o=a&&a.getViewportRootOffset();o&&(r[0]+=o.offsetLeft,r[1]+=o.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Awe=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,et.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=e.getZr(),a=t.appendTo,s=a&&(pe(a)?document.querySelector(a):sf(a)?a:we(a)&&a(e.getDom()));cB(this._styleCoord,n,s,e.getWidth()/2,e.getHeight()/2),(s||e.getDom()).appendChild(i),this._api=e,this._container=s;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!o._enterable){var u=n.handler,c=n.painter.getViewportRoot();kn(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=ywe(t,"position"),n=t.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=bwe+Cwe(e,!this._firstShow,this._longHide)+uB(a[0],a[1],!0)+("border-color:"+ic(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,i,n,a){var s=this.el;if(e==null){s.innerHTML="";return}var o="";if(pe(a)&&i.get("trigger")==="item"&&!Fj(i)&&(o=Swe(i,n,a)),pe(e))s.innerHTML=e+o;else if(e){s.innerHTML="",ie(e)||(e=[e]);for(var l=0;l<e.length;l++)sf(e[l])&&e[l].parentNode!==s&&s.appendChild(e[l]);if(o&&s.childNodes.length){var u=document.createElement("div");u.innerHTML=o,s.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},r.prototype.moveTo=function(e,t){var i=this._styleCoord;if(cB(i,this._zr,this._container,e,t),i[0]!=null&&i[1]!=null){var n=this.el.style,a=uB(i[0],i[1]);R(a,function(s){n[s[0]]=s[1]})}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",et.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ge(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},r}(),Dwe=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),fB(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,i,n,a){var s=this;De(e)&&vt(""),this.el&&this._zr.remove(this.el);var o=i.getModel("textStyle");this.el=new lt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:o.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:JH(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){s.el.style[u]=i.get(u)}),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){s.el.style[u]=o.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),i=hB(e.style);return[t.width+i.left+i.right,t.height+i.top+i.bottom]},r.prototype.moveTo=function(e,t){var i=this.el;if(i){var n=this._styleCoord;fB(n,this._zr,e,t),e=n[0],t=n[1];var a=i.style,s=wo(a.borderWidth||0),o=hB(a);i.x=e+s+o.left,i.y=t+s+o.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ge(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function wo(r){return Math.max(0,r)}function hB(r){var e=wo(r.shadowBlur||0),t=wo(r.shadowOffsetX||0),i=wo(r.shadowOffsetY||0);return{left:wo(e-t),right:wo(e+t),top:wo(e-i),bottom:wo(e+i)}}function fB(r,e,t,i){r[0]=t,r[1]=i,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Ewe=new st({shape:{x:-1,y:-1,width:2,height:2}}),Iwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){if(!(et.node||!i.getDom())){var n=t.getComponent("tooltip"),a=this._renderMode=Aue(n.get("renderMode"));this._tooltipContent=a==="richText"?new Dwe(i):new Awe(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(t,i,n){if(!(et.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Vf(this,"_updatePosition",50,"fixRate"):_v(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,i=t.get("triggerOn");Cj("itemTooltip",this._api,ge(function(n,a,s){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,s):n==="leave"&&this._hide(s))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,n=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var s=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&s.manuallyShowTip(t,i,n,{x:s._lastX,y:s._lastY,dataByCoordSys:s._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,n,a){if(!(a.from===this.uid||et.node||!n.getDom())){var s=dB(a,n);this._ticket="";var o=a.dataByCoordSys,l=kwe(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},s)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=Ewe;c.x=a.x,c.y=a.y,c.update(),ke(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},s)}else if(o)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:o,tooltipOption:a.tooltipOption},s);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,n,a))return;var h=Aj(a,i),d=h.point[0],f=h.point[1];d!=null&&f!=null&&this._tryShow({offsetX:d,offsetY:f,target:h.el,position:a.position,positionDefault:"bottom"},s)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},s))}},e.prototype.manuallyHideTip=function(t,i,n,a){var s=this._tooltipContent;this._tooltipModel&&s.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(dB(a,n))},e.prototype._manuallyAxisShowTip=function(t,i,n,a){var s=a.seriesIndex,o=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(s==null||o==null||l==null)){var u=i.getSeriesByIndex(s);if(u){var c=u.getData(),h=Bd([c.getItemModel(o),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:s,dataIndex:o,position:a.position}),!0}}},e.prototype._tryShow=function(t,i){var n=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var s=t.dataByCoordSys;if(s&&s.length)this._showAxisTooltip(s,t);else if(n){var o=ke(n);if(o.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;bu(n,function(c){if(ke(c).dataIndex!=null)return l=c,!0;if(ke(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var n=t.get("showDelay");i=ge(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},e.prototype._showAxisTooltip=function(t,i){var n=this._ecModel,a=this._tooltipModel,s=[i.offsetX,i.offsetY],o=Bd([i.tooltipOption],a),l=this._renderMode,u=[],c=Br("section",{blocks:[],noHeader:!0}),h=[],d=new VT;R(t,function(y){R(y.dataByAxis,function(_){var b=n.getComponent(_.axisDim+"Axis",_.axisIndex),S=_.value;if(!(!b||S==null)){var x=Sj(S,b.axis,n,_.seriesDataIndices,_.valueLabelOpt),C=Br("section",{header:x,noHeader:!ha(x),sortBlocks:!0,blocks:[]});c.blocks.push(C),R(_.seriesDataIndices,function(D){var I=n.getSeriesByIndex(D.seriesIndex),M=D.dataIndexInside,L=I.getDataParams(M);if(!(L.dataIndex<0)){L.axisDim=_.axisDim,L.axisIndex=_.axisIndex,L.axisType=_.axisType,L.axisId=_.axisId,L.axisValue=GD(b.axis,{value:S}),L.axisValueLabel=x,L.marker=d.makeTooltipMarker("item",ic(L.color),l);var N=Jk(I.formatTooltip(M,!0,null)),O=N.frag;if(O){var B=Bd([I],a).get("valueFormatter");C.blocks.push(B?J({valueFormatter:B},O):O)}N.text&&h.push(N.text),u.push(L)}})}})}),c.blocks.reverse(),h.reverse();var f=i.position,p=o.get("order"),v=aR(c,d,l,p,n.get("useUTC"),o.get("textStyle"));v&&h.unshift(v);var g=l==="richText"?`
`:"<br/>",m=h.join(g);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(o,f,s[0],s[1],this._tooltipContent,u):this._showTooltipContent(o,m,u,Math.random()+"",s[0],s[1],f,null,d)})},e.prototype._showSeriesItemTooltip=function(t,i,n){var a=this._ecModel,s=ke(i),o=s.seriesIndex,l=a.getSeriesByIndex(o),u=s.dataModel||l,c=s.dataIndex,h=s.dataType,d=u.getData(h),f=this._renderMode,p=t.positionDefault,v=Bd([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,h),y=new VT;m.marker=y.makeTooltipMarker("item",ic(m.color),f);var _=Jk(u.formatTooltip(c,!1,h)),b=v.get("order"),S=v.get("valueFormatter"),x=_.frag,C=x?aR(S?J({valueFormatter:S},x):x,y,f,b,a.get("useUTC"),v.get("textStyle")):_.text,D="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,C,m,D,t.offsetX,t.offsetY,t.position,t.target,y)}),n({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,n){var a=this._renderMode==="html",s=ke(i),o=s.tooltipConfig,l=o.option||{},u=l.encodeHTMLContent;if(pe(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Ee(l),l.content=Bi(l.content));var h=[l],d=this._ecModel.getComponent(s.componentMainType,s.componentIndex);d&&h.push(d),h.push({formatter:l.content});var f=t.positionDefault,p=Bd(h,this._tooltipModel,f?{position:f}:null),v=p.get("content"),g=Math.random()+"",m=new VT;this._showOrMove(p,function(){var y=Ee(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,g,t.offsetX,t.offsetY,t.position,i,m)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,n,a,s,o,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");l=l||t.get("position");var f=i,p=this._getNearestPoint([s,o],n,t.get("trigger"),t.get("borderColor")),v=p.color;if(d)if(pe(d)){var g=t.ecModel.get("useUTC"),m=ie(n)?n[0]:n,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;f=d,y&&(f=p1(m.axisValue,f,g)),f=bH(f,n,!0)}else if(we(d)){var _=ge(function(b,S){b===this._ticket&&(h.setContent(S,c,t,v,l),this._updatePosition(t,l,s,o,h,n,u))},this);this._ticket=a,f=d(n,a,_)}else f=d;h.setContent(f,c,t,v,l),h.show(t,v),this._updatePosition(t,l,s,o,h,n,u)}},e.prototype._getNearestPoint=function(t,i,n,a){if(n==="axis"||ie(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ie(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,n,a,s,o,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||t.get("position");var h=s.getSize(),d=t.get("align"),f=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),we(i)&&(i=i([n,a],o,s.el,p,{viewSize:[u,c],contentSize:h.slice()})),ie(i))n=ce(i[0],u),a=ce(i[1],c);else if(De(i)){var v=i;v.width=h[0],v.height=h[1];var g=Ar(v,{width:u,height:c});n=g.x,a=g.y,d=null,f=null}else if(pe(i)&&l){var m=Lwe(i,p,h,t.get("borderWidth"));n=m[0],a=m[1]}else{var m=Pwe(n,a,s,u,c,d?null:20,f?null:20);n=m[0],a=m[1]}if(d&&(n-=pB(d)?h[0]/2:d==="right"?h[0]:0),f&&(a-=pB(f)?h[1]/2:f==="bottom"?h[1]:0),Fj(t)){var m=Mwe(n,a,s,u,c);n=m[0],a=m[1]}s.moveTo(n,a)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,s=!!n&&n.length===t.length;return s&&R(n,function(o,l){var u=o.dataByAxis||[],c=t[l]||{},h=c.dataByAxis||[];s=s&&u.length===h.length,s&&R(u,function(d,f){var p=h[f]||{},v=d.seriesDataIndices||[],g=p.seriesDataIndices||[];s=s&&d.value===p.value&&d.axisType===p.axisType&&d.axisId===p.axisId&&v.length===g.length,s&&R(v,function(m,y){var _=g[y];s=s&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&R(d.seriesDataIndices,function(m){var y=m.seriesIndex,_=i[y],b=a[y];_&&b&&b.data!==_.data&&(s=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!s},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){et.node||!i.getDom()||(_v(this,"_updatePosition"),this._tooltipContent.dispose(),X2("itemTooltip",i))},e.type="tooltip",e}($t);function Bd(r,e,t){var i=e.ecModel,n;t?(n=new yt(t,i,i),n=new yt(e.option,n,i)):n=e;for(var a=r.length-1;a>=0;a--){var s=r[a];s&&(s instanceof yt&&(s=s.get("tooltip",!0)),pe(s)&&(s={formatter:s}),s&&(n=new yt(s,n,i)))}return n}function dB(r,e){return r.dispatchAction||ge(e.dispatchAction,e)}function Pwe(r,e,t,i,n,a,s){var o=t.getSize(),l=o[0],u=o[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),s!=null&&(e+u+s>n?e-=u+s:e+=s),[r,e]}function Mwe(r,e,t,i,n){var a=t.getSize(),s=a[0],o=a[1];return r=Math.min(r+s,i)-s,e=Math.min(e+o,n)-o,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Lwe(r,e,t,i){var n=t[0],a=t[1],s=Math.ceil(Math.SQRT2*i)+8,o=0,l=0,u=e.width,c=e.height;switch(r){case"inside":o=e.x+u/2-n/2,l=e.y+c/2-a/2;break;case"top":o=e.x+u/2-n/2,l=e.y-a-s;break;case"bottom":o=e.x+u/2-n/2,l=e.y+c+s;break;case"left":o=e.x-n-s,l=e.y+c/2-a/2;break;case"right":o=e.x+u+s,l=e.y+c/2-a/2}return[o,l]}function pB(r){return r==="center"||r==="middle"}function kwe(r,e,t){var i=rD(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=Zv(e,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),s=a.models[0];if(s){var o=t.getViewOfComponentModel(s),l;if(o.group.traverse(function(u){var c=ke(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:s.componentIndex,el:l}}}}function Rwe(r){Ze(gg),r.registerComponentModel(gwe),r.registerComponentView(Iwe),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},lr),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},lr)}var Owe=["rect","polygon","keep","clear"];function Nwe(r,e){var t=xt(r?r.brush:[]);if(t.length){var i=[];R(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var n=r&&r.toolbox;ie(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var a=n.feature||(n.feature={}),s=a.brush||(a.brush={}),o=s.type||(s.type=[]);o.push.apply(o,i),Bwe(o),e&&!o.length&&o.push.apply(o,Owe)}}function Bwe(r){var e={};R(r,function(t){e[t]=1}),r.length=0,R(e,function(t,i){r.push(i)})}var vB=R;function gB(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function eC(r,e,t){var i={};return vB(e,function(a){var s=i[a]=n();vB(r[a],function(o,l){if(Or.isValidType(l)){var u={type:l,visual:o};t&&t(u,a),s[l]=new Or(u),l==="opacity"&&(u=Ee(u),u.type="colorAlpha",s.__hidden.__alphaForOpacity=new Or(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var s=new a;return s}}function Gj(r,e,t){var i;R(t,function(n){e.hasOwnProperty(n)&&gB(e[n])&&(i=!0)}),i&&R(t,function(n){e.hasOwnProperty(n)&&gB(e[n])?r[n]=Ee(e[n]):delete r[n]})}function Fwe(r,e,t,i,n,a){var s={};R(r,function(h){var d=Or.prepareVisualTypes(e[h]);s[h]=d});var o;function l(h){return MD(t,o,h)}function u(h,d){u$(t,o,h,d)}t.each(c);function c(h,d){o=h;var f=t.getRawDataItem(o);if(!(f&&f.visualMap===!1))for(var p=i.call(n,h),v=e[p],g=s[p],m=0,y=g.length;m<y;m++){var _=g[m];v[_]&&v[_].applyVisual(h,l,u)}}}function Uwe(r,e,t,i){var n={};return R(r,function(a){var s=Or.prepareVisualTypes(e[a]);n[a]=s}),{progress:function(s,o){var l;i!=null&&(l=o.getDimensionIndex(i));function u(S){return MD(o,h,S)}function c(S,x){u$(o,h,S,x)}for(var h,d=o.getStore();(h=s.next())!=null;){var f=o.getRawDataItem(h);if(!(f&&f.visualMap===!1))for(var p=i!=null?d.get(l,h):h,v=t(p),g=e[v],m=n[v],y=0,_=m.length;y<_;y++){var b=m[y];g[b]&&g[b].applyVisual(p,u,c)}}}}}function Vwe(r){var e=r.brushType,t={point:function(i){return mB[e].point(i,t,r)},rect:function(i){return mB[e].rect(i,t,r)}};return t}var mB={lineX:yB(0),lineY:yB(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&lu(t.range,r[0],r[1])},rect:function(r,e,t){var i=t.range;if(!r||i.length<=1)return!1;var n=r.x,a=r.y,s=r.width,o=r.height,l=i[0];if(lu(i,n,a)||lu(i,n+s,a)||lu(i,n,a+o)||lu(i,n+s,a+o)||qe.create(r).contain(l[0],l[1])||ap(n,a,n+s,a,i)||ap(n,a,n,a+o,i)||ap(n+s,a,n+s,a+o,i)||ap(n,a+o,n+s,a+o,i))return!0}}};function yB(r){var e=["x","y"],t=["width","height"];return{point:function(i,n,a){if(i){var s=a.range,o=i[r];return Fd(o,s)}},rect:function(i,n,a){if(i){var s=a.range,o=[i[e[r]],i[e[r]]+i[t[r]]];return o[1]<o[0]&&o.reverse(),Fd(o[0],s)||Fd(o[1],s)||Fd(s[0],o)||Fd(s[1],o)}}}}function Fd(r,e){return e[0]<=r&&r<=e[1]}var _B=["inBrush","outOfBrush"],rx="__ecBrushSelect",tC="__ecInBrushSelectEvent";function Hj(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new UE(e.option,r);t.setInputRanges(e.areas,r)})}function zwe(r,e,t){var i=[],n,a;r.eachComponent({mainType:"brush"},function(s){t&&t.type==="takeGlobalCursor"&&s.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Hj(r),r.eachComponent({mainType:"brush"},function(s,o){var l={brushId:s.id,brushIndex:o,brushName:s.name,areas:Ee(s.areas),selected:[]};i.push(l);var u=s.option,c=u.brushLink,h=[],d=[],f=[],p=!1;o||(n=u.throttleType,a=u.throttleDelay);var v=oe(s.areas,function(S){var x=Wwe[S.brushType],C=Ce({boundingRect:x?x(S):void 0},S);return C.selectors=Vwe(C),C}),g=eC(s.option,_B,function(S){S.mappingMethod="fixed"});ie(c)&&R(c,function(S){h[S]=1});function m(S){return c==="all"||!!h[S]}function y(S){return!!S.length}r.eachSeries(function(S,x){var C=f[x]=[];S.subType==="parallel"?_(S,x):b(S,x,C)});function _(S,x){var C=S.coordinateSystem;p=p||C.hasAxisBrushed(),m(x)&&C.eachActiveState(S.getData(),function(D,I){D==="active"&&(d[I]=1)})}function b(S,x,C){if(!(!S.brushSelector||$we(s,x))&&(R(v,function(I){s.brushTargetManager.controlSeries(I,S,r)&&C.push(I),p=p||y(C)}),m(x)&&y(C))){var D=S.getData();D.each(function(I){bB(S,C,D,I)&&(d[I]=1)})}}r.eachSeries(function(S,x){var C={seriesId:S.id,seriesIndex:x,seriesName:S.name,dataIndex:[]};l.selected.push(C);var D=f[x],I=S.getData(),M=m(x)?function(L){return d[L]?(C.dataIndex.push(I.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return bB(S,D,I,L)?(C.dataIndex.push(I.getRawIndex(L)),"inBrush"):"outOfBrush"};(m(x)?p:y(D))&&Fwe(_B,g,I,M)})}),Gwe(e,n,a,i,t)}function Gwe(r,e,t,i,n){if(n){var a=r.getZr();if(!a[tC]){a[rx]||(a[rx]=Hwe);var s=Vf(a,rx,t,e);s(r,i)}}}function Hwe(r,e){if(!r.isDisposed()){var t=r.getZr();t[tC]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[tC]=!1}}function bB(r,e,t,i){for(var n=0,a=e.length;n<a;n++){var s=e[n];if(r.brushSelector(i,t,s.selectors,s))return!0}}function $we(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(ie(t)?Xe(t,e)<0:e!==t)}var Wwe={rect:function(r){return TB(r.range)},polygon:function(r){for(var e,t=r.range,i=0,n=t.length;i<n;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=t[i];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&TB(e)}};function TB(r){return new qe(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var qwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new pE(i.getZr())).on("brush",ge(this._onBrush,this)).mount()},e.prototype.render=function(t,i,n,a){this.model=t,this._updateController(t,i,n,a)},e.prototype.updateTransform=function(t,i,n,a){Hj(i),this._updateController(t,i,n,a)},e.prototype.updateVisual=function(t,i,n,a){this.updateTransform(t,i,n,a)},e.prototype.updateView=function(t,i,n,a){this._updateController(t,i,n,a)},e.prototype._updateController=function(t,i,n,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var i=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:Ee(n),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:Ee(n),$from:i})},e.type="brush",e}($t),jwe="#ddd",Xwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&Gj(n,t,["inBrush","outOfBrush"]);var a=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:jwe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=oe(t,function(i){return SB(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=SB(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(tt);function SB(r,e){return We({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new yt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Ywe=["rect","polygon","lineX","lineY","keep","clear"],Kwe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n){var a,s,o;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,s=l.brushOption.brushMode||"single",o=o||!!l.areas.length}),this._brushType=a,this._brushMode=s,R(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?s==="multiple":l==="clear"?o:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,i,n){this.render(t,i,n)},e.prototype.getIcons=function(){var t=this.model,i=t.get("icon",!0),n={};return R(t.get("type",!0),function(a){i[a]&&(n[a]=i[a])}),n},e.prototype.onclick=function(t,i,n){var a=this._brushType,s=this._brushMode;n==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?a:a===n?!1:n,brushMode:n==="keep"?s==="multiple"?"single":"multiple":s}})},e.getDefaultOption=function(t){var i={show:!0,type:Ywe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return i},e}(Fn);function Zwe(r){r.registerComponentView(qwe),r.registerComponentModel(Xwe),r.registerPreprocessor(Nwe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,zwe),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},lr),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},lr),lh("brush",Kwe)}var Qwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(tt),Jwe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){if(this.group.removeAll(),!!t.get("show")){var a=this.group,s=t.getModel("textStyle"),o=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Be(t.get("textBaseline"),t.get("textVerticalAlign")),c=new lt({style:kt(s,{text:t.get("text"),fill:s.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),d=t.get("subtext"),f=new lt({style:kt(o,{text:d,fill:o.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),v=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!p&&!g,f.silent=!v&&!g,p&&c.on("click",function(){B0(p,"_"+t.get("target"))}),v&&f.on("click",function(){B0(v,"_"+t.get("subtarget"))}),ke(c).eventData=ke(f).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),d&&a.add(f);var m=a.getBoundingRect(),y=t.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Ar(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),f.setStyle(b),m=a.getBoundingRect();var S=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var C=new st({shape:{x:m.x-S[3],y:m.y-S[0],width:m.width+S[1]+S[3],height:m.height+S[0]+S[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(C)}},e.type="title",e}($t);function e2e(r){r.registerComponentModel(Qwe),r.registerComponentView(Jwe)}var xB=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,i=t.data||[],n=t.axisType,a=this._names=[],s;n==="category"?(s=[],R(i,function(u,c){var h=wr(Pf(u),""),d;De(u)?(d=Ee(u),d.value=c):d=c,s.push(d),a.push(h)})):s=i;var o={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new wi([{name:"value",type:o}],this);l.initData(s,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(tt),$j=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=hl(xB.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(xB);_r($j,T1.prototype);var t2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}($t),r2e=function(r){j(e,r);function e(t,i,n,a){var s=r.call(this,t,i,n)||this;return s.type=a||"value",s}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(xa),ix=Math.PI,wB=ot(),i2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,n){if(this.model=t,this.api=n,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,n),s=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Br("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,s,l,t)},this),this._renderAxisLabel(a,o,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,i){var n=t.get(["label","position"]),a=t.get("orient"),s=a2e(t,i),o;n==null||n==="auto"?o=a==="horizontal"?s.y+s.height/2<i.getHeight()/2?"-":"+":s.x+s.width/2<i.getWidth()/2?"+":"-":pe(n)?o={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][n]:o=n;var l={horizontal:"center",vertical:o>=0||o==="+"?"left":"right"},u={horizontal:o>=0||o==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:ix/2},h=a==="vertical"?s.height:s.width,d=t.getModel("controlStyle"),f=d.get("show",!0),p=f?d.get("itemSize"):0,v=f?d.get("itemGap"):0,g=p+v,m=t.get(["label","rotate"])||0;m=m*ix/180;var y,_,b,S=d.get("position",!0),x=f&&d.get("showPlayBtn",!0),C=f&&d.get("showPrevBtn",!0),D=f&&d.get("showNextBtn",!0),I=0,M=h;S==="left"||S==="bottom"?(x&&(y=[0,0],I+=g),C&&(_=[I,0],I+=g),D&&(b=[M-p,0],M-=g)):(x&&(y=[M-p,0],M-=g),C&&(_=[0,0],I+=g),D&&(b=[M-p,0],M-=g));var L=[I,M];return t.get("inverse")&&L.reverse(),{viewRect:s,mainLength:h,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:o,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:_,nextBtnPosition:b,axisExtent:L,controlSize:p,controlGap:v}},e.prototype._position=function(t,i){var n=this._mainGroup,a=this._labelGroup,s=t.viewRect;if(t.orient==="vertical"){var o=vn(),l=s.x,u=s.y+s.height;ss(o,o,[-l,-u]),uc(o,o,-ix/2),ss(o,o,[l,u]),s=s.clone(),s.applyTransform(o)}var c=y(s),h=y(n.getBoundingRect()),d=y(a.getBoundingRect()),f=[n.x,n.y],p=[a.x,a.y];p[0]=f[0]=c[0][0];var v=t.labelPosOpt;if(v==null||pe(v)){var g=v==="+"?0:1;_(f,h,c,1,g),_(p,d,c,1,1-g)}else{var g=v>=0?0:1;_(f,h,c,1,g),p[1]=f[1]+v}n.setPosition(f),a.setPosition(p),n.rotation=a.rotation=t.rotation,m(n),m(a);function m(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function y(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function _(b,S,x,C,D){b[C]+=x[C][D]-S[C][D]}},e.prototype._createAxis=function(t,i){var n=i.getData(),a=i.get("axisType"),s=n2e(i,a);s.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var o=n.getDataExtent("value");s.setExtent(o[0],o[1]),s.calcNiceTicks();var l=new r2e("value",s,t.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new Le;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,n,a){var s=n.getExtent();if(a.get(["lineStyle","show"])){var o=new kr({shape:{x1:s[0],y1:0,x2:s[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(o);var l=this._progressLine=new kr({shape:{x1:s[0],x2:this._currentPointer?this._currentPointer.x:s[0],y1:0,y2:0},style:Ce({lineCap:"round",lineWidth:o.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,n,a){var s=this,o=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=n.dataToCoord(u.value),h=o.getItemModel(u.value),d=h.getModel("itemStyle"),f=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:ge(s._changeTimeline,s,u.value)},g=CB(h,d,i,v);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),zu(g);var m=ke(g);h.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,s._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,i,n,a){var s=this,o=n.getLabelModel();if(o.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],R(u,function(c){var h=c.tickValue,d=l.getItemModel(h),f=d.getModel("label"),p=d.getModel(["emphasis","label"]),v=d.getModel(["progress","label"]),g=n.dataToCoord(c.tickValue),m=new lt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:ge(s._changeTimeline,s,h),silent:!1,style:kt(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=kt(p),m.ensureState("progress").style=kt(v),i.add(m),zu(m),wB(m).dataIndex=h,s._tickLabels.push(m)})}},e.prototype._renderControl=function(t,i,n,a){var s=t.controlSize,o=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);d(t.nextBtnPosition,"next",ge(this._changeTimeline,this,h?"-":"+")),d(t.prevBtnPosition,"prev",ge(this._changeTimeline,this,h?"+":"-")),d(t.playPosition,c?"stop":"play",ge(this._handlePlayClick,this,!c),!0);function d(f,p,v,g){if(f){var m=ya(Be(a.get(["controlStyle",p+"BtnSize"]),s),s),y=[0,-m/2,m,m],_=s2e(a,p+"Icon",y,{x:f[0],y:f[1],originX:s/2,originY:0,rotation:g?-o:0,rectHover:!0,style:l,onclick:v});_.ensureState("emphasis").style=u,i.add(_),zu(_)}}},e.prototype._renderCurrentPointer=function(t,i,n,a){var s=a.getData(),o=a.getCurrentIndex(),l=s.getItemModel(o).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=ge(u._handlePointerDrag,u),h.ondragend=ge(u._handlePointerDragend,u),AB(h,u._progressLine,o,n,a,!0)},onUpdate:function(h){AB(h,u._progressLine,o,n,a)}};this._currentPointer=CB(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var n=this._toAxisCoord(t)[0],a=this._axis,s=Hn(a.getExtent().slice());n>s[1]&&(n=s[1]),n<s[0]&&(n=s[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=n,o.dirty());var l=this._findNearestTick(n),u=this.model;(i||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var i=t.model;t._changeTimeline(i.getCurrentIndex()+(i.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var i=this._mainGroup.getLocalTransform();return ma(t,i,!0)},e.prototype._findNearestTick=function(t){var i=this.model.getData(),n=1/0,a,s=this._axis;return i.each(["value"],function(o,l){var u=s.dataToCoord(o),c=Math.abs(u-t);c<n&&(n=c,a=l)}),a},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var i=this.model.getCurrentIndex();t==="+"?t=i+1:t==="-"&&(t=i-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),i=this._tickSymbols,n=this._tickLabels;if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",a<t);if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",wB(n[a]).dataIndex<=t)},e.type="timeline.slider",e}(t2e);function n2e(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new D1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new VD({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Ys}}function a2e(r,e){return Ar(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function s2e(r,e,t,i){var n=i.style,a=ig(r.get(["controlStyle",e]),i||{},new qe(t[0],t[1],t[2],t[3]));return n&&a.setStyle(n),a}function CB(r,e,t,i,n,a){var s=e.get("color");if(n)n.setColor(s),t.add(n),a&&a.onUpdate(n);else{var o=r.get("symbol");n=yr(o,-1,-1,2,2,s),n.setStyle("strokeNoScale",!0),t.add(n),a&&a.onCreate(n)}var l=e.getItemStyle(["color"]);n.setStyle(l),i=We({rectHover:!0,z2:100},i,!0);var u=zf(r.get("symbolSize"));i.scaleX=u[0]/2,i.scaleY=u[1]/2;var c=hc(r.get("symbolOffset"),u);c&&(i.x=(i.x||0)+c[0],i.y=(i.y||0)+c[1]);var h=r.get("symbolRotate");return i.rotation=(h||0)*Math.PI/180||0,n.attr(i),n.updateTransform(),n}function AB(r,e,t,i,n,a){if(!r.dragging){var s=n.getModel("checkpointStyle"),o=i.dataToCoord(n.getData().get("value",t));if(a||!s.get("animation",!0))r.attr({x:o,y:0}),e&&e.attr({shape:{x2:o}});else{var l={duration:s.get("animationDuration",!0),easing:s.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:o,y:0},l),e&&e.animateTo({shape:{x2:o}},l)}}}function o2e(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,i){var n=t.getComponent("timeline");return n&&e.currentIndex!=null&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),Ce({currentIndex:n.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var i=t.getComponent("timeline");i&&e.playState!=null&&i.setPlayState(e.playState)})}function l2e(r){var e=r&&r.timeline;ie(e)||(e=e?[e]:[]),R(e,function(t){t&&u2e(t)})}function u2e(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),DB(r),hu(r,"controlPosition")){var i=r.controlStyle||(r.controlStyle={});hu(i,"position")||(i.position=r.controlPosition),i.position==="none"&&!hu(i,"show")&&(i.show=!1,delete i.position),delete r.controlPosition}R(r.data||[],function(n){De(n)&&!ie(n)&&(!hu(n,"value")&&hu(n,"name")&&(n.value=n.name),DB(n))})}function DB(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),i=r.label||r.label||{},n=i.normal||(i.normal={}),a={normal:1,emphasis:1};R(i,function(s,o){!a[o]&&!hu(n,o)&&(n[o]=s)}),t.label&&!hu(i,"emphasis")&&(i.emphasis=t.label,delete t.label)}function hu(r,e){return r.hasOwnProperty(e)}function c2e(r){r.registerComponentModel($j),r.registerComponentView(i2e),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),o2e(r),r.registerPreprocessor(l2e)}function GE(r,e){if(!r)return!1;for(var t=ie(r)?r:[r],i=0;i<t.length;i++)if(t[i]&&t[i][e])return!0;return!1}function Km(r){Ju(r,"label",["show"])}var Zm=ot(),Zs=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(et.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,i){this._mergeOption(t,i,!1,!1)},e.prototype._mergeOption=function(t,i,n,a){var s=this.mainType;n||i.eachSeries(function(o){var l=o.get(this.mainType,!0),u=Zm(o)[s];if(!l||!l.data){Zm(o)[s]=null;return}u?u._mergeOption(l,i,!0):(a&&Km(l),R(l.data,function(c){c instanceof Array?(Km(c[0]),Km(c[1])):Km(c)}),u=this.createMarkerModelFromSeries(l,this,i),J(u,{mainType:this.mainType,seriesIndex:o.seriesIndex,name:o.name,createdBySelf:!0}),u.__hostSeries=o),Zm(o)[s]=u},this)},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),s=this.getRawValue(t),o=a.getName(t);return Br("section",{header:this.name,blocks:[Br("nameValue",{name:o,value:s,noName:!o,noValue:s==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,i){var n=T1.prototype.getDataParams.call(this,t,i),a=this.__hostSeries;return a&&(n.seriesId=a.id,n.seriesName=a.name,n.seriesType=a.subType),n},e.getMarkerModelFromSeries=function(t,i){return Zm(t)[i]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(tt);_r(Zs,T1.prototype);var h2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Zs);function rC(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function f2e(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Qm(r,e,t,i,n,a){var s=[],o=nl(e,i),l=o?e.getCalculationInfo("stackResultDimension"):i,u=HE(e,l,r),c=e.indicesOfNearest(l,u)[0];s[n]=e.get(t,c),s[a]=e.get(l,c);var h=e.get(i,c),d=Wa(e.get(i,c));return d=Math.min(d,20),d>=0&&(s[a]=+s[a].toFixed(d)),[s,h]}var nx={min:Ue(Qm,"min"),max:Ue(Qm,"max"),average:Ue(Qm,"average"),median:Ue(Qm,"median")};function kv(r,e){if(e){var t=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!f2e(e)&&!ie(e.coord)&&ie(n)){var a=Wj(e,t,i,r);if(e=Ee(e),e.type&&nx[e.type]&&a.baseAxis&&a.valueAxis){var s=Xe(n,a.baseAxis.dim),o=Xe(n,a.valueAxis.dim),l=nx[e.type](t,a.baseDataDim,a.valueDataDim,s,o);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ie(n))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)nx[u[c]]&&(u[c]=HE(t,t.mapDimension(n[c]),u[c]));return e}}function Wj(r,e,t,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(d2e(i,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function d2e(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Rv(r,e){return r&&r.containData&&e.coord&&!rC(e)?r.containData(e.coord):!0}function p2e(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!rC(e)&&!rC(t)?r.containZone(e.coord,t.coord):!0}function qj(r,e){return r?function(t,i,n,a){var s=a<2?t.coord&&t.coord[a]:t.value;return jo(s,e[a])}:function(t,i,n,a){return jo(t.value,e[a])}}function HE(r,e,t){if(t==="average"){var i=0,n=0;return r.each(e,function(a,s){isNaN(a)||(i+=a,n++)}),i/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var ax=ot(),$E=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=be()},e.prototype.render=function(t,i,n){var a=this,s=this.markerGroupMap;s.each(function(o){ax(o).keep=!1}),i.eachSeries(function(o){var l=Zs.getMarkerModelFromSeries(o,a.type);l&&a.renderSeries(o,l,i,n)}),s.each(function(o){!ax(o).keep&&a.group.remove(o.group)})},e.prototype.markKeep=function(t){ax(t).keep=!0},e.prototype.toggleBlurSeries=function(t,i){var n=this;R(t,function(a){var s=Zs.getMarkerModelFromSeries(a,n.type);if(s){var o=s.getData();o.eachItemGraphicEl(function(l){l&&(i?B9(l):uD(l))})}})},e.type="marker",e}($t);function EB(r,e,t){var i=e.coordinateSystem;r.each(function(n){var a=r.getItemModel(n),s,o=ce(a.get("x"),t.getWidth()),l=ce(a.get("y"),t.getHeight());if(!isNaN(o)&&!isNaN(l))s=[o,l];else if(e.getMarkerPosition)s=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(i){var u=r.get(i.dimensions[0],n),c=r.get(i.dimensions[1],n);s=i.dataToPoint([u,c])}isNaN(o)||(s[0]=o),isNaN(l)||(s[1]=l),r.setItemLayout(n,s)})}var v2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var s=Zs.getMarkerModelFromSeries(a,"markPoint");s&&(EB(s.getData(),a,n),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,i,n,a){var s=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,new ug),h=g2e(s,t,i);i.setData(h),EB(i.getData(),t,a),h.each(function(d){var f=h.getItemModel(d),p=f.getShallow("symbol"),v=f.getShallow("symbolSize"),g=f.getShallow("symbolRotate"),m=f.getShallow("symbolOffset"),y=f.getShallow("symbolKeepAspect");if(we(p)||we(v)||we(g)||we(m)){var _=i.getRawValue(d),b=i.getDataParams(d);we(p)&&(p=p(_,b)),we(v)&&(v=v(_,b)),we(g)&&(g=g(_,b)),we(m)&&(m=m(_,b))}var S=f.getModel("itemStyle").getItemStyle(),x=ag(l,"color");S.fill||(S.fill=x),h.setItemVisual(d,{symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:S})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(d){d.traverse(function(f){ke(f).dataModel=i})}),this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markPoint",e}($E);function g2e(r,e,t){var i;r?i=oe(r&&r.dimensions,function(o){var l=e.getData().getDimensionInfo(e.getData().mapDimension(o))||{};return J(J({},l),{name:o,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new wi(i,t),a=oe(t.get("data"),Ue(kv,e));r&&(a=St(a,Ue(Rv,r)));var s=qj(!!r,i);return n.initData(a,null,s),n}function m2e(r){r.registerComponentModel(h2e),r.registerComponentView(v2e),r.registerPreprocessor(function(e){GE(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var y2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Zs),Jm=ot(),_2e=function(r,e,t,i){var n=r.getData(),a;if(ie(i))a=i;else{var s=i.type;if(s==="min"||s==="max"||s==="average"||s==="median"||i.xAxis!=null||i.yAxis!=null){var o=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)o=e.getAxis(i.yAxis!=null?"y":"x"),l=Gr(i.yAxis,i.xAxis);else{var u=Wj(i,n,e,r);o=u.valueAxis;var c=U$(n,u.valueDataDim);l=HE(n,c,s)}var h=o.dim==="x"?0:1,d=1-h,f=Ee(i),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var v=t.get("precision");v>=0&&ut(l)&&(l=+l.toFixed(Math.min(v,20))),f.coord[h]=p.coord[h]=l,a=[f,p,{type:s,valueIndex:i.valueIndex,value:l}]}else a=[]}var g=[kv(r,a[0]),kv(r,a[1]),J({},a[2])];return g[2].type=g[2].type||null,We(g[2],g[0]),We(g[2],g[1]),g};function l_(r){return!isNaN(r)&&!isFinite(r)}function IB(r,e,t,i){var n=1-r,a=i.dimensions[r];return l_(e[n])&&l_(t[n])&&e[r]===t[r]&&i.getAxis(a).containData(e[r])}function b2e(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(IB(1,t,i,r)||IB(0,t,i,r)))return!0}return Rv(r,e[0])&&Rv(r,e[1])}function sx(r,e,t,i,n){var a=i.coordinateSystem,s=r.getItemModel(e),o,l=ce(s.get("x"),n.getWidth()),u=ce(s.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))o=[l,u];else{if(i.getMarkerPosition)o=i.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,h=r.get(c[0],e),d=r.get(c[1],e);o=a.dataToPoint([h,d])}if(dc(a,"cartesian2d")){var f=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;l_(r.get(c[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):l_(r.get(c[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}r.setItemLayout(e,o)}var T2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var s=Zs.getMarkerModelFromSeries(a,"markLine");if(s){var o=s.getData(),l=Jm(s).from,u=Jm(s).to;l.each(function(c){sx(l,c,!0,a,n),sx(u,c,!1,a,n)}),o.each(function(c){o.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,i,n,a){var s=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,new dE);this.group.add(c.group);var h=S2e(s,t,i),d=h.from,f=h.to,p=h.line;Jm(i).from=d,Jm(i).to=f,i.setData(p);var v=i.get("symbol"),g=i.get("symbolSize"),m=i.get("symbolRotate"),y=i.get("symbolOffset");ie(v)||(v=[v,v]),ie(g)||(g=[g,g]),ie(m)||(m=[m,m]),ie(y)||(y=[y,y]),h.from.each(function(b){_(d,b,!0),_(f,b,!1)}),p.each(function(b){var S=p.getItemModel(b).getModel("lineStyle").getLineStyle();p.setItemLayout(b,[d.getItemLayout(b),f.getItemLayout(b)]),S.stroke==null&&(S.stroke=d.getItemVisual(b,"style").fill),p.setItemVisual(b,{fromSymbolKeepAspect:d.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(b,"symbolOffset"),fromSymbolRotate:d.getItemVisual(b,"symbolRotate"),fromSymbolSize:d.getItemVisual(b,"symbolSize"),fromSymbol:d.getItemVisual(b,"symbol"),toSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(b,"symbolOffset"),toSymbolRotate:f.getItemVisual(b,"symbolRotate"),toSymbolSize:f.getItemVisual(b,"symbolSize"),toSymbol:f.getItemVisual(b,"symbol"),style:S})}),c.updateData(p),h.line.eachItemGraphicEl(function(b){ke(b).dataModel=i,b.traverse(function(S){ke(S).dataModel=i})});function _(b,S,x){var C=b.getItemModel(S);sx(b,S,x,t,a);var D=C.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=ag(l,"color")),b.setItemVisual(S,{symbolKeepAspect:C.get("symbolKeepAspect"),symbolOffset:Be(C.get("symbolOffset",!0),y[x?0:1]),symbolRotate:Be(C.get("symbolRotate",!0),m[x?0:1]),symbolSize:Be(C.get("symbolSize"),g[x?0:1]),symbol:Be(C.get("symbol",!0),v[x?0:1]),style:D})}this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markLine",e}($E);function S2e(r,e,t){var i;r?i=oe(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new wi(i,t),a=new wi(i,t),s=new wi([],t),o=oe(t.get("data"),Ue(_2e,e,r,t));r&&(o=St(o,Ue(b2e,r)));var l=qj(!!r,i);return n.initData(oe(o,function(u){return u[0]}),null,l),a.initData(oe(o,function(u){return u[1]}),null,l),s.initData(oe(o,function(u){return u[2]})),s.hasItemOption=!0,{from:n,to:a,line:s}}function x2e(r){r.registerComponentModel(y2e),r.registerComponentView(T2e),r.registerPreprocessor(function(e){GE(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var w2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Zs),ey=ot(),C2e=function(r,e,t,i){var n=i[0],a=i[1];if(!(!n||!a)){var s=kv(r,n),o=kv(r,a),l=s.coord,u=o.coord;l[0]=Gr(l[0],-1/0),l[1]=Gr(l[1],-1/0),u[0]=Gr(u[0],1/0),u[1]=Gr(u[1],1/0);var c=WA([{},s,o]);return c.coord=[s.coord,o.coord],c.x0=s.x,c.y0=s.y,c.x1=o.x,c.y1=o.y,c}};function u_(r){return!isNaN(r)&&!isFinite(r)}function PB(r,e,t,i){var n=1-r;return u_(e[n])&&u_(t[n])}function A2e(r,e){var t=e.coord[0],i=e.coord[1],n={coord:t,x:e.x0,y:e.y0},a={coord:i,x:e.x1,y:e.y1};return dc(r,"cartesian2d")?t&&i&&(PB(1,t,i)||PB(0,t,i))?!0:p2e(r,n,a):Rv(r,n)||Rv(r,a)}function MB(r,e,t,i,n){var a=i.coordinateSystem,s=r.getItemModel(e),o,l=ce(s.get(t[0]),n.getWidth()),u=ce(s.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))o=[l,u];else{if(i.getMarkerPosition){var c=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),d=a.clampData(c),f=a.clampData(h),p=[];t[0]==="x0"?p[0]=d[0]>f[0]?h[0]:c[0]:p[0]=d[0]>f[0]?c[0]:h[0],t[1]==="y0"?p[1]=d[1]>f[1]?h[1]:c[1]:p[1]=d[1]>f[1]?c[1]:h[1],o=i.getMarkerPosition(p,t,!0)}else{var v=r.get(t[0],e),g=r.get(t[1],e),m=[v,g];a.clampData&&a.clampData(m,m),o=a.dataToPoint(m,!0)}if(dc(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),v=r.get(t[0],e),g=r.get(t[1],e);u_(v)?o[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):u_(g)&&(o[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}return o}var LB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],D2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var s=Zs.getMarkerModelFromSeries(a,"markArea");if(s){var o=s.getData();o.each(function(l){var u=oe(LB,function(h){return MB(o,l,h,a,n)});o.setItemLayout(l,u);var c=o.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,i,n,a){var s=t.coordinateSystem,o=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,{group:new Le});this.group.add(c.group),this.markKeep(c);var h=E2e(s,t,i);i.setData(h),h.each(function(d){var f=oe(LB,function(D){return MB(h,d,D,t,a)}),p=s.getAxis("x").scale,v=s.getAxis("y").scale,g=p.getExtent(),m=v.getExtent(),y=[p.parse(h.get("x0",d)),p.parse(h.get("x1",d))],_=[v.parse(h.get("y0",d)),v.parse(h.get("y1",d))];Hn(y),Hn(_);var b=!(g[0]>y[1]||g[1]<y[0]||m[0]>_[1]||m[1]<_[0]),S=!b;h.setItemLayout(d,{points:f,allClipped:S});var x=h.getItemModel(d).getModel("itemStyle").getItemStyle(),C=ag(l,"color");x.fill||(x.fill=C,pe(x.fill)&&(x.fill=C0(x.fill,.4))),x.stroke||(x.stroke=C),h.setItemVisual(d,"style",x)}),h.diff(ey(c).data).add(function(d){var f=h.getItemLayout(d);if(!f.allClipped){var p=new Ii({shape:{points:f.points}});h.setItemGraphicEl(d,p),c.group.add(p)}}).update(function(d,f){var p=ey(c).data.getItemGraphicEl(f),v=h.getItemLayout(d);v.allClipped?p&&c.group.remove(p):(p?ct(p,{shape:{points:v.points}},i,d):p=new Ii({shape:{points:v.points}}),h.setItemGraphicEl(d,p),c.group.add(p))}).remove(function(d){var f=ey(c).data.getItemGraphicEl(d);c.group.remove(f)}).execute(),h.eachItemGraphicEl(function(d,f){var p=h.getItemModel(f),v=h.getItemVisual(f,"style");d.useStyle(h.getItemVisual(f,"style")),Jr(d,Nr(p),{labelFetcher:i,labelDataIndex:f,defaultText:h.getName(f)||"",inheritColor:pe(v.fill)?C0(v.fill,1):"#000"}),Qr(d,p),Yt(d,null,null,p.get(["emphasis","disabled"])),ke(d).dataModel=i}),ey(c).data=h,c.group.silent=i.get("silent")||t.get("silent")},e.type="markArea",e}($E);function E2e(r,e,t){var i,n,a=["x0","y0","x1","y1"];if(r){var s=oe(r&&r.dimensions,function(u){var c=e.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return J(J({},h),{name:u,ordinalMeta:null})});n=oe(a,function(u,c){return{name:u,type:s[c%2].type}}),i=new wi(n,t)}else n=[{name:"value",type:"float"}],i=new wi(n,t);var o=oe(t.get("data"),Ue(C2e,e,r,t));r&&(o=St(o,Ue(A2e,r)));var l=r?function(u,c,h,d){var f=u.coord[Math.floor(d/2)][d%2];return jo(f,n[d])}:function(u,c,h,d){return jo(u.value,n[d])};return i.initData(o,null,l),i.hasItemOption=!0,i}function I2e(r){r.registerComponentModel(w2e),r.registerComponentView(D2e),r.registerPreprocessor(function(e){GE(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var P2e=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},iC=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),this._updateSelector(t)},e.prototype._updateSelector=function(t){var i=t.selector,n=this.ecModel;i===!0&&(i=t.selector=["all","inverse"]),ie(i)&&R(i,function(a,s){pe(a)&&(a={type:a}),i[s]=We(a,P2e(n,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n<t.length;n++){var a=t[n].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var i=[],n=[];t.eachRawSeries(function(l){var u=l.name;n.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,d=h.getAllNames();t.isSeriesFiltered(l)||(n=n.concat(d)),d.length?i=i.concat(d):c=!0}else c=!0;c&&tD(l)&&i.push(l.name)}),this._availableNames=n;var a=this.get("data")||i,s=be(),o=oe(a,function(l){return(pe(l)||ut(l))&&(l={name:l}),s.get(l.name)?null:(s.set(l.name,!0),new yt(l,this,this.ecModel))},this);this._data=St(o,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var i=this.option.selected,n=this.get("selectedMode");if(n==="single"){var a=this._data;R(a,function(s){i[s.get("name")]=!1})}i[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var i=this.option.selected;i.hasOwnProperty(t)||(i[t]=!0),this[i[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,i=this.option.selected;R(t,function(n){i[n.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,i=this.option.selected;R(t,function(n){var a=n.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},e.prototype.isSelected=function(t){var i=this.option.selected;return!(i.hasOwnProperty(t)&&!i[t])&&Xe(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(tt),Qc=Ue,nC=R,ty=Le,jj=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new ty),this.group.add(this._selectorGroup=new ty),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var s=t.get("align"),o=t.get("orient");(!s||s==="auto")&&(s=t.get("left")==="right"&&o==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=o==="horizontal"?"end":"start"),this.renderInner(s,t,i,n,l,o,u);var c=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},d=t.get("padding"),f=Ar(c,h,d),p=this.layoutInner(t,s,f,a,l,u),v=Ar(Ce({width:p.width,height:p.height},c),h,d);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Oj(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,n,a,s,o,l){var u=this.getContentGroup(),c=be(),h=i.get("selectedMode"),d=[];n.eachRawSeries(function(f){!f.get("legendHoverLink")&&d.push(f.id)}),nC(i.getData(),function(f,p){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===`
`)){var g=new ty;g.newline=!0,u.add(g);return}var m=n.getSeriesByName(v)[0];if(!c.get(v))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),S=y.getVisual("style"),x=this._createItem(m,v,p,f,i,t,_,S,b,h,a);x.on("click",Qc(kB,v,null,a,d)).on("mouseover",Qc(aC,m.name,null,a,d)).on("mouseout",Qc(sC,m.name,null,a,d)),n.ssr&&x.eachChild(function(C){var D=ke(C);D.seriesIndex=m.seriesIndex,D.dataIndex=p,D.ssrType="legend"}),c.set(v,!0)}else n.eachRawSeries(function(C){if(!c.get(v)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(v))return;var I=D.indexOfName(v),M=D.getItemVisual(I,"style"),L=D.getItemVisual(I,"legendIcon"),N=gn(M.fill);N&&N[3]===0&&(N[3]=.2,M=J(J({},M),{fill:Os(N,"rgba")}));var O=this._createItem(C,v,p,f,i,t,{},M,L,h,a);O.on("click",Qc(kB,null,v,a,d)).on("mouseover",Qc(aC,null,v,a,d)).on("mouseout",Qc(sC,null,v,a,d)),n.ssr&&O.eachChild(function(B){var F=ke(B);F.seriesIndex=C.seriesIndex,F.dataIndex=p,F.ssrType="legend"}),c.set(v,!0)}},this)},this),s&&this._createSelector(s,i,a,o,l)},e.prototype._createSelector=function(t,i,n,a,s){var o=this.getSelectorGroup();nC(t,function(u){var c=u.type,h=new lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});o.add(h);var d=i.getModel("selectorLabel"),f=i.getModel(["emphasis","selectorLabel"]);Jr(h,{normal:d,emphasis:f},{defaultText:u.title}),zu(h)})},e.prototype._createItem=function(t,i,n,a,s,o,l,u,c,h,d){var f=t.visualDrawType,p=s.get("itemWidth"),v=s.get("itemHeight"),g=s.isSelected(i),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=M2e(c,a,l,u,f,g,d),S=new ty,x=a.getModel("textStyle");if(we(t.getLegendIcon)&&(!_||_==="inherit"))S.add(t.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var C=_==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;S.add(L2e({itemWidth:p,itemHeight:v,icon:c,iconRotate:C,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var D=o==="left"?p+5:-5,I=o,M=s.get("formatter"),L=i;pe(M)&&M?L=M.replace("{name}",i??""):we(M)&&(L=M(i));var N=g?x.getTextColor():a.get("inactiveColor");S.add(new lt({style:kt(x,{text:L,x:D,y:v/2,fill:N,align:I,verticalAlign:"middle"},{inheritColor:N})}));var O=new st({shape:S.getBoundingRect(),style:{fill:"transparent"}}),B=a.getModel("tooltip");return B.get("show")&&kf({el:O,componentModel:s,itemName:i,itemTooltipOption:B.option}),S.add(O),S.eachChild(function(F){F.silent=!0}),O.silent=!h,this.getContentGroup().add(S),zu(S),S.__legendDataIndex=n,S},e.prototype.layoutInner=function(t,i,n,a,s,o){var l=this.getContentGroup(),u=this.getSelectorGroup();Hu(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),s){Hu("horizontal",u,t.get("selectorItemGap",!0));var d=u.getBoundingRect(),f=[-d.x,-d.y],p=t.get("selectorButtonGap",!0),v=t.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";o==="end"?f[v]+=c[g]+p:h[v]+=d[g]+p,f[1-v]+=c[m]/2-d[m]/2,u.x=f[0],u.y=f[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=c[g]+p+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+f[1-v]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}($t);function M2e(r,e,t,i,n,a,s){function o(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),nC(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:cf(h,s),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:t).opacity),o(u,i);var d=e.getModel("lineStyle"),f=d.getLineStyle();if(o(f,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),f.stroke==="auto"&&(f.stroke=i.fill),!a){var p=e.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?i.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=d.get("inactiveColor"),f.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function L2e(r){var e=r.icon||"roundRect",t=yr(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function kB(r,e,t,i){sC(r,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:r??e}),aC(r,e,t,i)}function Xj(r){for(var e=r.getZr().storage.getDisplayList(),t,i=0,n=e.length;i<n&&!(t=e[i].states.emphasis);)i++;return t&&t.hoverLayer}function aC(r,e,t,i){Xj(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:i})}function sC(r,e,t,i){Xj(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:i})}function k2e(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}function Ud(r,e,t){var i={},n=r==="toggleSelected",a;return t.eachComponent("legend",function(s){n&&a!=null?s[a?"select":"unSelect"](e.name):r==="allSelect"||r==="inverseSelect"?s[r]():(s[r](e.name),a=s.isSelected(e.name));var o=s.getData();R(o,function(l){var u=l.get("name");if(!(u===`
`||u==="")){var c=s.isSelected(u);i.hasOwnProperty(u)?i[u]=i[u]&&c:i[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:i}:{name:e.name,selected:i}}function R2e(r){r.registerAction("legendToggleSelect","legendselectchanged",Ue(Ud,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ue(Ud,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ue(Ud,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ue(Ud,"select")),r.registerAction("legendUnSelect","legendunselected",Ue(Ud,"unSelect"))}function Yj(r){r.registerComponentModel(iC),r.registerComponentView(jj),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,k2e),r.registerSubTypeDefaulter("legend",function(){return"plain"}),R2e(r)}var O2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,i,n){var a=Bf(t);r.prototype.init.call(this,t,i,n),RB(this,t,a)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),RB(this,this.option,t)},e.type="legend.scroll",e.defaultOption=hl(iC.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(iC);function RB(r,e,t){var i=r.getOrient(),n=[1,1];n[i.index]=0,il(e,t,{type:"box",ignoreSize:!!n})}var OB=Le,ox=["width","height"],lx=["x","y"],N2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new OB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new OB)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,i,n,a,s,o,l){var u=this;r.prototype.renderInner.call(this,t,i,n,a,s,o,l);var c=this._controllerGroup,h=i.get("pageIconSize",!0),d=ie(h)?h:[h,h];p("pagePrev",0);var f=i.getModel("pageTextStyle");c.add(new lt({name:"pageText",style:{text:"xx/xx",fill:f.getTextColor(),font:f.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=ig(i.get("pageIcons",!0)[i.getOrient().name][g],{onclick:ge(u._pageGo,u,m,i,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=v,c.add(y)}},e.prototype.layoutInner=function(t,i,n,a,s,o){var l=this.getSelectorGroup(),u=t.getOrient().index,c=ox[u],h=lx[u],d=ox[1-u],f=lx[1-u];s&&Hu("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=Ee(n);s&&(m[c]=n[c]-v[c]-p);var y=this._layoutContentAndController(t,a,m,u,c,d,f,h);if(s){if(o==="end")g[u]+=y[c]+p;else{var _=v[c]+p;g[u]-=_,y[h]-=_}y[c]+=v[c]+p,g[1-u]+=y[f]+y[d]/2-v[d]/2,y[d]=Math.max(y[d],v[d]),y[f]=Math.min(y[f],v[f]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,i,n,a,s,o,l,u){var c=this.getContentGroup(),h=this._containerGroup,d=this._controllerGroup;Hu(t.get("orient"),c,t.get("itemGap"),a?n.width:null,a?null:n.height),Hu("horizontal",d,t.get("pageButtonItemGap",!0));var f=c.getBoundingRect(),p=d.getBoundingRect(),v=this._showController=f[s]>n[s],g=[-f.x,-f.y];i||(g[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],_=Be(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(v){var b=t.get("pageButtonPosition",!0);b==="end"?y[a]+=n[s]-p[s]:m[a]+=p[s]+_}y[1-a]+=f[o]/2-p[o]/2,c.setPosition(g),h.setPosition(m),d.setPosition(y);var S={x:0,y:0};if(S[s]=v?n[s]:f[s],S[o]=Math.max(f[o],p[o]),S[l]=Math.min(0,p[l]+y[1-a]),h.__rectSize=n[s],v){var x={x:0,y:0};x[s]=Math.max(n[s]-p[s]-_,0),x[o]=S[o],h.setClipPath(new st({shape:x})),h.__rectSize=x[s]}else d.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(t);return C.pageIndex!=null&&ct(c,{x:C.contentPosition[0],y:C.contentPosition[1]},v?t:null),this._updatePageInfoView(t,C),S},e.prototype._pageGo=function(t,i,n){var a=this._getPageInfo(i)[t];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var n=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",d=i[h]!=null,f=n.childOfName(c);f&&(f.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=d?"pointer":"default")});var a=n.childOfName("pageText"),s=t.get("pageFormatter"),o=i.pageIndex,l=o!=null?o+1:0,u=i.pageCount;a&&s&&a.setStyle("text",pe(s)?s.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):s({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,s=t.getOrient().index,o=ox[s],l=lx[s],u=this._findTargetItemIndex(i),c=n.children(),h=c[u],d=c.length,f=d?1:0,p={contentPosition:[n.x,n.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var v=b(h);p.contentPosition[s]=-v.s;for(var g=u+1,m=v,y=v,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!S(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var g=u-1,m=v,y=v,_=null;g>=-1;--g)_=b(c[g]),(!_||!S(y,_.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p;function b(x){if(x){var C=x.getBoundingRect(),D=C[l]+x[l];return{s:D,e:D+C[o],i:x.__legendDataIndex}}}function S(x,C){return x.e>=C&&x.s<=C+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(s,o){var l=s.__legendDataIndex;a==null&&l!=null&&(a=o),l===t&&(i=o)}),i??a},e.type="legend.scroll",e}(jj);function B2e(r){r.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(i)})})}function F2e(r){Ze(Yj),r.registerComponentModel(O2e),r.registerComponentView(N2e),B2e(r)}function U2e(r){Ze(Yj),Ze(F2e)}var V2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=hl(Lv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Lv),WE=ot();function z2e(r,e,t){WE(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function G2e(r,e){for(var t=WE(r).coordSysRecordMap,i=t.keys(),n=0;n<i.length;n++){var a=i[n],s=t.get(a),o=s.dataZoomInfoMap;if(o){var l=e.uid,u=o.get(l);u&&(o.removeKey(l),o.keys().length||Kj(t,s))}}}function Kj(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function H2e(r,e){var t={model:e,containsPoint:Ue(W2e,e),dispatchAction:Ue($2e,r),dataZoomInfoMap:null,controller:null},i=t.controller=new pg(r.getZr());return R(["pan","zoom","scrollMove"],function(n){i.on(n,function(a){var s=[];t.dataZoomInfoMap.each(function(o){if(a.isAvailableBehavior(o.model.option)){var l=(o.getRange||{})[n],u=l&&l(o.dzReferCoordSysInfo,t.model.mainType,t.controller,a);!o.model.get("disabled",!0)&&u&&s.push({dataZoomId:o.model.id,start:u[0],end:u[1]})}}),s.length&&t.dispatchAction(s)})}),t}function $2e(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function W2e(r,e,t,i){return r.coordinateSystem.containPoint([t,i])}function q2e(r){var e,t="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return r.each(function(a){var s=a.model,o=s.get("disabled",!0)?!1:s.get("zoomLock",!0)?"move":!0;i[t+o]>i[t+e]&&(e=o),n=n&&s.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function j2e(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=WE(t),n=i.coordSysRecordMap||(i.coordSysRecordMap=be());n.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var s=Lj(a);R(s.infoList,function(o){var l=o.model.uid,u=n.get(l)||n.set(l,H2e(t,o.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=be());c.set(a.uid,{dzReferCoordSysInfo:o,model:a,getRange:null})})}),n.each(function(a){var s=a.controller,o,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(o=l.get(u))}if(!o){Kj(n,a);return}var c=q2e(l);s.enable(c.controlType,c.opt),s.setPointerChecker(a.containsPoint),Vf(a,"dispatchAction",o.model.get("throttle",!0),"fixRate")})})}var X2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),z2e(n,t,{pan:ge(ux.pan,this),zoom:ge(ux.zoom,this),scrollMove:ge(ux.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){G2e(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(NE),ux={zoom:function(r,e,t,i){var n=this.range,a=n.slice(),s=r.axisModels[0];if(s){var o=cx[e](null,[i.originX,i.originY],s,t,r),l=(o.signal>0?o.pixelStart+o.pixelLength-o.pixel:o.pixel-o.pixelStart)/o.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(vc(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:NB(function(r,e,t,i,n,a){var s=cx[i]([a.oldX,a.oldY],[a.newX,a.newY],e,n,t);return s.signal*(r[1]-r[0])*s.pixel/s.pixelLength}),scrollMove:NB(function(r,e,t,i,n,a){var s=cx[i]([0,0],[a.scrollDelta,a.scrollDelta],e,n,t);return s.signal*(r[1]-r[0])*a.scrollDelta})};function NB(r){return function(e,t,i,n){var a=this.range,s=a.slice(),o=e.axisModels[0];if(o){var l=r(s,o,e,t,i,n);if(vc(l,s,[0,100],"all"),this.range=s,a[0]!==s[0]||a[1]!==s[1])return s}}}var cx={grid:function(r,e,t,i,n){var a=t.axis,s={},o=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s},polar:function(r,e,t,i,n){var a=t.axis,s={},o=n.model.coordinateSystem,l=o.getRadiusAxis().getExtent(),u=o.getAngleAxis().getExtent();return r=r?o.pointToCoord(r):[0,0],e=o.pointToCoord(e),t.mainType==="radiusAxis"?(s.pixel=e[0]-r[0],s.pixelLength=l[1]-l[0],s.pixelStart=l[0],s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=u[1]-u[0],s.pixelStart=u[0],s.signal=a.inverse?-1:1),s},singleAxis:function(r,e,t,i,n){var a=t.axis,s=n.model.coordinateSystem.getRect(),o={};return r=r||[0,0],a.orient==="horizontal"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o}};function Zj(r){BE(r),r.registerComponentModel(V2e),r.registerComponentView(X2e),j2e(r)}var Y2e=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=hl(Lv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Lv),Vd=st,BB=7,K2e=1,hx=30,Z2e=7,zd="horizontal",FB="vertical",Q2e=5,J2e=["line","bar","candlestick","scatter"],eCe={easing:"cubicOut",duration:100,delay:0},tCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=ge(this._onBrush,this),this._onBrushEnd=ge(this._onBrushEnd,this)},e.prototype.render=function(t,i,n,a){if(r.prototype.render.apply(this,arguments),Vf(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){_v(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new Le;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,n=t.get("brushSelect"),a=n?Z2e:0,s=this._findCoordRect(),o={width:i.getWidth(),height:i.getHeight()},l=this._orient===zd?{right:o.width-s.x-s.width,top:o.height-hx-BB-a,width:s.width,height:hx}:{right:BB,top:s.y,width:hx,height:s.height},u=Bf(t.option);R(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var c=Ar(u,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===FB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),s=a&&a.get("inverse"),o=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n===zd&&!s?{scaleY:l?1:-1,scaleX:1}:n===zd&&s?{scaleY:l?1:-1,scaleX:-1}:n===FB&&!s?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([o]);t.x=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=t.get("brushSelect");n.add(new Vd({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var s=new Vd({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:ge(this._onClickPanel,this)}),o=this.api.getZr();a?(s.on("mousedown",this._onBrushStart,this),s.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(s)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,n=this._shadowSize||[],a=t.series,s=a.getRawData(),o=a.getShadowDim&&a.getShadowDim(),l=o&&s.getDimensionInfo(o)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(s!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=s.getDataExtent(l),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var f=[0,i[1]],p=[0,i[0]],v=[[i[0],0],[0,0]],g=[],m=p[1]/(s.count()-1),y=0,_=Math.round(s.count()/i[0]),b;s.each([l],function(I,M){if(_>0&&M%_){y+=m;return}var L=I==null||isNaN(I)||I==="",N=L?0:bt(I,h,f,!0);L&&!b&&M?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!L&&b&&(v.push([y,0]),g.push([y,0])),v.push([y,N]),g.push([y,N]),y+=m,b=L}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=s,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var S=this.dataZoomModel;function x(I){var M=S.getModel(I?"selectedDataBackground":"dataBackground"),L=new Le,N=new Ii({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),O=new Pi({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return L.add(N),L.add(O),L}for(var C=0;C<3;C++){var D=x(C===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return t.eachTargetAxis(function(s,o){var l=t.getAxisProxy(s,o).getTargetSeriesModels();R(l,function(u){if(!n&&!(i!==!0&&Xe(J2e,u.get("type"))<0)){var c=a.getComponent(Go(s),o).axis,h=rCe(s),d,f=u.coordinateSystem;h!=null&&f.getOtherAxis&&(d=f.getOtherAxis(c).inverse),h=u.getData().mapDimension(h),n={thisAxis:c,series:u,thisDim:s,otherDim:h,otherAxisInverse:d}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],s=this._displayables.sliderGroup,o=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),d=i.filler=new Vd({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});s.add(d),s.add(new Vd({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:K2e,fill:"rgba(0,0,0,0)"}})),R([0,1],function(_){var b=l.get("handleIcon");!V0[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var S=yr(b,-1,0,2,2,null,!0);S.attr({cursor:UB(this._orient),draggable:!0,drift:ge(this._onDragMove,this,_),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1),z2:5});var x=S.getBoundingRect(),C=l.get("handleSize");this._handleHeight=ce(C,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),zu(S);var D=l.get("handleColor");D!=null&&(S.style.fill=D),s.add(n[_]=S);var I=l.getModel("textStyle");t.add(a[_]=new lt({silent:!0,invisible:!0,style:kt(I,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:I.getTextColor(),font:I.getFont()}),z2:10}))},this);var f=d;if(h){var p=ce(l.get("moveHandleSize"),o[1]),v=i.moveHandle=new st({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),g=p*.8,m=i.moveHandleIcon=yr(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=o[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));f=i.moveZone=new st({invisible:!0,shape:{y:o[1]-y,height:p+y}}),f.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),s.add(v),s.add(m),s.add(f)}f.attr({draggable:!0,cursor:UB(this._orient),drift:ge(this._onDragMove,this,"all"),ondragstart:ge(this._showDataInfo,this,!0),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[bt(t[0],[0,100],i,!0),bt(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var n=this.dataZoomModel,a=this._handleEnds,s=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];vc(i,a,s,n.get("zoomLock")?"all":t,o.minSpan!=null?bt(o.minSpan,l,s,!0):null,o.maxSpan!=null?bt(o.maxSpan,l,s,!0):null);var u=this._range,c=this._range=Hn([bt(a[0],s,l,!0),bt(a[1],s,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var i=this._displayables,n=this._handleEnds,a=Hn(n.slice()),s=this._size;R([0,1],function(f){var p=i.handles[f],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:n[f]+(f?-1:1),y:s[1]/2-v/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:s[1]});var o={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(o),i.moveZone.setShape(o),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",o.x+o.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],s[0]],c=0;c<l.length;c++){var h=l[c],d=h.getClipPath();d||(d=new st,h.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:s[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,s=this._orient,o=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,h=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();o=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var d=Hn(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(p){var v=Gu(n.handles[p].parent,this.group),g=f1(p===0?"right":"left",v),m=this._handleWidth/2+Q2e,y=ma([d[p]+(p===0?-m:m),this._size[1]/2],v);a[p].setStyle({x:y[0],y:y[1],verticalAlign:s===zd?"middle":g,align:s===zd?g:"center",text:o[p]})}},e.prototype._formatLabel=function(t,i){var n=this.dataZoomModel,a=n.get("labelFormatter"),s=n.get("labelPrecision");(s==null||s==="auto")&&(s=i.getPixelPrecision());var o=t==null||isNaN(t)?"":i.type==="category"||i.type==="time"?i.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(s,20));return we(a)?a(t,o):pe(a)?a.replace("{value}",o):o},e.prototype._showDataInfo=function(t){t=this._dragging||t;var i=this._displayables,n=i.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),i.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},e.prototype._onDragMove=function(t,i,n,a){this._dragging=!0,$s(a.event);var s=this._displayables.sliderGroup.getLocalTransform(),o=ma([i,n],s,!0),l=this._updateInterval(t,o[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var i=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>i[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,s=(a[0]+a[1])/2,o=this._updateInterval("all",n[0]-s);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,n=t.offsetY;this._brushStart=new He(i,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var s=this._getViewExtent(),o=[0,100];this._range=Hn([bt(n.x,s,o,!0),bt(n.x+n.width,s,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&($s(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var n=this._displayables,a=this.dataZoomModel,s=n.brushRect;s||(s=n.brushRect=new Vd({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(s)),s.attr("ignore",!1);var o=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),c=l.transformCoordToLocal(o.x,o.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),s.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?eCe:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=Lj(this.dataZoomModel).infoList;if(!t&&i.length){var n=i[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var a=this.api.getWidth(),s=this.api.getHeight();t={x:a*.2,y:s*.2,width:a*.6,height:s*.6}}return t},e.type="dataZoom.slider",e}(NE);function rCe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function UB(r){return r==="vertical"?"ns-resize":"ew-resize"}function Qj(r){r.registerComponentModel(Y2e),r.registerComponentView(tCe),BE(r)}function iCe(r){Ze(Zj),Ze(Qj)}var Jj={get:function(r,e,t){var i=Ee((nCe[r]||{})[e]);return t&&ie(i)?i[i.length-1]:i}},nCe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},VB=Or.mapVisual,aCe=Or.eachVisual,sCe=ie,zB=R,oCe=Hn,lCe=bt,c_=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&Gj(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=ge(t,this),this.controllerVisuals=eC(this.option.controller,i,t),this.targetVisuals=eC(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=xt(t),i},e.prototype.eachTargetSeries=function(t,i){R(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&t.call(i,a)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(n){n===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,n){var a=this.option,s=a.precision,o=this.dataBound,l=a.formatter,u;n=n||["<",">"],ie(t)&&(t=t.slice(),u=!0);var c=i?t:u?[h(t[0]),h(t[1])]:h(t);if(pe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(we(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===o[0]?n[0]+" "+c[1]:t[1]===o[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(d){return d===o[0]?"min":d===o[1]?"max":(+d).toFixed(Math.min(s,20))}},e.prototype.resetExtent=function(){var t=this.option,i=oCe([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var s=n[a],o=t.getDimensionInfo(s);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),s=i.controller||(i.controller={});We(a,n),We(s,n);var o=this.isCategory();l.call(this,a),l.call(this,s),u.call(this,a,"inRange","outOfRange"),c.call(this,s);function l(h){sCe(i.color)&&!h.inRange&&(h.inRange={color:i.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,d,f){var p=h[d],v=h[f];p&&!v&&(v=h[f]={},zB(p,function(g,m){if(Or.isValidType(m)){var y=Jj.get(m,"inactive",o);y!=null&&(v[m]=y,m==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(h){var d=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,f=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";zB(this.stateList,function(m){var y=this.itemSize,_=h[m];_||(_=h[m]={color:o?p:[p]}),_.symbol==null&&(_.symbol=d&&Ee(d)||(o?g:[g])),_.symbolSize==null&&(_.symbolSize=f&&Ee(f)||(o?y[0]:[y[0],y[0]])),_.symbol=VB(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var S=-1/0;aCe(b,function(x){x>S&&(S=x)}),_.symbolSize=VB(b,function(x){return lCe(x,[0,S],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(tt),GB=[20,140],uCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=GB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=GB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):ie(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=Hn((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]<t[0]&&(i[0]=t[0]),i[1]<t[0]&&(i[1]=t[0]),i},e.prototype.getValueState=function(t){var i=this.option.range,n=this.getExtent();return(i[0]<=n[0]||i[0]<=t)&&(i[1]>=n[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(n){var a=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(o,l){t[0]<=o&&o<=t[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(t){var i=HB(this,"outOfRange",this.getExtent()),n=HB(this,"inRange",this.option.range.slice()),a=[];function s(f,p){a.push({value:f,color:t(f,p)})}for(var o=0,l=0,u=n.length,c=i.length;l<c&&(!n.length||i[l]<=n[0]);l++)i[l]<n[o]&&s(i[l],"outOfRange");for(var h=1;o<u;o++,h=0)h&&a.length&&s(n[o],"outOfRange"),s(n[o],"inRange");for(var h=1;l<c;l++)(!n.length||n[n.length-1]<i[l])&&(h&&(a.length&&s(a[a.length-1].value,"outOfRange"),h=0),s(i[l],"outOfRange"));var d=a.length;return{stops:a,outerColors:[d?a[0].color:"transparent",d?a[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=hl(c_.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(c_);function HB(r,e,t){if(t[0]===t[1])return t.slice();for(var i=200,n=(t[1]-t[0])/i,a=t[0],s=[],o=0;o<=i&&a<t[1];o++)s.push(a),a+=n;return s.push(t[1]),s}var eX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i},e.prototype.render=function(t,i,n,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,i,n,a)},e.prototype.renderBackground=function(t){var i=this.visualMapModel,n=Nf(i.get("padding")||0),a=t.getBoundingRect();t.add(new st({z2:-1,silent:!0,shape:{x:a.x-n[3],y:a.y-n[0],width:a.width+n[3]+n[1],height:a.height+n[0]+n[2]},style:{fill:i.get("backgroundColor"),stroke:i.get("borderColor"),lineWidth:i.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,i,n){n=n||{};var a=n.forceState,s=this.visualMapModel,o={};if(i==="color"){var l=s.get("contentColor");o.color=l}function u(f){return o[f]}function c(f,p){o[f]=p}var h=s.controllerVisuals[a||s.getValueState(t)],d=Or.prepareVisualTypes(h);return R(d,function(f){var p=h[f];n.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",p=h.__alphaForOpacity),Or.dependsOn(f,i)&&p&&p.applyVisual(t,u,c)}),o[i]},e.prototype.positionGroup=function(t){var i=this.visualMapModel,n=this.api;_1(t,i.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,i,n,a){},e.type="visualMap",e}($t),$B=[["left","right","width"],["top","bottom","height"]];function tX(r,e,t){var i=r.option,n=i.align;if(n!=null&&n!=="auto")return n;for(var a={width:e.getWidth(),height:e.getHeight()},s=i.orient==="horizontal"?1:0,o=$B[s],l=[0,null,10],u={},c=0;c<3;c++)u[$B[1-s][c]]=l[c],u[o[c]]=c===2?t[0]:i[o[c]];var h=[["x","width",3],["y","height",0]][s],d=Ar(u,a,i.padding);return o[(d.margin[h[2]]||0)+d[h[0]]+d[h[1]]*.5<a[h[1]]*.5?0:1]}function ky(r,e){return R(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var La=bt,cCe=R,WB=Math.min,fx=Math.max,hCe=12,fCe=6,dCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,i){r.prototype.init.call(this,t,i),this._hoverLinkFromSeriesMouseOver=ge(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ge(this._hideIndicator,this)},e.prototype.doRender=function(t,i,n,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,i=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(i);var n=t.get("text");this._renderEndsText(i,n,0),this._renderEndsText(i,n,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},e.prototype._renderEndsText=function(t,i,n){if(i){var a=i[1-n];a=a!=null?a+"":"";var s=this.visualMapModel,o=s.get("textGap"),l=s.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,n===0?-o:l[1]+o],u),h=this._applyTransform(n===0?"bottom":"top",u),d=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new lt({style:kt(f,{x:c[0],y:c[1],verticalAlign:d==="horizontal"?"middle":h,align:d==="horizontal"?h:"center",text:a})}))}},e.prototype._renderBar=function(t){var i=this.visualMapModel,n=this._shapes,a=i.itemSize,s=this._orient,o=this._useHandle,l=tX(i,this.api,a),u=n.mainGroup=this._createBarGroup(l),c=new Le;u.add(c),c.add(n.outOfRange=qB()),c.add(n.inRange=qB(null,o?XB(this._orient):null,ge(this._dragHandle,this,"all",!1),ge(this._dragHandle,this,"all",!0))),c.setClipPath(new st({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var h=i.textStyleModel.getTextRect("国"),d=fx(h.width,h.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(i,u,0,a,d,s),this._createHandle(i,u,1,a,d,s)),this._createIndicator(i,u,a,d,s),t.add(u)},e.prototype._createHandle=function(t,i,n,a,s,o){var l=ge(this._dragHandle,this,n,!1),u=ge(this._dragHandle,this,n,!0),c=ya(t.get("handleSize"),a[0]),h=yr(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=XB(this._orient);h.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){$s(m.event)}}),h.x=a[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),yu(h,!0),i.add(h);var f=this.visualMapModel.textStyleModel,p=new lt({cursor:d,draggable:!0,drift:l,onmousemove:function(m){$s(m.event)},ondragend:u,style:kt(f,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[n]=h,g.handleLabelPoints[n]=v,g.handleLabels[n]=p},e.prototype._createIndicator=function(t,i,n,a,s){var o=ya(t.get("indicatorSize"),n[0]),l=yr(t.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof Wr){var c=l.style;l.useStyle(J({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);i.add(l);var h=this.visualMapModel.textStyleModel,d=new lt({silent:!0,invisible:!0,style:kt(h,{x:0,y:0,text:""})});this.group.add(d);var f=[(s==="horizontal"?a/2:fCe)+n[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=d,p.indicatorLabelPoint=f,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,i,n,a){if(this._useHandle){if(this._dragging=!i,!i){var s=this._applyTransform([n,a],this._shapes.mainGroup,!0);this._updateInterval(t,s[1]),this._hideIndicator(),this._updateView()}i===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),i?!this._hovering&&this._clearHoverLinkToSeries():jB(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,i=this._dataInterval=t.getSelected(),n=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[La(i[0],n,a,!0),La(i[1],n,a,!0)]},e.prototype._updateInterval=function(t,i){i=i||0;var n=this.visualMapModel,a=this._handleEnds,s=[0,n.itemSize[1]];vc(i,a,s,t,0);var o=n.getExtent();this._dataInterval=[La(a[0],s,o,!0),La(a[1],s,o,!0)]},e.prototype._updateView=function(t){var i=this.visualMapModel,n=i.getExtent(),a=this._shapes,s=[0,i.itemSize[1]],o=t?s:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,o,"inRange"),u=this._createBarVisual(n,n,s,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(o,l)},e.prototype._createBarVisual=function(t,i,n,a){var s={forceState:a,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,s),l=[this.getControllerVisual(t[0],"symbolSize",s),this.getControllerVisual(t[1],"symbolSize",s)],u=this._createBarPoints(n,l);return{barColor:new tg(0,0,0,1,o),barPoints:u,handlesColor:[o[0].color,o[o.length-1].color]}},e.prototype._makeColorGradient=function(t,i){var n=100,a=[],s=(t[1]-t[0])/n;a.push({color:this.getControllerVisual(t[0],"color",i),offset:0});for(var o=1;o<n;o++){var l=t[0]+s*o;if(l>t[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:o/n})}return a.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(t,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,n=this.visualMapModel.get("inverse");return new Le(i==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,s=n.handleThumbs,o=n.handleLabels,l=a.itemSize,u=a.getExtent();cCe([0,1],function(c){var h=s[c];h.setStyle("fill",i.handlesColor[c]),h.y=t[c];var d=La(t[c],[0,l[1]],u,!0),f=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=f/l[0],h.x=l[0]-f/2;var p=ma(n.handleLabelPoints[c],Gu(h,this.group));o[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,n,a){var s=this.visualMapModel,o=s.getExtent(),l=s.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var d={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",d),p=this.getControllerVisual(t,"symbolSize"),v=La(t,o,u,!0),g=l[0]-p/2,m={x:h.x,y:h.y};h.y=v,h.x=g;var y=ma(c.indicatorLabelPoint,Gu(h,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),S=this._orient,x=S==="horizontal";_.setStyle({text:(n||"")+s.formatValueText(i),verticalAlign:x?b:"middle",align:x?"center":b});var C={x:g,y:v,style:{fill:f}},D={style:{x:y[0],y:y[1]}};if(s.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var I={duration:100,easing:"cubicInOut",additive:!0};h.x=m.x,h.y=m.y,h.animateTo(C,I),_.animateTo(D,I)}else h.attr(C),_.attr(D);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var L=0;L<M.length;L++)this.api.enterBlur(M[L])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(i){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,a=t._applyTransform([i.offsetX,i.offsetY],t._shapes.mainGroup,!0,!0);a[1]=WB(fx(0,a[1]),n[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,i){var n=this.visualMapModel,a=n.itemSize;if(n.option.hoverLink){var s=[0,a[1]],o=n.getExtent();t=WB(fx(s[0],t),s[1]);var l=pCe(n,o,s),u=[t-l,t+l],c=La(t,s,o,!0),h=[La(u[0],s,o,!0),La(u[1],s,o,!0)];u[0]<s[0]&&(h[0]=-1/0),u[1]>s[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var d=this._hoverLinkDataIndices,f=[];(i||jB(n))&&(f=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var p=Sue(d,f);this._dispatchHighDown("downplay",ky(p[0],n)),this._dispatchHighDown("highlight",ky(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(bu(t.target,function(l){var u=ke(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var s=n.getData(i.dataType),o=s.getStore().get(a.getDataDimensionIndex(s),i.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n<i.length;n++)this.api.leaveBlur(i[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ky(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,i,n,a){var s=Gu(i,a?null:this.group);return ie(t)?ma(t,s,n):f1(t,s,n)},e.prototype._dispatchHighDown=function(t,i){i&&i.length&&this.api.dispatchAction({type:t,batch:i})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(eX);function qB(r,e,t,i){return new Ii({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(n){$s(n.event)},ondragend:i})}function pCe(r,e,t){var i=hCe/2,n=r.get("hoverLinkDataSize");return n&&(i=La(n,e,t,!0)/2),i}function jB(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function XB(r){return r==="vertical"?"ns-resize":"ew-resize"}var vCe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},gCe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},mCe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(i){var n=r.pipelineContext;!i.isTargetSeries(r)||n&&n.large||t.push(Uwe(i.stateList,i.targetVisuals,ge(i.getValueState,i),i.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),i=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var a=n.getVisualMeta(ge(yCe,null,r,n))||{stops:[],outerColors:[]},s=n.getDataDimensionIndex(t);s>=0&&(a.dimension=s,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function yCe(r,e,t,i){for(var n=e.targetVisuals[i],a=Or.prepareVisualTypes(n),s={color:ag(r.getData(),"color")},o=0,l=a.length;o<l;o++){var u=a[o],c=n[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,h,d)}return s.color;function h(f){return s[f]}function d(f,p){s[f]=p}}var YB=R;function _Ce(r){var e=r&&r.visualMap;ie(e)||(e=e?[e]:[]),YB(e,function(t){if(t){Jc(t,"splitList")&&!Jc(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var i=t.pieces;i&&ie(i)&&YB(i,function(n){De(n)&&(Jc(n,"start")&&!Jc(n,"min")&&(n.min=n.start),Jc(n,"end")&&!Jc(n,"max")&&(n.max=n.end))})}})}function Jc(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var KB=!1;function rX(r){KB||(KB=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(vCe,gCe),R(mCe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(_Ce))}function iX(r){r.registerComponentModel(uCe),r.registerComponentView(dCe),rX(r)}var bCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],TCe[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var a=this.option.categories;this.resetVisual(function(s,o){n==="categories"?(s.mappingMethod="category",s.categories=Ee(a)):(s.dataExtent=this.getExtent(),s.mappingMethod="piecewise",s.pieceList=oe(this._pieceList,function(l){return l=Ee(l),o!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},n=Or.listVisualTypes(),a=this.isCategory();R(t.pieces,function(o){R(n,function(l){o.hasOwnProperty(l)&&(i[l]=1)})}),R(i,function(o,l){var u=!1;R(this.stateList,function(c){u=u||s(t,c,l)||s(t.target,c,l)},this),!u&&R(this.stateList,function(c){(t[c]||(t[c]={}))[l]=Jj.get(l,c==="inRange"?"active":"inactive",a)})},this);function s(o,l,u){return o&&o[l]&&o[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var n=this.option,a=this._pieceList,s=(i?n:t).selected||{};if(n.selected=s,R(a,function(l,u){var c=this.getSelectedMapKey(l);s.hasOwnProperty(c)||(s[c]=!0)},this),n.selectedMode==="single"){var o=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);s[c]&&(o?s[c]=!1:o=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Ee(t)},e.prototype.getValueState=function(t){var i=Or.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var s=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,u){var c=Or.findPieceIndex(l,n);c===t&&s.push(u)},this),i.push({seriesId:a.id,dataIndex:s})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var n=t.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],n=["",""],a=this;function s(c,h){var d=a.getRepresentValue({interval:c});h||(h=a.getValueState(d));var f=t(d,h);c[0]===-1/0?n[0]=f:c[1]===1/0?n[1]=f:i.push({value:c[0],color:f},{value:c[1],color:f})}var o=this._pieceList.slice();if(!o.length)o.push({interval:[-1/0,1/0]});else{var l=o[0].interval[0];l!==-1/0&&o.unshift({interval:[-1/0,l]}),l=o[o.length-1].interval[1],l!==1/0&&o.push({interval:[l,1/0]})}var u=-1/0;return R(o,function(c){var h=c.interval;h&&(h[0]>u&&s([u,h[0]],"outOfRange"),s(h.slice()),u=h[1])},this),{stops:i,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=hl(c_.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(c_),TCe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var s=0,o=i[0];s<n;o+=a,s++){var l=s===n-1?i[1]:o+a;r.push({interval:[o,l],close:[1,1]})}e.maxOpen&&r.push({interval:[i[1],1/0],close:[0,0]}),WL(r),R(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;R(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),ZB(e,r)},pieces:function(r){var e=this.option;R(e.pieces,function(t,i){De(t)||(t={value:t});var n={text:"",index:i};if(t.label!=null&&(n.text=t.label),t.hasOwnProperty("value")){var a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var s=n.interval=[],o=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var d=[["gte","gt","min"],["lte","lt","max"]][h],f=0;f<3&&s[h]==null;f++)s[h]=t[d[f]],o[h]=l[f],c[h]=f===2;s[h]==null&&(s[h]=u[h])}c[0]&&s[1]===1/0&&(o[0]=0),c[1]&&s[0]===-1/0&&(o[1]=0),s[0]===s[1]&&o[0]&&o[1]&&(n.value=s[0])}n.visual=Or.retrieveVisuals(t),r.push(n)},this),ZB(e,r),WL(r),R(r,function(t){var i=t.close,n=[["<","≤"][i[1]],[">","≥"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function ZB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var SCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,s=a.getFont(),o=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),h=c.endsText,d=Gr(i.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],u,d,l),R(c.viewPieceList,function(f){var p=f.piece,v=new Le;v.onclick=ge(this._onItemClick,this,p),this._enableHoverLink(v,f.indexInModelPieceList);var g=i.getRepresentValue(p);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),d){var m=this.visualMapModel.getValueState(g);v.add(new lt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:s,fill:o,opacity:m==="outOfRange"?.5:1}}))}t.add(v)},this),h&&this._renderEndsText(t,h[1],u,d,l),Hu(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var n=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(s){var o=n.visualMapModel;o.option.hoverLink&&n.api.dispatchAction({type:s,batch:ky(o.findTargetDataIndices(i),o)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return tX(t,this.api,t.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,i,n,a,s){if(i){var o=new Le,l=this.visualMapModel.textStyleModel;o.add(new lt({style:kt(l,{x:a?s==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?s:"center",text:i})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=oe(t.getPieceList(),function(o,l){return{piece:o,indexInModelPieceList:l}}),n=t.get("text"),a=t.get("orient"),s=t.get("inverse");return(a==="horizontal"?s:!s)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},e.prototype._createItemSymbol=function(t,i,n){t.add(yr(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color")))},e.prototype._onItemClick=function(t){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var s=Ee(n.selected),o=i.getSelectedMapKey(t);a==="single"||a===!0?(s[o]=!0,R(s,function(l,u){s[u]=u===o})):s[o]=!s[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:s})}},e.type="visualMap.piecewise",e}(eX);function nX(r){r.registerComponentModel(bCe),r.registerComponentView(SCe),rX(r)}function xCe(r){Ze(iX),Ze(nX)}var wCe={label:{enabled:!0},decal:{show:!1}},QB=ot(),CCe={};function ACe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=Ee(wCe);We(i.label,r.getLocaleModel().get("aria"),!1),We(t.option,i,!1),n(),a();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var h=be();r.eachSeries(function(d){if(!d.isColorBySeries()){var f=h.get(d.type);f||(f={},h.set(d.type,f)),QB(d).scope=f}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(we(d.enableAriaDecal)){d.enableAriaDecal();return}var f=d.getData();if(d.isColorBySeries()){var y=s2(d.ecModel,d.name,CCe,r.getSeriesCount()),_=f.getVisual("decal");f.setVisual("decal",b(_,y))}else{var p=d.getRawData(),v={},g=QB(d).scope;f.each(function(S){var x=f.getRawIndex(S);v[x]=S});var m=p.count();p.each(function(S){var x=v[S],C=p.getName(S)||S+"",D=s2(d.ecModel,C,g,m),I=f.getItemVisual(x,"decal");f.setItemVisual(x,"decal",b(I,D))})}function b(S,x){var C=S?J(J({},x),S):x;return C.dirty=!0,C}})}}function a(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=Ce(h.option,c),!!h.get("enabled")){if(h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var d=r.getSeriesCount(),f=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,v=Math.min(d,p),g;if(!(d<1)){var m=o();if(m){var y=h.get(["general","withTitle"]);g=s(y,{title:m})}else g=h.get(["general","withoutTitle"]);var _=[],b=d>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=s(b,{seriesCount:d}),r.eachSeries(function(D,I){if(I<v){var M=void 0,L=D.get("name"),N=L?"withName":"withoutName";M=d>1?h.get(["series","multiple",N]):h.get(["series","single",N]),M=s(M,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>f){var B=h.get(["data","partialData"]);M+=s(B,{displayCnt:f})}else M+=h.get(["data","allData"]);for(var F=h.get(["data","separator","middle"]),U=h.get(["data","separator","end"]),$=[],q=0;q<O.count();q++)if(q<f){var Z=O.getName(q),te=O.getValues(q),Q=h.get(["data",Z?"withName":"withoutName"]);$.push(s(Q,{name:Z,value:te.join(F)}))}M+=$.join(F)+U,_.push(M)}});var S=h.getModel(["series","multiple","separator"]),x=S.get("middle"),C=S.get("end");g+=_.join(x)+C,u.setAttribute("aria-label",g)}}}}function s(u,c){if(!pe(u))return u;var h=u;return R(c,function(d,f){h=h.replace(new RegExp("\\{\\s*"+f+"\\s*\\}","g"),d)}),h}function o(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function DCe(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},R(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function ECe(r){r.registerPreprocessor(DCe),r.registerVisual(r.PRIORITY.VISUAL.ARIA,ACe)}var JB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},ICe=function(){function r(e){var t=this._condVal=pe(e)?new RegExp(e):Goe(e)?e:null;if(t==null){var i="";vt(i)}}return r.prototype.evaluate=function(e){var t=typeof e;return pe(t)?this._condVal.test(e):ut(t)?this._condVal.test(e+""):!1},r}(),PCe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),MCe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),LCe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),kCe=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),RCe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,i=t(this.valueGetterParam),n=e?this.valueParser(i):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?n:i))return!1;return!0},r}();function qE(r,e){if(r===!0||r===!1){var t=new PCe;return t.value=r,t}var i="";return aX(r)||vt(i),r.and?e5("and",r,e):r.or?e5("or",r,e):r.not?OCe(r,e):NCe(r,e)}function e5(r,e,t){var i=e[r],n="";ie(i)||vt(n),i.length||vt(n);var a=r==="and"?new MCe:new LCe;return a.children=oe(i,function(s){return qE(s,t)}),a.children.length||vt(n),a}function OCe(r,e){var t=r.not,i="";aX(t)||vt(i);var n=new kCe;return n.child=qE(t,e),n.child||vt(i),n}function NCe(r,e){for(var t="",i=e.prepareGetValue(r),n=[],a=rt(r),s=r.parser,o=s?VH(s):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=_e(JB,u)?JB[u]:u,h=r[u],d=o?o(h):h,f=Cfe(c,d)||c==="reg"&&new ICe(d);f||vt(t),n.push(f)}}n.length||vt(t);var p=new RCe;return p.valueGetterParam=i,p.valueParser=o,p.getValue=e.getValue,p.subCondList=n,p}function aX(r){return De(r)&&!li(r)}var BCe=function(){function r(e,t){this._cond=qE(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function FCe(r,e){return new BCe(r,e)}var UCe={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,i=FCe(r.config,{valueGetterAttrMap:be({dimension:!0}),prepareGetValue:function(o){var l="",u=o.dimension;_e(o,"dimension")||vt(l);var c=e.getDimensionInfo(u);return c||vt(l),{dimIdx:c.index}},getValue:function(o){return e.retrieveValueFromItem(t,o.dimIdx)}}),n=[],a=0,s=e.count();a<s;a++)t=e.getRawDataItem(a),i.evaluate()&&n.push(t);return{data:n}}},VCe={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,i="",n=xt(t);n.length||vt(i);var a=[];R(n,function(c){var h=c.dimension,d=c.order,f=c.parser,p=c.incomparable;if(h==null&&vt(i),d!=="asc"&&d!=="desc"&&vt(i),p&&p!=="min"&&p!=="max"){var v="";vt(v)}if(d!=="asc"&&d!=="desc"){var g="";vt(g)}var m=e.getDimensionInfo(h);m||vt(i);var y=f?VH(f):null;f&&!y&&vt(i),a.push({dimIdx:m.index,parser:y,comparator:new GH(d,p)})});var s=e.sourceFormat;s!==ui&&s!==Jn&&vt(i);for(var o=[],l=0,u=e.count();l<u;l++)o.push(e.getRawDataItem(l));return o.sort(function(c,h){for(var d=0;d<a.length;d++){var f=a[d],p=e.retrieveValueFromItem(c,f.dimIdx),v=e.retrieveValueFromItem(h,f.dimIdx);f.parser&&(p=f.parser(p),v=f.parser(v));var g=f.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:o}}};function zCe(r){r.registerTransform(UCe),r.registerTransform(VCe)}var GCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,i,n){r.prototype.init.call(this,t,i,n),this._sourceManager=new qH(this),iR(this)},e.prototype.mergeOption=function(t,i){r.prototype.mergeOption.call(this,t,i),iR(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ja},e}(tt),HCe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}($t);function $Ce(r){r.registerComponentModel(GCe),r.registerComponentView(HCe)}var Pa=us.CMD;function _h(r,e){return Math.abs(r-e)<1e-5}function oC(r){var e=r.data,t=r.len(),i=[],n,a=0,s=0,o=0,l=0;function u(O,B){n&&n.length>2&&i.push(n),n=[O,B]}function c(O,B,F,U){_h(O,F)&&_h(B,U)||n.push(O,B,F,U,F,U)}function h(O,B,F,U,$,q){var Z=Math.abs(B-O),te=Math.tan(Z/4)*4/3,Q=B<O?-1:1,se=Math.cos(O),he=Math.sin(O),ue=Math.cos(B),Ie=Math.sin(B),Oe=se*$+F,Fe=he*q+U,me=ue*$+F,ze=Ie*q+U,Pe=$*te*Q,ye=q*te*Q;n.push(Oe-Pe*he,Fe+ye*se,me+Pe*Ie,ze-ye*ue,me,ze)}for(var d,f,p,v,g=0;g<t;){var m=e[g++],y=g===1;switch(y&&(a=e[g],s=e[g+1],o=a,l=s,(m===Pa.L||m===Pa.C||m===Pa.Q)&&(n=[o,l])),m){case Pa.M:a=o=e[g++],s=l=e[g++],u(o,l);break;case Pa.L:d=e[g++],f=e[g++],c(a,s,d,f),a=d,s=f;break;case Pa.C:n.push(e[g++],e[g++],e[g++],e[g++],a=e[g++],s=e[g++]);break;case Pa.Q:d=e[g++],f=e[g++],p=e[g++],v=e[g++],n.push(a+2/3*(d-a),s+2/3*(f-s),p+2/3*(d-p),v+2/3*(f-v),p,v),a=p,s=v;break;case Pa.A:var _=e[g++],b=e[g++],S=e[g++],x=e[g++],C=e[g++],D=e[g++]+C;g+=1;var I=!e[g++];d=Math.cos(C)*S+_,f=Math.sin(C)*x+b,y?(o=d,l=f,u(o,l)):c(a,s,d,f),a=Math.cos(D)*S+_,s=Math.sin(D)*x+b;for(var M=(I?-1:1)*Math.PI/2,L=C;I?L>D:L<D;L+=M){var N=I?Math.max(L+M,D):Math.min(L+M,D);h(L,N,_,b,S,x)}break;case Pa.R:o=a=e[g++],l=s=e[g++],d=o+e[g++],f=l+e[g++],u(d,l),c(d,l,d,f),c(d,f,o,f),c(o,f,o,l),c(o,l,d,l);break;case Pa.Z:n&&c(a,s,o,l),a=o,s=l;break}}return n&&n.length>2&&i.push(n),i}function lC(r,e,t,i,n,a,s,o,l,u){if(_h(r,t)&&_h(e,i)&&_h(n,s)&&_h(a,o)){l.push(s,o);return}var c=2/u,h=c*c,d=s-r,f=o-e,p=Math.sqrt(d*d+f*f);d/=p,f/=p;var v=t-r,g=i-e,m=n-s,y=a-o,_=v*v+g*g,b=m*m+y*y;if(_<h&&b<h){l.push(s,o);return}var S=d*v+f*g,x=-d*m-f*y,C=_-S*S,D=b-x*x;if(C<h&&S>=0&&D<h&&x>=0){l.push(s,o);return}var I=[],M=[];tl(r,t,n,s,.5,I),tl(e,i,a,o,.5,M),lC(I[0],M[0],I[1],M[1],I[2],M[2],I[3],M[3],l,u),lC(I[4],M[4],I[5],M[5],I[6],M[6],I[7],M[7],l,u)}function WCe(r,e){var t=oC(r),i=[];e=e||1;for(var n=0;n<t.length;n++){var a=t[n],s=[],o=a[0],l=a[1];s.push(o,l);for(var u=2;u<a.length;){var c=a[u++],h=a[u++],d=a[u++],f=a[u++],p=a[u++],v=a[u++];lC(o,l,c,h,d,f,p,v,s,e),o=p,l=v}i.push(s)}return i}function sX(r,e,t){var i=r[e],n=r[1-e],a=Math.abs(i/n),s=Math.ceil(Math.sqrt(a*t)),o=Math.floor(t/s);o===0&&(o=1,s=t);for(var l=[],u=0;u<s;u++)l.push(o);var c=s*o,h=t-c;if(h>0)for(var u=0;u<h;u++)l[u%s]+=1;return l}function t5(r,e,t){for(var i=r.r0,n=r.r,a=r.startAngle,s=r.endAngle,o=Math.abs(s-a),l=o*n,u=n-i,c=l>Math.abs(u),h=sX([l,u],c?0:1,e),d=(c?o:u)/h.length,f=0;f<h.length;f++)for(var p=(c?u:o)/h[f],v=0;v<h[f];v++){var g={};c?(g.startAngle=a+d*f,g.endAngle=a+d*(f+1),g.r0=i+p*v,g.r=i+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=i+d*f,g.r=i+d*(f+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function qCe(r,e,t){for(var i=r.width,n=r.height,a=i>n,s=sX([i,n],a?0:1,e),o=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=r[o]/s.length,d=0;d<s.length;d++)for(var f=r[l]/s[d],p=0;p<s[d];p++){var v={};v[u]=d*h,v[c]=p*f,v[o]=h,v[l]=f,v.x+=r.x,v.y+=r.y,t.push(v)}}function r5(r,e,t,i){return r*i-t*e}function jCe(r,e,t,i,n,a,s,o){var l=t-r,u=i-e,c=s-n,h=o-a,d=r5(c,h,l,u);if(Math.abs(d)<1e-6)return null;var f=r-n,p=e-a,v=r5(f,p,c,h)/d;return v<0||v>1?null:new He(v*l+r,v*u+e)}function XCe(r,e,t){var i=new He;He.sub(i,t,e),i.normalize();var n=new He;He.sub(n,r,e);var a=n.dot(i);return a}function eh(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function YCe(r,e,t){for(var i=r.length,n=[],a=0;a<i;a++){var s=r[a],o=r[(a+1)%i],l=jCe(s[0],s[1],o[0],o[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:XCe(l,e,t),pt:l,idx:a})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(g,m){return g.projPt-m.projPt});var u=n[0],c=n[n.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var d=[u.pt.x,u.pt.y],f=[c.pt.x,c.pt.y],p=[d],v=[f],a=u.idx+1;a<=c.idx;a++)eh(p,r[a].slice());eh(p,f),eh(p,d);for(var a=c.idx+1;a<=u.idx+i;a++)eh(v,r[a%i].slice());return eh(v,d),eh(v,f),[{points:p},{points:v}]}function i5(r){var e=r.points,t=[],i=[];s1(e,t,i);var n=new qe(t[0],t[1],i[0]-t[0],i[1]-t[1]),a=n.width,s=n.height,o=n.x,l=n.y,u=new He,c=new He;return a>s?(u.x=c.x=o+a/2,u.y=l,c.y=l+s):(u.y=c.y=l+s/2,u.x=o,c.x=o+a),YCe(e,u,c)}function h_(r,e,t,i){if(t===1)i.push(e);else{var n=Math.floor(t/2),a=r(e);h_(r,a[0],n,i),h_(r,a[1],t-n,i)}return i}function KCe(r,e){for(var t=[],i=0;i<e;i++)t.push(hD(r));return t}function ZCe(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function QCe(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function JCe(r,e){var t=[],i=r.shape,n;switch(r.type){case"rect":qCe(i,e,t),n=st;break;case"sector":t5(i,e,t),n=Ei;break;case"circle":t5({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},e,t),n=Ei;break;default:var a=r.getComputedTransform(),s=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,o=oe(WCe(r.getUpdatedPathProxy(),s),function(m){return QCe(m)}),l=o.length;if(l===0)h_(i5,{points:o[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:o[u]});else{var c=0,h=oe(o,function(m){var y=[],_=[];s1(m,y,_);var b=(_[1]-y[1])*(_[0]-y[0]);return c+=b,{poly:m,area:b}});h.sort(function(m,y){return y.area-m.area});for(var d=e,u=0;u<l;u++){var f=h[u];if(d<=0)break;var p=u===l-1?d:Math.ceil(f.area/c*e);p<0||(h_(i5,{points:f.poly},p,t),d-=p)}}n=Ii;break}if(!n)return KCe(r,e);for(var v=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),ZCe(r,g),v.push(g)}return v}function eAe(r,e){var t=r.length,i=e.length;if(t===i)return[r,e];for(var n=[],a=[],s=t<i?r:e,o=Math.min(t,i),l=Math.abs(i-t)/6,u=(o-2)/6,c=Math.ceil(l/u)+1,h=[s[0],s[1]],d=l,f=2;f<o;){var p=s[f-2],v=s[f-1],g=s[f++],m=s[f++],y=s[f++],_=s[f++],b=s[f++],S=s[f++];if(d<=0){h.push(g,m,y,_,b,S);continue}for(var x=Math.min(d,c-1)+1,C=1;C<=x;C++){var D=C/x;tl(p,g,y,b,D,n),tl(v,m,_,S,D,a),p=n[3],v=a[3],h.push(n[1],a[1],n[2],a[2],p,v),g=n[5],m=a[5],y=n[6],_=a[6]}d-=x-1}return s===r?[h,e]:[r,h]}function n5(r,e){for(var t=r.length,i=r[t-2],n=r[t-1],a=[],s=0;s<e.length;)a[s++]=i,a[s++]=n;return a}function tAe(r,e){for(var t,i,n,a=[],s=[],o=0;o<Math.max(r.length,e.length);o++){var l=r[o],u=e[o],c=void 0,h=void 0;l?u?(t=eAe(l,u),c=t[0],h=t[1],i=c,n=h):(h=n5(n||l,l),c=l):(c=n5(i||u,u),h=u),a.push(c),s.push(h)}return[a,s]}function a5(r){for(var e=0,t=0,i=0,n=r.length,a=0,s=n-2;a<n;s=a,a+=2){var o=r[s],l=r[s+1],u=r[a],c=r[a+1],h=o*c-u*l;e+=h,t+=(o+u)*h,i+=(l+c)*h}return e===0?[r[0]||0,r[1]||0]:[t/e/3,i/e/3,e]}function rAe(r,e,t,i){for(var n=(r.length-2)/6,a=1/0,s=0,o=r.length,l=o-2,u=0;u<n;u++){for(var c=u*6,h=0,d=0;d<o;d+=2){var f=d===0?c:(c+d-2)%l+2,p=r[f]-t[0],v=r[f+1]-t[1],g=e[d]-i[0],m=e[d+1]-i[1],y=g-p,_=m-v;h+=y*y+_*_}h<a&&(a=h,s=u)}return s}function iAe(r){for(var e=[],t=r.length,i=0;i<t;i+=2)e[i]=r[t-i-2],e[i+1]=r[t-i-1];return e}function nAe(r,e,t,i){for(var n=[],a,s=0;s<r.length;s++){var o=r[s],l=e[s],u=a5(o),c=a5(l);a==null&&(a=u[2]<0!=c[2]<0);var h=[],d=[],f=0,p=1/0,v=[],g=o.length;a&&(o=iAe(o));for(var m=rAe(o,l,u,c)*6,y=g-2,_=0;_<y;_+=2){var b=(m+_)%y+2;h[_+2]=o[b]-u[0],h[_+3]=o[b+1]-u[1]}h[0]=o[m]-u[0],h[1]=o[m+1]-u[1];for(var S=i/t,x=-i/2;x<=i/2;x+=S){for(var C=Math.sin(x),D=Math.cos(x),I=0,_=0;_<o.length;_+=2){var M=h[_],L=h[_+1],N=l[_]-c[0],O=l[_+1]-c[1],B=N*D-O*C,F=N*C+O*D;v[_]=B,v[_+1]=F;var U=B-M,$=F-L;I+=U*U+$*$}if(I<p){p=I,f=x;for(var q=0;q<v.length;q++)d[q]=v[q]}}n.push({from:h,to:d,fromCp:u,toCp:c,rotation:-f})}return n}function f_(r){return r.__isCombineMorphing}var oX="__mOriginal_";function d_(r,e,t){var i=oX+e,n=r[i]||r[e];r[i]||(r[i]=r[e]);var a=t.replace,s=t.after,o=t.before;r[e]=function(){var l=arguments,u;return o&&o.apply(this,l),a?u=a.apply(this,l):u=n.apply(this,l),s&&s.apply(this,l),u}}function Gp(r,e){var t=oX+e;r[t]&&(r[e]=r[t],r[t]=null)}function s5(r,e){for(var t=0;t<r.length;t++)for(var i=r[t],n=0;n<i.length;){var a=i[n],s=i[n+1];i[n++]=e[0]*a+e[2]*s+e[4],i[n++]=e[1]*a+e[3]*s+e[5]}}function lX(r,e){var t=r.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),n=tAe(oC(t),oC(i)),a=n[0],s=n[1],o=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}o&&s5(a,o),l&&s5(s,l),d_(e,"updateTransform",{replace:u}),e.transform=null;var c=nAe(a,s,10,Math.PI),h=[];d_(e,"buildPath",{replace:function(d){for(var f=e.__morphT,p=1-f,v=[],g=0;g<c.length;g++){var m=c[g],y=m.from,_=m.to,b=m.rotation*f,S=m.fromCp,x=m.toCp,C=Math.sin(b),D=Math.cos(b);vy(v,S,x,f);for(var I=0;I<y.length;I+=2){var M=y[I],L=y[I+1],N=_[I],O=_[I+1],B=M*p+N*f,F=L*p+O*f;h[I]=B*D-F*C+v[0],h[I+1]=B*C+F*D+v[1]}var U=h[0],$=h[1];d.moveTo(U,$);for(var I=2;I<y.length;){var N=h[I++],O=h[I++],q=h[I++],Z=h[I++],te=h[I++],Q=h[I++];U===N&&$===O&&q===te&&Z===Q?d.lineTo(te,Q):d.bezierCurveTo(N,O,q,Z,te,Q),U=te,$=Q}}}})}function jE(r,e,t){if(!r||!e)return e;var i=t.done,n=t.during;lX(r,e),e.__morphT=0;function a(){Gp(e,"buildPath"),Gp(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Ce({during:function(s){e.dirtyShape(),n&&n(s)},done:function(){a(),i&&i()}},t)),e}function aAe(r,e,t,i,n,a){var s=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=a===i?0:Math.round(32767*(e-i)/(a-i));for(var o=0,l,u=(1<<s)/2;u>0;u/=2){var c=0,h=0;(r&u)>0&&(c=1),(e&u)>0&&(h=1),o+=u*u*(3*c^h),h===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return o}function p_(r){var e=1/0,t=1/0,i=-1/0,n=-1/0,a=oe(r,function(o){var l=o.getBoundingRect(),u=o.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(h,t),i=Math.max(c,i),n=Math.max(h,n),[c,h]}),s=oe(a,function(o,l){return{cp:o,z:aAe(o[0],o[1],e,t,i,n),path:r[l]}});return s.sort(function(o,l){return o.z-l.z}).map(function(o){return o.path})}function uX(r){return JCe(r.path,r.count)}function uC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function sAe(r,e,t){var i=[];function n(S){for(var x=0;x<S.length;x++){var C=S[x];f_(C)?n(C.childrenRef()):C instanceof Qe&&i.push(C)}}n(r);var a=i.length;if(!a)return uC();var s=t.dividePath||uX,o=s({path:e,count:a});if(o.length!==a)return console.error("Invalid morphing: unmatched splitted path"),uC();i=p_(i),o=p_(o);for(var l=t.done,u=t.during,c=t.individualDelay,h=new Is,d=0;d<a;d++){var f=i[d],p=o[d];p.parent=e,p.copyTransform(h),c||lX(f,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return o};function v(S){for(var x=0;x<o.length;x++)o[x].addSelfToZr(S)}d_(e,"addSelfToZr",{after:function(S){v(S)}}),d_(e,"removeSelfFromZr",{after:function(S){for(var x=0;x<o.length;x++)o[x].removeSelfFromZr(S)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Gp(e,"addSelfToZr"),Gp(e,"removeSelfFromZr")}var m=o.length;if(c)for(var y=m,_=function(){y--,y===0&&(g(),l&&l())},d=0;d<m;d++){var b=c?Ce({delay:(t.delay||0)+c(d,m,i[d],o[d]),done:_},t):t;jE(i[d],o[d],b)}else e.__morphT=0,e.animateTo({__morphT:1},Ce({during:function(S){for(var x=0;x<m;x++){var C=o[x];C.__morphT=e.__morphT,C.dirtyShape()}u&&u(S)},done:function(){g();for(var S=0;S<r.length;S++)Gp(r[S],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:i,toIndividuals:o,count:m}}function oAe(r,e,t){var i=e.length,n=[],a=t.dividePath||uX;function s(f){for(var p=0;p<f.length;p++){var v=f[p];f_(v)?s(v.childrenRef()):v instanceof Qe&&n.push(v)}}if(f_(r)){s(r.childrenRef());var o=n.length;if(o<i)for(var l=0,u=o;u<i;u++)n.push(hD(n[l++%o]));n.length=i}else{n=a({path:r,count:i});for(var c=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(c);if(n.length!==i)return console.error("Invalid morphing: unmatched splitted path"),uC()}n=p_(n),e=p_(e);for(var h=t.individualDelay,u=0;u<i;u++){var d=h?Ce({delay:(t.delay||0)+h(u,i,n[u],e[u])},t):t;jE(n[u],e[u],d)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function o5(r){return ie(r[0])}function l5(r,e){for(var t=[],i=r.length,n=0;n<i;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var a=e[n].length,s=void 0;for(s=0;s<a;s++)t[s%i].many.push(e[n][s])}for(var o=0,n=i-1;n>=0;n--)if(!t[n].many.length){var l=t[o].many;if(l.length<=1)if(o)o=0;else return t;var a=l.length,u=Math.ceil(a/2);t[n].many=l.slice(u,a),t[o].many=l.slice(0,u),o++}return t}var lAe={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i<r.count;i++){var n=hD(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function dx(r,e,t,i,n,a){if(!r.length||!e.length)return;var s=Lf("update",i,n);if(!(s&&s.duration>0))return;var o=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},s),u,c;o5(r)&&(u=r,c=e),o5(e)&&(u=e,c=r);function h(m,y,_,b,S){var x=m.many,C=m.one;if(x.length===1&&!S){var D=y?x[0]:C,I=y?C:x[0];if(f_(D))h({many:[D],one:I},!0,_,b,!0);else{var M=o?Ce({delay:o(_,b)},l):l;jE(D,I,M),a(D,I,D,I,M)}}else for(var L=Ce({dividePath:lAe[t],individualDelay:o&&function($,q,Z,te){return o($+_,b)}},l),N=y?sAe(x,C,L):oAe(C,x,L),O=N.fromIndividuals,B=N.toIndividuals,F=O.length,U=0;U<F;U++){var M=o?Ce({delay:o(U,F)},l):l;a(O[U],B[U],y?x[U]:m.one,y?m.one:x[U],M)}}for(var d=u?u===r:r.length>e.length,f=u?l5(c,u):l5(d?e:r,[d?r:e]),p=0,v=0;v<f.length;v++)p+=f[v].many.length;for(var g=0,v=0;v<f.length;v++)h(f[v],d,g,p),g+=f[v].many.length}function nu(r){if(!r)return[];if(ie(r)){for(var e=[],t=0;t<r.length;t++)e.push(nu(r[t]));return e}var i=[];return r.traverse(function(n){n instanceof Qe&&!n.disableMorphing&&!n.invisible&&!n.ignore&&i.push(n)}),i}var cX=1e4,uAe=0,u5=1,c5=2,cAe=ot();function hAe(r,e){for(var t=r.dimensions,i=0;i<t.length;i++){var n=r.getDimensionInfo(t[i]);if(n&&n.otherDims[e]===0)return t[i]}}function fAe(r,e,t){var i=r.getDimensionInfo(t),n=i&&i.ordinalMeta;if(i){var a=r.get(i.name,e);return n&&n.categories[a]||a+""}}function h5(r,e,t,i){var n=i?"itemChildGroupId":"itemGroupId",a=hAe(r,n);if(a){var s=fAe(r,e,a);return s}var o=r.getRawDataItem(e),l=i?"childGroupId":"groupId";if(o&&o[l])return o[l]+"";if(!i)return t||r.getId(e)}function f5(r){var e=[];return R(r,function(t){var i=t.data,n=t.dataGroupId;if(!(i.count()>cX))for(var a=i.getIndices(),s=0;s<a.length;s++)e.push({data:i,groupId:h5(i,s,n,!1),childGroupId:h5(i,s,n,!0),divide:t.divide,dataIndex:s})}),e}function px(r,e,t){r.traverse(function(i){i instanceof Qe&&Vt(i,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function vx(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function th(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function dAe(r,e,t){var i=Lf("update",t,e);i&&r.traverse(function(n){if(n instanceof Yn){var a=lhe(n);a&&n.animateFrom({style:a},i)}})}function pAe(r,e){var t=r.length;if(t!==e.length)return!1;for(var i=0;i<t;i++){var n=r[i],a=e[i];if(n.data.getId(n.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function hX(r,e,t){var i=f5(r),n=f5(e);function a(_,b,S,x,C){(S||_)&&b.animateFrom({style:S&&S!==_?J(J({},S.style),_.style):_.style},C)}var s=!1,o=uAe,l=be(),u=be();i.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<n.length;c++){var h=n[c].groupId;if(u.get(h)){o=u5;break}var d=n[c].childGroupId;if(d&&l.get(d)){o=c5;break}}function f(_,b){return function(S){var x=S.data,C=S.dataIndex;return b?x.getId(C):_?o===u5?S.childGroupId:S.groupId:o===c5?S.childGroupId:S.groupId}}var p=pAe(i,n),v={};if(!p)for(var c=0;c<n.length;c++){var g=n[c],m=g.data.getItemGraphicEl(g.dataIndex);m&&(v[m.id]=!0)}function y(_,b){var S=i[b],x=n[_],C=x.data.hostModel,D=S.data.getItemGraphicEl(S.dataIndex),I=x.data.getItemGraphicEl(x.dataIndex);if(D===I){I&&dAe(I,x.dataIndex,C);return}D&&v[D.id]||I&&(th(I),D?(th(D),vx(D),s=!0,dx(nu(D),nu(I),x.divide,C,_,a)):px(I,C,_))}new Xs(i,n,f(!0,p),f(!1,p),null,"multiple").update(y).updateManyToOne(function(_,b){var S=n[_],x=S.data,C=x.hostModel,D=x.getItemGraphicEl(S.dataIndex),I=St(oe(b,function(M){return i[M].data.getItemGraphicEl(i[M].dataIndex)}),function(M){return M&&M!==D&&!v[M.id]});D&&(th(D),I.length?(R(I,function(M){th(M),vx(M)}),s=!0,dx(nu(I),nu(D),S.divide,C,_,a)):px(D,C,S.dataIndex))}).updateOneToMany(function(_,b){var S=i[b],x=S.data.getItemGraphicEl(S.dataIndex);if(!(x&&v[x.id])){var C=St(oe(_,function(I){return n[I].data.getItemGraphicEl(n[I].dataIndex)}),function(I){return I&&I!==x}),D=n[_[0]].data.hostModel;C.length&&(R(C,function(I){return th(I)}),x?(th(x),vx(x),s=!0,dx(nu(x),nu(C),S.divide,D,_[0],a)):R(C,function(I){return px(I,D,_[0])}))}}).updateManyToMany(function(_,b){new Xs(b,_,function(S){return i[S].data.getId(i[S].dataIndex)},function(S){return n[S].data.getId(n[S].dataIndex)}).update(function(S,x){y(_[S],b[x])}).execute()}).execute(),s&&R(e,function(_){var b=_.data,S=b.hostModel,x=S&&t.getViewOfSeriesModel(S),C=Lf("update",S,0);x&&S.isAnimationEnabled()&&C&&C.duration>0&&x.group.traverse(function(D){D instanceof Qe&&!D.animators.length&&D.animateFrom({style:{opacity:0}},C)})})}function d5(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function p5(r){return ie(r)?r.sort().join(","):r}function Io(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function vAe(r,e){var t=be(),i=be(),n=be();return R(r.oldSeries,function(a,s){var o=r.oldDataGroupIds[s],l=r.oldData[s],u=d5(a),c=p5(u);i.set(c,{dataGroupId:o,data:l}),ie(u)&&R(u,function(h){n.set(h,{key:c,dataGroupId:o,data:l})})}),R(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var s=a.get("dataGroupId"),o=a.getData(),l=d5(a),u=p5(l),c=i.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Io(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Io(o),data:o}]});else if(ie(l)){var h=[];R(l,function(p){var v=i.get(p);v.data&&h.push({dataGroupId:v.dataGroupId,divide:Io(v.data),data:v.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:s,data:o,divide:Io(o)}]})}else{var d=n.get(l);if(d){var f=t.get(d.key);f||(f={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Io(d.data)}],newSeries:[]},t.set(d.key,f)),f.newSeries.push({dataGroupId:s,data:o,divide:Io(o)})}}}}),t}function v5(r,e){for(var t=0;t<r.length;t++){var i=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(i)return t}}function gAe(r,e,t,i){var n=[],a=[];R(xt(r.from),function(s){var o=v5(e.oldSeries,s);o>=0&&n.push({dataGroupId:e.oldDataGroupIds[o],data:e.oldData[o],divide:Io(e.oldData[o]),groupIdDim:s.dimension})}),R(xt(r.to),function(s){var o=v5(t.updatedSeries,s);if(o>=0){var l=t.updatedSeries[o].getData();a.push({dataGroupId:e.oldDataGroupIds[o],data:l,divide:Io(l),groupIdDim:s.dimension})}}),n.length>0&&a.length>0&&hX(n,a,i)}function mAe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){R(xt(i.seriesTransition),function(n){R(xt(n.to),function(a){for(var s=i.updatedSeries,o=0;o<s.length;o++)(a.seriesIndex!=null&&a.seriesIndex===s[o].seriesIndex||a.seriesId!=null&&a.seriesId===s[o].id)&&(s[o][Ay]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,i){var n=cAe(t);if(n.oldSeries&&i.updatedSeries&&i.optionChanged){var a=i.seriesTransition;if(a)R(xt(a),function(f){gAe(f,n,i,t)});else{var s=vAe(n,i);R(s.keys(),function(f){var p=s.get(f);hX(p.oldSeries,p.newSeries,t)})}R(i.updatedSeries,function(f){f[Ay]&&(f[Ay]=!1)})}for(var o=e.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],c=n.oldData=[],h=0;h<o.length;h++){var d=o[h].getData();d.count()<cX&&(l.push(o[h]),u.push(o[h].get("dataGroupId")),c.push(d))}})}Ze([Dge]);Ze([Sge]);Ze([jge,lme,yme,Zme,lye,Xye,S0e,a_e,D_e,k_e,G_e,N1e,obe,ybe,Rbe,Fbe,Xbe,tTe,fTe,yTe,ETe,hSe]);Ze(PSe);Ze(rxe);Ze(uq);Ze(vxe);Ze(Xq);Ze(_xe);Ze(Exe);Ze(vwe);Ze(Rwe);Ze(gg);Ze(Zwe);Ze(e2e);Ze(c2e);Ze(m2e);Ze(x2e);Ze(I2e);Ze(U2e);Ze(iCe);Ze(Zj);Ze(Qj);Ze(xCe);Ze(iX);Ze(nX);Ze(ECe);Ze(zCe);Ze($Ce);Ze(mAe);Ze(Gve);function yAe(r){let e=r.target.getAttribute("id");document.querySelectorAll(".panel").forEach(i=>{i.getAttribute("id")===e+"_panel"?i.hidden=!1:i.hidden=!0})}const _Ae=document.querySelectorAll('input[type="radio"]');_Ae.forEach(r=>{r.addEventListener("click",e=>{yAe(e)})});const XE=document.getElementById("words-count-track");XE.getAttribute("data-time").split(",");const gx=XE.getAttribute("data-words").split(","),fX=I$(XE),dX=document.getElementById("topic-track-worte-ctrl");function pX(){let r=[],e=[],t=[],i=[];gx.slice(-1);let n=dX.value,a=[],s=gx.length,o=Math.floor(s/n);for(let c=0;c<s;c+=o){let h=gx.slice(c,c+o),d=h[0],f=h.map(p=>p-d);a.push(f)}let l=0;a.forEach(c=>{parseInt(c.slice(-1))>l&&(console.log(c.slice(-1)),l=c.slice(-1))}),console.log(l);for(let c=0;c<n;c++)r.push({left:`${c*(100/n)}%`,top:"0",width:`${100/n}%`,height:"100%"}),e.push({type:"category",gridIndex:c,min:0,axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1}}),t.push({type:"value",gridIndex:c,min:0,max:l,splitLine:{lineStyle:{color:"#aaa"}},axisLabel:{show:!1}}),i.push({type:"line",name:`${c}`,xAxisIndex:c,yAxisIndex:c,data:a[c],showSymbol:!1,lineStyle:{color:"#fff"}});const u={tooltip:{trigger:"axis",valueFormatter:c=>"Gesprochene Worte "+new Intl.NumberFormat("de-CH").format(c)},grid:r,xAxis:e,yAxis:t,series:i};fX.setOption(u)}dX.addEventListener("change",r=>{fX.clear(),pX()});pX();const B1=document.getElementById("sentiment-track"),bAe=B1.getAttribute("data-time").split(","),TAe=B1.getAttribute("data-sentiments").split(","),SAe=B1.getAttribute("data-weights").split(","),xAe=I$(B1),wAe={tooltip:{trigger:"axis",position:"top",formatter:"Sekunde: {b0}<br>Sentiment: {c0}"},grid:{show:!1,top:0,bottom:0,right:0,left:0},xAxis:{type:"category",data:bAe},yAxis:{type:"category",data:["-1","0","1"]},color:"#fff",series:[{symbolSize:SAe,data:TAe,type:"scatter"}]};xAe.setOption(wAe);const vX=document.getElementById("video");BA.registerPlugin(Qu);const yn=new sr("my-player",{controls:!1,muted:!0,srgOptions:{liveui:!1}});yn.src({src:vX.getAttribute("data-urn"),type:"srgssr/urn"});const CAe=document.getElementById("timeline-bar-ctrl");vX.addEventListener("click",r=>{yn.paused()?yn.play():yn.pause(),EAe()});const AAe=document.getElementById("transcript"),DAe=AAe.querySelectorAll("[data-start]");DAe.forEach(r=>{r.addEventListener("click",e=>{yn.currentTime(e.target.getAttribute("data-start")),yn.play()})});const cC={timelineIndicatorIsDragged:!1};function EAe(){let e=yn.duration()/10,t="<span>00:00:00</span>";for(let i=1;i<=10;i++)t+=`<span>${secondsToTimecode(i*e)}</span>`;document.querySelector("#timeline-bar").insertAdjacentHTML("beforeend",t)}function IAe(r){return yn.duration()/document.getElementById("timeline-bar").offsetWidth*r}yn.on("timeupdate",r=>{if(!cC.timelineIndicatorIsDragged){let e=document.getElementById("timeline-bar").offsetWidth/yn.duration()*yn.currentTime();CAe.style.transform=`translate3d(${e}px, 0px, 0px)`}});document.addEventListener("DOMContentLoaded",r=>{BA.registerPlugin(Qu),Qu.create("#timeline-bar-ctrl",{type:"x",bounds:document.getElementById("timeline-bar"),onDragStart:function(){cC.timelineIndicatorIsDragged=!0},onDragEnd:function(){yn.currentTime(IAe(this.x)),yn.play(),cC.timelineIndicatorIsDragged=!1}})});const PAe=[["Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic6 Topic7 Topic8"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"],["Topic1 Topic2 Topic3","Topic3 Topic4 Topic5","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3","Topic1 Topic2 Topic3"]];function gX(r){let e="";PAe[r-1].forEach(i=>{e+=`<li>${i}</li>`});let t=document.querySelector("#topic-segement-list");t.innerHTML=e,t.style.gridTemplate=`1fr / repeat(${r}, 1fr)`}let mX=document.getElementById("topic-track-segment-ctrl");mX.addEventListener("change",r=>{gX(r.target.value)});gX(mX.value);